Populating select field in forms
Change-Id: I78306706c4ad9560286d27fa1c2879916eb07614
diff --git a/src/app/datasources/helpers/store.helpers.ts b/src/app/datasources/helpers/store.helpers.ts
index aa18bd8..7792590 100644
--- a/src/app/datasources/helpers/store.helpers.ts
+++ b/src/app/datasources/helpers/store.helpers.ts
@@ -18,7 +18,15 @@
}
public urlFromCoreModel(name: string): string {
- return `/core/${pluralize(name.toLowerCase())}`;
+ switch (name) {
+ // FIXME handling exceptions, understand why these 3 endpoints are autogenerated with an _f
+ case 'SiteRole':
+ case 'SliceRole':
+ case 'SlicePrivilege':
+ return `/core/${pluralize(name.split(/(?=[A-Z])/).map(w => w.toLowerCase()).join('_'))}`;
+ default:
+ return `/core/${pluralize(name.toLowerCase())}`;
+ }
}
public updateCollection(event: IWSEvent, subject: BehaviorSubject<any>): BehaviorSubject<any> {