diff --git a/components/ide/ide-ui-entity/src/main/resources/META-INF/dirigible/ide-entity/js/editor.js b/components/ide/ide-ui-entity/src/main/resources/META-INF/dirigible/ide-entity/js/editor.js index 4b0d1890036..afbdb1054fc 100644 --- a/components/ide/ide-ui-entity/src/main/resources/META-INF/dirigible/ide-entity/js/editor.js +++ b/components/ide/ide-ui-entity/src/main/resources/META-INF/dirigible/ide-entity/js/editor.js @@ -802,10 +802,10 @@ angular.module('ui.entity-data.modeler', ["ideUI", "ideView", "ideWorkspace", "i // Filter Entity ---------------------------------------------- // Adds sidebar icon for the filter entity object - let filterObject = new Entity('FilterEntityName'); - let filter = new mxCell(filterObject, new mxGeometry(0, 0, 200, 28), 'filter'); - filter.setVertex(true); - addSidebarIcon($scope.graph, sidebar, filter, ICON_FILTER, 'Drag this to the diagram to create a new Filter Entity', $scope); + let reportFilterObject = new Entity('ReportFilterEntityName'); + let reportFilter = new mxCell(reportFilterObject, new mxGeometry(0, 0, 200, 28), 'filter'); + reportFilter.setVertex(true); + addSidebarIcon($scope.graph, sidebar, reportFilter, ICON_FILTER, 'Drag this to the diagram to create a new Report Filter Entity', $scope); // Adds primary key field into entity firstProperty = property.clone(); @@ -814,7 +814,7 @@ angular.module('ui.entity-data.modeler', ["ideUI", "ideView", "ideWorkspace", "i firstProperty.value.dataLength = 0; firstProperty.value.dataPrimaryKey = 'true'; firstProperty.value.dataAutoIncrement = 'true'; - filter.insert(firstProperty); + reportFilter.insert(firstProperty); // Setting Entity ---------------------------------------------- diff --git a/components/ide/ide-ui-entity/src/main/resources/META-INF/dirigible/ide-entity/js/widgets.js b/components/ide/ide-ui-entity/src/main/resources/META-INF/dirigible/ide-entity/js/widgets.js index d346f2b3cc1..9c641a055fc 100644 --- a/components/ide/ide-ui-entity/src/main/resources/META-INF/dirigible/ide-entity/js/widgets.js +++ b/components/ide/ide-ui-entity/src/main/resources/META-INF/dirigible/ide-entity/js/widgets.js @@ -65,7 +65,7 @@ function addSidebarIcon(graph, sidebar, prototype, image, hint, $scope) { $scope.$cell.value.entityType = "REPORT"; } else if (prototype.style === 'filter') { $scope.$cell = graph.getSelectionCell(); - $scope.$cell.value.entityType = "FILTER"; + $scope.$cell.value.entityType = "REPORT_FILTER"; } else if (prototype.style === 'setting') { $scope.$cell = graph.getSelectionCell(); $scope.$cell.value.entityType = "SETTING"; diff --git a/components/ide/ide-ui-entity/src/main/resources/META-INF/dirigible/ide-entity/template/transformer-on-save.js b/components/ide/ide-ui-entity/src/main/resources/META-INF/dirigible/ide-entity/template/transformer-on-save.js index 9db253d079d..1b13cf806ca 100644 --- a/components/ide/ide-ui-entity/src/main/resources/META-INF/dirigible/ide-entity/template/transformer-on-save.js +++ b/components/ide/ide-ui-entity/src/main/resources/META-INF/dirigible/ide-entity/template/transformer-on-save.js @@ -9,19 +9,19 @@ * SPDX-FileCopyrightText: 2023 SAP SE or an SAP affiliate company and Eclipse Dirigible contributors * SPDX-License-Identifier: EPL-2.0 */ -let transformer = require("ide-entity/template/transform-edm"); -let workspaceManager = require("platform/workspace"); +const transformer = require("ide-entity/template/transform-edm"); +const workspaceManager = require("platform/workspace"); -let workspace = __context.get('workspace'); -let project = __context.get('project'); -let path = __context.get('path'); +const workspace = __context.get('workspace'); +const project = __context.get('project'); +const path = __context.get('path'); -let modelPath = path.replace(".edm", ".model"); -let content = transformer.transform(workspace, project, path); +const modelPath = path.replace(".edm", ".model"); +const content = transformer.transform(workspace, project, path); if (content !== null) { - let bytes = require("io/bytes"); - input = bytes.textToByteArray(content); + const bytes = require("io/bytes"); + const input = bytes.textToByteArray(content); if (workspaceManager.getWorkspace(workspace) .getProject(project).getFile(path).exists()) { diff --git a/components/template/template-application-ui-angular/src/main/resources/META-INF/dirigible/template-application-ui-angular/ui/perspective/report-table/dialog-window-filter/controller.js.template b/components/template/template-application-ui-angular/src/main/resources/META-INF/dirigible/template-application-ui-angular/ui/perspective/report-table/dialog-window-filter/controller.js.template index 7084f25b509..404b6dad4d0 100644 --- a/components/template/template-application-ui-angular/src/main/resources/META-INF/dirigible/template-application-ui-angular/ui/perspective/report-table/dialog-window-filter/controller.js.template +++ b/components/template/template-application-ui-angular/src/main/resources/META-INF/dirigible/template-application-ui-angular/ui/perspective/report-table/dialog-window-filter/controller.js.template @@ -26,8 +26,18 @@ angular.module('page', ["ideUI", "ideView", "entityApi"]) filter.${property.name} = new Date(filter.${property.name}); } #end +#end +#foreach ($property in $filter.properties) +#if($property.widgetType == "DROPDOWN") + ${dollar}scope.${property.name}Value = filter.${property.name}; +#end #end $scope.entity = filter; +#foreach ($property in $filter.properties) +#if($property.widgetType == "DROPDOWN") + ${dollar}scope.entity.${property.name} = undefined; +#end +#end } $scope.isValid = function (isValid, property) { @@ -80,6 +90,7 @@ angular.module('page', ["ideUI", "ideView", "entityApi"]) text: e.${property.widgetDropDownValue} } }); + ${dollar}scope.entity.${property.name} = ${dollar}scope.${property.name}Value; }); #end #end