Browse Source

Merge pull request #21772 from abpframework/auto-merge/rel-9-0/3339

Merge branch dev with rel-9.0
pull/21773/head
maliming 1 year ago
committed by GitHub
parent
commit
255b0fdbd8
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 32
      npm/ng-packs/packages/permission-management/src/lib/components/permission-management.component.ts

32
npm/ng-packs/packages/permission-management/src/lib/components/permission-management.component.ts

@ -372,30 +372,14 @@ export class PermissionManagementComponent
onClickSelectAll() {
if (this.filter()) {
this.permissionGroups().forEach(group => {
group.permissions.forEach(permission => {
if (
permission.isGranted &&
this.isGrantedByOtherProviderName(permission.grantedProviders)
)
return;
const index = this.permissions.findIndex(per => per.name === permission.name);
this.permissions = [
...this.permissions.slice(0, index),
{ ...this.permissions[index], isGranted: !this.selectAllTab },
...this.permissions.slice(index + 1),
];
});
});
} else {
this.permissions = this.permissions.map(permission => ({
...permission,
isGranted:
this.isGrantedByOtherProviderName(permission.grantedProviders) || !this.selectAllTab,
}));
}
this.filter.set('');
}
this.permissions = this.permissions.map(permission => ({
...permission,
isGranted:
this.isGrantedByOtherProviderName(permission.grantedProviders) || !this.selectAllTab,
}));
if (!this.disableSelectAllTab) {
this.selectThisTab = !this.selectAllTab;

Loading…
Cancel
Save