From fa303f921f4f8f48a09ae02e206f9f1d168161bc Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Mon, 10 May 2021 12:44:42 -0400 Subject: [PATCH] LP1904036 Sanity check lack of barcode (card) Signed-off-by: Bill Erickson Signed-off-by: Jane Sandberg Signed-off-by: Galen Charlton --- Open-ILS/src/eg2/src/app/staff/circ/patron/edit.component.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/eg2/src/app/staff/circ/patron/edit.component.ts b/Open-ILS/src/eg2/src/app/staff/circ/patron/edit.component.ts index 1ebfd9d7af..e0ab319578 100644 --- a/Open-ILS/src/eg2/src/app/staff/circ/patron/edit.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/circ/patron/edit.component.ts @@ -735,6 +735,10 @@ export class EditComponent implements OnInit, AfterViewInit { if (this.patron.waiver_entries().length === 0) { this.addWaiver(); } + + if (!this.patron.card()) { + this.replaceBarcode(); + } } createNewPatron() { @@ -1564,8 +1568,10 @@ export class EditComponent implements OnInit, AfterViewInit { replaceBarcode() { // Disable current card - this.patron.card().active('f'); - this.patron.card().ischanged(true); + if (this.patron.card()) { + this.patron.card().active('f'); + this.patron.card().ischanged(true); + } const card = this.idl.create('ac'); card.isnew(true); -- 2.11.0