From eb55945fc8bded9c87ffb6cdd4b023c22f876439 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Mon, 1 Feb 2021 16:16:07 -0500 Subject: [PATCH] LP1929741 Ensure PO items always display when present Signed-off-by: Bill Erickson Signed-off-by: Galen Charlton Signed-off-by: Jane Sandberg --- Open-ILS/src/eg2/src/app/staff/acq/po/charges.component.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Open-ILS/src/eg2/src/app/staff/acq/po/charges.component.ts b/Open-ILS/src/eg2/src/app/staff/acq/po/charges.component.ts index 646b98c419..3087aed6a1 100644 --- a/Open-ILS/src/eg2/src/app/staff/acq/po/charges.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/acq/po/charges.component.ts @@ -21,6 +21,14 @@ export class PoChargesComponent implements OnInit { ) {} ngOnInit() { + if (this.po()) { + // Sometimes our PO is already available at render time. + if (this.po().po_items().length > 0) { + this.showBody = true; + } + } + + // Other times we have to wait for it. this.poService.poRetrieved.subscribe(() => { if (this.po().po_items().length > 0) { this.showBody = true; -- 2.11.0