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 = []
|
people = []
|
||||||
}) => {
|
}) => {
|
||||||
const columns = [{
|
const columns = [{
|
||||||
title: 'Memeber',
|
title: 'Member',
|
||||||
}, {
|
}, {
|
||||||
title: 'Status',
|
title: 'Status',
|
||||||
}, {
|
}, {
|
||||||
@ -20,9 +20,9 @@ const PeopleList = ({
|
|||||||
|
|
||||||
people.forEach( (person) => {
|
people.forEach( (person) => {
|
||||||
data.push({
|
data.push({
|
||||||
name: person.uuid,
|
name: person.name,
|
||||||
status: person.uuid,
|
status: person.status,
|
||||||
role: person.uuid,
|
role: person.role,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -219,8 +219,16 @@
|
|||||||
"id": "biz-tech",
|
"id": "biz-tech",
|
||||||
"name": "BizTech",
|
"name": "BizTech",
|
||||||
"members": [
|
"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",
|
"owner": "b94033c1-3665-4c36-afab-d9c3d0b51c01",
|
||||||
|
@ -114,8 +114,12 @@ const instancesByProjectId = (projectId) => createSelector(
|
|||||||
const peopleByOrgId = (orgId) => createSelector(
|
const peopleByOrgId = (orgId) => createSelector(
|
||||||
[members, orgById(orgId)], (members, org) => {
|
[members, orgById(orgId)], (members, org) => {
|
||||||
const matched = [];
|
const matched = [];
|
||||||
org.members.filter((UUID) =>
|
org.members.filter((m) => {
|
||||||
matched.push(find(members, ['uuid', UUID])));
|
matched.push({
|
||||||
|
...find(members, ['uuid', m.uuid]),
|
||||||
|
...m
|
||||||
|
});
|
||||||
|
});
|
||||||
return matched;
|
return matched;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user