From 9d65645ccef6cf6893f3ac2128a90c35c721575b Mon Sep 17 00:00:00 2001 From: Ahmedeldeeb50 Date: Wed, 14 Oct 2020 00:07:35 +0200 Subject: add optional attributes. Issue-ID: CCSDK-2900 Signed-off-by: Ahmedeldeeb50 Change-Id: I13ce862a0e91213b2734e4fa52a460f018692eb7 --- .../templ-mapp-creation/templ-mapp-creation.component.html | 6 ++++-- .../templ-mapp-listing/templ-mapp-listing.component.ts | 9 +++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) (limited to 'cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation') diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/templ-mapp-creation/templ-mapp-creation.component.html b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/templ-mapp-creation/templ-mapp-creation.component.html index de97a4679..6dc120728 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/templ-mapp-creation/templ-mapp-creation.component.html +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/templ-mapp-creation/templ-mapp-creation.component.html @@ -146,7 +146,8 @@ ({{resourceDictionaryRes.length}} attributes in total) - +
@@ -230,7 +231,8 @@ --> -
+
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); -- cgit 1.2.3-korg