<eg-confirm-dialog #delConfirm
i18n-dialogTitle i18n-dialogBody
dialogTitle="Confirm Delete"
- dialogBody="Delete Org Unit {{selected ? selected.label : ''}}?">
+ dialogBody="Delete Org Unit {{selected.label}}?">
</eg-confirm-dialog>
<div class="row">
<eg-tree [tree]="tree" (nodeClicked)="nodeClicked($event)"></eg-tree>
</div>
<div class="col-lg-8">
- <h3 i18n class="mb-3">Selected Org Unit</h3>
- <ng-container *ngIf="!selected">
- <div class="alert alert-info font-italic" i18n>
- Select an org unit type from the tree on the left.
- </div>
- </ng-container>
- <eg-fm-record-editor #editDialog idlClass="aou" [displayMode]="inline"
- readonlyFields="parent,ou_type,parent_ou"
- fieldOrder="parent_ou,ou_type,name,shortname,phone,email,opac_visible,fiscal_calendar"
- hiddenFields="id,billing_address,mailing_address,holds_address,ill_address">
- </eg-fm-record-editor>
+ <ngb-tabset #rootTabs [activeId]="main">
+ <ngb-tab title="Main Settings" i18n-title id="main">
+ <ng-template ngbTabContent>
+ <eg-fm-record-editor #editDialog idlClass="aou" [displayMode]="inline"
+ [mode]="selected ? 'update' : 'create'"
+ readonlyFields="parent,ou_type,parent_ou" [recordId]="selected ? selected.id : null"
+ fieldOrder="parent_ou,ou_type,name,shortname,phone,email,opac_visible,fiscal_calendar"
+ hiddenFields="id,billing_address,mailing_address,holds_address,ill_address">
+ </eg-fm-record-editor>
+ </ng-template>
+ </ngb-tab>
+ </ngb-tabset>
</div>
</div>
// select the root node.
this.ingestAouTree(this.org.tree());
this.selected = this.tree.rootNode;
- this.editDialog.setRecord(this.selected.callerData.orgUnit);
}
loadAouTree() {
nodeClicked($event: any) {
this.selected = $event;
- this.editDialog.setRecord(this.selected.callerData.orgUnit);
}
postUpdate(message: StringComponent) {
// otherwise the root org.
const orgId = org.parent_ou() ? org.parent_ou() : this.org.root().id();
this.selected = this.tree.findNode(orgId);
- this.editDialog.setRecord(this.selected.callerData.orgUnit);
-
this.postUpdate(this.editString);
}
);
const newOrg = this.idl.create('aou');
newOrg.parent(parentOrg.id());
- this.editDialog.setRecord(newOrg);
- this.editDialog.mode = 'create';
-
// TODO UNSUBSCRIBE
this.editDialog.onSave$.subscribe(result => { // aou object