Change toggle all, fix multiple group inheritance, fix select dark mode display

This commit is contained in:
Michael Shamoon
2022-12-05 15:51:53 -08:00
parent aa47d1eb1f
commit a068818514
3 changed files with 23 additions and 4 deletions

View File

@@ -66,9 +66,12 @@ export class UserEditDialogComponent
}
get inheritedPermissions(): string[] {
const groupsVal = this.objectForm.get('groups').value
return groupsVal !== null
? this.groups.find((g) => g.id == groupsVal)?.permissions
: []
const groupsVal: Array<number> = this.objectForm.get('groups').value
if (!groupsVal) return []
else
return groupsVal.flatMap(
(id) => this.groups.find((g) => g.id == id)?.permissions
)
}
}

View File

@@ -145,6 +145,9 @@ export class PermissionsSelectComponent
})
this.typesWithAllActions.add(type)
} else {
Object.keys(PermissionAction).forEach((action) => {
typeGroup.get(action).patchValue(false)
})
this.typesWithAllActions.delete(type)
}
}