From d1ffe83752ff11a91950cb09293f49db9fdd652b Mon Sep 17 00:00:00 2001 From: StanZGenchev Date: Wed, 9 Apr 2025 19:43:18 +0300 Subject: [PATCH 1/3] Regenerated with new UI templates --- codbex-uoms/codbex-uoms.edm | 10 +- codbex-uoms/codbex-uoms.gen | 305 ++---------------- codbex-uoms/codbex-uoms.model | 47 ++- .../DimensionService.ts | 10 +- .../UoMService.ts | 10 +- .../gen/codbex-uoms/codbex-uoms.openapi | 52 +-- .../dao/Dimensions/Dimension.extensionpoint | 4 - .../dao/Settings/Dimension.extensionpoint | 4 + .../DimensionRepository.ts | 4 +- .../dao/Settings/UoM.extensionpoint | 4 + .../UoMRepository.ts | 4 +- .../dao/UnitsOfMeasures/UoM.extensionpoint | 4 - codbex-uoms/gen/codbex-uoms/index.html | 67 ---- .../ui/Dimensions/Dimension/controller.js | 163 ---------- .../Dimension/dialog-filter/controller.js | 68 ---- .../Dimension/dialog-filter/index.html | 88 ----- .../Dimension/dialog-filter/view.js | 17 - .../Dimension/dialog-window/controller.js | 69 ---- .../Dimension/dialog-window/index.html | 93 ------ .../Dimension/dialog-window/view.js | 17 - .../ui/Dimensions/Dimension/index.html | 73 ----- .../Dimension/tile-portal.extension | 6 - .../ui/Dimensions/Dimension/tile.extension | 6 - .../ui/Dimensions/Dimension/tile.js | 19 -- .../ui/Dimensions/Dimension/view.js | 19 -- .../gen/codbex-uoms/ui/Dimensions/index.html | 79 ----- .../Dimensions/perspective-portal.extension | 5 - .../ui/Dimensions/perspective.extension | 5 - .../codbex-uoms/ui/Dimensions/perspective.js | 18 -- .../ui/Settings/Dimension/controller.js | 181 +++++++++++ .../Dimension/dialog-filter/controller.js | 72 +++++ .../Dimension/dialog-filter/index.html | 75 +++++ .../Dimension/dialog-filter/view.extension | 4 +- .../Settings/Dimension/dialog-filter/view.js | 14 + .../Dimension/dialog-window/controller.js | 86 +++++ .../Dimension/dialog-window/index.html | 79 +++++ .../Dimension/dialog-window/view.extension | 4 +- .../Settings/Dimension/dialog-window/view.js | 14 + .../ui/Settings/Dimension/index.html | 69 ++++ .../Dimension/view.extension | 4 +- .../codbex-uoms/ui/Settings/Dimension/view.js | 17 + .../codbex-uoms/ui/Settings/UoM/controller.js | 214 ++++++++++++ .../Settings/UoM/dialog-filter/controller.js | 91 ++++++ .../ui/Settings/UoM/dialog-filter/index.html | 159 +++++++++ .../UoM/dialog-filter/view.extension | 4 +- .../ui/Settings/UoM/dialog-filter/view.js | 14 + .../Settings/UoM/dialog-window/controller.js | 118 +++++++ .../ui/Settings/UoM/dialog-window/index.html | 173 ++++++++++ .../Settings/UoM/dialog-window/view.extension | 6 + .../ui/Settings/UoM/dialog-window/view.js | 14 + .../codbex-uoms/ui/Settings/UoM/index.html | 86 +++++ .../UoM/view.extension | 4 +- .../gen/codbex-uoms/ui/Settings/UoM/view.js | 17 + .../ui/UnitsOfMeasures/UoM/controller.js | 197 ----------- .../UoM/dialog-filter/controller.js | 88 ----- .../UoM/dialog-filter/index.html | 176 ---------- .../UnitsOfMeasures/UoM/dialog-filter/view.js | 17 - .../UoM/dialog-window/controller.js | 91 ------ .../UoM/dialog-window/index.html | 200 ------------ .../UoM/dialog-window/view.extension | 6 - .../UnitsOfMeasures/UoM/dialog-window/view.js | 20 -- .../ui/UnitsOfMeasures/UoM/index.html | 71 ---- .../UoM/main-details/controller.js | 143 -------- .../UoM/main-details/index.html | 206 ------------ .../UoM/main-details/view.extension | 6 - .../UnitsOfMeasures/UoM/main-details/view.js | 19 -- .../UnitsOfMeasures/UoM/tile-portal.extension | 6 - .../ui/UnitsOfMeasures/UoM/tile.extension | 6 - .../ui/UnitsOfMeasures/UoM/tile.js | 19 -- .../ui/UnitsOfMeasures/UoM/view.js | 19 -- .../codbex-uoms/ui/UnitsOfMeasures/index.html | 79 ----- .../perspective-portal.extension | 5 - .../ui/UnitsOfMeasures/perspective.extension | 5 - .../ui/UnitsOfMeasures/perspective.js | 18 -- .../ui/launchpad/Home/controller.js | 167 ---------- .../codbex-uoms/ui/launchpad/Home/index.html | 212 ------------ .../codbex-uoms/ui/launchpad/Home/styles.css | 99 ------ .../codbex-uoms/ui/launchpad/Home/tiles.js | 95 ------ .../ui/launchpad/Home/view.extension | 5 - .../gen/codbex-uoms/ui/launchpad/Home/view.js | 19 -- .../ui/launchpad/dialog-window.extensionpoint | 4 - .../ui/launchpad/menu-help.extension | 5 - .../gen/codbex-uoms/ui/launchpad/menu-help.js | 87 ----- .../ui/launchpad/menu.extensionpoint | 4 - .../ui/launchpad/perspective.extension | 1 - .../ui/launchpad/perspective.extensionpoint | 4 - .../codbex-uoms/ui/launchpad/perspective.js | 18 -- .../ui/launchpad/tile.extensionpoint | 4 - .../ui/launchpad/view.extensionpoint | 4 - .../dimensions/navigation.extension | 6 - codbex-uoms/navigations/dimensions/service.js | 17 - .../navigations/uoms/navigation.extension | 6 - codbex-uoms/navigations/uoms/service.js | 17 - 93 files changed, 1615 insertions(+), 3345 deletions(-) rename codbex-uoms/gen/codbex-uoms/api/{Dimensions => Settings}/DimensionService.ts (94%) rename codbex-uoms/gen/codbex-uoms/api/{UnitsOfMeasures => Settings}/UoMService.ts (93%) delete mode 100644 codbex-uoms/gen/codbex-uoms/dao/Dimensions/Dimension.extensionpoint create mode 100644 codbex-uoms/gen/codbex-uoms/dao/Settings/Dimension.extensionpoint rename codbex-uoms/gen/codbex-uoms/dao/{Dimensions => Settings}/DimensionRepository.ts (97%) create mode 100644 codbex-uoms/gen/codbex-uoms/dao/Settings/UoM.extensionpoint rename codbex-uoms/gen/codbex-uoms/dao/{UnitsOfMeasures => Settings}/UoMRepository.ts (98%) delete mode 100644 codbex-uoms/gen/codbex-uoms/dao/UnitsOfMeasures/UoM.extensionpoint delete mode 100644 codbex-uoms/gen/codbex-uoms/index.html delete mode 100644 codbex-uoms/gen/codbex-uoms/ui/Dimensions/Dimension/controller.js delete mode 100644 codbex-uoms/gen/codbex-uoms/ui/Dimensions/Dimension/dialog-filter/controller.js delete mode 100644 codbex-uoms/gen/codbex-uoms/ui/Dimensions/Dimension/dialog-filter/index.html delete mode 100644 codbex-uoms/gen/codbex-uoms/ui/Dimensions/Dimension/dialog-filter/view.js delete mode 100644 codbex-uoms/gen/codbex-uoms/ui/Dimensions/Dimension/dialog-window/controller.js delete mode 100644 codbex-uoms/gen/codbex-uoms/ui/Dimensions/Dimension/dialog-window/index.html delete mode 100644 codbex-uoms/gen/codbex-uoms/ui/Dimensions/Dimension/dialog-window/view.js delete mode 100644 codbex-uoms/gen/codbex-uoms/ui/Dimensions/Dimension/index.html delete mode 100644 codbex-uoms/gen/codbex-uoms/ui/Dimensions/Dimension/tile-portal.extension delete mode 100644 codbex-uoms/gen/codbex-uoms/ui/Dimensions/Dimension/tile.extension delete mode 100644 codbex-uoms/gen/codbex-uoms/ui/Dimensions/Dimension/tile.js delete mode 100644 codbex-uoms/gen/codbex-uoms/ui/Dimensions/Dimension/view.js delete mode 100644 codbex-uoms/gen/codbex-uoms/ui/Dimensions/index.html delete mode 100644 codbex-uoms/gen/codbex-uoms/ui/Dimensions/perspective-portal.extension delete mode 100644 codbex-uoms/gen/codbex-uoms/ui/Dimensions/perspective.extension delete mode 100644 codbex-uoms/gen/codbex-uoms/ui/Dimensions/perspective.js create mode 100644 codbex-uoms/gen/codbex-uoms/ui/Settings/Dimension/controller.js create mode 100644 codbex-uoms/gen/codbex-uoms/ui/Settings/Dimension/dialog-filter/controller.js create mode 100644 codbex-uoms/gen/codbex-uoms/ui/Settings/Dimension/dialog-filter/index.html rename codbex-uoms/gen/codbex-uoms/ui/{Dimensions => Settings}/Dimension/dialog-filter/view.extension (54%) create mode 100644 codbex-uoms/gen/codbex-uoms/ui/Settings/Dimension/dialog-filter/view.js create mode 100644 codbex-uoms/gen/codbex-uoms/ui/Settings/Dimension/dialog-window/controller.js create mode 100644 codbex-uoms/gen/codbex-uoms/ui/Settings/Dimension/dialog-window/index.html rename codbex-uoms/gen/codbex-uoms/ui/{Dimensions => Settings}/Dimension/dialog-window/view.extension (54%) create mode 100644 codbex-uoms/gen/codbex-uoms/ui/Settings/Dimension/dialog-window/view.js create mode 100644 codbex-uoms/gen/codbex-uoms/ui/Settings/Dimension/index.html rename codbex-uoms/gen/codbex-uoms/ui/{Dimensions => Settings}/Dimension/view.extension (56%) create mode 100644 codbex-uoms/gen/codbex-uoms/ui/Settings/Dimension/view.js create mode 100644 codbex-uoms/gen/codbex-uoms/ui/Settings/UoM/controller.js create mode 100644 codbex-uoms/gen/codbex-uoms/ui/Settings/UoM/dialog-filter/controller.js create mode 100644 codbex-uoms/gen/codbex-uoms/ui/Settings/UoM/dialog-filter/index.html rename codbex-uoms/gen/codbex-uoms/ui/{UnitsOfMeasures => Settings}/UoM/dialog-filter/view.extension (55%) create mode 100644 codbex-uoms/gen/codbex-uoms/ui/Settings/UoM/dialog-filter/view.js create mode 100644 codbex-uoms/gen/codbex-uoms/ui/Settings/UoM/dialog-window/controller.js create mode 100644 codbex-uoms/gen/codbex-uoms/ui/Settings/UoM/dialog-window/index.html create mode 100644 codbex-uoms/gen/codbex-uoms/ui/Settings/UoM/dialog-window/view.extension create mode 100644 codbex-uoms/gen/codbex-uoms/ui/Settings/UoM/dialog-window/view.js create mode 100644 codbex-uoms/gen/codbex-uoms/ui/Settings/UoM/index.html rename codbex-uoms/gen/codbex-uoms/ui/{UnitsOfMeasures => Settings}/UoM/view.extension (56%) create mode 100644 codbex-uoms/gen/codbex-uoms/ui/Settings/UoM/view.js delete mode 100644 codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/controller.js delete mode 100644 codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/dialog-filter/controller.js delete mode 100644 codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/dialog-filter/index.html delete mode 100644 codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/dialog-filter/view.js delete mode 100644 codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/dialog-window/controller.js delete mode 100644 codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/dialog-window/index.html delete mode 100644 codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/dialog-window/view.extension delete mode 100644 codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/dialog-window/view.js delete mode 100644 codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/index.html delete mode 100644 codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/main-details/controller.js delete mode 100644 codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/main-details/index.html delete mode 100644 codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/main-details/view.extension delete mode 100644 codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/main-details/view.js delete mode 100644 codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/tile-portal.extension delete mode 100644 codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/tile.extension delete mode 100644 codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/tile.js delete mode 100644 codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/view.js delete mode 100644 codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/index.html delete mode 100644 codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/perspective-portal.extension delete mode 100644 codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/perspective.extension delete mode 100644 codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/perspective.js delete mode 100644 codbex-uoms/gen/codbex-uoms/ui/launchpad/Home/controller.js delete mode 100644 codbex-uoms/gen/codbex-uoms/ui/launchpad/Home/index.html delete mode 100644 codbex-uoms/gen/codbex-uoms/ui/launchpad/Home/styles.css delete mode 100644 codbex-uoms/gen/codbex-uoms/ui/launchpad/Home/tiles.js delete mode 100644 codbex-uoms/gen/codbex-uoms/ui/launchpad/Home/view.extension delete mode 100644 codbex-uoms/gen/codbex-uoms/ui/launchpad/Home/view.js delete mode 100644 codbex-uoms/gen/codbex-uoms/ui/launchpad/dialog-window.extensionpoint delete mode 100644 codbex-uoms/gen/codbex-uoms/ui/launchpad/menu-help.extension delete mode 100644 codbex-uoms/gen/codbex-uoms/ui/launchpad/menu-help.js delete mode 100644 codbex-uoms/gen/codbex-uoms/ui/launchpad/menu.extensionpoint delete mode 100644 codbex-uoms/gen/codbex-uoms/ui/launchpad/perspective.extension delete mode 100644 codbex-uoms/gen/codbex-uoms/ui/launchpad/perspective.extensionpoint delete mode 100644 codbex-uoms/gen/codbex-uoms/ui/launchpad/perspective.js delete mode 100644 codbex-uoms/gen/codbex-uoms/ui/launchpad/tile.extensionpoint delete mode 100644 codbex-uoms/gen/codbex-uoms/ui/launchpad/view.extensionpoint delete mode 100644 codbex-uoms/navigations/dimensions/navigation.extension delete mode 100644 codbex-uoms/navigations/dimensions/service.js delete mode 100644 codbex-uoms/navigations/uoms/navigation.extension delete mode 100644 codbex-uoms/navigations/uoms/service.js diff --git a/codbex-uoms/codbex-uoms.edm b/codbex-uoms/codbex-uoms.edm index 8b38911..d142ad2 100644 --- a/codbex-uoms/codbex-uoms.edm +++ b/codbex-uoms/codbex-uoms.edm @@ -1,11 +1,11 @@ - + - + @@ -16,14 +16,12 @@ - + - UnitsOfMeasures/services/web/resources/unicons/arrows-resize-v.svg980 - Dimensions/services/web/resources/unicons/align-center-h.svg990 - + \ No newline at end of file diff --git a/codbex-uoms/codbex-uoms.gen b/codbex-uoms/codbex-uoms.gen index ee746ad..9f2a1bd 100644 --- a/codbex-uoms/codbex-uoms.gen +++ b/codbex-uoms/codbex-uoms.gen @@ -4,58 +4,9 @@ "brandUrl": "https://www.codbex.com/", "title": "UoM Management Application", "description": "Managing UoMs data", - "projectName": "codbex-uoms", - "workspaceName": "workspace", - "filePath": "codbex-uoms.model", - "templateId": "template-application-angular/template/template.js", "fileName": "codbex-uoms", "genFolderName": "codbex-uoms", "dataSource": "DefaultDB", - "perspectives": { - "Dimensions": { - "views": [ - "Dimension" - ], - "name": "Dimensions", - "label": "Dimensions", - "order": "990", - "icon": "/services/web/resources/unicons/align-center-h.svg", - "role": "" - }, - "UnitsOfMeasures": { - "views": [ - "UoM", - "UoM-details", - "UoM-details", - "UoM-details", - "UoM-details", - "UoM-details", - "UoM-details", - "UoM-details", - "UoM-details", - "UoM-details", - "UoM-details", - "UoM-details", - "UoM-details", - "UoM-details", - "UoM-details", - "UoM-details", - "UoM-details", - "UoM-details", - "UoM-details", - "UoM-details", - "UoM-details", - "UoM-details", - "UoM-details", - "UoM-details" - ], - "name": "UnitsOfMeasures", - "label": "UnitsOfMeasures", - "order": "980", - "icon": "/services/web/resources/unicons/arrows-resize-v.svg", - "role": "" - } - }, "roles": [ { "entityName": "Dimension", @@ -68,6 +19,25 @@ "roleWrite": "codbex-uoms.UnitsOfMeasures.UoMFullAccess" } ], + "projectName": "codbex-uoms", + "workspaceName": "workspace", + "filePath": "codbex-uoms.model", + "templateId": "template-application-angular/template/template.js", + "perspectives": { + "Settings": { + "views": [ + "Dimension", + "UoM" + ], + "name": "Settings", + "label": "Settings", + "header": "", + "order": "970", + "navId": "", + "icon": "cubes", + "role": "" + } + }, "models": [ { "properties": [ @@ -152,19 +122,20 @@ "dataName": "DIMENSION", "dataQuery": "", "description": "Manage entity Dimension", + "feedPassword": "YWRtaW4=", + "feedUsername": "YWRtaW4=", "generateDefaultRoles": "true", "generateReport": "false", "icon": "cube", - "layoutType": "MANAGE", "menuIndex": "100", "menuKey": "dimension", "menuLabel": "Dimension", "name": "Dimension", - "navigationPath": "/Home", - "perspectiveIcon": "/services/web/resources/unicons/align-center-h.svg", - "perspectiveLabel": "Dimensions", - "perspectiveName": "Dimensions", - "perspectiveOrder": "990", + "perspectiveHeader": "", + "perspectiveIcon": "cubes", + "perspectiveName": "Settings", + "perspectiveNavId": "", + "perspectiveOrder": "970", "perspectiveRole": "", "roleRead": "codbex-uoms.Dimensions.DimensionReadOnly", "roleWrite": "codbex-uoms.Dimensions.DimensionFullAccess", @@ -270,7 +241,7 @@ "widgetType": "DROPDOWN", "relationshipName": "UoM_Dimension", "relationshipEntityName": "Dimension", - "relationshipEntityPerspectiveName": "Dimensions", + "relationshipEntityPerspectiveName": "Settings", "relationshipEntityPerspectiveLabel": "Entities", "dataNotNull": false, "dataAutoIncrement": false, @@ -279,7 +250,7 @@ "isRequiredProperty": false, "isCalculatedProperty": false, "widgetLabel": "Dimension", - "widgetDropdownUrl": "/services/ts/codbex-uoms/gen/codbex-uoms/api/Dimensions/DimensionService.ts", + "widgetDropdownUrl": "/services/ts/codbex-uoms/gen/codbex-uoms/api/Settings/DimensionService.ts", "dataTypeJava": "int", "dataTypeTypescript": "number", "inputRule": "" @@ -412,19 +383,20 @@ "dataName": "UOM", "dataQuery": "", "description": "Manage entity UoM", + "feedPassword": "YWRtaW4=", + "feedUsername": "YWRtaW4=", "generateDefaultRoles": "true", "generateReport": "false", "icon": "cubes", - "layoutType": "MANAGE_MASTER", "menuIndex": "100", "menuKey": "uom", "menuLabel": "UoM", "name": "UoM", - "navigationPath": "/Home", - "perspectiveIcon": "/services/web/resources/unicons/arrows-resize-v.svg", - "perspectiveLabel": "Units of Measures", - "perspectiveName": "UnitsOfMeasures", - "perspectiveOrder": "980", + "perspectiveHeader": "", + "perspectiveIcon": "cubes", + "perspectiveName": "Settings", + "perspectiveNavId": "", + "perspectiveOrder": "970", "perspectiveRole": "", "roleRead": "codbex-uoms.UnitsOfMeasures.UoMReadOnly", "roleWrite": "codbex-uoms.UnitsOfMeasures.UoMFullAccess", @@ -437,213 +409,6 @@ "Id" ], "primaryKeysString": "Id", - "masterProperties": { - "title": { - "dataLength": "100", - "dataName": "UOM_NAME", - "dataNullable": true, - "dataType": "VARCHAR", - "description": "", - "name": "Name", - "tooltip": "", - "widgetIsMajor": true, - "widgetLength": "100", - "widgetSize": "fd-col-md--4 fd-col--6", - "widgetType": "TEXTBOX", - "dataNotNull": false, - "dataAutoIncrement": false, - "dataPrimaryKey": false, - "dataUnique": false, - "isRequiredProperty": false, - "isCalculatedProperty": false, - "widgetLabel": "Name", - "widgetDropdownUrl": "", - "dataTypeJava": "string", - "dataTypeTypescript": "string", - "minLength": 0, - "maxLength": 100, - "inputRule": "" - }, - "properties": [ - { - "dataLength": "20", - "dataName": "UOM_ISO", - "dataNullable": true, - "dataType": "VARCHAR", - "description": "", - "name": "ISO", - "tooltip": "", - "widgetIsMajor": true, - "widgetLength": "20", - "widgetSize": "", - "widgetType": "TEXTBOX", - "dataNotNull": false, - "dataAutoIncrement": false, - "dataPrimaryKey": false, - "dataUnique": false, - "isRequiredProperty": false, - "isCalculatedProperty": false, - "widgetLabel": "ISO", - "widgetDropdownUrl": "", - "dataTypeJava": "string", - "dataTypeTypescript": "string", - "minLength": 0, - "maxLength": 20, - "inputRule": "" - }, - { - "dataName": "UOM_DIMENSION", - "dataNullable": true, - "dataType": "INTEGER", - "description": "", - "name": "Dimension", - "tooltip": "", - "widgetDropDownKey": "Id", - "widgetDropDownValue": "Name", - "widgetIsMajor": true, - "widgetLength": "20", - "widgetSize": "", - "widgetType": "DROPDOWN", - "relationshipName": "UoM_Dimension", - "relationshipEntityName": "Dimension", - "relationshipEntityPerspectiveName": "Dimensions", - "relationshipEntityPerspectiveLabel": "Entities", - "dataNotNull": false, - "dataAutoIncrement": false, - "dataPrimaryKey": false, - "dataUnique": false, - "isRequiredProperty": false, - "isCalculatedProperty": false, - "widgetLabel": "Dimension", - "widgetDropdownUrl": "/services/ts/codbex-uoms/gen/codbex-uoms/api/Dimensions/DimensionService.ts", - "dataTypeJava": "int", - "dataTypeTypescript": "number", - "inputRule": "" - }, - { - "dataLength": "20", - "dataName": "UOM_SAP", - "dataNullable": true, - "dataType": "VARCHAR", - "description": "", - "name": "SAP", - "tooltip": "", - "widgetDependsOnEntity": "Dimension", - "widgetDependsOnFilterBy": "Dimension", - "widgetDependsOnProperty": "Dimension", - "widgetDependsOnValueFrom": "SAP", - "widgetIsMajor": true, - "widgetLength": "20", - "widgetSize": "", - "widgetType": "TEXTBOX", - "dataNotNull": false, - "dataAutoIncrement": false, - "dataPrimaryKey": false, - "dataUnique": false, - "isRequiredProperty": false, - "isCalculatedProperty": false, - "widgetLabel": "SAP", - "widgetDropdownUrl": "", - "dataTypeJava": "string", - "dataTypeTypescript": "string", - "minLength": 0, - "maxLength": 20, - "inputRule": "" - }, - { - "dataName": "UOM_NUMERATOR", - "dataNullable": true, - "dataType": "BIGINT", - "description": "", - "name": "Numerator", - "tooltip": "", - "widgetIsMajor": true, - "widgetLength": "20", - "widgetSize": "fd-col-md--4 fd-col--6", - "widgetType": "NUMBER", - "dataNotNull": false, - "dataAutoIncrement": false, - "dataPrimaryKey": false, - "dataUnique": false, - "isRequiredProperty": false, - "isCalculatedProperty": false, - "widgetLabel": "Numerator", - "widgetDropdownUrl": "", - "dataTypeJava": "long", - "dataTypeTypescript": "number", - "inputRule": "" - }, - { - "dataName": "UOM_DENOMINATOR", - "dataNullable": true, - "dataType": "BIGINT", - "description": "", - "name": "Denominator", - "tooltip": "", - "widgetIsMajor": true, - "widgetLength": "20", - "widgetSize": "fd-col-md--4 fd-col--6", - "widgetType": "NUMBER", - "dataNotNull": false, - "dataAutoIncrement": false, - "dataPrimaryKey": false, - "dataUnique": false, - "isRequiredProperty": false, - "isCalculatedProperty": false, - "widgetLabel": "Denominator", - "widgetDropdownUrl": "", - "dataTypeJava": "long", - "dataTypeTypescript": "number", - "inputRule": "" - }, - { - "dataName": "UOM_ROUNDING", - "dataNullable": true, - "dataType": "INTEGER", - "description": "", - "name": "Rounding", - "tooltip": "", - "widgetIsMajor": true, - "widgetLength": "20", - "widgetSize": "fd-col-md--2 fd-col--3", - "widgetType": "NUMBER", - "dataNotNull": false, - "dataAutoIncrement": false, - "dataPrimaryKey": false, - "dataUnique": false, - "isRequiredProperty": false, - "isCalculatedProperty": false, - "widgetLabel": "Rounding", - "widgetDropdownUrl": "", - "dataTypeJava": "int", - "dataTypeTypescript": "number", - "inputRule": "" - }, - { - "dataName": "UOM_BASE", - "dataNullable": true, - "dataType": "BOOLEAN", - "description": "", - "name": "Base", - "tooltip": "", - "widgetIsMajor": true, - "widgetLength": "20", - "widgetSize": "fd-col-md--2 fd-col--3", - "widgetType": "CHECKBOX", - "dataNotNull": false, - "dataAutoIncrement": false, - "dataPrimaryKey": false, - "dataUnique": false, - "isRequiredProperty": false, - "isCalculatedProperty": false, - "widgetLabel": "Base", - "widgetDropdownUrl": "", - "dataTypeJava": "boolean", - "dataTypeTypescript": "boolean", - "inputRule": "" - } - ] - }, "hasDropdowns": true } ] diff --git a/codbex-uoms/codbex-uoms.model b/codbex-uoms/codbex-uoms.model index a1111ba..9b5053e 100644 --- a/codbex-uoms/codbex-uoms.model +++ b/codbex-uoms/codbex-uoms.model @@ -50,6 +50,8 @@ "dataName": "DIMENSION", "dataQuery": "", "description": "Manage entity Dimension", + "feedPassword": "YWRtaW4=", + "feedUsername": "YWRtaW4=", "generateDefaultRoles": "true", "generateReport": "false", "icon": "cube", @@ -58,11 +60,12 @@ "menuKey": "dimension", "menuLabel": "Dimension", "name": "Dimension", - "navigationPath": "/Home", - "perspectiveIcon": "/services/web/resources/unicons/align-center-h.svg", - "perspectiveLabel": "Dimensions", - "perspectiveName": "Dimensions", - "perspectiveOrder": "990", + "perspectiveHeader": "", + "perspectiveIcon": "cubes", + "perspectiveLabel": "Entities", + "perspectiveName": "Settings", + "perspectiveNavId": "", + "perspectiveOrder": "970", "perspectiveRole": "", "roleRead": "codbex-uoms.Dimensions.DimensionReadOnly", "roleWrite": "codbex-uoms.Dimensions.DimensionFullAccess", @@ -127,7 +130,7 @@ "widgetType": "DROPDOWN", "relationshipName": "UoM_Dimension", "relationshipEntityName": "Dimension", - "relationshipEntityPerspectiveName": "Dimensions", + "relationshipEntityPerspectiveName": "Settings", "relationshipEntityPerspectiveLabel": "Entities" }, { @@ -201,19 +204,22 @@ "dataName": "UOM", "dataQuery": "", "description": "Manage entity UoM", + "feedPassword": "YWRtaW4=", + "feedUsername": "YWRtaW4=", "generateDefaultRoles": "true", "generateReport": "false", "icon": "cubes", - "layoutType": "MANAGE_MASTER", + "layoutType": "", "menuIndex": "100", "menuKey": "uom", "menuLabel": "UoM", "name": "UoM", - "navigationPath": "/Home", - "perspectiveIcon": "/services/web/resources/unicons/arrows-resize-v.svg", - "perspectiveLabel": "Units of Measures", - "perspectiveName": "UnitsOfMeasures", - "perspectiveOrder": "980", + "perspectiveHeader": "", + "perspectiveIcon": "cubes", + "perspectiveLabel": "", + "perspectiveName": "Settings", + "perspectiveNavId": "", + "perspectiveOrder": "970", "perspectiveRole": "", "roleRead": "codbex-uoms.UnitsOfMeasures.UoMReadOnly", "roleWrite": "codbex-uoms.UnitsOfMeasures.UoMFullAccess", @@ -222,22 +228,7 @@ "type": "SETTING" } ], - "perspectives": [ - { - "name": "UnitsOfMeasures", - "label": "Units of Measures", - "icon": "/services/web/resources/unicons/arrows-resize-v.svg", - "order": "980", - "role": {} - }, - { - "name": "Dimensions", - "label": "Dimensions", - "icon": "/services/web/resources/unicons/align-center-h.svg", - "order": "990", - "role": {} - } - ], + "perspectives": [], "navigations": [] } } \ No newline at end of file diff --git a/codbex-uoms/gen/codbex-uoms/api/Dimensions/DimensionService.ts b/codbex-uoms/gen/codbex-uoms/api/Settings/DimensionService.ts similarity index 94% rename from codbex-uoms/gen/codbex-uoms/api/Dimensions/DimensionService.ts rename to codbex-uoms/gen/codbex-uoms/api/Settings/DimensionService.ts index fc956ff..c8b02d0 100644 --- a/codbex-uoms/gen/codbex-uoms/api/Dimensions/DimensionService.ts +++ b/codbex-uoms/gen/codbex-uoms/api/Settings/DimensionService.ts @@ -1,12 +1,12 @@ import { Controller, Get, Post, Put, Delete, response } from "sdk/http" import { Extensions } from "sdk/extensions" -import { DimensionRepository, DimensionEntityOptions } from "../../dao/Dimensions/DimensionRepository"; +import { DimensionRepository, DimensionEntityOptions } from "../../dao/Settings/DimensionRepository"; import { user } from "sdk/security" import { ForbiddenError } from "../utils/ForbiddenError"; import { ValidationError } from "../utils/ValidationError"; import { HttpUtils } from "../utils/HttpUtils"; -const validationModules = await Extensions.loadExtensionModules("codbex-uoms-Dimensions-Dimension", ["validate"]); +const validationModules = await Extensions.loadExtensionModules("codbex-uoms-Settings-Dimension", ["validate"]); @Controller class DimensionService { @@ -34,7 +34,7 @@ class DimensionService { this.checkPermissions("write"); this.validateEntity(entity); entity.Id = this.repository.create(entity); - response.setHeader("Content-Location", "/services/ts/codbex-uoms/gen/codbex-uoms/api/Dimensions/DimensionService.ts/" + entity.Id); + response.setHeader("Content-Location", "/services/ts/codbex-uoms/gen/codbex-uoms/api/Settings/DimensionService.ts/" + entity.Id); response.setStatus(response.CREATED); return entity; } catch (error: any) { @@ -46,7 +46,7 @@ class DimensionService { public count() { try { this.checkPermissions("read"); - return this.repository.count(); + return { count: this.repository.count() }; } catch (error: any) { this.handleError(error); } @@ -56,7 +56,7 @@ class DimensionService { public countWithFilter(filter: any) { try { this.checkPermissions("read"); - return this.repository.count(filter); + return { count: this.repository.count(filter) }; } catch (error: any) { this.handleError(error); } diff --git a/codbex-uoms/gen/codbex-uoms/api/UnitsOfMeasures/UoMService.ts b/codbex-uoms/gen/codbex-uoms/api/Settings/UoMService.ts similarity index 93% rename from codbex-uoms/gen/codbex-uoms/api/UnitsOfMeasures/UoMService.ts rename to codbex-uoms/gen/codbex-uoms/api/Settings/UoMService.ts index 5cc10ca..f354ef2 100644 --- a/codbex-uoms/gen/codbex-uoms/api/UnitsOfMeasures/UoMService.ts +++ b/codbex-uoms/gen/codbex-uoms/api/Settings/UoMService.ts @@ -1,12 +1,12 @@ import { Controller, Get, Post, Put, Delete, response } from "sdk/http" import { Extensions } from "sdk/extensions" -import { UoMRepository, UoMEntityOptions } from "../../dao/UnitsOfMeasures/UoMRepository"; +import { UoMRepository, UoMEntityOptions } from "../../dao/Settings/UoMRepository"; import { user } from "sdk/security" import { ForbiddenError } from "../utils/ForbiddenError"; import { ValidationError } from "../utils/ValidationError"; import { HttpUtils } from "../utils/HttpUtils"; -const validationModules = await Extensions.loadExtensionModules("codbex-uoms-UnitsOfMeasures-UoM", ["validate"]); +const validationModules = await Extensions.loadExtensionModules("codbex-uoms-Settings-UoM", ["validate"]); @Controller class UoMService { @@ -34,7 +34,7 @@ class UoMService { this.checkPermissions("write"); this.validateEntity(entity); entity.Id = this.repository.create(entity); - response.setHeader("Content-Location", "/services/ts/codbex-uoms/gen/codbex-uoms/api/UnitsOfMeasures/UoMService.ts/" + entity.Id); + response.setHeader("Content-Location", "/services/ts/codbex-uoms/gen/codbex-uoms/api/Settings/UoMService.ts/" + entity.Id); response.setStatus(response.CREATED); return entity; } catch (error: any) { @@ -46,7 +46,7 @@ class UoMService { public count() { try { this.checkPermissions("read"); - return this.repository.count(); + return { count: this.repository.count() }; } catch (error: any) { this.handleError(error); } @@ -56,7 +56,7 @@ class UoMService { public countWithFilter(filter: any) { try { this.checkPermissions("read"); - return this.repository.count(filter); + return { count: this.repository.count(filter) }; } catch (error: any) { this.handleError(error); } diff --git a/codbex-uoms/gen/codbex-uoms/codbex-uoms.openapi b/codbex-uoms/gen/codbex-uoms/codbex-uoms.openapi index ddb3be3..7c3cfb2 100644 --- a/codbex-uoms/gen/codbex-uoms/codbex-uoms.openapi +++ b/codbex-uoms/gen/codbex-uoms/codbex-uoms.openapi @@ -9,10 +9,10 @@ externalDocs: servers: - url: /services/ts tags: - - name: Dimensions - - name: UnitsOfMeasures + - name: Settings + - name: Settings paths: - /codbex-uoms/gen/codbex-uoms/api/Dimensions/DimensionService.ts: + /codbex-uoms/gen/codbex-uoms/api/Settings/DimensionService.ts: get: summary: List Dimension parameters: @@ -33,7 +33,7 @@ paths: type: integer allowEmptyValue: true tags: - - Dimensions + - Settings responses: 200: description: Successful Request @@ -64,7 +64,7 @@ paths: post: summary: Create Dimension tags: - - Dimensions + - Settings requestBody: content: application/json: @@ -96,7 +96,7 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' - /codbex-uoms/gen/codbex-uoms/api/Dimensions/DimensionService.ts/{id}: + /codbex-uoms/gen/codbex-uoms/api/Settings/DimensionService.ts/{id}: get: summary: Get Dimension by Id parameters: @@ -107,7 +107,7 @@ paths: schema: type: string tags: - - Dimensions + - Settings responses: 200: description: Successful Request @@ -145,7 +145,7 @@ paths: schema: type: string tags: - - Dimensions + - Settings requestBody: content: application/json: @@ -193,7 +193,7 @@ paths: schema: type: string tags: - - Dimensions + - Settings responses: 204: description: Successful Request @@ -215,11 +215,11 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' - /codbex-uoms/gen/codbex-uoms/api/Dimensions/DimensionService.ts/count: + /codbex-uoms/gen/codbex-uoms/api/Settings/DimensionService.ts/count: get: summary: Count the number of Dimension tags: - - Dimensions + - Settings responses: 200: description: Successful Request @@ -243,7 +243,7 @@ paths: post: summary: Count the number of Dimension by DimensionFilterOptions tags: - - Dimensions + - Settings requestBody: content: application/json: @@ -327,11 +327,11 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' - /codbex-uoms/gen/codbex-uoms/api/Dimensions/DimensionService.ts/search: + /codbex-uoms/gen/codbex-uoms/api/Settings/DimensionService.ts/search: post: summary: Search Dimension by DimensionFilterOptions tags: - - Dimensions + - Settings requestBody: content: application/json: @@ -416,7 +416,7 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' - /codbex-uoms/gen/codbex-uoms/api/UnitsOfMeasures/UoMService.ts: + /codbex-uoms/gen/codbex-uoms/api/Settings/UoMService.ts: get: summary: List UoM parameters: @@ -437,7 +437,7 @@ paths: type: integer allowEmptyValue: true tags: - - UnitsOfMeasures + - Settings responses: 200: description: Successful Request @@ -468,7 +468,7 @@ paths: post: summary: Create UoM tags: - - UnitsOfMeasures + - Settings requestBody: content: application/json: @@ -500,7 +500,7 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' - /codbex-uoms/gen/codbex-uoms/api/UnitsOfMeasures/UoMService.ts/{id}: + /codbex-uoms/gen/codbex-uoms/api/Settings/UoMService.ts/{id}: get: summary: Get UoM by Id parameters: @@ -511,7 +511,7 @@ paths: schema: type: string tags: - - UnitsOfMeasures + - Settings responses: 200: description: Successful Request @@ -549,7 +549,7 @@ paths: schema: type: string tags: - - UnitsOfMeasures + - Settings requestBody: content: application/json: @@ -597,7 +597,7 @@ paths: schema: type: string tags: - - UnitsOfMeasures + - Settings responses: 204: description: Successful Request @@ -619,11 +619,11 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' - /codbex-uoms/gen/codbex-uoms/api/UnitsOfMeasures/UoMService.ts/count: + /codbex-uoms/gen/codbex-uoms/api/Settings/UoMService.ts/count: get: summary: Count the number of UoM tags: - - UnitsOfMeasures + - Settings responses: 200: description: Successful Request @@ -647,7 +647,7 @@ paths: post: summary: Count the number of UoM by UoMFilterOptions tags: - - UnitsOfMeasures + - Settings requestBody: content: application/json: @@ -733,11 +733,11 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' - /codbex-uoms/gen/codbex-uoms/api/UnitsOfMeasures/UoMService.ts/search: + /codbex-uoms/gen/codbex-uoms/api/Settings/UoMService.ts/search: post: summary: Search UoM by UoMFilterOptions tags: - - UnitsOfMeasures + - Settings requestBody: content: application/json: diff --git a/codbex-uoms/gen/codbex-uoms/dao/Dimensions/Dimension.extensionpoint b/codbex-uoms/gen/codbex-uoms/dao/Dimensions/Dimension.extensionpoint deleted file mode 100644 index f270a4b..0000000 --- a/codbex-uoms/gen/codbex-uoms/dao/Dimensions/Dimension.extensionpoint +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "codbex-uoms-Dimensions-Dimension", - "description": "Extension Point for the codbex-uoms-Dimensions-Dimension entity" -} \ No newline at end of file diff --git a/codbex-uoms/gen/codbex-uoms/dao/Settings/Dimension.extensionpoint b/codbex-uoms/gen/codbex-uoms/dao/Settings/Dimension.extensionpoint new file mode 100644 index 0000000..78ace43 --- /dev/null +++ b/codbex-uoms/gen/codbex-uoms/dao/Settings/Dimension.extensionpoint @@ -0,0 +1,4 @@ +{ + "name": "codbex-uoms-Settings-Dimension", + "description": "Extension Point for the codbex-uoms-Settings-Dimension entity" +} \ No newline at end of file diff --git a/codbex-uoms/gen/codbex-uoms/dao/Dimensions/DimensionRepository.ts b/codbex-uoms/gen/codbex-uoms/dao/Settings/DimensionRepository.ts similarity index 97% rename from codbex-uoms/gen/codbex-uoms/dao/Dimensions/DimensionRepository.ts rename to codbex-uoms/gen/codbex-uoms/dao/Settings/DimensionRepository.ts index 3495c59..1fb1d05 100644 --- a/codbex-uoms/gen/codbex-uoms/dao/Dimensions/DimensionRepository.ts +++ b/codbex-uoms/gen/codbex-uoms/dao/Settings/DimensionRepository.ts @@ -197,7 +197,7 @@ export class DimensionRepository { } private async triggerEvent(data: DimensionEntityEvent | DimensionUpdateEntityEvent) { - const triggerExtensions = await extensions.loadExtensionModules("codbex-uoms-Dimensions-Dimension", ["trigger"]); + const triggerExtensions = await extensions.loadExtensionModules("codbex-uoms-Settings-Dimension", ["trigger"]); triggerExtensions.forEach(triggerExtension => { try { triggerExtension.trigger(data); @@ -205,6 +205,6 @@ export class DimensionRepository { console.error(error); } }); - producer.topic("codbex-uoms-Dimensions-Dimension").send(JSON.stringify(data)); + producer.topic("codbex-uoms-Settings-Dimension").send(JSON.stringify(data)); } } diff --git a/codbex-uoms/gen/codbex-uoms/dao/Settings/UoM.extensionpoint b/codbex-uoms/gen/codbex-uoms/dao/Settings/UoM.extensionpoint new file mode 100644 index 0000000..d1a4785 --- /dev/null +++ b/codbex-uoms/gen/codbex-uoms/dao/Settings/UoM.extensionpoint @@ -0,0 +1,4 @@ +{ + "name": "codbex-uoms-Settings-UoM", + "description": "Extension Point for the codbex-uoms-Settings-UoM entity" +} \ No newline at end of file diff --git a/codbex-uoms/gen/codbex-uoms/dao/UnitsOfMeasures/UoMRepository.ts b/codbex-uoms/gen/codbex-uoms/dao/Settings/UoMRepository.ts similarity index 98% rename from codbex-uoms/gen/codbex-uoms/dao/UnitsOfMeasures/UoMRepository.ts rename to codbex-uoms/gen/codbex-uoms/dao/Settings/UoMRepository.ts index 7a478ee..2fe6ad5 100644 --- a/codbex-uoms/gen/codbex-uoms/dao/UnitsOfMeasures/UoMRepository.ts +++ b/codbex-uoms/gen/codbex-uoms/dao/Settings/UoMRepository.ts @@ -287,7 +287,7 @@ export class UoMRepository { } private async triggerEvent(data: UoMEntityEvent | UoMUpdateEntityEvent) { - const triggerExtensions = await extensions.loadExtensionModules("codbex-uoms-UnitsOfMeasures-UoM", ["trigger"]); + const triggerExtensions = await extensions.loadExtensionModules("codbex-uoms-Settings-UoM", ["trigger"]); triggerExtensions.forEach(triggerExtension => { try { triggerExtension.trigger(data); @@ -295,6 +295,6 @@ export class UoMRepository { console.error(error); } }); - producer.topic("codbex-uoms-UnitsOfMeasures-UoM").send(JSON.stringify(data)); + producer.topic("codbex-uoms-Settings-UoM").send(JSON.stringify(data)); } } diff --git a/codbex-uoms/gen/codbex-uoms/dao/UnitsOfMeasures/UoM.extensionpoint b/codbex-uoms/gen/codbex-uoms/dao/UnitsOfMeasures/UoM.extensionpoint deleted file mode 100644 index ce45265..0000000 --- a/codbex-uoms/gen/codbex-uoms/dao/UnitsOfMeasures/UoM.extensionpoint +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "codbex-uoms-UnitsOfMeasures-UoM", - "description": "Extension Point for the codbex-uoms-UnitsOfMeasures-UoM entity" -} \ No newline at end of file diff --git a/codbex-uoms/gen/codbex-uoms/index.html b/codbex-uoms/gen/codbex-uoms/index.html deleted file mode 100644 index dcffded..0000000 --- a/codbex-uoms/gen/codbex-uoms/index.html +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/codbex-uoms/gen/codbex-uoms/ui/Dimensions/Dimension/controller.js b/codbex-uoms/gen/codbex-uoms/ui/Dimensions/Dimension/controller.js deleted file mode 100644 index c68a894..0000000 --- a/codbex-uoms/gen/codbex-uoms/ui/Dimensions/Dimension/controller.js +++ /dev/null @@ -1,163 +0,0 @@ -angular.module('page', ["ideUI", "ideView", "entityApi"]) - .config(["messageHubProvider", function (messageHubProvider) { - messageHubProvider.eventIdPrefix = 'codbex-uoms.Dimensions.Dimension'; - }]) - .config(["entityApiProvider", function (entityApiProvider) { - entityApiProvider.baseUrl = "/services/ts/codbex-uoms/gen/codbex-uoms/api/Dimensions/DimensionService.ts"; - }]) - .controller('PageController', ['$scope', 'messageHub', 'entityApi', 'Extensions', function ($scope, messageHub, entityApi, Extensions) { - - $scope.dataPage = 1; - $scope.dataCount = 0; - $scope.dataLimit = 20; - - //-----------------Custom Actions-------------------// - Extensions.get('dialogWindow', 'codbex-uoms-custom-action').then(function (response) { - $scope.pageActions = response.filter(e => e.perspective === "Dimensions" && e.view === "Dimension" && (e.type === "page" || e.type === undefined)); - $scope.entityActions = response.filter(e => e.perspective === "Dimensions" && e.view === "Dimension" && e.type === "entity"); - }); - - $scope.triggerPageAction = function (action) { - messageHub.showDialogWindow( - action.id, - {}, - null, - true, - action - ); - }; - - $scope.triggerEntityAction = function (action) { - messageHub.showDialogWindow( - action.id, - { - id: $scope.entity.Id - }, - null, - true, - action - ); - }; - //-----------------Custom Actions-------------------// - - function resetPagination() { - $scope.dataPage = 1; - $scope.dataCount = 0; - $scope.dataLimit = 20; - } - resetPagination(); - - //-----------------Events-------------------// - messageHub.onDidReceiveMessage("entityCreated", function (msg) { - $scope.loadPage($scope.dataPage, $scope.filter); - }); - - messageHub.onDidReceiveMessage("entityUpdated", function (msg) { - $scope.loadPage($scope.dataPage, $scope.filter); - }); - - messageHub.onDidReceiveMessage("entitySearch", function (msg) { - resetPagination(); - $scope.filter = msg.data.filter; - $scope.filterEntity = msg.data.entity; - $scope.loadPage($scope.dataPage, $scope.filter); - }); - //-----------------Events-------------------// - - $scope.loadPage = function (pageNumber, filter) { - if (!filter && $scope.filter) { - filter = $scope.filter; - } - $scope.dataPage = pageNumber; - entityApi.count(filter).then(function (response) { - if (response.status != 200) { - messageHub.showAlertError("Dimension", `Unable to count Dimension: '${response.message}'`); - return; - } - if (response.data) { - $scope.dataCount = response.data; - } - let offset = (pageNumber - 1) * $scope.dataLimit; - let limit = $scope.dataLimit; - let request; - if (filter) { - filter.$offset = offset; - filter.$limit = limit; - request = entityApi.search(filter); - } else { - request = entityApi.list(offset, limit); - } - request.then(function (response) { - if (response.status != 200) { - messageHub.showAlertError("Dimension", `Unable to list/filter Dimension: '${response.message}'`); - return; - } - $scope.data = response.data; - }); - }); - }; - $scope.loadPage($scope.dataPage, $scope.filter); - - $scope.selectEntity = function (entity) { - $scope.selectedEntity = entity; - }; - - $scope.openDetails = function (entity) { - $scope.selectedEntity = entity; - messageHub.showDialogWindow("Dimension-details", { - action: "select", - entity: entity, - }); - }; - - $scope.openFilter = function (entity) { - messageHub.showDialogWindow("Dimension-filter", { - entity: $scope.filterEntity, - }); - }; - - $scope.createEntity = function () { - $scope.selectedEntity = null; - messageHub.showDialogWindow("Dimension-details", { - action: "create", - entity: {}, - }, null, false); - }; - - $scope.updateEntity = function (entity) { - messageHub.showDialogWindow("Dimension-details", { - action: "update", - entity: entity, - }, null, false); - }; - - $scope.deleteEntity = function (entity) { - let id = entity.Id; - messageHub.showDialogAsync( - 'Delete Dimension?', - `Are you sure you want to delete Dimension? This action cannot be undone.`, - [{ - id: "delete-btn-yes", - type: "emphasized", - label: "Yes", - }, - { - id: "delete-btn-no", - type: "normal", - label: "No", - }], - ).then(function (msg) { - if (msg.data === "delete-btn-yes") { - entityApi.delete(id).then(function (response) { - if (response.status != 204) { - messageHub.showAlertError("Dimension", `Unable to delete Dimension: '${response.message}'`); - return; - } - $scope.loadPage($scope.dataPage, $scope.filter); - messageHub.postMessage("clearDetails"); - }); - } - }); - }; - - }]); diff --git a/codbex-uoms/gen/codbex-uoms/ui/Dimensions/Dimension/dialog-filter/controller.js b/codbex-uoms/gen/codbex-uoms/ui/Dimensions/Dimension/dialog-filter/controller.js deleted file mode 100644 index dc5d13e..0000000 --- a/codbex-uoms/gen/codbex-uoms/ui/Dimensions/Dimension/dialog-filter/controller.js +++ /dev/null @@ -1,68 +0,0 @@ -angular.module('page', ["ideUI", "ideView"]) - .config(["messageHubProvider", function (messageHubProvider) { - messageHubProvider.eventIdPrefix = 'codbex-uoms.Dimensions.Dimension'; - }]) - .controller('PageController', ['$scope', 'messageHub', 'ViewParameters', function ($scope, messageHub, ViewParameters) { - - $scope.entity = {}; - $scope.forms = { - details: {}, - }; - - let params = ViewParameters.get(); - if (Object.keys(params).length) { - $scope.entity = params.entity ?? {}; - $scope.selectedMainEntityKey = params.selectedMainEntityKey; - $scope.selectedMainEntityId = params.selectedMainEntityId; - } - - $scope.filter = function () { - let entity = $scope.entity; - const filter = { - $filter: { - equals: { - }, - notEquals: { - }, - contains: { - }, - greaterThan: { - }, - greaterThanOrEqual: { - }, - lessThan: { - }, - lessThanOrEqual: { - } - }, - }; - if (entity.Id !== undefined) { - filter.$filter.equals.Id = entity.Id; - } - if (entity.SAP) { - filter.$filter.contains.SAP = entity.SAP; - } - if (entity.Name) { - filter.$filter.contains.Name = entity.Name; - } - messageHub.postMessage("entitySearch", { - entity: entity, - filter: filter - }); - $scope.cancel(); - }; - - $scope.resetFilter = function () { - $scope.entity = {}; - $scope.filter(); - }; - - $scope.cancel = function () { - messageHub.closeDialogWindow("Dimension-filter"); - }; - - $scope.clearErrorMessage = function () { - $scope.errorMessage = null; - }; - - }]); \ No newline at end of file diff --git a/codbex-uoms/gen/codbex-uoms/ui/Dimensions/Dimension/dialog-filter/index.html b/codbex-uoms/gen/codbex-uoms/ui/Dimensions/Dimension/dialog-filter/index.html deleted file mode 100644 index e01fafb..0000000 --- a/codbex-uoms/gen/codbex-uoms/ui/Dimensions/Dimension/dialog-filter/index.html +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - -
- SAP -
-
- - - - Incorrect Input - -
-
- -
- Name -
-
- - - - Incorrect Input - -
-
-
-
-
- - - - - - - - - - - - - - - - - - diff --git a/codbex-uoms/gen/codbex-uoms/ui/Dimensions/Dimension/dialog-filter/view.js b/codbex-uoms/gen/codbex-uoms/ui/Dimensions/Dimension/dialog-filter/view.js deleted file mode 100644 index 76f282f..0000000 --- a/codbex-uoms/gen/codbex-uoms/ui/Dimensions/Dimension/dialog-filter/view.js +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Generated by Eclipse Dirigible based on model and template. - * - * Do not modify the content as it may be re-generated again. - */ -const viewData = { - id: "Dimension-filter", - label: "Dimension Filter", - link: "/services/web/codbex-uoms/gen/codbex-uoms/ui/Dimensions/Dimension/dialog-filter/index.html", - perspectiveName: "Dimensions" -}; - -if (typeof exports !== 'undefined') { - exports.getDialogWindow = function () { - return viewData; - } -} \ No newline at end of file diff --git a/codbex-uoms/gen/codbex-uoms/ui/Dimensions/Dimension/dialog-window/controller.js b/codbex-uoms/gen/codbex-uoms/ui/Dimensions/Dimension/dialog-window/controller.js deleted file mode 100644 index 057f57d..0000000 --- a/codbex-uoms/gen/codbex-uoms/ui/Dimensions/Dimension/dialog-window/controller.js +++ /dev/null @@ -1,69 +0,0 @@ -angular.module('page', ["ideUI", "ideView", "entityApi"]) - .config(["messageHubProvider", function (messageHubProvider) { - messageHubProvider.eventIdPrefix = 'codbex-uoms.Dimensions.Dimension'; - }]) - .config(["entityApiProvider", function (entityApiProvider) { - entityApiProvider.baseUrl = "/services/ts/codbex-uoms/gen/codbex-uoms/api/Dimensions/DimensionService.ts"; - }]) - .controller('PageController', ['$scope', 'messageHub', 'ViewParameters', 'entityApi', function ($scope, messageHub, ViewParameters, entityApi) { - - $scope.entity = {}; - $scope.forms = { - details: {}, - }; - $scope.formHeaders = { - select: "Dimension Details", - create: "Create Dimension", - update: "Update Dimension" - }; - $scope.action = 'select'; - - let params = ViewParameters.get(); - if (Object.keys(params).length) { - $scope.action = params.action; - $scope.entity = params.entity; - $scope.selectedMainEntityKey = params.selectedMainEntityKey; - $scope.selectedMainEntityId = params.selectedMainEntityId; - } - - $scope.create = function () { - let entity = $scope.entity; - entity[$scope.selectedMainEntityKey] = $scope.selectedMainEntityId; - entityApi.create(entity).then(function (response) { - if (response.status != 201) { - $scope.errorMessage = `Unable to create Dimension: '${response.message}'`; - return; - } - messageHub.postMessage("entityCreated", response.data); - $scope.cancel(); - messageHub.showAlertSuccess("Dimension", "Dimension successfully created"); - }); - }; - - $scope.update = function () { - let id = $scope.entity.Id; - let entity = $scope.entity; - entity[$scope.selectedMainEntityKey] = $scope.selectedMainEntityId; - entityApi.update(id, entity).then(function (response) { - if (response.status != 200) { - $scope.errorMessage = `Unable to update Dimension: '${response.message}'`; - return; - } - messageHub.postMessage("entityUpdated", response.data); - $scope.cancel(); - messageHub.showAlertSuccess("Dimension", "Dimension successfully updated"); - }); - }; - - - $scope.cancel = function () { - $scope.entity = {}; - $scope.action = 'select'; - messageHub.closeDialogWindow("Dimension-details"); - }; - - $scope.clearErrorMessage = function () { - $scope.errorMessage = null; - }; - - }]); \ No newline at end of file diff --git a/codbex-uoms/gen/codbex-uoms/ui/Dimensions/Dimension/dialog-window/index.html b/codbex-uoms/gen/codbex-uoms/ui/Dimensions/Dimension/dialog-window/index.html deleted file mode 100644 index fdb2b28..0000000 --- a/codbex-uoms/gen/codbex-uoms/ui/Dimensions/Dimension/dialog-window/index.html +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - -
- SAP -
-
- - - - The value doesn't match the required pattern '' - - -
-
- -
- Name -
-
- - - - The value doesn't match the required pattern '' - - -
-
-
-
-
- - - - - - - - - - - - - - - diff --git a/codbex-uoms/gen/codbex-uoms/ui/Dimensions/Dimension/dialog-window/view.js b/codbex-uoms/gen/codbex-uoms/ui/Dimensions/Dimension/dialog-window/view.js deleted file mode 100644 index 19d3347..0000000 --- a/codbex-uoms/gen/codbex-uoms/ui/Dimensions/Dimension/dialog-window/view.js +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Generated by Eclipse Dirigible based on model and template. - * - * Do not modify the content as it may be re-generated again. - */ -const viewData = { - id: "Dimension-details", - label: "Dimension", - link: "/services/web/codbex-uoms/gen/codbex-uoms/ui/Dimensions/Dimension/dialog-window/index.html", - perspectiveName: "Dimensions" -}; - -if (typeof exports !== 'undefined') { - exports.getDialogWindow = function () { - return viewData; - } -} \ No newline at end of file diff --git a/codbex-uoms/gen/codbex-uoms/ui/Dimensions/Dimension/index.html b/codbex-uoms/gen/codbex-uoms/ui/Dimensions/Dimension/index.html deleted file mode 100644 index dbdae8e..0000000 --- a/codbex-uoms/gen/codbex-uoms/ui/Dimensions/Dimension/index.html +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - - - - - - - - - Items - - - - - - - - - - - - - - - - - - - - - - - - - -
SAPName
No data available.
{{next.SAP}}{{next.Name}} - - - - - - - - - - - - - - -
-
- - - - - - diff --git a/codbex-uoms/gen/codbex-uoms/ui/Dimensions/Dimension/tile-portal.extension b/codbex-uoms/gen/codbex-uoms/ui/Dimensions/Dimension/tile-portal.extension deleted file mode 100644 index d4318c8..0000000 --- a/codbex-uoms/gen/codbex-uoms/ui/Dimensions/Dimension/tile-portal.extension +++ /dev/null @@ -1,6 +0,0 @@ -{ - "module": "codbex-uoms/gen/codbex-uoms/ui/Dimensions/Dimension/tile.js", - "extensionPoint": "portal-tile", - "description": "codbex-uoms - Application Tile", - "role": "codbex-uoms.Dimensions.DimensionReadOnly,codbex-uoms.Dimensions.DimensionFullAccess" -} \ No newline at end of file diff --git a/codbex-uoms/gen/codbex-uoms/ui/Dimensions/Dimension/tile.extension b/codbex-uoms/gen/codbex-uoms/ui/Dimensions/Dimension/tile.extension deleted file mode 100644 index 3bbf586..0000000 --- a/codbex-uoms/gen/codbex-uoms/ui/Dimensions/Dimension/tile.extension +++ /dev/null @@ -1,6 +0,0 @@ -{ - "module": "codbex-uoms/gen/codbex-uoms/ui/Dimensions/Dimension/tile.js", - "extensionPoint": "codbex-uoms-tile", - "description": "codbex-uoms - Application Tile", - "role": "codbex-uoms.Dimensions.DimensionReadOnly,codbex-uoms.Dimensions.DimensionFullAccess" -} \ No newline at end of file diff --git a/codbex-uoms/gen/codbex-uoms/ui/Dimensions/Dimension/tile.js b/codbex-uoms/gen/codbex-uoms/ui/Dimensions/Dimension/tile.js deleted file mode 100644 index 836dc98..0000000 --- a/codbex-uoms/gen/codbex-uoms/ui/Dimensions/Dimension/tile.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Generated by Eclipse Dirigible based on model and template. - * - * Do not modify the content as it may be re-generated again. - */ -exports.getTile = function () { - return { - group: "codbex-uoms", - name: "Dimension", - caption: "Manage entity Dimension", - tooltip: "Dimension", - type: "SETTING", - report: "false", - icon: "cube", - location: "/services/web/codbex-uoms/gen/codbex-uoms/ui/Dimensions/index.html", - order: "100", - groupOrder: "990" - }; -} diff --git a/codbex-uoms/gen/codbex-uoms/ui/Dimensions/Dimension/view.js b/codbex-uoms/gen/codbex-uoms/ui/Dimensions/Dimension/view.js deleted file mode 100644 index a736885..0000000 --- a/codbex-uoms/gen/codbex-uoms/ui/Dimensions/Dimension/view.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Generated by Eclipse Dirigible based on model and template. - * - * Do not modify the content as it may be re-generated again. - */ -const viewData = { - id: "Dimension", - label: "Dimension", - factory: "frame", - region: "center", - link: "/services/web/codbex-uoms/gen/codbex-uoms/ui/Dimensions/Dimension/index.html", - perspectiveName: "Dimensions" -}; - -if (typeof exports !== 'undefined') { - exports.getView = function () { - return viewData; - } -} diff --git a/codbex-uoms/gen/codbex-uoms/ui/Dimensions/index.html b/codbex-uoms/gen/codbex-uoms/ui/Dimensions/index.html deleted file mode 100644 index c1a5be7..0000000 --- a/codbex-uoms/gen/codbex-uoms/ui/Dimensions/index.html +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - {{state.busyText}} - - - Encounterd an error while loading - - - - - - - diff --git a/codbex-uoms/gen/codbex-uoms/ui/Dimensions/perspective-portal.extension b/codbex-uoms/gen/codbex-uoms/ui/Dimensions/perspective-portal.extension deleted file mode 100644 index d20557d..0000000 --- a/codbex-uoms/gen/codbex-uoms/ui/Dimensions/perspective-portal.extension +++ /dev/null @@ -1,5 +0,0 @@ -{ - "module": "codbex-uoms/gen/codbex-uoms/ui/Dimensions/perspective.js", - "extensionPoint": "portal", - "description": "codbex-uoms - Perspective - Dimensions" -} \ No newline at end of file diff --git a/codbex-uoms/gen/codbex-uoms/ui/Dimensions/perspective.extension b/codbex-uoms/gen/codbex-uoms/ui/Dimensions/perspective.extension deleted file mode 100644 index 83b241a..0000000 --- a/codbex-uoms/gen/codbex-uoms/ui/Dimensions/perspective.extension +++ /dev/null @@ -1,5 +0,0 @@ -{ - "module": "codbex-uoms/gen/codbex-uoms/ui/Dimensions/perspective.js", - "extensionPoint": "codbex-uoms", - "description": "codbex-uoms - Perspective - Dimensions" -} \ No newline at end of file diff --git a/codbex-uoms/gen/codbex-uoms/ui/Dimensions/perspective.js b/codbex-uoms/gen/codbex-uoms/ui/Dimensions/perspective.js deleted file mode 100644 index a5d182b..0000000 --- a/codbex-uoms/gen/codbex-uoms/ui/Dimensions/perspective.js +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Generated by Eclipse Dirigible based on model and template. - * - * Do not modify the content as it may be re-generated again. - */ -const perspectiveData = { - id: 'Dimensions', - name: 'Dimensions', - link: '/services/web/codbex-uoms/gen/codbex-uoms/ui/Dimensions/index.html', - order: '990', - icon: '/services/web/resources/unicons/align-center-h.svg' -}; - -if (typeof exports !== 'undefined') { - exports.getPerspective = function () { - return perspectiveData; - } -} \ No newline at end of file diff --git a/codbex-uoms/gen/codbex-uoms/ui/Settings/Dimension/controller.js b/codbex-uoms/gen/codbex-uoms/ui/Settings/Dimension/controller.js new file mode 100644 index 0000000..e093a2d --- /dev/null +++ b/codbex-uoms/gen/codbex-uoms/ui/Settings/Dimension/controller.js @@ -0,0 +1,181 @@ +angular.module('page', ['blimpKit', 'platformView', 'EntityService']) + .config(['EntityServiceProvider', (EntityServiceProvider) => { + EntityServiceProvider.baseUrl = '/services/ts/codbex-uoms/gen/codbex-uoms/api/Settings/DimensionService.ts'; + }]) + .controller('PageController', ($scope, EntityService, Extensions, ButtonStates) => { + const Dialogs = new DialogHub(); + $scope.dataPage = 1; + $scope.dataCount = 0; + $scope.dataLimit = 20; + + //-----------------Custom Actions-------------------// + Extensions.getWindows(['codbex-uoms-custom-action']).then((response) => { + $scope.pageActions = response.data.filter(e => e.perspective === 'Settings' && e.view === 'Dimension' && (e.type === 'page' || e.type === undefined)); + $scope.entityActions = response.data.filter(e => e.perspective === 'Settings' && e.view === 'Dimension' && e.type === 'entity'); + }); + + $scope.triggerPageAction = (action) => { + Dialogs.showWindow({ + hasHeader: true, + title: action.label, + path: action.path, + closeButton: true + }); + }; + + $scope.triggerEntityAction = (action) => { + Dialogs.showWindow({ + hasHeader: true, + title: action.label, + path: action.path, + params: { + id: $scope.entity.Id + }, + closeButton: true + }); + }; + //-----------------Custom Actions-------------------// + + function resetPagination() { + $scope.dataPage = 1; + $scope.dataCount = 0; + $scope.dataLimit = 20; + } + resetPagination(); + + //-----------------Events-------------------// + Dialogs.addMessageListener({ topic: 'codbex-uoms.Settings.Dimension.entityCreated', handler: () => { + $scope.loadPage($scope.dataPage, $scope.filter); + }}); + Dialogs.addMessageListener({ topic: 'codbex-uoms.Settings.Dimension.entityUpdated', handler: () => { + $scope.loadPage($scope.dataPage, $scope.filter); + }}); + Dialogs.addMessageListener({ topic: 'codbex-uoms.Settings.Dimension.entitySearch', handler: (data) => { + resetPagination(); + $scope.filter = data.filter; + $scope.filterEntity = data.entity; + $scope.loadPage($scope.dataPage, $scope.filter); + }}); + //-----------------Events-------------------// + + $scope.loadPage = (pageNumber, filter) => { + if (!filter && $scope.filter) { + filter = $scope.filter; + } + $scope.dataPage = pageNumber; + EntityService.count(filter).then((resp) => { + if (resp.data) { + $scope.dataCount = resp.data.count; + } + let offset = (pageNumber - 1) * $scope.dataLimit; + let limit = $scope.dataLimit; + let request; + if (filter) { + filter.$offset = offset; + filter.$limit = limit; + request = EntityService.search(filter); + } else { + request = EntityService.list(offset, limit); + } + request.then((response) => { + $scope.data = response.data; + }, (error) => { + Dialogs.showAlert({ + title: 'Dimension', + message: `Unable to list/filter Dimension: '${error.message}'`, + type: AlertTypes.Error + }); + console.error('EntityService:', error); + }); + }, (error) => { + Dialogs.showAlert({ + title: 'Dimension', + message: `Unable to count Dimension: '${error.message}'`, + type: AlertTypes.Error + }); + console.error('EntityService:', error); + }); + }; + $scope.loadPage($scope.dataPage, $scope.filter); + + $scope.selectEntity = (entity) => { + $scope.selectedEntity = entity; + }; + + $scope.openDetails = (entity) => { + $scope.selectedEntity = entity; + Dialogs.showWindow({ + id: 'Dimension-details', + params: { + action: 'select', + entity: entity, + }, + closeButton: true, + }); + }; + + $scope.openFilter = (entity) => { + Dialogs.showWindow({ + id: '${property.relationshipEntityName}-details', + params: { + entity: $scope.filterEntity, + }, + closeButton: true, + }); + }; + + $scope.createEntity = () => { + $scope.selectedEntity = null; + Dialogs.showWindow({ + id: 'Dimension-details', + params: { + action: 'create', + entity: {}, + }, + closeButton: false, + }); + }; + + $scope.updateEntity = (entity) => { + Dialogs.showWindow({ + id: '${property.relationshipEntityName}-details', + params: { + action: 'update', + entity: entity, + }, + closeButton: false, + }); + }; + + $scope.deleteEntity = (entity) => { + let id = entity.Id; + Dialog.showDialog({ + title: 'Delete Dimension?', + message: `Are you sure you want to delete Dimension? This action cannot be undone.`, + buttons: [{ + id: 'delete-btn-yes', + state: ButtonStates.Emphasized, + label: 'Yes', + }, { + id: 'delete-btn-no', + label: 'No', + }] + }).then((buttonId) => { + if (buttonId === 'delete-btn-yes') { + EntityService.delete(id).then((response) => { + $scope.loadPage($scope.dataPage, $scope.filter); + Dialogs.triggerEvent('codbex-uoms.Settings.Dimension.clearDetails'); + }, (error) => { + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'Dimension', + message: `Unable to delete Dimension: '${message}'`, + type: AlertTypes.Error + }); + console.error('EntityService:', error); + }); + } + }); + }; + + }); \ No newline at end of file diff --git a/codbex-uoms/gen/codbex-uoms/ui/Settings/Dimension/dialog-filter/controller.js b/codbex-uoms/gen/codbex-uoms/ui/Settings/Dimension/dialog-filter/controller.js new file mode 100644 index 0000000..872d68e --- /dev/null +++ b/codbex-uoms/gen/codbex-uoms/ui/Settings/Dimension/dialog-filter/controller.js @@ -0,0 +1,72 @@ +angular.module('page', ['blimpKit', 'platformView']).controller('PageController', ($scope, ViewParameters) => { + const Dialogs = new DialogHub(); + $scope.entity = {}; + $scope.forms = { + details: {}, + }; + + let params = ViewParameters.get(); + if (Object.keys(params).length) { + $scope.entity = params.entity ?? {}; + $scope.selectedMainEntityKey = params.selectedMainEntityKey; + $scope.selectedMainEntityId = params.selectedMainEntityId; + } + + $scope.filter = () => { + let entity = $scope.entity; + const filter = { + $filter: { + equals: { + }, + notEquals: { + }, + contains: { + }, + greaterThan: { + }, + greaterThanOrEqual: { + }, + lessThan: { + }, + lessThanOrEqual: { + } + }, + }; + if (entity.Id !== undefined) { + filter.$filter.equals.Id = entity.Id; + } + if (entity.SAP) { + filter.$filter.contains.SAP = entity.SAP; + } + if (entity.Name) { + filter.$filter.contains.Name = entity.Name; + } + Dialogs.postMessage({ topic: 'codbex-uoms.Settings.Dimension.entitySearch', data: { + entity: entity, + filter: filter + }}); + $scope.cancel(); + }; + + $scope.resetFilter = () => { + $scope.entity = {}; + $scope.filter(); + }; + + $scope.alert = (message) => { + if (message) Dialogs.showAlert({ + title: 'Description', + message: message, + type: AlertTypes.Information, + preformatted: true, + }); + }; + + $scope.cancel = () => { + Dialogs.closeWindow({ id: 'Dimension-filter' }); + }; + + $scope.clearErrorMessage = () => { + $scope.errorMessage = null; + }; +}); \ No newline at end of file diff --git a/codbex-uoms/gen/codbex-uoms/ui/Settings/Dimension/dialog-filter/index.html b/codbex-uoms/gen/codbex-uoms/ui/Settings/Dimension/dialog-filter/index.html new file mode 100644 index 0000000..40686da --- /dev/null +++ b/codbex-uoms/gen/codbex-uoms/ui/Settings/Dimension/dialog-filter/index.html @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + + {{ errorMessage }} + + + + +
+ SAP +
+
+ + + + +
+
+ +
+ Name +
+
+ + + + +
+
+
+
+
+ + + + + + + + + + + + + + + + + + diff --git a/codbex-uoms/gen/codbex-uoms/ui/Dimensions/Dimension/dialog-filter/view.extension b/codbex-uoms/gen/codbex-uoms/ui/Settings/Dimension/dialog-filter/view.extension similarity index 54% rename from codbex-uoms/gen/codbex-uoms/ui/Dimensions/Dimension/dialog-filter/view.extension rename to codbex-uoms/gen/codbex-uoms/ui/Settings/Dimension/dialog-filter/view.extension index b1c3b04..62b689e 100644 --- a/codbex-uoms/gen/codbex-uoms/ui/Dimensions/Dimension/dialog-filter/view.extension +++ b/codbex-uoms/gen/codbex-uoms/ui/Settings/Dimension/dialog-filter/view.extension @@ -1,6 +1,6 @@ { - "module": "codbex-uoms/gen/codbex-uoms/ui/Dimensions/Dimension/dialog-filter/view.js", - "extensionPoint": "dialog-window", + "module": "codbex-uoms/gen/codbex-uoms/ui/Settings/Dimension/dialog-filter/view.js", + "extensionPoint": "application-windows", "description": "codbex-uoms - Application Dialog Window", "role": "codbex-uoms.Dimensions.DimensionReadOnly,codbex-uoms.Dimensions.DimensionFullAccess" } \ No newline at end of file diff --git a/codbex-uoms/gen/codbex-uoms/ui/Settings/Dimension/dialog-filter/view.js b/codbex-uoms/gen/codbex-uoms/ui/Settings/Dimension/dialog-filter/view.js new file mode 100644 index 0000000..2389083 --- /dev/null +++ b/codbex-uoms/gen/codbex-uoms/ui/Settings/Dimension/dialog-filter/view.js @@ -0,0 +1,14 @@ +/* + * Generated by Eclipse Dirigible based on model and template. + * + * Do not modify the content as it may be re-generated again. + */ +const viewData = { + id: 'Dimension-filter', + label: 'Dimension Filter', + path: '/services/web/codbex-uoms/gen/codbex-uoms/ui/Settings/Dimension/dialog-filter/index.html', + perspectiveName: 'Settings' +}; +if (typeof exports !== 'undefined') { + exports.getView = () => viewData; +} \ No newline at end of file diff --git a/codbex-uoms/gen/codbex-uoms/ui/Settings/Dimension/dialog-window/controller.js b/codbex-uoms/gen/codbex-uoms/ui/Settings/Dimension/dialog-window/controller.js new file mode 100644 index 0000000..98d579b --- /dev/null +++ b/codbex-uoms/gen/codbex-uoms/ui/Settings/Dimension/dialog-window/controller.js @@ -0,0 +1,86 @@ +angular.module('page', ['blimpKit', 'platformView', 'EntityService']) + .config(['EntityServiceProvider', (EntityServiceProvider) => { + EntityServiceProvider.baseUrl = '/services/ts/codbex-uoms/gen/codbex-uoms/api/Settings/DimensionService.ts'; + }]) + .controller('PageController', ($scope, $http, ViewParameters, EntityService) => { + const Dialogs = new DialogHub(); + $scope.entity = {}; + $scope.forms = { + details: {}, + }; + $scope.formHeaders = { + select: 'Dimension Details', + create: 'Create Dimension', + update: 'Update Dimension' + }; + $scope.action = 'select'; + + let params = ViewParameters.get(); + if (Object.keys(params).length) { + $scope.action = params.action; + $scope.entity = params.entity; + $scope.selectedMainEntityKey = params.selectedMainEntityKey; + $scope.selectedMainEntityId = params.selectedMainEntityId; + } + + $scope.create = () => { + let entity = $scope.entity; + entity[$scope.selectedMainEntityKey] = $scope.selectedMainEntityId; + EntityService.create(entity).then((response) => { + Dialogs.postMessage({ topic: 'codbex-uoms.Settings.Dimension.entityCreated', data: response.data }); + Dialogs.showAlert({ + title: 'Dimension', + message: 'Dimension successfully created', + type: AlertTypes.Success + }); + $scope.cancel(); + }, (error) => { + const message = error.data ? error.data.message : ''; + $scope.$evalAsync(() => { + $scope.errorMessage = `Unable to create Dimension: '${message}'`; + }); + console.error('EntityService:', error); + }); + }; + + $scope.update = () => { + let id = $scope.entity.Id; + let entity = $scope.entity; + entity[$scope.selectedMainEntityKey] = $scope.selectedMainEntityId; + EntityService.update(id, entity).then((response) => { + Dialogs.postMessage({ topic: 'codbex-uoms.Settings.Dimension.entityUpdated', data: response.data }); + Dialogs.showAlert({ + title: 'Dimension', + message: 'Dimension successfully updated', + type: AlertTypes.Success + }); + $scope.cancel(); + }, (error) => { + const message = error.data ? error.data.message : ''; + $scope.$evalAsync(() => { + $scope.errorMessage = `Unable to update Dimension: '${message}'`; + }); + console.error('EntityService:', error); + }); + }; + + + $scope.alert = (message) => { + if (message) Dialogs.showAlert({ + title: 'Description', + message: message, + type: AlertTypes.Information, + preformatted: true, + }); + }; + + $scope.cancel = () => { + $scope.entity = {}; + $scope.action = 'select'; + Dialogs.closeWindow({ id: 'Dimension-details' }); + }; + + $scope.clearErrorMessage = () => { + $scope.errorMessage = null; + }; + }); \ No newline at end of file diff --git a/codbex-uoms/gen/codbex-uoms/ui/Settings/Dimension/dialog-window/index.html b/codbex-uoms/gen/codbex-uoms/ui/Settings/Dimension/dialog-window/index.html new file mode 100644 index 0000000..cebd72d --- /dev/null +++ b/codbex-uoms/gen/codbex-uoms/ui/Settings/Dimension/dialog-window/index.html @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + {{ errorMessage }} + + + + +
+ SAP +
+
+ + + + +
+
+ +
+ Name +
+
+ + + + +
+
+
+
+
+ + + + + + + + + + + + + + + diff --git a/codbex-uoms/gen/codbex-uoms/ui/Dimensions/Dimension/dialog-window/view.extension b/codbex-uoms/gen/codbex-uoms/ui/Settings/Dimension/dialog-window/view.extension similarity index 54% rename from codbex-uoms/gen/codbex-uoms/ui/Dimensions/Dimension/dialog-window/view.extension rename to codbex-uoms/gen/codbex-uoms/ui/Settings/Dimension/dialog-window/view.extension index 831008c..dc81903 100644 --- a/codbex-uoms/gen/codbex-uoms/ui/Dimensions/Dimension/dialog-window/view.extension +++ b/codbex-uoms/gen/codbex-uoms/ui/Settings/Dimension/dialog-window/view.extension @@ -1,6 +1,6 @@ { - "module": "codbex-uoms/gen/codbex-uoms/ui/Dimensions/Dimension/dialog-window/view.js", - "extensionPoint": "dialog-window", + "module": "codbex-uoms/gen/codbex-uoms/ui/Settings/Dimension/dialog-window/view.js", + "extensionPoint": "application-windows", "description": "codbex-uoms - Application Dialog Window", "role": "codbex-uoms.Dimensions.DimensionReadOnly,codbex-uoms.Dimensions.DimensionFullAccess" } \ No newline at end of file diff --git a/codbex-uoms/gen/codbex-uoms/ui/Settings/Dimension/dialog-window/view.js b/codbex-uoms/gen/codbex-uoms/ui/Settings/Dimension/dialog-window/view.js new file mode 100644 index 0000000..a975531 --- /dev/null +++ b/codbex-uoms/gen/codbex-uoms/ui/Settings/Dimension/dialog-window/view.js @@ -0,0 +1,14 @@ +/* + * Generated by Eclipse Dirigible based on model and template. + * + * Do not modify the content as it may be re-generated again. + */ +const viewData = { + id: 'Dimension-details', + label: 'Dimension', + path: '/services/web/codbex-uoms/gen/codbex-uoms/ui/Settings/Dimension/dialog-window/index.html', + perspectiveName: 'Settings' +}; +if (typeof exports !== 'undefined') { + exports.getView = () => viewData; +} \ No newline at end of file diff --git a/codbex-uoms/gen/codbex-uoms/ui/Settings/Dimension/index.html b/codbex-uoms/gen/codbex-uoms/ui/Settings/Dimension/index.html new file mode 100644 index 0000000..9cd3eab --- /dev/null +++ b/codbex-uoms/gen/codbex-uoms/ui/Settings/Dimension/index.html @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + Items + + + + + + + + + + + + + + + + + + + + + + + + + +
SAPName
No data available.
{{next.SAP}}{{next.Name}} + + + + + + + + + + + + + + +
+
+ + + + + + + diff --git a/codbex-uoms/gen/codbex-uoms/ui/Dimensions/Dimension/view.extension b/codbex-uoms/gen/codbex-uoms/ui/Settings/Dimension/view.extension similarity index 56% rename from codbex-uoms/gen/codbex-uoms/ui/Dimensions/Dimension/view.extension rename to codbex-uoms/gen/codbex-uoms/ui/Settings/Dimension/view.extension index 1803e32..089d86e 100644 --- a/codbex-uoms/gen/codbex-uoms/ui/Dimensions/Dimension/view.extension +++ b/codbex-uoms/gen/codbex-uoms/ui/Settings/Dimension/view.extension @@ -1,6 +1,6 @@ { - "module": "codbex-uoms/gen/codbex-uoms/ui/Dimensions/Dimension/view.js", - "extensionPoint": "codbex-uoms-view", + "module": "codbex-uoms/gen/codbex-uoms/ui/Settings/Dimension/view.js", + "extensionPoint": "application-settings", "description": "codbex-uoms - Application View", "role": "codbex-uoms.Dimensions.DimensionReadOnly,codbex-uoms.Dimensions.DimensionFullAccess" } \ No newline at end of file diff --git a/codbex-uoms/gen/codbex-uoms/ui/Settings/Dimension/view.js b/codbex-uoms/gen/codbex-uoms/ui/Settings/Dimension/view.js new file mode 100644 index 0000000..444778e --- /dev/null +++ b/codbex-uoms/gen/codbex-uoms/ui/Settings/Dimension/view.js @@ -0,0 +1,17 @@ +/* + * Generated by Eclipse Dirigible based on model and template. + * + * Do not modify the content as it may be re-generated again. + */ +const viewData = { + id: 'Dimension', + label: 'Dimension', + region: 'center', + lazyLoad: true, + autoFocusTab: false, + path: '/services/web/codbex-uoms/gen/codbex-uoms/ui/Settings/Dimension/index.html', + perspectiveName: 'Settings' +}; +if (typeof exports !== 'undefined') { + exports.getView = () => viewData; +} \ No newline at end of file diff --git a/codbex-uoms/gen/codbex-uoms/ui/Settings/UoM/controller.js b/codbex-uoms/gen/codbex-uoms/ui/Settings/UoM/controller.js new file mode 100644 index 0000000..e9a2892 --- /dev/null +++ b/codbex-uoms/gen/codbex-uoms/ui/Settings/UoM/controller.js @@ -0,0 +1,214 @@ +angular.module('page', ['blimpKit', 'platformView', 'EntityService']) + .config(['EntityServiceProvider', (EntityServiceProvider) => { + EntityServiceProvider.baseUrl = '/services/ts/codbex-uoms/gen/codbex-uoms/api/Settings/UoMService.ts'; + }]) + .controller('PageController', ($scope, $http, EntityService, Extensions, ButtonStates) => { + const Dialogs = new DialogHub(); + $scope.dataPage = 1; + $scope.dataCount = 0; + $scope.dataLimit = 20; + + //-----------------Custom Actions-------------------// + Extensions.getWindows(['codbex-uoms-custom-action']).then((response) => { + $scope.pageActions = response.data.filter(e => e.perspective === 'Settings' && e.view === 'UoM' && (e.type === 'page' || e.type === undefined)); + $scope.entityActions = response.data.filter(e => e.perspective === 'Settings' && e.view === 'UoM' && e.type === 'entity'); + }); + + $scope.triggerPageAction = (action) => { + Dialogs.showWindow({ + hasHeader: true, + title: action.label, + path: action.path, + closeButton: true + }); + }; + + $scope.triggerEntityAction = (action) => { + Dialogs.showWindow({ + hasHeader: true, + title: action.label, + path: action.path, + params: { + id: $scope.entity.Id + }, + closeButton: true + }); + }; + //-----------------Custom Actions-------------------// + + function resetPagination() { + $scope.dataPage = 1; + $scope.dataCount = 0; + $scope.dataLimit = 20; + } + resetPagination(); + + //-----------------Events-------------------// + Dialogs.addMessageListener({ topic: 'codbex-uoms.Settings.UoM.entityCreated', handler: () => { + $scope.loadPage($scope.dataPage, $scope.filter); + }}); + Dialogs.addMessageListener({ topic: 'codbex-uoms.Settings.UoM.entityUpdated', handler: () => { + $scope.loadPage($scope.dataPage, $scope.filter); + }}); + Dialogs.addMessageListener({ topic: 'codbex-uoms.Settings.UoM.entitySearch', handler: (data) => { + resetPagination(); + $scope.filter = data.filter; + $scope.filterEntity = data.entity; + $scope.loadPage($scope.dataPage, $scope.filter); + }}); + //-----------------Events-------------------// + + $scope.loadPage = (pageNumber, filter) => { + if (!filter && $scope.filter) { + filter = $scope.filter; + } + $scope.dataPage = pageNumber; + EntityService.count(filter).then((resp) => { + if (resp.data) { + $scope.dataCount = resp.data.count; + } + let offset = (pageNumber - 1) * $scope.dataLimit; + let limit = $scope.dataLimit; + let request; + if (filter) { + filter.$offset = offset; + filter.$limit = limit; + request = EntityService.search(filter); + } else { + request = EntityService.list(offset, limit); + } + request.then((response) => { + $scope.data = response.data; + }, (error) => { + Dialogs.showAlert({ + title: 'UoM', + message: `Unable to list/filter UoM: '${error.message}'`, + type: AlertTypes.Error + }); + console.error('EntityService:', error); + }); + }, (error) => { + Dialogs.showAlert({ + title: 'UoM', + message: `Unable to count UoM: '${error.message}'`, + type: AlertTypes.Error + }); + console.error('EntityService:', error); + }); + }; + $scope.loadPage($scope.dataPage, $scope.filter); + + $scope.selectEntity = (entity) => { + $scope.selectedEntity = entity; + }; + + $scope.openDetails = (entity) => { + $scope.selectedEntity = entity; + Dialogs.showWindow({ + id: 'UoM-details', + params: { + action: 'select', + entity: entity, + optionsDimension: $scope.optionsDimension, + }, + closeButton: true, + }); + }; + + $scope.openFilter = (entity) => { + Dialogs.showWindow({ + id: '${property.relationshipEntityName}-details', + params: { + entity: $scope.filterEntity, + optionsDimension: $scope.optionsDimension, + }, + closeButton: true, + }); + }; + + $scope.createEntity = () => { + $scope.selectedEntity = null; + Dialogs.showWindow({ + id: 'UoM-details', + params: { + action: 'create', + entity: {}, + optionsDimension: $scope.optionsDimension, + }, + closeButton: false, + }); + }; + + $scope.updateEntity = (entity) => { + Dialogs.showWindow({ + id: '${property.relationshipEntityName}-details', + params: { + action: 'update', + entity: entity, + optionsDimension: $scope.optionsDimension, + }, + closeButton: false, + }); + }; + + $scope.deleteEntity = (entity) => { + let id = entity.Id; + Dialog.showDialog({ + title: 'Delete UoM?', + message: `Are you sure you want to delete UoM? This action cannot be undone.`, + buttons: [{ + id: 'delete-btn-yes', + state: ButtonStates.Emphasized, + label: 'Yes', + }, { + id: 'delete-btn-no', + label: 'No', + }] + }).then((buttonId) => { + if (buttonId === 'delete-btn-yes') { + EntityService.delete(id).then((response) => { + $scope.loadPage($scope.dataPage, $scope.filter); + Dialogs.triggerEvent('codbex-uoms.Settings.UoM.clearDetails'); + }, (error) => { + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'UoM', + message: `Unable to delete UoM: '${message}'`, + type: AlertTypes.Error + }); + console.error('EntityService:', error); + }); + } + }); + }; + + //----------------Dropdowns-----------------// + $scope.optionsDimension = []; + + + $http.get('/services/ts/codbex-uoms/gen/codbex-uoms/api/Settings/DimensionService.ts').then((response) => { + $scope.optionsDimension = response.data.map(e => ({ + value: e.Id, + text: e.Name + })); + }, (error) => { + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'Dimension', + message: `Unable to load data: '${message}'`, + type: AlertTypes.Error + }); + }); + + $scope.optionsDimensionValue = (optionKey) => { + for (let i = 0; i < $scope.optionsDimension.length; i++) { + if ($scope.optionsDimension[i].value === optionKey) { + return $scope.optionsDimension[i].text; + } + } + return null; + }; + //----------------Dropdowns-----------------// + + }); \ No newline at end of file diff --git a/codbex-uoms/gen/codbex-uoms/ui/Settings/UoM/dialog-filter/controller.js b/codbex-uoms/gen/codbex-uoms/ui/Settings/UoM/dialog-filter/controller.js new file mode 100644 index 0000000..16f2f1e --- /dev/null +++ b/codbex-uoms/gen/codbex-uoms/ui/Settings/UoM/dialog-filter/controller.js @@ -0,0 +1,91 @@ +angular.module('page', ['blimpKit', 'platformView']).controller('PageController', ($scope, ViewParameters) => { + const Dialogs = new DialogHub(); + $scope.entity = {}; + $scope.forms = { + details: {}, + }; + + let params = ViewParameters.get(); + if (Object.keys(params).length) { + $scope.entity = params.entity ?? {}; + $scope.selectedMainEntityKey = params.selectedMainEntityKey; + $scope.selectedMainEntityId = params.selectedMainEntityId; + $scope.optionsDimension = params.optionsDimension; + } + + $scope.filter = () => { + let entity = $scope.entity; + const filter = { + $filter: { + equals: { + }, + notEquals: { + }, + contains: { + }, + greaterThan: { + }, + greaterThanOrEqual: { + }, + lessThan: { + }, + lessThanOrEqual: { + } + }, + }; + if (entity.Id !== undefined) { + filter.$filter.equals.Id = entity.Id; + } + if (entity.Name) { + filter.$filter.contains.Name = entity.Name; + } + if (entity.ISO) { + filter.$filter.contains.ISO = entity.ISO; + } + if (entity.Dimension !== undefined) { + filter.$filter.equals.Dimension = entity.Dimension; + } + if (entity.SAP) { + filter.$filter.contains.SAP = entity.SAP; + } + if (entity.Numerator !== undefined) { + filter.$filter.equals.Numerator = entity.Numerator; + } + if (entity.Denominator !== undefined) { + filter.$filter.equals.Denominator = entity.Denominator; + } + if (entity.Rounding !== undefined) { + filter.$filter.equals.Rounding = entity.Rounding; + } + if (entity.Base !== undefined && entity.isBaseIndeterminate === false) { + filter.$filter.equals.Base = entity.Base; + } + Dialogs.postMessage({ topic: 'codbex-uoms.Settings.UoM.entitySearch', data: { + entity: entity, + filter: filter + }}); + $scope.cancel(); + }; + + $scope.resetFilter = () => { + $scope.entity = {}; + $scope.filter(); + }; + + $scope.alert = (message) => { + if (message) Dialogs.showAlert({ + title: 'Description', + message: message, + type: AlertTypes.Information, + preformatted: true, + }); + }; + + $scope.cancel = () => { + Dialogs.closeWindow({ id: 'UoM-filter' }); + }; + + $scope.clearErrorMessage = () => { + $scope.errorMessage = null; + }; +}); \ No newline at end of file diff --git a/codbex-uoms/gen/codbex-uoms/ui/Settings/UoM/dialog-filter/index.html b/codbex-uoms/gen/codbex-uoms/ui/Settings/UoM/dialog-filter/index.html new file mode 100644 index 0000000..3a94962 --- /dev/null +++ b/codbex-uoms/gen/codbex-uoms/ui/Settings/UoM/dialog-filter/index.html @@ -0,0 +1,159 @@ + + + + + + + + + + + + + + + + + {{ errorMessage }} + + + + +
+ Name +
+
+ + + + +
+
+ +
+ ISO +
+
+ + + + +
+
+ +
+ Dimension +
+
+ + +
+
+ +
+ SAP +
+
+ + + + +
+
+ +
+ Numerator +
+
+ + +
+
+ +
+ Denominator +
+
+ + +
+
+ +
+ Rounding +
+
+ + +
+
+ +
+
+ + + Base +
+
+
+
+
+ + + + + + + + + + + + + + + + + + diff --git a/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/dialog-filter/view.extension b/codbex-uoms/gen/codbex-uoms/ui/Settings/UoM/dialog-filter/view.extension similarity index 55% rename from codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/dialog-filter/view.extension rename to codbex-uoms/gen/codbex-uoms/ui/Settings/UoM/dialog-filter/view.extension index afbc8be..a1e1768 100644 --- a/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/dialog-filter/view.extension +++ b/codbex-uoms/gen/codbex-uoms/ui/Settings/UoM/dialog-filter/view.extension @@ -1,6 +1,6 @@ { - "module": "codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/dialog-filter/view.js", - "extensionPoint": "dialog-window", + "module": "codbex-uoms/gen/codbex-uoms/ui/Settings/UoM/dialog-filter/view.js", + "extensionPoint": "application-windows", "description": "codbex-uoms - Application Dialog Window", "role": "codbex-uoms.UnitsOfMeasures.UoMReadOnly,codbex-uoms.UnitsOfMeasures.UoMFullAccess" } \ No newline at end of file diff --git a/codbex-uoms/gen/codbex-uoms/ui/Settings/UoM/dialog-filter/view.js b/codbex-uoms/gen/codbex-uoms/ui/Settings/UoM/dialog-filter/view.js new file mode 100644 index 0000000..544ba4b --- /dev/null +++ b/codbex-uoms/gen/codbex-uoms/ui/Settings/UoM/dialog-filter/view.js @@ -0,0 +1,14 @@ +/* + * Generated by Eclipse Dirigible based on model and template. + * + * Do not modify the content as it may be re-generated again. + */ +const viewData = { + id: 'UoM-filter', + label: 'UoM Filter', + path: '/services/web/codbex-uoms/gen/codbex-uoms/ui/Settings/UoM/dialog-filter/index.html', + perspectiveName: 'Settings' +}; +if (typeof exports !== 'undefined') { + exports.getView = () => viewData; +} \ No newline at end of file diff --git a/codbex-uoms/gen/codbex-uoms/ui/Settings/UoM/dialog-window/controller.js b/codbex-uoms/gen/codbex-uoms/ui/Settings/UoM/dialog-window/controller.js new file mode 100644 index 0000000..ac53712 --- /dev/null +++ b/codbex-uoms/gen/codbex-uoms/ui/Settings/UoM/dialog-window/controller.js @@ -0,0 +1,118 @@ +angular.module('page', ['blimpKit', 'platformView', 'EntityService']) + .config(['EntityServiceProvider', (EntityServiceProvider) => { + EntityServiceProvider.baseUrl = '/services/ts/codbex-uoms/gen/codbex-uoms/api/Settings/UoMService.ts'; + }]) + .controller('PageController', ($scope, $http, ViewParameters, EntityService) => { + const Dialogs = new DialogHub(); + $scope.entity = {}; + $scope.forms = { + details: {}, + }; + $scope.formHeaders = { + select: 'UoM Details', + create: 'Create UoM', + update: 'Update UoM' + }; + $scope.action = 'select'; + + let params = ViewParameters.get(); + if (Object.keys(params).length) { + $scope.action = params.action; + $scope.entity = params.entity; + $scope.selectedMainEntityKey = params.selectedMainEntityKey; + $scope.selectedMainEntityId = params.selectedMainEntityId; + $scope.optionsDimension = params.optionsDimension; + } + + $scope.create = () => { + let entity = $scope.entity; + entity[$scope.selectedMainEntityKey] = $scope.selectedMainEntityId; + EntityService.create(entity).then((response) => { + Dialogs.postMessage({ topic: 'codbex-uoms.Settings.UoM.entityCreated', data: response.data }); + Dialogs.showAlert({ + title: 'UoM', + message: 'UoM successfully created', + type: AlertTypes.Success + }); + $scope.cancel(); + }, (error) => { + const message = error.data ? error.data.message : ''; + $scope.$evalAsync(() => { + $scope.errorMessage = `Unable to create UoM: '${message}'`; + }); + console.error('EntityService:', error); + }); + }; + + $scope.update = () => { + let id = $scope.entity.Id; + let entity = $scope.entity; + entity[$scope.selectedMainEntityKey] = $scope.selectedMainEntityId; + EntityService.update(id, entity).then((response) => { + Dialogs.postMessage({ topic: 'codbex-uoms.Settings.UoM.entityUpdated', data: response.data }); + Dialogs.showAlert({ + title: 'UoM', + message: 'UoM successfully updated', + type: AlertTypes.Success + }); + $scope.cancel(); + }, (error) => { + const message = error.data ? error.data.message : ''; + $scope.$evalAsync(() => { + $scope.errorMessage = `Unable to update UoM: '${message}'`; + }); + console.error('EntityService:', error); + }); + }; + + $scope.serviceDimension = '/services/ts/codbex-uoms/gen/codbex-uoms/api/Settings/DimensionService.ts'; + + $scope.optionsDimension = []; + + $http.get('/services/ts/codbex-uoms/gen/codbex-uoms/api/Settings/DimensionService.ts').then((response) => { + $scope.optionsDimension = response.data.map(e => { + return { + value: e.Id, + text: e.Name + } + }); + }, (error) => { + console.error(error); + const message = error.data ? error.data.message : ''; + Dialogs.showAlert({ + title: 'Dimension', + message: `Unable to load data: '${message}'`, + type: AlertTypes.Error + }); + }); + + $scope.$watch('entity.Dimension', (newValue, oldValue) => { + if (newValue !== undefined && newValue !== null) { + $http.get($scope.serviceDimension + '/' + newValue).then((response) => { + let valueFrom = response.data.SAP; + $scope.entity.SAP = valueFrom; + }, (error) => { + console.error(error); + }); + } + }); + + $scope.alert = (message) => { + if (message) Dialogs.showAlert({ + title: 'Description', + message: message, + type: AlertTypes.Information, + preformatted: true, + }); + }; + + $scope.cancel = () => { + $scope.entity = {}; + $scope.action = 'select'; + Dialogs.closeWindow({ id: 'UoM-details' }); + }; + + $scope.clearErrorMessage = () => { + $scope.errorMessage = null; + }; + }); \ No newline at end of file diff --git a/codbex-uoms/gen/codbex-uoms/ui/Settings/UoM/dialog-window/index.html b/codbex-uoms/gen/codbex-uoms/ui/Settings/UoM/dialog-window/index.html new file mode 100644 index 0000000..c778074 --- /dev/null +++ b/codbex-uoms/gen/codbex-uoms/ui/Settings/UoM/dialog-window/index.html @@ -0,0 +1,173 @@ + + + + + + + + + + + + + + + + + + {{ errorMessage }} + + + + +
+ Name +
+
+ + + + +
+
+ +
+ ISO +
+
+ + + + +
+
+ +
+ Dimension +
+
+ + +
+
+ +
+ SAP +
+
+ + + + +
+
+ +
+ Numerator +
+
+ + +
+
+ +
+ Denominator +
+
+ + +
+
+ +
+ Rounding +
+
+ + +
+
+ +
+
+ + + Base +
+
+
+
+
+ + + + + + + + + + + + + + + diff --git a/codbex-uoms/gen/codbex-uoms/ui/Settings/UoM/dialog-window/view.extension b/codbex-uoms/gen/codbex-uoms/ui/Settings/UoM/dialog-window/view.extension new file mode 100644 index 0000000..3caed52 --- /dev/null +++ b/codbex-uoms/gen/codbex-uoms/ui/Settings/UoM/dialog-window/view.extension @@ -0,0 +1,6 @@ +{ + "module": "codbex-uoms/gen/codbex-uoms/ui/Settings/UoM/dialog-window/view.js", + "extensionPoint": "application-windows", + "description": "codbex-uoms - Application Dialog Window", + "role": "codbex-uoms.UnitsOfMeasures.UoMReadOnly,codbex-uoms.UnitsOfMeasures.UoMFullAccess" +} \ No newline at end of file diff --git a/codbex-uoms/gen/codbex-uoms/ui/Settings/UoM/dialog-window/view.js b/codbex-uoms/gen/codbex-uoms/ui/Settings/UoM/dialog-window/view.js new file mode 100644 index 0000000..f7dffd6 --- /dev/null +++ b/codbex-uoms/gen/codbex-uoms/ui/Settings/UoM/dialog-window/view.js @@ -0,0 +1,14 @@ +/* + * Generated by Eclipse Dirigible based on model and template. + * + * Do not modify the content as it may be re-generated again. + */ +const viewData = { + id: 'UoM-details', + label: 'UoM', + path: '/services/web/codbex-uoms/gen/codbex-uoms/ui/Settings/UoM/dialog-window/index.html', + perspectiveName: 'Settings' +}; +if (typeof exports !== 'undefined') { + exports.getView = () => viewData; +} \ No newline at end of file diff --git a/codbex-uoms/gen/codbex-uoms/ui/Settings/UoM/index.html b/codbex-uoms/gen/codbex-uoms/ui/Settings/UoM/index.html new file mode 100644 index 0000000..d188fae --- /dev/null +++ b/codbex-uoms/gen/codbex-uoms/ui/Settings/UoM/index.html @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + Items + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameISODimensionSAPNumeratorDenominatorRoundingBase
No data available.
{{next.Name}}{{next.ISO}} + {{optionsDimensionValue(next.Dimension)}} + {{next.SAP}}{{next.Numerator}}{{next.Denominator}}{{next.Rounding}} + + + + + + + + + + + + + + + + + +
+
+ + + + + + + diff --git a/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/view.extension b/codbex-uoms/gen/codbex-uoms/ui/Settings/UoM/view.extension similarity index 56% rename from codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/view.extension rename to codbex-uoms/gen/codbex-uoms/ui/Settings/UoM/view.extension index bdac6ff..bfda99e 100644 --- a/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/view.extension +++ b/codbex-uoms/gen/codbex-uoms/ui/Settings/UoM/view.extension @@ -1,6 +1,6 @@ { - "module": "codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/view.js", - "extensionPoint": "codbex-uoms-view", + "module": "codbex-uoms/gen/codbex-uoms/ui/Settings/UoM/view.js", + "extensionPoint": "application-settings", "description": "codbex-uoms - Application View", "role": "codbex-uoms.UnitsOfMeasures.UoMReadOnly,codbex-uoms.UnitsOfMeasures.UoMFullAccess" } \ No newline at end of file diff --git a/codbex-uoms/gen/codbex-uoms/ui/Settings/UoM/view.js b/codbex-uoms/gen/codbex-uoms/ui/Settings/UoM/view.js new file mode 100644 index 0000000..8636d5e --- /dev/null +++ b/codbex-uoms/gen/codbex-uoms/ui/Settings/UoM/view.js @@ -0,0 +1,17 @@ +/* + * Generated by Eclipse Dirigible based on model and template. + * + * Do not modify the content as it may be re-generated again. + */ +const viewData = { + id: 'UoM', + label: 'UoM', + region: 'center', + lazyLoad: true, + autoFocusTab: false, + path: '/services/web/codbex-uoms/gen/codbex-uoms/ui/Settings/UoM/index.html', + perspectiveName: 'Settings' +}; +if (typeof exports !== 'undefined') { + exports.getView = () => viewData; +} \ No newline at end of file diff --git a/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/controller.js b/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/controller.js deleted file mode 100644 index 6d34784..0000000 --- a/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/controller.js +++ /dev/null @@ -1,197 +0,0 @@ -angular.module('page', ["ideUI", "ideView", "entityApi"]) - .config(["messageHubProvider", function (messageHubProvider) { - messageHubProvider.eventIdPrefix = 'codbex-uoms.UnitsOfMeasures.UoM'; - }]) - .config(["entityApiProvider", function (entityApiProvider) { - entityApiProvider.baseUrl = "/services/ts/codbex-uoms/gen/codbex-uoms/api/UnitsOfMeasures/UoMService.ts"; - }]) - .controller('PageController', ['$scope', '$http', 'messageHub', 'entityApi', 'Extensions', function ($scope, $http, messageHub, entityApi, Extensions) { - - $scope.dataPage = 1; - $scope.dataCount = 0; - $scope.dataOffset = 0; - $scope.dataLimit = 10; - $scope.action = "select"; - - //-----------------Custom Actions-------------------// - Extensions.get('dialogWindow', 'codbex-uoms-custom-action').then(function (response) { - $scope.pageActions = response.filter(e => e.perspective === "UnitsOfMeasures" && e.view === "UoM" && (e.type === "page" || e.type === undefined)); - }); - - $scope.triggerPageAction = function (action) { - messageHub.showDialogWindow( - action.id, - {}, - null, - true, - action - ); - }; - //-----------------Custom Actions-------------------// - - function refreshData() { - $scope.dataReset = true; - $scope.dataPage--; - } - - function resetPagination() { - $scope.dataReset = true; - $scope.dataPage = 1; - $scope.dataCount = 0; - $scope.dataLimit = 10; - } - - //-----------------Events-------------------// - messageHub.onDidReceiveMessage("clearDetails", function (msg) { - $scope.$apply(function () { - $scope.selectedEntity = null; - $scope.action = "select"; - }); - }); - - messageHub.onDidReceiveMessage("entityCreated", function (msg) { - refreshData(); - $scope.loadPage($scope.dataPage, $scope.filter); - }); - - messageHub.onDidReceiveMessage("entityUpdated", function (msg) { - refreshData(); - $scope.loadPage($scope.dataPage, $scope.filter); - }); - - messageHub.onDidReceiveMessage("entitySearch", function (msg) { - resetPagination(); - $scope.filter = msg.data.filter; - $scope.filterEntity = msg.data.entity; - $scope.loadPage($scope.dataPage, $scope.filter); - }); - //-----------------Events-------------------// - - $scope.loadPage = function (pageNumber, filter) { - if (!filter && $scope.filter) { - filter = $scope.filter; - } - if (!filter) { - filter = {}; - } - $scope.selectedEntity = null; - entityApi.count(filter).then(function (response) { - if (response.status != 200) { - messageHub.showAlertError("UoM", `Unable to count UoM: '${response.message}'`); - return; - } - if (response.data) { - $scope.dataCount = response.data; - } - $scope.dataPages = Math.ceil($scope.dataCount / $scope.dataLimit); - filter.$offset = ($scope.dataPage - 1) * $scope.dataLimit; - filter.$limit = $scope.dataLimit; - if ($scope.dataReset) { - filter.$offset = 0; - filter.$limit = $scope.dataPage * $scope.dataLimit; - } - - entityApi.search(filter).then(function (response) { - if (response.status != 200) { - messageHub.showAlertError("UoM", `Unable to list/filter UoM: '${response.message}'`); - return; - } - if ($scope.data == null || $scope.dataReset) { - $scope.data = []; - $scope.dataReset = false; - } - $scope.data = $scope.data.concat(response.data); - $scope.dataPage++; - }); - }); - }; - $scope.loadPage($scope.dataPage, $scope.filter); - - $scope.selectEntity = function (entity) { - $scope.selectedEntity = entity; - messageHub.postMessage("entitySelected", { - entity: entity, - selectedMainEntityId: entity.Id, - optionsDimension: $scope.optionsDimension, - }); - }; - - $scope.createEntity = function () { - $scope.selectedEntity = null; - $scope.action = "create"; - - messageHub.postMessage("createEntity", { - entity: {}, - optionsDimension: $scope.optionsDimension, - }); - }; - - $scope.updateEntity = function () { - $scope.action = "update"; - messageHub.postMessage("updateEntity", { - entity: $scope.selectedEntity, - optionsDimension: $scope.optionsDimension, - }); - }; - - $scope.deleteEntity = function () { - let id = $scope.selectedEntity.Id; - messageHub.showDialogAsync( - 'Delete UoM?', - `Are you sure you want to delete UoM? This action cannot be undone.`, - [{ - id: "delete-btn-yes", - type: "emphasized", - label: "Yes", - }, - { - id: "delete-btn-no", - type: "normal", - label: "No", - }], - ).then(function (msg) { - if (msg.data === "delete-btn-yes") { - entityApi.delete(id).then(function (response) { - if (response.status != 204) { - messageHub.showAlertError("UoM", `Unable to delete UoM: '${response.message}'`); - return; - } - refreshData(); - $scope.loadPage($scope.dataPage, $scope.filter); - messageHub.postMessage("clearDetails"); - }); - } - }); - }; - - $scope.openFilter = function (entity) { - messageHub.showDialogWindow("UoM-filter", { - entity: $scope.filterEntity, - optionsDimension: $scope.optionsDimension, - }); - }; - - //----------------Dropdowns-----------------// - $scope.optionsDimension = []; - - - $http.get("/services/ts/codbex-uoms/gen/codbex-uoms/api/Dimensions/DimensionService.ts").then(function (response) { - $scope.optionsDimension = response.data.map(e => { - return { - value: e.Id, - text: e.Name - } - }); - }); - - $scope.optionsDimensionValue = function (optionKey) { - for (let i = 0; i < $scope.optionsDimension.length; i++) { - if ($scope.optionsDimension[i].value === optionKey) { - return $scope.optionsDimension[i].text; - } - } - return null; - }; - //----------------Dropdowns-----------------// - - }]); diff --git a/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/dialog-filter/controller.js b/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/dialog-filter/controller.js deleted file mode 100644 index dcdcb10..0000000 --- a/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/dialog-filter/controller.js +++ /dev/null @@ -1,88 +0,0 @@ -angular.module('page', ["ideUI", "ideView"]) - .config(["messageHubProvider", function (messageHubProvider) { - messageHubProvider.eventIdPrefix = 'codbex-uoms.UnitsOfMeasures.UoM'; - }]) - .controller('PageController', ['$scope', 'messageHub', 'ViewParameters', function ($scope, messageHub, ViewParameters) { - - $scope.entity = {}; - $scope.forms = { - details: {}, - }; - - let params = ViewParameters.get(); - if (Object.keys(params).length) { - $scope.entity = params.entity ?? {}; - $scope.selectedMainEntityKey = params.selectedMainEntityKey; - $scope.selectedMainEntityId = params.selectedMainEntityId; - $scope.optionsDimension = params.optionsDimension; - } - - $scope.filter = function () { - let entity = $scope.entity; - const filter = { - $filter: { - equals: { - }, - notEquals: { - }, - contains: { - }, - greaterThan: { - }, - greaterThanOrEqual: { - }, - lessThan: { - }, - lessThanOrEqual: { - } - }, - }; - if (entity.Id !== undefined) { - filter.$filter.equals.Id = entity.Id; - } - if (entity.Name) { - filter.$filter.contains.Name = entity.Name; - } - if (entity.ISO) { - filter.$filter.contains.ISO = entity.ISO; - } - if (entity.Dimension !== undefined) { - filter.$filter.equals.Dimension = entity.Dimension; - } - if (entity.SAP) { - filter.$filter.contains.SAP = entity.SAP; - } - if (entity.Numerator !== undefined) { - filter.$filter.equals.Numerator = entity.Numerator; - } - if (entity.Denominator !== undefined) { - filter.$filter.equals.Denominator = entity.Denominator; - } - if (entity.Rounding !== undefined) { - filter.$filter.equals.Rounding = entity.Rounding; - } - if (entity.Base !== undefined && entity.isBaseIndeterminate === false) { - filter.$filter.equals.Base = entity.Base; - } - messageHub.postMessage("entitySearch", { - entity: entity, - filter: filter - }); - messageHub.postMessage("clearDetails"); - $scope.cancel(); - }; - - $scope.resetFilter = function () { - $scope.entity = {}; - $scope.filter(); - }; - - $scope.cancel = function () { - messageHub.closeDialogWindow("UoM-filter"); - }; - - $scope.clearErrorMessage = function () { - $scope.errorMessage = null; - }; - - }]); \ No newline at end of file diff --git a/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/dialog-filter/index.html b/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/dialog-filter/index.html deleted file mode 100644 index 4ed2880..0000000 --- a/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/dialog-filter/index.html +++ /dev/null @@ -1,176 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - -
- Name -
-
- - - - Incorrect Input - -
-
- -
- ISO -
-
- - - - Incorrect Input - -
-
- -
- Dimension -
-
- - -
-
- -
- SAP -
-
- - - - Incorrect Input - -
-
- -
- Numerator -
-
- - -
-
- -
- Denominator -
-
- - -
-
- -
- Rounding -
-
- - -
-
- -
-
- - - Base -
-
-
-
-
- - - - - - - - - - - - - - - - - - diff --git a/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/dialog-filter/view.js b/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/dialog-filter/view.js deleted file mode 100644 index 7bf7368..0000000 --- a/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/dialog-filter/view.js +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Generated by Eclipse Dirigible based on model and template. - * - * Do not modify the content as it may be re-generated again. - */ -const viewData = { - id: "UoM-filter", - label: "UoM Filter", - link: "/services/web/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/dialog-filter/index.html", - perspectiveName: "UnitsOfMeasures" -}; - -if (typeof exports !== 'undefined') { - exports.getDialogWindow = function () { - return viewData; - } -} \ No newline at end of file diff --git a/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/dialog-window/controller.js b/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/dialog-window/controller.js deleted file mode 100644 index b87a25f..0000000 --- a/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/dialog-window/controller.js +++ /dev/null @@ -1,91 +0,0 @@ -angular.module('page', ["ideUI", "ideView", "entityApi"]) - .config(["messageHubProvider", function (messageHubProvider) { - messageHubProvider.eventIdPrefix = 'codbex-uoms.UnitsOfMeasures.UoM'; - }]) - .config(["entityApiProvider", function (entityApiProvider) { - entityApiProvider.baseUrl = "/services/ts/codbex-uoms/gen/codbex-uoms/api/UnitsOfMeasures/UoMService.ts"; - }]) - .controller('PageController', ['$scope', '$http', 'messageHub', 'ViewParameters', 'entityApi', function ($scope, $http, messageHub, ViewParameters, entityApi) { - - $scope.entity = {}; - $scope.forms = { - details: {}, - }; - $scope.formHeaders = { - select: "UoM Details", - create: "Create UoM", - update: "Update UoM" - }; - $scope.action = 'select'; - - let params = ViewParameters.get(); - if (Object.keys(params).length) { - $scope.action = params.action; - $scope.entity = params.entity; - $scope.selectedMainEntityKey = params.selectedMainEntityKey; - $scope.selectedMainEntityId = params.selectedMainEntityId; - $scope.optionsDimension = params.optionsDimension; - } - - $scope.create = function () { - let entity = $scope.entity; - entity[$scope.selectedMainEntityKey] = $scope.selectedMainEntityId; - entityApi.create(entity).then(function (response) { - if (response.status != 201) { - $scope.errorMessage = `Unable to create UoM: '${response.message}'`; - return; - } - messageHub.postMessage("entityCreated", response.data); - $scope.cancel(); - messageHub.showAlertSuccess("UoM", "UoM successfully created"); - }); - }; - - $scope.update = function () { - let id = $scope.entity.Id; - let entity = $scope.entity; - entity[$scope.selectedMainEntityKey] = $scope.selectedMainEntityId; - entityApi.update(id, entity).then(function (response) { - if (response.status != 200) { - $scope.errorMessage = `Unable to update UoM: '${response.message}'`; - return; - } - messageHub.postMessage("entityUpdated", response.data); - $scope.cancel(); - messageHub.showAlertSuccess("UoM", "UoM successfully updated"); - }); - }; - - $scope.serviceDimension = "/services/ts/codbex-uoms/gen/codbex-uoms/api/Dimensions/DimensionService.ts"; - - $scope.optionsDimension = []; - - $http.get("/services/ts/codbex-uoms/gen/codbex-uoms/api/Dimensions/DimensionService.ts").then(function (response) { - $scope.optionsDimension = response.data.map(e => { - return { - value: e.Id, - text: e.Name - } - }); - }); - - $scope.$watch('entity.Dimension', function (newValue, oldValue) { - if (newValue !== undefined && newValue !== null) { - entityApi.$http.get($scope.serviceDimension + '/' + newValue).then(function (response) { - let valueFrom = response.data.SAP; - $scope.entity.SAP = valueFrom; - }); - } - }); - - $scope.cancel = function () { - $scope.entity = {}; - $scope.action = 'select'; - messageHub.closeDialogWindow("UoM-details"); - }; - - $scope.clearErrorMessage = function () { - $scope.errorMessage = null; - }; - - }]); \ No newline at end of file diff --git a/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/dialog-window/index.html b/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/dialog-window/index.html deleted file mode 100644 index f8bd438..0000000 --- a/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/dialog-window/index.html +++ /dev/null @@ -1,200 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - -
- Name -
-
- - - - The value doesn't match the required pattern '' - - -
-
- -
- ISO -
-
- - - - The value doesn't match the required pattern '' - - -
-
- -
- Dimension -
-
- - - -
-
- -
- SAP -
-
- - - - The value doesn't match the required pattern '' - - -
-
- -
- Numerator -
-
- - - -
-
- -
- Denominator -
-
- - - -
-
- -
- Rounding -
-
- - - -
-
- -
-
- - - Base -
-
- -
-
-
-
-
- - - - - - - - - - - - - - - diff --git a/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/dialog-window/view.extension b/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/dialog-window/view.extension deleted file mode 100644 index 48abf07..0000000 --- a/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/dialog-window/view.extension +++ /dev/null @@ -1,6 +0,0 @@ -{ - "module": "{{projectName}}/gen/{{genFolderName}}/ui/{{perspectiveName}}/{{name}}/dialog-window/view.js", - "extensionPoint": "dialog-window", - "description": "{{projectName}} - Application Dialog Window", - "role": "codbex-uoms.UnitsOfMeasures.UoMReadOnly,codbex-uoms.UnitsOfMeasures.UoMFullAccess" -} \ No newline at end of file diff --git a/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/dialog-window/view.js b/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/dialog-window/view.js deleted file mode 100644 index b0c0a02..0000000 --- a/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/dialog-window/view.js +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Generated by Eclipse Dirigible based on model and template. - * - * Do not modify the content as it may be re-generated again. - */ -const viewData = { - id: "UoM-details", - label: "UoM", - link: "/services/web/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/dialog-window/index.html", - perspectiveName: "UnitsOfMeasures", - roles: [ - "codbex-uoms.UnitsOfMeasures.UoMReadOnly", - ] -}; - -if (typeof exports !== 'undefined') { - exports.getDialogWindow = function () { - return viewData; - } -} \ No newline at end of file diff --git a/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/index.html b/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/index.html deleted file mode 100644 index 7ab4fec..0000000 --- a/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/index.html +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - - - - - - - - - - - - Items - - - - - - - - - - - - - - - - - - - - - - - - - {{next.ISO}} | - {{optionsDimensionValue(next.Dimension)}} | - {{next.SAP}} | - {{next.Numerator}} | - {{next.Denominator}} | - {{next.Rounding}} | - {{next.Base}} - - - - - - - Load More ... - - - - - diff --git a/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/main-details/controller.js b/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/main-details/controller.js deleted file mode 100644 index bf7100f..0000000 --- a/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/main-details/controller.js +++ /dev/null @@ -1,143 +0,0 @@ -angular.module('page', ["ideUI", "ideView", "entityApi"]) - .config(["messageHubProvider", function (messageHubProvider) { - messageHubProvider.eventIdPrefix = 'codbex-uoms.UnitsOfMeasures.UoM'; - }]) - .config(["entityApiProvider", function (entityApiProvider) { - entityApiProvider.baseUrl = "/services/ts/codbex-uoms/gen/codbex-uoms/api/UnitsOfMeasures/UoMService.ts"; - }]) - .controller('PageController', ['$scope', '$http', 'Extensions', 'messageHub', 'entityApi', function ($scope, $http, Extensions, messageHub, entityApi) { - - $scope.entity = {}; - $scope.forms = { - details: {}, - }; - $scope.formHeaders = { - select: "UoM Details", - create: "Create UoM", - update: "Update UoM" - }; - $scope.action = 'select'; - - //-----------------Custom Actions-------------------// - Extensions.get('dialogWindow', 'codbex-uoms-custom-action').then(function (response) { - $scope.entityActions = response.filter(e => e.perspective === "UnitsOfMeasures" && e.view === "UoM" && e.type === "entity"); - }); - - $scope.triggerEntityAction = function (action) { - messageHub.showDialogWindow( - action.id, - { - id: $scope.entity.Id - }, - null, - true, - action - ); - }; - //-----------------Custom Actions-------------------// - - //-----------------Events-------------------// - messageHub.onDidReceiveMessage("clearDetails", function (msg) { - $scope.$apply(function () { - $scope.entity = {}; - $scope.optionsDimension = []; - $scope.action = 'select'; - }); - }); - - messageHub.onDidReceiveMessage("entitySelected", function (msg) { - $scope.$apply(function () { - $scope.entity = msg.data.entity; - $scope.optionsDimension = msg.data.optionsDimension; - $scope.action = 'select'; - }); - }); - - messageHub.onDidReceiveMessage("createEntity", function (msg) { - $scope.$apply(function () { - $scope.entity = {}; - $scope.optionsDimension = msg.data.optionsDimension; - $scope.action = 'create'; - }); - }); - - messageHub.onDidReceiveMessage("updateEntity", function (msg) { - $scope.$apply(function () { - $scope.entity = msg.data.entity; - $scope.optionsDimension = msg.data.optionsDimension; - $scope.action = 'update'; - }); - }); - - $scope.serviceDimension = "/services/ts/codbex-uoms/gen/codbex-uoms/api/Dimensions/DimensionService.ts"; - - - $scope.$watch('entity.Dimension', function (newValue, oldValue) { - if (newValue !== undefined && newValue !== null) { - entityApi.$http.get($scope.serviceDimension + '/' + newValue).then(function (response) { - let valueFrom = response.data.SAP; - $scope.entity.SAP = valueFrom; - }); - } - }); - //-----------------Events-------------------// - - $scope.create = function () { - entityApi.create($scope.entity).then(function (response) { - if (response.status != 201) { - messageHub.showAlertError("UoM", `Unable to create UoM: '${response.message}'`); - return; - } - messageHub.postMessage("entityCreated", response.data); - messageHub.postMessage("clearDetails", response.data); - messageHub.showAlertSuccess("UoM", "UoM successfully created"); - }); - }; - - $scope.update = function () { - entityApi.update($scope.entity.Id, $scope.entity).then(function (response) { - if (response.status != 200) { - messageHub.showAlertError("UoM", `Unable to update UoM: '${response.message}'`); - return; - } - messageHub.postMessage("entityUpdated", response.data); - messageHub.postMessage("clearDetails", response.data); - messageHub.showAlertSuccess("UoM", "UoM successfully updated"); - }); - }; - - $scope.cancel = function () { - messageHub.postMessage("clearDetails"); - }; - - //-----------------Dialogs-------------------// - - $scope.createDimension = function () { - messageHub.showDialogWindow("Dimension-details", { - action: "create", - entity: {}, - }, null, false); - }; - - //-----------------Dialogs-------------------// - - - - //----------------Dropdowns-----------------// - - $scope.refreshDimension = function () { - $scope.optionsDimension = []; - $http.get("/services/ts/codbex-uoms/gen/codbex-uoms/api/Dimensions/DimensionService.ts").then(function (response) { - $scope.optionsDimension = response.data.map(e => { - return { - value: e.Id, - text: e.Name - } - }); - }); - }; - - //----------------Dropdowns-----------------// - - - }]); \ No newline at end of file diff --git a/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/main-details/index.html b/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/main-details/index.html deleted file mode 100644 index 8016122..0000000 --- a/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/main-details/index.html +++ /dev/null @@ -1,206 +0,0 @@ - - - - - - - - - - - - - - - - - - - - -
- Name -
-
- - - - The value doesn't match the required pattern '' - - -
-
- -
- ISO -
-
- - - - The value doesn't match the required pattern '' - - -
-
- -
- Dimension -
-
- - -
-
- - - -
-
- -
- SAP -
-
- - - - The value doesn't match the required pattern '' - - -
-
- -
- Numerator -
-
- - - -
-
- -
- Denominator -
-
- - - -
-
- -
- Rounding -
-
- - - -
-
- -
-
- - - Base -
-
- -
-
-
-
-
- - - - - - - - - - - - - - - - - - - - - diff --git a/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/main-details/view.extension b/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/main-details/view.extension deleted file mode 100644 index cf6f042..0000000 --- a/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/main-details/view.extension +++ /dev/null @@ -1,6 +0,0 @@ -{ - "module": "codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/main-details/view.js", - "extensionPoint": "codbex-uoms-view", - "description": "codbex-uoms - Application View - Main Details", - "role": "codbex-uoms.UnitsOfMeasures.UoMReadOnly,codbex-uoms.UnitsOfMeasures.UoMFullAccess" -} \ No newline at end of file diff --git a/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/main-details/view.js b/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/main-details/view.js deleted file mode 100644 index 620fa94..0000000 --- a/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/main-details/view.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Generated by Eclipse Dirigible based on model and template. - * - * Do not modify the content as it may be re-generated again. - */ -const viewData = { - id: "UoM-details", - label: "UoM", - factory: "frame", - region: "center", - link: "/services/web/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/main-details/index.html", - perspectiveName: "UnitsOfMeasures" -}; - -if (typeof exports !== 'undefined') { - exports.getView = function () { - return viewData; - } -} diff --git a/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/tile-portal.extension b/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/tile-portal.extension deleted file mode 100644 index 88aa15d..0000000 --- a/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/tile-portal.extension +++ /dev/null @@ -1,6 +0,0 @@ -{ - "module": "codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/tile.js", - "extensionPoint": "portal-tile", - "description": "codbex-uoms - Application Tile", - "role": "codbex-uoms.UnitsOfMeasures.UoMReadOnly,codbex-uoms.UnitsOfMeasures.UoMFullAccess" -} \ No newline at end of file diff --git a/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/tile.extension b/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/tile.extension deleted file mode 100644 index d13b8c6..0000000 --- a/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/tile.extension +++ /dev/null @@ -1,6 +0,0 @@ -{ - "module": "codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/tile.js", - "extensionPoint": "codbex-uoms-tile", - "description": "codbex-uoms - Application Tile", - "role": "codbex-uoms.UnitsOfMeasures.UoMReadOnly,codbex-uoms.UnitsOfMeasures.UoMFullAccess" -} \ No newline at end of file diff --git a/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/tile.js b/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/tile.js deleted file mode 100644 index f414852..0000000 --- a/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/tile.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Generated by Eclipse Dirigible based on model and template. - * - * Do not modify the content as it may be re-generated again. - */ -exports.getTile = function () { - return { - group: "codbex-uoms", - name: "UoM", - caption: "Manage entity UoM", - tooltip: "Unit of Measures", - type: "SETTING", - report: "false", - icon: "cubes", - location: "/services/web/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/index.html", - order: "100", - groupOrder: "980" - }; -} diff --git a/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/view.js b/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/view.js deleted file mode 100644 index 54aac7f..0000000 --- a/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/view.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Generated by Eclipse Dirigible based on model and template. - * - * Do not modify the content as it may be re-generated again. - */ -const viewData = { - id: "UoM", - label: "UoM", - factory: "frame", - region: "left", - link: "/services/web/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/UoM/index.html", - perspectiveName: "UnitsOfMeasures" -}; - -if (typeof exports !== 'undefined') { - exports.getView = function () { - return viewData; - } -} diff --git a/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/index.html b/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/index.html deleted file mode 100644 index 81c5a2a..0000000 --- a/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/index.html +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - {{state.busyText}} - - - Encounterd an error while loading - - - - - - - diff --git a/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/perspective-portal.extension b/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/perspective-portal.extension deleted file mode 100644 index f6c93c2..0000000 --- a/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/perspective-portal.extension +++ /dev/null @@ -1,5 +0,0 @@ -{ - "module": "codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/perspective.js", - "extensionPoint": "portal", - "description": "codbex-uoms - Perspective - UnitsOfMeasures" -} \ No newline at end of file diff --git a/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/perspective.extension b/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/perspective.extension deleted file mode 100644 index 60d3298..0000000 --- a/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/perspective.extension +++ /dev/null @@ -1,5 +0,0 @@ -{ - "module": "codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/perspective.js", - "extensionPoint": "codbex-uoms", - "description": "codbex-uoms - Perspective - UnitsOfMeasures" -} \ No newline at end of file diff --git a/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/perspective.js b/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/perspective.js deleted file mode 100644 index 50097bf..0000000 --- a/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/perspective.js +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Generated by Eclipse Dirigible based on model and template. - * - * Do not modify the content as it may be re-generated again. - */ -const perspectiveData = { - id: 'UnitsOfMeasures', - name: 'Units of Measures', - link: '/services/web/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/index.html', - order: '980', - icon: '/services/web/resources/unicons/arrows-resize-v.svg' -}; - -if (typeof exports !== 'undefined') { - exports.getPerspective = function () { - return perspectiveData; - } -} \ No newline at end of file diff --git a/codbex-uoms/gen/codbex-uoms/ui/launchpad/Home/controller.js b/codbex-uoms/gen/codbex-uoms/ui/launchpad/Home/controller.js deleted file mode 100644 index 96fb207..0000000 --- a/codbex-uoms/gen/codbex-uoms/ui/launchpad/Home/controller.js +++ /dev/null @@ -1,167 +0,0 @@ -/* - * Generated by Eclipse Dirigible based on model and template. - * - * Do not modify the content as it may be re-generated again. - */ -angular.module('page', ['ideUI', 'ideView', 'entityApi']) - .config(['messageHubProvider', function (messageHubProvider) { - messageHubProvider.eventIdPrefix = 'codbex-uoms.launchpad.Home'; - }]) - .config(['entityApiProvider', function (entityApiProvider) { - entityApiProvider.baseUrl = '/services/js/codbex-uoms/gen/codbex-uoms/ui/launchpad/Home/tiles.js'; - }]) - .controller('PageController', ['$scope', 'messageHub', 'entityApi', '$document', function ($scope, messageHub, entityApi, $document) { - const favoritesStoreId = 'DIRIGIBLE.codbex-uoms.favorites'; - $scope.state = { - isBusy: true, - error: false, - busyText: 'Loading...', - }; - $scope.modules = []; - $scope.referenceData = []; - $scope.favorites = []; - $scope.hasFavorites = false; - $scope.editMode = false; - $scope.favIcons = { - 'report': 'sap-icon--vertical-bar-chart', - 'entity': 'sap-icon--form', - 'setting': 'sap-icon--settings' - }; - - $scope.openView = function (location, name) { - messageHub.postMessage('openView', { - location: (name ? `${location.substring(0, location.indexOf('/gen/ui/'))}/gen/ui/Reports/index.html?${name}` : location) - }); - }; - - $scope.toggleEditMode = function () { - $scope.editMode = !$scope.editMode; - }; - - function saveFavorites() { - let favorites = []; - for (let i = 0; i < $scope.favorites.length; i++) { - favorites.push($scope.favorites[i].id); - } - localStorage.setItem(favoritesStoreId, JSON.stringify(favorites)); - } - - $scope.removeFavorite = function (pos) { - $scope.favorites.splice(pos, 1); - saveFavorites(); - $scope.hasFavorites = $scope.favorites.length > 0; - if ($scope.favorites.length === 0) $scope.editMode = false; - }; - - $scope.toggleFavorite = function (module, type, name, location, caption) { - const id = `${module}.${type}.${name}`; - if (!$scope.favorites.some((elem, pos) => { - if (elem.id === id) { - $scope.favorites.splice(pos, 1); - return true - } return false; - })) { - $scope.favorites.push({ - id: id, - type: type, - name: name, - location: location, - caption: caption, - }); - } - saveFavorites(); - $scope.hasFavorites = $scope.favorites.length > 0; - }; - - $scope.isFavorite = function (module, type, name) { - const id = `${module}.${type}.${name}`; - if ($scope.favorites.some(e => e.id === id)) { - return true; - } return false; - }; - - entityApi.list().then(function (response) { - if (response.status != 200) { - messageHub.showAlertError('Home', `Unable to get Home Launchpad: '${response.message}'`); - $scope.state.isBusy = false; - $scope.state.error = true; - return; - } - - $scope.modules = response.data.modules.filter(module => (module.name !== 'Reports')); - for (let i = 0; i < response.data.referenceData.length; i++) { - $scope.referenceData.push(...response.data.referenceData[i].settings); - } - - const storedFavorites = JSON.parse(localStorage.getItem(favoritesStoreId) || '[]'); - for (let mi = 0; mi < $scope.modules.length; mi++) { - for (let ei = 0; ei < $scope.modules[mi].entities.length; ei++) { - const id = `${$scope.modules[mi].name}.entity.${$scope.modules[mi].entities[ei].name}`; - const index = storedFavorites.indexOf(id); - if (index > -1) { - storedFavorites[index] = { - id: id, - type: 'entity', - name: $scope.modules[mi].entities[ei].name, - location: $scope.modules[mi].entities[ei].location, - caption: $scope.modules[mi].entities[ei].caption, - }; - } - } - for (let ri = 0; ri < $scope.modules[mi].reports.length; ri++) { - const id = `${$scope.modules[mi].name}.report.${$scope.modules[mi].reports[ri].name}`; - const index = storedFavorites.indexOf(id); - if (index > -1) { - storedFavorites[index] = { - id: id, - type: 'report', - name: $scope.modules[mi].reports[ri].name, - location: $scope.modules[mi].reports[ri].location, - caption: $scope.modules[mi].reports[ri].caption, - }; - } - } - for (let ri = 0; ri < $scope.modules[mi].settings.length; ri++) { - const id = `${$scope.modules[mi].name}.setting.${$scope.modules[mi].settings[ri].name}`; - const index = storedFavorites.indexOf(id); - if (index > -1) { - storedFavorites[index] = { - id: id, - type: 'setting', - name: $scope.modules[mi].settings[ri].name, - location: $scope.modules[mi].settings[ri].location, - caption: $scope.modules[mi].settings[ri].caption, - }; - } - } - } - $scope.favorites = storedFavorites.filter(fav => (typeof fav !== 'string')); - $scope.hasFavorites = $scope.favorites.length > 0; - saveFavorites(); - $scope.state.isBusy = false; - }, function (error) { - console.error(error); - $scope.state.error = true; - }); - - function favoriteOrderChange(evt) { - const elem = $scope.favorites.splice(evt.oldIndex, 1)[0]; - $scope.$apply(function () { - $scope.favorites.splice(evt.newIndex, 0, elem); - }); - saveFavorites(); - } - - angular.element($document[0]).ready(function () { - Sortable.create($document[0].getElementById('favorites'), { - group: { - name: 'favorites', - put: false - }, - animation: 200, - onEnd: favoriteOrderChange, - onMove: () => $scope.editMode - }); - }); - }]); - diff --git a/codbex-uoms/gen/codbex-uoms/ui/launchpad/Home/index.html b/codbex-uoms/gen/codbex-uoms/ui/launchpad/Home/index.html deleted file mode 100644 index 99dc874..0000000 --- a/codbex-uoms/gen/codbex-uoms/ui/launchpad/Home/index.html +++ /dev/null @@ -1,212 +0,0 @@ - - - - - - - - - - - - - - - - - - - - -
-
-

UoM Management Application

-
-

Managing UoMs data

- -
-
General -
-
- - - - - Applications Portal - Central entry point to installed applications - - - - - - - - Process Inbox - Execute user tasks from running processes - - - - - - - - Documents Storage - Browse and manage documents - - - -
- - -
Favorites
- - - -
-
- - - - - - - {{fav.name}} - {{fav.caption}} - - - -
- - -
Modules
- - - - - - - - - - - - -
-
-
-
-
-
- {{::module.name}} -
- - - - - - - -
- - - - -
-
-
-
-
- - - - - - - - - - - - - - - - - - - -
Entities
No entities -
- {{::entity.name}} - - - -
-
- - - - - - - - - - - - - - - - - -
Reports
No reports -
- {{::report.name}} - - - -
-
-
-
-
-
-
-
-
- - {{state.busyText}} - - - Error while initializing launchpad - - - - diff --git a/codbex-uoms/gen/codbex-uoms/ui/launchpad/Home/styles.css b/codbex-uoms/gen/codbex-uoms/ui/launchpad/Home/styles.css deleted file mode 100644 index ae6a001..0000000 --- a/codbex-uoms/gen/codbex-uoms/ui/launchpad/Home/styles.css +++ /dev/null @@ -1,99 +0,0 @@ -/** - * Generated by Eclipse Dirigible based on model and template. - * - * Do not modify the content as it may be re-generated again. - */ -.wrap-list { - align-self: start; - flex-wrap: wrap; - padding-top: 1rem; - padding-bottom: 1rem; -} - -.wrap-list>* { - width: auto; -} - -.fd-card__header:only-child, -.fd-card__header:last-child { - border: none; - border-radius: var(--fdCard_Border_Radius, .25rem); -} - -.card-table-column { - flex: 1 1 0; - width: 0; -} - -.card-table { - max-height: calc(100% - 2.75rem); - min-height: auto; - height: 100%; -} - -.card-table>* { - flex: 1; -} - -.hbox-menu-item:not(:last-child) { - border-bottom: solid 0.0625rem var(--sapGroup_TitleBorderColor, #d9d9d9); -} - -.hbox-menu-item>button { - margin-right: .25rem; -} - -.hbox-menu-item>li { - width: 100%; -} - -.module-header { - height: 2.5rem; - padding: 0 .5rem .25rem; - overflow: visible; -} - -.fd-avatar[dg-size="s"]>i { - font-size: 2rem; -} - -.fd-col { - height: 18rem; - max-width: 100%; - min-width: 100%; -} - -@media (min-width: 1200px) { - .fd-col { - max-width: 50%; - min-width: 50%; - } -} - -@media (min-width: 1600px) { - .fd-col { - max-width: 33.333333333%; - min-width: 33.333333333%; - } -} - -@media (min-width: 2560px) { - .fd-col { - max-width: 25%; - min-width: 25%; - } -} - -@media (min-width: 3000px) { - .fd-col { - max-width: 20%; - min-width: 20%; - } -} - -@media (min-width: 3800px) { - .fd-col { - max-width: 16.666666667%; - min-width: 16.666666667%; - } -} \ No newline at end of file diff --git a/codbex-uoms/gen/codbex-uoms/ui/launchpad/Home/tiles.js b/codbex-uoms/gen/codbex-uoms/ui/launchpad/Home/tiles.js deleted file mode 100644 index 6ccad51..0000000 --- a/codbex-uoms/gen/codbex-uoms/ui/launchpad/Home/tiles.js +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Generated by Eclipse Dirigible based on model and template. - * - * Do not modify the content as it may be re-generated again. - */ -import { response } from "sdk/http"; -import { extensions } from "sdk/extensions"; -import { user } from "sdk/security"; - -let tiles = {}; - -let tileExtensions = await extensions.loadExtensionModules("codbex-uoms-tile"); -for (let i = 0; i < tileExtensions?.length; i++) { - let tile = tileExtensions[i].getTile(); - - let hasRoles = true; - if (tile.roles && Array.isArray(tile.roles)) { - for (const next of tile.roles) { - if (!user.isInRole(next)) { - hasRoles = false; - break; - } - } - } - - if (!tile || (tile.role && !user.isInRole(tile.role)) || !hasRoles) { - continue; - } - if (!tiles[tile.group]) { - tiles[tile.group] = { - entities: [], - reports: [], - settings: [] - }; - } - if (tile.type === 'REPORT' || tile.report === 'true' || tile.report === true) { - tiles[tile.group].reports.push({ - name: tile.name, - location: tile.location, - caption: tile.caption, - tooltip: tile.tooltip, - project: tile.project, - type: tile.type, - group: tile.group, - report: tile.report, - icon: tile.icon, - order: parseInt(tile.order), - groupOrder: parseInt(tile.groupOrder) - }); - } else if (tile.type === 'SETTING') { - tiles[tile.group].settings.push({ - name: tile.name, - location: tile.location, - caption: tile.caption, - tooltip: tile.tooltip, - project: tile.project, - type: tile.type, - group: tile.group, - report: tile.report, - icon: tile.icon, - order: parseInt(tile.order), - groupOrder: parseInt(tile.groupOrder) - }); - } else { - tiles[tile.group].entities.push({ - name: tile.name, - location: tile.location, - caption: tile.caption, - tooltip: tile.tooltip, - project: tile.project, - type: tile.type, - group: tile.group, - report: tile.report, - icon: tile.icon, - order: parseInt(tile.order), - groupOrder: parseInt(tile.groupOrder) - }); - } -} - -let modules = []; -let referenceData = []; -for (const [key, group] of Object.entries(tiles)) { - if (!group.entities.length && !group.reports.length && group.settings.length) { - group.settings.sort((a, b) => a.order - b.order); - referenceData.push({ name: key, settings: group.settings }); - } else { - group.entities.sort((a, b) => a.order - b.order); - group.reports.sort((a, b) => a.order - b.order); - group.settings.sort((a, b) => a.order - b.order); - modules.push({ name: key, ...group }); - } -} -response.setContentType("application/json"); -response.println(JSON.stringify({ modules: modules, referenceData: referenceData })); \ No newline at end of file diff --git a/codbex-uoms/gen/codbex-uoms/ui/launchpad/Home/view.extension b/codbex-uoms/gen/codbex-uoms/ui/launchpad/Home/view.extension deleted file mode 100644 index 4b158b5..0000000 --- a/codbex-uoms/gen/codbex-uoms/ui/launchpad/Home/view.extension +++ /dev/null @@ -1,5 +0,0 @@ -{ - "module": "codbex-uoms/gen/codbex-uoms/ui/launchpad/Home/view.js", - "extensionPoint": "codbex-uoms-view", - "description": "codbex-uoms - Application View" -} \ No newline at end of file diff --git a/codbex-uoms/gen/codbex-uoms/ui/launchpad/Home/view.js b/codbex-uoms/gen/codbex-uoms/ui/launchpad/Home/view.js deleted file mode 100644 index 177a627..0000000 --- a/codbex-uoms/gen/codbex-uoms/ui/launchpad/Home/view.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Generated by Eclipse Dirigible based on model and template. - * - * Do not modify the content as it may be re-generated again. - */ -const viewData = { - id: "codbex-uoms-home-launchpad", - label: "Home Launchpad", - factory: "frame", - region: "center", - link: "/services/web/codbex-uoms/gen/codbex-uoms/ui/launchpad/Home/index.html", - isLaunchpad: true, -}; - -if (typeof exports !== 'undefined') { - exports.getView = function () { - return viewData; - } -} diff --git a/codbex-uoms/gen/codbex-uoms/ui/launchpad/dialog-window.extensionpoint b/codbex-uoms/gen/codbex-uoms/ui/launchpad/dialog-window.extensionpoint deleted file mode 100644 index 1fa6cf4..0000000 --- a/codbex-uoms/gen/codbex-uoms/ui/launchpad/dialog-window.extensionpoint +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "dialog-window", - "description": "codbex-uoms - Extension Point for the Application Dialog Window Providers" -} \ No newline at end of file diff --git a/codbex-uoms/gen/codbex-uoms/ui/launchpad/menu-help.extension b/codbex-uoms/gen/codbex-uoms/ui/launchpad/menu-help.extension deleted file mode 100644 index 1b403d2..0000000 --- a/codbex-uoms/gen/codbex-uoms/ui/launchpad/menu-help.extension +++ /dev/null @@ -1,5 +0,0 @@ -{ - "module": "codbex-uoms/gen/codbex-uoms/ui/launchpad/menu-help.js", - "extensionPoint": "codbex-uoms-menu", - "description": "codbex-uoms - Application Menu" -} \ No newline at end of file diff --git a/codbex-uoms/gen/codbex-uoms/ui/launchpad/menu-help.js b/codbex-uoms/gen/codbex-uoms/ui/launchpad/menu-help.js deleted file mode 100644 index 9051c09..0000000 --- a/codbex-uoms/gen/codbex-uoms/ui/launchpad/menu-help.js +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Generated by Eclipse Dirigible based on model and template. - * - * Do not modify the content as it may be re-generated again. - */ - -import { Configurations as config } from "sdk/core"; - -const defaultMenuItems = [ - { - label: "Applications Portal", - action: "open", - order: 1, - data: "/services/web/portal/", - divider: false - }, - { - label: "Help Portal", - action: "open", - order: 1, - data: "https://www.dirigible.io/help/", - divider: false - }, - { - label: "Contact Support", - action: "open", - order: 2, - data: "https://github.com/eclipse/dirigible/issues", - divider: false - }, - { - label: "Suggest a Feature", - action: "open", - order: 3, - data: "https://github.com/eclipse/dirigible/issues/new?assignees=&labels=&template=feature_request.md&title=[New%20Feature]", - divider: false - }, - { - label: "What's New", - action: "open", - order: 4, - data: "https://twitter.com/dirigible_io", - divider: false - }, - { - label: "Check for Updates", - action: "open", - order: 5, - data: "http://download.dirigible.io/", - divider: true - } -]; - -export function getMenu() { - let menu = { - label: "Help", - order: 900, - items: [ - { - label: "About", - action: "openDialogWindow", - order: 6, - dialogId: "about", - divider: false - }] - }; - - let brandingHelpItems = config.get("DIRIGIBLE_BRANDING_HELP_ITEMS", ""); - if (brandingHelpItems && typeof brandingHelpItems === "string") { - let helpItems = brandingHelpItems.split(","); - helpItems.forEach(e => { - let item = e.trim(); - menu.items.push({ - label: config.get(`DIRIGIBLE_BRANDING_HELP_ITEM_${item}_NAME`, item), - order: parseInt(config.get(`DIRIGIBLE_BRANDING_HELP_ITEM_${item}_ORDER`, "0")), - action: "open", - data: config.get(`DIRIGIBLE_BRANDING_HELP_ITEM_${item}_URL`, "#"), - divider: config.get(`DIRIGIBLE_BRANDING_HELP_ITEM_${item}_DIVIDER`, "false").toLowerCase() === "true" - }); - }); - } else { - menu.items = menu.items.concat(defaultMenuItems); - } - - menu.items.sort((a, b) => a.order - b.order); - return menu; -}; \ No newline at end of file diff --git a/codbex-uoms/gen/codbex-uoms/ui/launchpad/menu.extensionpoint b/codbex-uoms/gen/codbex-uoms/ui/launchpad/menu.extensionpoint deleted file mode 100644 index b73276e..0000000 --- a/codbex-uoms/gen/codbex-uoms/ui/launchpad/menu.extensionpoint +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "codbex-uoms-menu", - "description": "codbex-uoms - Extension Point for the Application Main Menu" -} \ No newline at end of file diff --git a/codbex-uoms/gen/codbex-uoms/ui/launchpad/perspective.extension b/codbex-uoms/gen/codbex-uoms/ui/launchpad/perspective.extension deleted file mode 100644 index e93ff94..0000000 --- a/codbex-uoms/gen/codbex-uoms/ui/launchpad/perspective.extension +++ /dev/null @@ -1 +0,0 @@ -{"module":"codbex-uoms/gen/codbex-uoms/ui/launchpad/perspective.js","extensionPoint":"codbex-uoms","description":"codbex-uoms - Application Perspective"} \ No newline at end of file diff --git a/codbex-uoms/gen/codbex-uoms/ui/launchpad/perspective.extensionpoint b/codbex-uoms/gen/codbex-uoms/ui/launchpad/perspective.extensionpoint deleted file mode 100644 index 4ec889d..0000000 --- a/codbex-uoms/gen/codbex-uoms/ui/launchpad/perspective.extensionpoint +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "codbex-uoms-perspective", - "description": "codbex-uoms - Extension Point for the Application Perspective Providers" -} \ No newline at end of file diff --git a/codbex-uoms/gen/codbex-uoms/ui/launchpad/perspective.js b/codbex-uoms/gen/codbex-uoms/ui/launchpad/perspective.js deleted file mode 100644 index 44b6ca8..0000000 --- a/codbex-uoms/gen/codbex-uoms/ui/launchpad/perspective.js +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Generated by Eclipse Dirigible based on model and template. - * - * Do not modify the content as it may be re-generated again. - */ -const perspectiveData = { - id: 'home', - name: 'Home', - link: '/services/web/portal/index.html', - icon: '/services/web/resources/unicons/estate.svg', - order: 1, -}; - -if (typeof exports !== 'undefined') { - exports.getPerspective = function () { - return perspectiveData; - } -} \ No newline at end of file diff --git a/codbex-uoms/gen/codbex-uoms/ui/launchpad/tile.extensionpoint b/codbex-uoms/gen/codbex-uoms/ui/launchpad/tile.extensionpoint deleted file mode 100644 index 54df31d..0000000 --- a/codbex-uoms/gen/codbex-uoms/ui/launchpad/tile.extensionpoint +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "codbex-uoms-tile", - "description": "codbex-uoms - Extension Point for the Application Tile Providers" -} \ No newline at end of file diff --git a/codbex-uoms/gen/codbex-uoms/ui/launchpad/view.extensionpoint b/codbex-uoms/gen/codbex-uoms/ui/launchpad/view.extensionpoint deleted file mode 100644 index 8b07b33..0000000 --- a/codbex-uoms/gen/codbex-uoms/ui/launchpad/view.extensionpoint +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "codbex-uoms-view", - "description": "codbex-uoms - Extension Point for the Application View Providers" -} \ No newline at end of file diff --git a/codbex-uoms/navigations/dimensions/navigation.extension b/codbex-uoms/navigations/dimensions/navigation.extension deleted file mode 100644 index b698882..0000000 --- a/codbex-uoms/navigations/dimensions/navigation.extension +++ /dev/null @@ -1,6 +0,0 @@ -{ - "extensionPoint": "dashboard-navigations", - "module": "codbex-uoms/navigations/dimensions/service.js", - "description": "Dimensions Navigation", - "role": "codbex-uoms.Dimensions.DimensionReadOnly,codbex-uoms.Dimensions.DimensionFullAccess" -} \ No newline at end of file diff --git a/codbex-uoms/navigations/dimensions/service.js b/codbex-uoms/navigations/dimensions/service.js deleted file mode 100644 index d8bceb9..0000000 --- a/codbex-uoms/navigations/dimensions/service.js +++ /dev/null @@ -1,17 +0,0 @@ -const navigationData = { - id: 'dimensions-navigation', - label: "Dimensions", - group: "reference data", - order: 400, - link: "/services/web/codbex-uoms/gen/codbex-uoms/ui/Dimensions/index.html?embedded" -}; - -function getNavigation() { - return navigationData; -} - -if (typeof exports !== 'undefined') { - exports.getNavigation = getNavigation; -} - -export { getNavigation } diff --git a/codbex-uoms/navigations/uoms/navigation.extension b/codbex-uoms/navigations/uoms/navigation.extension deleted file mode 100644 index 43238a6..0000000 --- a/codbex-uoms/navigations/uoms/navigation.extension +++ /dev/null @@ -1,6 +0,0 @@ -{ - "extensionPoint": "dashboard-navigations", - "module": "codbex-uoms/navigations/uoms/service.js", - "description": "Units Of Mesurments Navigation", - "role": "codbex-uoms.UnitsOfMeasures.UoMReadOnly,codbex-uoms.UnitsOfMeasures.UoMFullAccess" -} \ No newline at end of file diff --git a/codbex-uoms/navigations/uoms/service.js b/codbex-uoms/navigations/uoms/service.js deleted file mode 100644 index bcbe963..0000000 --- a/codbex-uoms/navigations/uoms/service.js +++ /dev/null @@ -1,17 +0,0 @@ -const navigationData = { - id: 'uoms-navigation', - label: "Units of Mesurements", - group: "reference data", - order: 200, - link: "/services/web/codbex-uoms/gen/codbex-uoms/ui/UnitsOfMeasures/index.html?embedded" -}; - -function getNavigation() { - return navigationData; -} - -if (typeof exports !== 'undefined') { - exports.getNavigation = getNavigation; -} - -export { getNavigation } From 0f4e3f26de1f250783721e88f407b87d9a9a4169 Mon Sep 17 00:00:00 2001 From: StanZGenchev Date: Fri, 11 Apr 2025 14:38:53 +0300 Subject: [PATCH 2/3] Fixed some dialogs --- .../gen/codbex-uoms/ui/Settings/Dimension/controller.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/codbex-uoms/gen/codbex-uoms/ui/Settings/Dimension/controller.js b/codbex-uoms/gen/codbex-uoms/ui/Settings/Dimension/controller.js index e093a2d..78a18d7 100644 --- a/codbex-uoms/gen/codbex-uoms/ui/Settings/Dimension/controller.js +++ b/codbex-uoms/gen/codbex-uoms/ui/Settings/Dimension/controller.js @@ -116,7 +116,7 @@ angular.module('page', ['blimpKit', 'platformView', 'EntityService']) $scope.openFilter = (entity) => { Dialogs.showWindow({ - id: '${property.relationshipEntityName}-details', + id: 'Dimension-details', params: { entity: $scope.filterEntity, }, @@ -138,7 +138,7 @@ angular.module('page', ['blimpKit', 'platformView', 'EntityService']) $scope.updateEntity = (entity) => { Dialogs.showWindow({ - id: '${property.relationshipEntityName}-details', + id: 'Dimension-details', params: { action: 'update', entity: entity, From b23869e2370fe146b2d13c0fcdf30423438faeb3 Mon Sep 17 00:00:00 2001 From: StanZGenchev Date: Fri, 11 Apr 2025 14:39:15 +0300 Subject: [PATCH 3/3] Fixed some dialogs --- codbex-uoms/gen/codbex-uoms/ui/Settings/UoM/controller.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/codbex-uoms/gen/codbex-uoms/ui/Settings/UoM/controller.js b/codbex-uoms/gen/codbex-uoms/ui/Settings/UoM/controller.js index e9a2892..f87d209 100644 --- a/codbex-uoms/gen/codbex-uoms/ui/Settings/UoM/controller.js +++ b/codbex-uoms/gen/codbex-uoms/ui/Settings/UoM/controller.js @@ -117,7 +117,7 @@ angular.module('page', ['blimpKit', 'platformView', 'EntityService']) $scope.openFilter = (entity) => { Dialogs.showWindow({ - id: '${property.relationshipEntityName}-details', + id: 'UoM-details', params: { entity: $scope.filterEntity, optionsDimension: $scope.optionsDimension, @@ -141,7 +141,7 @@ angular.module('page', ['blimpKit', 'platformView', 'EntityService']) $scope.updateEntity = (entity) => { Dialogs.showWindow({ - id: '${property.relationshipEntityName}-details', + id: 'UoM-details', params: { action: 'update', entity: entity,