From 6edf1f95883e230bcddb7dfbcbafc6d7527a5ce7 Mon Sep 17 00:00:00 2001 From: Ahmed Date: Mon, 2 Mar 2020 12:11:29 +0200 Subject: Display Mapping result in view table. Update Modals Issue-ID: CCSDK-2065 Signed-off-by: Ahmed Change-Id: Ifb0f2223cded8b54f13aa600186631f685cd6d02 --- .../template-mapping/template-mapping.component.ts | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/template-mapping.component.ts') diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/template-mapping.component.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/template-mapping.component.ts index 7079f8404..106765834 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/template-mapping.component.ts +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/template-mapping.component.ts @@ -1,4 +1,6 @@ -import {Component, OnInit} from '@angular/core'; +import { Component, OnInit } from '@angular/core'; +import { ActivatedRoute } from '@angular/router'; +import { PackageCreationStore } from '../package-creation.store'; @Component({ selector: 'app-template-mapping', @@ -9,12 +11,19 @@ export class TemplateMappingComponent implements OnInit { creationView = true; listView = false; - constructor() { + constructor(private route: ActivatedRoute, private pakcageStore: PackageCreationStore) { } ngOnInit() { + if (this.route.snapshot.paramMap.has('id')) { + console.log('Edit mode'); + this.creationView = false; + this.listView = false; + } else { + console.log('Create mode'); + this.pakcageStore.clear(); + } } - openCreationView() { this.creationView = false; this.listView = true; -- cgit 1.2.3-korg