LP1816475: Booking module refresh
[working/Evergreen.git] / Open-ILS / src / eg2 / src / app / staff / booking / reservations-grid.component.html
1 <eg-grid #grid [dataSource]="gridSource"
2   (onRowActivate)="handleRowActivate($event)"
3   [sortable]="true"
4   [useLocalSort]="true"
5   persistKey="booking.{{persistSuffix}}" >
6   <eg-grid-toolbar-action label="Edit Selected" i18n-label (onClick)="editSelected($event)" [disableOnRows]="editNotAppropriate"></eg-grid-toolbar-action>
7   <eg-grid-toolbar-action label="Cancel Selected" i18n-label (onClick)="cancelSelected($event)" [disableOnRows]="cancelNotAppropriate"></eg-grid-toolbar-action>
8   <eg-grid-toolbar-action label="Pick Up Selected" i18n-label (onClick)="pickupSelected($event)" [disableOnRows]="pickupNotAppropriate"></eg-grid-toolbar-action>
9   <eg-grid-toolbar-action label="Return Selected" i18n-label (onClick)="returnSelected($event)" [disableOnRows]="returnNotAppropriate"></eg-grid-toolbar-action>
10   <eg-grid-toolbar-action label="View Patron Record" i18n-label (onClick)="viewPatronRecord($event)" [disableOnRows]="notOnePatronSelected"></eg-grid-toolbar-action>
11   <eg-grid-toolbar-action label="View Reservations for This Patron" i18n-label (onClick)="viewByPatron($event)" [disableOnRows]="notOnePatronSelected"></eg-grid-toolbar-action>
12   <eg-grid-toolbar-action label="View Item Status" i18n-label (onClick)="viewItemStatus($event)" [disableOnRows]="notOneCatalogedItemSelected"></eg-grid-toolbar-action>
13   <eg-grid-toolbar-action label="View Reservations for This Resource" i18n-label (onClick)="viewByResource($event)" [disableOnRows]="notOneResourceSelected"></eg-grid-toolbar-action>
14   <eg-grid-toolbar-button *ngIf="!status" label="Create New Reservation" i18n-label (onClick)="redirectToCreate($event)"></eg-grid-toolbar-button>
15
16   <eg-grid-column name="id" [hidden]="true" [index]="true" i18n-label label="ID" path="id"></eg-grid-column>
17   <eg-grid-column label="Patron username" [hidden]="true" i18n-label path="usr.usrname"></eg-grid-column>
18   <eg-grid-column label="Patron barcode" i18n-label path="usr.card.barcode"></eg-grid-column>
19   <eg-grid-column label="Patron first name" i18n-label  path="usr.first_given_name"></eg-grid-column>
20   <eg-grid-column label="Patron middle name" i18n-label [hidden]="true" path="usr.second_given_name"></eg-grid-column>
21   <eg-grid-column label="Patron family name" i18n-label path="usr.family_name"></eg-grid-column>
22   <eg-grid-column name="start_time" label="Start Time" [datePlusTime]="true" i18n-label path="start_time" datatype="timestamp"></eg-grid-column>
23   <eg-grid-column name="end_time" label="End Time" [datePlusTime]="true" i18n-label path="end_time" datatype="timestamp"></eg-grid-column>
24   <eg-grid-column name="request_time" label="Request Time" [datePlusTime]="true" i18n-label path="request_time" datatype="timestamp"></eg-grid-column>
25   <eg-grid-column name="capture_time" label="Capture Time" [datePlusTime]="true" i18n-label path="capture_time" datatype="timestamp"></eg-grid-column>
26   <eg-grid-column name="pickup_time" label="Pickup Time" [datePlusTime]="true" i18n-label path="pickup_time" datatype="timestamp"></eg-grid-column>
27   <eg-grid-column label="Email notify" i18n-label [hidden]="true" path="email_notify" datatype="bool"></eg-grid-column>
28   <eg-grid-column i18n-label [hidden]="true" path="unrecovered" datatype="bool"></eg-grid-column>
29   <eg-grid-column label="Billing total" i18n-label path="billing_total" datatype="money"></eg-grid-column>
30   <eg-grid-column label="Payment total" i18n-label path="payment_total" datatype="money"></eg-grid-column>
31   <eg-grid-column label="Booking interval" i18n-label [hidden]="true" path="booking_interval" [hidden]="true"></eg-grid-column>
32   <eg-grid-column label="Fine interval" i18n-label [hidden]="true" path="fine_interval" [hidden]="true"></eg-grid-column>
33   <eg-grid-column label="Fine amount" i18n-label [hidden]="true" path="fine_amount" datatype="money"></eg-grid-column>
34   <eg-grid-column label="Maximum fine" i18n-label [hidden]="true" path="max_fine" datatype="money"></eg-grid-column>
35   <eg-grid-column i18n-label label="Resource Barcode" path="current_resource.barcode"></eg-grid-column>
36   <eg-grid-column i18n-label label="Note" path="note"></eg-grid-column>
37   <eg-grid-column i18n-label label="Resource Type" path="target_resource_type.name"></eg-grid-column>
38   <eg-grid-column label="Reservation length" i18n-label  path="length"></eg-grid-column>
39   <eg-grid-column label="Request library" i18n-label  path="request_lib.name"></eg-grid-column>
40   <eg-grid-column label="Pickup library" i18n-label path="pickup_lib.name"></eg-grid-column>
41   <eg-grid-column label="Pickup library timezone" i18n-label path="timezone"></eg-grid-column>
42
43 </eg-grid>
44
45 <eg-fm-record-editor #editDialog
46   idlClass="bresv"
47   datetimeFields="start_time,end_time"
48   [fieldOptions]="{end_time:{customTemplate:{template:endTimeTemplate}}}"
49   hiddenFields="xact_start,xact_finish,cancel_time,booking_interval"
50   [readonlyFields]="listReadOnlyFields()">
51 </eg-fm-record-editor>
52 <eg-cancel-reservation-dialog #confirmCancelReservationDialog
53   (onSuccessfulCancel)="grid.reload()">
54 </eg-cancel-reservation-dialog>
55 <eg-no-timezone-set-dialog #noTimezoneSetDialog>
56 </eg-no-timezone-set-dialog>
57
58 <ng-template #endTimeTemplate let-field="field" let-record="record">
59   <eg-datetime-select
60     domId="endTime"
61     ngModel
62     [showTZ]="editDialog.timezone"
63     [timezone]="editDialog.timezone"
64     [egNotBeforeMoment]="momentizeIsoString(record['start_time'](), editDialog.timezone)"
65     [readOnly]="field.readOnly"
66     (onChangeAsIso)="record[field.name]($event)"
67     initialIso="{{record[field.name]()}}">
68   </eg-datetime-select>
69 </ng-template>