LP#1884787: update Angular staff client to work with momement-timezone >= 0.5.29
authorGalen Charlton <gmc@equinoxinitiative.org>
Tue, 23 Jun 2020 18:39:45 +0000 (14:39 -0400)
committerGalen Charlton <gmc@equinoxinitiative.org>
Thu, 25 Jun 2020 14:01:27 +0000 (10:01 -0400)
commit0e7c3136f981c6f3d00a9f27132a7a1f27ad528e
tree1d810ef1f86b53a55aac2507c35e1e7f6ccf19bd
parente0483db60353a9683e175e10d1a4144997cf9aa0
LP#1884787: update Angular staff client to work with momement-timezone >= 0.5.29

Now that moment-timezone ships with an index.d.ts (as of 0.5.29), this
patch updates how moment-timezone is imported and used since we
now have to care more about type-checking.

Among other things, this updates the ScheduleRow interface to account
for the fact that with the stricter type checking coming from the recent
moment-timezone change, ScheduleRow.time as a moment.Moment object
cannot be in the same interface as a string index type.

To test
-------
[1] Make sure that results of  'npm run test' are clean.
[2] Create a reservation or two in the booking interface and
    verify that scheduled reservations show up on the grid
    in the create reservations page.
[3] Verify that the icons indicating whether resources are
    available or not at a given time are correct on the
    create reservations grid.

Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/src/eg2/src/app/core/format.service.ts
Open-ILS/src/eg2/src/app/share/datetime-select/datetime-select.component.ts
Open-ILS/src/eg2/src/app/share/validators/not_before_moment_validator.directive.ts
Open-ILS/src/eg2/src/app/staff/booking/create-reservation-dialog.component.ts
Open-ILS/src/eg2/src/app/staff/booking/create-reservation.component.html
Open-ILS/src/eg2/src/app/staff/booking/create-reservation.component.ts
Open-ILS/src/eg2/src/app/staff/booking/reservations-grid.component.ts
Open-ILS/src/eg2/src/app/staff/booking/schedule-grid.service.ts
Open-ILS/src/eg2/src/app/staff/booking/schedule-grid.spec.ts