From c0a2362755443334fc924464787756b1f93f51c2 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Thu, 2 Jul 2020 16:23:31 -0400 Subject: [PATCH] LPXXX volcopy protect statuses Signed-off-by: Bill Erickson --- .../staff/cat/volcopy/copy-attrs.component.html | 30 +++++++++++++++++----- .../app/staff/cat/volcopy/vol-edit.component.html | 1 + .../app/staff/cat/volcopy/vol-edit.component.ts | 3 +-- .../src/app/staff/cat/volcopy/volcopy.service.ts | 8 ++++-- 4 files changed, 32 insertions(+), 10 deletions(-) diff --git a/Open-ILS/src/eg2/src/app/staff/cat/volcopy/copy-attrs.component.html b/Open-ILS/src/eg2/src/app/staff/cat/volcopy/copy-attrs.component.html index 08af143944..d91d41e015 100644 --- a/Open-ILS/src/eg2/src/app/staff/cat/volcopy/copy-attrs.component.html +++ b/Open-ILS/src/eg2/src/app/staff/cat/volcopy/copy-attrs.component.html @@ -72,12 +72,30 @@

Identification

- +
- - + + + + + + + + + + + + + + + +
@@ -151,7 +169,7 @@ diff --git a/Open-ILS/src/eg2/src/app/staff/cat/volcopy/vol-edit.component.html b/Open-ILS/src/eg2/src/app/staff/cat/volcopy/vol-edit.component.html index b62f280dbf..620ee81073 100644 --- a/Open-ILS/src/eg2/src/app/staff/cat/volcopy/vol-edit.component.html +++ b/Open-ILS/src/eg2/src/app/staff/cat/volcopy/vol-edit.component.html @@ -212,6 +212,7 @@
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 84afaf5fa1..fec38e0ccd 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 @@ -296,8 +296,7 @@ export class VolEditComponent implements OnInit { } barcodeCanChange(copy: IdlObject): boolean { - // TODO - return true; + return !this.volcopy.copyStatIsMagic(copy.status()); } generateBarcodes() { diff --git a/Open-ILS/src/eg2/src/app/staff/cat/volcopy/volcopy.service.ts b/Open-ILS/src/eg2/src/app/staff/cat/volcopy/volcopy.service.ts index 8711740e0c..c2a0aa59cf 100644 --- a/Open-ILS/src/eg2/src/app/staff/cat/volcopy/volcopy.service.ts +++ b/Open-ILS/src/eg2/src/app/staff/cat/volcopy/volcopy.service.ts @@ -413,8 +413,12 @@ export class VolCopyService { } - copyStatIsMagic(id: number): boolean { - return this.magicCopyStats.includes(id); + copyStatIsMagic(statId: number): boolean { + return this.magicCopyStats.includes(statId); + } + + restrictCopyDelete(statId: number): boolean { + return this.copyStatuses[statId].restrict_copy_delete() === 't'; } } -- 2.11.0