Correction de permissions-field qui tentait d'accéder à des permissions qui n'existent plus.

This commit is contained in:
FyloZ 2021-04-05 21:38:32 -04:00
parent 688a6c8571
commit 84c4cb9179
1 changed files with 5 additions and 3 deletions

View File

@ -34,9 +34,11 @@ export class PermissionsFieldComponent implements OnInit {
if (this.enabledPermissions) {
this.enabledPermissions.forEach(p => {
const control = this.findPermissionControl(p)
control.control.setValue(true)
this.togglePermission(control, true)
if (EmployeePermission[p]) {
const control = this.findPermissionControl(p)
control.control.setValue(true)
this.togglePermission(control, true)
}
})
}