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, 13 Jul 2021 14:43:21 +0000 (10:43 -0400)
commit560560fe2d85dcadab8092b00a1e5ed20098535b
tree0c57c84242118fe884838639d5d54585494922fe
parentb312b2c08bc91486d9797b968b9c4928c45ac36f
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