From 870305e7d5477a4fc2eb67c4859c52cc73470802 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Thu, 2 Jul 2020 16:56:52 -0400 Subject: [PATCH] LPXXX Angular Volcopy Signed-off-by: Bill Erickson --- .../src/eg2/src/app/staff/cat/volcopy/copy-attrs.component.ts | 10 +++------- .../src/eg2/src/app/staff/cat/volcopy/volcopy.component.ts | 4 ++-- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/Open-ILS/src/eg2/src/app/staff/cat/volcopy/copy-attrs.component.ts b/Open-ILS/src/eg2/src/app/staff/cat/volcopy/copy-attrs.component.ts index cf4e98ac6c..818edef694 100644 --- a/Open-ILS/src/eg2/src/app/staff/cat/volcopy/copy-attrs.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/cat/volcopy/copy-attrs.component.ts @@ -459,14 +459,11 @@ export class CopyAttrsComponent implements OnInit, AfterViewInit { template = this.volcopy.templates[name]; } - // Changes will have applied to all items. - const copy = this.context.copyList()[0]; - this.batchAttrs.forEach(comp => { if (!comp.hasChanged) { return; } - const value = copy[comp.name](); const name = comp.name; + const value = this.values[name]; if (value === null) { delete template[name]; @@ -481,9 +478,8 @@ export class CopyAttrsComponent implements OnInit, AfterViewInit { } else { - // some values are fleshed. - // this assumes fleshed objects have an 'id' value, - // which is true so far. + // Some values are fleshed. this assumes fleshed objects + // have an 'id' value, which is true so far. template[name] = typeof value === 'object' ? value.id() : value; } diff --git a/Open-ILS/src/eg2/src/app/staff/cat/volcopy/volcopy.component.ts b/Open-ILS/src/eg2/src/app/staff/cat/volcopy/volcopy.component.ts index d16abb3175..4c4505fa79 100644 --- a/Open-ILS/src/eg2/src/app/staff/cat/volcopy/volcopy.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/cat/volcopy/volcopy.component.ts @@ -393,9 +393,9 @@ export class VolCopyComponent implements OnInit { const evt = this.evt.parse(copyIds); - // TODO: confirm / handle overrides - + // TODO: handle overrides? if (evt) { + this.loading = false; alert(evt); return; } -- 2.11.0