aboutsummaryrefslogtreecommitdiffstats
path: root/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation
diff options
context:
space:
mode:
authorAhmedeldeeb50 <ahmed.eldeeb.ext@orange.com>2020-10-14 00:07:35 +0200
committerAhmedeldeeb50 <ahmed.eldeeb.ext@orange.com>2020-10-14 10:21:47 +0200
commit9d65645ccef6cf6893f3ac2128a90c35c721575b (patch)
tree2eb9fdf16d62d909eb98205e664a97a1e464f8d0 /cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation
parent1c9ca7b45163496af84fab3b7591c7353b69baa3 (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')
-rw-r--r--cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/templ-mapp-creation/templ-mapp-creation.component.html6
-rw-r--r--cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/templ-mapp-listing/templ-mapp-listing.component.ts9
2 files changed, 13 insertions, 2 deletions
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 @@
<span>({{resourceDictionaryRes.length}} attributes in total)</span>
</div>
</div>
- <table datatable [dtOptions]="initDtOptions" [dtTrigger]="dtTrigger" class="row-border hover">
+ <table datatable id="init-table" [dtOptions]="initDtOptions" [dtTrigger]="dtTrigger"
+ class="row-border hover">
<thead>
<tr>
<th></th>
@@ -230,7 +231,8 @@
<button [disabled]="selectedProps.size <=0" type="button" class="btn" (click)="removeProps()"
tooltip="Remove" placement="bottom"><i class="icon-delete-sm"></i></button>
</div> -->
- <table datatable [dtOptions]="dtOptions" [dtTrigger]="resTableDtTrigger" class="row-border hover">
+ <table datatable id="res-table" [dtOptions]="dtOptions" [dtTrigger]="resTableDtTrigger"
+ class="row-border hover">
<thead>
<tr>
<!-- <th></th> -->
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);