1 <eg-staff-banner bannerText="Org Unit Configuration" i18n-bannerText>
4 <ng-template #editStrTmpl i18n>Update Succeeded</ng-template>
5 <eg-string #editString [template]="editStrTmpl"></eg-string>
7 <ng-template #errorStrTmpl i18n>Update Failed</ng-template>
8 <eg-string #errorString [template]="errorStrTmpl"></eg-string>
10 <eg-confirm-dialog #delConfirm
11 i18n-dialogTitle i18n-dialogBody
12 dialogTitle="Confirm Delete"
13 dialogBody="Delete Org Unit {{selected ? selected.label : ''}}?">
16 <ng-template #treeNodeLabelTmpl let-org="org">
17 <span *ngIf="org" i18n>{{org.name()}} -- {{org.shortname()}}</span>
19 <eg-string #treeNodeLabel key='admin.server.org_unit.treenode'
20 [template]="treeNodeLabelTmpl"></eg-string>
23 <div class="col-lg-4">
24 <h3 i18n>Org Units</h3>
25 <eg-tree [tree]="tree" (nodeClicked)="nodeClicked($event)"></eg-tree>
27 <div class="col-lg-8">
28 <div class="alert alert-info">
29 <div *ngIf="currentOrg()">
30 <span *ngIf="currentOrg().name()" i18n>
31 {{currentOrg().name()}} ({{currentOrg().shortname()}})
33 <span *ngIf="!currentOrg().name()" class="font-italic" i18n>
38 <ngb-tabset #rootTabs (tabChange)="tabChanged($event)" *ngIf="currentOrg()">
39 <ngb-tab title="Main Settings" i18n-title id="main">
40 <ng-template ngbTabContent>
42 <eg-fm-record-editor *ngIf="currentOrg()" #editDialog idlClass="aou"
43 [mode]="currentOrg().isnew() ? 'create': 'update'" [hideBanner]="true"
44 (recordSaved)="orgSaved($event)" displayMode="inline"
45 (recordDeleted)="orgDeleted()"
46 readonlyFields="parent,parent_ou" [preloadLinkedValues]="true"
47 [fieldOptions]="{ou_type: {customValues: orgTypeOptions()}}"
48 [record]="currentOrg().isnew() ? currentOrg() : null"
49 [recordId]="currentOrg().isnew() ? null : currentOrg().id()"
50 [showDelete]="!orgHasChildren()"
51 fieldOrder="parent_ou,ou_type,name,shortname,phone,email,opac_visible,fiscal_calendar"
52 hiddenFields="id,billing_address,mailing_address,holds_address,ill_address">
53 <eg-fm-record-editor-action label="Add Child" i18n-label
54 [disabled]="orgChildTypes().length === 0 || currentOrg().isnew()"
55 buttonCss="btn-outline-info"
56 (actionClick)="addChild()"></eg-fm-record-editor-action>
57 </eg-fm-record-editor>
61 <ngb-tab title="Hours of Operation" i18n-title id="hours"
62 [disabled]="currentOrg().isnew()">
63 <ng-template ngbTabContent>
64 <div class="mt-2 common-form striped-even">
65 <div class="row font-weight-bold mb-2">
66 <div class="col-lg-3 offset-lg-2" i18n>Open Time</div>
67 <div class="col-lg-3" i18n>Close Time</div>
69 <div class="row mb-2" *ngFor="let dow of [0,1,2,3,4,5,6]">
70 <div class="col-lg-2" [ngSwitch]="dow">
71 <span *ngSwitchCase="0" i18n>Monday</span>
72 <span *ngSwitchCase="1" i18n>Tuesday</span>
73 <span *ngSwitchCase="2" i18n>Wednesday</span>
74 <span *ngSwitchCase="3" i18n>Thursday</span>
75 <span *ngSwitchCase="4" i18n>Friday</span>
76 <span *ngSwitchCase="5" i18n>Saturday</span>
77 <span *ngSwitchCase="6" i18n>Sunday</span>
79 <div class="col-lg-3">
80 <input class="form-control" type='time' step="60"
81 [ngModel]="hours(dow, 'open')" min="00:00:00" max="23:59:59"
82 (ngModelChange)="hours(dow, 'open', $event)"/>
84 <div class="col-lg-3">
85 <input class="form-control" type='time' step="60"
86 [ngModel]="hours(dow, 'close')" min="00:00:00" max="23:59:59"
87 (ngModelChange)="hours(dow, 'close', $event)"/>
89 <div class="col-lg-2">
90 <button class="btn btn-outline-dark" (click)="closedOn(dow)"
91 [disabled]="isClosed(dow)" i18n>Closed</button>
94 <div class="row d-flex justify-content-end">
95 <div class="alert alert-warning mr-2 p-1"
96 *ngIf="currentOrg().hours_of_operation().isnew()">
97 Hours of Operation Have Not Yet Been Saved.
100 <button class="btn btn-warning" (click)="deleteHours()" i18n>
101 Clear Hours of Operation
105 <button class="btn btn-info" (click)="saveHours()" i18n>
109 <div class="col-lg-2"><!-- alignment --></div>
114 <ngb-tab title="Addresses" i18n-title id="addresses"
115 [disabled]="currentOrg().isnew()">
116 <ng-template ngbTabContent>
118 <eg-admin-org-address [orgId]="currentOrg().id()" (addrChange)="addressChanged($event)">
119 </eg-admin-org-address>