diff options
author | Ahmed <ahmed.eldeeb.ext@orange.com> | 2020-02-27 17:15:30 +0200 |
---|---|---|
committer | Ahmed Eldeeb <ahmed.eldeeb.ext@orange.com> | 2020-02-28 09:32:13 +0000 |
commit | d20383f0b00a363b0193e162ac297dd731088ca2 (patch) | |
tree | 2a4f43c7e3b69a07514c5c3cdfafacbefcb0111b /cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/templ-mapp-listing/templ-mapp-listing.component.ts | |
parent | b2b847587d7c06db5737a06820d1809b9aeb73e1 (diff) |
adding dependacies to mapping table
Issue-ID: CCSDK-2065
Signed-off-by: ahmedeldeeb50 <ahmed.eldeeb.ext@orange.com>
Change-Id: I4e91ceaec3327df8f3d92ac339bc96dc2ba8e63a
Diffstat (limited to 'cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/templ-mapp-listing/templ-mapp-listing.component.ts')
-rw-r--r-- | cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/templ-mapp-listing/templ-mapp-listing.component.ts | 24 |
1 files changed, 14 insertions, 10 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.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 46e67fc07..61c376c51 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', @@ -45,13 +45,14 @@ export class TemplMappListingComponent implements OnInit { private setIsMappingOrTemplate(key: string, templateAndMapping: TemplateAndMapping, isFromTemplate: boolean) { const nameOfFile = key.split('/')[1].split('.')[0].split('-')[0]; - if (this.templateAndMappingMap.has(nameOfFile)) { - const templateAndMappingExisted = this.templateAndMappingMap.get(nameOfFile); + const fullName = nameOfFile + ',' + key; + if (this.templateAndMappingMap.has(fullName)) { + const templateAndMappingExisted = this.templateAndMappingMap.get(fullName); !isFromTemplate ? templateAndMappingExisted.isMapping = true : templateAndMappingExisted.isTemplate = true; - this.templateAndMappingMap.set(nameOfFile, templateAndMappingExisted); + this.templateAndMappingMap.set(fullName, templateAndMappingExisted); } else { - this.templateAndMappingMap.set(nameOfFile, templateAndMapping); + this.templateAndMappingMap.set(fullName, templateAndMapping); } } @@ -63,7 +64,10 @@ export class TemplMappListingComponent implements OnInit { setSourceCodeEditor(key: string) { this.packageCreationStore.state$.subscribe(cba => { if (cba.templates) { - const fileContent = cba.templates.getValue(key); + console.log(cba.templates); + console.log(key); + const fileContent = cba.templates.getValue(key.trim()); + console.log(fileContent); const templateInfo = new TemplateInfo(); templateInfo.fileContent = fileContent; templateInfo.fileName = key; |