diff options
author | 2019-08-22 22:06:53 +0000 | |
---|---|---|
committer | 2019-08-22 22:06:53 +0000 | |
commit | d02e575d359c5a7707112e5e0afc53713d7796e7 (patch) | |
tree | f6485dd925d65e43123d52a27c6924390a91d0a4 /cds-ui/client/src/app/feature-modules/blueprint/select-template/metadata/metadata.component.ts | |
parent | 42847234a611cbfa367f7d011c9d397cb7906482 (diff) | |
parent | 5306da4cdbd068ec0785a785cc8d24bb1f03f549 (diff) |
Merge "Passing Option from Search DB to metadata"
Diffstat (limited to 'cds-ui/client/src/app/feature-modules/blueprint/select-template/metadata/metadata.component.ts')
-rw-r--r-- | cds-ui/client/src/app/feature-modules/blueprint/select-template/metadata/metadata.component.ts | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/cds-ui/client/src/app/feature-modules/blueprint/select-template/metadata/metadata.component.ts b/cds-ui/client/src/app/feature-modules/blueprint/select-template/metadata/metadata.component.ts index 174bdf183..f49517017 100644 --- a/cds-ui/client/src/app/feature-modules/blueprint/select-template/metadata/metadata.component.ts +++ b/cds-ui/client/src/app/feature-modules/blueprint/select-template/metadata/metadata.component.ts @@ -48,7 +48,7 @@ export class MetadataComponent implements OnInit { blueprintName: string; uploadedFileName: string; entryDefinition: string; - + constructor(private formBuilder: FormBuilder, private store: Store<IAppState>, private loader: LoaderService, private dataService: SelectTemplateService) { this.bpState = this.store.select('blueprint'); @@ -60,12 +60,17 @@ export class MetadataComponent implements OnInit { template_version: ['', Validators.required], template_tags: ['', Validators.required] }); + } ngOnInit() { - this.dataService.getCbaOption().subscribe( - res => {console.log("data from service " + res);} + this.dataService.currentMessage.subscribe( + res => { + let options = res; + console.log(options + " data from service ngoninit" + res); + } ); + this.bpState.subscribe( blueprintdata => { var blueprintState: IBlueprintState = { blueprint: blueprintdata.blueprint, isLoadSuccess: blueprintdata.isLoadSuccess, isSaveSuccess: blueprintdata.isSaveSuccess, isUpdateSuccess: blueprintdata.isUpdateSuccess }; @@ -76,8 +81,6 @@ export class MetadataComponent implements OnInit { this.uploadedFileName = blueprintdata.uploadedFileName; this.entryDefinition = blueprintdata.entryDefinition; - - var blueprintState: IBlueprintState = { blueprint: blueprintdata.blueprint, isLoadSuccess: blueprintdata.isLoadSuccess, isSaveSuccess: blueprintdata.isSaveSuccess, isUpdateSuccess: blueprintdata.isUpdateSuccess }; this.metadata = blueprintState.blueprint.metadata; this.blueprint = blueprintState.blueprint; @@ -99,11 +102,7 @@ export class MetadataComponent implements OnInit { }); }) } -ngAfterInit(){ - this.dataService.getCbaOption().subscribe( - res => {console.log("data from service after init" + res);} - ); -} + UploadMetadata() { this.loader.showLoader(); this.metadata = Object.assign({}, this.CBAMetadataForm.value); |