From: Jane Sandberg Date: Mon, 26 Aug 2019 22:18:34 +0000 (-0700) Subject: LP1816475: Put the resource barcodes in order X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=15014f4dd7fdb1fa1d3d826421aef7e8568f557e;p=evergreen%2Fpines.git LP1816475: Put the resource barcodes in order Signed-off-by: Jane Sandberg Signed-off-by: Christine Burns Signed-off-by: Galen Charlton --- 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()};