diff options
author | 2020-05-11 16:19:00 +0200 | |
---|---|---|
committer | 2020-05-11 16:19:00 +0200 | |
commit | fa19dddd833a15109b5be939d45716d6707da3c8 (patch) | |
tree | 30e45aaf75caadf40c93fc51d31bc8027ed28030 /cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/shared-service.ts | |
parent | 16ced660a671dea28fa56ffa860651d78ebb4501 (diff) |
Disable Filename in edit
enable editing an existing file
Issue-ID: CCSDK-2368
Issue-ID: CCSDK-2369
Signed-off-by: AhmedEldeeb50 <ahmed.eldeeb.ext@orange.com>
Change-Id: I214e9b9e1a7ee12edf1318610a4594e36ddbb393
Diffstat (limited to 'cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/shared-service.ts')
-rw-r--r-- | cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/shared-service.ts | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/shared-service.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/shared-service.ts new file mode 100644 index 000000000..f2b73016c --- /dev/null +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/template-mapping/shared-service.ts @@ -0,0 +1,25 @@ +import { Injectable } from '@angular/core'; + +import { Observable, of, BehaviorSubject } from 'rxjs'; + +@Injectable({ + providedIn: 'root' +}) +export class SharedService { + + // based on edit Mode, edit=false + mode = new BehaviorSubject(false); + constructor() { + } + + isEdit(): Observable<boolean> { + return this.mode.asObservable(); + } + enableEdit() { + this.mode.next(true); + } + disableEdit() { + this.mode.next(false); + } + +} |