summaryrefslogtreecommitdiffstats
path: root/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/templ-mapp-listing/templ-mapp-listing.component.ts
diff options
context:
space:
mode:
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.ts13
1 files changed, 12 insertions, 1 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 ed9f3eeb3..338c8f7cd 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
@@ -4,6 +4,7 @@ import { Mapping, Template } from '../../mapping-models/CBAPacakge.model';
import { TemplateInfo, TemplateStore } from '../../template.store';
import { TemplateAndMapping } from '../TemplateAndMapping';
import { ActivatedRoute } from '@angular/router';
+import { SharedService } from '../shared-service';
@Component({
@@ -19,17 +20,23 @@ export class TemplMappListingComponent implements OnInit {
private mapping: Mapping;
isCreate = true;
currentFile: string;
+ edit = false;
constructor(
private packageCreationStore: PackageCreationStore,
private templateStore: TemplateStore,
- private route: ActivatedRoute
+ private route: ActivatedRoute,
+ private sharedService: SharedService
) {
}
ngOnInit() {
if (this.route.snapshot.paramMap.has('id')) {
this.isCreate = false;
+ this.sharedService.isEdit().subscribe(res => {
+ this.edit = res;
+ });
+
}
this.packageCreationStore.state$.subscribe(cba => {
if (cba.templates) {
@@ -71,6 +78,9 @@ export class TemplMappListingComponent implements OnInit {
openCreationView() {
this.showCreationViewParentNotification.emit('tell parent to open create views');
+ console.log('disable edit mode');
+ this.sharedService.disableEdit();
+
}
FullView() {
this.showFullView.emit('show full view');
@@ -101,6 +111,7 @@ export class TemplMappListingComponent implements OnInit {
}
this.templateStore.changeTemplateInfo(templateInfo);
this.FullView();
+ this.sharedService.enableEdit();
});
}