diff --git a/app/global-translations/locale-en.json b/app/global-translations/locale-en.json index e3e1b68b45..a4daf1bfcc 100644 --- a/app/global-translations/locale-en.json +++ b/app/global-translations/locale-en.json @@ -234,6 +234,9 @@ "label.anchor.manageagencies": "Manage Agencies", "label.anchor.managesupervisions": "Manage Supervisions", "label.anchor.manageportfolios": "Manage Portfolios", + "label.addnewportfolioormodifyportfolio": "Add new or modify portfolio", + "label.anchor.portfoliosplanning": "Portfolios Planning", + "label.portfolioplanning": "Portfolios Planning", "label.anchor.manageportfoliosplanning": "Manage Portfolios Planning", "#Inputs": "..", "label.input.name": "Name", diff --git a/app/scripts/controllers/organization/CreateCenterGroupController.js b/app/scripts/controllers/organization/CreateCenterGroupController.js index dd8cfddaec..f5ab28f88e 100644 --- a/app/scripts/controllers/organization/CreateCenterGroupController.js +++ b/app/scripts/controllers/organization/CreateCenterGroupController.js @@ -6,6 +6,7 @@ scope.responsibleUserOptions = []; scope.statusOptions = []; scope.portfolioCenterOptions = []; + scope.defaultMeetingPeriod = 0; scope.tf = "HH:mm"; let portfolioId = routeParams.portfolioId let portfolioCenterId = routeParams.portfolioCenterId; @@ -15,6 +16,25 @@ scope.portfolioCenterOptions = data; }); + resourceFactory.configurationResourceByName.get({configName:'meeting-default-duration'}, function (data){ + scope.defaultMeetingPeriod = data.value; + }); + + scope.startTimeChanged = function(){ + // Perform any additional logic or actions here + if(scope.formData.meetingStartTime != null + && scope.formData.meetingStartTime != undefined + && scope.formData.meetingStartTime != ""){ + console.log(scope.formData.meetingStartTime.getMinutes()); + + var meetingEndTime = new Date(scope.formData.meetingStartTime); + var hours = meetingEndTime.getHours(); + var minutesToAdd = meetingEndTime.getMinutes() + scope.defaultMeetingPeriod; + var newTime = new Date(meetingEndTime.getFullYear(), meetingEndTime.getMonth(), meetingEndTime.getDate(), hours, minutesToAdd); + scope.formData.meetingEndTime = newTime; + } + } + resourceFactory.centerGroupTemplateResource.get({portfolioCenterId:portfolioCenterId}, function (data) { scope.parentOfficesOptions = data.parentOfficesOptions; scope.responsibleUserOptions = data.responsibleUserOptions; diff --git a/app/scripts/services/ResourceFactoryProvider.js b/app/scripts/services/ResourceFactoryProvider.js index 1d78139d01..9f60353f5e 100755 --- a/app/scripts/services/ResourceFactoryProvider.js +++ b/app/scripts/services/ResourceFactoryProvider.js @@ -485,7 +485,7 @@ get: {method: 'GET', params: {}}, update: {method: 'PUT', params: {}} }), - configurationResourceByName: defineResource(apiVer + "/configurations/", {configName: '@configName'}, { + configurationResourceByName: defineResource(apiVer + "/configurations/name/:configName", {configName: '@configName'}, { get: {method: 'GET', params: {configName:'configName'}} }), cacheResource: defineResource(apiVer + "/caches", {}, { diff --git a/app/views/organization/createcentergroup.html b/app/views/organization/createcentergroup.html index 1b330a5231..e16f076129 100644 --- a/app/views/organization/createcentergroup.html +++ b/app/views/organization/createcentergroup.html @@ -95,7 +95,7 @@