From: Bill Erickson Date: Tue, 18 Aug 2020 20:35:02 +0000 (-0400) Subject: LP1888723 Angular holdings trims barcode spaces X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=ea0babfec16dc7bfec2ded2f8aa75b3958a13521;p=evergreen%2Fpines.git LP1888723 Angular holdings trims barcode spaces The barcode input form trims leading and trailing spaces from barcodes in the Angular holdings editor. Spaces in the middle of the barcode are not removed. Signed-off-by: Bill Erickson Signed-off-by: Ruth Frasur Signed-off-by: Galen Charlton --- diff --git a/Open-ILS/src/eg2/src/app/staff/cat/volcopy/vol-edit.component.ts b/Open-ILS/src/eg2/src/app/staff/cat/volcopy/vol-edit.component.ts index c8aa4d0669..0d0b4ce9a1 100644 --- a/Open-ILS/src/eg2/src/app/staff/cat/volcopy/vol-edit.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/cat/volcopy/vol-edit.component.ts @@ -361,7 +361,13 @@ export class VolEditComponent implements OnInit { } barcodeChanged(copy: IdlObject, barcode: string) { - // note: copy.barcode(barcode) applied via ngModel + + if (barcode) { + // Scrub leading/trailing spaces from barcodes + barcode = barcode.trim(); + copy.barcode(barcode); + } + copy.ischanged(true); copy._dupe_barcode = false;