diff options
author | Ahmedeldeeb50 <ahmed.eldeeb.ext@orange.com> | 2021-01-18 14:26:22 +0200 |
---|---|---|
committer | Ahmedeldeeb50 <ahmed.eldeeb.ext@orange.com> | 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 | |
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')
2 files changed, 13 insertions, 7 deletions
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/dictionary-metadata/dictionary-metadata.component.html b/cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/dictionary-metadata/dictionary-metadata.component.html index add21e9e1..8e355449b 100644 --- a/cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/dictionary-metadata/dictionary-metadata.component.html +++ b/cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/dictionary-metadata/dictionary-metadata.component.html @@ -78,7 +78,7 @@ <div class="single-line-model"> <label class="label-name">Tags</label> <div class="label-input"> - <input type="input" (keyup.enter)="addTag($event)" [(ngModel)]="metaDataTab.tags" + <input type="input" (keyup.enter)="addTag($event)" placeholder="Ex., vDNS-CDS"> </div> 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); |