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=c5599f0d812dcbdc648f0790d9242ea7a9cfc053;p=Evergreen.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 e5f08bebdf..5841b32c7b 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 @@ -686,9 +686,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; }