summaryrefslogtreecommitdiffstats
path: root/cds-ui/designer-client/src
diff options
context:
space:
mode:
authorshaaban Altanany <shaaban.eltanany.ext@orange.com>2020-03-01 19:33:18 +0200
committershaaban Altanany <shaaban.eltanany.ext@orange.com>2020-03-01 19:33:18 +0200
commite3d773843a5672f7d9051c68d969b95f15a9033e (patch)
treedfac20ffceb8db020dba284b63088a5dee8187f0 /cds-ui/designer-client/src
parent2068f014427ec1a2b782677557b4af0f1723e40c (diff)
fixing some ui issues
Issue-ID: CCSDK-2123 Signed-off-by: shaaban Altanany <shaaban.eltanany.ext@orange.com> Change-Id: I60ef330b39f8c9165ab3bd18bbabc2200f81bf66
Diffstat (limited to 'cds-ui/designer-client/src')
-rw-r--r--cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/templ-mapp-listing/templ-mapp-listing.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.ts23
2 files changed, 15 insertions, 14 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.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 129576cbe..3ed055c5a 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 61c376c51..d459dac67 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 @@ export class TemplMappListingComponent implements OnInit {
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 @@ export class TemplMappListingComponent implements OnInit {
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 @@ export class TemplMappListingComponent implements OnInit {
}
setSourceCodeEditor(key: string) {
+ key = 'Templates/' + key + '-template.vtl';
this.packageCreationStore.state$.subscribe(cba => {
if (cba.templates) {
console.log(cba.templates);