From a7c0fa9d371c1e3da233138ccc15393c3e98790c Mon Sep 17 00:00:00 2001 From: Marco Antonio Nina Mena Date: Mon, 11 May 2015 15:01:38 -0400 Subject: [PATCH 01/44] Improvement list features --- workflow/engine/classes/model/AddonsStore.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/workflow/engine/classes/model/AddonsStore.php b/workflow/engine/classes/model/AddonsStore.php index 7d7daec9d..36e38a3e3 100644 --- a/workflow/engine/classes/model/AddonsStore.php +++ b/workflow/engine/classes/model/AddonsStore.php @@ -100,13 +100,12 @@ class AddonsStore extends BaseAddonsStore } $sw = 1; - $addonInLicense = in_array($addon->getAddonId(), $licenseManager->features); - - if ($sw == 1 && $addon->getAddonId() != "enterprise" && !$addonInLicense) { - $sw = 0; - } - if ($type == 'plugin') { + $addonInLicense = in_array($addon->getAddonId(), $licenseManager->features); + + if ($sw == 1 && $addon->getAddonId() != "enterprise" && !$addonInLicense) { + $sw = 0; + } if ($sw == 1 && $addon->isInstalled()) { if ($addon->isEnabled()) { $status = "installed"; @@ -126,7 +125,8 @@ class AddonsStore extends BaseAddonsStore } else { $status = "available"; $enabled = false; - if (!$addonInLicense && in_array($addon->getAddonName(), $licenseManager->licensedfeatures) == 1) { + $addonInLicense = in_array($addon->getAddonId(), $licenseManager->licensedfeatures); + if (in_array($addon->getAddonName(), $licenseManager->licensedfeatures) == 1) { $status = "installed"; $enabled = true; } From af56b369a37b7793b2d5e333d6a5b0f25687491f Mon Sep 17 00:00:00 2001 From: Dante Date: Mon, 25 May 2015 09:56:56 -0400 Subject: [PATCH 02/44] init datae compare in view added --- .../strategicDashboard/viewDashboard.html | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/workflow/engine/templates/strategicDashboard/viewDashboard.html b/workflow/engine/templates/strategicDashboard/viewDashboard.html index 9d6803363..eab8b6ec6 100644 --- a/workflow/engine/templates/strategicDashboard/viewDashboard.html +++ b/workflow/engine/templates/strategicDashboard/viewDashboard.html @@ -366,6 +366,34 @@
+
+ + + +
{translate label="ID_DASH_COMPARE_MONTH"}:
From 5057f9b77688688c026af32b812eab07d081c27f Mon Sep 17 00:00:00 2001 From: Dante Date: Mon, 25 May 2015 15:55:13 -0400 Subject: [PATCH 03/44] period compare fix --- .../strategicDashboard/viewDashboardView.js | 22 ++++++++++++++----- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/workflow/engine/js/strategicDashboard/viewDashboardView.js b/workflow/engine/js/strategicDashboard/viewDashboardView.js index 6d2f112d3..54901a5cd 100644 --- a/workflow/engine/js/strategicDashboard/viewDashboardView.js +++ b/workflow/engine/js/strategicDashboard/viewDashboardView.js @@ -442,8 +442,15 @@ var selectDefaultMonthAndYear = function () { compareDate.setMonth(compareDate.getMonth() - 1); var compareMonth = compareDate.getMonth() + 1; var compareYear = compareDate.getFullYear(); - $('#month').val(compareMonth); - $('#year').val(compareYear); + $('#monthInit').val(compareMonth); + $('#yearInit').val(compareYear); + + + var today = new Date(); + var todayMonth = today.getMonth(); + var todayYear = today.getFullYear(); + $('#month').val(todayMonth + 1); + $('#year').val(todayYear); } var setActiveDashboard = function () { @@ -522,15 +529,18 @@ var defaultInitDate = function() { var date = new Date(); var dateMonth = date.getMonth(); var dateYear = date.getFullYear(); - var initDate = $('#year').val() + '-' + $('#month').val() + '-' + '01'; - return initDate; + var retval = $('#yearInit').val() + '-' + $('#monthInit').val() + '-' + '01'; + return retval; } var defaultEndDate = function () { - var date = new Date(); + /*var date = new Date(); var dateMonth = date.getMonth(); var dateYear = date.getFullYear(); - return dateYear + "-" + (dateMonth + 1) + "-30"; + return dateYear + "-" + (dateMonth + 1) + "-30";*/ + + var retval = $('#year').val() + '-' + $('#month').val() + '-' + '01'; + return retval; } var fillDashboardsList = function (presenterData) { From 8b4d74210c4bc2104989a1b12769762ad77b15ba Mon Sep 17 00:00:00 2001 From: Dante Date: Tue, 26 May 2015 12:09:27 -0400 Subject: [PATCH 04/44] add oldValue to presenter->dashboardIndicatorsViewModel --- .../engine/js/strategicDashboard/viewDashboardPresenter.js | 1 + .../engine/templates/strategicDashboard/viewDashboard.html | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/workflow/engine/js/strategicDashboard/viewDashboardPresenter.js b/workflow/engine/js/strategicDashboard/viewDashboardPresenter.js index 77968c892..449a8ccd5 100644 --- a/workflow/engine/js/strategicDashboard/viewDashboardPresenter.js +++ b/workflow/engine/js/strategicDashboard/viewDashboardPresenter.js @@ -70,6 +70,7 @@ ViewDashboardPresenter.prototype.dashboardIndicatorsViewModel = function(data) { "DAS_IND_PERCENT_VARIATION" : "percentComparative", "DAS_IND_DIRECTION" : "direction", "DAS_IND_VALUE" : "value", + "DAS_IND_OLD_VALUE" : "oldValue", "DAS_IND_X" : "x", "DAS_IND_Y" : "y", "DAS_IND_WIDTH" : "width", diff --git a/workflow/engine/templates/strategicDashboard/viewDashboard.html b/workflow/engine/templates/strategicDashboard/viewDashboard.html index eab8b6ec6..39705503d 100644 --- a/workflow/engine/templates/strategicDashboard/viewDashboard.html +++ b/workflow/engine/templates/strategicDashboard/viewDashboard.html @@ -366,6 +366,9 @@
+
+
{translate label="ID_DASH_COMPARE_INIT_PERIOD"}:
+
-
{translate label="ID_DASH_COMPARE_MONTH"}:
+
{translate label="ID_DASH_COMPARE_END_PERIOD"}:
From 68a9c1aafd39cbc65ce027676f64ecc985375a7b Mon Sep 17 00:00:00 2001 From: Dante Date: Tue, 26 May 2015 16:32:46 -0400 Subject: [PATCH 05/44] rounding two 2 decimals the indicator's old value --- .../engine/js/strategicDashboard/viewDashboardPresenter.js | 5 ++++- .../engine/templates/strategicDashboard/viewDashboard.html | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/workflow/engine/js/strategicDashboard/viewDashboardPresenter.js b/workflow/engine/js/strategicDashboard/viewDashboardPresenter.js index 449a8ccd5..b7905e6ef 100644 --- a/workflow/engine/js/strategicDashboard/viewDashboardPresenter.js +++ b/workflow/engine/js/strategicDashboard/viewDashboardPresenter.js @@ -70,7 +70,6 @@ ViewDashboardPresenter.prototype.dashboardIndicatorsViewModel = function(data) { "DAS_IND_PERCENT_VARIATION" : "percentComparative", "DAS_IND_DIRECTION" : "direction", "DAS_IND_VALUE" : "value", - "DAS_IND_OLD_VALUE" : "oldValue", "DAS_IND_X" : "x", "DAS_IND_Y" : "y", "DAS_IND_WIDTH" : "width", @@ -109,6 +108,10 @@ ViewDashboardPresenter.prototype.dashboardIndicatorsViewModel = function(data) { : newObject.percentComparative; newObject.value = that.roundedIndicatorValue(newObject.value); + + //we don't use the database values to avoid rounding differences + newObject.oldValue = newObject.value - newObject.comparative + newObject.favorite = 0; that.setStatusButtonWidthsAndDisplayValues(newObject); diff --git a/workflow/engine/templates/strategicDashboard/viewDashboard.html b/workflow/engine/templates/strategicDashboard/viewDashboard.html index 39705503d..58b11bc69 100644 --- a/workflow/engine/templates/strategicDashboard/viewDashboard.html +++ b/workflow/engine/templates/strategicDashboard/viewDashboard.html @@ -53,10 +53,11 @@
<%- indicator.value %>
+
<%- indicator.oldValue %>
- <%- indicator.comparative %> <%- indicator.percentComparative %> + <%- indicator.oldValue %> <%- indicator.comparative %> <%- indicator.percentComparative %>
From c55eb6d58b3a3248152692b8246b9fcfafe868b5 Mon Sep 17 00:00:00 2001 From: Marco Antonio Nina Mena Date: Tue, 26 May 2015 16:48:58 -0400 Subject: [PATCH 06/44] Add interfaz list Inbox --- .../classes/class.indicatorsCalculator.php | 8 + .../engine/controllers/strategicDashboard.php | 1 + .../strategicDashboard/viewDashboardView.js | 57 +- .../strategicDashboard/viewDashboard.html | 738 +++++++++--------- workflow/public_html/css/sb-admin-2.css | 4 + 5 files changed, 436 insertions(+), 372 deletions(-) diff --git a/workflow/engine/classes/class.indicatorsCalculator.php b/workflow/engine/classes/class.indicatorsCalculator.php index f4bbcfcb6..b352e3403 100644 --- a/workflow/engine/classes/class.indicatorsCalculator.php +++ b/workflow/engine/classes/class.indicatorsCalculator.php @@ -550,6 +550,14 @@ class indicatorsCalculator $response = array(); $result = $this->statusIndicatorGeneral($usrUid); + $list = new \ListInbox(); + $filters = array(); + $filters['sort'] = "LIST_INBOX.APP_UPDATE_DATE"; + $filters['dir'] = "ASC"; + $filters['action'] = "to_do"; + $filters['paged'] = 0; + $response['data'] = $list->loadList($usrUid, $filters); + $response['overdue'] = 0; $response['atRisk'] = 0; $response['onTime'] = 0; diff --git a/workflow/engine/controllers/strategicDashboard.php b/workflow/engine/controllers/strategicDashboard.php index c2b07ca7a..a4583e212 100644 --- a/workflow/engine/controllers/strategicDashboard.php +++ b/workflow/engine/controllers/strategicDashboard.php @@ -197,6 +197,7 @@ class StrategicDashboard extends Controller $translation['ID_TIME_HOURS'] = G::LoadTranslation( 'ID_TIME_HOURS'); $translation['ID_GROUPS'] = G::LoadTranslation( 'ID_GROUPS'); $translation['ID_COSTS'] = G::LoadTranslation( 'ID_COSTS'); + $translation['ID_PROCESS'] = G::LoadTranslation( 'ID_PROCESS'); $translation['ID_TASK'] = G::LoadTranslation( 'ID_TASK'); $translation['ID_USER'] = G::LoadTranslation( 'ID_USER'); $translation['ID_YEAR'] = G::LoadTranslation( 'ID_YEAR'); diff --git a/workflow/engine/js/strategicDashboard/viewDashboardView.js b/workflow/engine/js/strategicDashboard/viewDashboardView.js index 54901a5cd..e50eb44d1 100644 --- a/workflow/engine/js/strategicDashboard/viewDashboardView.js +++ b/workflow/engine/js/strategicDashboard/viewDashboardView.js @@ -88,15 +88,23 @@ WidgetBuilder.prototype.buildSpecialIndicatorFirstViewDetail = function (oneItem //detailData = {indicatorId, uid, name, averateTime...} if (oneItemDetail == null){throw new Error("oneItemDetail is null ");} if (!typeof(oneItemDetail) === 'object'){throw new Error( "detailData is not and object ->" + oneItemDetail);} - if (!oneItemDetail.hasOwnProperty("name")){throw new Error("buildSpecialIndicatorFirstViewDetail -> detailData has not the name param. Has it the correct Type? ->" + oneItemDetail);} + if (window.currentIndicator.type != '1050' && !oneItemDetail.hasOwnProperty("name")){throw new Error("buildSpecialIndicatorFirstViewDetail -> detailData has not the name param. Has it the correct Type? ->" + oneItemDetail);} - _.templateSettings.variable = "detailData"; - var template = _.template ($("script.specialIndicatorDetail").html()); - var $retval = $(template(oneItemDetail)); - $retval.find(".detail-efficiency-selector").text(G_STRING.ID_EFFICIENCY_INDEX); - $retval.find(".detail-cost-selector").text(G_STRING.ID_INEFFICIENCY_COST); - this.setColorForInefficiency($retval.find(".detail-cost-number-selector"), oneItemDetail); - return $retval; + _.templateSettings.variable = "detailData"; + var template = _.template ($("script.specialIndicatorDetail").html()); + if (window.currentIndicator.type == '1050') { + template = _.template ($("script.statusInboxDetail").html()); + } + var $retval = $(template(oneItemDetail)); + $retval.find(".detail-efficiency-selector").text(G_STRING.ID_EFFICIENCY_INDEX); + $retval.find(".detail-cost-selector").text(G_STRING.ID_INEFFICIENCY_COST); + + if (window.currentIndicator.type == '1050') { + $retval.find(".detail-pro-title").text(G_STRING.ID_PROCESS); + $retval.find(".detail-tas-title").text(G_STRING.ID_TASK); + } + this.setColorForInefficiency($retval.find(".detail-cost-number-selector"), oneItemDetail); + return $retval; } WidgetBuilder.prototype.buildStatusIndicatorFirstView = function (indicatorData) { @@ -374,6 +382,7 @@ $(document).ready(function() { $('#indicatorsGridStack').on('click','.ind-button-selector', function() { var indicatorId = $(this).data('indicator-id'); loadIndicator(indicatorId, defaultInitDate(), defaultEndDate()); + }); $('body').on('click','.bread-back-selector', function() { @@ -619,7 +628,8 @@ var fillStatusIndicatorFirstView = function (presenterData) { var graph3 = new PieChart(presenterData.graph3Data, graphParams3, null, null); graph3.drawChart(); - var indicatorPrincipalData = widgetBuilder.getIndicatorLoadedById(presenterData.id) + var indicatorPrincipalData = widgetBuilder.getIndicatorLoadedById(presenterData.id); + this.fillSpecialIndicatorFirstViewDetail(presenter.orderDataList(presenterData.data, selectedOrderOfDetailList())); setIndicatorActiveMarker(); } @@ -694,7 +704,7 @@ var fillSpecialIndicatorFirstView = function(presenterData) { } }; - var indicatorPrincipalData = widgetBuilder.getIndicatorLoadedById(presenterData.id) + var indicatorPrincipalData = widgetBuilder.getIndicatorLoadedById(presenterData.id); if (indicatorPrincipalData.type == "1010") { var graph = new Pie3DChart(presenterData.dataToDraw, peiParams, null, null); @@ -721,7 +731,7 @@ var fillSpecialIndicatorFirstViewDetail = function (list) { var gridDetail = $('#relatedDetailGridStack').data('gridstack'); gridDetail.remove_all(); - window.currentDetailList = list; + window.currentDetailList = list; window.currentDetailFunction = fillSpecialIndicatorFirstViewDetail; $.each(list, function(index, dataItem) { @@ -733,13 +743,20 @@ var fillSpecialIndicatorFirstViewDetail = function (list) { } gridDetail.add_widget($widget, x, 15, 6, 2, true); }); - if (window.currentIndicator.type == "1010") { - $('#relatedLabel').find('h3').text(G_STRING['ID_RELATED_PROCESS']); - } - if (window.currentIndicator.type == "1030") { - $('#relatedLabel').find('h3').text(G_STRING['ID_RELATED_GROUPS']); - } - hideScrollIfAllDivsAreVisible(); + var label = ''; + switch (window.currentIndicator.type) { + case '1010': + label = G_STRING['ID_RELATED_PROCESS']; + break; + case '1030': + label = G_STRING['ID_RELATED_GROUPS']; + break; + case '1050': + label = G_STRING['ID_RELATED_TASKS']; + break; + } + $('#relatedLabel').find('h3').text(label); + hideScrollIfAllDivsAreVisible(); } var fillSpecialIndicatorSecondView = function(presenterData) { @@ -954,7 +971,7 @@ var fillGeneralIndicatorFirstView = function (presenterData) { setIndicatorActiveMarker(); } -var animateProgress = function (indicatorItem, widget){ +/*var animateProgress = function (indicatorItem, widget){ var getRequestAnimationFrame = function () { return window.requestAnimationFrame || window.webkitRequestAnimationFrame || @@ -998,7 +1015,7 @@ var animateProgress = function (indicatorItem, widget){ } fpAnimationFrame(animacion); -}; +};*/ /*var dashboardButtonTemplate = '
\ \ diff --git a/workflow/engine/templates/strategicDashboard/viewDashboard.html b/workflow/engine/templates/strategicDashboard/viewDashboard.html index 58b11bc69..b1c8fd47d 100644 --- a/workflow/engine/templates/strategicDashboard/viewDashboard.html +++ b/workflow/engine/templates/strategicDashboard/viewDashboard.html @@ -4,6 +4,7 @@ + Dashboards @@ -33,7 +34,7 @@ {/foreach} - + @@ -41,271 +42,304 @@ - + - + - + - +
+
+
<%- indicator.efficiencyIndexToShow %>
+
+
+
+
{$unitCost} <%- indicator.inefficiencyCostToShow %>
+
+
+
+
+
+
+
+ - +
+ - + - + - + - + - + + - - + + - + @@ -366,76 +400,76 @@

-
-
-
{translate label="ID_DASH_COMPARE_INIT_PERIOD"}:
-
-
- +
+
+
{translate label="ID_DASH_COMPARE_INIT_PERIOD"}:
+
+
+ - -
-
-
{translate label="ID_DASH_COMPARE_END_PERIOD"}:
-
+ +
+
+
{translate label="ID_DASH_COMPARE_END_PERIOD"}:
+
-
- +
+ - -
+ +
-
- -
+
+ +
-
+
@@ -468,18 +502,18 @@
- +
-
+
diff --git a/workflow/public_html/css/sb-admin-2.css b/workflow/public_html/css/sb-admin-2.css index 5a446c188..ca77a80ea 100644 --- a/workflow/public_html/css/sb-admin-2.css +++ b/workflow/public_html/css/sb-admin-2.css @@ -545,6 +545,10 @@ table.dataTable thead .sorting:after { margin: 11px 17px 0 0; } +.dashboard-right { + margin: 5px; +} + .dashboard-right h5{ margin: 20px 12px 0 0; } From d4eb6ea00f7fcc1f24368a1f9384907da035cd20 Mon Sep 17 00:00:00 2001 From: Dante Date: Wed, 27 May 2015 10:16:44 -0400 Subject: [PATCH 07/44] Arrows icons changed --- .../engine/js/strategicDashboard/viewDashboardView.js | 10 +++++----- .../templates/strategicDashboard/viewDashboard.html | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/workflow/engine/js/strategicDashboard/viewDashboardView.js b/workflow/engine/js/strategicDashboard/viewDashboardView.js index e50eb44d1..295e1f57e 100644 --- a/workflow/engine/js/strategicDashboard/viewDashboardView.js +++ b/workflow/engine/js/strategicDashboard/viewDashboardView.js @@ -27,18 +27,18 @@ WidgetBuilder.prototype.buildSpecialIndicatorButton = function (indicator) { if(indicator.comparative < 0){ $retval.find(".ind-container-selector").removeClass("panel-green").addClass("panel-red"); - $retval.find(".ind-symbol-selector").removeClass("fa-chevron-up").addClass("fa-chevron-down"); + $retval.find(".ind-symbol-selector").removeClass("fa-arrow-up").addClass("fa-arrow-down"); } if(indicator.comparative > 0){ $retval.find(".ind-container-selector").removeClass("panel-red").addClass("panel-green"); - $retval.find(".ind-symbol-selector").removeClass("fa-chevron-down").addClass("fa-chevron-up"); + $retval.find(".ind-symbol-selector").removeClass("fa-arrow-down").addClass("fa-arrow-up"); } if(indicator.comparative == 0){ - $retval.find(".ind-symbol-selector").removeClass("fa-chevron-up"); - $retval.find(".ind-symbol-selector").removeClass("fa-chevron-down"); - $retval.find(".ind-symbol-selector").addClass("fa-circle-o"); + $retval.find(".ind-symbol-selector").removeClass("fa-arrow-up"); + $retval.find(".ind-symbol-selector").removeClass("fa-arrow-down"); + $retval.find(".ind-symbol-selector").addClass("fa-arrows-h"); $retval.find(".ind-container-selector").removeClass("panel-red").addClass("panel-green"); } return $retval; diff --git a/workflow/engine/templates/strategicDashboard/viewDashboard.html b/workflow/engine/templates/strategicDashboard/viewDashboard.html index b1c8fd47d..424cc3e43 100644 --- a/workflow/engine/templates/strategicDashboard/viewDashboard.html +++ b/workflow/engine/templates/strategicDashboard/viewDashboard.html @@ -56,7 +56,7 @@
<%- indicator.value %>
<%- indicator.oldValue %>
-
+
<%- indicator.oldValue %> <%- indicator.comparative %> <%- indicator.percentComparative %>
From a5322a97a2f11239da4d7e03d560939b1d7c0920 Mon Sep 17 00:00:00 2001 From: Dante Date: Fri, 29 May 2015 11:43:32 -0400 Subject: [PATCH 08/44] Revert "Arrows icons changed" This reverts commit 20ae6d31eec85f2fde0aa6c4a30d904ec8b66f75. --- .../engine/js/strategicDashboard/viewDashboardView.js | 10 +++++----- .../templates/strategicDashboard/viewDashboard.html | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/workflow/engine/js/strategicDashboard/viewDashboardView.js b/workflow/engine/js/strategicDashboard/viewDashboardView.js index 295e1f57e..e50eb44d1 100644 --- a/workflow/engine/js/strategicDashboard/viewDashboardView.js +++ b/workflow/engine/js/strategicDashboard/viewDashboardView.js @@ -27,18 +27,18 @@ WidgetBuilder.prototype.buildSpecialIndicatorButton = function (indicator) { if(indicator.comparative < 0){ $retval.find(".ind-container-selector").removeClass("panel-green").addClass("panel-red"); - $retval.find(".ind-symbol-selector").removeClass("fa-arrow-up").addClass("fa-arrow-down"); + $retval.find(".ind-symbol-selector").removeClass("fa-chevron-up").addClass("fa-chevron-down"); } if(indicator.comparative > 0){ $retval.find(".ind-container-selector").removeClass("panel-red").addClass("panel-green"); - $retval.find(".ind-symbol-selector").removeClass("fa-arrow-down").addClass("fa-arrow-up"); + $retval.find(".ind-symbol-selector").removeClass("fa-chevron-down").addClass("fa-chevron-up"); } if(indicator.comparative == 0){ - $retval.find(".ind-symbol-selector").removeClass("fa-arrow-up"); - $retval.find(".ind-symbol-selector").removeClass("fa-arrow-down"); - $retval.find(".ind-symbol-selector").addClass("fa-arrows-h"); + $retval.find(".ind-symbol-selector").removeClass("fa-chevron-up"); + $retval.find(".ind-symbol-selector").removeClass("fa-chevron-down"); + $retval.find(".ind-symbol-selector").addClass("fa-circle-o"); $retval.find(".ind-container-selector").removeClass("panel-red").addClass("panel-green"); } return $retval; diff --git a/workflow/engine/templates/strategicDashboard/viewDashboard.html b/workflow/engine/templates/strategicDashboard/viewDashboard.html index 424cc3e43..b1c8fd47d 100644 --- a/workflow/engine/templates/strategicDashboard/viewDashboard.html +++ b/workflow/engine/templates/strategicDashboard/viewDashboard.html @@ -56,7 +56,7 @@
<%- indicator.value %>
<%- indicator.oldValue %>
-
+
<%- indicator.oldValue %> <%- indicator.comparative %> <%- indicator.percentComparative %>
From 535d11a41b522b6185c02520886253a69a034f7d Mon Sep 17 00:00:00 2001 From: Dante Date: Fri, 29 May 2015 11:45:06 -0400 Subject: [PATCH 09/44] Revert "Add interfaz list Inbox" This reverts commit c326dc43c37047faf54f9a6bfa2774722f45e33d. --- .../classes/class.indicatorsCalculator.php | 8 - .../engine/controllers/strategicDashboard.php | 1 - .../strategicDashboard/viewDashboardView.js | 57 +- .../strategicDashboard/viewDashboard.html | 738 +++++++++--------- workflow/public_html/css/sb-admin-2.css | 4 - 5 files changed, 372 insertions(+), 436 deletions(-) diff --git a/workflow/engine/classes/class.indicatorsCalculator.php b/workflow/engine/classes/class.indicatorsCalculator.php index b352e3403..f4bbcfcb6 100644 --- a/workflow/engine/classes/class.indicatorsCalculator.php +++ b/workflow/engine/classes/class.indicatorsCalculator.php @@ -550,14 +550,6 @@ class indicatorsCalculator $response = array(); $result = $this->statusIndicatorGeneral($usrUid); - $list = new \ListInbox(); - $filters = array(); - $filters['sort'] = "LIST_INBOX.APP_UPDATE_DATE"; - $filters['dir'] = "ASC"; - $filters['action'] = "to_do"; - $filters['paged'] = 0; - $response['data'] = $list->loadList($usrUid, $filters); - $response['overdue'] = 0; $response['atRisk'] = 0; $response['onTime'] = 0; diff --git a/workflow/engine/controllers/strategicDashboard.php b/workflow/engine/controllers/strategicDashboard.php index a4583e212..c2b07ca7a 100644 --- a/workflow/engine/controllers/strategicDashboard.php +++ b/workflow/engine/controllers/strategicDashboard.php @@ -197,7 +197,6 @@ class StrategicDashboard extends Controller $translation['ID_TIME_HOURS'] = G::LoadTranslation( 'ID_TIME_HOURS'); $translation['ID_GROUPS'] = G::LoadTranslation( 'ID_GROUPS'); $translation['ID_COSTS'] = G::LoadTranslation( 'ID_COSTS'); - $translation['ID_PROCESS'] = G::LoadTranslation( 'ID_PROCESS'); $translation['ID_TASK'] = G::LoadTranslation( 'ID_TASK'); $translation['ID_USER'] = G::LoadTranslation( 'ID_USER'); $translation['ID_YEAR'] = G::LoadTranslation( 'ID_YEAR'); diff --git a/workflow/engine/js/strategicDashboard/viewDashboardView.js b/workflow/engine/js/strategicDashboard/viewDashboardView.js index e50eb44d1..54901a5cd 100644 --- a/workflow/engine/js/strategicDashboard/viewDashboardView.js +++ b/workflow/engine/js/strategicDashboard/viewDashboardView.js @@ -88,23 +88,15 @@ WidgetBuilder.prototype.buildSpecialIndicatorFirstViewDetail = function (oneItem //detailData = {indicatorId, uid, name, averateTime...} if (oneItemDetail == null){throw new Error("oneItemDetail is null ");} if (!typeof(oneItemDetail) === 'object'){throw new Error( "detailData is not and object ->" + oneItemDetail);} - if (window.currentIndicator.type != '1050' && !oneItemDetail.hasOwnProperty("name")){throw new Error("buildSpecialIndicatorFirstViewDetail -> detailData has not the name param. Has it the correct Type? ->" + oneItemDetail);} + if (!oneItemDetail.hasOwnProperty("name")){throw new Error("buildSpecialIndicatorFirstViewDetail -> detailData has not the name param. Has it the correct Type? ->" + oneItemDetail);} - _.templateSettings.variable = "detailData"; - var template = _.template ($("script.specialIndicatorDetail").html()); - if (window.currentIndicator.type == '1050') { - template = _.template ($("script.statusInboxDetail").html()); - } - var $retval = $(template(oneItemDetail)); - $retval.find(".detail-efficiency-selector").text(G_STRING.ID_EFFICIENCY_INDEX); - $retval.find(".detail-cost-selector").text(G_STRING.ID_INEFFICIENCY_COST); - - if (window.currentIndicator.type == '1050') { - $retval.find(".detail-pro-title").text(G_STRING.ID_PROCESS); - $retval.find(".detail-tas-title").text(G_STRING.ID_TASK); - } - this.setColorForInefficiency($retval.find(".detail-cost-number-selector"), oneItemDetail); - return $retval; + _.templateSettings.variable = "detailData"; + var template = _.template ($("script.specialIndicatorDetail").html()); + var $retval = $(template(oneItemDetail)); + $retval.find(".detail-efficiency-selector").text(G_STRING.ID_EFFICIENCY_INDEX); + $retval.find(".detail-cost-selector").text(G_STRING.ID_INEFFICIENCY_COST); + this.setColorForInefficiency($retval.find(".detail-cost-number-selector"), oneItemDetail); + return $retval; } WidgetBuilder.prototype.buildStatusIndicatorFirstView = function (indicatorData) { @@ -382,7 +374,6 @@ $(document).ready(function() { $('#indicatorsGridStack').on('click','.ind-button-selector', function() { var indicatorId = $(this).data('indicator-id'); loadIndicator(indicatorId, defaultInitDate(), defaultEndDate()); - }); $('body').on('click','.bread-back-selector', function() { @@ -628,8 +619,7 @@ var fillStatusIndicatorFirstView = function (presenterData) { var graph3 = new PieChart(presenterData.graph3Data, graphParams3, null, null); graph3.drawChart(); - var indicatorPrincipalData = widgetBuilder.getIndicatorLoadedById(presenterData.id); - this.fillSpecialIndicatorFirstViewDetail(presenter.orderDataList(presenterData.data, selectedOrderOfDetailList())); + var indicatorPrincipalData = widgetBuilder.getIndicatorLoadedById(presenterData.id) setIndicatorActiveMarker(); } @@ -704,7 +694,7 @@ var fillSpecialIndicatorFirstView = function(presenterData) { } }; - var indicatorPrincipalData = widgetBuilder.getIndicatorLoadedById(presenterData.id); + var indicatorPrincipalData = widgetBuilder.getIndicatorLoadedById(presenterData.id) if (indicatorPrincipalData.type == "1010") { var graph = new Pie3DChart(presenterData.dataToDraw, peiParams, null, null); @@ -731,7 +721,7 @@ var fillSpecialIndicatorFirstViewDetail = function (list) { var gridDetail = $('#relatedDetailGridStack').data('gridstack'); gridDetail.remove_all(); - window.currentDetailList = list; + window.currentDetailList = list; window.currentDetailFunction = fillSpecialIndicatorFirstViewDetail; $.each(list, function(index, dataItem) { @@ -743,20 +733,13 @@ var fillSpecialIndicatorFirstViewDetail = function (list) { } gridDetail.add_widget($widget, x, 15, 6, 2, true); }); - var label = ''; - switch (window.currentIndicator.type) { - case '1010': - label = G_STRING['ID_RELATED_PROCESS']; - break; - case '1030': - label = G_STRING['ID_RELATED_GROUPS']; - break; - case '1050': - label = G_STRING['ID_RELATED_TASKS']; - break; - } - $('#relatedLabel').find('h3').text(label); - hideScrollIfAllDivsAreVisible(); + if (window.currentIndicator.type == "1010") { + $('#relatedLabel').find('h3').text(G_STRING['ID_RELATED_PROCESS']); + } + if (window.currentIndicator.type == "1030") { + $('#relatedLabel').find('h3').text(G_STRING['ID_RELATED_GROUPS']); + } + hideScrollIfAllDivsAreVisible(); } var fillSpecialIndicatorSecondView = function(presenterData) { @@ -971,7 +954,7 @@ var fillGeneralIndicatorFirstView = function (presenterData) { setIndicatorActiveMarker(); } -/*var animateProgress = function (indicatorItem, widget){ +var animateProgress = function (indicatorItem, widget){ var getRequestAnimationFrame = function () { return window.requestAnimationFrame || window.webkitRequestAnimationFrame || @@ -1015,7 +998,7 @@ var fillGeneralIndicatorFirstView = function (presenterData) { } fpAnimationFrame(animacion); -};*/ +}; /*var dashboardButtonTemplate = '
\ \ diff --git a/workflow/engine/templates/strategicDashboard/viewDashboard.html b/workflow/engine/templates/strategicDashboard/viewDashboard.html index b1c8fd47d..58b11bc69 100644 --- a/workflow/engine/templates/strategicDashboard/viewDashboard.html +++ b/workflow/engine/templates/strategicDashboard/viewDashboard.html @@ -4,7 +4,6 @@ - Dashboards @@ -34,7 +33,7 @@ {/foreach} - + @@ -42,304 +41,271 @@ - + - + - + - +
+
+
<%- indicator.efficiencyIndexToShow %>
+
+
+
+
{$unitCost} <%- indicator.inefficiencyCostToShow %>
+
+
+
+
+
+
+
+ - +
+ - + - + - + - + - - - - - + + - + @@ -400,76 +366,76 @@

-
-
-
{translate label="ID_DASH_COMPARE_INIT_PERIOD"}:
-
-
- +
+
+
{translate label="ID_DASH_COMPARE_INIT_PERIOD"}:
+
+
+ - -
-
-
{translate label="ID_DASH_COMPARE_END_PERIOD"}:
-
+ +
+
+
{translate label="ID_DASH_COMPARE_END_PERIOD"}:
+
-
- +
+ - -
+ +
-
- -
+
+ +
-
+
@@ -502,18 +468,18 @@
- +
-
+
diff --git a/workflow/public_html/css/sb-admin-2.css b/workflow/public_html/css/sb-admin-2.css index ca77a80ea..5a446c188 100644 --- a/workflow/public_html/css/sb-admin-2.css +++ b/workflow/public_html/css/sb-admin-2.css @@ -545,10 +545,6 @@ table.dataTable thead .sorting:after { margin: 11px 17px 0 0; } -.dashboard-right { - margin: 5px; -} - .dashboard-right h5{ margin: 20px 12px 0 0; } From dde451e37fbe64fe25c7e2f0328552b7ed872e51 Mon Sep 17 00:00:00 2001 From: Dante Date: Fri, 29 May 2015 11:45:37 -0400 Subject: [PATCH 10/44] Revert "rounding two 2 decimals the indicator's old value" This reverts commit 67b4e31a3075cca526a063cfed85f70e5a00cabc. --- .../engine/js/strategicDashboard/viewDashboardPresenter.js | 5 +---- .../engine/templates/strategicDashboard/viewDashboard.html | 3 +-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/workflow/engine/js/strategicDashboard/viewDashboardPresenter.js b/workflow/engine/js/strategicDashboard/viewDashboardPresenter.js index b7905e6ef..449a8ccd5 100644 --- a/workflow/engine/js/strategicDashboard/viewDashboardPresenter.js +++ b/workflow/engine/js/strategicDashboard/viewDashboardPresenter.js @@ -70,6 +70,7 @@ ViewDashboardPresenter.prototype.dashboardIndicatorsViewModel = function(data) { "DAS_IND_PERCENT_VARIATION" : "percentComparative", "DAS_IND_DIRECTION" : "direction", "DAS_IND_VALUE" : "value", + "DAS_IND_OLD_VALUE" : "oldValue", "DAS_IND_X" : "x", "DAS_IND_Y" : "y", "DAS_IND_WIDTH" : "width", @@ -108,10 +109,6 @@ ViewDashboardPresenter.prototype.dashboardIndicatorsViewModel = function(data) { : newObject.percentComparative; newObject.value = that.roundedIndicatorValue(newObject.value); - - //we don't use the database values to avoid rounding differences - newObject.oldValue = newObject.value - newObject.comparative - newObject.favorite = 0; that.setStatusButtonWidthsAndDisplayValues(newObject); diff --git a/workflow/engine/templates/strategicDashboard/viewDashboard.html b/workflow/engine/templates/strategicDashboard/viewDashboard.html index 58b11bc69..39705503d 100644 --- a/workflow/engine/templates/strategicDashboard/viewDashboard.html +++ b/workflow/engine/templates/strategicDashboard/viewDashboard.html @@ -53,11 +53,10 @@
<%- indicator.value %>
-
<%- indicator.oldValue %>
- <%- indicator.oldValue %> <%- indicator.comparative %> <%- indicator.percentComparative %> + <%- indicator.comparative %> <%- indicator.percentComparative %>
From bb23de525330df453b025e3722a68845aad0cc89 Mon Sep 17 00:00:00 2001 From: Dante Date: Fri, 29 May 2015 11:45:48 -0400 Subject: [PATCH 11/44] Revert "add oldValue to presenter->dashboardIndicatorsViewModel" This reverts commit 43e466721fd60c615ccabb6548652365ca8edadf. --- .../engine/js/strategicDashboard/viewDashboardPresenter.js | 1 - .../engine/templates/strategicDashboard/viewDashboard.html | 5 +---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/workflow/engine/js/strategicDashboard/viewDashboardPresenter.js b/workflow/engine/js/strategicDashboard/viewDashboardPresenter.js index 449a8ccd5..77968c892 100644 --- a/workflow/engine/js/strategicDashboard/viewDashboardPresenter.js +++ b/workflow/engine/js/strategicDashboard/viewDashboardPresenter.js @@ -70,7 +70,6 @@ ViewDashboardPresenter.prototype.dashboardIndicatorsViewModel = function(data) { "DAS_IND_PERCENT_VARIATION" : "percentComparative", "DAS_IND_DIRECTION" : "direction", "DAS_IND_VALUE" : "value", - "DAS_IND_OLD_VALUE" : "oldValue", "DAS_IND_X" : "x", "DAS_IND_Y" : "y", "DAS_IND_WIDTH" : "width", diff --git a/workflow/engine/templates/strategicDashboard/viewDashboard.html b/workflow/engine/templates/strategicDashboard/viewDashboard.html index 39705503d..eab8b6ec6 100644 --- a/workflow/engine/templates/strategicDashboard/viewDashboard.html +++ b/workflow/engine/templates/strategicDashboard/viewDashboard.html @@ -366,9 +366,6 @@
-
-
{translate label="ID_DASH_COMPARE_INIT_PERIOD"}:
-
-
{translate label="ID_DASH_COMPARE_END_PERIOD"}:
+
{translate label="ID_DASH_COMPARE_MONTH"}:
From a7edf93e3387d8cb4f58d02becc469c77674f614 Mon Sep 17 00:00:00 2001 From: Dante Date: Fri, 29 May 2015 11:46:09 -0400 Subject: [PATCH 12/44] Revert "period compare fix" This reverts commit 677ac667fba94d3ee23e05a872876370ee9ad9a0. --- .../strategicDashboard/viewDashboardView.js | 22 +++++-------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/workflow/engine/js/strategicDashboard/viewDashboardView.js b/workflow/engine/js/strategicDashboard/viewDashboardView.js index 54901a5cd..6d2f112d3 100644 --- a/workflow/engine/js/strategicDashboard/viewDashboardView.js +++ b/workflow/engine/js/strategicDashboard/viewDashboardView.js @@ -442,15 +442,8 @@ var selectDefaultMonthAndYear = function () { compareDate.setMonth(compareDate.getMonth() - 1); var compareMonth = compareDate.getMonth() + 1; var compareYear = compareDate.getFullYear(); - $('#monthInit').val(compareMonth); - $('#yearInit').val(compareYear); - - - var today = new Date(); - var todayMonth = today.getMonth(); - var todayYear = today.getFullYear(); - $('#month').val(todayMonth + 1); - $('#year').val(todayYear); + $('#month').val(compareMonth); + $('#year').val(compareYear); } var setActiveDashboard = function () { @@ -529,18 +522,15 @@ var defaultInitDate = function() { var date = new Date(); var dateMonth = date.getMonth(); var dateYear = date.getFullYear(); - var retval = $('#yearInit').val() + '-' + $('#monthInit').val() + '-' + '01'; - return retval; + var initDate = $('#year').val() + '-' + $('#month').val() + '-' + '01'; + return initDate; } var defaultEndDate = function () { - /*var date = new Date(); + var date = new Date(); var dateMonth = date.getMonth(); var dateYear = date.getFullYear(); - return dateYear + "-" + (dateMonth + 1) + "-30";*/ - - var retval = $('#year').val() + '-' + $('#month').val() + '-' + '01'; - return retval; + return dateYear + "-" + (dateMonth + 1) + "-30"; } var fillDashboardsList = function (presenterData) { From 10c5526a645fc0bd3aa13de59e705be98d2d699f Mon Sep 17 00:00:00 2001 From: Dante Date: Fri, 29 May 2015 11:46:16 -0400 Subject: [PATCH 13/44] Revert "init datae compare in view added" This reverts commit b23036cc523d75a411e38bfe291815eca2f5a7d2. --- .../strategicDashboard/viewDashboard.html | 28 ------------------- 1 file changed, 28 deletions(-) diff --git a/workflow/engine/templates/strategicDashboard/viewDashboard.html b/workflow/engine/templates/strategicDashboard/viewDashboard.html index eab8b6ec6..9d6803363 100644 --- a/workflow/engine/templates/strategicDashboard/viewDashboard.html +++ b/workflow/engine/templates/strategicDashboard/viewDashboard.html @@ -366,34 +366,6 @@
-
- - - -
{translate label="ID_DASH_COMPARE_MONTH"}:
From e23d613ff6b7c3ff8950345019f2e5876ae490e1 Mon Sep 17 00:00:00 2001 From: Marco Antonio Nina Mena Date: Tue, 2 Jun 2015 12:29:07 -0400 Subject: [PATCH 14/44] Add tooltips dashboards view --- .../strategicDashboard/viewDashboardView.js | 7 ++++- .../strategicDashboard/viewDashboard.html | 23 ++++++++------- workflow/public_html/css/general.css | 28 +++++++++---------- workflow/public_html/css/sb-admin-2.css | 20 +++++++++++-- 4 files changed, 51 insertions(+), 27 deletions(-) diff --git a/workflow/engine/js/strategicDashboard/viewDashboardView.js b/workflow/engine/js/strategicDashboard/viewDashboardView.js index 6d2f112d3..692447ac3 100644 --- a/workflow/engine/js/strategicDashboard/viewDashboardView.js +++ b/workflow/engine/js/strategicDashboard/viewDashboardView.js @@ -396,7 +396,12 @@ $(document).ready(function() { fillSpecialIndicatorSecondView(viewModel); }); }); - initialDraw(); + + $('[data-toggle="tooltip"]').tooltip({ + animated: 'fade', + placement: 'bottom' + }); + initialDraw(); }); var hideScrollIfAllDivsAreVisible = function(){ diff --git a/workflow/engine/templates/strategicDashboard/viewDashboard.html b/workflow/engine/templates/strategicDashboard/viewDashboard.html index 9d6803363..b9bc2be6a 100644 --- a/workflow/engine/templates/strategicDashboard/viewDashboard.html +++ b/workflow/engine/templates/strategicDashboard/viewDashboard.html @@ -51,11 +51,11 @@