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>
22 <div class="row org-unit-types-row">
23 <div class="col-lg-4 org-unit-types-col-aside">
24 <h3 i18n>Org Units</h3>
25 <div class="border rounded p-1" >
26 <eg-tree [tree]="tree" (nodeClicked)="nodeClicked($event)"></eg-tree>
29 <div class="col-lg-8 org-unit-types-col-main">
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="fst-italic" i18n>
41 <div class="ngbNav-wrapper" *ngIf="currentOrg()">
42 <ul ngbNav #rootTabs="ngbNav" [(activeId)]="orgUnitTab" (navChange)="navChanged($event)" [disabled]="currentOrg().isnew()" [keyboard]="true" [roles]="false" role="tablist" class="nav-tabs">
43 <li role="presentation" [ngbNavItem]="'main'">
44 <a i18n ngbNavLink role="tab">Main Settings</a>
45 <ng-template ngbNavContent>
47 <eg-fm-record-editor *ngIf="currentOrg()" #editDialog idlClass="aou"
48 [mode]="currentOrg().isnew() ? 'create': 'update'" [hideBanner]="true"
49 (recordSaved)="orgSaved($event)" displayMode="inline"
50 (recordDeleted)="orgDeleted()"
51 readonlyFields="parent,parent_ou,id" [preloadLinkedValues]="true"
52 [fieldOptions]="{ou_type: {customValues: orgTypeOptions()}}"
53 [record]="currentOrg().isnew() ? currentOrg() : null"
54 [recordId]="currentOrg().isnew() ? null : currentOrg().id()"
55 [showDelete]="!orgHasChildren()"
56 fieldOrder="parent_ou,ou_type,name,shortname,id,phone,email,opac_visible,fiscal_calendar"
57 hiddenFields="billing_address,mailing_address,holds_address,ill_address">
58 <eg-fm-record-editor-action label="Add Child" i18n-label
59 [disabled]="orgChildTypes().length === 0 || currentOrg().isnew()"
60 buttonCss="btn-outline-info"
61 (actionClick)="addChild()"></eg-fm-record-editor-action>
62 </eg-fm-record-editor>
66 <li role="presentation" [ngbNavItem]="'hours'">
67 <a i18n ngbNavLink role="tab">Hours of Operation</a>
68 <ng-template ngbNavContent>
69 <div class="mt-2 common-form striped-even">
70 <div class="row fw-bold mb-2">
71 <div class="col-lg-3 offset-lg-2" i18n>Open Time</div>
72 <div class="col-lg-3" i18n>Close Time</div>
74 <div class="row mb-2" *ngFor="let dow of [0,1,2,3,4,5,6]">
75 <div class="col-lg-2" [ngSwitch]="dow">
76 <span *ngSwitchCase="0" i18n>Monday</span>
77 <span *ngSwitchCase="1" i18n>Tuesday</span>
78 <span *ngSwitchCase="2" i18n>Wednesday</span>
79 <span *ngSwitchCase="3" i18n>Thursday</span>
80 <span *ngSwitchCase="4" i18n>Friday</span>
81 <span *ngSwitchCase="5" i18n>Saturday</span>
82 <span *ngSwitchCase="6" i18n>Sunday</span>
84 <div class="col-lg-3">
85 <input class="form-control" type='time' step="60"
86 [ngModel]="hours(dow, 'open')" min="00:00:00" max="23:59:59"
87 (ngModelChange)="hours(dow, 'open', $event)"/>
89 <div class="col-lg-3">
90 <input class="form-control" type='time' step="60"
91 [ngModel]="hours(dow, 'close')" min="00:00:00" max="23:59:59"
92 (ngModelChange)="hours(dow, 'close', $event)"/>
94 <div class="col-lg-2">
95 <button type="button" class="btn btn-outline-dark" (click)="closedOn(dow)"
96 [disabled]="isClosed(dow)" i18n>Closed</button>
98 <div class="col-lg-6 offset-lg-2">
99 <div class="input-group mt-1">
100 <label class="form-label input-group-text" for="org-unit-edit-note-{{dow}}" i18n>Note (optional)</label>
101 <input class="form-control" type='text'
102 id="org-unit-edit-note-{{dow}}"
103 [ngModel]="getNote(dow)"
104 (ngModelChange)="setNote(dow, $event)"
105 placeholder="e.g. 'Closed for lunch from Noon to 1PM'" i18n-placeholder />
109 <div class="row d-flex justify-content-end">
110 <div class="alert alert-warning me-2 p-1"
111 *ngIf="currentOrg().hours_of_operation().isnew()">
112 Hours of Operation Have Not Yet Been Saved.
114 <div class="alert alert-warning me-2 p-1"
115 *ngIf="allClosed() && hasClosedDatePerms">
117 These hours mean {{currentOrg().name()}} is never open! Some functions may not work as expected. Did you mean to
119 <a href="/eg/staff/admin/local/actor/closed_dates" i18n>
124 <button type="button" class="btn btn-destroy" (click)="deleteHours()" i18n>
125 Clear Hours of Operation
129 <button type="button" class="btn btn-info" (click)="saveHours()" i18n>
133 <div class="col-lg-2"><!-- alignment --></div>
138 <li role="presentation" [ngbNavItem]="'addresses'" [disabled]="currentOrg().isnew()">
139 <a i18n ngbNavLink role="tab">Addresses</a>
140 <ng-template ngbNavContent>
142 <eg-admin-org-address [orgId]="currentOrg().id()" (addrChange)="addressChanged($event)">
143 </eg-admin-org-address>
149 <div [ngbNavOutlet]="rootTabs" class="mt-2"></div>