diff options
author | 2021-01-18 14:26:22 +0200 | |
---|---|---|
committer | 2021-01-18 14:26:22 +0200 | |
commit | fc5fa67b192b25a6507212cf1b3082134c6cb2a6 (patch) | |
tree | 91fd15255b69c64082959c7373b9f157f45bccd1 /cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/dictionary-metadata/dictionary-metadata.component.ts | |
parent | 424fcd63ca57bd8cfa8b46001021c29e020a8a6d (diff) |
create dictionary resource from metadata tab
enable the user to add source from the UI
Issue-ID: CCSDK-3083
Signed-off-by: Ahmedeldeeb50 <ahmed.eldeeb.ext@orange.com>
Change-Id: I1f656fe303863373723a1285d5e1a473a9a47dec
Diffstat (limited to 'cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/dictionary-metadata/dictionary-metadata.component.ts')
-rw-r--r-- | cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/dictionary-metadata/dictionary-metadata.component.ts | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/dictionary-metadata/dictionary-metadata.component.ts b/cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/dictionary-metadata/dictionary-metadata.component.ts index 631a0fffd..01df118d2 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/dictionary-metadata/dictionary-metadata.component.ts +++ b/cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/dictionary-metadata/dictionary-metadata.component.ts @@ -37,8 +37,6 @@ export class DictionaryMetadataComponent implements OnInit { errorMessage: string; constructor( - private route: ActivatedRoute, - private dictionaryCreationService: DictionaryCreationService, private dictionaryCreationStore: DictionaryCreationStore ) { } @@ -67,6 +65,7 @@ export class DictionaryMetadataComponent implements OnInit { removeTag(value) { this.tags.delete(value); + this.mergeTags(); } @@ -74,15 +73,22 @@ export class DictionaryMetadataComponent implements OnInit { const value = event.target.value; console.log(value); if (value && value.trim().length > 0) { - let tag = ''; event.target.value = ''; this.tags.add(value); - this.tags.forEach(val => { - tag += val + ', '; - }); + // merge + this.mergeTags(); } } + mergeTags() { + let tag = ''; + this.tags.forEach((val, index) => { + tag += val + ', '; + }); + this.metaDataTab.tags = tag.trim(); + this.saveMetaDataToStore(); + } + saveMetaDataToStore() { console.log(this.metaDataTab); this.dictionaryCreationStore.changeMetaData(this.metaDataTab); |