From 5eca8123787b3ea1bfcef436f54c20dc9fcbb01b Mon Sep 17 00:00:00 2001 From: Adam Woolford Date: Fri, 6 Jan 2023 15:13:53 -0500 Subject: [PATCH] LP19800544 Import all holdings templates Adds loop to importTemplate function so that the whole file will import Signed-off-by: Adam Woolford Signed-off-by: Jessica Woolford Signed-off-by: Beth Willis Signed-off-by: Michele Morgan --- .../src/eg2/src/app/staff/cat/volcopy/copy-attrs.component.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 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 729a62e3d5..9629c313e1 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 @@ -685,9 +685,12 @@ export class CopyAttrsComponent implements OnInit, AfterViewInit { try { const template = JSON.parse(reader.result as string); - const name = Object.keys(template)[0]; - this.volcopy.templates[name] = template[name]; - } catch (E) { + var theKeys = Object.keys(template); + for(let i = 0; i < theKeys.length; i++){ + var name = theKeys[i]; + this.volcopy.templates[name]=template[name]; + }; + } catch (E) { console.error('Invalid Item Attribute template', E); return; } -- 2.11.0