diff options
author | 2020-02-26 04:16:14 +0000 | |
---|---|---|
committer | 2020-02-26 04:16:14 +0000 | |
commit | c99df5dd491c9f18044ec483e696739080e80950 (patch) | |
tree | 6f2a271ec154656c69d34743d498968c2b877b0c /cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/creationModes/DesignerCreationMode.ts | |
parent | 2ef7909fd0b9d12a7fe1619639e787c5ee0cf4c3 (diff) | |
parent | e70a0e413947cc3e5e21d041f0ed3d7582b44d7a (diff) |
Merge "import maaping from CSV file or the current template"
Diffstat (limited to 'cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/creationModes/DesignerCreationMode.ts')
-rw-r--r-- | cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/creationModes/DesignerCreationMode.ts | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/creationModes/DesignerCreationMode.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/creationModes/DesignerCreationMode.ts index db6d0420b..162efff9e 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/creationModes/DesignerCreationMode.ts +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/creationModes/DesignerCreationMode.ts @@ -7,6 +7,7 @@ import { PackageCreationUtils } from '../package-creation.utils'; export class DesignerCreationMode extends PackageCreationModes { + // Refactor methods params to be in constructor level constructor() { super(); } @@ -15,6 +16,7 @@ export class DesignerCreationMode extends PackageCreationModes { this.addToscaMetaDataFile(cbaPackage.metaData); this.createDefinitionsFolder(cbaPackage, packageCreationUtils); this.addScriptsFolder(cbaPackage.scripts); + this.addTemplateFolder(cbaPackage); } private addScriptsFolder(scripts: Scripts) { @@ -23,6 +25,17 @@ export class DesignerCreationMode extends PackageCreationModes { }); } + private addTemplateFolder(cbaPackage: CBAPackage) { + // Create Template Files Folder + cbaPackage.templates.files.forEach((value, key) => { + FilesContent.putData(key, value); + }); + // Create Mapping Files Folder + cbaPackage.mapping.files.forEach((value, key) => { + FilesContent.putData(key, value); + }); + } + private createDefinitionsFolder(cbaPackage: CBAPackage, packageCreationUtils: PackageCreationUtils) { cbaPackage.definitions.imports.forEach((valueOfFile, key) => { FilesContent.putData(key, valueOfFile); |