From 35c5c009967147b529480d17c2a5311c4088080f Mon Sep 17 00:00:00 2001 From: Jane Sandberg Date: Sat, 30 Mar 2019 15:07:29 -0700 Subject: [PATCH] LP1816475: Don't show pager on the create reservation grid Signed-off-by: Jane Sandberg --- .../datetime-select/datetime-select.component.html | 2 +- .../datetime-select/datetime-select.component.ts | 8 +-- .../app/share/fm-editor/fm-editor.component.html | 2 +- .../src/app/share/grid/grid-toolbar.component.html | 68 +++++++++++----------- .../src/app/share/grid/grid-toolbar.component.ts | 1 + .../src/eg2/src/app/share/grid/grid.component.html | 1 + .../src/eg2/src/app/share/grid/grid.component.ts | 6 ++ Open-ILS/src/eg2/src/app/share/grid/grid.ts | 1 - .../booking/create-reservation.component.html | 1 + .../staff/booking/create-reservation.component.ts | 2 +- 10 files changed, 49 insertions(+), 43 deletions(-) diff --git a/Open-ILS/src/eg2/src/app/share/datetime-select/datetime-select.component.html b/Open-ILS/src/eg2/src/app/share/datetime-select/datetime-select.component.html index 891079a4e7..90a777cd55 100644 --- a/Open-ILS/src/eg2/src/app/share/datetime-select/datetime-select.component.html +++ b/Open-ILS/src/eg2/src/app/share/datetime-select/datetime-select.component.html @@ -45,7 +45,7 @@ (ngModelChange)="modelChanged()" [spinners]="true" [hourStep]="1" - [minuteStep]="minuteStep || 15" > + [minuteStep]="minuteStep || 30" > {{ timezone || 'America/Los_Angeles'}} diff --git a/Open-ILS/src/eg2/src/app/share/datetime-select/datetime-select.component.ts b/Open-ILS/src/eg2/src/app/share/datetime-select/datetime-select.component.ts index a12a84fc99..825434c9f4 100644 --- a/Open-ILS/src/eg2/src/app/share/datetime-select/datetime-select.component.ts +++ b/Open-ILS/src/eg2/src/app/share/datetime-select/datetime-select.component.ts @@ -52,7 +52,7 @@ export class DateTimeSelectComponent implements OnInit { const remainder = this.minuteStep - start.minute() % this.minuteStep, final = Moment(start, this.timezone).add(remainder, 'minutes'); - // Seed time model with current, rounding up to nearest granularity minutes (does roll hour over if needed) + // Seed time model with current, rounding up to nearest minuteStep (does roll hour over if needed) this.timeModel = { hour: final.hour(), minute: final.minute(), second: 0 }; } @@ -72,7 +72,7 @@ export class DateTimeSelectComponent implements OnInit { } if (newDate && !isNaN(newDate)) { - // Set component view value + // Set the input field to the current value this.stringVersion = this.format.transform({value: newDate, datatype: 'timestamp', datePlusTime: true}); // Update form passed in view value this.onChangeAsMoment.emit(newDate); @@ -80,9 +80,5 @@ export class DateTimeSelectComponent implements OnInit { } } - isDisabled(date: NgbDateStruct, current: { month: number }) { - return date.month !== current.month; - } - } diff --git a/Open-ILS/src/eg2/src/app/share/fm-editor/fm-editor.component.html b/Open-ILS/src/eg2/src/app/share/fm-editor/fm-editor.component.html index 583bef0eab..a1c728e993 100644 --- a/Open-ILS/src/eg2/src/app/share/fm-editor/fm-editor.component.html +++ b/Open-ILS/src/eg2/src/app/share/fm-editor/fm-editor.component.html @@ -50,7 +50,7 @@ [showTZ]="timezone" [timezone]="timezone" domId="{{idPrefix}}-{{field.name}}" - (onChangeAsMoment)="record[field.name]($event)" + (onChangeAsMoment)="field.validate(field.name, $event, record)" [validatorError]="field.validatorError" [readOnly]="field.readOnly" initialIso="{{record[field.name]()}}"> diff --git a/Open-ILS/src/eg2/src/app/share/grid/grid-toolbar.component.html b/Open-ILS/src/eg2/src/app/share/grid/grid-toolbar.component.html index 0c6ddca2b2..bb80e0c336 100644 --- a/Open-ILS/src/eg2/src/app/share/grid/grid-toolbar.component.html +++ b/Open-ILS/src/eg2/src/app/share/grid/grid-toolbar.component.html @@ -43,46 +43,48 @@ - - - + - - -
- - +