From: Adam Woolford Date: Fri, 6 Jan 2023 20:13:53 +0000 (-0500) Subject: LP19800544 Import all holdings templates X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=5eca8123787b3ea1bfcef436f54c20dc9fcbb01b;p=evergreen%2Fpines.git 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 --- 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; }