summaryrefslogtreecommitdiffstats
path: root/cds-ui/designer-client/src/app/modules
diff options
context:
space:
mode:
authorAhmedeldeeb50 <ahmed.eldeeb.ext@orange.com>2021-01-12 13:07:45 +0200
committerAhmedeldeeb50 <ahmed.eldeeb.ext@orange.com>2021-01-12 13:07:45 +0200
commitbb91b6eedec5d15ec4d9e473f27dd63592762cf9 (patch)
tree8704e82261901d6a6368e7704c5c2f947b843dd8 /cds-ui/designer-client/src/app/modules
parent63f820c6bc3dd6b91ec89eb968564fc46d4f2473 (diff)
Add icon beside the selected templates in Function attributes tab
update create_resource_dictionary API Issue-ID: CCSDK-3082 Issue-ID: CCSDK-3078 Signed-off-by: Ahmedeldeeb50 <ahmed.eldeeb.ext@orange.com> Change-Id: Ic5038dfba0c7b59c5e51096b9864aa0baff56c2b
Diffstat (limited to 'cds-ui/designer-client/src/app/modules')
-rw-r--r--cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions-attribute/functions-attribute.component.html3
-rw-r--r--cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/dictionary-creation.service.ts2
-rw-r--r--cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/resource-dictionary-creation.component.ts11
3 files changed, 11 insertions, 5 deletions
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions-attribute/functions-attribute.component.html b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions-attribute/functions-attribute.component.html
index e619f3a88..a3e662d0f 100644
--- a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions-attribute/functions-attribute.component.html
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions-attribute/functions-attribute.component.html
@@ -237,6 +237,7 @@
<div class="row">
<div class="col-6" *ngFor="let file of getKeys(templateAndMappingMap)">
<a class="template-mapping-list float" [class.active]="selectedTemplates.has(file)">
+ <i *ngIf="selectedTemplates.has(file)" class="fa fa-check mx-1"></i>
<p (click)="setTemplate(file)">{{file}}</p>
<span *ngIf="getValue(file,templateAndMappingMap).isMapping">Mapping</span>
<span *ngIf="getValue(file,templateAndMappingMap).isTemplate">Template</span>
@@ -277,4 +278,4 @@
</div>
</div>
</div>
-</div>
+</div> \ No newline at end of file
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/dictionary-creation.service.ts b/cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/dictionary-creation.service.ts
index 445be2015..a1d614bc5 100644
--- a/cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/dictionary-creation.service.ts
+++ b/cds-ui/designer-client/src/app/modules/feature-modules/resource-dictionary/resource-dictionary-creation/dictionary-creation.service.ts
@@ -35,6 +35,6 @@ export class DictionaryCreationService {
}
save(metadata) {
- return this.api.post(ResourceDictionaryURLs.saveResourceDictionary, { ...metadata });
+ return this.api.post(ResourceDictionaryURLs.saveDictionary, { ...metadata });
}
}
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 c40679718..fb454ed1f 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
@@ -25,6 +25,7 @@ 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';
+import { ToastrService } from 'ngx-toastr';
@Component({
selector: 'app-resource-dictionary-creation',
@@ -36,7 +37,8 @@ export class ResourceDictionaryCreationComponent implements OnInit {
constructor(
private router: Router,
private dictionaryCreationStore: DictionaryCreationStore,
- private dictionaryService: DictionaryCreationService
+ private dictionaryService: DictionaryCreationService,
+ private toaster: ToastrService
) {
}
@@ -72,17 +74,20 @@ export class ResourceDictionaryCreationComponent implements OnInit {
}
createDictionary() {
+
console.log('-----');
this.metadataTabComponent.saveMetaDataToStore();
this.dictionaryCreationStore.state$.subscribe(res => {
console.log('---------------------------------------');
console.log(res);
this.dictionaryService.save(res.metaData).subscribe(data => {
-
+ this.toaster.success('Dictionary Resource created');
}, err => {
+ this.toaster.error('An error happened ...');
+ }, () => {
});
- });
+ }).unsubscribe();
// this.sourcesTemplateComponent.saveSorcesDataToStore();
}