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 bb8a0d26e2
commit b1a4eec7be
3 changed files with 23 additions and 4 deletions

View File

@ -66,9 +66,12 @@ export class UserEditDialogComponent
} }
get inheritedPermissions(): string[] { get inheritedPermissions(): string[] {
const groupsVal = this.objectForm.get('groups').value const groupsVal: Array<number> = this.objectForm.get('groups').value
return groupsVal !== null
? this.groups.find((g) => g.id == groupsVal)?.permissions 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) this.typesWithAllActions.add(type)
} else { } else {
Object.keys(PermissionAction).forEach((action) => {
typeGroup.get(action).patchValue(false)
})
this.typesWithAllActions.delete(type) this.typesWithAllActions.delete(type)
} }
} }

View File

@ -157,6 +157,19 @@ $form-check-radio-checked-bg-image-dark: url("data:image/svg+xml,<svg xmlns='htt
background-color: var(--bs-light); background-color: var(--bs-light);
} }
.ng-select-multiple .ng-select-container .ng-value-container .ng-value {
background-color: var(--pngx-bg-alt);
color: var(--bs-body-color);
.ng-value-icon.left {
border-color: var(--pngx-bg-alt);
&:hover {
background-color: var(--pngx-primary-lighten-30);
}
}
}
table { table {
.des, .des,
.asc { .asc {