diff options
author | Ahmedeldeeb50 <ahmed.eldeeb.ext@orange.com> | 2021-01-11 14:10:35 +0200 |
---|---|---|
committer | Ahmedeldeeb50 <ahmed.eldeeb.ext@orange.com> | 2021-01-11 14:10:35 +0200 |
commit | 006cede8158bb1b3579805b6492df8b050aa83be (patch) | |
tree | fed7e59645e73d2fa235dbbdae7dd48aeeb01194 /cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/resource-dictionary-creation.component.ts | |
parent | 0f6d8229cff178d1eca82f8cff0c678fafbb1e9c (diff) |
Enable user to create new resource dictionary with json
Issue-ID: CCSDK-3078
Signed-off-by: Ahmedeldeeb50 <ahmed.eldeeb.ext@orange.com>
Change-Id: I2136eb5b2cec1e9db4c7124af9f09046ff5c15f0
Diffstat (limited to 'cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/resource-dictionary-creation.component.ts')
-rw-r--r-- | cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/resource-dictionary-creation.component.ts | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/resource-dictionary-creation.component.ts b/cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/resource-dictionary-creation.component.ts index e32db8a37..c40679718 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/resource-dictionary-creation.component.ts +++ b/cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/resource-dictionary-creation.component.ts @@ -24,6 +24,7 @@ import { DictionaryModel } from '../model/dictionary.model'; import { Definition } from '../model/definition.model'; import { DictionaryMetadataComponent } from './dictionary-metadata/dictionary-metadata.component'; import { SourcesTemplateComponent } from './sources-template/sources-template.component'; +import { DictionaryCreationService } from './dictionary-creation.service'; @Component({ selector: 'app-resource-dictionary-creation', @@ -32,7 +33,11 @@ import { SourcesTemplateComponent } from './sources-template/sources-template.co }) export class ResourceDictionaryCreationComponent implements OnInit { - constructor(private router: Router, private dictionaryCreationStore: DictionaryCreationStore) { + constructor( + private router: Router, + private dictionaryCreationStore: DictionaryCreationStore, + private dictionaryService: DictionaryCreationService + ) { } modes: object[] = [ @@ -59,15 +64,26 @@ export class ResourceDictionaryCreationComponent implements OnInit { } saveDictionaryToStore() { - this.dictionaryCreationStore.getSources(); - this.dictionaryCreationStore.state$.subscribe(dd => { - console.log(dd); - }); + // console.log('00000000000'); + // this.dictionaryCreationStore.getSources(); + // this.dictionaryCreationStore.state$.subscribe(dd => { + // console.log(dd); + // }); } - test() { + createDictionary() { + console.log('-----'); this.metadataTabComponent.saveMetaDataToStore(); - this.sourcesTemplateComponent.saveSorcesDataToStore(); + this.dictionaryCreationStore.state$.subscribe(res => { + console.log('---------------------------------------'); + console.log(res); + this.dictionaryService.save(res.metaData).subscribe(data => { + + }, err => { + + }); + }); + // this.sourcesTemplateComponent.saveSorcesDataToStore(); } goBackToDashBorad() { |