diff --git a/codbex-organizations/codbex-organizations.edm b/codbex-organizations/codbex-organizations.edm index 8e9392e..d9b833b 100644 --- a/codbex-organizations/codbex-organizations.edm +++ b/codbex-organizations/codbex-organizations.edm @@ -33,7 +33,7 @@ - + @@ -61,5 +61,5 @@ - + \ No newline at end of file diff --git a/codbex-organizations/codbex-organizations.gen b/codbex-organizations/codbex-organizations.gen index 307f660..2f15f9b 100644 --- a/codbex-organizations/codbex-organizations.gen +++ b/codbex-organizations/codbex-organizations.gen @@ -34,6 +34,10 @@ "Organization-details", "Organization-details", "Organization-details", + "Organization-details", + "Organization-details", + "Organization-details", + "Organization-details", "Organization-details" ], "name": "Organizations", @@ -73,6 +77,10 @@ "Team-details", "Team-details", "Team-details", + "Team-details", + "Team-details", + "Team-details", + "Team-details", "Team-details" ], "name": "Teams", @@ -871,10 +879,10 @@ "description": "", "name": "Department", "tooltip": "", - "widgetDependsOnEntity": "", - "widgetDependsOnFilterBy": "", - "widgetDependsOnProperty": "", - "widgetDependsOnValueFrom": "", + "widgetDependsOnEntity": "Organization", + "widgetDependsOnFilterBy": "Organization", + "widgetDependsOnProperty": "Organization", + "widgetDependsOnValueFrom": "Id", "widgetDropDownKey": "Id", "widgetDropDownValue": "Name", "widgetIsMajor": true, @@ -1024,10 +1032,10 @@ "description": "", "name": "Department", "tooltip": "", - "widgetDependsOnEntity": "", - "widgetDependsOnFilterBy": "", - "widgetDependsOnProperty": "", - "widgetDependsOnValueFrom": "", + "widgetDependsOnEntity": "Organization", + "widgetDependsOnFilterBy": "Organization", + "widgetDependsOnProperty": "Organization", + "widgetDependsOnValueFrom": "Id", "widgetDropDownKey": "Id", "widgetDropDownValue": "Name", "widgetIsMajor": true, diff --git a/codbex-organizations/codbex-organizations.model b/codbex-organizations/codbex-organizations.model index 7253f9d..aa820fc 100644 --- a/codbex-organizations/codbex-organizations.model +++ b/codbex-organizations/codbex-organizations.model @@ -417,10 +417,10 @@ "description": "", "name": "Department", "tooltip": "", - "widgetDependsOnEntity": "", - "widgetDependsOnFilterBy": "", - "widgetDependsOnProperty": "", - "widgetDependsOnValueFrom": "", + "widgetDependsOnEntity": "Organization", + "widgetDependsOnFilterBy": "Organization", + "widgetDependsOnProperty": "Organization", + "widgetDependsOnValueFrom": "Id", "widgetDropDownKey": "Id", "widgetDropDownValue": "Name", "widgetIsMajor": "true", diff --git a/codbex-organizations/gen/codbex-organizations/ui/Organizations/Organization/Department/dialog-filter/view.extension b/codbex-organizations/gen/codbex-organizations/ui/Organizations/Organization/Department/dialog-filter/view.extension index 7b29244..d6c0bb6 100644 --- a/codbex-organizations/gen/codbex-organizations/ui/Organizations/Organization/Department/dialog-filter/view.extension +++ b/codbex-organizations/gen/codbex-organizations/ui/Organizations/Organization/Department/dialog-filter/view.extension @@ -1,5 +1,5 @@ { "module": "codbex-organizations/gen/codbex-organizations/ui/Organizations/Organization/Department/dialog-filter/view.js", - "extensionPoint": "codbex-organizations-dialog-window", + "extensionPoint": "dialog-window", "description": "codbex-organizations - Application Dialog Window" } \ No newline at end of file diff --git a/codbex-organizations/gen/codbex-organizations/ui/Organizations/Organization/Department/dialog-window/view.extension b/codbex-organizations/gen/codbex-organizations/ui/Organizations/Organization/Department/dialog-window/view.extension index 758dee0..f0a3c26 100644 --- a/codbex-organizations/gen/codbex-organizations/ui/Organizations/Organization/Department/dialog-window/view.extension +++ b/codbex-organizations/gen/codbex-organizations/ui/Organizations/Organization/Department/dialog-window/view.extension @@ -1,5 +1,5 @@ { "module": "codbex-organizations/gen/codbex-organizations/ui/Organizations/Organization/Department/dialog-window/view.js", - "extensionPoint": "codbex-organizations-dialog-window", + "extensionPoint": "dialog-window", "description": "codbex-organizations - Application Dialog Window" } \ No newline at end of file diff --git a/codbex-organizations/gen/codbex-organizations/ui/Organizations/Organization/dialog-filter/view.extension b/codbex-organizations/gen/codbex-organizations/ui/Organizations/Organization/dialog-filter/view.extension index dacbad3..d63e44b 100644 --- a/codbex-organizations/gen/codbex-organizations/ui/Organizations/Organization/dialog-filter/view.extension +++ b/codbex-organizations/gen/codbex-organizations/ui/Organizations/Organization/dialog-filter/view.extension @@ -1,5 +1,5 @@ { "module": "codbex-organizations/gen/codbex-organizations/ui/Organizations/Organization/dialog-filter/view.js", - "extensionPoint": "codbex-organizations-dialog-window", + "extensionPoint": "dialog-window", "description": "codbex-organizations - Application Dialog Window" } \ No newline at end of file diff --git a/codbex-organizations/gen/codbex-organizations/ui/Organizations/Organization/dialog-window/controller.js b/codbex-organizations/gen/codbex-organizations/ui/Organizations/Organization/dialog-window/controller.js new file mode 100644 index 0000000..c8ee23d --- /dev/null +++ b/codbex-organizations/gen/codbex-organizations/ui/Organizations/Organization/dialog-window/controller.js @@ -0,0 +1,82 @@ +angular.module('page', ["ideUI", "ideView", "entityApi"]) + .config(["messageHubProvider", function (messageHubProvider) { + messageHubProvider.eventIdPrefix = 'codbex-organizations.Organizations.Organization'; + }]) + .config(["entityApiProvider", function (entityApiProvider) { + entityApiProvider.baseUrl = "/services/ts/codbex-organizations/gen/codbex-organizations/api/Organizations/OrganizationService.ts"; + }]) + .controller('PageController', ['$scope', '$http', 'messageHub', 'ViewParameters', 'entityApi', function ($scope, $http, messageHub, ViewParameters, entityApi) { + + $scope.entity = {}; + $scope.forms = { + details: {}, + }; + $scope.formHeaders = { + select: "Organization Details", + create: "Create Organization", + update: "Update Organization" + }; + $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.optionsCompany = params.optionsCompany; + } + + $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 Organization: '${response.message}'`; + return; + } + messageHub.postMessage("entityCreated", response.data); + $scope.cancel(); + messageHub.showAlertSuccess("Organization", "Organization 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 Organization: '${response.message}'`; + return; + } + messageHub.postMessage("entityUpdated", response.data); + $scope.cancel(); + messageHub.showAlertSuccess("Organization", "Organization successfully updated"); + }); + }; + + $scope.serviceCompany = "/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyService.ts"; + + $scope.optionsCompany = []; + + $http.get("/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyService.ts").then(function (response) { + $scope.optionsCompany = response.data.map(e => { + return { + value: e.Id, + text: e.Name + } + }); + }); + + $scope.cancel = function () { + $scope.entity = {}; + $scope.action = 'select'; + messageHub.closeDialogWindow("Organization-details"); + }; + + $scope.clearErrorMessage = function () { + $scope.errorMessage = null; + }; + + }]); \ No newline at end of file diff --git a/codbex-organizations/gen/codbex-organizations/ui/Organizations/Organization/dialog-window/index.html b/codbex-organizations/gen/codbex-organizations/ui/Organizations/Organization/dialog-window/index.html new file mode 100644 index 0000000..aacf1ce --- /dev/null +++ b/codbex-organizations/gen/codbex-organizations/ui/Organizations/Organization/dialog-window/index.html @@ -0,0 +1,110 @@ + + + + + + + + + + + + + + + + + + + + + + + +
+ Name +
+
+ + + + The value doesn't match the required pattern '' + + +
+
+ +
+ CostCenter +
+
+ + + + The value doesn't match the required pattern '' + + +
+
+ +
+ Company +
+
+ + + +
+
+
+
+
+ + + + + + + + + + + + + + + diff --git a/codbex-organizations/gen/codbex-organizations/ui/Organizations/Organization/dialog-window/view.extension b/codbex-organizations/gen/codbex-organizations/ui/Organizations/Organization/dialog-window/view.extension new file mode 100644 index 0000000..cc67f46 --- /dev/null +++ b/codbex-organizations/gen/codbex-organizations/ui/Organizations/Organization/dialog-window/view.extension @@ -0,0 +1 @@ +{"module":"codbex-organizations/gen/codbex-organizations/ui/Organizations/Organization/dialog-window/view.js","extensionPoint":"dialog-window","description":"codbex-organizations - Application Dialog Window"} \ No newline at end of file diff --git a/codbex-organizations/gen/codbex-organizations/ui/Organizations/Organization/dialog-window/view.js b/codbex-organizations/gen/codbex-organizations/ui/Organizations/Organization/dialog-window/view.js new file mode 100644 index 0000000..937814a --- /dev/null +++ b/codbex-organizations/gen/codbex-organizations/ui/Organizations/Organization/dialog-window/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: "Organization-details", + label: "Organization", + link: "/services/web/codbex-organizations/gen/codbex-organizations/ui/Organizations/Organization/dialog-window/index.html", + perspectiveName: "Organizations", +}; + +if (typeof exports !== 'undefined') { + exports.getDialogWindow = function () { + return viewData; + } +} \ No newline at end of file diff --git a/codbex-organizations/gen/codbex-organizations/ui/Organizations/Organization/main-details/controller.js b/codbex-organizations/gen/codbex-organizations/ui/Organizations/Organization/main-details/controller.js index 16eec26..05877d7 100644 --- a/codbex-organizations/gen/codbex-organizations/ui/Organizations/Organization/main-details/controller.js +++ b/codbex-organizations/gen/codbex-organizations/ui/Organizations/Organization/main-details/controller.js @@ -5,7 +5,7 @@ angular.module('page', ["ideUI", "ideView", "entityApi"]) .config(["entityApiProvider", function (entityApiProvider) { entityApiProvider.baseUrl = "/services/ts/codbex-organizations/gen/codbex-organizations/api/Organizations/OrganizationService.ts"; }]) - .controller('PageController', ['$scope', 'Extensions', 'messageHub', 'entityApi', function ($scope, Extensions, messageHub, entityApi) { + .controller('PageController', ['$scope', '$http', 'Extensions', 'messageHub', 'entityApi', function ($scope, $http, Extensions, messageHub, entityApi) { $scope.entity = {}; $scope.forms = { @@ -100,5 +100,35 @@ angular.module('page', ["ideUI", "ideView", "entityApi"]) $scope.cancel = function () { messageHub.postMessage("clearDetails"); }; + + //-----------------Dialogs-------------------// + + $scope.createCompany = function () { + messageHub.showDialogWindow("Company-details", { + action: "create", + entity: {}, + }, null, false); + }; + + //-----------------Dialogs-------------------// + + + + //----------------Dropdowns-----------------// + + $scope.refreshCompany = function () { + $scope.optionsCompany = []; + $http.get("/services/ts/codbex-companies/gen/codbex-companies/api/Companies/CompanyService.ts").then(function (response) { + $scope.optionsCompany = response.data.map(e => { + return { + value: e.Id, + text: e.Name + } + }); + }); + }; + + //----------------Dropdowns-----------------// + }]); \ No newline at end of file diff --git a/codbex-organizations/gen/codbex-organizations/ui/Organizations/Organization/main-details/index.html b/codbex-organizations/gen/codbex-organizations/ui/Organizations/Organization/main-details/index.html index 1ef5b6f..30ee7cb 100644 --- a/codbex-organizations/gen/codbex-organizations/ui/Organizations/Organization/main-details/index.html +++ b/codbex-organizations/gen/codbex-organizations/ui/Organizations/Organization/main-details/index.html @@ -69,7 +69,7 @@
Company
-
+
-
+
+ + + +
diff --git a/codbex-organizations/gen/codbex-organizations/ui/Organizations/index.html b/codbex-organizations/gen/codbex-organizations/ui/Organizations/index.html index 7038e67..51c1c37 100644 --- a/codbex-organizations/gen/codbex-organizations/ui/Organizations/index.html +++ b/codbex-organizations/gen/codbex-organizations/ui/Organizations/index.html @@ -52,7 +52,7 @@ .constant('extensionPoint', { perspectives: 'codbex-organizations', views: 'codbex-organizations-view', - dialogWindows: 'codbex-organizations-dialog-window' + dialogWindows: 'dialog-window' }) .controller('ApplicationController', ['$scope', 'messageHub', 'Extensions', function ($scope, messageHub, Extensions) { $scope.state = { diff --git a/codbex-organizations/gen/codbex-organizations/ui/Teams/Team/dialog-filter/view.extension b/codbex-organizations/gen/codbex-organizations/ui/Teams/Team/dialog-filter/view.extension index a4e3893..16c05bf 100644 --- a/codbex-organizations/gen/codbex-organizations/ui/Teams/Team/dialog-filter/view.extension +++ b/codbex-organizations/gen/codbex-organizations/ui/Teams/Team/dialog-filter/view.extension @@ -1,5 +1,5 @@ { "module": "codbex-organizations/gen/codbex-organizations/ui/Teams/Team/dialog-filter/view.js", - "extensionPoint": "codbex-organizations-dialog-window", + "extensionPoint": "dialog-window", "description": "codbex-organizations - Application Dialog Window" } \ No newline at end of file diff --git a/codbex-organizations/gen/codbex-organizations/ui/Teams/Team/dialog-window/controller.js b/codbex-organizations/gen/codbex-organizations/ui/Teams/Team/dialog-window/controller.js new file mode 100644 index 0000000..99b6734 --- /dev/null +++ b/codbex-organizations/gen/codbex-organizations/ui/Teams/Team/dialog-window/controller.js @@ -0,0 +1,137 @@ +angular.module('page', ["ideUI", "ideView", "entityApi"]) + .config(["messageHubProvider", function (messageHubProvider) { + messageHubProvider.eventIdPrefix = 'codbex-organizations.Teams.Team'; + }]) + .config(["entityApiProvider", function (entityApiProvider) { + entityApiProvider.baseUrl = "/services/ts/codbex-organizations/gen/codbex-organizations/api/Teams/TeamService.ts"; + }]) + .controller('PageController', ['$scope', '$http', 'messageHub', 'ViewParameters', 'entityApi', function ($scope, $http, messageHub, ViewParameters, entityApi) { + + $scope.entity = {}; + $scope.forms = { + details: {}, + }; + $scope.formHeaders = { + select: "Team Details", + create: "Create Team", + update: "Update Team" + }; + $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.optionsManager = params.optionsManager; + $scope.optionsOrganization = params.optionsOrganization; + $scope.optionsDepartment = params.optionsDepartment; + } + + $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 Team: '${response.message}'`; + return; + } + messageHub.postMessage("entityCreated", response.data); + $scope.cancel(); + messageHub.showAlertSuccess("Team", "Team 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 Team: '${response.message}'`; + return; + } + messageHub.postMessage("entityUpdated", response.data); + $scope.cancel(); + messageHub.showAlertSuccess("Team", "Team successfully updated"); + }); + }; + + $scope.serviceManager = "/services/ts/codbex-employees/gen/codbex-employees/api/Employees/EmployeeService.ts"; + + $scope.optionsManager = []; + + $http.get("/services/ts/codbex-employees/gen/codbex-employees/api/Employees/EmployeeService.ts").then(function (response) { + $scope.optionsManager = response.data.map(e => { + return { + value: e.Id, + text: e.Name + } + }); + }); + $scope.serviceOrganization = "/services/ts/codbex-organizations/gen/codbex-organizations/api/Organizations/OrganizationService.ts"; + + $scope.optionsOrganization = []; + + $http.get("/services/ts/codbex-organizations/gen/codbex-organizations/api/Organizations/OrganizationService.ts").then(function (response) { + $scope.optionsOrganization = response.data.map(e => { + return { + value: e.Id, + text: e.Name + } + }); + }); + $scope.serviceDepartment = "/services/ts/codbex-organizations/gen/codbex-organizations/api/Organizations/DepartmentService.ts"; + + $scope.optionsDepartment = []; + + $http.get("/services/ts/codbex-organizations/gen/codbex-organizations/api/Organizations/DepartmentService.ts").then(function (response) { + $scope.optionsDepartment = response.data.map(e => { + return { + value: e.Id, + text: e.Name + } + }); + }); + + $scope.$watch('entity.Organization', function (newValue, oldValue) { + if (newValue !== undefined && newValue !== null) { + entityApi.$http.get($scope.serviceOrganization + '/' + newValue).then(function (response) { + let valueFrom = response.data.Id; + entityApi.$http.post("/services/ts/codbex-organizations/gen/codbex-organizations/api/Organizations/DepartmentService.ts/search", { + $filter: { + equals: { + Organization: valueFrom + } + } + }).then(function (response) { + $scope.optionsDepartment = response.data.map(e => { + return { + value: e.Id, + text: e.Name + } + }); + if ($scope.action !== 'select' && newValue !== oldValue) { + if ($scope.optionsDepartment.length == 1) { + $scope.entity.Department = $scope.optionsDepartment[0].value; + } else { + $scope.entity.Department = undefined; + } + } + }); + }); + } + }); + + $scope.cancel = function () { + $scope.entity = {}; + $scope.action = 'select'; + messageHub.closeDialogWindow("Team-details"); + }; + + $scope.clearErrorMessage = function () { + $scope.errorMessage = null; + }; + + }]); \ No newline at end of file diff --git a/codbex-organizations/gen/codbex-organizations/ui/Teams/Team/dialog-window/index.html b/codbex-organizations/gen/codbex-organizations/ui/Teams/Team/dialog-window/index.html new file mode 100644 index 0000000..2a22f68 --- /dev/null +++ b/codbex-organizations/gen/codbex-organizations/ui/Teams/Team/dialog-window/index.html @@ -0,0 +1,121 @@ + + + + + + + + + + + + + + + + + + + + + + + +
+ Name +
+
+ + + + The value doesn't match the required pattern '' + + +
+
+ +
+ Manager +
+
+ + + +
+
+ +
+ Organization +
+
+ + + +
+
+ +
+ Department +
+
+ + + +
+
+
+
+
+ + + + + + + + + + + + + + + diff --git a/codbex-organizations/gen/codbex-organizations/ui/Teams/Team/dialog-window/view.extension b/codbex-organizations/gen/codbex-organizations/ui/Teams/Team/dialog-window/view.extension new file mode 100644 index 0000000..cd57280 --- /dev/null +++ b/codbex-organizations/gen/codbex-organizations/ui/Teams/Team/dialog-window/view.extension @@ -0,0 +1 @@ +{"module":"codbex-organizations/gen/codbex-organizations/ui/Teams/Team/dialog-window/view.js","extensionPoint":"dialog-window","description":"codbex-organizations - Application Dialog Window"} \ No newline at end of file diff --git a/codbex-organizations/gen/codbex-organizations/ui/Teams/Team/dialog-window/view.js b/codbex-organizations/gen/codbex-organizations/ui/Teams/Team/dialog-window/view.js new file mode 100644 index 0000000..c0520f3 --- /dev/null +++ b/codbex-organizations/gen/codbex-organizations/ui/Teams/Team/dialog-window/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: "Team-details", + label: "Team", + link: "/services/web/codbex-organizations/gen/codbex-organizations/ui/Teams/Team/dialog-window/index.html", + perspectiveName: "Teams", +}; + +if (typeof exports !== 'undefined') { + exports.getDialogWindow = function () { + return viewData; + } +} \ No newline at end of file diff --git a/codbex-organizations/gen/codbex-organizations/ui/Teams/Team/main-details/controller.js b/codbex-organizations/gen/codbex-organizations/ui/Teams/Team/main-details/controller.js index 1b18a19..5ab3d98 100644 --- a/codbex-organizations/gen/codbex-organizations/ui/Teams/Team/main-details/controller.js +++ b/codbex-organizations/gen/codbex-organizations/ui/Teams/Team/main-details/controller.js @@ -5,7 +5,7 @@ angular.module('page', ["ideUI", "ideView", "entityApi"]) .config(["entityApiProvider", function (entityApiProvider) { entityApiProvider.baseUrl = "/services/ts/codbex-organizations/gen/codbex-organizations/api/Teams/TeamService.ts"; }]) - .controller('PageController', ['$scope', 'Extensions', 'messageHub', 'entityApi', function ($scope, Extensions, messageHub, entityApi) { + .controller('PageController', ['$scope', '$http', 'Extensions', 'messageHub', 'entityApi', function ($scope, $http, Extensions, messageHub, entityApi) { $scope.entity = {}; $scope.forms = { @@ -81,6 +81,35 @@ angular.module('page', ["ideUI", "ideView", "entityApi"]) $scope.serviceOrganization = "/services/ts/codbex-organizations/gen/codbex-organizations/api/Organizations/OrganizationService.ts"; $scope.serviceDepartment = "/services/ts/codbex-organizations/gen/codbex-organizations/api/Organizations/DepartmentService.ts"; + + $scope.$watch('entity.Organization', function (newValue, oldValue) { + if (newValue !== undefined && newValue !== null) { + entityApi.$http.get($scope.serviceOrganization + '/' + newValue).then(function (response) { + let valueFrom = response.data.Id; + entityApi.$http.post("/services/ts/codbex-organizations/gen/codbex-organizations/api/Organizations/DepartmentService.ts/search", { + $filter: { + equals: { + Organization: valueFrom + } + } + }).then(function (response) { + $scope.optionsDepartment = response.data.map(e => { + return { + value: e.Id, + text: e.Name + } + }); + if ($scope.action !== 'select' && newValue !== oldValue) { + if ($scope.optionsDepartment.length == 1) { + $scope.entity.Department = $scope.optionsDepartment[0].value; + } else { + $scope.entity.Department = undefined; + } + } + }); + }); + } + }); //-----------------Events-------------------// $scope.create = function () { @@ -110,5 +139,69 @@ angular.module('page', ["ideUI", "ideView", "entityApi"]) $scope.cancel = function () { messageHub.postMessage("clearDetails"); }; + + //-----------------Dialogs-------------------// + + $scope.createManager = function () { + messageHub.showDialogWindow("Employee-details", { + action: "create", + entity: {}, + }, null, false); + }; + $scope.createOrganization = function () { + messageHub.showDialogWindow("Organization-details", { + action: "create", + entity: {}, + }, null, false); + }; + $scope.createDepartment = function () { + messageHub.showDialogWindow("Department-details", { + action: "create", + entity: {}, + }, null, false); + }; + + //-----------------Dialogs-------------------// + + + + //----------------Dropdowns-----------------// + + $scope.refreshManager = function () { + $scope.optionsManager = []; + $http.get("/services/ts/codbex-employees/gen/codbex-employees/api/Employees/EmployeeService.ts").then(function (response) { + $scope.optionsManager = response.data.map(e => { + return { + value: e.Id, + text: e.Name + } + }); + }); + }; + $scope.refreshOrganization = function () { + $scope.optionsOrganization = []; + $http.get("/services/ts/codbex-organizations/gen/codbex-organizations/api/Organizations/OrganizationService.ts").then(function (response) { + $scope.optionsOrganization = response.data.map(e => { + return { + value: e.Id, + text: e.Name + } + }); + }); + }; + $scope.refreshDepartment = function () { + $scope.optionsDepartment = []; + $http.get("/services/ts/codbex-organizations/gen/codbex-organizations/api/Organizations/DepartmentService.ts").then(function (response) { + $scope.optionsDepartment = response.data.map(e => { + return { + value: e.Id, + text: e.Name + } + }); + }); + }; + + //----------------Dropdowns-----------------// + }]); \ No newline at end of file diff --git a/codbex-organizations/gen/codbex-organizations/ui/Teams/Team/main-details/index.html b/codbex-organizations/gen/codbex-organizations/ui/Teams/Team/main-details/index.html index e9d6ebc..f5d3eff 100644 --- a/codbex-organizations/gen/codbex-organizations/ui/Teams/Team/main-details/index.html +++ b/codbex-organizations/gen/codbex-organizations/ui/Teams/Team/main-details/index.html @@ -46,7 +46,7 @@
Manager
-
+
-
+
+ + + +
Organization
-
+
-
+
+ + + +
Department
-
+
-
+
+ + + +
diff --git a/codbex-organizations/gen/codbex-organizations/ui/Teams/index.html b/codbex-organizations/gen/codbex-organizations/ui/Teams/index.html index 34c4058..8b48003 100644 --- a/codbex-organizations/gen/codbex-organizations/ui/Teams/index.html +++ b/codbex-organizations/gen/codbex-organizations/ui/Teams/index.html @@ -52,7 +52,7 @@ .constant('extensionPoint', { perspectives: 'codbex-organizations', views: 'codbex-organizations-view', - dialogWindows: 'codbex-organizations-dialog-window' + dialogWindows: 'dialog-window' }) .controller('ApplicationController', ['$scope', 'messageHub', 'Extensions', function ($scope, messageHub, Extensions) { $scope.state = {