Merge branch 'master' into email_event
This commit is contained in:
@@ -839,20 +839,11 @@ class calendar extends CalendarDefinition
|
|||||||
$finDate = date('Y-m-d H:i:s');
|
$finDate = date('Y-m-d H:i:s');
|
||||||
}
|
}
|
||||||
|
|
||||||
$secondDuration = 0.00;
|
if ((strtotime($finDate)) <= (strtotime($iniDate))) {
|
||||||
|
return 0.00;
|
||||||
if ( (strtotime($iniDate)) < (strtotime($finDate)) ) {
|
}
|
||||||
$timeIniDate = strtotime($iniDate);
|
|
||||||
$timeFinDate = strtotime($finDate);
|
$secondDuration = 0.00;
|
||||||
} elseif ( (strtotime($finDate)) < (strtotime($iniDate)) ) {
|
|
||||||
$timeIniDate = strtotime($finDate);
|
|
||||||
$timeFinDate = strtotime($iniDate);
|
|
||||||
$auxDate = $iniDate;
|
|
||||||
$iniDate = $finDate;
|
|
||||||
$finDate = $auxDate;
|
|
||||||
} else {
|
|
||||||
return $secondDuration;
|
|
||||||
}
|
|
||||||
|
|
||||||
$finDate = $this->dashGetIniDate($finDate, $calendarData);
|
$finDate = $this->dashGetIniDate($finDate, $calendarData);
|
||||||
$newDate = $iniDate;
|
$newDate = $iniDate;
|
||||||
@@ -1047,4 +1038,4 @@ class calendar extends CalendarDefinition
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -68,6 +68,12 @@ abstract class IndicatorDataSourcesEnum extends BasicEnum {
|
|||||||
const USER_GROUP = 300;
|
const USER_GROUP = 300;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
abstract class ReportingIndicatorTypeEnum extends BasicEnum {
|
||||||
|
const PEI = 1010;
|
||||||
|
const UEI = 1030;
|
||||||
|
const INBOX_STATUS = 1050;
|
||||||
|
}
|
||||||
|
|
||||||
class indicatorsCalculator
|
class indicatorsCalculator
|
||||||
{
|
{
|
||||||
private $userReportingMetadata = array("tableName" => "USR_REPORTING", "keyField" => "PRO_UID");
|
private $userReportingMetadata = array("tableName" => "USR_REPORTING", "keyField" => "PRO_UID");
|
||||||
@@ -114,7 +120,7 @@ class indicatorsCalculator
|
|||||||
$qryParams = Array();
|
$qryParams = Array();
|
||||||
$sqlString = $this->indicatorsParamsQueryBuilder(IndicatorDataSourcesEnum::USER
|
$sqlString = $this->indicatorsParamsQueryBuilder(IndicatorDataSourcesEnum::USER
|
||||||
, $processId, $periodicity, $initDate, $endDate
|
, $processId, $periodicity, $initDate, $endDate
|
||||||
, $this->peiFormula, $qryParams);
|
, $this->peiFormula." As VALUE", $qryParams);
|
||||||
|
|
||||||
//$returnValue = $this->propelExecutor($sqlString);
|
//$returnValue = $this->propelExecutor($sqlString);
|
||||||
|
|
||||||
@@ -301,7 +307,7 @@ class indicatorsCalculator
|
|||||||
$qryParams = Array();
|
$qryParams = Array();
|
||||||
$sqlString = $this->indicatorsParamsQueryBuilder(IndicatorDataSourcesEnum::USER
|
$sqlString = $this->indicatorsParamsQueryBuilder(IndicatorDataSourcesEnum::USER
|
||||||
, $employeeId, $periodicity, $initDate, $endDate
|
, $employeeId, $periodicity, $initDate, $endDate
|
||||||
, $this->ueiFormula, $qryParams);
|
, $this->ueiFormula." as VALUE", $qryParams);
|
||||||
|
|
||||||
$retval = $this->pdoExecutor($sqlString, $qryParams);
|
$retval = $this->pdoExecutor($sqlString, $qryParams);
|
||||||
//$returnValue = $this->propelExecutor($sqlString);
|
//$returnValue = $this->propelExecutor($sqlString);
|
||||||
@@ -374,6 +380,7 @@ class indicatorsCalculator
|
|||||||
return $retval;
|
return $retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//TODO: delte this function that is used nowhere
|
||||||
public function generalIndicatorData($indicatorId, $initDate, $endDate, $periodicity) {
|
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($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);
|
if (!is_a($endDate, 'DateTime')) throw new InvalidArgumentException ('endDate parameter must be a DateTime object.', 0);
|
||||||
@@ -665,35 +672,6 @@ class indicatorsCalculator
|
|||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*private function indicatorsBasicQueryBuilder($reportingTable, $filterId, $periodicity, $initDate, $endDate, $fields ) {
|
|
||||||
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);
|
|
||||||
|
|
||||||
$tableMetadata = $this->metadataForTable($reportingTable);
|
|
||||||
$periodicitySelectFields = $this->periodicityFieldsForSelect($periodicity);
|
|
||||||
$periodicityGroup = $this->periodicityFieldsForGrouping($periodicity);
|
|
||||||
$initYear = $initDate->format("Y");
|
|
||||||
$initMonth = $initDate->format("m");
|
|
||||||
$endYear = $endDate->format("Y");
|
|
||||||
$endMonth = $endDate->format("m");
|
|
||||||
|
|
||||||
$filterCondition = "";
|
|
||||||
if ($filterId != null && $filterId > 0) {
|
|
||||||
$filterCondition = " AND ".$tableMetadata["keyField"]." = '$filterId'";
|
|
||||||
}
|
|
||||||
|
|
||||||
$sqlString = "SELECT $periodicitySelectFields $fields
|
|
||||||
FROM ".$tableMetadata["tableName"].
|
|
||||||
" WHERE
|
|
||||||
IF (`YEAR` = $initYear, `MONTH`, `YEAR`) >= IF (`YEAR` = $initYear, $initMonth, $initYear)
|
|
||||||
AND
|
|
||||||
IF(`YEAR` = $endYear, `MONTH`, `YEAR`) <= IF (`YEAR` = $endYear, $endMonth, $endYear)"
|
|
||||||
. $filterCondition
|
|
||||||
. $periodicityGroup;
|
|
||||||
return $sqlString;
|
|
||||||
}*/
|
|
||||||
|
|
||||||
|
|
||||||
private function indicatorsParamsQueryBuilder($reportingTable, $filterId, $periodicity, $initDate, $endDate, $fields, &$params) {
|
private function indicatorsParamsQueryBuilder($reportingTable, $filterId, $periodicity, $initDate, $endDate, $fields, &$params) {
|
||||||
if (!is_a($initDate, 'DateTime')) throw new InvalidArgumentException ('initDate parameter must be a DateTime object.', 0);
|
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);
|
if (!is_a($endDate, 'DateTime')) throw new InvalidArgumentException ('endDate parameter must be a DateTime object.', 0);
|
||||||
@@ -748,6 +726,17 @@ class indicatorsCalculator
|
|||||||
return $returnVal;
|
return $returnVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function suggestedTimeForTask ($taskId) {
|
||||||
|
$qryParams = Array();
|
||||||
|
$qryParams[':taskId'] = $taskId;
|
||||||
|
$sqlString = "select
|
||||||
|
ROUND(AVG(TOTAL_TIME_BY_TASK/TOTAL_CASES_OUT), 2) as average,
|
||||||
|
ROUND(STDDEV(TOTAL_TIME_BY_TASK/TOTAL_CASES_OUT), 2) as sdv
|
||||||
|
from USR_REPORTING where TAS_UID = :taskId";
|
||||||
|
$retval = $this->pdoExecutor($sqlString, $qryParams);
|
||||||
|
return $retval[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* For debug only:
|
/* For debug only:
|
||||||
|
|||||||
@@ -429,207 +429,211 @@ class AppDelegation extends BaseAppDelegation
|
|||||||
return ($date1 - $date2) / 3600;
|
return ($date1 - $date2) / 3600;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function calculateDuration ($cron = 0)
|
//usually this function is called when routing in the flow, so by default cron =0
|
||||||
{
|
public function calculateDuration($cron = 0)
|
||||||
try {
|
{
|
||||||
if ($cron == 1) {
|
$this->writeFileIfCalledFromCronForCalculateDuration($cron);
|
||||||
$arrayCron = unserialize( trim( @file_get_contents( PATH_DATA . "cron" ) ) );
|
$this->patchDataWithValuesForCalculateDuration();
|
||||||
$arrayCron["processcTimeStart"] = time();
|
$rs = $this->recordSetForCalculateDuration();
|
||||||
@file_put_contents( PATH_DATA . "cron", serialize( $arrayCron ) );
|
$rs->next();
|
||||||
}
|
$row = $rs->getRow();
|
||||||
|
$i = 0;
|
||||||
//patch rows with initdate = null and finish_date
|
$calendar = new calendar();
|
||||||
$c = new Criteria();
|
$now = new DateTime();
|
||||||
$c->clearSelectColumns();
|
while (is_array ($row)) {
|
||||||
$c->addSelectColumn( AppDelegationPeer::APP_UID );
|
$oAppDel = AppDelegationPeer::retrieveByPk( $row['APP_UID'], $row['DEL_INDEX'] );
|
||||||
$c->addSelectColumn( AppDelegationPeer::DEL_INDEX );
|
|
||||||
$c->addSelectColumn( AppDelegationPeer::DEL_DELEGATE_DATE );
|
|
||||||
$c->addSelectColumn( AppDelegationPeer::DEL_FINISH_DATE );
|
|
||||||
$c->add( AppDelegationPeer::DEL_INIT_DATE, null, Criteria::ISNULL );
|
|
||||||
$c->add( AppDelegationPeer::DEL_FINISH_DATE, null, Criteria::ISNOTNULL );
|
|
||||||
//$c->add(AppDelegationPeer::DEL_INDEX, 1);
|
|
||||||
|
|
||||||
|
|
||||||
$rs = AppDelegationPeer::doSelectRS( $c );
|
|
||||||
$rs->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
|
||||||
$rs->next();
|
|
||||||
$row = $rs->getRow();
|
|
||||||
|
|
||||||
while (is_array( $row )) {
|
|
||||||
$oAppDel = AppDelegationPeer::retrieveByPk( $row['APP_UID'], $row['DEL_INDEX'] );
|
|
||||||
if (isset( $row['DEL_FINISH_DATE'] )) {
|
|
||||||
$oAppDel->setDelInitDate( $row['DEL_FINISH_DATE'] );
|
|
||||||
} else {
|
|
||||||
$oAppDel->setDelInitDate( $row['DEL_INIT_DATE'] );
|
|
||||||
}
|
|
||||||
$oAppDel->save();
|
|
||||||
|
|
||||||
$rs->next();
|
|
||||||
$row = $rs->getRow();
|
|
||||||
}
|
|
||||||
//walk in all rows with DEL_STARTED = 0 or DEL_FINISHED = 0
|
|
||||||
|
|
||||||
|
|
||||||
$c = new Criteria( 'workflow' );
|
|
||||||
$c->clearSelectColumns();
|
|
||||||
$c->addSelectColumn( AppDelegationPeer::APP_UID );
|
|
||||||
$c->addSelectColumn( AppDelegationPeer::DEL_INDEX );
|
|
||||||
$c->addSelectColumn( AppDelegationPeer::USR_UID);
|
|
||||||
$c->addSelectColumn( AppDelegationPeer::PRO_UID);
|
|
||||||
$c->addSelectColumn( AppDelegationPeer::TAS_UID);
|
|
||||||
$c->addSelectColumn( AppDelegationPeer::DEL_DELEGATE_DATE );
|
|
||||||
$c->addSelectColumn( AppDelegationPeer::DEL_INIT_DATE );
|
|
||||||
$c->addSelectColumn( AppDelegationPeer::DEL_TASK_DUE_DATE );
|
|
||||||
$c->addSelectColumn( AppDelegationPeer::DEL_FINISH_DATE );
|
|
||||||
$c->addSelectColumn( AppDelegationPeer::DEL_DURATION );
|
|
||||||
$c->addSelectColumn( AppDelegationPeer::DEL_QUEUE_DURATION );
|
|
||||||
$c->addSelectColumn( AppDelegationPeer::DEL_DELAY_DURATION );
|
|
||||||
$c->addSelectColumn( AppDelegationPeer::DEL_STARTED );
|
|
||||||
$c->addSelectColumn( AppDelegationPeer::DEL_FINISHED );
|
|
||||||
$c->addSelectColumn( AppDelegationPeer::DEL_DELAYED );
|
|
||||||
$c->addSelectColumn( TaskPeer::TAS_DURATION );
|
|
||||||
$c->addSelectColumn( TaskPeer::TAS_TIMEUNIT );
|
|
||||||
$c->addSelectColumn( TaskPeer::TAS_TYPE_DAY );
|
|
||||||
|
|
||||||
$c->addJoin( AppDelegationPeer::TAS_UID, TaskPeer::TAS_UID, Criteria::LEFT_JOIN );
|
|
||||||
//$c->add(AppDelegationPeer::DEL_INIT_DATE, NULL, Criteria::ISNULL);
|
|
||||||
//$c->add(AppDelegationPeer::APP_UID, '7694483844a37bfeb0931b1063501289');
|
|
||||||
//$c->add(AppDelegationPeer::DEL_STARTED, 0);
|
|
||||||
|
|
||||||
|
|
||||||
$cton1 = $c->getNewCriterion( AppDelegationPeer::DEL_STARTED, 0 );
|
|
||||||
$cton2 = $c->getNewCriterion( AppDelegationPeer::DEL_FINISHED, 0 );
|
|
||||||
$cton1->addOR( $cton2 );
|
|
||||||
$c->add( $cton1 );
|
|
||||||
|
|
||||||
$rs = AppDelegationPeer::doSelectRS( $c );
|
|
||||||
$rs->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
|
||||||
$rs->next();
|
|
||||||
$row = $rs->getRow();
|
|
||||||
$i = 0;
|
|
||||||
//print "<table colspacing='2' border='1'>";
|
|
||||||
//print "<tr><td>iDelegateDate </td><td>iInitDate </td><td>iDueDate </td><td>iFinishDate </td><td>isStarted </td><td>isFinished </td><td>isDelayed </td><td>queueDuration </td><td>delDuration </td><td>delayDuration</td></tr>";
|
|
||||||
|
|
||||||
$calendar = new calendar();
|
$calendar = new calendar();
|
||||||
|
$calendar->getCalendar($row['USR_UID'], $row['PRO_UID'], $row['TAS_UID']);
|
||||||
|
$calData = $calendar->getCalendarData();
|
||||||
|
$calculatedValues = $this->getValuesToStoreForCalculateDuration($row, $calendar, $calData, $now);
|
||||||
|
|
||||||
$now = strtotime( 'now' );
|
$oAppDel->setDelStarted($calculatedValues['isStarted']);
|
||||||
while (is_array( $row )) {
|
$oAppDel->setDelFinished($calculatedValues['isFinished']);
|
||||||
$fTaskDuration = $row['TAS_DURATION'];
|
$oAppDel->setDelDelayed($calculatedValues['isDelayed']);
|
||||||
$fTaskDurationUnit = $row['TAS_TIMEUNIT'];
|
$oAppDel->setDelQueueDuration($calculatedValues['queueTime']);
|
||||||
$iDelegateDate = strtotime( $row['DEL_DELEGATE_DATE'] );
|
$oAppDel->setDelDelayDuration($calculatedValues['delayTime']);
|
||||||
$iInitDate = strtotime( $row['DEL_INIT_DATE'] );
|
$oAppDel->setDelDuration($calculatedValues['durationTime']);
|
||||||
$iDueDate = strtotime( $row['DEL_TASK_DUE_DATE'] );
|
$oAppDel->setAppOverduePercentage($calculatedValues['percentDelay']);
|
||||||
$iFinishDate = strtotime( $row['DEL_FINISH_DATE'] );
|
$RES = $oAppDel->save();
|
||||||
$isStarted = intval( $row['DEL_STARTED'] );
|
$rs->next();
|
||||||
$isFinished = intval( $row['DEL_FINISHED'] );
|
$row = $rs->getRow();
|
||||||
$isDelayed = intval( $row['DEL_DELAYED'] );
|
}
|
||||||
$queueDuration = $this->getDiffDate( $iInitDate, $iDelegateDate );
|
}
|
||||||
$delDuration = 0;
|
|
||||||
$delayDuration = 0;
|
|
||||||
$overduePercentage = 0.0;
|
|
||||||
//get the object,
|
|
||||||
$oAppDel = AppDelegationPeer::retrieveByPk( $row['APP_UID'], $row['DEL_INDEX'] );
|
|
||||||
|
|
||||||
//getting the calendar
|
public function getValuesToStoreForCalculateDuration($row, $calendar, $calData, $nowDate)
|
||||||
$calendar->getCalendar($row['USR_UID'], $row['PRO_UID'], $row['TAS_UID']);
|
{
|
||||||
$calData = $calendar->getCalendarData();
|
$rowValues = $this->completeRowDataForCalculateDuration($row, $nowDate);
|
||||||
|
return Array(
|
||||||
//if the task is not started
|
'isStarted' => $this->createDateFromString($row['DEL_INIT_DATE']) != null ? 1 : 0,
|
||||||
if ($isStarted == 0) {
|
'isFinished' => $this->createDateFromString($row['DEL_FINISH_DATE']) != null ? 1: 0,
|
||||||
if ($row['DEL_INIT_DATE'] != null && $row['DEL_INIT_DATE'] != '') {
|
'isDelayed' => $this->calculateDelayTime($calendar, $calData, $rowValues) > 0 ? 1 : 0,
|
||||||
$oAppDel->setDelStarted( 1 );
|
'queueTime' => $this->calculateQueueTime($calendar, $calData, $rowValues),
|
||||||
$queueDuration = $this->getDiffDate( $iInitDate, $iDelegateDate );
|
'delayTime' => $this->calculateDelayTime($calendar, $calData, $rowValues),
|
||||||
$oAppDel->setDelQueueDuration( $queueDuration );
|
'durationTime' => $this->calculateNetProcessingTime($calendar, $calData, $rowValues),
|
||||||
} else {
|
'percentDelay' => $this->calculateOverduePercentage($calendar, $calData, $rowValues)
|
||||||
//the task was not started
|
);
|
||||||
$queueDuration = $this->getDiffDate( $now, $iDelegateDate );
|
}
|
||||||
$oAppDel->setDelQueueDuration( $queueDuration );
|
|
||||||
|
|
||||||
//we are putting negative number if the task is not delayed, and positive number for the time the task is delayed
|
private function calculateOverduePercentage($calendar, $calData, $rowValues)
|
||||||
//$delayDuration = $this->getDiffDate( $now, $iDueDate );
|
{
|
||||||
$delayDuration = $calendar->dashCalculateDurationWithCalendar( $row['DEL_TASK_DUE_DATE'], date("Y-m-d H:i:s"), $calData );
|
if ($rowValues['fTaskDuration'] == 0) {
|
||||||
$delayDuration = $delayDuration / (24 * 60 * 60); //Days
|
return 0;
|
||||||
$oAppDel->setDelDelayDuration( $delayDuration );
|
|
||||||
if ($fTaskDuration != 0) {
|
|
||||||
$overduePercentage = $delayDuration / $fTaskDuration;
|
|
||||||
$oAppDel->setAppOverduePercentage( $overduePercentage );
|
|
||||||
if ($iDueDate < $now) {
|
|
||||||
$oAppDel->setDelDelayed( 1 );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//if the task was not finished
|
|
||||||
if ($isFinished == 0) {
|
|
||||||
if ($row['DEL_FINISH_DATE'] != null && $row['DEL_FINISH_DATE'] != '') {
|
|
||||||
$oAppDel->setAppOverduePercentage( $overduePercentage );
|
|
||||||
$oAppDel->setDelFinished( 1 );
|
|
||||||
|
|
||||||
//$delDuration = $this->getDiffDate( $iFinishDate, $iInitDate );
|
|
||||||
$delDuration = $calendar->dashCalculateDurationWithCalendar($row['DEL_INIT_DATE'], $row['DEL_FINISH_DATE'], $calData );//by jen
|
|
||||||
$delDuration = $delDuration / (24 * 60 * 60); //Saving the delDuration in days. The calculateDurationSLA func returns mins.
|
|
||||||
$oAppDel->setDelDuration( $delDuration );
|
|
||||||
//calculate due date if correspond
|
|
||||||
$dueDate = strtotime($iDueDate);
|
|
||||||
$finishDate = strtotime($iFinishDate);
|
|
||||||
if ($dueDate < $finishDate) {
|
|
||||||
$oAppDel->setDelDelayed( 1 );
|
|
||||||
//$delayDuration = $this->getDiffDate( $iFinishDate, $iDueDate );
|
|
||||||
$delayDuration = $calendar->dashCalculateDurationWithCalendar( $row['DEL_TASK_DUE_DATE'], $row['DEL_FINISH_DATE'], $calData );
|
|
||||||
$delayDuration = $delayDuration / (24 * 60 * 60); //Days
|
|
||||||
} else {
|
|
||||||
$oAppDel->setDelDelayed( 0 );
|
|
||||||
$delayDuration = 0;
|
|
||||||
}
|
|
||||||
$oAppDel->setDelDelayDuration( $delayDuration );
|
|
||||||
} else {
|
|
||||||
//the task was not completed
|
|
||||||
if ($row['DEL_INIT_DATE'] != null && $row['DEL_INIT_DATE'] != '') {
|
|
||||||
//$delDuration = $this->getDiffDate( $now, $iInitDate );
|
|
||||||
$delDuration = $calendar->dashCalculateDurationWithCalendar($row['DEL_INIT_DATE'], date("Y-m-d H:i:s"), $calData );//by jen
|
|
||||||
$delDuration = $delDuration / (24 * 60 * 60); //Saving the delDuration in days. The calculateDurationSLA func returns mins.
|
|
||||||
} else {
|
|
||||||
//$delDuration = $this->getDiffDate( $now, $iDelegateDate );
|
|
||||||
$delDuration = $calendar->dashCalculateDurationWithCalendar($row['DEL_DELEGATE_DATE'], date("Y-m-d H:i:s"), $calData ); //byJen
|
|
||||||
$delDuration = $delDuration / (24 * 60 * 60); //Saving the delDuration in days. The calculateDurationSLA func returns mins.
|
|
||||||
}
|
|
||||||
$oAppDel->setDelDuration( $delDuration );
|
|
||||||
|
|
||||||
//we are putting negative number if the task is not delayed, and positive number for the time the task is delayed
|
|
||||||
//$delayDuration = $this->getDiffDate( $now, $iDueDate );
|
|
||||||
$delayDuration = 0;
|
|
||||||
if($now > $iDueDate){
|
|
||||||
$delayDuration = $calendar->dashCalculateDurationWithCalendar( $row['DEL_TASK_DUE_DATE'], date("Y-m-d H:i:s"), $calData );
|
|
||||||
$delayDuration = $delayDuration / (24 * 60 * 60);
|
|
||||||
}
|
|
||||||
//Days
|
|
||||||
$oAppDel->setDelDelayDuration( $delayDuration );
|
|
||||||
if ($fTaskDuration != 0) {
|
|
||||||
$overduePercentage = $delayDuration / $fTaskDuration;
|
|
||||||
$oAppDel->setAppOverduePercentage( $overduePercentage );
|
|
||||||
if ($iDueDate < $now) {
|
|
||||||
$oAppDel->setDelDelayed( 1 );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
//and finally save the record
|
|
||||||
$RES = $oAppDel->save();
|
|
||||||
$rs->next();
|
|
||||||
$row = $rs->getRow();
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($cron == 1) {
|
|
||||||
$arrayCron = unserialize( trim( @file_get_contents( PATH_DATA . "cron" ) ) );
|
|
||||||
$arrayCron["processcTimeStart"] = time();
|
|
||||||
@file_put_contents( PATH_DATA . "cron", serialize( $arrayCron ) );
|
|
||||||
}
|
|
||||||
} catch (Exception $oError) {
|
|
||||||
error_log( $oError->getMessage() );
|
|
||||||
}
|
}
|
||||||
}
|
//TODO 8 daily/hours must be extracted from calendar
|
||||||
|
$taskTime = ($rowValues['cTaskDurationUnit'] == 'DAYS')
|
||||||
|
? $rowValues['fTaskDuration'] * 8 / 24
|
||||||
|
: $rowValues['fTaskDuration'] / 24;
|
||||||
|
|
||||||
|
return $this->calculateDelayTime($calendar, $calData, $rowValues) * 100/ $taskTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
//time in days from init or delegate date to finish or today's date
|
||||||
|
private function calculateNetProcessingTime($calendar, $calData, $rowValues)
|
||||||
|
{
|
||||||
|
$initDateForCalc = $this->selectDate ($rowValues['dInitDate'], $rowValues['dDelegateDate'], 'max');
|
||||||
|
$endDateForCalc = $this->selectDate ($rowValues['dFinishDate'], $rowValues['dNow'], 'min');
|
||||||
|
return $calendar->dashCalculateDurationWithCalendar(
|
||||||
|
$initDateForCalc->format('Y-m-d H:i:s'),
|
||||||
|
$endDateForCalc->format('Y-m-d H:i:s'),
|
||||||
|
$calData)/(24*60*60);
|
||||||
|
}
|
||||||
|
|
||||||
|
//time in days from delegate date to init date
|
||||||
|
private function calculateQueueTime($calendar, $calData, $rowValues)
|
||||||
|
{
|
||||||
|
$initDateForCalc = $rowValues['dDelegateDate'];
|
||||||
|
$endDateForCalc = $this->selectDate ($rowValues['dInitDate'], $rowValues['dNow'], 'min');
|
||||||
|
return $calendar->dashCalculateDurationWithCalendar(
|
||||||
|
$initDateForCalc->format('Y-m-d H:i:s'),
|
||||||
|
$endDateForCalc->format('Y-m-d H:i:s'),
|
||||||
|
$calData)/(24*60*60);
|
||||||
|
}
|
||||||
|
|
||||||
|
//time in days from due date to finish or today date
|
||||||
|
private function calculateDelayTime($calendar, $calData, $rowValues)
|
||||||
|
{
|
||||||
|
$initDateForCalc = $this->selectDate($rowValues['dDueDate'], $rowValues['dDelegateDate'], 'max');
|
||||||
|
$endDateForCalc = $this->selectDate ($rowValues['dFinishDate'], $rowValues['dNow'], 'min');
|
||||||
|
return $calendar->dashCalculateDurationWithCalendar(
|
||||||
|
$initDateForCalc->format('Y-m-d H:i:s'),
|
||||||
|
$endDateForCalc->format('Y-m-d H:i:s'),
|
||||||
|
$calData)/(24*60*60);
|
||||||
|
}
|
||||||
|
|
||||||
|
//to avoid aplying many times the same conversions and functions the row data
|
||||||
|
//is used to create dates as DateTime objects and other fields are stracted also,
|
||||||
|
//so the array returned will work as a "context" object for the rest of the functions.
|
||||||
|
private function completeRowDataForCalculateDuration($row, $nowDate)
|
||||||
|
{
|
||||||
|
return Array(
|
||||||
|
'dDelegateDate' => $this->createDateFromString ($row['DEL_DELEGATE_DATE']),
|
||||||
|
'dInitDate' => $this->createDateFromString ($row['DEL_INIT_DATE']),
|
||||||
|
'dDueDate' => $this->createDateFromString ($row['DEL_TASK_DUE_DATE']),
|
||||||
|
'dFinishDate' => $this->createDateFromString ($row['DEL_FINISH_DATE']),
|
||||||
|
'fTaskDuration' => $row['TAS_DURATION'] * 1.0,
|
||||||
|
'cTaskDurationUnit' => $row['TAS_TIMEUNIT'],
|
||||||
|
'dNow' => $nowDate,
|
||||||
|
'row' => $row
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
//by default min function returns de null value if one of the params is null
|
||||||
|
//to avoid that behaviour this function was created so the function returns the first
|
||||||
|
//not null date or if both are not null the mix/max date
|
||||||
|
//NOTE date1 and date2 are DateTime objects.
|
||||||
|
private function selectDate($date1, $date2, $compareFunction)
|
||||||
|
{
|
||||||
|
if ($date1 == null)
|
||||||
|
return $date2;
|
||||||
|
|
||||||
|
if ($date2 == null)
|
||||||
|
return $date1;
|
||||||
|
|
||||||
|
return $compareFunction($date1, $date2);
|
||||||
|
}
|
||||||
|
|
||||||
|
//Creates a DateTime object from a string. If the string is null or empty a null object is returned
|
||||||
|
private function createDateFromString($stringDate) {
|
||||||
|
if ($stringDate == null || $stringDate == '')
|
||||||
|
return null;
|
||||||
|
return new DateTime($stringDate);
|
||||||
|
}
|
||||||
|
|
||||||
|
private function recordSetForCalculateDuration()
|
||||||
|
{
|
||||||
|
//walk in all rows with DEL_STARTED = 0 or DEL_FINISHED = 0
|
||||||
|
$c = new Criteria( 'workflow' );
|
||||||
|
$c->clearSelectColumns();
|
||||||
|
$c->addSelectColumn( AppDelegationPeer::APP_UID );
|
||||||
|
$c->addSelectColumn( AppDelegationPeer::DEL_INDEX );
|
||||||
|
$c->addSelectColumn( AppDelegationPeer::USR_UID);
|
||||||
|
$c->addSelectColumn( AppDelegationPeer::PRO_UID);
|
||||||
|
$c->addSelectColumn( AppDelegationPeer::TAS_UID);
|
||||||
|
$c->addSelectColumn( AppDelegationPeer::DEL_DELEGATE_DATE );
|
||||||
|
$c->addSelectColumn( AppDelegationPeer::DEL_INIT_DATE );
|
||||||
|
$c->addSelectColumn( AppDelegationPeer::DEL_TASK_DUE_DATE );
|
||||||
|
$c->addSelectColumn( AppDelegationPeer::DEL_FINISH_DATE );
|
||||||
|
$c->addSelectColumn( AppDelegationPeer::DEL_DURATION );
|
||||||
|
$c->addSelectColumn( AppDelegationPeer::DEL_QUEUE_DURATION );
|
||||||
|
$c->addSelectColumn( AppDelegationPeer::DEL_DELAY_DURATION );
|
||||||
|
$c->addSelectColumn( AppDelegationPeer::DEL_STARTED );
|
||||||
|
$c->addSelectColumn( AppDelegationPeer::DEL_FINISHED );
|
||||||
|
$c->addSelectColumn( AppDelegationPeer::DEL_DELAYED );
|
||||||
|
$c->addSelectColumn( TaskPeer::TAS_DURATION );
|
||||||
|
$c->addSelectColumn( TaskPeer::TAS_TIMEUNIT );
|
||||||
|
$c->addSelectColumn( TaskPeer::TAS_TYPE_DAY );
|
||||||
|
|
||||||
|
$c->addJoin( AppDelegationPeer::TAS_UID, TaskPeer::TAS_UID, Criteria::LEFT_JOIN );
|
||||||
|
$cton1 = $c->getNewCriterion( AppDelegationPeer::DEL_STARTED, 0 );
|
||||||
|
$cton2 = $c->getNewCriterion( AppDelegationPeer::DEL_FINISHED, 0 );
|
||||||
|
$cton1->addOR( $cton2 );
|
||||||
|
$c->add( $cton1 );
|
||||||
|
$rs = AppDelegationPeer::doSelectRS( $c );
|
||||||
|
$rs->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||||
|
return $rs;
|
||||||
|
}
|
||||||
|
private function writeFileIfCalledFromCronForCalculateDuration($cron)
|
||||||
|
{
|
||||||
|
if ($cron == 1) {
|
||||||
|
$arrayCron = unserialize( trim( @file_get_contents( PATH_DATA . "cron" ) ) );
|
||||||
|
$arrayCron["processcTimeStart"] = time();
|
||||||
|
@file_put_contents( PATH_DATA . "cron", serialize( $arrayCron ) );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private function patchDataWithValuesForCalculateDuration()
|
||||||
|
{
|
||||||
|
//patch rows with initdate = null and finish_date
|
||||||
|
$c = new Criteria();
|
||||||
|
$c->clearSelectColumns();
|
||||||
|
$c->addSelectColumn( AppDelegationPeer::APP_UID );
|
||||||
|
$c->addSelectColumn( AppDelegationPeer::DEL_INDEX );
|
||||||
|
$c->addSelectColumn( AppDelegationPeer::DEL_DELEGATE_DATE );
|
||||||
|
$c->addSelectColumn( AppDelegationPeer::DEL_FINISH_DATE );
|
||||||
|
$c->add( AppDelegationPeer::DEL_INIT_DATE, null, Criteria::ISNULL );
|
||||||
|
$c->add( AppDelegationPeer::DEL_FINISH_DATE, null, Criteria::ISNOTNULL );
|
||||||
|
//$c->add(AppDelegationPeer::DEL_INDEX, 1);
|
||||||
|
|
||||||
|
|
||||||
|
$rs = AppDelegationPeer::doSelectRS( $c );
|
||||||
|
$rs->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||||
|
$rs->next();
|
||||||
|
$row = $rs->getRow();
|
||||||
|
|
||||||
|
while (is_array( $row )) {
|
||||||
|
$oAppDel = AppDelegationPeer::retrieveByPk( $row['APP_UID'], $row['DEL_INDEX'] );
|
||||||
|
if (isset( $row['DEL_FINISH_DATE'] )) {
|
||||||
|
$oAppDel->setDelInitDate( $row['DEL_FINISH_DATE'] );
|
||||||
|
} else {
|
||||||
|
$oAppDel->setDelInitDate( $row['DEL_INIT_DATE'] );
|
||||||
|
}
|
||||||
|
$oAppDel->save();
|
||||||
|
|
||||||
|
$rs->next();
|
||||||
|
$row = $rs->getRow();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public function getLastDeleration ($APP_UID)
|
public function getLastDeleration ($APP_UID)
|
||||||
|
|||||||
@@ -318,12 +318,13 @@ class ListInbox extends BaseListInbox
|
|||||||
|
|
||||||
public function loadFilters (&$criteria, $filters)
|
public function loadFilters (&$criteria, $filters)
|
||||||
{
|
{
|
||||||
$filter = isset($filters['filter']) ? $filters['filter'] : "";
|
$filter = isset($filters['filter']) ? $filters['filter'] : "";
|
||||||
$search = isset($filters['search']) ? $filters['search'] : "";
|
$search = isset($filters['search']) ? $filters['search'] : "";
|
||||||
$process = isset($filters['process']) ? $filters['process'] : "";
|
$process = isset($filters['process']) ? $filters['process'] : "";
|
||||||
$category = isset($filters['category']) ? $filters['category'] : "";
|
$category = isset($filters['category']) ? $filters['category'] : "";
|
||||||
$dateFrom = isset($filters['dateFrom']) ? $filters['dateFrom'] : "";
|
$dateFrom = isset($filters['dateFrom']) ? $filters['dateFrom'] : "";
|
||||||
$dateTo = isset($filters['dateTo']) ? $filters['dateTo'] : "";
|
$dateTo = isset($filters['dateTo']) ? $filters['dateTo'] : "";
|
||||||
|
$filterStatus = isset($filters['filterStatus']) ? $filters['filterStatus'] : "";
|
||||||
|
|
||||||
if ($filter != '') {
|
if ($filter != '') {
|
||||||
switch ($filter) {
|
switch ($filter) {
|
||||||
@@ -339,8 +340,8 @@ class ListInbox extends BaseListInbox
|
|||||||
if ($search != '') {
|
if ($search != '') {
|
||||||
$criteria->add(
|
$criteria->add(
|
||||||
$criteria->getNewCriterion( ListInboxPeer::APP_TITLE, '%' . $search . '%', Criteria::LIKE )->
|
$criteria->getNewCriterion( ListInboxPeer::APP_TITLE, '%' . $search . '%', Criteria::LIKE )->
|
||||||
addOr( $criteria->getNewCriterion( ListInboxPeer::APP_TAS_TITLE, '%' . $search . '%', Criteria::LIKE )->
|
addOr( $criteria->getNewCriterion( ListInboxPeer::APP_TAS_TITLE, '%' . $search . '%', Criteria::LIKE )->
|
||||||
addOr( $criteria->getNewCriterion( ListInboxPeer::APP_NUMBER, $search, Criteria::LIKE ) ) ) );
|
addOr( $criteria->getNewCriterion( ListInboxPeer::APP_NUMBER, $search, Criteria::LIKE ) ) ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($process != '') {
|
if ($process != '') {
|
||||||
@@ -368,7 +369,7 @@ class ListInbox extends BaseListInbox
|
|||||||
}
|
}
|
||||||
|
|
||||||
$criteria->add( $criteria->getNewCriterion( ListInboxPeer::DEL_DELEGATE_DATE, $dateFrom, Criteria::GREATER_EQUAL )->
|
$criteria->add( $criteria->getNewCriterion( ListInboxPeer::DEL_DELEGATE_DATE, $dateFrom, Criteria::GREATER_EQUAL )->
|
||||||
addAnd( $criteria->getNewCriterion( ListInboxPeer::DEL_DELEGATE_DATE, $dateTo, Criteria::LESS_EQUAL ) ) );
|
addAnd( $criteria->getNewCriterion( ListInboxPeer::DEL_DELEGATE_DATE, $dateTo, Criteria::LESS_EQUAL ) ) );
|
||||||
} else {
|
} else {
|
||||||
$dateFrom = $dateFrom . " 00:00:00";
|
$dateFrom = $dateFrom . " 00:00:00";
|
||||||
|
|
||||||
@@ -379,6 +380,21 @@ class ListInbox extends BaseListInbox
|
|||||||
|
|
||||||
$criteria->add( ListInboxPeer::DEL_DELEGATE_DATE, $dateTo, Criteria::LESS_EQUAL );
|
$criteria->add( ListInboxPeer::DEL_DELEGATE_DATE, $dateTo, Criteria::LESS_EQUAL );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($filterStatus != '') {
|
||||||
|
switch ($filterStatus) {
|
||||||
|
case 'ON_TIME':
|
||||||
|
$criteria->add( ListInboxPeer::DEL_RISK_DATE , "TIMEDIFF(". ListInboxPeer::DEL_RISK_DATE." , NOW( ) ) > 0", Criteria::CUSTOM);
|
||||||
|
break;
|
||||||
|
case 'AT_RISK':
|
||||||
|
$criteria->add( ListInboxPeer::DEL_RISK_DATE , "TIMEDIFF(". ListInboxPeer::DEL_RISK_DATE .", NOW( ) ) < 0", Criteria::CUSTOM);
|
||||||
|
$criteria->add( ListInboxPeer::DEL_DUE_DATE , "TIMEDIFF(". ListInboxPeer::DEL_DUE_DATE .", NOW( ) ) > 0", Criteria::CUSTOM);
|
||||||
|
break;
|
||||||
|
case 'OVERDUE':
|
||||||
|
$criteria->add( ListInboxPeer::DEL_DUE_DATE , "TIMEDIFF(". ListInboxPeer::DEL_DUE_DATE." , NOW( ) ) < 0", Criteria::CUSTOM);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function countTotal ($usr_uid, $filters = array())
|
public function countTotal ($usr_uid, $filters = array())
|
||||||
|
|||||||
@@ -471,6 +471,14 @@ class Task extends BaseTask
|
|||||||
$aFields["TAS_DEF_MESSAGE"] = $this->getTasDefMessage();
|
$aFields["TAS_DEF_MESSAGE"] = $this->getTasDefMessage();
|
||||||
$aFields["TAS_DEF_SUBJECT_MESSAGE"] = $this->getTasDefSubjectMessage();
|
$aFields["TAS_DEF_SUBJECT_MESSAGE"] = $this->getTasDefSubjectMessage();
|
||||||
|
|
||||||
|
/*----------------------------------********---------------------------------*/
|
||||||
|
G::LoadClass("indicatorsCalculator");
|
||||||
|
$indicator = new indicatorsCalculator();
|
||||||
|
$data = $indicator->suggestedTimeForTask($TasUid);
|
||||||
|
$aFields["TAS_AVERAGE"] = $data['average'];
|
||||||
|
$aFields["TAS_SDV"] = $data['sdv'];
|
||||||
|
/*----------------------------------********---------------------------------*/
|
||||||
|
|
||||||
///////
|
///////
|
||||||
return $aFields;
|
return $aFields;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -129,6 +129,10 @@ class ProcessMapBuilder
|
|||||||
|
|
||||||
$tMap->addColumn('PRO_DERIVATION_SCREEN_TPL', 'ProDerivationScreenTpl', 'string', CreoleTypes::VARCHAR, false, 128);
|
$tMap->addColumn('PRO_DERIVATION_SCREEN_TPL', 'ProDerivationScreenTpl', 'string', CreoleTypes::VARCHAR, false, 128);
|
||||||
|
|
||||||
|
$tMap->addColumn('PRO_COST', 'ProCost', 'double', CreoleTypes::DECIMAL, false, 7,2);
|
||||||
|
|
||||||
|
$tMap->addColumn('PRO_UNIT_COST', 'ProUnitCost', 'string', CreoleTypes::VARCHAR, false, 50);
|
||||||
|
|
||||||
$tMap->addValidator('PRO_TIMEUNIT', 'validValues', 'propel.validator.ValidValuesValidator', 'WEEKS|MONTHS|DAYS|HOURS|MINUTES', 'Please select a valid Time Unit.');
|
$tMap->addValidator('PRO_TIMEUNIT', 'validValues', 'propel.validator.ValidValuesValidator', 'WEEKS|MONTHS|DAYS|HOURS|MINUTES', 'Please select a valid Time Unit.');
|
||||||
|
|
||||||
$tMap->addValidator('PRO_STATUS', 'validValues', 'propel.validator.ValidValuesValidator', 'ACTIVE|INACTIVE|DISABLED', 'Please select a valid Process Status.');
|
$tMap->addValidator('PRO_STATUS', 'validValues', 'propel.validator.ValidValuesValidator', 'ACTIVE|INACTIVE|DISABLED', 'Please select a valid Process Status.');
|
||||||
|
|||||||
@@ -219,6 +219,18 @@ abstract class BaseProcess extends BaseObject implements Persistent
|
|||||||
*/
|
*/
|
||||||
protected $pro_derivation_screen_tpl = '';
|
protected $pro_derivation_screen_tpl = '';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The value for the pro_cost field.
|
||||||
|
* @var double
|
||||||
|
*/
|
||||||
|
protected $pro_cost = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The value for the pro_unit_cost field.
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $pro_unit_cost = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Flag to prevent endless save loop, if this object is referenced
|
* Flag to prevent endless save loop, if this object is referenced
|
||||||
* by another object which falls in this transaction.
|
* by another object which falls in this transaction.
|
||||||
@@ -627,6 +639,28 @@ abstract class BaseProcess extends BaseObject implements Persistent
|
|||||||
return $this->pro_derivation_screen_tpl;
|
return $this->pro_derivation_screen_tpl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the [pro_cost] column value.
|
||||||
|
*
|
||||||
|
* @return double
|
||||||
|
*/
|
||||||
|
public function getProCost()
|
||||||
|
{
|
||||||
|
|
||||||
|
return $this->pro_cost;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the [pro_unit_cost] column value.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getProUnitCost()
|
||||||
|
{
|
||||||
|
|
||||||
|
return $this->pro_unit_cost;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the value of [pro_uid] column.
|
* Set the value of [pro_uid] column.
|
||||||
*
|
*
|
||||||
@@ -1339,6 +1373,44 @@ abstract class BaseProcess extends BaseObject implements Persistent
|
|||||||
|
|
||||||
} // setProDerivationScreenTpl()
|
} // setProDerivationScreenTpl()
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the value of [pro_cost] column.
|
||||||
|
*
|
||||||
|
* @param double $v new value
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function setProCost($v)
|
||||||
|
{
|
||||||
|
|
||||||
|
if ($this->pro_cost !== $v || $v === 0) {
|
||||||
|
$this->pro_cost = $v;
|
||||||
|
$this->modifiedColumns[] = ProcessPeer::PRO_COST;
|
||||||
|
}
|
||||||
|
|
||||||
|
} // setProCost()
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the value of [pro_unit_cost] column.
|
||||||
|
*
|
||||||
|
* @param string $v new value
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function setProUnitCost($v)
|
||||||
|
{
|
||||||
|
|
||||||
|
// Since the native PHP type for this column is string,
|
||||||
|
// we will cast the input to a string (if it is not).
|
||||||
|
if ($v !== null && !is_string($v)) {
|
||||||
|
$v = (string) $v;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->pro_unit_cost !== $v || $v === '') {
|
||||||
|
$this->pro_unit_cost = $v;
|
||||||
|
$this->modifiedColumns[] = ProcessPeer::PRO_UNIT_COST;
|
||||||
|
}
|
||||||
|
|
||||||
|
} // setProUnitCost()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Hydrates (populates) the object variables with values from the database resultset.
|
* Hydrates (populates) the object variables with values from the database resultset.
|
||||||
*
|
*
|
||||||
@@ -1420,12 +1492,16 @@ abstract class BaseProcess extends BaseObject implements Persistent
|
|||||||
|
|
||||||
$this->pro_derivation_screen_tpl = $rs->getString($startcol + 31);
|
$this->pro_derivation_screen_tpl = $rs->getString($startcol + 31);
|
||||||
|
|
||||||
|
$this->pro_cost = $rs->getFloat($startcol + 32);
|
||||||
|
|
||||||
|
$this->pro_unit_cost = $rs->getString($startcol + 33);
|
||||||
|
|
||||||
$this->resetModified();
|
$this->resetModified();
|
||||||
|
|
||||||
$this->setNew(false);
|
$this->setNew(false);
|
||||||
|
|
||||||
// FIXME - using NUM_COLUMNS may be clearer.
|
// FIXME - using NUM_COLUMNS may be clearer.
|
||||||
return $startcol + 32; // 32 = ProcessPeer::NUM_COLUMNS - ProcessPeer::NUM_LAZY_LOAD_COLUMNS).
|
return $startcol + 34; // 34 = ProcessPeer::NUM_COLUMNS - ProcessPeer::NUM_LAZY_LOAD_COLUMNS).
|
||||||
|
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
throw new PropelException("Error populating Process object", $e);
|
throw new PropelException("Error populating Process object", $e);
|
||||||
@@ -1725,6 +1801,12 @@ abstract class BaseProcess extends BaseObject implements Persistent
|
|||||||
case 31:
|
case 31:
|
||||||
return $this->getProDerivationScreenTpl();
|
return $this->getProDerivationScreenTpl();
|
||||||
break;
|
break;
|
||||||
|
case 32:
|
||||||
|
return $this->getProCost();
|
||||||
|
break;
|
||||||
|
case 33:
|
||||||
|
return $this->getProUnitCost();
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
return null;
|
return null;
|
||||||
break;
|
break;
|
||||||
@@ -1777,6 +1859,8 @@ abstract class BaseProcess extends BaseObject implements Persistent
|
|||||||
$keys[29] => $this->getProDebug(),
|
$keys[29] => $this->getProDebug(),
|
||||||
$keys[30] => $this->getProDynaforms(),
|
$keys[30] => $this->getProDynaforms(),
|
||||||
$keys[31] => $this->getProDerivationScreenTpl(),
|
$keys[31] => $this->getProDerivationScreenTpl(),
|
||||||
|
$keys[32] => $this->getProCost(),
|
||||||
|
$keys[33] => $this->getProUnitCost(),
|
||||||
);
|
);
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
@@ -1904,6 +1988,12 @@ abstract class BaseProcess extends BaseObject implements Persistent
|
|||||||
case 31:
|
case 31:
|
||||||
$this->setProDerivationScreenTpl($value);
|
$this->setProDerivationScreenTpl($value);
|
||||||
break;
|
break;
|
||||||
|
case 32:
|
||||||
|
$this->setProCost($value);
|
||||||
|
break;
|
||||||
|
case 33:
|
||||||
|
$this->setProUnitCost($value);
|
||||||
|
break;
|
||||||
} // switch()
|
} // switch()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2055,6 +2145,14 @@ abstract class BaseProcess extends BaseObject implements Persistent
|
|||||||
$this->setProDerivationScreenTpl($arr[$keys[31]]);
|
$this->setProDerivationScreenTpl($arr[$keys[31]]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (array_key_exists($keys[32], $arr)) {
|
||||||
|
$this->setProCost($arr[$keys[32]]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (array_key_exists($keys[33], $arr)) {
|
||||||
|
$this->setProUnitCost($arr[$keys[33]]);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2194,6 +2292,14 @@ abstract class BaseProcess extends BaseObject implements Persistent
|
|||||||
$criteria->add(ProcessPeer::PRO_DERIVATION_SCREEN_TPL, $this->pro_derivation_screen_tpl);
|
$criteria->add(ProcessPeer::PRO_DERIVATION_SCREEN_TPL, $this->pro_derivation_screen_tpl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($this->isColumnModified(ProcessPeer::PRO_COST)) {
|
||||||
|
$criteria->add(ProcessPeer::PRO_COST, $this->pro_cost);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->isColumnModified(ProcessPeer::PRO_UNIT_COST)) {
|
||||||
|
$criteria->add(ProcessPeer::PRO_UNIT_COST, $this->pro_unit_cost);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return $criteria;
|
return $criteria;
|
||||||
}
|
}
|
||||||
@@ -2310,6 +2416,10 @@ abstract class BaseProcess extends BaseObject implements Persistent
|
|||||||
|
|
||||||
$copyObj->setProDerivationScreenTpl($this->pro_derivation_screen_tpl);
|
$copyObj->setProDerivationScreenTpl($this->pro_derivation_screen_tpl);
|
||||||
|
|
||||||
|
$copyObj->setProCost($this->pro_cost);
|
||||||
|
|
||||||
|
$copyObj->setProUnitCost($this->pro_unit_cost);
|
||||||
|
|
||||||
|
|
||||||
$copyObj->setNew(true);
|
$copyObj->setNew(true);
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ abstract class BaseProcessPeer
|
|||||||
const CLASS_DEFAULT = 'classes.model.Process';
|
const CLASS_DEFAULT = 'classes.model.Process';
|
||||||
|
|
||||||
/** The total number of columns. */
|
/** The total number of columns. */
|
||||||
const NUM_COLUMNS = 32;
|
const NUM_COLUMNS = 34;
|
||||||
|
|
||||||
/** The number of lazy-loaded columns. */
|
/** The number of lazy-loaded columns. */
|
||||||
const NUM_LAZY_LOAD_COLUMNS = 0;
|
const NUM_LAZY_LOAD_COLUMNS = 0;
|
||||||
@@ -127,6 +127,12 @@ abstract class BaseProcessPeer
|
|||||||
/** the column name for the PRO_DERIVATION_SCREEN_TPL field */
|
/** the column name for the PRO_DERIVATION_SCREEN_TPL field */
|
||||||
const PRO_DERIVATION_SCREEN_TPL = 'PROCESS.PRO_DERIVATION_SCREEN_TPL';
|
const PRO_DERIVATION_SCREEN_TPL = 'PROCESS.PRO_DERIVATION_SCREEN_TPL';
|
||||||
|
|
||||||
|
/** the column name for the PRO_COST field */
|
||||||
|
const PRO_COST = 'PROCESS.PRO_COST';
|
||||||
|
|
||||||
|
/** the column name for the PRO_UNIT_COST field */
|
||||||
|
const PRO_UNIT_COST = 'PROCESS.PRO_UNIT_COST';
|
||||||
|
|
||||||
/** The PHP to DB Name Mapping */
|
/** The PHP to DB Name Mapping */
|
||||||
private static $phpNameMap = null;
|
private static $phpNameMap = null;
|
||||||
|
|
||||||
@@ -138,10 +144,10 @@ abstract class BaseProcessPeer
|
|||||||
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
||||||
*/
|
*/
|
||||||
private static $fieldNames = array (
|
private static $fieldNames = array (
|
||||||
BasePeer::TYPE_PHPNAME => array ('ProUid', 'ProParent', 'ProTime', 'ProTimeunit', 'ProStatus', 'ProTypeDay', 'ProType', 'ProAssignment', 'ProShowMap', 'ProShowMessage', 'ProSubprocess', 'ProTriDeleted', 'ProTriCanceled', 'ProTriPaused', 'ProTriReassigned', 'ProTriUnpaused', 'ProTypeProcess', 'ProShowDelegate', 'ProShowDynaform', 'ProCategory', 'ProSubCategory', 'ProIndustry', 'ProUpdateDate', 'ProCreateDate', 'ProCreateUser', 'ProHeight', 'ProWidth', 'ProTitleX', 'ProTitleY', 'ProDebug', 'ProDynaforms', 'ProDerivationScreenTpl', ),
|
BasePeer::TYPE_PHPNAME => array ('ProUid', 'ProParent', 'ProTime', 'ProTimeunit', 'ProStatus', 'ProTypeDay', 'ProType', 'ProAssignment', 'ProShowMap', 'ProShowMessage', 'ProSubprocess', 'ProTriDeleted', 'ProTriCanceled', 'ProTriPaused', 'ProTriReassigned', 'ProTriUnpaused', 'ProTypeProcess', 'ProShowDelegate', 'ProShowDynaform', 'ProCategory', 'ProSubCategory', 'ProIndustry', 'ProUpdateDate', 'ProCreateDate', 'ProCreateUser', 'ProHeight', 'ProWidth', 'ProTitleX', 'ProTitleY', 'ProDebug', 'ProDynaforms', 'ProDerivationScreenTpl', 'ProCost', 'ProUnitCost', ),
|
||||||
BasePeer::TYPE_COLNAME => array (ProcessPeer::PRO_UID, ProcessPeer::PRO_PARENT, ProcessPeer::PRO_TIME, ProcessPeer::PRO_TIMEUNIT, ProcessPeer::PRO_STATUS, ProcessPeer::PRO_TYPE_DAY, ProcessPeer::PRO_TYPE, ProcessPeer::PRO_ASSIGNMENT, ProcessPeer::PRO_SHOW_MAP, ProcessPeer::PRO_SHOW_MESSAGE, ProcessPeer::PRO_SUBPROCESS, ProcessPeer::PRO_TRI_DELETED, ProcessPeer::PRO_TRI_CANCELED, ProcessPeer::PRO_TRI_PAUSED, ProcessPeer::PRO_TRI_REASSIGNED, ProcessPeer::PRO_TRI_UNPAUSED, ProcessPeer::PRO_TYPE_PROCESS, ProcessPeer::PRO_SHOW_DELEGATE, ProcessPeer::PRO_SHOW_DYNAFORM, ProcessPeer::PRO_CATEGORY, ProcessPeer::PRO_SUB_CATEGORY, ProcessPeer::PRO_INDUSTRY, ProcessPeer::PRO_UPDATE_DATE, ProcessPeer::PRO_CREATE_DATE, ProcessPeer::PRO_CREATE_USER, ProcessPeer::PRO_HEIGHT, ProcessPeer::PRO_WIDTH, ProcessPeer::PRO_TITLE_X, ProcessPeer::PRO_TITLE_Y, ProcessPeer::PRO_DEBUG, ProcessPeer::PRO_DYNAFORMS, ProcessPeer::PRO_DERIVATION_SCREEN_TPL, ),
|
BasePeer::TYPE_COLNAME => array (ProcessPeer::PRO_UID, ProcessPeer::PRO_PARENT, ProcessPeer::PRO_TIME, ProcessPeer::PRO_TIMEUNIT, ProcessPeer::PRO_STATUS, ProcessPeer::PRO_TYPE_DAY, ProcessPeer::PRO_TYPE, ProcessPeer::PRO_ASSIGNMENT, ProcessPeer::PRO_SHOW_MAP, ProcessPeer::PRO_SHOW_MESSAGE, ProcessPeer::PRO_SUBPROCESS, ProcessPeer::PRO_TRI_DELETED, ProcessPeer::PRO_TRI_CANCELED, ProcessPeer::PRO_TRI_PAUSED, ProcessPeer::PRO_TRI_REASSIGNED, ProcessPeer::PRO_TRI_UNPAUSED, ProcessPeer::PRO_TYPE_PROCESS, ProcessPeer::PRO_SHOW_DELEGATE, ProcessPeer::PRO_SHOW_DYNAFORM, ProcessPeer::PRO_CATEGORY, ProcessPeer::PRO_SUB_CATEGORY, ProcessPeer::PRO_INDUSTRY, ProcessPeer::PRO_UPDATE_DATE, ProcessPeer::PRO_CREATE_DATE, ProcessPeer::PRO_CREATE_USER, ProcessPeer::PRO_HEIGHT, ProcessPeer::PRO_WIDTH, ProcessPeer::PRO_TITLE_X, ProcessPeer::PRO_TITLE_Y, ProcessPeer::PRO_DEBUG, ProcessPeer::PRO_DYNAFORMS, ProcessPeer::PRO_DERIVATION_SCREEN_TPL, ProcessPeer::PRO_COST, ProcessPeer::PRO_UNIT_COST, ),
|
||||||
BasePeer::TYPE_FIELDNAME => array ('PRO_UID', 'PRO_PARENT', 'PRO_TIME', 'PRO_TIMEUNIT', 'PRO_STATUS', 'PRO_TYPE_DAY', 'PRO_TYPE', 'PRO_ASSIGNMENT', 'PRO_SHOW_MAP', 'PRO_SHOW_MESSAGE', 'PRO_SUBPROCESS', 'PRO_TRI_DELETED', 'PRO_TRI_CANCELED', 'PRO_TRI_PAUSED', 'PRO_TRI_REASSIGNED', 'PRO_TRI_UNPAUSED', 'PRO_TYPE_PROCESS', 'PRO_SHOW_DELEGATE', 'PRO_SHOW_DYNAFORM', 'PRO_CATEGORY', 'PRO_SUB_CATEGORY', 'PRO_INDUSTRY', 'PRO_UPDATE_DATE', 'PRO_CREATE_DATE', 'PRO_CREATE_USER', 'PRO_HEIGHT', 'PRO_WIDTH', 'PRO_TITLE_X', 'PRO_TITLE_Y', 'PRO_DEBUG', 'PRO_DYNAFORMS', 'PRO_DERIVATION_SCREEN_TPL', ),
|
BasePeer::TYPE_FIELDNAME => array ('PRO_UID', 'PRO_PARENT', 'PRO_TIME', 'PRO_TIMEUNIT', 'PRO_STATUS', 'PRO_TYPE_DAY', 'PRO_TYPE', 'PRO_ASSIGNMENT', 'PRO_SHOW_MAP', 'PRO_SHOW_MESSAGE', 'PRO_SUBPROCESS', 'PRO_TRI_DELETED', 'PRO_TRI_CANCELED', 'PRO_TRI_PAUSED', 'PRO_TRI_REASSIGNED', 'PRO_TRI_UNPAUSED', 'PRO_TYPE_PROCESS', 'PRO_SHOW_DELEGATE', 'PRO_SHOW_DYNAFORM', 'PRO_CATEGORY', 'PRO_SUB_CATEGORY', 'PRO_INDUSTRY', 'PRO_UPDATE_DATE', 'PRO_CREATE_DATE', 'PRO_CREATE_USER', 'PRO_HEIGHT', 'PRO_WIDTH', 'PRO_TITLE_X', 'PRO_TITLE_Y', 'PRO_DEBUG', 'PRO_DYNAFORMS', 'PRO_DERIVATION_SCREEN_TPL', 'PRO_COST', 'PRO_UNIT_COST', ),
|
||||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, )
|
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, )
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -151,10 +157,10 @@ abstract class BaseProcessPeer
|
|||||||
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
|
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
|
||||||
*/
|
*/
|
||||||
private static $fieldKeys = array (
|
private static $fieldKeys = array (
|
||||||
BasePeer::TYPE_PHPNAME => array ('ProUid' => 0, 'ProParent' => 1, 'ProTime' => 2, 'ProTimeunit' => 3, 'ProStatus' => 4, 'ProTypeDay' => 5, 'ProType' => 6, 'ProAssignment' => 7, 'ProShowMap' => 8, 'ProShowMessage' => 9, 'ProSubprocess' => 10, 'ProTriDeleted' => 11, 'ProTriCanceled' => 12, 'ProTriPaused' => 13, 'ProTriReassigned' => 14, 'ProTriUnpaused' => 15, 'ProTypeProcess' => 16, 'ProShowDelegate' => 17, 'ProShowDynaform' => 18, 'ProCategory' => 19, 'ProSubCategory' => 20, 'ProIndustry' => 21, 'ProUpdateDate' => 22, 'ProCreateDate' => 23, 'ProCreateUser' => 24, 'ProHeight' => 25, 'ProWidth' => 26, 'ProTitleX' => 27, 'ProTitleY' => 28, 'ProDebug' => 29, 'ProDynaforms' => 30, 'ProDerivationScreenTpl' => 31, ),
|
BasePeer::TYPE_PHPNAME => array ('ProUid' => 0, 'ProParent' => 1, 'ProTime' => 2, 'ProTimeunit' => 3, 'ProStatus' => 4, 'ProTypeDay' => 5, 'ProType' => 6, 'ProAssignment' => 7, 'ProShowMap' => 8, 'ProShowMessage' => 9, 'ProSubprocess' => 10, 'ProTriDeleted' => 11, 'ProTriCanceled' => 12, 'ProTriPaused' => 13, 'ProTriReassigned' => 14, 'ProTriUnpaused' => 15, 'ProTypeProcess' => 16, 'ProShowDelegate' => 17, 'ProShowDynaform' => 18, 'ProCategory' => 19, 'ProSubCategory' => 20, 'ProIndustry' => 21, 'ProUpdateDate' => 22, 'ProCreateDate' => 23, 'ProCreateUser' => 24, 'ProHeight' => 25, 'ProWidth' => 26, 'ProTitleX' => 27, 'ProTitleY' => 28, 'ProDebug' => 29, 'ProDynaforms' => 30, 'ProDerivationScreenTpl' => 31, 'ProCost' => 32, 'ProUnitCost' => 33, ),
|
||||||
BasePeer::TYPE_COLNAME => array (ProcessPeer::PRO_UID => 0, ProcessPeer::PRO_PARENT => 1, ProcessPeer::PRO_TIME => 2, ProcessPeer::PRO_TIMEUNIT => 3, ProcessPeer::PRO_STATUS => 4, ProcessPeer::PRO_TYPE_DAY => 5, ProcessPeer::PRO_TYPE => 6, ProcessPeer::PRO_ASSIGNMENT => 7, ProcessPeer::PRO_SHOW_MAP => 8, ProcessPeer::PRO_SHOW_MESSAGE => 9, ProcessPeer::PRO_SUBPROCESS => 10, ProcessPeer::PRO_TRI_DELETED => 11, ProcessPeer::PRO_TRI_CANCELED => 12, ProcessPeer::PRO_TRI_PAUSED => 13, ProcessPeer::PRO_TRI_REASSIGNED => 14, ProcessPeer::PRO_TRI_UNPAUSED => 15, ProcessPeer::PRO_TYPE_PROCESS => 16, ProcessPeer::PRO_SHOW_DELEGATE => 17, ProcessPeer::PRO_SHOW_DYNAFORM => 18, ProcessPeer::PRO_CATEGORY => 19, ProcessPeer::PRO_SUB_CATEGORY => 20, ProcessPeer::PRO_INDUSTRY => 21, ProcessPeer::PRO_UPDATE_DATE => 22, ProcessPeer::PRO_CREATE_DATE => 23, ProcessPeer::PRO_CREATE_USER => 24, ProcessPeer::PRO_HEIGHT => 25, ProcessPeer::PRO_WIDTH => 26, ProcessPeer::PRO_TITLE_X => 27, ProcessPeer::PRO_TITLE_Y => 28, ProcessPeer::PRO_DEBUG => 29, ProcessPeer::PRO_DYNAFORMS => 30, ProcessPeer::PRO_DERIVATION_SCREEN_TPL => 31, ),
|
BasePeer::TYPE_COLNAME => array (ProcessPeer::PRO_UID => 0, ProcessPeer::PRO_PARENT => 1, ProcessPeer::PRO_TIME => 2, ProcessPeer::PRO_TIMEUNIT => 3, ProcessPeer::PRO_STATUS => 4, ProcessPeer::PRO_TYPE_DAY => 5, ProcessPeer::PRO_TYPE => 6, ProcessPeer::PRO_ASSIGNMENT => 7, ProcessPeer::PRO_SHOW_MAP => 8, ProcessPeer::PRO_SHOW_MESSAGE => 9, ProcessPeer::PRO_SUBPROCESS => 10, ProcessPeer::PRO_TRI_DELETED => 11, ProcessPeer::PRO_TRI_CANCELED => 12, ProcessPeer::PRO_TRI_PAUSED => 13, ProcessPeer::PRO_TRI_REASSIGNED => 14, ProcessPeer::PRO_TRI_UNPAUSED => 15, ProcessPeer::PRO_TYPE_PROCESS => 16, ProcessPeer::PRO_SHOW_DELEGATE => 17, ProcessPeer::PRO_SHOW_DYNAFORM => 18, ProcessPeer::PRO_CATEGORY => 19, ProcessPeer::PRO_SUB_CATEGORY => 20, ProcessPeer::PRO_INDUSTRY => 21, ProcessPeer::PRO_UPDATE_DATE => 22, ProcessPeer::PRO_CREATE_DATE => 23, ProcessPeer::PRO_CREATE_USER => 24, ProcessPeer::PRO_HEIGHT => 25, ProcessPeer::PRO_WIDTH => 26, ProcessPeer::PRO_TITLE_X => 27, ProcessPeer::PRO_TITLE_Y => 28, ProcessPeer::PRO_DEBUG => 29, ProcessPeer::PRO_DYNAFORMS => 30, ProcessPeer::PRO_DERIVATION_SCREEN_TPL => 31, ProcessPeer::PRO_COST => 32, ProcessPeer::PRO_UNIT_COST => 33, ),
|
||||||
BasePeer::TYPE_FIELDNAME => array ('PRO_UID' => 0, 'PRO_PARENT' => 1, 'PRO_TIME' => 2, 'PRO_TIMEUNIT' => 3, 'PRO_STATUS' => 4, 'PRO_TYPE_DAY' => 5, 'PRO_TYPE' => 6, 'PRO_ASSIGNMENT' => 7, 'PRO_SHOW_MAP' => 8, 'PRO_SHOW_MESSAGE' => 9, 'PRO_SUBPROCESS' => 10, 'PRO_TRI_DELETED' => 11, 'PRO_TRI_CANCELED' => 12, 'PRO_TRI_PAUSED' => 13, 'PRO_TRI_REASSIGNED' => 14, 'PRO_TRI_UNPAUSED' => 15, 'PRO_TYPE_PROCESS' => 16, 'PRO_SHOW_DELEGATE' => 17, 'PRO_SHOW_DYNAFORM' => 18, 'PRO_CATEGORY' => 19, 'PRO_SUB_CATEGORY' => 20, 'PRO_INDUSTRY' => 21, 'PRO_UPDATE_DATE' => 22, 'PRO_CREATE_DATE' => 23, 'PRO_CREATE_USER' => 24, 'PRO_HEIGHT' => 25, 'PRO_WIDTH' => 26, 'PRO_TITLE_X' => 27, 'PRO_TITLE_Y' => 28, 'PRO_DEBUG' => 29, 'PRO_DYNAFORMS' => 30, 'PRO_DERIVATION_SCREEN_TPL' => 31, ),
|
BasePeer::TYPE_FIELDNAME => array ('PRO_UID' => 0, 'PRO_PARENT' => 1, 'PRO_TIME' => 2, 'PRO_TIMEUNIT' => 3, 'PRO_STATUS' => 4, 'PRO_TYPE_DAY' => 5, 'PRO_TYPE' => 6, 'PRO_ASSIGNMENT' => 7, 'PRO_SHOW_MAP' => 8, 'PRO_SHOW_MESSAGE' => 9, 'PRO_SUBPROCESS' => 10, 'PRO_TRI_DELETED' => 11, 'PRO_TRI_CANCELED' => 12, 'PRO_TRI_PAUSED' => 13, 'PRO_TRI_REASSIGNED' => 14, 'PRO_TRI_UNPAUSED' => 15, 'PRO_TYPE_PROCESS' => 16, 'PRO_SHOW_DELEGATE' => 17, 'PRO_SHOW_DYNAFORM' => 18, 'PRO_CATEGORY' => 19, 'PRO_SUB_CATEGORY' => 20, 'PRO_INDUSTRY' => 21, 'PRO_UPDATE_DATE' => 22, 'PRO_CREATE_DATE' => 23, 'PRO_CREATE_USER' => 24, 'PRO_HEIGHT' => 25, 'PRO_WIDTH' => 26, 'PRO_TITLE_X' => 27, 'PRO_TITLE_Y' => 28, 'PRO_DEBUG' => 29, 'PRO_DYNAFORMS' => 30, 'PRO_DERIVATION_SCREEN_TPL' => 31, 'PRO_COST' => 32, 'PRO_UNIT_COST' => 33, ),
|
||||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, )
|
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, )
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -319,6 +325,10 @@ abstract class BaseProcessPeer
|
|||||||
|
|
||||||
$criteria->addSelectColumn(ProcessPeer::PRO_DERIVATION_SCREEN_TPL);
|
$criteria->addSelectColumn(ProcessPeer::PRO_DERIVATION_SCREEN_TPL);
|
||||||
|
|
||||||
|
$criteria->addSelectColumn(ProcessPeer::PRO_COST);
|
||||||
|
|
||||||
|
$criteria->addSelectColumn(ProcessPeer::PRO_UNIT_COST);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const COUNT = 'COUNT(PROCESS.PRO_UID)';
|
const COUNT = 'COUNT(PROCESS.PRO_UID)';
|
||||||
|
|||||||
@@ -860,6 +860,8 @@
|
|||||||
<column name="PRO_DEBUG" type="INTEGER" required="true" default="0"/>
|
<column name="PRO_DEBUG" type="INTEGER" required="true" default="0"/>
|
||||||
<column name="PRO_DYNAFORMS" type="LONGVARCHAR" required="false"/>
|
<column name="PRO_DYNAFORMS" type="LONGVARCHAR" required="false"/>
|
||||||
<column name="PRO_DERIVATION_SCREEN_TPL" type="VARCHAR" size="128" default="" required="false"/>
|
<column name="PRO_DERIVATION_SCREEN_TPL" type="VARCHAR" size="128" default="" required="false"/>
|
||||||
|
<column name="PRO_COST" type="DECIMAL" size="7,2" required="false" default="0"/>
|
||||||
|
<column name="PRO_UNIT_COST" type="VARCHAR" size="50" required="false" default=""/>
|
||||||
<validator column="PRO_TIMEUNIT">
|
<validator column="PRO_TIMEUNIT">
|
||||||
<rule name="validValues" value="WEEKS|MONTHS|DAYS|HOURS|MINUTES" message="Please select a valid Time Unit."/>
|
<rule name="validValues" value="WEEKS|MONTHS|DAYS|HOURS|MINUTES" message="Please select a valid Time Unit."/>
|
||||||
</validator>
|
</validator>
|
||||||
@@ -3065,7 +3067,7 @@
|
|||||||
</table>
|
</table>
|
||||||
|
|
||||||
<table name="SESSION_STORAGE">
|
<table name="SESSION_STORAGE">
|
||||||
<vendor type="mysql">
|
<vendor type="mysql">
|
||||||
<parameter name="Name" value="SESSION_STORAGE"/>
|
<parameter name="Name" value="SESSION_STORAGE"/>
|
||||||
<parameter name="Engine" value="InnoDB"/>
|
<parameter name="Engine" value="InnoDB"/>
|
||||||
<parameter name="Version" value="10"/>
|
<parameter name="Version" value="10"/>
|
||||||
@@ -3595,7 +3597,7 @@
|
|||||||
</table>
|
</table>
|
||||||
|
|
||||||
<table name="BPMN_FLOW">
|
<table name="BPMN_FLOW">
|
||||||
<vendor type="mysql">
|
<vendor type="mysql">
|
||||||
<parameter name="Name" value="BPMN_FLOW"/>
|
<parameter name="Name" value="BPMN_FLOW"/>
|
||||||
<parameter name="Engine" value="InnoDB"/>
|
<parameter name="Engine" value="InnoDB"/>
|
||||||
<parameter name="Version" value="10"/>
|
<parameter name="Version" value="10"/>
|
||||||
@@ -3644,7 +3646,7 @@
|
|||||||
</table>
|
</table>
|
||||||
|
|
||||||
<table name="BPMN_GATEWAY">
|
<table name="BPMN_GATEWAY">
|
||||||
<vendor type="mysql">
|
<vendor type="mysql">
|
||||||
<parameter name="Name" value="BPMN_GATEWAY"/>
|
<parameter name="Name" value="BPMN_GATEWAY"/>
|
||||||
<parameter name="Engine" value="InnoDB"/>
|
<parameter name="Engine" value="InnoDB"/>
|
||||||
<parameter name="Version" value="10"/>
|
<parameter name="Version" value="10"/>
|
||||||
@@ -3722,7 +3724,7 @@
|
|||||||
</table>
|
</table>
|
||||||
|
|
||||||
<table name="BPMN_LANE">
|
<table name="BPMN_LANE">
|
||||||
<vendor type="mysql">
|
<vendor type="mysql">
|
||||||
<parameter name="Name" value="BPMN_LANE"/>
|
<parameter name="Name" value="BPMN_LANE"/>
|
||||||
<parameter name="Engine" value="InnoDB"/>
|
<parameter name="Engine" value="InnoDB"/>
|
||||||
<parameter name="Version" value="10"/>
|
<parameter name="Version" value="10"/>
|
||||||
@@ -3817,7 +3819,7 @@
|
|||||||
</table>
|
</table>
|
||||||
|
|
||||||
<table name="BPMN_DOCUMENTATION">
|
<table name="BPMN_DOCUMENTATION">
|
||||||
<vendor type="mysql">
|
<vendor type="mysql">
|
||||||
<parameter name="Name" value="BPMN_DOCUMENTATION"/>
|
<parameter name="Name" value="BPMN_DOCUMENTATION"/>
|
||||||
<parameter name="Engine" value="InnoDB"/>
|
<parameter name="Engine" value="InnoDB"/>
|
||||||
<parameter name="Version" value="10"/>
|
<parameter name="Version" value="10"/>
|
||||||
@@ -4850,20 +4852,23 @@
|
|||||||
<parameter name="Create_options" value="" />
|
<parameter name="Create_options" value="" />
|
||||||
<parameter name="Comment" value="Data calculated users by task"/>
|
<parameter name="Comment" value="Data calculated users by task"/>
|
||||||
</vendor>
|
</vendor>
|
||||||
<column name="USR_UID" type="VARCHAR" size="32" required="true" primaryKey="true" />
|
<column name="USR_UID" type="VARCHAR" size="32" required="true" primaryKey="true" />
|
||||||
<column name="TAS_UID" type="VARCHAR" size="32" required="true" primaryKey="true" />
|
<column name="TAS_UID" type="VARCHAR" size="32" required="true" primaryKey="true" />
|
||||||
<column name="PRO_UID" type="VARCHAR" size="32" required="true" />
|
<column name="PRO_UID" type="VARCHAR" size="32" required="true" />
|
||||||
<column name="MONTH" type="INTEGER" required="true" default="0" primaryKey="true" />
|
<column name="MONTH" type="INTEGER" required="true" default="0" primaryKey="true" />
|
||||||
<column name="YEAR" type="INTEGER" required="true" default="0" primaryKey="true" />
|
<column name="YEAR" type="INTEGER" required="true" default="0" primaryKey="true" />
|
||||||
<column name="TOTAL_TIME_BY_TASK" type="DECIMAL" size="7,2" default="0" />
|
<column name="TOTAL_QUEUE_TIME_BY_TASK" type="DECIMAL" size="7,2" default="0" />
|
||||||
<column name="TOTAL_CASES_IN" type="DECIMAL" size="7,2" default="0" />
|
<column name="TOTAL_TIME_BY_TASK" type="DECIMAL" size="7,2" default="0" />
|
||||||
<column name="TOTAL_CASES_OUT" type="DECIMAL" size="7,2" default="0" />
|
<column name="TOTAL_CASES_IN" type="DECIMAL" size="7,2" default="0" />
|
||||||
<column name="USER_HOUR_COST" type="DECIMAL" size="7,2" default="0" />
|
<column name="TOTAL_CASES_OUT" type="DECIMAL" size="7,2" default="0" />
|
||||||
<column name="AVG_TIME" type="DECIMAL" size="7,2" default="0" />
|
<column name="USER_HOUR_COST" type="DECIMAL" size="7,2" default="0" />
|
||||||
<column name="SDV_TIME" type="DECIMAL" size="7,2" default="0" />
|
<column name="AVG_TIME" type="DECIMAL" size="7,2" default="0" />
|
||||||
<column name="CONFIGURED_TASK_TIME" type="DECIMAL" size="7,2" default="0" />
|
<column name="SDV_TIME" type="DECIMAL" size="7,2" default="0" />
|
||||||
<column name="TOTAL_CASES_OVERDUE" type="DECIMAL" size="7,2" default="0" />
|
<column name="CONFIGURED_TASK_TIME" type="DECIMAL" size="7,2" default="0" />
|
||||||
<column name="TOTAL_CASES_ON_TIME" type="DECIMAL" size="7,2" default="0" />
|
<column name="TOTAL_CASES_OVERDUE" type="DECIMAL" size="7,2" default="0" />
|
||||||
|
<column name="TOTAL_CASES_ON_TIME" type="DECIMAL" size="7,2" default="0" />
|
||||||
|
<column name="PRO_COST" type="DECIMAL" size="7,2" required="false" default="0"/>
|
||||||
|
<column name="PRO_UNIT_COST" type="VARCHAR" size="50" required="false" default=""/>
|
||||||
<index name="indexReporting">
|
<index name="indexReporting">
|
||||||
<index-column name="USR_UID"/>
|
<index-column name="USR_UID"/>
|
||||||
<index-column name="TAS_UID"/>
|
<index-column name="TAS_UID"/>
|
||||||
@@ -4911,6 +4916,8 @@
|
|||||||
<column name="TOTAL_CASES_OPEN" type="DECIMAL" size="7,2" default="0" />
|
<column name="TOTAL_CASES_OPEN" type="DECIMAL" size="7,2" default="0" />
|
||||||
<column name="TOTAL_CASES_OVERDUE" type="DECIMAL" size="7,2" default="0" />
|
<column name="TOTAL_CASES_OVERDUE" type="DECIMAL" size="7,2" default="0" />
|
||||||
<column name="TOTAL_CASES_ON_TIME" type="DECIMAL" size="7,2" default="0" />
|
<column name="TOTAL_CASES_ON_TIME" type="DECIMAL" size="7,2" default="0" />
|
||||||
|
<column name="PRO_COST" type="DECIMAL" size="7,2" required="false" default="0"/>
|
||||||
|
<column name="PRO_UNIT_COST" type="VARCHAR" size="50" required="false" default=""/>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<table name="DASHBOARD">
|
<table name="DASHBOARD">
|
||||||
@@ -5071,4 +5078,3 @@
|
|||||||
<column name="EMAIL_EVENT_BODY" type="LONGVARCHAR" required="true" />
|
<column name="EMAIL_EVENT_BODY" type="LONGVARCHAR" required="true" />
|
||||||
</table>
|
</table>
|
||||||
</database>
|
</database>
|
||||||
|
|
||||||
|
|||||||
@@ -174,45 +174,12 @@ class StrategicDashboard extends Controller
|
|||||||
$this->setView( 'strategicDashboard/viewDashboard' );
|
$this->setView( 'strategicDashboard/viewDashboard' );
|
||||||
|
|
||||||
$this->setVar('urlProxy', $this->urlProxy);
|
$this->setVar('urlProxy', $this->urlProxy);
|
||||||
|
$this->setVar('SYS_SYS', SYS_SYS);
|
||||||
$this->setVar('usrId', $this->usrId);
|
$this->setVar('usrId', $this->usrId);
|
||||||
$this->setVar('credentials', $this->clientToken);
|
$this->setVar('credentials', $this->clientToken);
|
||||||
$this->setVar('unitCost', $this->usrUnitCost);
|
$this->setVar('unitCost', $this->usrUnitCost);
|
||||||
|
|
||||||
$translation = array();
|
$translation = $this->getTranslations();
|
||||||
$translation['ID_MANAGERS_DASHBOARDS'] = G::LoadTranslation( 'ID_MANAGERS_DASHBOARDS');
|
|
||||||
$translation['ID_PRO_EFFICIENCY_INDEX'] = G::LoadTranslation( 'ID_PRO_EFFICIENCY_INDEX');
|
|
||||||
$translation['ID_EFFICIENCY_USER'] = G::LoadTranslation( 'ID_EFFICIENCY_USER');
|
|
||||||
$translation['ID_COMPLETED_CASES'] = G::LoadTranslation( 'ID_COMPLETED_CASES');
|
|
||||||
$translation['ID_WELL_DONE'] = G::LoadTranslation( 'ID_WELL_DONE');
|
|
||||||
$translation['ID_NUMBER_CASES'] = G::LoadTranslation( 'ID_NUMBER_CASES');
|
|
||||||
$translation['ID_EFFICIENCY_INDEX'] = G::LoadTranslation( 'ID_EFFICIENCY_INDEX');
|
|
||||||
$translation['ID_INEFFICIENCY_COST'] = G::LoadTranslation( 'ID_INEFFICIENCY_COST');
|
|
||||||
$translation['ID_EFFICIENCY_COST'] = G::LoadTranslation( 'ID_EFFICIENCY_COST');
|
|
||||||
$translation['ID_RELATED_PROCESS'] = G::LoadTranslation( 'ID_RELATED_PROCESS');
|
|
||||||
$translation['ID_RELATED_GROUPS'] = G::LoadTranslation( 'ID_RELATED_GROUPS');
|
|
||||||
$translation['ID_RELATED_TASKS'] = G::LoadTranslation( 'ID_RELATED_TASKS');
|
|
||||||
$translation['ID_RELATED_USERS'] = G::LoadTranslation( 'ID_RELATED_USERS');
|
|
||||||
$translation['ID_GRID_PAGE_NO_DASHBOARD_MESSAGE'] = G::LoadTranslation( 'ID_GRID_PAGE_NO_DASHBOARD_MESSAGE');
|
|
||||||
$translation['ID_PROCESS_TASKS'] = G::LoadTranslation( 'ID_PROCESS_TASKS');
|
|
||||||
$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_TASK'] = G::LoadTranslation( 'ID_TASK');
|
|
||||||
$translation['ID_USER'] = G::LoadTranslation( 'ID_USER');
|
|
||||||
$translation['ID_YEAR'] = G::LoadTranslation( 'ID_YEAR');
|
|
||||||
$translation['ID_USERS'] = G::LoadTranslation( 'ID_USERS');
|
|
||||||
$translation['ID_USERS'] = G::LoadTranslation( 'ID_USERS');
|
|
||||||
$translation['ID_OVERDUE'] = G::LoadTranslation( 'ID_OVERDUE');
|
|
||||||
$translation['ID_AT_RISK'] = G::LoadTranslation( 'ID_AT_RISK');
|
|
||||||
$translation['ID_ON_TIME'] = G::LoadTranslation( 'ID_ON_TIME');
|
|
||||||
$translation['ID_NO_INEFFICIENT_PROCESSES'] = G::LoadTranslation('ID_NO_INEFFICIENT_PROCESSES');
|
|
||||||
$translation['ID_NO_INEFFICIENT_TASKS'] = G::LoadTranslation('ID_NO_INEFFICIENT_TASKS');
|
|
||||||
$translation['ID_NO_INEFFICIENT_USER_GROUPS'] = G::LoadTranslation('ID_NO_INEFFICIENT_USER_GROUPS');
|
|
||||||
$translation['ID_NO_INEFFICIENT_USERS'] = G::LoadTranslation('ID_NO_INEFFICIENT_USERS');
|
|
||||||
$translation['ID_DISPLAY_EMPTY'] = G::LoadTranslation('ID_DISPLAY_EMPTY');
|
|
||||||
//text for inbox empty in status indicator
|
|
||||||
$translation['ID_INBOX_EMPTY'] = G::LoadTranslation('ID_INBOX_EMPTY');
|
|
||||||
|
|
||||||
$this->setVar('translation', $translation);
|
$this->setVar('translation', $translation);
|
||||||
$this->render();
|
$this->render();
|
||||||
} catch (Exception $error) {
|
} catch (Exception $error) {
|
||||||
@@ -230,39 +197,7 @@ class StrategicDashboard extends Controller
|
|||||||
$this->setVar('credentials', $this->clientToken);
|
$this->setVar('credentials', $this->clientToken);
|
||||||
$this->setVar('unitCost', $this->usrUnitCost);
|
$this->setVar('unitCost', $this->usrUnitCost);
|
||||||
|
|
||||||
$translation = array();
|
$translation = $this->getTranslations();
|
||||||
$translation['ID_MANAGERS_DASHBOARDS'] = G::LoadTranslation( 'ID_MANAGERS_DASHBOARDS');
|
|
||||||
$translation['ID_PRO_EFFICIENCY_INDEX'] = G::LoadTranslation( 'ID_PRO_EFFICIENCY_INDEX');
|
|
||||||
$translation['ID_EFFICIENCY_USER'] = G::LoadTranslation( 'ID_EFFICIENCY_USER');
|
|
||||||
$translation['ID_COMPLETED_CASES'] = G::LoadTranslation( 'ID_COMPLETED_CASES');
|
|
||||||
$translation['ID_WELL_DONE'] = G::LoadTranslation( 'ID_WELL_DONE');
|
|
||||||
$translation['ID_NUMBER_CASES'] = G::LoadTranslation( 'ID_NUMBER_CASES');
|
|
||||||
$translation['ID_EFFICIENCY_INDEX'] = G::LoadTranslation( 'ID_EFFICIENCY_INDEX');
|
|
||||||
$translation['ID_INEFFICIENCY_COST'] = G::LoadTranslation( 'ID_INEFFICIENCY_COST');
|
|
||||||
$translation['ID_EFFICIENCY_COST'] = G::LoadTranslation( 'ID_EFFICIENCY_COST');
|
|
||||||
$translation['ID_RELATED_PROCESS'] = G::LoadTranslation( 'ID_RELATED_PROCESS');
|
|
||||||
$translation['ID_RELATED_GROUPS'] = G::LoadTranslation( 'ID_RELATED_GROUPS');
|
|
||||||
$translation['ID_RELATED_TASKS'] = G::LoadTranslation( 'ID_RELATED_TASKS');
|
|
||||||
$translation['ID_RELATED_USERS'] = G::LoadTranslation( 'ID_RELATED_USERS');
|
|
||||||
$translation['ID_GRID_PAGE_NO_DASHBOARD_MESSAGE'] = G::LoadTranslation( 'ID_GRID_PAGE_NO_DASHBOARD_MESSAGE');
|
|
||||||
$translation['ID_PROCESS_TASKS'] = G::LoadTranslation( 'ID_PROCESS_TASKS');
|
|
||||||
$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_TASK'] = G::LoadTranslation( 'ID_TASK');
|
|
||||||
$translation['ID_USER'] = G::LoadTranslation( 'ID_USER');
|
|
||||||
$translation['ID_YEAR'] = G::LoadTranslation( 'ID_YEAR');
|
|
||||||
$translation['ID_USERS'] = G::LoadTranslation( 'ID_USERS');
|
|
||||||
$translation['ID_OVERDUE'] = G::LoadTranslation( 'ID_OVERDUE');
|
|
||||||
$translation['ID_AT_RISK'] = G::LoadTranslation( 'ID_AT_RISK');
|
|
||||||
$translation['ID_ON_TIME'] = G::LoadTranslation( 'ID_ON_TIME');
|
|
||||||
$translation['ID_NO_INEFFICIENT_PROCESSES'] = G::LoadTranslation('ID_NO_INEFFICIENT_PROCESSES');
|
|
||||||
$translation['ID_NO_INEFFICIENT_TASKS'] = G::LoadTranslation('ID_NO_INEFFICIENT_TASKS');
|
|
||||||
$translation['ID_NO_INEFFICIENT_USER_GROUPS'] = G::LoadTranslation('ID_NO_INEFFICIENT_USER_GROUPS');
|
|
||||||
$translation['ID_NO_INEFFICIENT_USERS'] = G::LoadTranslation('ID_NO_INEFFICIENT_USERS');
|
|
||||||
$translation['ID_DISPLAY_EMPTY'] = G::LoadTranslation('ID_DISPLAY_EMPTY');
|
|
||||||
$translation['ID_INBOX_EMPTY'] = G::LoadTranslation('ID_INBOX_EMPTY');
|
|
||||||
|
|
||||||
$this->setVar('translation', $translation);
|
$this->setVar('translation', $translation);
|
||||||
$this->render();
|
$this->render();
|
||||||
} catch (Exception $error) {
|
} catch (Exception $error) {
|
||||||
@@ -271,4 +206,60 @@ class StrategicDashboard extends Controller
|
|||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function getTranslations() {
|
||||||
|
$translation = array();
|
||||||
|
$translation['ID_MANAGERS_DASHBOARDS'] = G::LoadTranslation( 'ID_MANAGERS_DASHBOARDS');
|
||||||
|
$translation['ID_PRO_EFFICIENCY_INDEX'] = G::LoadTranslation( 'ID_PRO_EFFICIENCY_INDEX');
|
||||||
|
$translation['ID_EFFICIENCY_USER'] = G::LoadTranslation( 'ID_EFFICIENCY_USER');
|
||||||
|
$translation['ID_COMPLETED_CASES'] = G::LoadTranslation( 'ID_COMPLETED_CASES');
|
||||||
|
$translation['ID_WELL_DONE'] = G::LoadTranslation( 'ID_WELL_DONE');
|
||||||
|
$translation['ID_NUMBER_CASES'] = G::LoadTranslation( 'ID_NUMBER_CASES');
|
||||||
|
$translation['ID_EFFICIENCY_INDEX'] = G::LoadTranslation( 'ID_EFFICIENCY_INDEX');
|
||||||
|
$translation['ID_INEFFICIENCY_COST'] = G::LoadTranslation( 'ID_INEFFICIENCY_COST');
|
||||||
|
$translation['ID_EFFICIENCY_COST'] = G::LoadTranslation( 'ID_EFFICIENCY_COST');
|
||||||
|
$translation['ID_RELATED_PROCESS'] = G::LoadTranslation( 'ID_RELATED_PROCESS');
|
||||||
|
$translation['ID_RELATED_GROUPS'] = G::LoadTranslation( 'ID_RELATED_GROUPS');
|
||||||
|
$translation['ID_RELATED_TASKS'] = G::LoadTranslation( 'ID_RELATED_TASKS');
|
||||||
|
$translation['ID_RELATED_USERS'] = G::LoadTranslation( 'ID_RELATED_USERS');
|
||||||
|
$translation['ID_GRID_PAGE_NO_DASHBOARD_MESSAGE'] = G::LoadTranslation( 'ID_GRID_PAGE_NO_DASHBOARD_MESSAGE');
|
||||||
|
$translation['ID_PROCESS_TASKS'] = G::LoadTranslation( 'ID_PROCESS_TASKS');
|
||||||
|
$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_TASK'] = G::LoadTranslation( 'ID_TASK');
|
||||||
|
$translation['ID_USER'] = G::LoadTranslation( 'ID_USER');
|
||||||
|
$translation['ID_YEAR'] = G::LoadTranslation( 'ID_YEAR');
|
||||||
|
$translation['ID_USERS'] = G::LoadTranslation( 'ID_USERS');
|
||||||
|
$translation['ID_USERS'] = G::LoadTranslation( 'ID_USERS');
|
||||||
|
$translation['ID_OVERDUE'] = G::LoadTranslation( 'ID_OVERDUE');
|
||||||
|
$translation['ID_AT_RISK'] = G::LoadTranslation( 'ID_AT_RISK');
|
||||||
|
$translation['ID_ON_TIME'] = G::LoadTranslation( 'ID_ON_TIME');
|
||||||
|
$translation['ID_NO_INEFFICIENT_PROCESSES'] = G::LoadTranslation('ID_NO_INEFFICIENT_PROCESSES');
|
||||||
|
$translation['ID_NO_INEFFICIENT_TASKS'] = G::LoadTranslation('ID_NO_INEFFICIENT_TASKS');
|
||||||
|
$translation['ID_NO_INEFFICIENT_USER_GROUPS'] = G::LoadTranslation('ID_NO_INEFFICIENT_USER_GROUPS');
|
||||||
|
$translation['ID_NO_INEFFICIENT_USERS'] = G::LoadTranslation('ID_NO_INEFFICIENT_USERS');
|
||||||
|
$translation['ID_DISPLAY_EMPTY'] = G::LoadTranslation('ID_DISPLAY_EMPTY');
|
||||||
|
$translation['ID_INBOX_EMPTY'] = G::LoadTranslation('ID_INBOX_EMPTY');
|
||||||
|
$translation['ID_INDICATOR'] = G::LoadTranslation('ID_INDICATOR');
|
||||||
|
$translation['ID_PERIODICITY'] = G::LoadTranslation('ID_PERIODICITY');
|
||||||
|
$translation['ID_MONTH'] = G::LoadTranslation('ID_MONTH');
|
||||||
|
$translation['ID_QUARTER'] = G::LoadTranslation('ID_QUARTER');
|
||||||
|
$translation['ID_SEMESTER'] = G::LoadTranslation('ID_SEMESTER');
|
||||||
|
$translation['ID_TO'] = G::LoadTranslation('ID_TO');
|
||||||
|
$translation['ID_FROM'] = G::LoadTranslation('ID_FROM');
|
||||||
|
$translation['ID_MONTH_ABB_1'] = G::LoadTranslation('ID_MONTH_ABB_1');
|
||||||
|
$translation['ID_MONTH_ABB_2'] = G::LoadTranslation('ID_MONTH_ABB_2');
|
||||||
|
$translation['ID_MONTH_ABB_3'] = G::LoadTranslation('ID_MONTH_ABB_3');
|
||||||
|
$translation['ID_MONTH_ABB_4'] = G::LoadTranslation('ID_MONTH_ABB_4');
|
||||||
|
$translation['ID_MONTH_ABB_5'] = G::LoadTranslation('ID_MONTH_ABB_5');
|
||||||
|
$translation['ID_MONTH_ABB_6'] = G::LoadTranslation('ID_MONTH_ABB_6');
|
||||||
|
$translation['ID_MONTH_ABB_7'] = G::LoadTranslation('ID_MONTH_ABB_7');
|
||||||
|
$translation['ID_MONTH_ABB_8'] = G::LoadTranslation('ID_MONTH_ABB_8');
|
||||||
|
$translation['ID_MONTH_ABB_9'] = G::LoadTranslation('ID_MONTH_ABB_9');
|
||||||
|
$translation['ID_MONTH_ABB_10'] = G::LoadTranslation('ID_MONTH_ABB_10');
|
||||||
|
$translation['ID_MONTH_ABB_11'] = G::LoadTranslation('ID_MONTH_ABB_11');
|
||||||
|
$translation['ID_MONTH_ABB_12'] = G::LoadTranslation('ID_MONTH_ABB_12');
|
||||||
|
return $translation;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -429,6 +429,8 @@ CREATE TABLE `PROCESS`
|
|||||||
`PRO_DEBUG` INTEGER default 0 NOT NULL,
|
`PRO_DEBUG` INTEGER default 0 NOT NULL,
|
||||||
`PRO_DYNAFORMS` MEDIUMTEXT,
|
`PRO_DYNAFORMS` MEDIUMTEXT,
|
||||||
`PRO_DERIVATION_SCREEN_TPL` VARCHAR(128) default '',
|
`PRO_DERIVATION_SCREEN_TPL` VARCHAR(128) default '',
|
||||||
|
`PRO_COST` DECIMAL(7,2) default 0,
|
||||||
|
`PRO_UNIT_COST` VARCHAR(50) default '',
|
||||||
PRIMARY KEY (`PRO_UID`)
|
PRIMARY KEY (`PRO_UID`)
|
||||||
)ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='Store process Information';
|
)ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='Store process Information';
|
||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
@@ -2700,20 +2702,23 @@ DROP TABLE IF EXISTS `USR_REPORTING`;
|
|||||||
|
|
||||||
CREATE TABLE `USR_REPORTING`
|
CREATE TABLE `USR_REPORTING`
|
||||||
(
|
(
|
||||||
`USR_UID` VARCHAR(32) NOT NULL,
|
`USR_UID` VARCHAR(32) NOT NULL,
|
||||||
`TAS_UID` VARCHAR(32) NOT NULL,
|
`TAS_UID` VARCHAR(32) NOT NULL,
|
||||||
`PRO_UID` VARCHAR(32) NOT NULL,
|
`PRO_UID` VARCHAR(32) NOT NULL,
|
||||||
`MONTH` INTEGER default 0 NOT NULL,
|
`MONTH` INTEGER default 0 NOT NULL,
|
||||||
`YEAR` INTEGER default 0 NOT NULL,
|
`YEAR` INTEGER default 0 NOT NULL,
|
||||||
`TOTAL_TIME_BY_TASK` DECIMAL(7,2) default 0,
|
`TOTAL_QUEUE_TIME_BY_TASK` DECIMAL(7,2) default 0,
|
||||||
`TOTAL_CASES_IN` DECIMAL(7,2) default 0,
|
`TOTAL_TIME_BY_TASK` DECIMAL(7,2) default 0,
|
||||||
`TOTAL_CASES_OUT` DECIMAL(7,2) default 0,
|
`TOTAL_CASES_IN` DECIMAL(7,2) default 0,
|
||||||
`USER_HOUR_COST` DECIMAL(7,2) default 0,
|
`TOTAL_CASES_OUT` DECIMAL(7,2) default 0,
|
||||||
`AVG_TIME` DECIMAL(7,2) default 0,
|
`USER_HOUR_COST` DECIMAL(7,2) default 0,
|
||||||
`SDV_TIME` DECIMAL(7,2) default 0,
|
`AVG_TIME` DECIMAL(7,2) default 0,
|
||||||
`CONFIGURED_TASK_TIME` DECIMAL(7,2) default 0,
|
`SDV_TIME` DECIMAL(7,2) default 0,
|
||||||
`TOTAL_CASES_OVERDUE` DECIMAL(7,2) default 0,
|
`CONFIGURED_TASK_TIME` DECIMAL(7,2) default 0,
|
||||||
`TOTAL_CASES_ON_TIME` DECIMAL(7,2) default 0,
|
`TOTAL_CASES_OVERDUE` DECIMAL(7,2) default 0,
|
||||||
|
`TOTAL_CASES_ON_TIME` DECIMAL(7,2) default 0,
|
||||||
|
`PRO_COST` DECIMAL(7,2) default 0,
|
||||||
|
`PRO_UNIT_COST` VARCHAR(50) default '',
|
||||||
PRIMARY KEY (`USR_UID`, `TAS_UID`,`MONTH`,`YEAR`),
|
PRIMARY KEY (`USR_UID`, `TAS_UID`,`MONTH`,`YEAR`),
|
||||||
KEY `indexReporting`(`USR_UID`, `TAS_UID`, `PRO_UID`)
|
KEY `indexReporting`(`USR_UID`, `TAS_UID`, `PRO_UID`)
|
||||||
)ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='Data calculated users by task';
|
)ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='Data calculated users by task';
|
||||||
@@ -2738,6 +2743,8 @@ CREATE TABLE `PRO_REPORTING`
|
|||||||
`TOTAL_CASES_OPEN` DECIMAL(7,2) default 0,
|
`TOTAL_CASES_OPEN` DECIMAL(7,2) default 0,
|
||||||
`TOTAL_CASES_OVERDUE` DECIMAL(7,2) default 0,
|
`TOTAL_CASES_OVERDUE` DECIMAL(7,2) default 0,
|
||||||
`TOTAL_CASES_ON_TIME` DECIMAL(7,2) default 0,
|
`TOTAL_CASES_ON_TIME` DECIMAL(7,2) default 0,
|
||||||
|
`PRO_COST` DECIMAL(7,2) default 0,
|
||||||
|
`PRO_UNIT_COST` VARCHAR(50) default '',
|
||||||
PRIMARY KEY (`PRO_UID`,`MONTH`,`YEAR`)
|
PRIMARY KEY (`PRO_UID`,`MONTH`,`YEAR`)
|
||||||
)ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='Data calculated by process';
|
)ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='Data calculated by process';
|
||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
|
|||||||
93
workflow/engine/js/strategicDashboard/timeSeriesModel.js
Normal file
93
workflow/engine/js/strategicDashboard/timeSeriesModel.js
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
var TimeSeriesModel = function (oauthToken, server, workspace, userId, strings) {
|
||||||
|
this.server = server;
|
||||||
|
this.workspace = workspace;
|
||||||
|
this.baseUrl = "/api/1.0/" + workspace + "/";
|
||||||
|
this.oauthToken = oauthToken;
|
||||||
|
this.helper = new ViewDashboardHelper();
|
||||||
|
this.cache = {};
|
||||||
|
this.forceRemote=false; //if true, the next call will go to the remote server
|
||||||
|
this.userId = userId;
|
||||||
|
this.strings = strings;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
TimeSeriesModel.prototype.label = function(id) {
|
||||||
|
return this.strings[id];
|
||||||
|
};
|
||||||
|
|
||||||
|
TimeSeriesModel.prototype.indicatorList = function(dashboardId,initDate, endDate) {
|
||||||
|
var dummyDate = ''
|
||||||
|
return this.helper.getJson('dashboard/' + dashboardId + '/indicator?dateIni=' + initDate + '&dateFin=' + endDate, this.baseUrl, this.oauthToken);
|
||||||
|
};
|
||||||
|
|
||||||
|
TimeSeriesModel.prototype.periodicityList = function() {
|
||||||
|
var that = this;
|
||||||
|
var json = [{label:that.label('ID_MONTH'), value:that.helper.ReportingPeriodicityEnum.MONTH},
|
||||||
|
{label:that.label('ID_QUARTER'), value:that.helper.ReportingPeriodicityEnum.QUARTER},
|
||||||
|
{label:that.label('ID_SEMESTER'), value:that.helper.ReportingPeriodicityEnum.SEMESTER},
|
||||||
|
{label:that.label('ID_YEAR'), value:that.helper.ReportingPeriodicityEnum.YEAR}
|
||||||
|
];
|
||||||
|
return json;
|
||||||
|
};
|
||||||
|
|
||||||
|
TimeSeriesModel.prototype.monthList = function() {
|
||||||
|
var that = this;
|
||||||
|
var json = [{label:that.label("ID_MONTH_ABB_1"), value:"1"},
|
||||||
|
{label:that.label("ID_MONTH_ABB_2"), value:"2"},
|
||||||
|
{label:that.label("ID_MONTH_ABB_3"), value:"3"},
|
||||||
|
{label:that.label("ID_MONTH_ABB_4"), value:"4"},
|
||||||
|
{label:that.label("ID_MONTH_ABB_5"), value:"5"},
|
||||||
|
{label:that.label("ID_MONTH_ABB_6"), value:"6"},
|
||||||
|
{label:that.label("ID_MONTH_ABB_7"), value:"7"},
|
||||||
|
{label:that.label("ID_MONTH_ABB_8"), value:"8"},
|
||||||
|
{label:that.label("ID_MONTH_ABB_9"), value:"9"},
|
||||||
|
{label:that.label("ID_MONTH_ABB_10"), value:"10"},
|
||||||
|
{label:that.label("ID_MONTH_ABB_11"), value:"11"},
|
||||||
|
{label:that.label("ID_MONTH_ABB_12"), value:"12"}
|
||||||
|
];
|
||||||
|
return json;
|
||||||
|
};
|
||||||
|
|
||||||
|
TimeSeriesModel.prototype.quarterList = function() {
|
||||||
|
var json = [{label:"1", value:"1"},
|
||||||
|
{label:"2", value:"2"},
|
||||||
|
{label:"3", value:"3"},
|
||||||
|
{label:"4", value:"4"}];
|
||||||
|
return json;
|
||||||
|
};
|
||||||
|
|
||||||
|
TimeSeriesModel.prototype.semesterList = function() {
|
||||||
|
var json = [{label:"1", value:"1"}, {label:"2", value:"2"}];
|
||||||
|
return json;
|
||||||
|
};
|
||||||
|
|
||||||
|
TimeSeriesModel.prototype.yearList = function() {
|
||||||
|
var currentYear = this.defaultEndDate().getFullYear();
|
||||||
|
var json = [];
|
||||||
|
|
||||||
|
for (var i = currentYear; i > currentYear - 10; i--) {
|
||||||
|
json.push ({label:i, value : i});
|
||||||
|
}
|
||||||
|
return json;
|
||||||
|
};
|
||||||
|
|
||||||
|
TimeSeriesModel.prototype.defaultInitDate = function() {
|
||||||
|
return new Date(new Date().getFullYear(), 0, 1);
|
||||||
|
};
|
||||||
|
|
||||||
|
TimeSeriesModel.prototype.defaultEndDate = function() {
|
||||||
|
return new Date();
|
||||||
|
};
|
||||||
|
|
||||||
|
TimeSeriesModel.prototype.historicData = function(indicatorId, periodicity, initDate, endDate) {
|
||||||
|
var endPoint = "ReportingIndicators/indicator-historic-data?" +
|
||||||
|
"indicator_uid=" + indicatorId +
|
||||||
|
"&init_date=" + this.helper.date2MysqlString(initDate) +
|
||||||
|
"&end_date=" + this.helper.date2MysqlString(endDate) +
|
||||||
|
"&periodicity=" + periodicity +
|
||||||
|
"&language=en";
|
||||||
|
return this.helper.getJson(endPoint, this.baseUrl, this.oauthToken);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
273
workflow/engine/js/strategicDashboard/timeSeriesPresenter.js
Normal file
273
workflow/engine/js/strategicDashboard/timeSeriesPresenter.js
Normal file
@@ -0,0 +1,273 @@
|
|||||||
|
var TimeSeriesPresenter = function (model) {
|
||||||
|
var that = this;
|
||||||
|
this.helper = new ViewDashboardHelper();
|
||||||
|
this.model = model;
|
||||||
|
};
|
||||||
|
|
||||||
|
TimeSeriesPresenter.prototype.initializePresenter = function (dashboardId) {
|
||||||
|
var that = this;
|
||||||
|
var requestFinished = $.Deferred();
|
||||||
|
$.when (this.fillIndicatorList(dashboardId))
|
||||||
|
.done(function () {
|
||||||
|
that.periodicityState = {selValue: that.model.periodicityList()[0],
|
||||||
|
list: that.model.periodicityList(),
|
||||||
|
label: that.model.label('ID_PERIODICITY') + ": "
|
||||||
|
};
|
||||||
|
|
||||||
|
that.initPeriodState = {selValue:that.model.monthList()[0].value,
|
||||||
|
list:that.model.monthList(),
|
||||||
|
visible:true,
|
||||||
|
label: that.model.label('ID_FROM') + ": "
|
||||||
|
};
|
||||||
|
|
||||||
|
that.initYearState = {selValue : that.model.yearList() [0].value,
|
||||||
|
list : that.model.yearList(),
|
||||||
|
label: that.model.label('ID_YEAR') + ": "
|
||||||
|
};
|
||||||
|
|
||||||
|
that.endPeriodState = {selValue : that.model.defaultEndDate().getMonth() + 1,
|
||||||
|
list : that.model.monthList(),
|
||||||
|
visible:true,
|
||||||
|
label: that.model.label('ID_TO') + ": "
|
||||||
|
};
|
||||||
|
|
||||||
|
that.endYearState = { selValue : that.model.yearList() [0].value,
|
||||||
|
list : that.model.yearList(),
|
||||||
|
label: that.model.label('ID_YEAR') + ": "
|
||||||
|
};
|
||||||
|
|
||||||
|
that.initDate = that.model.defaultInitDate();
|
||||||
|
that.endDate = that.model.defaultEndDate();
|
||||||
|
|
||||||
|
requestFinished.resolve(true);
|
||||||
|
});
|
||||||
|
return requestFinished.promise();
|
||||||
|
};
|
||||||
|
|
||||||
|
TimeSeriesPresenter.prototype.fillIndicatorList = function (dashboardId) {
|
||||||
|
var requestFinished = $.Deferred();
|
||||||
|
var that = this;
|
||||||
|
var dummyDate = this.helper.date2MysqlString(new Date());
|
||||||
|
that.indicatorList(dashboardId, dummyDate, dummyDate)
|
||||||
|
.done(function(modelData){
|
||||||
|
if (modelData== null || modelData.length == 0) {
|
||||||
|
that.indicatorState = {selValue: null,
|
||||||
|
list: [],
|
||||||
|
label: that.model.label('ID_INDICATOR') + ": "
|
||||||
|
};
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
that.indicatorState = {selValue: modelData[0].value,
|
||||||
|
list: modelData,
|
||||||
|
label: that.model.label('ID_INDICATOR') + ": "
|
||||||
|
};
|
||||||
|
}
|
||||||
|
requestFinished.resolve(that.indicatorState);
|
||||||
|
});
|
||||||
|
return requestFinished.promise();
|
||||||
|
};
|
||||||
|
|
||||||
|
TimeSeriesPresenter.prototype.indicatorList = function (dashboardId) {
|
||||||
|
var that = this;
|
||||||
|
var requestFinished = $.Deferred();
|
||||||
|
var dummyDate = this.helper.date2MysqlString(new Date());
|
||||||
|
this.model.indicatorList(dashboardId, dummyDate, dummyDate).done(function (data) {
|
||||||
|
var newArray = [];
|
||||||
|
$.each(data, function(index, originalObject) {
|
||||||
|
var newObject = {label: originalObject.DAS_IND_TITLE,
|
||||||
|
value: originalObject.DAS_IND_UID
|
||||||
|
}
|
||||||
|
newArray.push(newObject);
|
||||||
|
});
|
||||||
|
|
||||||
|
requestFinished.resolve(newArray);
|
||||||
|
});
|
||||||
|
return requestFinished.promise();
|
||||||
|
};
|
||||||
|
|
||||||
|
TimeSeriesPresenter.prototype.changePeriodicity = function (periodicity) {
|
||||||
|
var that = this;
|
||||||
|
var retval = this.monthList;
|
||||||
|
|
||||||
|
switch (periodicity * 1) {
|
||||||
|
case this.helper.ReportingPeriodicityEnum.MONTH:
|
||||||
|
this.changePeriodicityToMonth(this.model.monthList());
|
||||||
|
break;
|
||||||
|
case this.helper.ReportingPeriodicityEnum.QUARTER:
|
||||||
|
this.changePeriodicityToQuarter(this.model.quarterList());
|
||||||
|
break;
|
||||||
|
case this.helper.ReportingPeriodicityEnum.SEMESTER:
|
||||||
|
this.changePeriodicityToSemester(this.model.semesterList());
|
||||||
|
break;
|
||||||
|
case this.helper.ReportingPeriodicityEnum.YEAR:
|
||||||
|
this.changePeriodicityToYear(this.model.yearList());
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
TimeSeriesPresenter.prototype.changePeriodicityToMonth = function (monthList) {
|
||||||
|
this.initPeriodState.list = monthList;
|
||||||
|
this.endPeriodState.list = monthList;
|
||||||
|
this.initPeriodState.visible = true;
|
||||||
|
this.endPeriodState.visible = true;
|
||||||
|
this.endPeriodState.selValue = this.periodEquivalentFromDate (this.helper.ReportingPeriodicityEnum.MONTH, new Date());
|
||||||
|
}
|
||||||
|
|
||||||
|
TimeSeriesPresenter.prototype.changePeriodicityToQuarter = function (quarterList) {
|
||||||
|
this.initPeriodState.list = quarterList;
|
||||||
|
this.endPeriodState.list = quarterList;
|
||||||
|
this.initPeriodState.visible = true;
|
||||||
|
this.endPeriodState.visible = true;
|
||||||
|
this.endPeriodState.selValue = this.periodEquivalentFromDate (this.helper.ReportingPeriodicityEnum.QUARTER, new Date());
|
||||||
|
}
|
||||||
|
|
||||||
|
TimeSeriesPresenter.prototype.changePeriodicityToSemester = function (semesterList) {
|
||||||
|
this.initPeriodState.list = semesterList;
|
||||||
|
this.endPeriodState.list = semesterList;
|
||||||
|
this.initPeriodState.visible = true;
|
||||||
|
this.endPeriodState.visible = true;
|
||||||
|
this.endPeriodState.selValue = this.periodEquivalentFromDate (this.helper.ReportingPeriodicityEnum.SEMESTER, new Date());
|
||||||
|
}
|
||||||
|
|
||||||
|
TimeSeriesPresenter.prototype.changePeriodicityToYear = function (yearList) {
|
||||||
|
this.initPeriodState.list = [];
|
||||||
|
this.endPeriodState.list = [];
|
||||||
|
this.initPeriodState.visible = false;
|
||||||
|
this.endPeriodState.visible = false;
|
||||||
|
this.endPeriodState.selValue = this.periodEquivalentFromDate (this.helper.ReportingPeriodicityEnum.YEAR, new Date());
|
||||||
|
}
|
||||||
|
|
||||||
|
TimeSeriesPresenter.prototype.historicData = function (indicator, periodicity, initPeriod,
|
||||||
|
initYear, endPeriod, endYear) {
|
||||||
|
var that = this;
|
||||||
|
var requestFinished = $.Deferred();
|
||||||
|
var initDate = this.periodInitDate(periodicity, initPeriod, initYear);
|
||||||
|
var endDate = this.periodEndDate(periodicity, endPeriod, endYear);
|
||||||
|
this.model.historicData(indicator, periodicity, initDate, endDate).done(function (data) {
|
||||||
|
var graphData = [];
|
||||||
|
$.each(data, function(index, originalObject) {
|
||||||
|
var newObject = {datalabel: that.periodColumnName(periodicity, originalObject) + '/' + originalObject['YEAR'],
|
||||||
|
value: originalObject.VALUE
|
||||||
|
}
|
||||||
|
graphData.push(newObject);
|
||||||
|
});
|
||||||
|
|
||||||
|
requestFinished.resolve(graphData);
|
||||||
|
});
|
||||||
|
return requestFinished.promise();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
TimeSeriesPresenter.prototype.periodColumnName = function (periodicity, object) {
|
||||||
|
var retval = "";
|
||||||
|
switch (periodicity*1) {
|
||||||
|
case this.helper.ReportingPeriodicityEnum.MONTH:
|
||||||
|
retval = object.MONTH;
|
||||||
|
break;
|
||||||
|
case this.helper.ReportingPeriodicityEnum.QUARTER:
|
||||||
|
retval = object.QUARTER;
|
||||||
|
break;
|
||||||
|
case this.helper.ReportingPeriodicityEnum.SEMESTER:
|
||||||
|
retval = object.SEMESTER;
|
||||||
|
break;
|
||||||
|
case this.helper.ReportingPeriodicityEnum.YEAR:
|
||||||
|
retval = object.YEAR;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (retval == "") {
|
||||||
|
throw new Error("The periodicity " + periodicity + " is not supported.");
|
||||||
|
}
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
|
||||||
|
TimeSeriesPresenter.prototype.periodEquivalentFromDate = function (periodicity, date) {
|
||||||
|
var retval = null;
|
||||||
|
var year = date.getFullYear();
|
||||||
|
|
||||||
|
switch (periodicity * 1) {
|
||||||
|
case this.helper.ReportingPeriodicityEnum.MONTH:
|
||||||
|
for (var i = 1; i < 12; i++) {
|
||||||
|
var periodInitDate = this.periodInitDate (periodicity, i, year);
|
||||||
|
var periodEndDate = this.periodEndDate (periodicity, i, year);
|
||||||
|
if (periodInitDate <= date && periodEndDate >= date) {
|
||||||
|
retval = i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case this.helper.ReportingPeriodicityEnum.QUARTER:
|
||||||
|
for (var i = 1; i < 4; i++) {
|
||||||
|
var periodInitDate = this.periodInitDate (periodicity, i, year);
|
||||||
|
var periodEndDate = this.periodEndDate (periodicity, i, year);
|
||||||
|
if (periodInitDate <= date && periodEndDate >= date) {
|
||||||
|
retval = i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case this.helper.ReportingPeriodicityEnum.SEMESTER:
|
||||||
|
for (var i = 1; i < 2; i++) {
|
||||||
|
var periodInitDate = this.periodInitDate (periodicity, i, year);
|
||||||
|
var periodEndDate = this.periodEndDate (periodicity, i, year);
|
||||||
|
if (periodInitDate <= date && periodEndDate >= date) {
|
||||||
|
retval = i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case this.helper.ReportingPeriodicityEnum.YEAR:
|
||||||
|
retval = year
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (retval == null) {
|
||||||
|
throw new Error("The periodicity " + periodicity + " is not supported.");
|
||||||
|
}
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
|
||||||
|
TimeSeriesPresenter.prototype.periodInitDate = function (periodicity, period, year) {
|
||||||
|
var retval = null;
|
||||||
|
switch (periodicity * 1) {
|
||||||
|
case this.helper.ReportingPeriodicityEnum.MONTH:
|
||||||
|
retval = new Date(year, period - 1, 1);
|
||||||
|
break;
|
||||||
|
case this.helper.ReportingPeriodicityEnum.QUARTER:
|
||||||
|
retval = new Date(year, 3 * (period-1), 1);
|
||||||
|
break;
|
||||||
|
case this.helper.ReportingPeriodicityEnum.SEMESTER:
|
||||||
|
retval = new Date(year, 6 * (period-1), 1);
|
||||||
|
break;
|
||||||
|
case this.helper.ReportingPeriodicityEnum.YEAR:
|
||||||
|
retval = new Date(year, 0, 1);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (retval == null) {
|
||||||
|
throw new Error("The periodicity " + periodicity + " is not supported.");
|
||||||
|
}
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
|
||||||
|
TimeSeriesPresenter.prototype.periodEndDate = function (periodicity, period, year) {
|
||||||
|
var retval = null;
|
||||||
|
switch (periodicity * 1) {
|
||||||
|
case this.helper.ReportingPeriodicityEnum.MONTH:
|
||||||
|
retval = new Date(year, period, 0);
|
||||||
|
break;
|
||||||
|
case this.helper.ReportingPeriodicityEnum.QUARTER:
|
||||||
|
retval = new Date(year, 3 * (period), 0);
|
||||||
|
break;
|
||||||
|
case this.helper.ReportingPeriodicityEnum.SEMESTER:
|
||||||
|
retval = new Date(year, 6 * (period), 0);
|
||||||
|
break;
|
||||||
|
case this.helper.ReportingPeriodicityEnum.YEAR:
|
||||||
|
retval = new Date(year, 11, 31);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (retval == null) {
|
||||||
|
throw new Error("The periodicity " + periodicity + " is not supported.");
|
||||||
|
}
|
||||||
|
return retval;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
102
workflow/engine/js/strategicDashboard/timeSeriesView.js
Normal file
102
workflow/engine/js/strategicDashboard/timeSeriesView.js
Normal file
@@ -0,0 +1,102 @@
|
|||||||
|
|
||||||
|
helper = new ViewDashboardHelper();
|
||||||
|
var ws = urlProxy.split('/');
|
||||||
|
tsModel = new TimeSeriesModel(token, urlProxy, ws[3], pageUserId, G_STRING);
|
||||||
|
tsPresenter = new TimeSeriesPresenter(tsModel);
|
||||||
|
|
||||||
|
$(document).ready(function() {
|
||||||
|
$('#indicatorsView').show();
|
||||||
|
$('#compareDiv').hide();
|
||||||
|
|
||||||
|
$('#periodicityList').change(function(){
|
||||||
|
var id = $(this).val();
|
||||||
|
tsPresenter.changePeriodicity(id);
|
||||||
|
bindTimeSeriesLists(tsPresenter, ["indicatorList", "periodicityList"]);
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#compareButton').click(function(){
|
||||||
|
$('#comparisonBreadcrumb').find('li').remove()
|
||||||
|
$('#comparisonBreadcrumb')
|
||||||
|
.append ('<li><a class="bread-back-selector2" href="#"><i class="fa fa-chevron-left fa-fw"></i>Return to Indicator View</a>');
|
||||||
|
|
||||||
|
tsPresenter.historicData(
|
||||||
|
$('#indicatorList').val(),
|
||||||
|
$('#periodicityList').val(),
|
||||||
|
$('#initPeriodList').val(),
|
||||||
|
$('#initYearList').val(),
|
||||||
|
$('#endPeriodList').val(),
|
||||||
|
$('#endYearList').val()
|
||||||
|
).done(function(data) {
|
||||||
|
var graphParams1 = {
|
||||||
|
canvas : {
|
||||||
|
containerId:'compareGraph',
|
||||||
|
width:300,
|
||||||
|
height:300,
|
||||||
|
stretch:true,
|
||||||
|
noDataText: G_STRING.ID_DISPLAY_EMPTY
|
||||||
|
},
|
||||||
|
graph: {
|
||||||
|
allowTransition: false,
|
||||||
|
allowDrillDown: false,
|
||||||
|
showTip: true,
|
||||||
|
allowZoom: false,
|
||||||
|
useShadows: false,
|
||||||
|
gridLinesX: true,
|
||||||
|
gridLinesY: true,
|
||||||
|
area: {visible: false, css:"area"},
|
||||||
|
axisX:{ showAxis: true, label: "Period" },
|
||||||
|
axisY:{ showAxis: true, label: "Efficiency" },
|
||||||
|
showErrorBars: false
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
$('#indicatorsView').hide();
|
||||||
|
$('#compareDiv').show();
|
||||||
|
var graph1 = new LineChart(data, graphParams1, null, null);
|
||||||
|
graph1.drawChart();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$('body').on('click','.bread-back-selector2', function() {
|
||||||
|
$('#indicatorsView').show();
|
||||||
|
$('#compareDiv').hide();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
var bindTimeSeriesLists = function (presenter, elementsToConserve) {
|
||||||
|
var conserveStates =[];
|
||||||
|
|
||||||
|
if (elementsToConserve === null || elementsToConserve === undefined) {
|
||||||
|
elementsToConserve =[];
|
||||||
|
}
|
||||||
|
|
||||||
|
$.each (elementsToConserve, function (i, elem){
|
||||||
|
conserveStates.push({id:elem, selValue: $('#' + elem).val()});
|
||||||
|
});
|
||||||
|
helper.fillSelectWithOptions ($('#indicatorList'), presenter.indicatorState.list, presenter.indicatorState.selValue);
|
||||||
|
helper.fillSelectWithOptions ($('#periodicityList'), presenter.periodicityState.list, presenter.periodicityState.selValue);
|
||||||
|
helper.fillSelectWithOptions ($('#initPeriodList'), presenter.initPeriodState.list, presenter.initPeriodState.selValue);
|
||||||
|
helper.fillSelectWithOptions ($('#initYearList'), presenter.initYearState.list, presenter.initYearState.selValue);
|
||||||
|
helper.fillSelectWithOptions ($('#endPeriodList'), presenter.endPeriodState.list, presenter.endPeriodState.selValue);
|
||||||
|
helper.fillSelectWithOptions ($('#endYearList'), presenter.endYearState.list, presenter.endYearState.selValue);
|
||||||
|
|
||||||
|
$('#indicatorLabel').text(presenter.indicatorState.label);
|
||||||
|
$('#periodicityLabel').text(presenter.periodicityState.label);
|
||||||
|
$('#initPeriodLabel').text(presenter.initPeriodState.label);
|
||||||
|
$('#endPeriodLabel').text(presenter.endPeriodState.label);
|
||||||
|
|
||||||
|
|
||||||
|
$.each (conserveStates, function (i, item){
|
||||||
|
$('#' + item.id).val(item.selValue);
|
||||||
|
});
|
||||||
|
|
||||||
|
helper.setVisibility ($('#initPeriodList'), presenter.initPeriodState.visible);
|
||||||
|
helper.setVisibility ($('#endPeriodList'), presenter.endPeriodState.visible);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,9 +1,24 @@
|
|||||||
|
|
||||||
|
|
||||||
var ViewDashboardHelper = function () {
|
var ViewDashboardHelper = function () {
|
||||||
|
this.cache = [];
|
||||||
|
this.forceRemote=false; //if true, the next call will go to the remote server
|
||||||
};
|
};
|
||||||
|
|
||||||
ViewDashboardHelper.prototype.userDashboards = function(userId, callBack) {
|
ViewDashboardHelper.prototype.ReportingPeriodicityEnum = {
|
||||||
|
NONE : 0,
|
||||||
|
MONTH : 100,
|
||||||
|
QUARTER : 200,
|
||||||
|
SEMESTER : 300,
|
||||||
|
YEAR : 400
|
||||||
|
}
|
||||||
|
|
||||||
|
ViewDashboardHelper.prototype.ReportingIndicatorEnum = {
|
||||||
|
PEI : 1010,
|
||||||
|
EEI : 1030,
|
||||||
|
INBOX_STATUS : 1050
|
||||||
|
}
|
||||||
|
|
||||||
|
ViewDashboardHelper.prototype.date2MysqlString = function (val){
|
||||||
|
return val.getFullYear() + '-' + (val.getMonth() + 1) + '-' + val.getDay() ;
|
||||||
};
|
};
|
||||||
|
|
||||||
ViewDashboardHelper.prototype.stringIfNull = function (val){
|
ViewDashboardHelper.prototype.stringIfNull = function (val){
|
||||||
@@ -44,6 +59,19 @@ ViewDashboardHelper.prototype.assert = function (condition, message) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ViewDashboardHelper.prototype.fillSelectWithOptions = function ($select, options, selectedValue) {
|
||||||
|
$select.empty(); // remove old options
|
||||||
|
$.each(options, function(index, option) {
|
||||||
|
$select.append($("<option></option>")
|
||||||
|
.attr("value", option.value).text(option.label));
|
||||||
|
});
|
||||||
|
$select.val(selectedValue);
|
||||||
|
}
|
||||||
|
|
||||||
|
ViewDashboardHelper.prototype.setVisibility = function ($element, isVisible) {
|
||||||
|
$element.css('visibility', (isVisible ? 'visible' : 'hidden'));
|
||||||
|
}
|
||||||
|
|
||||||
ViewDashboardHelper.prototype.truncateString = function (string, len) {
|
ViewDashboardHelper.prototype.truncateString = function (string, len) {
|
||||||
this.assert(len != null && len > 0, "Var len not valid. String must by truncated to a positive non zero length.");
|
this.assert(len != null && len > 0, "Var len not valid. String must by truncated to a positive non zero length.");
|
||||||
this.assert(string != null, "var string can't be null.");
|
this.assert(string != null, "var string can't be null.");
|
||||||
@@ -201,3 +229,96 @@ ViewDashboardHelper.prototype.merge = function (objFrom, objTo, propMap) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
ViewDashboardHelper.prototype.getJson = function (endPoint, baseUrl, oauthToken) {
|
||||||
|
var that = this;
|
||||||
|
var callUrl = baseUrl + endPoint
|
||||||
|
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 ' + oauthToken);
|
||||||
|
//xhr.setRequestHeader('Access-Control-Allow-Origin', '*');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ViewDashboardHelper.prototype.postJson = function (endPoint, data, baseUrl, oauthToken) {
|
||||||
|
var that = this;
|
||||||
|
return $.ajax({
|
||||||
|
url : baseUrl + endPoint,
|
||||||
|
type : 'POST',
|
||||||
|
datatype : 'json',
|
||||||
|
contentType: "application/json; charset=utf-8",
|
||||||
|
data: JSON.stringify(data),
|
||||||
|
error: function(jqXHR, textStatus, errorThrown) {
|
||||||
|
throw new Error(errorThrown);
|
||||||
|
},
|
||||||
|
beforeSend: function (xhr) {
|
||||||
|
xhr.setRequestHeader('Authorization', 'Bearer ' + oauthToken);
|
||||||
|
xhr.setRequestHeader('Access-Control-Allow-Origin', '*');
|
||||||
|
}
|
||||||
|
}).fail(function () {
|
||||||
|
throw new Error('Fail server');
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
ViewDashboardHelper.prototype.putJson = function (endPoint, data, baseUrl, oauthToken) {
|
||||||
|
var that = this;
|
||||||
|
return $.ajax({
|
||||||
|
url : baseUrl + endPoint,
|
||||||
|
type : 'PUT',
|
||||||
|
datatype : 'json',
|
||||||
|
contentType: "application/json; charset=utf-8",
|
||||||
|
data: JSON.stringify(data),
|
||||||
|
error: function(jqXHR, textStatus, errorThrown) {
|
||||||
|
throw new Error(errorThrown);
|
||||||
|
},
|
||||||
|
beforeSend: function (xhr) {
|
||||||
|
xhr.setRequestHeader('Authorization', 'Bearer ' + oauthToken);
|
||||||
|
//xhr.setRequestHeader('Access-Control-Allow-Origin', '*');
|
||||||
|
}
|
||||||
|
}).fail(function () {
|
||||||
|
throw new Error('Fail server');
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
ViewDashboardHelper.prototype.getCacheItem = function (endPoint) {
|
||||||
|
var retval = null;
|
||||||
|
$.each(this.cache, function(index, objectItem) {
|
||||||
|
if (objectItem.key == endPoint) {
|
||||||
|
retval = objectItem.value;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
|
||||||
|
ViewDashboardHelper.prototype.putInCache = function (endPoint, data) {
|
||||||
|
var cacheItem = this.getCacheItem(endPoint);
|
||||||
|
if (cacheItem == null) {
|
||||||
|
this.cache.push ({ key: endPoint, value:data });
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
cacheItem.value = data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,16 +5,14 @@ var ViewDashboardModel = function (oauthToken, server, workspace) {
|
|||||||
//this.baseUrl = "http://127.0.0.1:8080/api/1.0/workflow/";
|
//this.baseUrl = "http://127.0.0.1:8080/api/1.0/workflow/";
|
||||||
this.oauthToken = oauthToken;
|
this.oauthToken = oauthToken;
|
||||||
this.helper = new ViewDashboardHelper();
|
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) {
|
ViewDashboardModel.prototype.userDashboards = function(userId) {
|
||||||
return this.getJson('dashboard/ownerData/' + userId);
|
return this.helper.getJson('dashboard/ownerData/' + userId, this.baseUrl, this.oauthToken);
|
||||||
};
|
};
|
||||||
|
|
||||||
ViewDashboardModel.prototype.dashboardIndicators = function(dashboardId, initDate, endDate) {
|
ViewDashboardModel.prototype.dashboardIndicators = function(dashboardId, initDate, endDate) {
|
||||||
return this.getJson('dashboard/' + dashboardId + '/indicator?dateIni=' + initDate + '&dateFin=' + endDate);
|
return this.helper.getJson('dashboard/' + dashboardId + '/indicator?dateIni=' + initDate + '&dateFin=' + endDate, this.baseUrl, this.oauthToken);
|
||||||
};
|
};
|
||||||
|
|
||||||
ViewDashboardModel.prototype.peiData = function(indicatorId, compareDate, measureDate) {
|
ViewDashboardModel.prototype.peiData = function(indicatorId, compareDate, measureDate) {
|
||||||
@@ -23,12 +21,12 @@ ViewDashboardModel.prototype.peiData = function(indicatorId, compareDate, measur
|
|||||||
"&compare_date=" + compareDate +
|
"&compare_date=" + compareDate +
|
||||||
"&measure_date=" + measureDate +
|
"&measure_date=" + measureDate +
|
||||||
"&language=en";
|
"&language=en";
|
||||||
return this.getJson(endPoint);
|
return this.helper.getJson(endPoint, this.baseUrl, this.oauthToken);
|
||||||
}
|
}
|
||||||
|
|
||||||
ViewDashboardModel.prototype.statusData = function() {
|
ViewDashboardModel.prototype.statusData = function() {
|
||||||
var endPoint = "ReportingIndicators/status-indicator";
|
var endPoint = "ReportingIndicators/status-indicator";
|
||||||
return this.getJson(endPoint);
|
return this.helper.getJson(endPoint, this.baseUrl, this.oauthToken);
|
||||||
}
|
}
|
||||||
|
|
||||||
ViewDashboardModel.prototype.peiDetailData = function(process, initDate, endDate) {
|
ViewDashboardModel.prototype.peiDetailData = function(process, initDate, endDate) {
|
||||||
@@ -37,7 +35,7 @@ ViewDashboardModel.prototype.peiDetailData = function(process, initDate, endDate
|
|||||||
"&init_date=" + initDate +
|
"&init_date=" + initDate +
|
||||||
"&end_date=" + endDate +
|
"&end_date=" + endDate +
|
||||||
"&language=en";
|
"&language=en";
|
||||||
return this.getJson(endPoint);
|
return this.helper.getJson(endPoint, this.baseUrl, this.oauthToken);
|
||||||
}
|
}
|
||||||
|
|
||||||
ViewDashboardModel.prototype.ueiData = function(indicatorId, compareDate, measureDate ) {
|
ViewDashboardModel.prototype.ueiData = function(indicatorId, compareDate, measureDate ) {
|
||||||
@@ -46,7 +44,7 @@ ViewDashboardModel.prototype.ueiData = function(indicatorId, compareDate, measur
|
|||||||
"&compare_date=" + compareDate +
|
"&compare_date=" + compareDate +
|
||||||
"&measure_date=" + measureDate +
|
"&measure_date=" + measureDate +
|
||||||
"&language=en";
|
"&language=en";
|
||||||
return this.getJson(endPoint);
|
return this.helper.getJson(endPoint, this.baseUrl, this.oauthToken);
|
||||||
}
|
}
|
||||||
|
|
||||||
ViewDashboardModel.prototype.ueiDetailData = function(groupId, initDate, endDate) {
|
ViewDashboardModel.prototype.ueiDetailData = function(groupId, initDate, endDate) {
|
||||||
@@ -55,7 +53,7 @@ ViewDashboardModel.prototype.ueiDetailData = function(groupId, initDate, endDate
|
|||||||
"&init_date=" + initDate +
|
"&init_date=" + initDate +
|
||||||
"&end_date=" + endDate +
|
"&end_date=" + endDate +
|
||||||
"&language=en";
|
"&language=en";
|
||||||
return this.getJson(endPoint);
|
return this.helper.getJson(endPoint, this.baseUrl, this.oauthToken);
|
||||||
}
|
}
|
||||||
|
|
||||||
ViewDashboardModel.prototype.generalIndicatorData = function(indicatorId, initDate, endDate) {
|
ViewDashboardModel.prototype.generalIndicatorData = function(indicatorId, initDate, endDate) {
|
||||||
@@ -65,11 +63,12 @@ ViewDashboardModel.prototype.generalIndicatorData = function(indicatorId, initDa
|
|||||||
"&init_date=" + initDate +
|
"&init_date=" + initDate +
|
||||||
"&end_date=" + endDate +
|
"&end_date=" + endDate +
|
||||||
"&language=en";
|
"&language=en";
|
||||||
return this.getJson(endPoint);
|
return this.helper.getJson(endPoint, this.baseUrl, this.oauthToken);
|
||||||
}
|
}
|
||||||
|
|
||||||
ViewDashboardModel.prototype.getPositionIndicator = function(callBack) {
|
ViewDashboardModel.prototype.getPositionIndicator = function(callBack) {
|
||||||
this.getJson('dashboard/config').done(function (r) {
|
var that = this;
|
||||||
|
this.helper.getJson('dashboard/config', that.baseUrl, that.oauthToken).done(function (r) {
|
||||||
var graphData = [];
|
var graphData = [];
|
||||||
$.each(r, function(index, originalObject) {
|
$.each(r, function(index, originalObject) {
|
||||||
var map = {
|
var map = {
|
||||||
@@ -91,103 +90,11 @@ ViewDashboardModel.prototype.setPositionIndicator = function(data) {
|
|||||||
this.getPositionIndicator(
|
this.getPositionIndicator(
|
||||||
function(response){
|
function(response){
|
||||||
if (response.length != 0) {
|
if (response.length != 0) {
|
||||||
that.putJson('dashboard/config', data);
|
that.helper.putJson('dashboard/config', data, that.baseUrl, that.oauthToken);
|
||||||
} else {
|
} else {
|
||||||
that.postJson('dashboard/config', data);
|
that.helper.postJson('dashboard/config', data, that.baseUrl, that.oauthToken);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
ViewDashboardModel.prototype.getJson = function (endPoint) {
|
|
||||||
var that = this;
|
|
||||||
var callUrl = this.baseUrl + endPoint
|
|
||||||
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) {
|
|
||||||
var that = this;
|
|
||||||
return $.ajax({
|
|
||||||
url : this.baseUrl + endPoint,
|
|
||||||
type : 'POST',
|
|
||||||
datatype : 'json',
|
|
||||||
contentType: "application/json; charset=utf-8",
|
|
||||||
data: JSON.stringify(data),
|
|
||||||
error: function(jqXHR, textStatus, errorThrown) {
|
|
||||||
throw new Error(errorThrown);
|
|
||||||
},
|
|
||||||
beforeSend: function (xhr) {
|
|
||||||
xhr.setRequestHeader('Authorization', 'Bearer ' + that.oauthToken);
|
|
||||||
xhr.setRequestHeader('Access-Control-Allow-Origin', '*');
|
|
||||||
}
|
|
||||||
}).fail(function () {
|
|
||||||
throw new Error('Fail server');
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
ViewDashboardModel.prototype.putJson = function (endPoint, data) {
|
|
||||||
var that = this;
|
|
||||||
return $.ajax({
|
|
||||||
url : this.baseUrl + endPoint,
|
|
||||||
type : 'PUT',
|
|
||||||
datatype : 'json',
|
|
||||||
contentType: "application/json; charset=utf-8",
|
|
||||||
data: JSON.stringify(data),
|
|
||||||
error: function(jqXHR, textStatus, errorThrown) {
|
|
||||||
throw new Error(errorThrown);
|
|
||||||
},
|
|
||||||
beforeSend: function (xhr) {
|
|
||||||
xhr.setRequestHeader('Authorization', 'Bearer ' + that.oauthToken);
|
|
||||||
//xhr.setRequestHeader('Access-Control-Allow-Origin', '*');
|
|
||||||
}
|
|
||||||
}).fail(function () {
|
|
||||||
throw new Error('Fail server');
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -27,18 +27,18 @@ WidgetBuilder.prototype.buildSpecialIndicatorButton = function (indicator) {
|
|||||||
|
|
||||||
if(indicator.comparative < 0){
|
if(indicator.comparative < 0){
|
||||||
$retval.find(".ind-container-selector").removeClass("panel-green").addClass("panel-red");
|
$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){
|
if(indicator.comparative > 0){
|
||||||
$retval.find(".ind-container-selector").removeClass("panel-red").addClass("panel-green");
|
$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){
|
if(indicator.comparative == 0){
|
||||||
$retval.find(".ind-symbol-selector").removeClass("fa-chevron-up");
|
$retval.find(".ind-symbol-selector").removeClass("fa-arrow-up");
|
||||||
$retval.find(".ind-symbol-selector").removeClass("fa-chevron-down");
|
$retval.find(".ind-symbol-selector").removeClass("fa-arrow-down");
|
||||||
$retval.find(".ind-symbol-selector").addClass("fa-circle-o");
|
$retval.find(".ind-symbol-selector").addClass("fa-arrows-h");
|
||||||
$retval.find(".ind-container-selector").removeClass("panel-red").addClass("panel-green");
|
$retval.find(".ind-container-selector").removeClass("panel-red").addClass("panel-green");
|
||||||
}
|
}
|
||||||
return $retval;
|
return $retval;
|
||||||
@@ -249,13 +249,13 @@ $(document).ready(function() {
|
|||||||
|
|
||||||
$('#sortListButton').click(function() {
|
$('#sortListButton').click(function() {
|
||||||
var btn = $(this);
|
var btn = $(this);
|
||||||
if (btn.hasClass('fa-chevron-up')) {
|
if (btn.hasClass('fa-arrow-up')) {
|
||||||
btn.removeClass('fa-chevron-up');
|
btn.removeClass('fa-arrow-up');
|
||||||
btn.addClass('fa-chevron-down');
|
btn.addClass('fa-arrow-down');
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
btn.removeClass('fa-chevron-down');
|
btn.removeClass('fa-arrow-down');
|
||||||
btn.addClass('fa-chevron-up');
|
btn.addClass('fa-arrow-up');
|
||||||
}
|
}
|
||||||
|
|
||||||
window.currentDetailFunction (presenter.orderDataList (
|
window.currentDetailFunction (presenter.orderDataList (
|
||||||
@@ -352,13 +352,13 @@ $(document).ready(function() {
|
|||||||
|
|
||||||
|
|
||||||
/*-------------------------------clicks----------------------------*/
|
/*-------------------------------clicks----------------------------*/
|
||||||
$('body').on('click','.btn-compare', function() {
|
/*$('body').on('click','.btn-compare', function() {
|
||||||
presenter.getDashboardIndicators(window.currentDashboardId, defaultInitDate(), defaultEndDate())
|
presenter.getDashboardIndicators(window.currentDashboardId, defaultInitDate(), defaultEndDate())
|
||||||
.done(function(indicatorsVM) {
|
.done(function(indicatorsVM) {
|
||||||
fillIndicatorWidgets(indicatorsVM);
|
fillIndicatorWidgets(indicatorsVM);
|
||||||
loadIndicator(getFavoriteIndicator().id, defaultInitDate(), defaultEndDate());
|
loadIndicator(getFavoriteIndicator().id, defaultInitDate(), defaultEndDate());
|
||||||
});
|
});
|
||||||
});
|
});*/
|
||||||
|
|
||||||
$('#dashboardsList').on('click','.das-title-selector', function() {
|
$('#dashboardsList').on('click','.das-title-selector', function() {
|
||||||
var dashboardId = $(this).parent().data('dashboard-id');
|
var dashboardId = $(this).parent().data('dashboard-id');
|
||||||
@@ -376,6 +376,18 @@ $(document).ready(function() {
|
|||||||
loadIndicator(indicatorId, defaultInitDate(), defaultEndDate());
|
loadIndicator(indicatorId, defaultInitDate(), defaultEndDate());
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('#indicatorsGridStack').on('click','.status-indicator-low', function() {
|
||||||
|
locationCases('OVERDUE');
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#indicatorsGridStack').on('click','.status-indicator-medium', function() {
|
||||||
|
locationCases('AT_RISK');
|
||||||
|
});
|
||||||
|
|
||||||
|
$('#indicatorsGridStack').on('click','.status-indicator-high', function() {
|
||||||
|
locationCases('ON_TIME');
|
||||||
|
});
|
||||||
|
|
||||||
$('body').on('click','.bread-back-selector', function() {
|
$('body').on('click','.bread-back-selector', function() {
|
||||||
var indicatorId = window.currentIndicator.id;
|
var indicatorId = window.currentIndicator.id;
|
||||||
loadIndicator(indicatorId, defaultInitDate(), defaultEndDate());
|
loadIndicator(indicatorId, defaultInitDate(), defaultEndDate());
|
||||||
@@ -396,7 +408,10 @@ $(document).ready(function() {
|
|||||||
fillSpecialIndicatorSecondView(viewModel);
|
fillSpecialIndicatorSecondView(viewModel);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
initialDraw();
|
initialDraw();
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
var hideScrollIfAllDivsAreVisible = function(){
|
var hideScrollIfAllDivsAreVisible = function(){
|
||||||
@@ -433,7 +448,7 @@ var hideTitleAndSortDiv = function(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
var selectedOrderOfDetailList = function () {
|
var selectedOrderOfDetailList = function () {
|
||||||
return ($('#sortListButton').hasClass('fa-chevron-up') ? "up" : "down");
|
return ($('#sortListButton').hasClass('fa-arrow-up') ? "up" : "down");
|
||||||
}
|
}
|
||||||
|
|
||||||
var selectDefaultMonthAndYear = function () {
|
var selectDefaultMonthAndYear = function () {
|
||||||
@@ -442,8 +457,8 @@ var selectDefaultMonthAndYear = function () {
|
|||||||
compareDate.setMonth(compareDate.getMonth() - 1);
|
compareDate.setMonth(compareDate.getMonth() - 1);
|
||||||
var compareMonth = compareDate.getMonth() + 1;
|
var compareMonth = compareDate.getMonth() + 1;
|
||||||
var compareYear = compareDate.getFullYear();
|
var compareYear = compareDate.getFullYear();
|
||||||
$('#month').val(compareMonth);
|
$('#endPeriodList').val(compareMonth);
|
||||||
$('#year').val(compareYear);
|
$('#endYearList').val(compareYear);
|
||||||
}
|
}
|
||||||
|
|
||||||
var setActiveDashboard = function () {
|
var setActiveDashboard = function () {
|
||||||
@@ -461,13 +476,20 @@ var initialDraw = function () {
|
|||||||
.then(function(dashboardsVM) {
|
.then(function(dashboardsVM) {
|
||||||
fillDashboardsList(dashboardsVM);
|
fillDashboardsList(dashboardsVM);
|
||||||
if (window.currentDashboardId == null) {return;}
|
if (window.currentDashboardId == null) {return;}
|
||||||
/**** window initialization with favorite dashboard*****/
|
|
||||||
presenter.getDashboardIndicators(window.currentDashboardId, defaultInitDate(), defaultEndDate())
|
console.log(tsPresenter);
|
||||||
.done(function(indicatorsVM) {
|
console.log(window.currentDashboardId);
|
||||||
fillIndicatorWidgets(indicatorsVM);
|
tsPresenter.initializePresenter(window.currentDashboardId)
|
||||||
loadIndicator(getFavoriteIndicator().id, defaultInitDate(), defaultEndDate());
|
.done(function (data){
|
||||||
setActiveDashboard();
|
bindTimeSeriesLists(tsPresenter);
|
||||||
});
|
/**** window initialization with favorite dashboard*****/
|
||||||
|
presenter.getDashboardIndicators(window.currentDashboardId, defaultInitDate(), defaultEndDate())
|
||||||
|
.done(function(indicatorsVM) {
|
||||||
|
fillIndicatorWidgets(indicatorsVM);
|
||||||
|
loadIndicator(getFavoriteIndicator().id, defaultInitDate(), defaultEndDate());
|
||||||
|
setActiveDashboard();
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -483,7 +505,7 @@ var loadIndicator = function (indicatorId, initDate, endDate) {
|
|||||||
fillSpecialIndicatorFirstView(viewModel);
|
fillSpecialIndicatorFirstView(viewModel);
|
||||||
break;
|
break;
|
||||||
case "1050":
|
case "1050":
|
||||||
fillStatusIndicatorFirstView(viewModel);
|
//fillStatusIndicatorFirstView(viewModel);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
fillGeneralIndicatorFirstView(viewModel);
|
fillGeneralIndicatorFirstView(viewModel);
|
||||||
@@ -491,8 +513,12 @@ var loadIndicator = function (indicatorId, initDate, endDate) {
|
|||||||
}
|
}
|
||||||
hideScrollIfAllDivsAreVisible();
|
hideScrollIfAllDivsAreVisible();
|
||||||
hideTitleAndSortDiv();
|
hideTitleAndSortDiv();
|
||||||
|
$('[data-toggle="tooltip"]').tooltip({
|
||||||
|
animated: 'fade',
|
||||||
|
placement: 'bottom'
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
var setIndicatorActiveMarker = function () {
|
var setIndicatorActiveMarker = function () {
|
||||||
$('.panel-footer').each (function () {
|
$('.panel-footer').each (function () {
|
||||||
@@ -522,15 +548,17 @@ var defaultInitDate = function() {
|
|||||||
var date = new Date();
|
var date = new Date();
|
||||||
var dateMonth = date.getMonth();
|
var dateMonth = date.getMonth();
|
||||||
var dateYear = date.getFullYear();
|
var dateYear = date.getFullYear();
|
||||||
var initDate = $('#year').val() + '-' + $('#month').val() + '-' + '01';
|
var initDate = $('#initYearList').val() + '-' + $('#initPeriodList').val() + '-' + '01';
|
||||||
return initDate;
|
return initDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
var defaultEndDate = function () {
|
var defaultEndDate = function () {
|
||||||
|
//TODO use the timeSeries function that finds the last day in the period
|
||||||
var date = new Date();
|
var date = new Date();
|
||||||
var dateMonth = date.getMonth();
|
var dateMonth = date.getMonth();
|
||||||
var dateYear = date.getFullYear();
|
var dateYear = date.getFullYear();
|
||||||
return dateYear + "-" + (dateMonth + 1) + "-30";
|
var initDate = $('#endYearList').val() + '-' + $('#endPeriodList').val() + '-' + '30';
|
||||||
|
return initDate;
|
||||||
}
|
}
|
||||||
|
|
||||||
var fillDashboardsList = function (presenterData) {
|
var fillDashboardsList = function (presenterData) {
|
||||||
@@ -552,7 +580,6 @@ var fillDashboardsList = function (presenterData) {
|
|||||||
.addClass('selected');
|
.addClass('selected');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
var fillIndicatorWidgets = function (presenterData) {
|
var fillIndicatorWidgets = function (presenterData) {
|
||||||
@@ -990,6 +1017,30 @@ var animateProgress = function (indicatorItem, widget){
|
|||||||
fpAnimationFrame(animacion);
|
fpAnimationFrame(animacion);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var createCookie = function (name, value, time) {
|
||||||
|
if (time) {
|
||||||
|
var date = new Date();
|
||||||
|
date.setTime(date.getTime()+(time*24*60*60*1000));
|
||||||
|
var expires = "; expires="+date.toUTCString();
|
||||||
|
} else {
|
||||||
|
var expires = "";
|
||||||
|
}
|
||||||
|
document.cookie = name+"="+value+expires+"; path=/sys"+workspace;
|
||||||
|
};
|
||||||
|
|
||||||
|
var locationCases = function (type) {
|
||||||
|
createCookie("dashboardListInbox", type, 1);
|
||||||
|
|
||||||
|
var currentLocation = location.href;
|
||||||
|
var position = currentLocation.lastIndexOf('/', currentLocation.lastIndexOf('/') - 1);
|
||||||
|
currentLocation = currentLocation.substring(0, position+1);
|
||||||
|
currentLocation = currentLocation + 'cases/main';
|
||||||
|
|
||||||
|
parent.location.href = currentLocation;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*var dashboardButtonTemplate = ' <div class="btn-group pull-left"> \
|
/*var dashboardButtonTemplate = ' <div class="btn-group pull-left"> \
|
||||||
<button id="favorite" type="button" class="btn btn-success"><i class="fa fa-star fa-1x"></i></button> \
|
<button id="favorite" type="button" class="btn btn-success"><i class="fa fa-star fa-1x"></i></button> \
|
||||||
<button id="dasB" type="button" class="btn btn-success">'+ G_STRING.ID_MANAGERS_DASHBOARDS +'</button> \
|
<button id="dasB" type="button" class="btn btn-success">'+ G_STRING.ID_MANAGERS_DASHBOARDS +'</button> \
|
||||||
|
|||||||
@@ -4,6 +4,10 @@ unset($_SESSION['APPLICATION']);
|
|||||||
//get the action from GET or POST, default is todo
|
//get the action from GET or POST, default is todo
|
||||||
$action = isset( $_GET['action'] ) ? $_GET['action'] : (isset( $_POST['action'] ) ? $_POST['action'] : 'todo');
|
$action = isset( $_GET['action'] ) ? $_GET['action'] : (isset( $_POST['action'] ) ? $_POST['action'] : 'todo');
|
||||||
|
|
||||||
|
/*----------------------------------********---------------------------------*/
|
||||||
|
$filterAction = isset( $_GET['filterAction'] ) ? $_GET['filterAction'] : (isset( $_POST['filterAction'] ) ? $_POST['filterAction'] : '');
|
||||||
|
/*----------------------------------********---------------------------------*/
|
||||||
|
|
||||||
//fix a previous inconsistency
|
//fix a previous inconsistency
|
||||||
$urlProxy = 'proxyCasesList';
|
$urlProxy = 'proxyCasesList';
|
||||||
if ($action == 'selfservice') {
|
if ($action == 'selfservice') {
|
||||||
@@ -143,7 +147,7 @@ if ($action == "todo" || $action == "draft" || $action == "sent" || $action == "
|
|||||||
$solrConf['solr_instance']
|
$solrConf['solr_instance']
|
||||||
);
|
);
|
||||||
if ($applicationSolrIndex->isSolrEnabled()) {
|
if ($applicationSolrIndex->isSolrEnabled()) {
|
||||||
$solrEnabled = 1;
|
$solrEnabled = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -179,6 +183,28 @@ $oHeadPublisher->assign( 'allUsersValues', $allUsers ); //Sending the listing of
|
|||||||
$oHeadPublisher->assign( 'solrEnabled', $solrEnabled ); //Sending the status of solar
|
$oHeadPublisher->assign( 'solrEnabled', $solrEnabled ); //Sending the status of solar
|
||||||
$oHeadPublisher->assign( 'enableEnterprise', $enableEnterprise ); //sending the page size
|
$oHeadPublisher->assign( 'enableEnterprise', $enableEnterprise ); //sending the page size
|
||||||
|
|
||||||
|
|
||||||
|
/*----------------------------------********---------------------------------*/
|
||||||
|
$licensedFeatures = & PMLicensedFeatures::getSingleton();
|
||||||
|
if ($licensedFeatures->verifyfeature('r19Vm5DK1UrT09MenlLYjZxejlhNUZ1b1NhV0JHWjBsZEJ6dnpJa3dTeWVLVT0=') ) {
|
||||||
|
$filterStatus[] = array('', G::LoadTranslation('ID_ALL_STATUS'));
|
||||||
|
$filterStatus[] = array('ON_TIME', G::LoadTranslation('ID_ON_TIME'));
|
||||||
|
$filterStatus[] = array('AT_RISK', G::LoadTranslation('ID_AT_RISK'));
|
||||||
|
$filterStatus[] = array('OVERDUE', G::LoadTranslation('ID_TASK_OVERDUE'));
|
||||||
|
|
||||||
|
$oHeadPublisher->assign('filterStatus', $filterStatus);
|
||||||
|
|
||||||
|
if (isset($_COOKIE['dashboardListInbox'])) {
|
||||||
|
$oHeadPublisher->assign('valueFilterStatus', $_COOKIE['dashboardListInbox']);
|
||||||
|
if (PHP_VERSION < 5.2) {
|
||||||
|
setcookie("dashboardListInbox", '', time() + (24 * 60 * 60), "/sys" . SYS_SYS, "; HttpOnly");
|
||||||
|
} else {
|
||||||
|
setcookie("dashboardListInbox", '', time() + (24 * 60 * 60), "/sys" . SYS_SYS, null, false, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/*----------------------------------********---------------------------------*/
|
||||||
|
|
||||||
//menu permissions
|
//menu permissions
|
||||||
/*$c = new Criteria('workflow');
|
/*$c = new Criteria('workflow');
|
||||||
$c->clearSelectColumns();
|
$c->clearSelectColumns();
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ try {
|
|||||||
|
|
||||||
$filters['action'] = isset( $_REQUEST["action"] ) ? $_REQUEST["action"] : "";
|
$filters['action'] = isset( $_REQUEST["action"] ) ? $_REQUEST["action"] : "";
|
||||||
$listName = isset( $_REQUEST["list"] ) ? $_REQUEST["list"] : "inbox";
|
$listName = isset( $_REQUEST["list"] ) ? $_REQUEST["list"] : "inbox";
|
||||||
|
$filters['filterStatus'] = isset( $_REQUEST["filterStatus"] ) ? $_REQUEST["filterStatus"] : "";
|
||||||
|
|
||||||
// Select list
|
// Select list
|
||||||
switch ($listName) {
|
switch ($listName) {
|
||||||
@@ -145,16 +146,17 @@ try {
|
|||||||
);
|
);
|
||||||
|
|
||||||
$filtersData = array();
|
$filtersData = array();
|
||||||
$filtersData['start'] = $filters['start'];
|
$filtersData['start'] = $filters['start'];
|
||||||
$filtersData['limit'] = $filters['limit'];
|
$filtersData['limit'] = $filters['limit'];
|
||||||
$filtersData['sort'] = G::toLower($filters['sort']);
|
$filtersData['sort'] = G::toLower($filters['sort']);
|
||||||
$filtersData['dir'] = G::toLower($filters['dir']);
|
$filtersData['dir'] = G::toLower($filters['dir']);
|
||||||
$filtersData['cat_uid'] = $filters['category'];
|
$filtersData['cat_uid'] = $filters['category'];
|
||||||
$filtersData['pro_uid'] = $filters['process'];
|
$filtersData['pro_uid'] = $filters['process'];
|
||||||
$filtersData['search'] = $filters['search'];
|
$filtersData['search'] = $filters['search'];
|
||||||
$filtersData['date_from'] = $filters['dateFrom'];
|
$filtersData['date_from'] = $filters['dateFrom'];
|
||||||
$filtersData['date_to'] = $filters['dateTo'];
|
$filtersData['date_to'] = $filters['dateTo'];
|
||||||
$filtersData["action"] = $filters["action"];
|
$filtersData["action"] = $filters["action"];
|
||||||
|
$filtersData["filterStatus"] = $filters['filterStatus'];
|
||||||
|
|
||||||
$response = array();
|
$response = array();
|
||||||
$response['filters'] = $filtersData;
|
$response['filters'] = $filtersData;
|
||||||
|
|||||||
@@ -18,7 +18,9 @@ INSERT INTO PRO_REPORTING (
|
|||||||
CONFIGURED_PROCESS_COST,
|
CONFIGURED_PROCESS_COST,
|
||||||
TOTAL_CASES_OPEN,
|
TOTAL_CASES_OPEN,
|
||||||
TOTAL_CASES_OVERDUE,
|
TOTAL_CASES_OVERDUE,
|
||||||
TOTAL_CASES_ON_TIME
|
TOTAL_CASES_ON_TIME,
|
||||||
|
PRO_COST,
|
||||||
|
PRO_UNIT_COST
|
||||||
)
|
)
|
||||||
SELECT
|
SELECT
|
||||||
APPLICATION.PRO_UID,
|
APPLICATION.PRO_UID,
|
||||||
@@ -32,13 +34,22 @@ SELECT
|
|||||||
NULL,
|
NULL,
|
||||||
count(if(APPLICATION.APP_FINISH_DATE != null, NULL, 1)) AS TOTAL_CASES_OPEN,
|
count(if(APPLICATION.APP_FINISH_DATE != null, NULL, 1)) AS TOTAL_CASES_OPEN,
|
||||||
count(if(APPLICATION.APP_DELAY_DURATION > 0, 1, NULL)) AS TOTAL_CASES_OVERDUE,
|
count(if(APPLICATION.APP_DELAY_DURATION > 0, 1, NULL)) AS TOTAL_CASES_OVERDUE,
|
||||||
count(if(APPLICATION.APP_DELAY_DURATION <= 0, 1, NULL)) AS TOTAL_CASES_ON_TIME
|
count(if(APPLICATION.APP_DELAY_DURATION <= 0, 1, NULL)) AS TOTAL_CASES_ON_TIME,
|
||||||
|
0,
|
||||||
|
NULL
|
||||||
FROM
|
FROM
|
||||||
APPLICATION FORCE INDEX (PRIMARY)
|
APPLICATION FORCE INDEX (PRIMARY)
|
||||||
WHERE
|
WHERE
|
||||||
APPLICATION.APP_INIT_DATE BETWEEN CAST(@INIT_DATE AS DATETIME) AND CAST(@FINISH_DATE AS DATETIME)
|
APPLICATION.APP_INIT_DATE BETWEEN CAST(@INIT_DATE AS DATETIME) AND CAST(@FINISH_DATE AS DATETIME)
|
||||||
GROUP BY APPLICATION.PRO_UID;
|
GROUP BY APPLICATION.PRO_UID;
|
||||||
|
|
||||||
|
UPDATE USR_REPORTING
|
||||||
|
INNER JOIN
|
||||||
|
PROCESS
|
||||||
|
ON USR_REPORTING.PRO_UID = PROCESS.PRO_UID
|
||||||
|
SET USR_REPORTING.PRO_COST = PROCESS.PRO_COST,
|
||||||
|
USR_REPORTING.PRO_UNIT_COST = PROCESS.PRO_UNIT_COST;
|
||||||
|
|
||||||
#TODO task duration should be calculated with the calendar
|
#TODO task duration should be calculated with the calendar
|
||||||
UPDATE PRO_REPORTING
|
UPDATE PRO_REPORTING
|
||||||
SET PRO_REPORTING.CONFIGURED_PROCESS_TIME = (
|
SET PRO_REPORTING.CONFIGURED_PROCESS_TIME = (
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ INSERT INTO USR_REPORTING (
|
|||||||
PRO_UID,
|
PRO_UID,
|
||||||
MONTH,
|
MONTH,
|
||||||
YEAR,
|
YEAR,
|
||||||
|
TOTAL_QUEUE_TIME_BY_TASK,
|
||||||
TOTAL_TIME_BY_TASK,
|
TOTAL_TIME_BY_TASK,
|
||||||
TOTAL_CASES_IN,
|
TOTAL_CASES_IN,
|
||||||
TOTAL_CASES_OUT,
|
TOTAL_CASES_OUT,
|
||||||
@@ -20,7 +21,9 @@ INSERT INTO USR_REPORTING (
|
|||||||
SDV_TIME,
|
SDV_TIME,
|
||||||
CONFIGURED_TASK_TIME,
|
CONFIGURED_TASK_TIME,
|
||||||
TOTAL_CASES_OVERDUE,
|
TOTAL_CASES_OVERDUE,
|
||||||
TOTAL_CASES_ON_TIME
|
TOTAL_CASES_ON_TIME,
|
||||||
|
PRO_COST,
|
||||||
|
PRO_UNIT_COST
|
||||||
)
|
)
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
@@ -29,6 +32,7 @@ SELECT
|
|||||||
ACV.PRO_UID,
|
ACV.PRO_UID,
|
||||||
DATE_FORMAT(ACV.DEL_INIT_DATE, '%m') AS `MONTH`,
|
DATE_FORMAT(ACV.DEL_INIT_DATE, '%m') AS `MONTH`,
|
||||||
DATE_FORMAT(ACV.DEL_INIT_DATE, '%Y') AS `YEAR`,
|
DATE_FORMAT(ACV.DEL_INIT_DATE, '%Y') AS `YEAR`,
|
||||||
|
SUM(ACV.DEL_QUEUE_DURATION*24) AS TOTAL_QUEUE_TIME_BY_TASK,
|
||||||
SUM(ACV.DEL_DURATION*24) AS TOT_TIME_BY_TASK,
|
SUM(ACV.DEL_DURATION*24) AS TOT_TIME_BY_TASK,
|
||||||
COUNT(ACV.DEL_INIT_DATE) AS TOT_CASES_IN,
|
COUNT(ACV.DEL_INIT_DATE) AS TOT_CASES_IN,
|
||||||
COUNT(ACV.DEL_FINISH_DATE) AS TOT_CASES_OUT,
|
COUNT(ACV.DEL_FINISH_DATE) AS TOT_CASES_OUT,
|
||||||
@@ -37,7 +41,9 @@ SELECT
|
|||||||
STD(DEL_DURATION*24) AS `STD_TIME`,
|
STD(DEL_DURATION*24) AS `STD_TIME`,
|
||||||
NULL,
|
NULL,
|
||||||
count(if(ACV.DEL_DELAY_DURATION > 0, 1, NULL)) AS TOTAL_CASES_OVERDUE,
|
count(if(ACV.DEL_DELAY_DURATION > 0, 1, NULL)) AS TOTAL_CASES_OVERDUE,
|
||||||
count(if(ACV.DEL_DELAY_DURATION <= 0, 1, NULL)) AS TOTAL_CASES_ON_TIME
|
count(if(ACV.DEL_DELAY_DURATION <= 0, 1, NULL)) AS TOTAL_CASES_ON_TIME,
|
||||||
|
0,
|
||||||
|
NULL
|
||||||
FROM
|
FROM
|
||||||
APP_CACHE_VIEW AS ACV
|
APP_CACHE_VIEW AS ACV
|
||||||
WHERE
|
WHERE
|
||||||
@@ -56,6 +62,13 @@ USERS
|
|||||||
ON USR_REPORTING.USR_UID = USERS.USR_UID
|
ON USR_REPORTING.USR_UID = USERS.USR_UID
|
||||||
SET USR_REPORTING.USER_HOUR_COST = USERS.USR_COST_BY_HOUR;
|
SET USR_REPORTING.USER_HOUR_COST = USERS.USR_COST_BY_HOUR;
|
||||||
|
|
||||||
|
UPDATE USR_REPORTING
|
||||||
|
INNER JOIN
|
||||||
|
PROCESS
|
||||||
|
ON USR_REPORTING.PRO_UID = PROCESS.PRO_UID
|
||||||
|
SET USR_REPORTING.PRO_COST = PROCESS.PRO_COST,
|
||||||
|
USR_REPORTING.PRO_UNIT_COST = PROCESS.PRO_UNIT_COST;
|
||||||
|
|
||||||
UPDATE USR_REPORTING
|
UPDATE USR_REPORTING
|
||||||
INNER JOIN TASK ON USR_REPORTING.TAS_UID = TASK.TAS_UID
|
INNER JOIN TASK ON USR_REPORTING.TAS_UID = TASK.TAS_UID
|
||||||
SET USR_REPORTING.CONFIGURED_TASK_TIME =
|
SET USR_REPORTING.CONFIGURED_TASK_TIME =
|
||||||
|
|||||||
@@ -5,7 +5,41 @@ use \G;
|
|||||||
|
|
||||||
class ReportingIndicators
|
class ReportingIndicators
|
||||||
{
|
{
|
||||||
// /**et
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the historic data of an indicator
|
||||||
|
*
|
||||||
|
* @param array $indicatorUid indicator from which will be extracted the information
|
||||||
|
* @param DateTime $initDate date from the index will be calculated
|
||||||
|
* @param DateTime $endDate date until the index will be calculated
|
||||||
|
* @param string $language language for the names (en, es, etc.)
|
||||||
|
*
|
||||||
|
* return decimal value
|
||||||
|
*/
|
||||||
|
public function getHistoricData($indicatorUid, $initDate, $endDate, $periodicity, $language)
|
||||||
|
{
|
||||||
|
G::loadClass('indicatorsCalculator');
|
||||||
|
$retval = "";
|
||||||
|
$calculator = new \IndicatorsCalculator();
|
||||||
|
$arr = $calculator->indicatorData($indicatorUid);
|
||||||
|
$indicator = $arr[0];
|
||||||
|
$processesId = $indicator['DAS_UID_PROCESS'];
|
||||||
|
$indicatorType = $indicator['DAS_IND_TYPE'];
|
||||||
|
switch ($indicatorType) {
|
||||||
|
case \ReportingIndicatorTypeEnum::PEI:
|
||||||
|
$retval = $calculator->peiHistoric($processesId, $initDate, $endDate, \ReportingPeriodicityEnum::fromValue($periodicity));
|
||||||
|
break;
|
||||||
|
case \ReportingIndicatorTypeEnum::UEI:
|
||||||
|
$retval = $calculator->ueiHistoric($processesId, $initDate, $endDate, \ReportingPeriodicityEnum::fromValue($periodicity));
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
throw new Exception("Can't retrive historic Data becasuse de indicator type " + $indicator['DAS_IND_TYPE'] + " has no operation associated.");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return $retval;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Lists tasks of a process and it's statistics (efficiency, average times, etc.)
|
* Lists tasks of a process and it's statistics (efficiency, average times, etc.)
|
||||||
@@ -25,7 +59,7 @@ class ReportingIndicators
|
|||||||
$arr = $calculator->indicatorData($indicatorUid);
|
$arr = $calculator->indicatorData($indicatorUid);
|
||||||
$indicator = $arr[0];
|
$indicator = $arr[0];
|
||||||
$processesId = $indicator['DAS_UID_PROCESS'];
|
$processesId = $indicator['DAS_UID_PROCESS'];
|
||||||
$peiValue = current(reset($calculator-> peiHistoric($processesId, $measureDate, $measureDate, \ReportingPeriodicityEnum::NONE)));
|
$peiValue = current(reset($calculator->peiHistoric($processesId, $measureDate, $measureDate, \ReportingPeriodicityEnum::NONE)));
|
||||||
$peiCost = current(reset($calculator->peiCostHistoric($processesId, $measureDate, $measureDate, \ReportingPeriodicityEnum::NONE)));
|
$peiCost = current(reset($calculator->peiCostHistoric($processesId, $measureDate, $measureDate, \ReportingPeriodicityEnum::NONE)));
|
||||||
$peiCompare = current(reset($calculator->peiHistoric($processesId, $compareDate, $compareDate, \ReportingPeriodicityEnum::NONE)));
|
$peiCompare = current(reset($calculator->peiHistoric($processesId, $compareDate, $compareDate, \ReportingPeriodicityEnum::NONE)));
|
||||||
|
|
||||||
|
|||||||
@@ -166,6 +166,10 @@ class Task
|
|||||||
array(
|
array(
|
||||||
"TAS_TRANSFER_FLY" => $arrayDataAux["TAS_TRANSFER_FLY"],
|
"TAS_TRANSFER_FLY" => $arrayDataAux["TAS_TRANSFER_FLY"],
|
||||||
"TAS_DURATION" => $arrayDataAux["TAS_DURATION"],
|
"TAS_DURATION" => $arrayDataAux["TAS_DURATION"],
|
||||||
|
/*----------------------------------********---------------------------------*/
|
||||||
|
"TAS_AVERAGE" => $arrayDataAux["TAS_AVERAGE"],
|
||||||
|
"TAS_SDV" => $arrayDataAux["TAS_SDV"],
|
||||||
|
/*----------------------------------********---------------------------------*/
|
||||||
"TAS_TIMEUNIT" => $arrayDataAux["TAS_TIMEUNIT"],
|
"TAS_TIMEUNIT" => $arrayDataAux["TAS_TIMEUNIT"],
|
||||||
"TAS_TYPE_DAY" => $arrayDataAux["TAS_TYPE_DAY"],
|
"TAS_TYPE_DAY" => $arrayDataAux["TAS_TYPE_DAY"],
|
||||||
"TAS_CALENDAR" => $arrayDataAux["TAS_CALENDAR"]
|
"TAS_CALENDAR" => $arrayDataAux["TAS_CALENDAR"]
|
||||||
|
|||||||
@@ -197,6 +197,31 @@ class ReportingIndicators extends Api
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get historic data of an indicator
|
||||||
|
*
|
||||||
|
* @return array
|
||||||
|
*
|
||||||
|
* @author Dante Loayza
|
||||||
|
* @copyright Colosa - Bolivia
|
||||||
|
*
|
||||||
|
* @url GET /indicator-historic-data
|
||||||
|
*/
|
||||||
|
public function doGetHistoricDataFromIndicator($indicator_uid, $init_date, $end_date, $periodicity, $language) {
|
||||||
|
try {
|
||||||
|
$indicatorsObj = new \ProcessMaker\BusinessModel\ReportingIndicators();
|
||||||
|
$response = $indicatorsObj->getHistoricData
|
||||||
|
($indicator_uid,
|
||||||
|
new \DateTime($init_date),
|
||||||
|
new \DateTime($end_date),
|
||||||
|
$periodicity,
|
||||||
|
$language);
|
||||||
|
return $response;
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -24,6 +24,7 @@
|
|||||||
<script type="text/javascript" src="/js/pmchart/pmCharts.js"></script>
|
<script type="text/javascript" src="/js/pmchart/pmCharts.js"></script>
|
||||||
<script type="text/javascript" >
|
<script type="text/javascript" >
|
||||||
var urlProxy = '{$urlProxy}';
|
var urlProxy = '{$urlProxy}';
|
||||||
|
var workspace = '{$SYS_SYS}';
|
||||||
var pageUserId = '{$usrId}';
|
var pageUserId = '{$usrId}';
|
||||||
var token = '{$credentials.access_token}';
|
var token = '{$credentials.access_token}';
|
||||||
var moneyUnit = '{$unitCost}';
|
var moneyUnit = '{$unitCost}';
|
||||||
@@ -39,7 +40,9 @@
|
|||||||
<script type="text/javascript" src="/jscore/strategicDashboard/viewDashboardPresenter.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/viewDashboardView.js"></script>
|
||||||
|
|
||||||
|
<script type="text/javascript" src="/jscore/strategicDashboard/timeSeriesModel.js"></script>
|
||||||
|
<script type="text/javascript" src="/jscore/strategicDashboard/timeSeriesPresenter.js"></script>
|
||||||
|
<script type="text/javascript" src="/jscore/strategicDashboard/timeSeriesView.js"></script>
|
||||||
|
|
||||||
<script type="text/template" class="specialIndicatorButtonTemplate">
|
<script type="text/template" class="specialIndicatorButtonTemplate">
|
||||||
<div class="col-lg-3 col-md-6 dashPro ind-button-selector"
|
<div class="col-lg-3 col-md-6 dashPro ind-button-selector"
|
||||||
@@ -51,11 +54,11 @@
|
|||||||
<a data-toggle="collapse" href="#efficiencyindex" aria-expanded="false" aria-controls="efficiencyindex">
|
<a data-toggle="collapse" href="#efficiencyindex" aria-expanded="false" aria-controls="efficiencyindex">
|
||||||
<div class="panel-heading" >
|
<div class="panel-heading" >
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-3">
|
<div class="col-xs-3" data-toggle="tooltip" data-original-title={translate label="ID_DASH_HELP_IND_VALUE"}>
|
||||||
<div class="huge ind-value-selector"><%- indicator.value %></div>
|
<div class="huge ind-value-selector"><%- indicator.value %></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-9 text-right"><i class="ind-symbol-selector fa fa-chevron-up fa-3x"></i>
|
<div class="col-xs-9 text-right"><i class="ind-symbol-selector fa fa-arrow-up fa-3x" data-toggle="tooltip" data-original-title={translate label="ID_DASH_HELP_SYMBOL_SELECTOR"}></i>
|
||||||
<div class="small ind-comparative-selector">
|
<div class="small ind-comparative-selector" data-toggle="tooltip" data-original-title={translate label="ID_DASH_HELP_IND_COMPARE"}>
|
||||||
<%- indicator.comparative %> <%- indicator.percentComparative %>
|
<%- indicator.comparative %> <%- indicator.percentComparative %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -74,8 +77,9 @@
|
|||||||
id="indicatorButton-<%- indicator.id %>"
|
id="indicatorButton-<%- indicator.id %>"
|
||||||
data-indicator-id="<%- indicator.id %>"
|
data-indicator-id="<%- indicator.id %>"
|
||||||
data-indicator-type="<%- indicator.type %>"
|
data-indicator-type="<%- indicator.type %>"
|
||||||
data-gs-min-width="3" data-gs-min-height="2" data-gs-max-height="2">
|
data-gs-min-width="3" data-gs-min-height="2" data-gs-max-height="2"
|
||||||
<div class="ind-container-selector panel grid-stack-item-content" style="min-width:200px;">
|
data-toggle="tooltip" data-original-title={translate label="ID_DASH_HELP_INBOX_STATUS"}>
|
||||||
|
<div class="ind-container-selector panel grid-stack-item-content panel-status" style="min-width:200px;">
|
||||||
<a data-toggle="collapse" href="#efficiencyindex" aria-expanded="false" aria-controls="efficiencyindex">
|
<a data-toggle="collapse" href="#efficiencyindex" aria-expanded="false" aria-controls="efficiencyindex">
|
||||||
<div class="panel-heading status-indicator-low"
|
<div class="panel-heading status-indicator-low"
|
||||||
style=" width:<%- indicator.percentageOverdueWidth %>%;
|
style=" width:<%- indicator.percentageOverdueWidth %>%;
|
||||||
@@ -148,17 +152,17 @@
|
|||||||
data-gs-no-resize="true"
|
data-gs-no-resize="true"
|
||||||
style="clear:both;position:relative;height:auto;">
|
style="clear:both;position:relative;height:auto;">
|
||||||
|
|
||||||
<div class="panel-heading bluebg sind-title-selector"">
|
<div class="panel-heading bluebg sind-title-selector">
|
||||||
<ol class="breadcrumb">
|
<ol class="breadcrumb">
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="text-center huge">
|
<div class="text-center huge">
|
||||||
<div class="col-xs-3 vcenter">
|
<div class="col-xs-3 vcenter">
|
||||||
<div class="blue"><%- indicator.efficiencyIndexToShow %></div>
|
<div class="blue" data-toggle="tooltip" data-original-title={translate label="ID_DASH_HELP_IND_EFFICIENCY"}><%- indicator.efficiencyIndexToShow %></div>
|
||||||
<div class="small grey sind-index-selector ellipsis"></div>
|
<div class="small grey sind-index-selector ellipsis"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-3 vcenter" style="margin-right:40px">
|
<div class="col-xs-3 vcenter" style="margin-right:40px" data-toggle="tooltip" data-original-title={translate label="ID_DASH_HELP_IND_COST"}>
|
||||||
<div class="red sind-cost-number-selector">{$unitCost} <%- indicator.inefficiencyCostToShow %></div>
|
<div class="red sind-cost-number-selector">{$unitCost} <%- indicator.inefficiencyCostToShow %></div>
|
||||||
<div class="small grey sind-cost-selector ellipsis"></div>
|
<div class="small grey sind-cost-selector ellipsis"></div>
|
||||||
</div>
|
</div>
|
||||||
@@ -192,11 +196,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="text-center huge">
|
<div class="text-center huge">
|
||||||
<div class="col-xs-12 vcenter-task">
|
<div class="col-xs-12 vcenter-task">
|
||||||
<div class="col-xs-6 ">
|
<div class="col-xs-6 " data-toggle="tooltip" data-original-title={translate label="ID_DASH_HELP_IND_EFFICIENCY"}>
|
||||||
<div class="blue small"><%- detailData.efficiencyIndexToShow%></div>
|
<div class="blue small"><%- detailData.efficiencyIndexToShow%></div>
|
||||||
<div class="smallB grey detail-efficiency-selector ellipsis"></div>
|
<div class="smallB grey detail-efficiency-selector ellipsis"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-6 ">
|
<div class="col-xs-6" data-toggle="tooltip" data-original-title={translate label="ID_DASH_HELP_IND_COST"}>
|
||||||
<div class="small detail-cost-number-selector">{$unitCost} <%- detailData.inefficiencyCostToShow%></div>
|
<div class="small detail-cost-number-selector">{$unitCost} <%- detailData.inefficiencyCostToShow%></div>
|
||||||
<div class="smallB grey detail-cost-selector ellipsis"></div>
|
<div class="smallB grey detail-cost-selector ellipsis"></div>
|
||||||
</div>
|
</div>
|
||||||
@@ -358,51 +362,33 @@
|
|||||||
<div class="col-lg-12">
|
<div class="col-lg-12">
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
|
<div class="span4 pull-left">
|
||||||
<a class="btn btn-primary dashboard-button" data-toggle="collapse" href="#collapseExample" aria-expanded="false" aria-controls="collapseExample">
|
<a class="btn btn-primary dashboard-button" data-toggle="collapse" href="#collapseExample" aria-expanded="false" aria-controls="collapseExample">
|
||||||
<i class="fa fa-bar-chart fa-2x"></i>
|
<i class="fa fa-bar-chart fa-2x"></i>
|
||||||
<i class="fa fa-chevron-down fa-1x"></i>
|
<i class="fa fa-chevron-down fa-1x"></i>
|
||||||
</a>
|
</a>
|
||||||
|
</div>
|
||||||
<h4 id="titleH4" class="header-dashboard"></h4>
|
<h4 id="titleH4" class="header-dashboard"></h4>
|
||||||
<div class="pull-right dashboard-right container-fluid">
|
<div class="pull-right dashboard-right container-fluid">
|
||||||
|
|
||||||
<div id="compareIndicators" class="row pull-left">
|
<div id="compareIndicators" class="row pull-left">
|
||||||
<div class="span4 pull-left">
|
|
||||||
<h5 class="pull-left">{translate label="ID_DASH_COMPARE_MONTH"}:</h5>
|
<div class="span4 pull-left" style="margin:15px; ">
|
||||||
|
<span id="indicatorLabel"></span>
|
||||||
|
<select id="indicatorList"></select>
|
||||||
|
<span id="periodicityLabel" style="margin-left:15px;"></span>
|
||||||
|
<select id="periodicityList" style="width:auto;"></select>
|
||||||
|
<span id="initPeriodLabel" style="margin-left:15px;"></span>
|
||||||
|
<select id="initPeriodList"></select>
|
||||||
|
<select id="initYearList"></select>
|
||||||
|
<span id="endPeriodLabel" style="margin-left:15px;"></span>
|
||||||
|
<select id="endPeriodList"></select>
|
||||||
|
<select id="endYearList"></select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="span4 pull-left">
|
<div class="span4 pull-left">
|
||||||
<select id="year" class="form-control pull-right ">
|
<button type="button" id="compareButton" class="btn btn-compare btn-success pull-right btn-date">{translate label="ID_DASH_COMPARE"}</button>
|
||||||
{literal}
|
|
||||||
<script>
|
|
||||||
now = new Date();
|
|
||||||
anio = now.getFullYear();
|
|
||||||
for(a=anio;a>=anio-10;a--){
|
|
||||||
document.write('<option value="'+a+'">'+a+'</option>');
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
{/literal}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<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>
|
|
||||||
<option value="4">{translate label="ID_MONTH_ABB_4"}</option>
|
|
||||||
<option value="5">{translate label="ID_MONTH_ABB_5"}</option>
|
|
||||||
<option value="6">{translate label="ID_MONTH_ABB_6"}</option>
|
|
||||||
<option value="7">{translate label="ID_MONTH_ABB_7"}</option>
|
|
||||||
<option value="8">{translate label="ID_MONTH_ABB_8"}</option>
|
|
||||||
<option value="9">{translate label="ID_MONTH_ABB_9"}</option>
|
|
||||||
<option value="10">{translate label="ID_MONTH_ABB_10"}</option>
|
|
||||||
<option value="11">{translate label="ID_MONTH_ABB_11"}</option>
|
|
||||||
<option value="12">{translate label="ID_MONTH_ABB_12"}</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="span4 pull-left">
|
|
||||||
<button type="button" class="btn btn-compare btn-success pull-right btn-date">{translate label="ID_DASH_COMPARE"}</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="clearfix"></div>
|
<div class="clearfix"></div>
|
||||||
@@ -423,7 +409,7 @@
|
|||||||
<!-- /.col-lg-12 -->
|
<!-- /.col-lg-12 -->
|
||||||
</div>
|
</div>
|
||||||
<!-- Indicators -->
|
<!-- Indicators -->
|
||||||
<div class="row">
|
<div class="row" id="indicatorsView">
|
||||||
<div class="indicators">
|
<div class="indicators">
|
||||||
<div id="indicatorsGridStack" class="grid-stack" data-gs-width="12" data-gs-animate="no" >
|
<div id="indicatorsGridStack" class="grid-stack" data-gs-width="12" data-gs-animate="no" >
|
||||||
<!--Here are added dynamically the Indicators-->
|
<!--Here are added dynamically the Indicators-->
|
||||||
@@ -441,7 +427,7 @@
|
|||||||
<center><h3></h3></center>
|
<center><h3></h3></center>
|
||||||
</div>
|
</div>
|
||||||
<div id="sortby">
|
<div id="sortby">
|
||||||
{translate label="ID_SORT_BY"} {translate label="ID_COSTS"} : <a id="sortListButton" class="fa fa-chevron-up fa-1x" style="color:#000;" href="#"></a>
|
{translate label="ID_SORT_BY"} {translate label="ID_COSTS"} : <a id="sortListButton" class="fa fa-arrow-up fa-1x" style="color:#000;" href="#"></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -451,6 +437,21 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="process-div" id="compareDiv">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-12 col-md-12">
|
||||||
|
<div class="panel-heading">
|
||||||
|
<ol id="comparisonBreadcrumb" class="breadcrumb">
|
||||||
|
</ol>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div id="compareGraph" style="padding:0 50px 0 50px;">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -659,20 +659,20 @@ img#topright { top:0; right:0; }
|
|||||||
stroke-width: 0;
|
stroke-width: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tooltip { /* NEW */
|
/*.tooltip { /* NEW */
|
||||||
background: #eee; /* NEW */
|
/* background: #eee; /* NEW */
|
||||||
box-shadow: 0 0 5px #999999; /* NEW */
|
/* box-shadow: 0 0 5px #999999; /* NEW */
|
||||||
color: #333; /* NEW */
|
/* color: #333; /* NEW */
|
||||||
display: none; /* NEW */
|
/* display: none; /* NEW */
|
||||||
font-size: 12px; /* NEW */
|
/* font-size: 12px; /* NEW */
|
||||||
left: 110px; /* NEW */
|
/* left: 110px; /* NEW */
|
||||||
padding: 10px; /* NEW */
|
/* padding: 10px; /* NEW */
|
||||||
position: absolute; /* NEW */
|
/* position: absolute; /* NEW */
|
||||||
text-align: center; /* NEW */
|
/* text-align: center; /* NEW */
|
||||||
top: 85px; /* NEW */
|
/* top: 85px; /* NEW */
|
||||||
width: 80px; /* NEW */
|
/* width: 80px; /* NEW */
|
||||||
z-index: 10; /* NEW */
|
/* z-index: 10; /* NEW */
|
||||||
}
|
/*}*/
|
||||||
|
|
||||||
.letter{
|
.letter{
|
||||||
background-image: url("../images/logo-proces-marker.png");
|
background-image: url("../images/logo-proces-marker.png");
|
||||||
|
|||||||
@@ -354,10 +354,10 @@ table.dataTable thead .sorting:after {
|
|||||||
color: #606368;
|
color: #606368;
|
||||||
}
|
}
|
||||||
|
|
||||||
.panel-green a:hover {
|
/*.panel-green a:hover {
|
||||||
color: #1fbc99;
|
color: #1fbc99;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
.panel-red {
|
.panel-red {
|
||||||
border-color: #ddd;
|
border-color: #ddd;
|
||||||
@@ -545,6 +545,10 @@ table.dataTable thead .sorting:after {
|
|||||||
margin: 11px 17px 0 0;
|
margin: 11px 17px 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.dashboard-right {
|
||||||
|
margin: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
.dashboard-right h5{
|
.dashboard-right h5{
|
||||||
margin: 20px 12px 0 0;
|
margin: 20px 12px 0 0;
|
||||||
}
|
}
|
||||||
@@ -581,8 +585,8 @@ table.dataTable thead .sorting:after {
|
|||||||
margin-bottom: 45px;
|
margin-bottom: 45px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.panel-green:hover, .panel-red:hover, .panel-high:hover, .panel-low:hover{
|
.panel-green:hover, .panel-red:hover, .panel-high:hover, .panel-low, .panel-status:hover{
|
||||||
box-shadow:0px 3px 2px #dfdfdf;
|
box-shadow:0px 3px 2px #dfdfdf;
|
||||||
}
|
}
|
||||||
|
|
||||||
.small{
|
.small{
|
||||||
@@ -807,3 +811,15 @@ table.dataTable thead .sorting:after {
|
|||||||
.bottom{
|
.bottom{
|
||||||
margin-bottom: 30px;
|
margin-bottom: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tooltip > .tooltip-inner {
|
||||||
|
line-height: 1;
|
||||||
|
text-align: center;
|
||||||
|
color: #fff;
|
||||||
|
width: 150px;
|
||||||
|
padding: 15px;
|
||||||
|
font-size: 12px;
|
||||||
|
background: rgba(0, 0, 0, 0.7);
|
||||||
|
border-radius: 8px;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user