Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Jane Sandberg <js7389@princeton.edu>
Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
</ng-container>
<div class="col-lg-6">
<ng-container *ngIf="!patron.isnew()">
- <button class="btn btn-outline-dark" (click)="replaceBarcode()" i18n>
+ <button [disabled]="replaceBarcodeUsed" class="btn btn-outline-dark"
+ (click)="replaceBarcode()" i18n>
Replace Barcode
</button>
<button class="btn btn-outline-dark ml-2" (click)="barcodesDialog.open()" i18n>
modifiedPatron: IdlObject;
changeHandlerNeeded = false;
nameTab = 'primary';
+ replaceBarcodeUsed = false;
// Are we still fetching data and applying values?
loading = false;
replaceBarcode() {
// Disable current card
+ this.replaceBarcodeUsed = true;
+
if (this.patron.card()) {
// patron.card() is not the same in-memory object as its
// analog in patron.cards(). Since we're about to replace