fix format
This commit is contained in:
parent
4fcc9654dc
commit
07c55b4693
1 changed files with 20 additions and 20 deletions
|
@ -64,26 +64,26 @@ export const JoinGroupDialog = ({
|
||||||
async () => {
|
async () => {
|
||||||
const allGroups = await adminClient.groups.find();
|
const allGroups = await adminClient.groups.find();
|
||||||
|
|
||||||
if (groupId) {
|
if (groupId) {
|
||||||
const group = await adminClient.groups.findOne({ id: groupId });
|
const group = await adminClient.groups.findOne({ id: groupId });
|
||||||
return { group, groups: group.subGroups! };
|
return { group, groups: group.subGroups! };
|
||||||
} else if (id) {
|
} else if (id) {
|
||||||
const existingUserGroups = await adminClient.users.listGroups({
|
const existingUserGroups = await adminClient.users.listGroups({
|
||||||
id,
|
id,
|
||||||
});
|
});
|
||||||
setJoinedGroups(existingUserGroups);
|
setJoinedGroups(existingUserGroups);
|
||||||
return {
|
return {
|
||||||
groups: allGroups,
|
groups: allGroups,
|
||||||
};
|
};
|
||||||
} else
|
} else
|
||||||
return {
|
return {
|
||||||
groups: allGroups,
|
groups: allGroups,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
async ({ group: selectedGroup, groups }) => {
|
async ({ group: selectedGroup, groups }) => {
|
||||||
if (selectedGroup) {
|
if (selectedGroup) {
|
||||||
setNavigation([...navigation, selectedGroup]);
|
setNavigation([...navigation, selectedGroup]);
|
||||||
}
|
}
|
||||||
|
|
||||||
groups.forEach((group: Group) => {
|
groups.forEach((group: Group) => {
|
||||||
group.checked = !!selectedRows.find((r) => r.id === group.id);
|
group.checked = !!selectedRows.find((r) => r.id === group.id);
|
||||||
|
|
Loading…
Reference in a new issue