fixing some ui issues
Issue-ID: CCSDK-2123
Signed-off-by: shaaban Altanany <shaaban.eltanany.ext@orange.com>
Change-Id: I60ef330b39f8c9165ab3bd18bbabc2200f81bf66
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/templ-mapp-listing/templ-mapp-listing.component.html b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/templ-mapp-listing/templ-mapp-listing.component.html
index 129576c..3ed055c 100644
--- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/templ-mapp-listing/templ-mapp-listing.component.html
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/templ-mapp-listing/templ-mapp-listing.component.html
@@ -21,8 +21,8 @@
<div class="row">
<!-- <div class="col-4" style="color:white" *ngFor="let file of templates.files | keyvalue; let mapIndex = index">-->
<div class="col-4" style="color:white" *ngFor="let file of getKeys(templateAndMappingMap)">
- <a (click)="setSourceCodeEditor(file.split(',')[1])"
- class="template-mapping-list active">{{file.split(',')[0]}}
+ <a (click)="setSourceCodeEditor(file)"
+ class="template-mapping-list active">{{file}}
<span *ngIf="getValue(file).isMapping">Mapping</span>
<span *ngIf="getValue(file).isTemplate">Template</span>
</a>
@@ -33,4 +33,4 @@
</div>
</div>
-</div>
\ No newline at end of file
+</div>
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 61c376c..d459dac 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
@@ -1,8 +1,8 @@
-import { Component, EventEmitter, OnInit, Output } from '@angular/core';
-import { PackageCreationStore } from '../../package-creation.store';
-import { Mapping, Template } from '../../mapping-models/CBAPacakge.model';
-import { TemplateInfo, TemplateStore } from '../../template.store';
-import { TemplateAndMapping } from '../TemplateAndMapping';
+import {Component, EventEmitter, OnInit, Output} from '@angular/core';
+import {PackageCreationStore} from '../../package-creation.store';
+import {Mapping, Template} from '../../mapping-models/CBAPacakge.model';
+import {TemplateInfo, TemplateStore} from '../../template.store';
+import {TemplateAndMapping} from '../TemplateAndMapping';
@Component({
selector: 'app-templ-mapp-listing',
@@ -23,6 +23,7 @@
if (cba.templates) {
this.templates = cba.templates;
this.mapping = cba.mapping;
+ console.log(this.mapping);
let templateAndMapping;
this.templateAndMappingMap.clear();
this.templates.files.forEach((value, key) => {
@@ -45,14 +46,13 @@
private setIsMappingOrTemplate(key: string, templateAndMapping: TemplateAndMapping, isFromTemplate: boolean) {
const nameOfFile = key.split('/')[1].split('.')[0].split('-')[0];
- const fullName = nameOfFile + ',' + key;
- if (this.templateAndMappingMap.has(fullName)) {
- const templateAndMappingExisted = this.templateAndMappingMap.get(fullName);
+ // const fullName = nameOfFile + ',' + key.split('.');
+ if (this.templateAndMappingMap.has(nameOfFile)) {
+ const templateAndMappingExisted = this.templateAndMappingMap.get(nameOfFile);
!isFromTemplate ? templateAndMappingExisted.isMapping = true : templateAndMappingExisted.isTemplate = true;
- this.templateAndMappingMap.set(fullName, templateAndMappingExisted);
+ this.templateAndMappingMap.set(nameOfFile, templateAndMappingExisted);
} else {
-
- this.templateAndMappingMap.set(fullName, templateAndMapping);
+ this.templateAndMappingMap.set(nameOfFile, templateAndMapping);
}
}
@@ -62,6 +62,7 @@
}
setSourceCodeEditor(key: string) {
+ key = 'Templates/' + key + '-template.vtl';
this.packageCreationStore.state$.subscribe(cba => {
if (cba.templates) {
console.log(cba.templates);