LP#1833080: have eg-bool recognize IDL bool string values user/gmcharlt/lp1833080_eg-bool
authorGalen Charlton <gmc@equinoxinitiative.org>
Mon, 17 Jun 2019 14:46:14 +0000 (10:46 -0400)
committerGalen Charlton <gmc@equinoxinitiative.org>
Mon, 17 Jun 2019 14:56:04 +0000 (10:56 -0400)
commitaeca8ca58f3c8e38ecf049785361b580e05f49de
tree624571c580cf4efa65a83b2e5a6fa556b5c20ad1
parent3afd5233a787d399685b91635edf99c4a30a4afe
LP#1833080: have eg-bool recognize IDL bool string values

This patch updates eg-bool so that it can format both
true Boolean and IDL bool string values (i.e., 't' or 'f'). Prior
to this patch, IDL bool values would always be rendered as 'Yes'.

This patch relaxes the type restriction on the value setter
and getter; unfortunately, there's no way to overload the
setter or making it accept (say) boolean|string.A

This patch also supplies some unit sets.

To test
-------
[1] View an Angular grid that has Boolean fields. The Copy
    Status server admin page is a good one.
[2] Note that the boolean values are all rendered as "Yes".
[3] Apply the patch and repeat step 1. This time, false
    values should be displayed as "No".
[4] Verify that 'npm run test' for the Angular app passes.

Sponsored-by: PaILS
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Open-ILS/src/eg2/src/app/share/util/bool.component.spec.ts [new file with mode: 0644]
Open-ILS/src/eg2/src/app/share/util/bool.component.ts