From 15014f4dd7fdb1fa1d3d826421aef7e8568f557e Mon Sep 17 00:00:00 2001 From: Jane Sandberg Date: Mon, 26 Aug 2019 15:18:34 -0700 Subject: [PATCH] LP1816475: Put the resource barcodes in order Signed-off-by: Jane Sandberg Signed-off-by: Christine Burns Signed-off-by: Galen Charlton --- .../src/app/staff/booking/create-reservation.component.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/eg2/src/app/staff/booking/create-reservation.component.ts b/Open-ILS/src/eg2/src/app/staff/booking/create-reservation.component.ts index 1b25f41317..7461a6cfcb 100644 --- a/Open-ILS/src/eg2/src/app/staff/booking/create-reservation.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/booking/create-reservation.component.ts @@ -272,7 +272,11 @@ export class CreateReservationComponent implements OnInit, AfterViewInit, OnDest } resources$.pipe( - tap((resource) => this.resources.push(resource)), + tap((resource) => { + this.resources.push(resource); + this.resources.sort((a,b) => + (a.barcode() > b.barcode()) ? 1 : ((b.barcode() > a.barcode()) ? -1 : 0)); + }), takeLast(1), switchMap(() => { let range = {startTime: Moment(), endTime: Moment()}; -- 2.43.2