diff options
author | Ahmedeldeeb50 <ahmed.eldeeb.ext@orange.com> | 2020-10-14 00:07:35 +0200 |
---|---|---|
committer | Ahmedeldeeb50 <ahmed.eldeeb.ext@orange.com> | 2020-10-14 10:21:47 +0200 |
commit | 9d65645ccef6cf6893f3ac2128a90c35c721575b (patch) | |
tree | 2eb9fdf16d62d909eb98205e664a97a1e464f8d0 /cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/templ-mapp-listing | |
parent | 1c9ca7b45163496af84fab3b7591c7353b69baa3 (diff) |
add optional attributes.
Issue-ID: CCSDK-2900
Signed-off-by: Ahmedeldeeb50 <ahmed.eldeeb.ext@orange.com>
Change-Id: I13ce862a0e91213b2734e4fa52a460f018692eb7
Diffstat (limited to 'cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/templ-mapp-listing')
-rw-r--r-- | cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/templ-mapp-listing/templ-mapp-listing.component.ts | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/templ-mapp-listing/templ-mapp-listing.component.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/templ-mapp-listing/templ-mapp-listing.component.ts index 3a05bcfc5..591553cea 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/templ-mapp-listing/templ-mapp-listing.component.ts +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/templ-mapp-listing/templ-mapp-listing.component.ts @@ -174,6 +174,7 @@ export class TemplMappListingComponent implements OnInit, OnDestroy { initDelete(file) { console.log(file); const templateKey = 'Templates/' + file + '-template'; + const mappingKey = 'Templates/' + file + '-mapping.json'; // tslint:disable-next-line: forin for (const templateType in TemplateType) { const fileName = templateKey + '.' + TemplateType[templateType]; @@ -182,11 +183,19 @@ export class TemplMappListingComponent implements OnInit, OnDestroy { break; } } + if (this.fileToDelete.length <= 0) { + // tslint:disable-next-line: forin + if (this.packageCreationStore.state.mapping.files.has(mappingKey)) { + this.fileToDelete = mappingKey; + } + + } } condifrmDelete() { const fullName = this.fileToDelete.split('/')[1]; + console.log(this.fileToDelete + ' -- ' + fullName); const file = fullName.substr(0, fullName.lastIndexOf('-')); const ext = fullName.substr(fullName.lastIndexOf('.') + 1); this.templateAndMappingMap.delete(file); |