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 <div class="border rounded p-1" style="height:{{winHeight}}px;overflow-y:auto">
26 <eg-tree [tree]="tree" (nodeClicked)="nodeClicked($event)"></eg-tree>
29 <div class="col-lg-8">
30 <div class="alert alert-info">
31 <div *ngIf="currentOrg()">
32 <span *ngIf="currentOrg().name()" i18n>
33 {{currentOrg().name()}} ({{currentOrg().shortname()}})
35 <span *ngIf="!currentOrg().name()" class="font-italic" i18n>
40 <ngb-tabset #rootTabs (tabChange)="tabChanged($event)" *ngIf="currentOrg()">
41 <ngb-tab title="Main Settings" i18n-title id="main">
42 <ng-template ngbTabContent>
44 <eg-fm-record-editor *ngIf="currentOrg()" #editDialog idlClass="aou"
45 [mode]="currentOrg().isnew() ? 'create': 'update'" [hideBanner]="true"
46 (recordSaved)="orgSaved($event)" displayMode="inline"
47 (recordDeleted)="orgDeleted()"
48 readonlyFields="parent,parent_ou" [preloadLinkedValues]="true"
49 [fieldOptions]="{ou_type: {customValues: orgTypeOptions()}}"
50 [record]="currentOrg().isnew() ? currentOrg() : null"
51 [recordId]="currentOrg().isnew() ? null : currentOrg().id()"
52 [showDelete]="!orgHasChildren()"
53 fieldOrder="parent_ou,ou_type,name,shortname,phone,email,opac_visible,fiscal_calendar"
54 hiddenFields="id,billing_address,mailing_address,holds_address,ill_address">
55 <eg-fm-record-editor-action label="Add Child" i18n-label
56 [disabled]="orgChildTypes().length === 0 || currentOrg().isnew()"
57 buttonCss="btn-outline-info"
58 (actionClick)="addChild()"></eg-fm-record-editor-action>
59 </eg-fm-record-editor>
63 <ngb-tab title="Hours of Operation" i18n-title id="hours"
64 [disabled]="currentOrg().isnew()">
65 <ng-template ngbTabContent>
66 <div class="mt-2 common-form striped-even">
67 <div class="row font-weight-bold mb-2">
68 <div class="col-lg-3 offset-lg-2" i18n>Open Time</div>
69 <div class="col-lg-3" i18n>Close Time</div>
71 <div class="row mb-2" *ngFor="let dow of [0,1,2,3,4,5,6]">
72 <div class="col-lg-2" [ngSwitch]="dow">
73 <span *ngSwitchCase="0" i18n>Monday</span>
74 <span *ngSwitchCase="1" i18n>Tuesday</span>
75 <span *ngSwitchCase="2" i18n>Wednesday</span>
76 <span *ngSwitchCase="3" i18n>Thursday</span>
77 <span *ngSwitchCase="4" i18n>Friday</span>
78 <span *ngSwitchCase="5" i18n>Saturday</span>
79 <span *ngSwitchCase="6" i18n>Sunday</span>
81 <div class="col-lg-3">
82 <input class="form-control" type='time' step="60"
83 [ngModel]="hours(dow, 'open')" min="00:00:00" max="23:59:59"
84 (ngModelChange)="hours(dow, 'open', $event)"/>
86 <div class="col-lg-3">
87 <input class="form-control" type='time' step="60"
88 [ngModel]="hours(dow, 'close')" min="00:00:00" max="23:59:59"
89 (ngModelChange)="hours(dow, 'close', $event)"/>
91 <div class="col-lg-2">
92 <button class="btn btn-outline-dark" (click)="closedOn(dow)"
93 [disabled]="isClosed(dow)" i18n>Closed</button>
96 <div class="row d-flex justify-content-end">
97 <div class="alert alert-warning mr-2 p-1"
98 *ngIf="currentOrg().hours_of_operation().isnew()">
99 Hours of Operation Have Not Yet Been Saved.
102 <button class="btn btn-warning" (click)="deleteHours()" i18n>
103 Clear Hours of Operation
107 <button class="btn btn-info" (click)="saveHours()" i18n>
111 <div class="col-lg-2"><!-- alignment --></div>
116 <ngb-tab title="Addresses" i18n-title id="addresses"
117 [disabled]="currentOrg().isnew()">
118 <ng-template ngbTabContent>
120 <eg-admin-org-address [orgId]="currentOrg().id()" (addrChange)="addressChanged($event)">
121 </eg-admin-org-address>