diff options
author | 2020-01-05 12:03:05 +0200 | |
---|---|---|
committer | 2020-01-05 14:30:43 +0200 | |
commit | 077b1ab152c61695ac4d007035dfb81e9aef2c61 (patch) | |
tree | 62d9d465e0273be7d5c57127ed9afb6389303ca9 /cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation.store.ts | |
parent | 4f4e2de08d3c6259da2497950a96d549d3e82f8a (diff) |
add importTab component in package creation
Issue-ID: CCSDK-2016
Signed-off-by: shaaban Altanany <shaaban.eltanany.ext@orange.com>
Change-Id: I828f9891863224cd3c70dbcaf1149efdff394c6e
Diffstat (limited to 'cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation.store.ts')
-rw-r--r-- | cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation.store.ts | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation.store.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation.store.ts index 9a7484cc3..214b516a2 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation.store.ts +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation.store.ts @@ -21,23 +21,20 @@ limitations under the License. import {Injectable} from '@angular/core'; -import {Observable} from 'rxjs'; -import {ApiService} from '../../../../common/core/services/api.service'; -import {BlueprintURLs} from '../../../../common/constants/app-constants'; import {Store} from '../../../../common/core/stores/Store'; -import {PackagesDashboardState} from '../model/packages-dashboard.state'; -import {PackagesApiService} from '../packages-api.service'; -import {CBAPacakge} from './mapping-models/CBAPacakge.model'; + +import {CBAPackage, Definition} from './mapping-models/CBAPacakge.model'; import {Metadata} from './mapping-models/definitions/VlbDefinition'; -import {BluePrintPage} from '../model/BluePrint.model'; +import {PackageCreationService} from './package-creation.service'; + @Injectable({ providedIn: 'root' }) -export class PackageCreationService extends Store<CBAPacakge> { +export class PackageCreationStore extends Store<CBAPackage> { constructor(private packageCreationService: PackageCreationService) { - super(new CBAPacakge()); + super(new CBAPackage()); } changeMetaData(metaDataObject: Metadata) { @@ -47,4 +44,12 @@ export class PackageCreationService extends Store<CBAPacakge> { metaData: metaDataObject }); } + + addDefinition(name: string, content: string) { + + this.setState({ + ...this.state, + definitions: new Definition(this.state.definitions.files.set(name, content)) + }); + } } |