styles corrections
This commit is contained in:
@@ -337,6 +337,36 @@ class indicatorsCalculator
|
||||
return $retval;
|
||||
}
|
||||
|
||||
public function ueiCostHistoric($employeeId, $initDate, $endDate, $periodicity)
|
||||
{
|
||||
if (!is_a($initDate, 'DateTime')) throw new InvalidArgumentException ('initDate parameter must be a DateTime object.', 0);
|
||||
if (!is_a($endDate, 'DateTime')) throw new InvalidArgumentException ('endDate parameter must be a DateTime object.', 0);
|
||||
|
||||
$periodicitySelectFields = $this->periodicityFieldsForSelect($periodicity);
|
||||
$periodicityGroup = $this->periodicityFieldsForGrouping($periodicity);
|
||||
$initYear = $initDate->format("Y");
|
||||
$initMonth = $initDate->format("m");
|
||||
$initDay = $endDay = 1;
|
||||
$endYear = $endDate->format("Y");
|
||||
$endMonth = $endDate->format("m");
|
||||
|
||||
//$params[":initYear"] = $initYear;
|
||||
//$params[":initMonth"] = $initMonth;
|
||||
$params[":endYear"] = $endYear;
|
||||
$params[":endMonth"] = $endMonth;
|
||||
|
||||
|
||||
$sqlString = "SELECT $periodicitySelectFields " . $this->ueiCostFormula . " as EEC
|
||||
FROM USR_REPORTING
|
||||
WHERE
|
||||
IF(`YEAR` = :endYear, `MONTH`, `YEAR`) <= IF (`YEAR` = :endYear, :endMonth, :endYear)"
|
||||
. $periodicityGroup;
|
||||
|
||||
$retval = $this->pdoExecutor($sqlString, $params);
|
||||
//$retval = $this->propelExecutor($sqlString);
|
||||
return $retval;
|
||||
}
|
||||
|
||||
public function generalIndicatorData($indicatorId, $initDate, $endDate, $periodicity) {
|
||||
if (!is_a($initDate, 'DateTime')) throw new InvalidArgumentException ('initDate parameter must be a DateTime object.', 0);
|
||||
if (!is_a($endDate, 'DateTime')) throw new InvalidArgumentException ('endDate parameter must be a DateTime object.', 0);
|
||||
|
||||
@@ -2,8 +2,11 @@ var ViewDashboardModel = function (oauthToken, server, workspace) {
|
||||
this.server = server;
|
||||
this.workspace = workspace;
|
||||
this.baseUrl = "/api/1.0/" + workspace + "/";
|
||||
//this.baseUrl = "http://127.0.0.1:8080/api/1.0/workflow/";
|
||||
this.oauthToken = oauthToken;
|
||||
this.helper = new ViewDashboardHelper();
|
||||
this.cache = [];
|
||||
this.forceRemote=false; //if true, the next call will go to the remote server
|
||||
};
|
||||
|
||||
ViewDashboardModel.prototype.userDashboards = function(userId) {
|
||||
@@ -14,16 +17,16 @@ ViewDashboardModel.prototype.dashboardIndicators = function(dashboardId, initDat
|
||||
return this.getJson('dashboard/' + dashboardId + '/indicator?dateIni=' + initDate + '&dateFin=' + endDate);
|
||||
};
|
||||
|
||||
ViewDashboardModel.prototype.peiData = function(indicatorId, measureDate, compareDate) {
|
||||
ViewDashboardModel.prototype.peiData = function(indicatorId, compareDate, measureDate) {
|
||||
var endPoint = "ReportingIndicators/process-efficiency-data?" +
|
||||
"indicator_uid=" + indicatorId +
|
||||
"&measure_date=" + measureDate +
|
||||
"&compare_date=" + compareDate +
|
||||
"&measure_date=" + measureDate +
|
||||
"&language=en";
|
||||
return this.getJson(endPoint);
|
||||
}
|
||||
|
||||
ViewDashboardModel.prototype.statusData = function(indicatorId, measureDate, compareDate) {
|
||||
ViewDashboardModel.prototype.statusData = function() {
|
||||
var endPoint = "ReportingIndicators/status-indicator";
|
||||
return this.getJson(endPoint);
|
||||
}
|
||||
@@ -37,11 +40,11 @@ ViewDashboardModel.prototype.peiDetailData = function(process, initDate, endDate
|
||||
return this.getJson(endPoint);
|
||||
}
|
||||
|
||||
ViewDashboardModel.prototype.ueiData = function(indicatorId, measureDate, compareDate) {
|
||||
ViewDashboardModel.prototype.ueiData = function(indicatorId, compareDate, measureDate ) {
|
||||
var endPoint = "ReportingIndicators/employee-efficiency-data?" +
|
||||
"indicator_uid=" + indicatorId +
|
||||
"&measure_date=" + measureDate +
|
||||
"&compare_date=" + compareDate +
|
||||
"&measure_date=" + measureDate +
|
||||
"&language=en";
|
||||
return this.getJson(endPoint);
|
||||
}
|
||||
@@ -100,18 +103,34 @@ ViewDashboardModel.prototype.setPositionIndicator = function(data) {
|
||||
ViewDashboardModel.prototype.getJson = function (endPoint) {
|
||||
var that = this;
|
||||
var callUrl = this.baseUrl + endPoint
|
||||
return $.ajax({
|
||||
url: callUrl,
|
||||
type: 'GET',
|
||||
datatype: 'json',
|
||||
error: function(jqXHR, textStatus, errorThrown) {
|
||||
throw new Error(callUrl + ' -- ' + errorThrown);
|
||||
},
|
||||
beforeSend: function (xhr) {
|
||||
xhr.setRequestHeader('Authorization', 'Bearer ' + that.oauthToken);
|
||||
//xhr.setRequestHeader('Access-Control-Allow-Origin', '*');
|
||||
}
|
||||
});
|
||||
var requestFinished = $.Deferred();
|
||||
var itemInCache = that.getCacheItem(endPoint);
|
||||
|
||||
if (itemInCache != null && !this.forceRemote) {
|
||||
that.forceRemote = false;
|
||||
requestFinished.resolve(itemInCache);
|
||||
return requestFinished.promise();
|
||||
}
|
||||
else {
|
||||
return $.ajax({
|
||||
url: callUrl,
|
||||
type: 'GET',
|
||||
datatype: 'json',
|
||||
success: function (data) {
|
||||
that.forceRemote = false;
|
||||
requestFinished.resolve(data);
|
||||
that.putInCache(endPoint, data);
|
||||
// return requestFinished.promise();
|
||||
},
|
||||
error: function(jqXHR, textStatus, errorThrown) {
|
||||
throw new Error(callUrl + ' -- ' + errorThrown);
|
||||
},
|
||||
beforeSend: function (xhr) {
|
||||
xhr.setRequestHeader('Authorization', 'Bearer ' + that.oauthToken);
|
||||
//xhr.setRequestHeader('Access-Control-Allow-Origin', '*');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
ViewDashboardModel.prototype.postJson = function (endPoint, data) {
|
||||
@@ -154,3 +173,22 @@ ViewDashboardModel.prototype.putJson = function (endPoint, data) {
|
||||
});
|
||||
};
|
||||
|
||||
ViewDashboardModel.prototype.getCacheItem = function (endPoint) {
|
||||
var retval = null;
|
||||
$.each(this.cache, function(index, objectItem) {
|
||||
if (objectItem.key == endPoint) {
|
||||
retval = objectItem.value;
|
||||
}
|
||||
});
|
||||
return retval;
|
||||
}
|
||||
|
||||
ViewDashboardModel.prototype.putInCache = function (endPoint, data) {
|
||||
var cacheItem = this.getCacheItem(endPoint);
|
||||
if (cacheItem == null) {
|
||||
this.cache.push ({ key: endPoint, value:data });
|
||||
}
|
||||
else {
|
||||
cacheItem.value = data;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ var ViewDashboardPresenter = function (model) {
|
||||
ViewDashboardPresenter.prototype.getUserDashboards = function (userId) {
|
||||
var that = this;
|
||||
var requestFinished = $.Deferred();
|
||||
this.model.userDashboards(userId)
|
||||
that.model.userDashboards(userId)
|
||||
.done(function(modelData){
|
||||
var viewModel = that.userDashboardsViewModel(modelData)
|
||||
requestFinished.resolve(viewModel);
|
||||
@@ -159,7 +159,7 @@ ViewDashboardPresenter.prototype.peiViewModel = function(data) {
|
||||
$.each(data.data, function(index, originalObject) {
|
||||
var map = {
|
||||
"name" : "datalabel",
|
||||
"efficiencyIndex" : "value"
|
||||
"inefficiencyCost" : "value"
|
||||
};
|
||||
var newObject = that.helper.merge(originalObject, {}, map);
|
||||
var shortLabel = (newObject.datalabel == null)
|
||||
@@ -168,18 +168,22 @@ ViewDashboardPresenter.prototype.peiViewModel = function(data) {
|
||||
|
||||
newObject.datalabel = shortLabel;
|
||||
graphData.push(newObject);
|
||||
originalObject.inefficiencyCostToShow = Math.round(originalObject.inefficiencyCost);
|
||||
originalObject.inefficiencyCostToShow = "$ " + Math.round(originalObject.inefficiencyCost);
|
||||
originalObject.efficiencyIndexToShow = Math.round(originalObject.efficiencyIndex * 100) / 100;
|
||||
originalObject.indicatorId = data.id;
|
||||
originalObject.json = JSON.stringify(originalObject);
|
||||
});
|
||||
|
||||
var retval = {};
|
||||
//TODO selecte de 7 worst cases no the first 7
|
||||
retval = data;
|
||||
graphData.sort(function(a,b) {
|
||||
var retval = 0;
|
||||
retval = ((a.value*1.0 <= b.value*1.0) ? 1 : -1);
|
||||
return retval;
|
||||
})
|
||||
retval.dataToDraw = graphData.splice(0,7);
|
||||
//TODO aumentar el símbolo de moneda $
|
||||
retval.inefficiencyCostToShow = Math.round(retval.inefficiencyCost);
|
||||
retval.inefficiencyCostToShow = "$ " +Math.round(retval.inefficiencyCost);
|
||||
retval.efficiencyIndexToShow = Math.round(retval.efficiencyIndex * 100) / 100;
|
||||
return retval;
|
||||
};
|
||||
@@ -190,7 +194,7 @@ ViewDashboardPresenter.prototype.ueiViewModel = function(data) {
|
||||
$.each(data.data, function(index, originalObject) {
|
||||
var map = {
|
||||
"name" : "datalabel",
|
||||
"averageTime" : "value",
|
||||
"inefficiencyCost" : "value",
|
||||
"deviationTime" : "dispersion"
|
||||
};
|
||||
var newObject = that.helper.merge(originalObject, {}, map);
|
||||
@@ -200,18 +204,22 @@ ViewDashboardPresenter.prototype.ueiViewModel = function(data) {
|
||||
|
||||
newObject.datalabel = shortLabel;
|
||||
graphData.push(newObject);
|
||||
originalObject.inefficiencyCostToShow = Math.round(originalObject.inefficiencyCost);
|
||||
originalObject.inefficiencyCostToShow = "$ " + Math.round(originalObject.inefficiencyCost);
|
||||
originalObject.efficiencyIndexToShow = Math.round(originalObject.efficiencyIndex * 100) / 100;
|
||||
originalObject.indicatorId = data.id;
|
||||
originalObject.json = JSON.stringify(originalObject);
|
||||
});
|
||||
|
||||
var retval = {};
|
||||
//TODO selecte de 7 worst cases no the first 7
|
||||
retval = data;
|
||||
graphData.sort(function(a,b) {
|
||||
var retval = 0;
|
||||
retval = ((a.value*1.0 <= b.value*1.0) ? 1 : -1);
|
||||
return retval;
|
||||
})
|
||||
retval.dataToDraw = graphData.splice(0,7);
|
||||
//TODO aumentar el símbolo de moneda $
|
||||
retval.inefficiencyCostToShow = Math.round(retval.inefficiencyCost);
|
||||
retval.inefficiencyCostToShow = "$ " + Math.round(retval.inefficiencyCost);
|
||||
retval.efficiencyIndexToShow = Math.round(retval.efficiencyIndex * 100) / 100;
|
||||
return retval;
|
||||
};
|
||||
@@ -280,7 +288,9 @@ ViewDashboardPresenter.prototype.indicatorViewModel = function(data) {
|
||||
ViewDashboardPresenter.prototype.getSpecialIndicatorSecondLevel = function (entityId, indicatorType, initDate, endDate) {
|
||||
var that = this;
|
||||
var requestFinished = $.Deferred();
|
||||
//entityid is the process id or group id
|
||||
//if modelData is passed (because it was cached on the view) no call is made to the server.
|
||||
//and just a order is applied to the list
|
||||
|
||||
switch (indicatorType) {
|
||||
case "1010":
|
||||
this.model.peiDetailData(entityId, initDate, endDate)
|
||||
@@ -307,6 +317,7 @@ ViewDashboardPresenter.prototype.returnIndicatorSecondLevelPei = function(modelD
|
||||
//returns object {dataToDraw[], entityData[] //user/tasks data}
|
||||
var that = this;
|
||||
var graphData = [];
|
||||
|
||||
$.each(modelData, function(index, originalObject) {
|
||||
var map = {
|
||||
"name" : "datalabel",
|
||||
@@ -315,7 +326,7 @@ ViewDashboardPresenter.prototype.returnIndicatorSecondLevelPei = function(modelD
|
||||
};
|
||||
var newObject = that.helper.merge(originalObject, {}, map);
|
||||
newObject.datalabel = ((newObject.datalabel == null) ? "" : newObject.datalabel.substring(0, 7));
|
||||
originalObject.inefficiencyCostToShow = Math.round(originalObject.inefficiencyCost);
|
||||
originalObject.inefficiencyCostToShow = "$ " + Math.round(originalObject.inefficiencyCost);
|
||||
originalObject.efficiencyIndexToShow = Math.round(originalObject.efficiencyIndex * 100) / 100;
|
||||
graphData.push(newObject);
|
||||
});
|
||||
@@ -330,6 +341,7 @@ ViewDashboardPresenter.prototype.returnIndicatorSecondLevelUei = function(modelD
|
||||
//returns object {dataToDraw[], entityData[] //user/tasks data}
|
||||
var that = this;
|
||||
var graphData = [];
|
||||
|
||||
$.each(modelData, function(index, originalObject) {
|
||||
var map = {
|
||||
"name" : "datalabel",
|
||||
@@ -338,7 +350,7 @@ ViewDashboardPresenter.prototype.returnIndicatorSecondLevelUei = function(modelD
|
||||
};
|
||||
var newObject = that.helper.merge(originalObject, {}, map);
|
||||
newObject.datalabel = ((newObject.datalabel == null) ? "" : newObject.datalabel.substring(0, 7));
|
||||
originalObject.inefficiencyCostToShow = Math.round(originalObject.inefficiencyCost);
|
||||
originalObject.inefficiencyCostToShow = "$ " +Math.round(originalObject.inefficiencyCost);
|
||||
originalObject.efficiencyIndexToShow = Math.round(originalObject.efficiencyIndex * 100) / 100;
|
||||
graphData.push(newObject);
|
||||
});
|
||||
@@ -349,11 +361,21 @@ ViewDashboardPresenter.prototype.returnIndicatorSecondLevelUei = function(modelD
|
||||
};
|
||||
/*-------SECOND LEVEL INDICATOR DATA*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
ViewDashboardPresenter.prototype.orderDataList = function(listData, orderDirection, orderFunction) {
|
||||
//orderDirection is passed in case no order FUnction is passed (to use in the default ordering)
|
||||
var orderToUse = orderFunction;
|
||||
if (orderFunction == undefined) {
|
||||
orderToUse = function (a ,b) {
|
||||
var retval = 0;
|
||||
if (orderDirection == "down") {
|
||||
retval = ((a.inefficiencyCost*1.0 <= b.inefficiencyCost*1.0) ? 1 : -1);
|
||||
}
|
||||
else {
|
||||
//the 1,-1 are flipped
|
||||
retval = ((a.inefficiencyCost*1.0 <= b.inefficiencyCost*1.0) ? -1 : 1);
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
}
|
||||
return listData.sort(orderToUse);
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -18,7 +18,7 @@ class ReportingIndicators
|
||||
*
|
||||
* return decimal value
|
||||
*/
|
||||
public function getPeiCompleteData($indicatorUid, $measureDate, $compareDate, $language)
|
||||
public function getPeiCompleteData($indicatorUid, $compareDate, $measureDate, $language)
|
||||
{
|
||||
G::loadClass('indicatorsCalculator');
|
||||
$calculator = new \IndicatorsCalculator();
|
||||
@@ -33,6 +33,7 @@ class ReportingIndicators
|
||||
$retval = array(
|
||||
"id" => $indicatorUid,
|
||||
"efficiencyIndex" => $peiValue,
|
||||
"efficiencyIndexCompare" => $peiCompare,
|
||||
"efficiencyVariation" => ($peiValue-$peiCompare),
|
||||
"inefficiencyCost" => $peiCost,
|
||||
"data"=>$processes);
|
||||
@@ -49,29 +50,17 @@ class ReportingIndicators
|
||||
*
|
||||
* return decimal value
|
||||
*/
|
||||
public function getUeiCompleteData($indicatorUid, $measureDate, $compareDate, $language)
|
||||
public function getUeiCompleteData($indicatorUid, $compareDate, $measureDate,$language)
|
||||
{
|
||||
G::loadClass('indicatorsCalculator');
|
||||
$calculator = new \IndicatorsCalculator();
|
||||
$groups = $calculator->ueiUserGroups($indicatorUid, $measureDate, $measureDate, $language);
|
||||
|
||||
$groupIds = array();
|
||||
foreach($groups as $p) {
|
||||
array_push($groupIds, $p['uid']);
|
||||
}
|
||||
|
||||
if (sizeof($groupIds) == 0) {
|
||||
$groupIds = null;
|
||||
}
|
||||
|
||||
//TODO think what if each indicators has a group or user subset assigned. Now are all
|
||||
$ueiValue = current(reset($calculator->ueiHistoric(null, $measureDate, $measureDate, \ReportingPeriodicityEnum::NONE)));
|
||||
$arrCost = $calculator->ueiUserGroups($indicatorUid, $measureDate, $measureDate, $language);
|
||||
|
||||
$ueiCost = (sizeof($arrCost) > 0)
|
||||
? $arrCost[0]['inefficiencyCost']
|
||||
: null;
|
||||
|
||||
$ueiCost = current(reset($calculator->ueiCostHistoric(null, $measureDate, $measureDate, \ReportingPeriodicityEnum::NONE)));
|
||||
$ueiCompare = current(reset($calculator->ueiHistoric(null, $compareDate, $compareDate, \ReportingPeriodicityEnum::NONE)));
|
||||
|
||||
$retval = array(
|
||||
|
||||
@@ -71,223 +71,6 @@ class ReportingIndicators extends Api
|
||||
}
|
||||
}
|
||||
|
||||
// /**
|
||||
// * Returns the aggregate Efficiency of a employee or set of employees
|
||||
// *
|
||||
// * @param string $employee_list {@from path}
|
||||
// * @param string $init_date {@from path}
|
||||
// * @param string $end_date {@from path}
|
||||
// * @return array
|
||||
// *
|
||||
// * @url GET /employee-efficiency-index
|
||||
// */
|
||||
// public function doGetEmployeeEfficiencyIndex($employee_list, $init_date, $end_date)
|
||||
// {
|
||||
// try {
|
||||
// $indicatorsObj = new \ProcessMaker\BusinessModel\ReportingIndicators();
|
||||
// $listArray = (strlen($employee_list) > 1)
|
||||
// ? $listArray = explode(',', $employee_list)
|
||||
// : null;
|
||||
// $response = $indicatorsObj->getEmployeeEfficiencyIndex($listArray,
|
||||
// new \DateTime($init_date),
|
||||
// new \DateTime($end_date));
|
||||
// return $response;
|
||||
// } catch (\Exception $e) {
|
||||
// throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * Lists tasks of a employee and it's statistics (efficiency, average times, etc.)
|
||||
// *
|
||||
// * @param string $employee_list {@from path}
|
||||
// * @param string $init_date {@from path}
|
||||
// * @param string $end_date {@from path}
|
||||
// * @param string $language {@from path}
|
||||
// * @return array
|
||||
// *
|
||||
// * @url GET /employee-tasks
|
||||
// */
|
||||
// public function doGetEmployeeTasksInfo($employee_list, $init_date, $end_date, $language)
|
||||
// {
|
||||
// if ($employee_list == null || strlen($employee_list) <= 1)
|
||||
// throw new InvalidArgumentException ('employee_list must have at least a value', 0);
|
||||
//
|
||||
// try {
|
||||
// $indicatorsObj = new \ProcessMaker\BusinessModel\ReportingIndicators();
|
||||
// $listArray = $listArray = explode(',', $employee_list);
|
||||
// $response = $indicatorsObj->getEmployeeTasksInfoList($listArray,
|
||||
// new \DateTime($init_date),
|
||||
// new \DateTime($end_date),
|
||||
// $language);
|
||||
// return $response;
|
||||
// } catch (\Exception $e) {
|
||||
// throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * Returns the percent of Cases with Overdue time
|
||||
// *
|
||||
// * @param string $$process_list {@from path}
|
||||
// * @param string $init_date {@from path}
|
||||
// * @param string $end_date {@from path}
|
||||
// * @return array
|
||||
// *
|
||||
// * @url GET /percent-overdue-cases
|
||||
// */
|
||||
// public function doGetPercentOverdueByProcess($process_list, $init_date, $end_date)
|
||||
// {
|
||||
// try {
|
||||
// $indicatorsObj = new \ProcessMaker\BusinessModel\ReportingIndicators();
|
||||
// $listArray = (strlen($process_list) > 1)
|
||||
// ? $listArray = explode(',', $process_list)
|
||||
// : null;
|
||||
// $response = $indicatorsObj->getPercentOverdueCasesByProcess($listArray,
|
||||
// new \DateTime($init_date),
|
||||
// new \DateTime($end_date));
|
||||
// return $response;
|
||||
// } catch (\Exception $e) {
|
||||
// throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * Returns the percent of Cases with Overdue time with the selected periodicity
|
||||
// *
|
||||
// * @param string $$process_list {@from path}
|
||||
// * @param string $init_date {@from path}
|
||||
// * @param string $end_date {@from path}
|
||||
// * @param string $periodicity {@from path}
|
||||
// * @return array
|
||||
// *
|
||||
// * @url GET /percent-overdue-cases-history
|
||||
// */
|
||||
// public function doGetPercentOverdueByProcessHistory($process_list, $init_date, $end_date, $periodicity)
|
||||
// {
|
||||
// try {
|
||||
// $indicatorsObj = new \ProcessMaker\BusinessModel\ReportingIndicators();
|
||||
// $listArray = (strlen($process_list) > 1)
|
||||
// ? $listArray = explode(',', $process_list)
|
||||
// : null;
|
||||
// $response = $indicatorsObj->getPercentOverdueCasesByProcessHistory($listArray,
|
||||
// new \DateTime($init_date),
|
||||
// new \DateTime($end_date),
|
||||
// $periodicity);
|
||||
// return $response;
|
||||
// } catch (\Exception $e) {
|
||||
// throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * Returns the total of Cases with New time
|
||||
// *
|
||||
// * @param string $$process_list {@from path}
|
||||
// * @param string $init_date {@from path}
|
||||
// * @param string $end_date {@from path}
|
||||
// * @return array
|
||||
// *
|
||||
// * @url GET /total-new-cases
|
||||
// */
|
||||
// public function doGetTotalNewByProcess($process_list, $init_date, $end_date)
|
||||
// {
|
||||
// try {
|
||||
// $indicatorsObj = new \ProcessMaker\BusinessModel\ReportingIndicators();
|
||||
// $listArray = (strlen($process_list) > 1)
|
||||
// ? $listArray = explode(',', $process_list)
|
||||
// : null;
|
||||
// $response = $indicatorsObj->getPercentNewCasesByProcess($listArray,
|
||||
// new \DateTime($init_date),
|
||||
// new \DateTime($end_date));
|
||||
// return $response;
|
||||
// } catch (\Exception $e) {
|
||||
// throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * Returns the total of Cases with New time with the selected periodicity
|
||||
// *
|
||||
// * @param string $$process_list {@from path}
|
||||
// * @param string $init_date {@from path}
|
||||
// * @param string $end_date {@from path}
|
||||
// * @param string $periodicity {@from path}
|
||||
// * @return array
|
||||
// *
|
||||
// * @url GET /total-new-cases-history
|
||||
// */
|
||||
// public function doGetTotalNewByProcessHistory($process_list, $init_date, $end_date, $periodicity)
|
||||
// {
|
||||
// try {
|
||||
// $indicatorsObj = new \ProcessMaker\BusinessModel\ReportingIndicators();
|
||||
// $listArray = (strlen($process_list) > 1)
|
||||
// ? $listArray = explode(',', $process_list)
|
||||
// : null;
|
||||
// $response = $indicatorsObj->getPercentNewCasesByProcessHistory($listArray,
|
||||
// new \DateTime($init_date),
|
||||
// new \DateTime($end_date),
|
||||
// $periodicity);
|
||||
// return $response;
|
||||
// } catch (\Exception $e) {
|
||||
// throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * Returns the total of Cases with Completed time
|
||||
// *
|
||||
// * @param string $$process_list {@from path}
|
||||
// * @param string $init_date {@from path}
|
||||
// * @param string $end_date {@from path}
|
||||
// * @return array
|
||||
// *
|
||||
// * @url GET /total-completed-cases
|
||||
// */
|
||||
// public function doGetTotalCompletedByProcess($process_list, $init_date, $end_date)
|
||||
// {
|
||||
// try {
|
||||
// $indicatorsObj = new \ProcessMaker\BusinessModel\ReportingIndicators();
|
||||
// $listArray = (strlen($process_list) > 1)
|
||||
// ? $listArray = explode(',', $process_list)
|
||||
// : null;
|
||||
// $response = $indicatorsObj->getPercentCompletedCasesByProcess($listArray,
|
||||
// new \DateTime($init_date),
|
||||
// new \DateTime($end_date));
|
||||
// return $response;
|
||||
// } catch (\Exception $e) {
|
||||
// throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * Returns the total of Cases with Completed time with the selected periodicity
|
||||
// *
|
||||
// * @param string $$process_list {@from path}
|
||||
// * @param string $init_date {@from path}
|
||||
// * @param string $end_date {@from path}
|
||||
// * @param string $periodicity {@from path}
|
||||
// * @return array
|
||||
// *
|
||||
// * @url GET /total-completed-cases-history
|
||||
// */
|
||||
// public function doGetTotalCompletedByProcessHistory($process_list, $init_date, $end_date, $periodicity)
|
||||
// {
|
||||
// try {
|
||||
// $indicatorsObj = new \ProcessMaker\BusinessModel\ReportingIndicators();
|
||||
// $listArray = (strlen($process_list) > 1)
|
||||
// ? $listArray = explode(',', $process_list)
|
||||
// : null;
|
||||
// $response = $indicatorsObj->getPercentCompletedCasesByProcessHistory($listArray,
|
||||
// new \DateTime($init_date),
|
||||
// new \DateTime($end_date),
|
||||
// $periodicity);
|
||||
// return $response;
|
||||
// } catch (\Exception $e) {
|
||||
// throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||
// }
|
||||
// }
|
||||
//
|
||||
/**
|
||||
* Returns the total of Cases with Completed time with the selected periodicity
|
||||
*
|
||||
@@ -299,7 +82,7 @@ class ReportingIndicators extends Api
|
||||
*
|
||||
* @url GET /process-efficiency-data
|
||||
*/
|
||||
public function doGetProcessEficciencyData($indicator_uid, $measure_date, $compare_date, $language)
|
||||
public function doGetProcessEficciencyData($indicator_uid, $compare_date, $measure_date, $language)
|
||||
{
|
||||
try {
|
||||
$indicatorsObj = new \ProcessMaker\BusinessModel\ReportingIndicators();
|
||||
@@ -324,7 +107,7 @@ class ReportingIndicators extends Api
|
||||
*
|
||||
* @url GET /employee-efficiency-data
|
||||
*/
|
||||
public function doGetEmployeeEficciencyData($indicator_uid, $measure_date, $compare_date, $language)
|
||||
public function doGetEmployeeEficciencyData($indicator_uid, $compare_date, $measure_date, $language)
|
||||
{
|
||||
try {
|
||||
$indicatorsObj = new \ProcessMaker\BusinessModel\ReportingIndicators();
|
||||
|
||||
@@ -35,10 +35,12 @@
|
||||
{/foreach}
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="/jscore/strategicdashboard/viewDashboardHelper.js"></script>
|
||||
<script type="text/javascript" src="/jscore/strategicdashboard/viewDashboardModel.js"></script>
|
||||
<script type="text/javascript" src="/jscore/strategicdashboard/viewDashboardPresenter.js"></script>
|
||||
<script type="text/javascript" src="/jscore/strategicdashboard/viewDashboardView.js"></script>
|
||||
<script type="text/javascript" src="/jscore/strategicDashboard/viewDashboardHelper.js"></script>
|
||||
<script type="text/javascript" src="/jscore/strategicDashboard/viewDashboardModel.js"></script>
|
||||
<script type="text/javascript" src="/jscore/strategicDashboard/viewDashboardPresenter.js"></script>
|
||||
<script type="text/javascript" src="/jscore/strategicDashboard/viewDashboardView.js"></script>
|
||||
|
||||
|
||||
<script type="text/template" class="specialIndicatorButtonTemplate">
|
||||
<div class="col-lg-3 col-md-6 dashPro ind-button-selector"
|
||||
id="indicatorButton-<%- indicator.id %>"
|
||||
@@ -156,11 +158,11 @@
|
||||
<div class="green"><%- indicator.efficiencyIndexToShow %></div>
|
||||
<div class="small grey sind-index-selector ellipsis"></div>
|
||||
</div>
|
||||
<div class="col-xs-3 vcenter" style="margin-right:80px">
|
||||
<div id="proEfficCost" class="red"><%- indicator.inefficiencyCostToShow %></div>
|
||||
<div class="col-xs-3 vcenter" style="margin-right:40px">
|
||||
<div class="red sind-cost-number-selector"><%- indicator.inefficiencyCostToShow %></div>
|
||||
<div class="small grey sind-cost-selector ellipsis"></div>
|
||||
</div>
|
||||
<div class="col-xs-6" id="specialIndicatorGraph" style="width:600px;height:300px;"></div>
|
||||
<div class="col-xs-6" id="specialIndicatorGraph" style="width:540px;height:300px;"></div>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
@@ -172,7 +174,8 @@
|
||||
data-indicator-id="<%- detailData.indicatorId %>"
|
||||
data-detail-id="<%- detailData.uid %>"
|
||||
data-detail-index="<%- detailData.efficiencyIndexToShow %>"
|
||||
data-detail-cost="<%- detailData.inefficiencyCostToShow %>"
|
||||
data-detail-cost-to-show="<%- detailData.inefficiencyCostToShow %>"
|
||||
data-detail-cost="<%- detailData.inefficiencyCost%>"
|
||||
data-detail-name="<%- detailData.name %>"
|
||||
>
|
||||
<div class="col-lg-12 vcenter-task">
|
||||
@@ -181,11 +184,11 @@
|
||||
<div class="small grey detail-title-selector"> <%- detailData.name %></div>
|
||||
</div>
|
||||
<div class="col-xs-3 text-center ">
|
||||
<div class="blue"><%- detailData.efficiencyIndexToShow %></div>
|
||||
<div class="blue"><%- detailData.efficiencyIndexToShow%></div>
|
||||
<div class="small grey detail-efficiency-selector ellipsis"></div>
|
||||
</div>
|
||||
<div class="col-xs-3 text-center ">
|
||||
<div class="blue"><%- detailData.inefficiencyCostToShow %></div>
|
||||
<div class="red detail-cost-number-selector"><%- detailData.inefficiencyCostToShow %></div>
|
||||
<div class="small grey detail-cost-selector ellipsis"></div>
|
||||
</div>
|
||||
<div class="col-xs-1 text-right arrow"><i class="fa fa-chevron-right fa-fw"></i></div>
|
||||
@@ -195,7 +198,7 @@
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<script type="text/template" class="ueiDetail">
|
||||
<script type="text/template" class="specialIndicatorSencondViewDetail">
|
||||
<div class="process-div well hideme detail-button-selector" data-gs-no-resize="true"
|
||||
id="detailData-<%- detailData.uid %>"
|
||||
data-indicator-id="<%- detailData.indicatorId %>"
|
||||
@@ -207,11 +210,11 @@
|
||||
<div class="text-center huge">
|
||||
<div class="col-xs-12 vcenter-task">
|
||||
<div class="col-xs-5 ">
|
||||
<div id="usrEffic" class="blue small"><%- detailData.efficiencyIndexToShow%></div>
|
||||
<div class="blue small"><%- detailData.efficiencyIndexToShow%></div>
|
||||
<div class="smallB grey fontMedium detail-efficiency-selector ellipsis"></div>
|
||||
</div>
|
||||
<div class="col-xs-5 ">
|
||||
<div id="usrCost" class="blue small"><%- detailData.inefficiencyCostToShow%></div>
|
||||
<div class="small detail-cost-number-selector"><%- detailData.inefficiencyCostToShow%></div>
|
||||
<div class="smallB grey detail-cost-selector ellipsis"></div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -300,10 +303,11 @@
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
|
||||
</head>
|
||||
|
||||
<body id="page-top" class="index">
|
||||
<img id="scrollImg" class="floating" src="/images/scrolldown.gif" width="80" height="80" style="border-radius:85px;"/>
|
||||
<img id="scrollImg" class="floating" src="viewDashboard_data/images/scrolldown.gif" width="80" height="80" style="border-radius:85px;"/>
|
||||
<div id="wrapper">
|
||||
<div id="page-wrapper">
|
||||
<!--Cabezera-->
|
||||
@@ -340,7 +344,7 @@
|
||||
{/literal}
|
||||
</select>
|
||||
|
||||
<select id="mounth" class="form-control pull-right ">
|
||||
<select id="month" class="form-control pull-right ">
|
||||
<option value="1">{translate label="ID_MONTH_ABB_1"}</option>
|
||||
<option value="2">{translate label="ID_MONTH_ABB_2"}</option>
|
||||
<option value="3">{translate label="ID_MONTH_ABB_3"}</option>
|
||||
@@ -389,7 +393,14 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="relatedLabel" style="clear:both;"><center><h3></h3></center></div>
|
||||
<div id="relatedLabel" style="clear:both;">
|
||||
<div>
|
||||
<center><h3></h3></center>
|
||||
</div>
|
||||
<div>
|
||||
Sort: <a id="sortListButton" class="fa fa-chevron-down fa-1x" style="color:#000;" href="#"></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-12 col-md-12">
|
||||
<div id="relatedDetailGridStack" class="grid-stack" data-gs-width="12"
|
||||
@@ -404,6 +415,3 @@
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -566,7 +566,7 @@ table.dataTable thead .sorting:after {
|
||||
}
|
||||
|
||||
.panel-active{
|
||||
background-color: #000;
|
||||
background-color: #D99058;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
@@ -729,11 +729,18 @@ table.dataTable thead .sorting:after {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.process-button .blue{
|
||||
.process-button .blue,
|
||||
.process-button .red,
|
||||
.process-button .green{
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
.process-button:hover .blue, .process-button:hover, .process-button:hover .grey{
|
||||
.process-button:hover .blue,
|
||||
.process-button:hover,
|
||||
.process-button:hover .grey,
|
||||
.process-button:hover .red,
|
||||
.process-button:hover .green
|
||||
{
|
||||
background: #337AB8;
|
||||
color:#fff !important;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user