<eg-string #createMapString i18n-text text="Permission Group Mapping Added">
</eg-string>
<eg-string #successMapString i18n-text text="Permission Group Mapping Update Succeeded">
- </eg-string>
+</eg-string>
<eg-string #errorMapString i18n-text text="Permission Group Mapping Update Failed">
</eg-string>
<ng-container *ngIf="loading">
<div class="row">
<div class="col-lg-6">
- <eg-progress-inline></eg-progress-inline>
+ <eg-progress-inline #loadProgress></eg-progress-inline>
</div>
</div>
</ng-container>
</div>
<div class="row" *ngFor="let map of groupPermMaps()"
- [ngClass]="{'bg-danger': map.isdeleted()}">
+ [ngClass]="{'bg-warning': map.isdeleted()}">
<div class="col-lg-5">
<span title="{{map.perm().description()}}">{{map.perm().code()}}</span>
</div>
<ng-container *ngIf="permIsInherited(map); else nativeMap">
<div class="col-lg-4">
- <a href="javascript:;" (click)="selectGroup(map.grp().id())">
+ <button class="btn btn-link m-0 p-0"
+ (click)="selectGroup(map.grp().id())">
{{map.grp().name()}}
- </a>
+ </button>
</div>
<div class="col-lg-1 text-center">{{map.depth()}}</div>
- <!-- TODO migrate to <eg-bool/> once merged-->
<div class="col-lg-1 d-flex flex-column justify-content-center">
- <div class="d-flex justify-content-center p-3 rounded border border-secondary">
+ <div class="d-flex justify-content-center p-1 rounded">
<eg-bool [value]="map.grantable() == 't'"></eg-bool>
</div>
</div>
- <div class="col-lg-1"> </div>
+ <div class="col-lg-1 font-italic" i18n>Inherited</div>
</ng-container>
<ng-template #nativeMap>
<div class="col-lg-4">{{map.grp().name()}}</div>
</select>
</div>
<div class="col-lg-1 d-flex flex-column justify-content-center">
- <div class="d-flex justify-content-center p-3 rounded border border-info">
+ <div class="d-flex justify-content-center p-1 rounded border border-info">
<input type="checkbox" class="align-middle"
i18n-title title="Grantable?"
[ngModel]="map.grantable() == 't'"
</div>
</div>
<div class="col-lg-1 d-flex flex-column justify-content-center">
- <div class="d-flex justify-content-center p-3 rounded border border-danger">
+ <div class="d-flex justify-content-center p-1 rounded border border-danger">
<input type="checkbox" class="align-middle"
i18n-title title="Delete Mapping"
[ngModel]="map.isdeleted()"
import {FmRecordEditorComponent, FmFieldOptions} from '@eg/share/fm-editor/fm-editor.component';
import {ComboboxEntry} from '@eg/share/combobox/combobox.component';
import {PermGroupMapDialogComponent} from './perm-group-map-dialog.component';
+import {ProgressInlineComponent} from '@eg/share/dialog/progress-inline.component';
/** Manage permission groups and group permissions */
@ViewChild('createMapString') createMapString: StringComponent;
@ViewChild('errorMapString') errorMapString: StringComponent;
@ViewChild('addMappingDialog') addMappingDialog: PermGroupMapDialogComponent;
+ @ViewChild('loadProgress') loadProgress: ProgressInlineComponent;
constructor(
private idl: IdlService,
async ngOnInit() {
this.loading = true;
await this.loadPgtTree();
+ this.loadProgress.increment();
await this.loadPermissions();
+ this.loadProgress.increment();
await this.loadPermMaps();
+ this.loadProgress.increment();
this.setOrgDepths();
+ this.loadProgress.increment();
this.loading = false;
return Promise.resolve();
}
// the database ID, because the application_perm field on
// "pgt" is text instead of a link. So the value it expects
// is the code, not the ID.
- return this.pcrud.retrieveAll('ppl', {order_by: {ppl: ['name']}})
+ return this.pcrud.retrieveAll('ppl', {order_by: {ppl: 'code'}})
.pipe(map(perm => {
+ this.loadProgress.increment();
this.permissions.push(perm);
this.permEntries.push({id: perm.code(), label: perm.code()});
this.permissions.forEach(p => this.permIdMap[+p.id()] = p);
this.permMaps = [];
return this.pcrud.retrieveAll('pgpm', {},
{fleshSelectors: true, authoritative: true})
- .pipe(map((m => this.permMaps.push(m)))).toPromise();
+ .pipe(map(m => {
+ this.loadProgress.increment();
+ this.permMaps.push(m);
+ })).toPromise();
}
fmEditorOptions(): {[fieldName: string]: FmFieldOptions} {