From: Bill Erickson Date: Mon, 10 May 2021 16:44:42 +0000 (-0400) Subject: LP1904036 Sanity check lack of barcode (card) X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=fa303f921f4f8f48a09ae02e206f9f1d168161bc;p=Evergreen.git LP1904036 Sanity check lack of barcode (card) Signed-off-by: Bill Erickson Signed-off-by: Jane Sandberg Signed-off-by: Galen Charlton --- 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);