diff options
author | 2020-01-30 14:07:25 +0000 | |
---|---|---|
committer | 2020-01-30 14:07:25 +0000 | |
commit | 23f898a96f7e8b3ecb0817abc61612bdc3d2e9aa (patch) | |
tree | fc3118a1cfbfcd5d29f5923914e8e488f16be7b2 /cds-ui/designer-client/src/app/modules/feature-modules/packages/package-creation/package-creation.store.ts | |
parent | da25e1649c9a10f998c8dde068641d7601a3f00a (diff) | |
parent | f2e85fa8183c684322f1f8a34ea9ed4d1f33b169 (diff) |
Merge "package creation store preparation"
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 | 16 |
1 files changed, 9 insertions, 7 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 f19ada820..93998e8a9 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 @@ -23,7 +23,7 @@ import {Injectable} from '@angular/core'; import {Store} from '../../../../common/core/stores/Store'; -import {CBAPackage, Definition, Scripts} from './mapping-models/CBAPacakge.model'; +import {CBAPackage} from './mapping-models/CBAPacakge.model'; import {PackageCreationService} from './package-creation.service'; import {FolderNodeElement, MetaDataTabModel} from './mapping-models/metadata/MetaDataTab.model'; import * as JSZip from 'jszip'; @@ -53,7 +53,7 @@ export class PackageCreationStore extends Store<CBAPackage> { this.setState({ ...this.state, - definitions: new Definition(this.state.definitions.files.set(name, content)) + definitions: this.state.definitions.setImports(name, content) }); } @@ -61,15 +61,17 @@ export class PackageCreationStore extends Store<CBAPackage> { this.setState({ ...this.state, - scripts: new Scripts(this.state.scripts.files.set(name, content)) + scripts: this.state.scripts.setScripts(name, content) }); } - // type => refer to scripts || definitions - // from Files from scripts or imports - removeFromState(name: string, type: string) { - this.state[type].files.delete(name); + removeFileFromState(name: string) { + this.state.scripts.files.delete(name); + } + + removeFileFromDefinition(filename) { + this.state.definitions.imports.delete(filename); } saveBluePrint(blob) { |