mirror of
https://github.com/yldio/copilot.git
synced 2024-12-01 07:30:07 +02:00
reworking fake data structure for org members and the selector to represent this
This commit is contained in:
parent
1651dc7fcc
commit
cf8b020815
@ -7,7 +7,7 @@ const PeopleList = ({
|
||||
people = []
|
||||
}) => {
|
||||
const columns = [{
|
||||
title: 'Memeber',
|
||||
title: 'Member',
|
||||
}, {
|
||||
title: 'Status',
|
||||
}, {
|
||||
@ -20,9 +20,9 @@ const PeopleList = ({
|
||||
|
||||
people.forEach( (person) => {
|
||||
data.push({
|
||||
name: person.uuid,
|
||||
status: person.uuid,
|
||||
role: person.uuid,
|
||||
name: person.name,
|
||||
status: person.status,
|
||||
role: person.role,
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -219,8 +219,16 @@
|
||||
"id": "biz-tech",
|
||||
"name": "BizTech",
|
||||
"members": [
|
||||
"fd853d8f-e1dd-49b5-b7b3-ae9adfea1e2f",
|
||||
"6deddbaa-3b94-4373-8cf7-97129507a872"
|
||||
{
|
||||
"uuid": "fd853d8f-e1dd-49b5-b7b3-ae9adfea1e2f",
|
||||
"role": "Owner",
|
||||
"status": "Active"
|
||||
},
|
||||
{
|
||||
"uuid": "6deddbaa-3b94-4373-8cf7-97129507a872",
|
||||
"role": "Unassigned",
|
||||
"status": "Sent invitation"
|
||||
}
|
||||
]
|
||||
}, {
|
||||
"owner": "b94033c1-3665-4c36-afab-d9c3d0b51c01",
|
||||
|
@ -114,8 +114,12 @@ const instancesByProjectId = (projectId) => createSelector(
|
||||
const peopleByOrgId = (orgId) => createSelector(
|
||||
[members, orgById(orgId)], (members, org) => {
|
||||
const matched = [];
|
||||
org.members.filter((UUID) =>
|
||||
matched.push(find(members, ['uuid', UUID])));
|
||||
org.members.filter((m) => {
|
||||
matched.push({
|
||||
...find(members, ['uuid', m.uuid]),
|
||||
...m
|
||||
});
|
||||
});
|
||||
return matched;
|
||||
}
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user