LP1816475: Don't let users cancel picked up reservations
authorJane Sandberg <sandbej@linnbenton.edu>
Mon, 1 Apr 2019 22:12:00 +0000 (15:12 -0700)
committerJane Sandberg <sandbej@linnbenton.edu>
Wed, 17 Apr 2019 20:32:12 +0000 (13:32 -0700)
Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
Open-ILS/src/eg2/src/app/staff/booking/reservations-grid.component.ts

index 3714052..d419c35 100644 (file)
@@ -174,7 +174,7 @@ export class ReservationsGridComponent implements OnInit {
         this.noSelectedRows = (rows: IdlObject[]) => (rows.length === 0);
         this.notOnePatronSelected = (rows: IdlObject[]) => (new Set(rows.map(row => row.usr().id())).size !== 1);
         this.notOneResourceSelected = (rows: IdlObject[]) => (new Set(rows.map(row => row.current_resource().id())).size !== 1);
-        this.cancelNotAppropriate = (rows: IdlObject[]) => (this.noSelectedRows(rows) || ('pickedUp' === this.status));
+        this.cancelNotAppropriate = (rows: IdlObject[]) => (this.noSelectedRows(rows) || ['pickedUp', 'returnReady', 'returnedToday'].includes(this.status));
         this.pickupNotAppropriate = (rows: IdlObject[]) => (this.noSelectedRows(rows) || ('pickupReady' !== this.status));
         this.editNotAppropriate = (rows: IdlObject[]) => (this.noSelectedRows(rows) || ('returnedToday' === this.status));
         this.returnNotAppropriate = (rows: IdlObject[]) => {