diff --git a/codbex-cities/codbex-cities.edm b/codbex-cities/codbex-cities.edm index f853b98..50eb390 100644 --- a/codbex-cities/codbex-cities.edm +++ b/codbex-cities/codbex-cities.edm @@ -1,16 +1,16 @@ - - - - + + + + - - - - - - + + + + + + @@ -20,5 +20,5 @@ - + \ No newline at end of file diff --git a/codbex-cities/codbex-cities.gen b/codbex-cities/codbex-cities.gen index 30ee553..741d98f 100644 --- a/codbex-cities/codbex-cities.gen +++ b/codbex-cities/codbex-cities.gen @@ -14,7 +14,30 @@ "perspectives": { "Cities": { "views": [ - "City" + "City", + "City-details", + "City-details", + "City-details", + "City-details", + "City-details", + "City-details", + "City-details", + "City-details", + "City-details", + "City-details", + "City-details", + "City-details", + "City-details", + "City-details", + "City-details", + "City-details", + "City-details", + "City-details", + "City-details", + "City-details", + "City-details", + "City-details", + "City-details" ], "name": "Cities", "label": "Cities", @@ -42,7 +65,9 @@ "dataNullable": true, "dataPrimaryKey": true, "dataType": "INTEGER", + "description": "", "name": "Id", + "tooltip": "", "widgetIsMajor": true, "widgetLength": "20", "widgetSize": "", @@ -62,8 +87,10 @@ "dataName": "CITY_NAME", "dataNullable": false, "dataType": "VARCHAR", + "description": "", "isRequiredProperty": true, "name": "Name", + "tooltip": "", "widgetIsMajor": true, "widgetLength": "100", "widgetSize": "", @@ -85,8 +112,10 @@ "dataName": "CITY_COUNTRY", "dataNullable": false, "dataType": "INTEGER", + "description": "", "isRequiredProperty": true, "name": "Country", + "tooltip": "", "widgetDropDownKey": "Id", "widgetDropDownValue": "Name", "widgetIsMajor": true, @@ -113,9 +142,10 @@ "dataCount": "SELECT COUNT(*) AS COUNT FROM \"CODBEX_CITY\"", "dataName": "CITY", "dataQuery": "", + "description": "Manage entity City", "generateReport": "false", "icon": "/services/web/resources/unicons/file.svg", - "layoutType": "MANAGE", + "layoutType": "MANAGE_MASTER", "menuIndex": "100", "menuKey": "city", "menuLabel": "City", @@ -141,6 +171,65 @@ "Id" ], "primaryKeysString": "Id", + "masterProperties": { + "title": { + "dataLength": "100", + "dataName": "CITY_NAME", + "dataNullable": false, + "dataType": "VARCHAR", + "description": "", + "isRequiredProperty": true, + "name": "Name", + "tooltip": "", + "widgetIsMajor": true, + "widgetLength": "100", + "widgetSize": "", + "widgetType": "TEXTBOX", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "widgetLabel": "Name", + "widgetDropdownUrl": "", + "dataTypeJava": "string", + "dataTypeTypescript": "string", + "minLength": 0, + "maxLength": 100, + "inputRule": "" + }, + "properties": [ + { + "dataName": "CITY_COUNTRY", + "dataNullable": false, + "dataType": "INTEGER", + "description": "", + "isRequiredProperty": true, + "name": "Country", + "tooltip": "", + "widgetDropDownKey": "Id", + "widgetDropDownValue": "Name", + "widgetIsMajor": true, + "widgetLength": "20", + "widgetSize": "", + "widgetType": "DROPDOWN", + "relationshipName": "City_Country", + "relationshipEntityName": "Country", + "relationshipEntityPerspectiveName": "Countries", + "relationshipEntityPerspectiveLabel": "Entities", + "dataNotNull": true, + "dataAutoIncrement": false, + "dataPrimaryKey": false, + "dataUnique": false, + "isCalculatedProperty": false, + "widgetLabel": "Country", + "widgetDropdownUrl": "/services/ts/codbex-countries/gen/codbex-countries/api/Countries/CountryService.ts", + "dataTypeJava": "int", + "dataTypeTypescript": "number", + "inputRule": "" + } + ] + }, "hasDropdowns": true }, { @@ -153,7 +242,9 @@ "dataNullable": true, "dataPrimaryKey": true, "dataType": "INTEGER", + "description": "", "name": "Id", + "tooltip": "", "widgetIsMajor": true, "widgetLength": "20", "widgetSize": "", @@ -176,7 +267,9 @@ "dataNullable": true, "dataType": "VARCHAR", "dataUnique": true, + "description": "", "name": "Name", + "tooltip": "", "widgetIsMajor": true, "widgetLength": "20", "widgetSize": "fd-col-md--4 fd-col--6", @@ -202,7 +295,9 @@ "dataNullable": true, "dataType": "CHAR", "dataUnique": true, + "description": "", "name": "Code2", + "tooltip": "", "widgetIsMajor": true, "widgetLength": "20", "widgetSize": "fd-col-md--2 fd-col--3", @@ -228,7 +323,9 @@ "dataNullable": true, "dataType": "CHAR", "dataUnique": true, + "description": "", "name": "Code3", + "tooltip": "", "widgetIsMajor": true, "widgetLength": "20", "widgetSize": "fd-col-md--2 fd-col--3", @@ -254,7 +351,9 @@ "dataNullable": true, "dataType": "CHAR", "dataUnique": true, + "description": "", "name": "Numeric", + "tooltip": "", "widgetIsMajor": true, "widgetLength": "20", "widgetSize": "fd-col-md--2 fd-col--3", @@ -277,6 +376,7 @@ "dataCount": "SELECT COUNT(*) AS COUNT FROM \"CODBEX_COUNTRY\"", "dataName": "COUNTRY", "dataQuery": "", + "description": "Manage entity Country", "generateReport": "false", "icon": "/services/web/resources/unicons/file.svg", "layoutType": "MANAGE", diff --git a/codbex-cities/codbex-cities.model b/codbex-cities/codbex-cities.model index a689b10..71383d2 100644 --- a/codbex-cities/codbex-cities.model +++ b/codbex-cities/codbex-cities.model @@ -9,7 +9,9 @@ "dataNullable": "true", "dataPrimaryKey": "true", "dataType": "INTEGER", + "description": "", "name": "Id", + "tooltip": "", "widgetIsMajor": "true", "widgetLength": "20", "widgetSize": "", @@ -20,8 +22,10 @@ "dataName": "CITY_NAME", "dataNullable": "false", "dataType": "VARCHAR", + "description": "", "isRequiredProperty": "true", "name": "Name", + "tooltip": "", "widgetIsMajor": "true", "widgetLength": "100", "widgetSize": "", @@ -31,8 +35,10 @@ "dataName": "CITY_COUNTRY", "dataNullable": "false", "dataType": "INTEGER", + "description": "", "isRequiredProperty": "true", "name": "Country", + "tooltip": "", "widgetDropDownKey": "Id", "widgetDropDownValue": "Name", "widgetIsMajor": "true", @@ -49,9 +55,10 @@ "dataCount": "SELECT COUNT(*) AS COUNT FROM \"${tablePrefix}CITY\"", "dataName": "CITY", "dataQuery": "", + "description": "Manage entity City", "generateReport": "false", "icon": "/services/web/resources/unicons/file.svg", - "layoutType": "MANAGE", + "layoutType": "MANAGE_MASTER", "menuIndex": "100", "menuKey": "city", "menuLabel": "City", @@ -76,7 +83,9 @@ "dataNullable": "true", "dataPrimaryKey": "true", "dataType": "INTEGER", + "description": "", "name": "Id", + "tooltip": "", "widgetIsMajor": "true", "widgetLength": "20", "widgetSize": "", @@ -90,7 +99,9 @@ "dataNullable": "true", "dataType": "VARCHAR", "dataUnique": "true", + "description": "", "name": "Name", + "tooltip": "", "widgetIsMajor": "true", "widgetLength": "20", "widgetSize": "fd-col-md--4 fd-col--6", @@ -104,7 +115,9 @@ "dataNullable": "true", "dataType": "CHAR", "dataUnique": "true", + "description": "", "name": "Code2", + "tooltip": "", "widgetIsMajor": "true", "widgetLength": "20", "widgetSize": "fd-col-md--2 fd-col--3", @@ -118,7 +131,9 @@ "dataNullable": "true", "dataType": "CHAR", "dataUnique": "true", + "description": "", "name": "Code3", + "tooltip": "", "widgetIsMajor": "true", "widgetLength": "20", "widgetSize": "fd-col-md--2 fd-col--3", @@ -132,7 +147,9 @@ "dataNullable": "true", "dataType": "CHAR", "dataUnique": "true", + "description": "", "name": "Numeric", + "tooltip": "", "widgetIsMajor": "true", "widgetLength": "20", "widgetSize": "fd-col-md--2 fd-col--3", @@ -143,6 +160,7 @@ "dataCount": "SELECT COUNT(*) AS COUNT FROM \"${tablePrefix}COUNTRY\"", "dataName": "COUNTRY", "dataQuery": "", + "description": "Manage entity Country", "generateReport": "false", "icon": "/services/web/resources/unicons/file.svg", "layoutType": "MANAGE", diff --git a/codbex-cities/gen/codbex-cities/ui/Cities/City/controller.js b/codbex-cities/gen/codbex-cities/ui/Cities/City/controller.js index af33d1d..5f1c3ad 100644 --- a/codbex-cities/gen/codbex-cities/ui/Cities/City/controller.js +++ b/codbex-cities/gen/codbex-cities/ui/Cities/City/controller.js @@ -9,12 +9,13 @@ angular.module('page', ["ideUI", "ideView", "entityApi"]) $scope.dataPage = 1; $scope.dataCount = 0; - $scope.dataLimit = 20; + $scope.dataOffset = 0; + $scope.dataLimit = 10; + $scope.action = "select"; //-----------------Custom Actions-------------------// Extensions.get('dialogWindow', 'codbex-cities-custom-action').then(function (response) { $scope.pageActions = response.filter(e => e.perspective === "Cities" && e.view === "City" && (e.type === "page" || e.type === undefined)); - $scope.entityActions = response.filter(e => e.perspective === "Cities" && e.view === "City" && e.type === "entity"); }); $scope.triggerPageAction = function (action) { @@ -26,33 +27,35 @@ angular.module('page', ["ideUI", "ideView", "entityApi"]) action ); }; - - $scope.triggerEntityAction = function (action) { - messageHub.showDialogWindow( - action.id, - { - id: $scope.entity.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 = 20; + $scope.dataLimit = 10; } - resetPagination(); //-----------------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); }); @@ -68,7 +71,10 @@ angular.module('page', ["ideUI", "ideView", "entityApi"]) if (!filter && $scope.filter) { filter = $scope.filter; } - $scope.dataPage = pageNumber; + if (!filter) { + filter = {}; + } + $scope.selectedEntity = null; entityApi.count(filter).then(function (response) { if (response.status != 200) { messageHub.showAlertError("City", `Unable to count City: '${response.message}'`); @@ -77,22 +83,25 @@ angular.module('page', ["ideUI", "ideView", "entityApi"]) 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); + $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; } - request.then(function (response) { + + entityApi.search(filter).then(function (response) { if (response.status != 200) { messageHub.showAlertError("City", `Unable to list/filter City: '${response.message}'`); return; } - $scope.data = response.data; + if ($scope.data == null || $scope.dataReset) { + $scope.data = []; + $scope.dataReset = false; + } + $scope.data = $scope.data.concat(response.data); + $scope.dataPage++; }); }); }; @@ -100,43 +109,33 @@ angular.module('page', ["ideUI", "ideView", "entityApi"]) $scope.selectEntity = function (entity) { $scope.selectedEntity = entity; - }; - - $scope.openDetails = function (entity) { - $scope.selectedEntity = entity; - messageHub.showDialogWindow("City-details", { - action: "select", + messageHub.postMessage("entitySelected", { entity: entity, - optionsCountry: $scope.optionsCountry, - }); - }; - - $scope.openFilter = function (entity) { - messageHub.showDialogWindow("City-filter", { - entity: $scope.filterEntity, + selectedMainEntityId: entity.Id, optionsCountry: $scope.optionsCountry, }); }; $scope.createEntity = function () { $scope.selectedEntity = null; - messageHub.showDialogWindow("City-details", { - action: "create", + $scope.action = "create"; + + messageHub.postMessage("createEntity", { entity: {}, optionsCountry: $scope.optionsCountry, - }, null, false); + }); }; - $scope.updateEntity = function (entity) { - messageHub.showDialogWindow("City-details", { - action: "update", - entity: entity, + $scope.updateEntity = function () { + $scope.action = "update"; + messageHub.postMessage("updateEntity", { + entity: $scope.selectedEntity, optionsCountry: $scope.optionsCountry, - }, null, false); + }); }; - $scope.deleteEntity = function (entity) { - let id = entity.Id; + $scope.deleteEntity = function () { + let id = $scope.selectedEntity.Id; messageHub.showDialogAsync( 'Delete City?', `Are you sure you want to delete City? This action cannot be undone.`, @@ -157,6 +156,7 @@ angular.module('page', ["ideUI", "ideView", "entityApi"]) messageHub.showAlertError("City", `Unable to delete City: '${response.message}'`); return; } + refreshData(); $scope.loadPage($scope.dataPage, $scope.filter); messageHub.postMessage("clearDetails"); }); @@ -164,6 +164,13 @@ angular.module('page', ["ideUI", "ideView", "entityApi"]) }); }; + $scope.openFilter = function (entity) { + messageHub.showDialogWindow("City-filter", { + entity: $scope.filterEntity, + optionsCountry: $scope.optionsCountry, + }); + }; + //----------------Dropdowns-----------------// $scope.optionsCountry = []; diff --git a/codbex-cities/gen/codbex-cities/ui/Cities/City/dialog-filter/controller.js b/codbex-cities/gen/codbex-cities/ui/Cities/City/dialog-filter/controller.js index a4c8a98..4d36e25 100644 --- a/codbex-cities/gen/codbex-cities/ui/Cities/City/dialog-filter/controller.js +++ b/codbex-cities/gen/codbex-cities/ui/Cities/City/dialog-filter/controller.js @@ -50,6 +50,7 @@ angular.module('page', ["ideUI", "ideView"]) entity: entity, filter: filter }); + messageHub.postMessage("clearDetails"); $scope.cancel(); }; diff --git a/codbex-cities/gen/codbex-cities/ui/Cities/City/dialog-filter/index.html b/codbex-cities/gen/codbex-cities/ui/Cities/City/dialog-filter/index.html index 7704d24..4ae28bb 100644 --- a/codbex-cities/gen/codbex-cities/ui/Cities/City/dialog-filter/index.html +++ b/codbex-cities/gen/codbex-cities/ui/Cities/City/dialog-filter/index.html @@ -64,16 +64,16 @@ - + - + - + diff --git a/codbex-cities/gen/codbex-cities/ui/Cities/City/dialog-filter/view.extension b/codbex-cities/gen/codbex-cities/ui/Cities/City/dialog-filter/view.extension index 7d31539..08bcef7 100644 --- a/codbex-cities/gen/codbex-cities/ui/Cities/City/dialog-filter/view.extension +++ b/codbex-cities/gen/codbex-cities/ui/Cities/City/dialog-filter/view.extension @@ -1,5 +1,5 @@ { "module": "codbex-cities/gen/codbex-cities/ui/Cities/City/dialog-filter/view.js", - "extensionPoint": "codbex-cities-dialog-window", + "extensionPoint": "dialog-window", "description": "codbex-cities - Application Dialog Window" } \ No newline at end of file diff --git a/codbex-cities/gen/codbex-cities/ui/Cities/City/dialog-window/controller.js b/codbex-cities/gen/codbex-cities/ui/Cities/City/dialog-window/controller.js index 39a02e8..06caca1 100644 --- a/codbex-cities/gen/codbex-cities/ui/Cities/City/dialog-window/controller.js +++ b/codbex-cities/gen/codbex-cities/ui/Cities/City/dialog-window/controller.js @@ -5,7 +5,7 @@ angular.module('page', ["ideUI", "ideView", "entityApi"]) .config(["entityApiProvider", function (entityApiProvider) { entityApiProvider.baseUrl = "/services/ts/codbex-cities/gen/codbex-cities/api/Cities/CityService.ts"; }]) - .controller('PageController', ['$scope', 'messageHub', 'ViewParameters', 'entityApi', function ($scope, messageHub, ViewParameters, entityApi) { + .controller('PageController', ['$scope', '$http', 'messageHub', 'ViewParameters', 'entityApi', function ($scope, $http, messageHub, ViewParameters, entityApi) { $scope.entity = {}; $scope.forms = { @@ -56,6 +56,19 @@ angular.module('page', ["ideUI", "ideView", "entityApi"]) }); }; + $scope.serviceCountry = "/services/ts/codbex-countries/gen/codbex-countries/api/Countries/CountryService.ts"; + + $scope.optionsCountry = []; + + $http.get("/services/ts/codbex-countries/gen/codbex-countries/api/Countries/CountryService.ts").then(function (response) { + $scope.optionsCountry = response.data.map(e => { + return { + value: e.Id, + text: e.Name + } + }); + }); + $scope.cancel = function () { $scope.entity = {}; $scope.action = 'select'; diff --git a/codbex-cities/gen/codbex-cities/ui/Cities/City/dialog-window/index.html b/codbex-cities/gen/codbex-cities/ui/Cities/City/dialog-window/index.html index 840277f..051a3fa 100644 --- a/codbex-cities/gen/codbex-cities/ui/Cities/City/dialog-window/index.html +++ b/codbex-cities/gen/codbex-cities/ui/Cities/City/dialog-window/index.html @@ -47,6 +47,7 @@ The value doesn't match the required pattern '' + @@ -63,6 +64,7 @@ dropdown-items="optionsCountry" dg-placeholder="Search Country ..."> + @@ -75,7 +77,7 @@ - + diff --git a/codbex-cities/gen/codbex-cities/ui/Cities/City/dialog-window/view.extension b/codbex-cities/gen/codbex-cities/ui/Cities/City/dialog-window/view.extension index 844fad7..63fbcd5 100644 --- a/codbex-cities/gen/codbex-cities/ui/Cities/City/dialog-window/view.extension +++ b/codbex-cities/gen/codbex-cities/ui/Cities/City/dialog-window/view.extension @@ -1 +1 @@ -{"module":"codbex-cities/gen/codbex-cities/ui/Cities/City/dialog-window/view.js","extensionPoint":"codbex-cities-dialog-window","description":"codbex-cities - Application Dialog Window"} \ No newline at end of file +{"module":"codbex-cities/gen/codbex-cities/ui/Cities/City/dialog-window/view.js","extensionPoint":"dialog-window","description":"codbex-cities - Application Dialog Window"} \ No newline at end of file diff --git a/codbex-cities/gen/codbex-cities/ui/Cities/City/index.html b/codbex-cities/gen/codbex-cities/ui/Cities/City/index.html index 9e4eb11..11bd326 100644 --- a/codbex-cities/gen/codbex-cities/ui/Cities/City/index.html +++ b/codbex-cities/gen/codbex-cities/ui/Cities/City/index.html @@ -17,59 +17,49 @@ - Items ({{dataCount}}) - - + Items - + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - -
NameCountry
No data available.
{{next.Name}} - {{optionsCountryValue(next.Country)}} - - - - - - - - - - - - - - - -
+ + + + + + + {{optionsCountryValue(next.Country)}} + + + + + + + Load More ... + - - - diff --git a/codbex-cities/gen/codbex-cities/ui/Cities/City/main-details/controller.js b/codbex-cities/gen/codbex-cities/ui/Cities/City/main-details/controller.js new file mode 100644 index 0000000..6b06108 --- /dev/null +++ b/codbex-cities/gen/codbex-cities/ui/Cities/City/main-details/controller.js @@ -0,0 +1,134 @@ +angular.module('page', ["ideUI", "ideView", "entityApi"]) + .config(["messageHubProvider", function (messageHubProvider) { + messageHubProvider.eventIdPrefix = 'codbex-cities.Cities.City'; + }]) + .config(["entityApiProvider", function (entityApiProvider) { + entityApiProvider.baseUrl = "/services/ts/codbex-cities/gen/codbex-cities/api/Cities/CityService.ts"; + }]) + .controller('PageController', ['$scope', '$http', 'Extensions', 'messageHub', 'entityApi', function ($scope, $http, Extensions, messageHub, entityApi) { + + $scope.entity = {}; + $scope.forms = { + details: {}, + }; + $scope.formHeaders = { + select: "City Details", + create: "Create City", + update: "Update City" + }; + $scope.action = 'select'; + + //-----------------Custom Actions-------------------// + Extensions.get('dialogWindow', 'codbex-cities-custom-action').then(function (response) { + $scope.entityActions = response.filter(e => e.perspective === "Cities" && e.view === "City" && 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.optionsCountry = []; + $scope.action = 'select'; + }); + }); + + messageHub.onDidReceiveMessage("entitySelected", function (msg) { + $scope.$apply(function () { + $scope.entity = msg.data.entity; + $scope.optionsCountry = msg.data.optionsCountry; + $scope.action = 'select'; + }); + }); + + messageHub.onDidReceiveMessage("createEntity", function (msg) { + $scope.$apply(function () { + $scope.entity = {}; + $scope.optionsCountry = msg.data.optionsCountry; + $scope.action = 'create'; + }); + }); + + messageHub.onDidReceiveMessage("updateEntity", function (msg) { + $scope.$apply(function () { + $scope.entity = msg.data.entity; + $scope.optionsCountry = msg.data.optionsCountry; + $scope.action = 'update'; + }); + }); + + $scope.serviceCountry = "/services/ts/codbex-countries/gen/codbex-countries/api/Countries/CountryService.ts"; + + //-----------------Events-------------------// + + $scope.create = function () { + entityApi.create($scope.entity).then(function (response) { + if (response.status != 201) { + messageHub.showAlertError("City", `Unable to create City: '${response.message}'`); + return; + } + messageHub.postMessage("entityCreated", response.data); + messageHub.postMessage("clearDetails", response.data); + messageHub.showAlertSuccess("City", "City successfully created"); + }); + }; + + $scope.update = function () { + entityApi.update($scope.entity.Id, $scope.entity).then(function (response) { + if (response.status != 200) { + messageHub.showAlertError("City", `Unable to update City: '${response.message}'`); + return; + } + messageHub.postMessage("entityUpdated", response.data); + messageHub.postMessage("clearDetails", response.data); + messageHub.showAlertSuccess("City", "City successfully updated"); + }); + }; + + $scope.cancel = function () { + messageHub.postMessage("clearDetails"); + }; + + //-----------------Dialogs-------------------// + + $scope.createCountry = function () { + messageHub.showDialogWindow("Country-details", { + action: "create", + entity: {}, + }, null, false); + }; + + //-----------------Dialogs-------------------// + + + + //----------------Dropdowns-----------------// + + $scope.refreshCountry = function () { + $scope.optionsCountry = []; + $http.get("/services/ts/codbex-countries/gen/codbex-countries/api/Countries/CountryService.ts").then(function (response) { + $scope.optionsCountry = response.data.map(e => { + return { + value: e.Id, + text: e.Name + } + }); + }); + }; + + //----------------Dropdowns-----------------// + + + }]); \ No newline at end of file diff --git a/codbex-cities/gen/codbex-cities/ui/Cities/City/main-details/index.html b/codbex-cities/gen/codbex-cities/ui/Cities/City/main-details/index.html new file mode 100644 index 0000000..ae1701e --- /dev/null +++ b/codbex-cities/gen/codbex-cities/ui/Cities/City/main-details/index.html @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + +
+ Name +
+
+ + + + The value doesn't match the required pattern '' + + +
+
+ +
+ Country +
+
+ + +
+
+ + + +
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + diff --git a/codbex-cities/gen/codbex-cities/ui/Cities/City/main-details/view.extension b/codbex-cities/gen/codbex-cities/ui/Cities/City/main-details/view.extension new file mode 100644 index 0000000..c4f0023 --- /dev/null +++ b/codbex-cities/gen/codbex-cities/ui/Cities/City/main-details/view.extension @@ -0,0 +1 @@ +{"module":"codbex-cities/gen/codbex-cities/ui/Cities/City/main-details/view.js","extensionPoint":"codbex-cities-view","description":"codbex-cities - Application View - Main Details"} \ No newline at end of file diff --git a/codbex-cities/gen/codbex-cities/ui/Cities/City/main-details/view.js b/codbex-cities/gen/codbex-cities/ui/Cities/City/main-details/view.js new file mode 100644 index 0000000..b2b5982 --- /dev/null +++ b/codbex-cities/gen/codbex-cities/ui/Cities/City/main-details/view.js @@ -0,0 +1,19 @@ +/* + * Generated by Eclipse Dirigible based on model and template. + * + * Do not modify the content as it may be re-generated again. + */ +const viewData = { + id: "City-details", + label: "City", + factory: "frame", + region: "center", + link: "/services/web/codbex-cities/gen/codbex-cities/ui/Cities/City/main-details/index.html", + perspectiveName: "Cities", +}; + +if (typeof exports !== 'undefined') { + exports.getView = function () { + return viewData; + } +} diff --git a/codbex-cities/gen/codbex-cities/ui/Cities/City/view.js b/codbex-cities/gen/codbex-cities/ui/Cities/City/view.js index 8cd7f45..c21f017 100644 --- a/codbex-cities/gen/codbex-cities/ui/Cities/City/view.js +++ b/codbex-cities/gen/codbex-cities/ui/Cities/City/view.js @@ -7,7 +7,7 @@ const viewData = { id: "City", label: "City", factory: "frame", - region: "center", + region: "left", link: "/services/web/codbex-cities/gen/codbex-cities/ui/Cities/City/index.html", perspectiveName: "Cities", }; diff --git a/codbex-cities/gen/codbex-cities/ui/Cities/index.html b/codbex-cities/gen/codbex-cities/ui/Cities/index.html index d0c865c..1a73fc9 100644 --- a/codbex-cities/gen/codbex-cities/ui/Cities/index.html +++ b/codbex-cities/gen/codbex-cities/ui/Cities/index.html @@ -52,7 +52,7 @@ .constant('extensionPoint', { perspectives: 'codbex-cities', views: 'codbex-cities-view', - dialogWindows: 'codbex-cities-dialog-window' + dialogWindows: 'dialog-window' }) .controller('ApplicationController', ['$scope', 'messageHub', 'Extensions', function ($scope, messageHub, Extensions) { $scope.state = { diff --git a/codbex-cities/gen/codbex-cities/ui/launchpad/Home/controller.js b/codbex-cities/gen/codbex-cities/ui/launchpad/Home/controller.js index f1bf0f9..994eab6 100644 --- a/codbex-cities/gen/codbex-cities/ui/launchpad/Home/controller.js +++ b/codbex-cities/gen/codbex-cities/ui/launchpad/Home/controller.js @@ -88,6 +88,7 @@ angular.module('page', ['ideUI', 'ideView', 'entityApi']) 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); } diff --git a/codbex-cities/gen/codbex-cities/ui/launchpad/Home/index.html b/codbex-cities/gen/codbex-cities/ui/launchpad/Home/index.html index e51b087..fad3f30 100644 --- a/codbex-cities/gen/codbex-cities/ui/launchpad/Home/index.html +++ b/codbex-cities/gen/codbex-cities/ui/launchpad/Home/index.html @@ -36,6 +36,15 @@

Cities Management Module

General
+ + + + + Applications Portal + Central entry point to installed applications + + + @@ -89,7 +98,7 @@
Modules
+ ng-repeat="setting in referenceData track by $index" ng-click="openView(setting.location)"> diff --git a/codbex-cities/gen/codbex-cities/ui/launchpad/Home/styles.css b/codbex-cities/gen/codbex-cities/ui/launchpad/Home/styles.css index 6b6b502..ae6a001 100644 --- a/codbex-cities/gen/codbex-cities/ui/launchpad/Home/styles.css +++ b/codbex-cities/gen/codbex-cities/ui/launchpad/Home/styles.css @@ -1,3 +1,8 @@ +/** + * 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; diff --git a/codbex-cities/gen/codbex-cities/ui/launchpad/menu-help.js b/codbex-cities/gen/codbex-cities/ui/launchpad/menu-help.js index 76750e4..9051c09 100644 --- a/codbex-cities/gen/codbex-cities/ui/launchpad/menu-help.js +++ b/codbex-cities/gen/codbex-cities/ui/launchpad/menu-help.js @@ -4,6 +4,8 @@ * Do not modify the content as it may be re-generated again. */ +import { Configurations as config } from "sdk/core"; + const defaultMenuItems = [ { label: "Applications Portal", @@ -49,9 +51,7 @@ const defaultMenuItems = [ } ]; -let config = dirigibleRequire("core/configurations"); - -exports.getMenu = function () { +export function getMenu() { let menu = { label: "Help", order: 900, diff --git a/codbex-cities/gen/codbex-cities/ui/launchpad/perspective.js b/codbex-cities/gen/codbex-cities/ui/launchpad/perspective.js index b157a74..44b6ca8 100644 --- a/codbex-cities/gen/codbex-cities/ui/launchpad/perspective.js +++ b/codbex-cities/gen/codbex-cities/ui/launchpad/perspective.js @@ -6,7 +6,7 @@ const perspectiveData = { id: 'home', name: 'Home', - link: '/services/web/codbex-cities/gen/codbex-cities/index.html', + link: '/services/web/portal/index.html', icon: '/services/web/resources/unicons/estate.svg', order: 1, };