From e3d773843a5672f7d9051c68d969b95f15a9033e Mon Sep 17 00:00:00 2001 From: shaaban Altanany Date: Sun, 1 Mar 2020 19:33:18 +0200 Subject: fixing some ui issues Issue-ID: CCSDK-2123 Signed-off-by: shaaban Altanany Change-Id: I60ef330b39f8c9165ab3bd18bbabc2200f81bf66 --- .../templ-mapp-listing.component.html | 6 +++--- .../templ-mapp-listing.component.ts | 23 +++++++++++----------- 2 files changed, 15 insertions(+), 14 deletions(-) (limited to 'cds-ui/designer-client') 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 @@ - \ No newline at end of file + 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); -- cgit 1.2.3-korg