LP1934164 egDueDate and egOrgDateInContext Angular pipes
authorBill Erickson <berickxx@gmail.com>
Tue, 29 Jun 2021 17:50:56 +0000 (13:50 -0400)
committerBill Erickson <berickxx@gmail.com>
Tue, 14 Jun 2022 14:09:20 +0000 (10:09 -0400)
commit8ca04e73f8490c2dc0e4ada464eea55f96475262
tree06aac45cb18b68deafcef5f88a63847050469f6d
parent2aaf9bfff7fa7144a1be39d8eb9bec24625fd667
LP1934164 egDueDate and egOrgDateInContext Angular pipes

These support displaying dates in the timezone of a specified org unit.

Example:

{{circ.xact_start() | egOrgDateInContext:circ.circ_lib():circ.duration()}}

The format service also gets a dateOnlyIntervalField parameter to
display dates as dates or dates + time depending on whether the provided
duration is day-granular.

Also adds a handy pipe (egDueDate) which takes a circulation as its
value and collects the correct parameters to display the due date in the
correct time zone and with the correct dateOnlyIntervalField value.

Example:

{{circ | egDueDate}}

Includes Sandbox examples.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/src/eg2/src/app/core/core.module.ts
Open-ILS/src/eg2/src/app/core/format.service.ts
Open-ILS/src/eg2/src/app/share/grid/grid-column.component.ts
Open-ILS/src/eg2/src/app/share/grid/grid.ts
Open-ILS/src/eg2/src/app/staff/sandbox/sandbox.component.html
Open-ILS/src/eg2/src/app/staff/sandbox/sandbox.component.ts