From ec58bf759d734c312e8f45b5b4098e5eec492b1a Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Wed, 1 Apr 2020 10:47:08 -0400 Subject: [PATCH] LP1868354 Angular catalog item/call number transfer Add support for 3 varieties of items and call number transfer in the Angular staff catalog. 1. Transfer selected items to selected call number. 2. Transfer selected call numbers and attached items to selected bib record. 3. Transfer selelected items to selected bib record and org unit ID (owning library) creating new call numbers as needed. Signed-off-by: Chris Sharp --- .../staff/catalog/record/actions.component.ts | 14 +- .../catalog/record/holdings.component.html | 19 ++- .../catalog/record/holdings.component.ts | 100 ++++++++++- .../staff/share/holdings/holdings.module.ts | 10 +- .../holdings/transfer-holdings.component.html | 17 ++ .../holdings/transfer-holdings.component.ts | 142 ++++++++++++++++ .../holdings/transfer-items.component.html | 22 +++ .../holdings/transfer-items.component.ts | 160 ++++++++++++++++++ 8 files changed, 473 insertions(+), 11 deletions(-) create mode 100644 Open-ILS/src/eg2/src/app/staff/share/holdings/transfer-holdings.component.html create mode 100644 Open-ILS/src/eg2/src/app/staff/share/holdings/transfer-holdings.component.ts create mode 100644 Open-ILS/src/eg2/src/app/staff/share/holdings/transfer-items.component.html create mode 100644 Open-ILS/src/eg2/src/app/staff/share/holdings/transfer-items.component.ts diff --git a/Open-ILS/src/eg2/src/app/staff/catalog/record/actions.component.ts b/Open-ILS/src/eg2/src/app/staff/catalog/record/actions.component.ts index 2e3e2ad302..52e89bee6b 100644 --- a/Open-ILS/src/eg2/src/app/staff/catalog/record/actions.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/catalog/record/actions.component.ts @@ -33,8 +33,12 @@ export class RecordActionsComponent implements OnInit { current: null }, holdingTransfer: { - key: 'eg.cat.marked_holding_transfer_record', - current: null + key: 'eg.cat.transfer_target_record', + current: null, + clear: [ // Clear these values on mark. + 'eg.cat.transfer_target_lib', + 'eg.cat.transfer_target_vol' + ] } }; @@ -69,6 +73,12 @@ export class RecordActionsComponent implements OnInit { const target = this.targets[name]; target.current = this.recId; this.store.setLocalItem(target.key, this.recId); + + if (target.clear) { + // Some marks require clearing other marks. + target.clear.forEach(key => this.store.removeLocalItem(key)); + } + this.strings.interpolate('catalog.record.toast.' + name) .then(txt => this.toast.success(txt)); } diff --git a/Open-ILS/src/eg2/src/app/staff/catalog/record/holdings.component.html b/Open-ILS/src/eg2/src/app/staff/catalog/record/holdings.component.html index bed7a4e149..3d6c4d44ce 100644 --- a/Open-ILS/src/eg2/src/app/staff/catalog/record/holdings.component.html +++ b/Open-ILS/src/eg2/src/app/staff/catalog/record/holdings.component.html @@ -52,6 +52,12 @@ + + +
@@ -214,7 +220,18 @@ i18n-label label="Mark Library/Call Number as Transfer Destination" (onClick)="markLibCnForTransfer($event)"> - + + + + + +