Update import-export.service.ts
This commit is contained in:
parent
5a4b2cf406
commit
b4f0190454
@ -399,7 +399,7 @@ export class ImportExportService {
|
|||||||
const saveWidgetTypesObservables: Array<Observable<WidgetTypeDetails>> = [];
|
const saveWidgetTypesObservables: Array<Observable<WidgetTypeDetails>> = [];
|
||||||
for (const widgetTypeDetails of widgetTypesDetails) {
|
for (const widgetTypeDetails of widgetTypesDetails) {
|
||||||
saveWidgetTypesObservables.push(
|
saveWidgetTypesObservables.push(
|
||||||
this.widgetService.saveImportedWidgetTypeDetails(this.prepareWidgetTypes(widgetTypeDetails, savedWidgetsBundle))
|
this.widgetService.saveImportedWidgetTypeDetails(this.prepareWidgetType(widgetTypeDetails, savedWidgetsBundle))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
widgetTypesObservable = forkJoin(saveWidgetTypesObservables);
|
widgetTypesObservable = forkJoin(saveWidgetTypesObservables);
|
||||||
@ -434,13 +434,13 @@ export class ImportExportService {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
private prepareWidgetTypes(widgetTypes: WidgetTypeDetails & {alias?: string}, widgetsBundle: WidgetsBundle): WidgetTypeDetails {
|
private prepareWidgetType(widgetType: WidgetTypeDetails & {alias?: string}, widgetsBundle: WidgetsBundle): WidgetTypeDetails {
|
||||||
if (!widgetTypes.fqn) {
|
if (!widgetType.fqn) {
|
||||||
widgetTypes.fqn = `${widgetsBundle.alias}.${widgetTypes.alias
|
widgetType.fqn = `${widgetsBundle.alias}.${widgetType.alias
|
||||||
? widgetTypes.alias
|
? widgetType.alias
|
||||||
: widgetTypes.name.toLowerCase().replace(/\W/g, '_')}`;
|
: widgetType.name.toLowerCase().replace(/\W/g, '_')}`;
|
||||||
}
|
}
|
||||||
return widgetTypes;
|
return widgetType;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bulkImportEntities(entitiesData: BulkImportRequest, entityType: EntityType, config?: RequestConfig): Observable<BulkImportResult> {
|
public bulkImportEntities(entitiesData: BulkImportRequest, entityType: EntityType, config?: RequestConfig): Observable<BulkImportResult> {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user