Merge remote branch 'upstream/master' into PM-2447

This commit is contained in:
dheeyi
2015-04-27 13:55:02 -04:00
37 changed files with 1596 additions and 218 deletions

View File

@@ -5,7 +5,7 @@
*/
if ( !defined('PATH_SEP') ) {
define('PATH_SEP', ( substr(PHP_OS, 0, 3) == 'WIN' ) ? '\\' : '/');
define("PATH_SEP", (substr(PHP_OS, 0, 3) == "WIN")? "\\" : "/");
}
$docuroot = explode(PATH_SEP, str_replace('engine' . PATH_SEP . 'methods' . PATH_SEP . 'services', '', dirname(__FILE__)));
@@ -129,7 +129,7 @@ if ($force || !$bCronIsRunning) {
$oDirectory = dir(PATH_DB);
$cws = 0;
while($sObject = $oDirectory->read()) {
while (($sObject = $oDirectory->read()) !== false) {
if (($sObject != ".") && ($sObject != "..")) {
if (is_dir(PATH_DB . $sObject)) {
if (file_exists(PATH_DB . $sObject . PATH_SEP . "db.php")) {
@@ -141,6 +141,10 @@ if ($force || !$bCronIsRunning) {
}
}
} else {
if (!is_dir(PATH_DB . $ws) || !file_exists(PATH_DB . $ws . PATH_SEP . "db.php")) {
throw new Exception("Error: The workspace \"$ws\" does not exist");
}
$cws = 1;
system("php -f \"" . dirname(__FILE__) . PATH_SEP . "cron_single.php\" $ws \"$sDate\" \"$dateSystem\" $argsx", $retval);

View File

@@ -10,11 +10,6 @@ register_shutdown_function(
)
);
/**
* cron_single.php
* @package workflow-engine-bin
*/
if (!defined('SYS_LANG')) {
define('SYS_LANG', 'en');
}
@@ -220,9 +215,6 @@ Bootstrap::registerClass('CaseTrackerObject', PATH_HOME . "engine/classes/mod
Bootstrap::registerClass('BaseCaseTrackerObjectPeer',PATH_HOME . "engine/classes/model/om/BaseCaseTrackerObjectPeer.php");
Bootstrap::registerClass('CaseTrackerObjectPeer', PATH_HOME . "engine/classes/model/CaseTrackerObjectPeer.php");
Bootstrap::registerClass('BaseConfiguration', PATH_HOME . "engine/classes/model/om/BaseConfiguration.php");
Bootstrap::registerClass('Configuration', PATH_HOME . "engine/classes/model/Configuration.php");
Bootstrap::registerClass('BaseDbSource', PATH_HOME . "engine/classes/model/om/BaseDbSource.php");
Bootstrap::registerClass('DbSource', PATH_HOME . "engine/classes/model/DbSource.php");
@@ -367,7 +359,7 @@ Bootstrap::registerClass("AddonsManagerPeer", PATH_HOME . "engine" . PATH_SEP
Bootstrap::registerClass('dashboards', PATH_HOME . "engine/classes/class.dashboards.php");
/*----------------------------------********---------------------------------*/
$arrayClass = array("EmailServer", "ListInbox", "ListParticipatedHistory");
$arrayClass = array("Configuration", "EmailServer", "ListInbox", "ListParticipatedHistory");
foreach ($arrayClass as $value) {
Bootstrap::registerClass("Base" . $value, PATH_HOME . "engine" . PATH_SEP . "classes" . PATH_SEP . "model" . PATH_SEP . "om" . PATH_SEP . "Base" . $value . ".php");

View File

@@ -114,6 +114,10 @@ try {
}
}
} else {
if (!is_dir(PATH_DB . $workspace) || !file_exists(PATH_DB . $workspace . PATH_SEP . "db.php")) {
throw new Exception("Error: The workspace \"$workspace\" does not exist");
}
$countw++;
passthru("php -f \"$messageEventCronSinglePath\" $workspace \"" . base64_encode(PATH_HOME) . "\" \"" . base64_encode(PATH_TRUNK) . "\" \"" . base64_encode(PATH_OUTTRUNK) . "\"");

View File

@@ -4100,6 +4100,7 @@ class Cases
$oApplication = new Application();
$aFields = $oApplication->load($sApplicationUID);
$appStatusCurrent = $aFields['APP_STATUS'];
$oCriteria = new Criteria('workflow');
$oCriteria->add(AppDelegationPeer::APP_UID, $sApplicationUID);
$oCriteria->add(AppDelegationPeer::DEL_FINISH_DATE, null, Criteria::ISNULL);
@@ -4168,9 +4169,10 @@ class Cases
}
/*----------------------------------********---------------------------------*/
$data = array (
'APP_UID' => $sApplicationUID,
'DEL_INDEX' => $iIndex,
'USR_UID' => $user_logged
'APP_UID' => $sApplicationUID,
'DEL_INDEX' => $iIndex,
'USR_UID' => $user_logged,
'APP_STATUS_CURRENT' => $appStatusCurrent
);
$data = array_merge($aFields, $data);
$oListCanceled = new ListCanceled();

View File

@@ -151,12 +151,12 @@ class indicatorsCalculator
$params[":endMonth"] = $endMonth;
$params[":language"] = $language;
$sqlString = "
select
$sqlString = "select
i.PRO_UID as uid,
tp.CON_VALUE as name,
efficiencyIndex,
inefficiencyCost
inefficiencyCost,
@curRow := @curRow + 1 AS rank
from
( select
PRO_UID,
@@ -172,12 +172,14 @@ class indicatorsCalculator
AND
IF(`YEAR` = :endYear, `MONTH`, `YEAR`) <= IF (`YEAR` = :endYear, :endMonth, :endYear)
group by PRO_UID
order by $this->peiFormula DESC
) i
left join (select *
from CONTENT
where CON_CATEGORY = 'PRO_TITLE'
and CON_LANG = :language
) tp on i.PRO_UID = tp.CON_ID";
from CONTENT
where CON_CATEGORY = 'PRO_TITLE'
and CON_LANG = :language
) tp on i.PRO_UID = tp.CON_ID
join (SELECT @curRow := 0) order_table";
//$retval = $this->propelExecutor($sqlString);
$retval = $this->pdoExecutor($sqlString, $params);
@@ -210,7 +212,8 @@ class indicatorsCalculator
efficiencyIndex,
inefficiencyCost,
averageTime,
deviationTime
deviationTime,
@curRow := @curRow + 1 AS rank
from
( select
gu.GRP_UID,
@@ -224,12 +227,14 @@ class indicatorsCalculator
WHERE
IF(`YEAR` = :endYear, `MONTH`, `YEAR`) <= IF (`YEAR` = :endYear, :endMonth, :endYear)
group by gu.GRP_UID
order by $this->ueiFormula DESC
) i
left join (select *
from CONTENT
where CON_CATEGORY = 'GRP_TITLE'
and CON_LANG = :language
) tp on i.GRP_UID = tp.CON_ID";
) tp on i.GRP_UID = tp.CON_ID
join (SELECT @curRow := 0) order_table";
$retval = $this->pdoExecutor($sqlString, $params);
//$retval = $this->propelExecutor($sqlString);
@@ -262,7 +267,8 @@ class indicatorsCalculator
efficiencyIndex,
inefficiencyCost,
averageTime,
deviationTime
deviationTime,
@curRow := @curRow + 1 AS rank
from
( select
u.USR_UID,
@@ -279,7 +285,9 @@ class indicatorsCalculator
AND
IF(`YEAR` = :endYear, `MONTH`, `YEAR`) <= IF (`YEAR` = :endYear, :endMonth, :endYear)
group by ur.USR_UID
) i";
order by $this->ueiFormula DESC
) i
join (SELECT @curRow := 0) order_table";
$retval = $this->pdoExecutor($sqlString, $params);
//$returnValue = $this->propelExecutor($sqlString);

View File

@@ -399,22 +399,19 @@ class PMPluginRegistry
}
/**
* get status plugin in the singleton
* Get status plugin in the singleton
*
* @param unknown_type $sNamespace
* @param string $name Plugin name
*
* return mixed Return a string with status plugin, 0 otherwise
*/
public function getStatusPlugin ($sNamespace)
public function getStatusPlugin($name)
{
foreach ($this->_aPluginDetails as $namespace => $detail) {
if ($sNamespace == $namespace) {
if ($this->_aPluginDetails[$sNamespace]->enabled) {
return 'enabled';
} else {
return 'disabled';
}
}
try {
return (isset($this->_aPluginDetails[$name]))? (($this->_aPluginDetails[$name]->enabled)? "enabled" : "disabled") : 0;
} catch (Excepton $e) {
throw $e;
}
return 0;
}
/**

View File

@@ -27,7 +27,7 @@ class DashboardIndicator extends BaseDashboardIndicator
throw $error;
}
}
function loadbyDasUid ($dasUid, $vmeasureDate, $vcompareDate, $userUid)
function loadbyDasUid ($dasUid, $vcompareDate, $vmeasureDate, $userUid)
{
G::loadClass('indicatorsCalculator');
$calculator = new \IndicatorsCalculator();
@@ -64,11 +64,15 @@ class DashboardIndicator extends BaseDashboardIndicator
$value = current(reset($calculator->peiHistoric($uid, $measureDate, $measureDate, \ReportingPeriodicityEnum::NONE)));
$oldValue = current(reset($calculator->peiHistoric($uid, $compareDate, $compareDate, \ReportingPeriodicityEnum::NONE)));
$row['DAS_IND_VARIATION'] = $value - $oldValue;
$row['DAS_IND_OLD_VALUE'] = $oldValue;
$row['DAS_IND_PERCENT_VARIATION'] = round(($value - $oldValue) * 100 / (($oldValue == 0) ? 1 : $oldValue), 1);
break;
case '1030':
$value = current(reset($calculator->ueiHistoric(null, $measureDate, $measureDate, \ReportingPeriodicityEnum::NONE)));
$oldValue = current(reset($calculator->ueiHistoric($uid, $compareDate, $compareDate, \ReportingPeriodicityEnum::NONE)));
$row['DAS_IND_VARIATION'] = $value - $oldValue;
$row['DAS_IND_OLD_VALUE'] = $oldValue;
$row['DAS_IND_PERCENT_VARIATION'] = round(($value - $oldValue) * 100 / (($oldValue == 0) ? 1 : $oldValue), 1);
break;
case '1050':
$value = $calculator->statusIndicatorGeneral($userUid);

View File

@@ -104,9 +104,21 @@ class ListCanceled extends BaseListCanceled {
$oListInbox->removeAll($data['APP_UID']);
$users = new Users();
$users->refreshTotal($data['USR_UID'], 'removed', 'inbox');
if (!empty($data['APP_STATUS_CURRENT']) && $data['APP_STATUS_CURRENT'] == 'DRAFT') {
$users->refreshTotal($data['USR_UID'], 'removed', 'draft');
} else {
$users->refreshTotal($data['USR_UID'], 'removed', 'inbox');
}
$users->refreshTotal($data['USR_UID'], 'add', 'canceled');
//Update - WHERE
$criteriaWhere = new Criteria("workflow");
$criteriaWhere->add(ListParticipatedLastPeer::APP_UID, $data["APP_UID"], Criteria::EQUAL);
//Update - SET
$criteriaSet = new Criteria("workflow");
$criteriaSet->add(ListParticipatedLastPeer::APP_STATUS, 'CANCELLED');
BasePeer::doUpdate($criteriaWhere, $criteriaSet, Propel::getConnection("workflow"));
$con = Propel::getConnection( ListCanceledPeer::DATABASE_NAME );
try {
$this->fromArray( $data, BasePeer::TYPE_FIELDNAME );

View File

@@ -269,7 +269,7 @@
<column name="APP_MSG_ATTACH" type="LONGVARCHAR" required="false"/>
<column name="APP_MSG_SEND_DATE" type="TIMESTAMP" required="true"/>
<column name="APP_MSG_SHOW_MESSAGE" type="TINYINT" required="true" default="1"/>
<column name="APP_MSG_ERROR" type="LONGVARCHAR" required="false" default=""/>
<column name="APP_MSG_ERROR" type="LONGVARCHAR" required="false" default=""/>
</table>
<table name="APP_OWNER">
<vendor type="mysql">
@@ -4844,15 +4844,15 @@
<column name="PRO_UID" type="VARCHAR" size="32" required="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="TOTAL_TIME_BY_TASK" type="DECIMAL" size="7,2"/>
<column name="TOTAL_CASES_IN" type="DECIMAL" size="7,2"/>
<column name="TOTAL_CASES_OUT" type="DECIMAL" size="7,2"/>
<column name="USER_HOUR_COST" type="DECIMAL" size="7,2"/>
<column name="AVG_TIME" type="DECIMAL" size="7,2"/>
<column name="SDV_TIME" type="DECIMAL" size="7,2"/>
<column name="CONFIGURED_TASK_TIME" type="DECIMAL" size="7,2"/>
<column name="TOTAL_CASES_OVERDUE" type="DECIMAL" size="7,2"/>
<column name="TOTAL_CASES_ON_TIME" type="DECIMAL" size="7,2"/>
<column name="TOTAL_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_CASES_OUT" type="DECIMAL" size="7,2" default="0" />
<column name="USER_HOUR_COST" type="DECIMAL" size="7,2" default="0" />
<column name="AVG_TIME" type="DECIMAL" size="7,2" default="0" />
<column name="SDV_TIME" type="DECIMAL" size="7,2" default="0" />
<column name="CONFIGURED_TASK_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" />
<index name="indexReporting">
<index-column name="USR_UID"/>
<index-column name="TAS_UID"/>
@@ -4891,15 +4891,15 @@
<column name="PRO_UID" type="VARCHAR" size="32" required="true" 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="AVG_TIME" type="DECIMAL" size="7,2"/>
<column name="SDV_TIME" type="DECIMAL" size="7,2"/>
<column name="TOTAL_CASES_IN" type="DECIMAL" size="7,2"/>
<column name="TOTAL_CASES_OUT" type="DECIMAL" size="7,2"/>
<column name="CONFIGURED_PROCESS_TIME" type="DECIMAL" size="7,2"/>
<column name="CONFIGURED_PROCESS_COST" type="DECIMAL" size="7,2"/>
<column name="TOTAL_CASES_OPEN" type="DECIMAL" size="7,2"/>
<column name="TOTAL_CASES_OVERDUE" type="DECIMAL" size="7,2"/>
<column name="TOTAL_CASES_ON_TIME" type="DECIMAL" size="7,2"/>
<column name="AVG_TIME" type="DECIMAL" size="7,2" default="0" />
<column name="SDV_TIME" type="DECIMAL" size="7,2" default="0" />
<column name="TOTAL_CASES_IN" type="DECIMAL" size="7,2" default="0" />
<column name="TOTAL_CASES_OUT" type="DECIMAL" size="7,2" default="0" />
<column name="CONFIGURED_PROCESS_TIME" type="DECIMAL" size="7,2" default="0" />
<column name="CONFIGURED_PROCESS_COST" 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_ON_TIME" type="DECIMAL" size="7,2" default="0" />
</table>
<table name="DASHBOARD">
@@ -4942,7 +4942,7 @@
<column name="DAS_UID" type="VARCHAR" size="32" required="true" default="" />
<column name="DAS_IND_TYPE" type="VARCHAR" size="32" required="true" default="" />
<column name="DAS_IND_TITLE" type="VARCHAR" size="255" required="true" default="" />
<column name="DAS_IND_GOAL" type="DECIMAL" size="7,2" required="true" />
<column name="DAS_IND_GOAL" type="DECIMAL" size="7,2" default="0" />
<column name="DAS_IND_DIRECTION" type="TINYINT" required="true" default="2"/>
<column name="DAS_UID_PROCESS" type="VARCHAR" size="32" required="true" default="" />
<column name="DAS_IND_FIRST_FIGURE" type="VARCHAR" size="32" required="false" default="" />
@@ -4997,6 +4997,7 @@
</foreign-key>
</table>
<table name="CATALOG">
<vendor type="mysql">
<parameter name="Name" value="CATALOG" />
@@ -5011,7 +5012,7 @@
<parameter name="Create_options" value="" />
<parameter name="Comment" value="Definitions catalog."/>
</vendor>
<column name="CAT_UID" type="VARCHAR" size="32" required="true" primaryKey="true" default="0"/>
<column name="CAT_UID" type="VARCHAR" size="32" required="true" primaryKey="true" default=""/>
<column name="CAT_LABEL_ID" type="VARCHAR" size="100" required="true" default=""/>
<column name="CAT_TYPE" type="VARCHAR" size="100" required="true" primaryKey="true" default=""/>
<column name="CAT_FLAG" type="VARCHAR" size="50" required="false" default=""/>

View File

@@ -176,6 +176,7 @@ class StrategicDashboard extends Controller
$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');
@@ -193,9 +194,15 @@ class StrategicDashboard extends Controller
$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');
$this->setVar('translation', $translation);
$this->render();
} catch (Exception $error) {
@@ -208,7 +215,41 @@ class StrategicDashboard extends Controller
{
try {
$this->setView( 'strategicDashboard/viewDashboardIE' );
$this->setVar('urlProxy',$this->urlProxy);
$this->setVar('usrId',$this->usrId);
$this->setVar('credentials',$this->clientToken);
$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_OVERDUE'] = G::LoadTranslation( 'ID_OVERDUE');
$translation['ID_AT_RISK'] = G::LoadTranslation( 'ID_AT_RISK');
$translation['ID_ON_TIME'] = G::LoadTranslation( 'ID_ON_TIME');
$this->setVar('translation', $translation);
$this->render();
} catch (Exception $error) {
} catch (Exception $error) {
$_SESSION['__DASHBOARD_ERROR__'] = $error->getMessage();
die();

View File

@@ -2,6 +2,7 @@
# This is a fix for InnoDB in MySQL >= 4.1.x
# It "suspends judgement" for fkey relationships until are tables are set.
SET FOREIGN_KEY_CHECKS = 0;
SET @@global.sql_mode='MYSQL40';
#-----------------------------------------------------------------------------
#-- APPLICATION
@@ -2705,13 +2706,14 @@ CREATE TABLE `USR_REPORTING`
`TOTAL_TIME_BY_TASK` DECIMAL(7,2) default 0,
`TOTAL_CASES_IN` DECIMAL(7,2) default 0,
`TOTAL_CASES_OUT` DECIMAL(7,2) default 0,
`USER_HOUR_COST` DECIMAL(7,2) default 0,
`AVG_TIME` DECIMAL(7,2) default 0,
`SDV_TIME` DECIMAL(7,2) default 0,
`CONFIGURED_TASK_TIME` DECIMAL(7,2) default 0,
`TOTAL_CASES_OVERDUE` DECIMAL(7,2) default 0,
`TOTAL_CASES_ON_TIME` DECIMAL(7,2) default 0,
PRIMARY KEY (`USR_UID`, `TAS_UID`,`MONTH`,`YEAR`)
KEY `indexApp`(`USR_UID`, `TAS_UID`, `PRO_UID`)
PRIMARY KEY (`USR_UID`, `TAS_UID`,`MONTH`,`YEAR`),
KEY `indexReporting`(`USR_UID`, `TAS_UID`, `PRO_UID`)
)ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='Data calculated users by task';
#-----------------------------------------------------------------------------
#-- PRO_REPORTING
@@ -2748,7 +2750,6 @@ CREATE TABLE `DASHBOARD`
`DAS_UID` VARCHAR(32) default '' NOT NULL,
`DAS_TITLE` VARCHAR(255) default '' NOT NULL,
`DAS_DESCRIPTION` MEDIUMTEXT,
`DAS_VERSION` VARCHAR(10) default '1.0' NOT NULL,
`DAS_CREATE_DATE` DATETIME NOT NULL,
`DAS_UPDATE_DATE` DATETIME,
`DAS_STATUS` TINYINT default 1 NOT NULL,
@@ -2763,17 +2764,21 @@ DROP TABLE IF EXISTS `DASHBOARD_INDICATOR`;
CREATE TABLE `DASHBOARD_INDICATOR`
(
`DAS_IND_UID` VARCHAR(32) default '' NOT NULL,
`DAS_UID` VARCHAR(32) default '' NOT NULL,
`DAS_IND_TYPE` VARCHAR(32) default '' NOT NULL,
`DAS_IND_TITLE` VARCHAR(255) default '' NOT NULL,
`DAS_IND_GOAL` DECIMAL(7,2) default 0,
`DAS_UID_PROCESS` VARCHAR(32) default '' NOT NULL,
`DAS_IND_PROPERTIES` MEDIUMTEXT,
`DAS_CREATE_DATE` DATETIME NOT NULL,
`DAS_UPDATE_DATE` DATETIME,
`DAS_STATUS` TINYINT default 1 NOT NULL,
PRIMARY KEY (`DAS_UID`),
`DAS_IND_UID` VARCHAR(32) default '' NOT NULL,
`DAS_UID` VARCHAR(32) default '' NOT NULL,
`DAS_IND_TYPE` VARCHAR(32) default '' NOT NULL,
`DAS_IND_TITLE` VARCHAR(255) default '' NOT NULL,
`DAS_IND_GOAL` DECIMAL(7,2) default 0,
`DAS_IND_DIRECTION` TINYINT default 2 NOT NULL,
`DAS_UID_PROCESS` VARCHAR(32) default '' NOT NULL,
`DAS_IND_FIRST_FIGURE` VARCHAR(32) default '',
`DAS_IND_FIRST_FREQUENCY` VARCHAR(32) default '',
`DAS_IND_SECOND_FIGURE` VARCHAR(32) default '',
`DAS_IND_SECOND_FREQUENCY` VARCHAR(32) default '',
`DAS_IND_CREATE_DATE` DATETIME NOT NULL,
`DAS_IND_UPDATE_DATE` DATETIME,
`DAS_IND_STATUS` TINYINT default 1 NOT NULL,
PRIMARY KEY (`DAS_IND_UID`),
KEY `indexDashboard`(`DAS_UID`, `DAS_IND_TYPE`),
CONSTRAINT `fk_dashboard_indicator_dashboard`
FOREIGN KEY (`DAS_UID`)
@@ -2791,7 +2796,7 @@ CREATE TABLE `DASHBOARD_DAS_IND`
`DAS_UID` VARCHAR(32) default '' NOT NULL,
`OWNER_UID` VARCHAR(32) default '' NOT NULL,
`OWNER_TYPE` VARCHAR(15) default '' NOT NULL,
PRIMARY KEY (`DAS_UID`),
PRIMARY KEY (`DAS_UID`,`OWNER_UID`),
CONSTRAINT `fk_dashboard_indicator_dashboard_das_ind`
FOREIGN KEY (`DAS_UID`)
REFERENCES `DASHBOARD` (`DAS_UID`)

View File

@@ -139,7 +139,8 @@ ViewDashboardHelper.prototype.merge = function (objFrom, objTo, propMap) {
toKey = propMap[fromKey];
//force toKey to an array of toKeys
if (!Array.isArray(toKey)) {
//if (!Array.isArray(toKey)) {
if (!$.isArray(toKey)) {
toKey = [toKey];
}
@@ -147,14 +148,17 @@ ViewDashboardHelper.prototype.merge = function (objFrom, objTo, propMap) {
def = null;
transform = null;
key = toKey[x];
keyIsArray = Array.isArray(key);
//keyIsArray = Array.isArray(key);
keyIsArray = $.isArray(key);
if (typeof(key) === "object" && !keyIsArray) {
def = key.default || null;
//def = (key.default || null);
def = null;
transform = key.transform || null;
key = key.key;
//evaluate if the new key is an array
keyIsArray = Array.isArray(key);
// keyIsArray = Array.isArray(key);
keyIsArray = $.isArray(key);
}
if (keyIsArray) {

View File

@@ -57,6 +57,7 @@ ViewDashboardPresenter.prototype.dashboardIndicatorsViewModel = function(data) {
"DAS_IND_TITLE" : "title",
"DAS_IND_TYPE" : "type",
"DAS_IND_VARIATION" : "comparative",
"DAS_IND_PERCENT_VARIATION" : "percentComparative",
"DAS_IND_DIRECTION" : "direction",
"DAS_IND_VALUE" : "value",
"DAS_IND_X" : "x",
@@ -76,7 +77,6 @@ ViewDashboardPresenter.prototype.dashboardIndicatorsViewModel = function(data) {
newObject.toDrawY = (newObject.y == 0) ? 6 : newObject.y;
newObject.toDrawHeight = (newObject.y == 0) ? 2 : newObject.height;
newObject.toDrawWidth = (newObject.y == 0) ? 12 / data.length : newObject.width;
newObject.comparative = ((newObject.comparative > 0)? "+": "") + that.helper.stringIfNull(newObject.comparative);
newObject.directionSymbol = (newObject.direction == "1") ? "<" : ">";
newObject.isWellDone = (newObject.direction == "1")
? parseFloat(newObject.value) <= parseFloat(newObject.comparative)
@@ -86,10 +86,9 @@ ViewDashboardPresenter.prototype.dashboardIndicatorsViewModel = function(data) {
? "special"
: "normal";
//round goals for normal indicators
newObject.comparative = (newObject.category == "normal")
? Math.round(newObject.comparative) + ""
: newObject.comparative;
//rounding
newObject.comparative = Math.round(newObject.comparative*1000)/1000;
newObject.comparative = ((newObject.comparative > 0)? "+": "") + newObject.comparative;
newObject.value = (newObject.category == "normal")
? Math.round(newObject.value) + ""
@@ -170,7 +169,19 @@ ViewDashboardPresenter.prototype.peiViewModel = function(data) {
: newObject.datalabel.substring(0,15);
newObject.datalabel = shortLabel;
graphData.push(newObject);
//use positive values for drawing;
if (newObject.value > 0) {
newObject.value = 0;
}
if (newObject.value < 0) {
newObject.value = Math.abs(newObject.value);
}
if (newObject.value > 0) {
graphData.push(newObject);
}
originalObject.inefficiencyCostToShow = "$ " + Math.round(originalObject.inefficiencyCost);
originalObject.efficiencyIndexToShow = Math.round(originalObject.efficiencyIndex * 100) / 100;
originalObject.indicatorId = data.id;
@@ -186,16 +197,6 @@ ViewDashboardPresenter.prototype.peiViewModel = function(data) {
})
retval.dataToDraw = graphData.splice(0,7);
//use positive values for drawing;
$.each(retval.dataToDraw, function(index, item) {
if (item.value > 0) {
item.value = 0;
}
if (item.value < 0) {
item.value = Math.abs(item.value);
}
});
//TODO aumentar el símbolo de moneda $
retval.inefficiencyCostToShow = "$ " +Math.round(retval.inefficiencyCost);
@@ -220,7 +221,17 @@ ViewDashboardPresenter.prototype.ueiViewModel = function(data) {
: newObject.datalabel.substring(0,7);
newObject.datalabel = shortLabel;
graphData.push(newObject);
//use positive values for drawing;
if (newObject.value > 0) {
newObject.value = 0;
}
if (newObject.value < 0) {
newObject.value = Math.abs(newObject.value);
}
if (newObject.value > 0) {
graphData.push(newObject);
}
originalObject.inefficiencyCostToShow = "$ " + Math.round(originalObject.inefficiencyCost);
originalObject.efficiencyIndexToShow = Math.round(originalObject.efficiencyIndex * 100) / 100;
originalObject.indicatorId = data.id;
@@ -231,22 +242,11 @@ ViewDashboardPresenter.prototype.ueiViewModel = function(data) {
retval = data;
graphData.sort(function(a,b) {
var retval = 0;
retval = ((a.value*1.0 <= b.value*1.0) ? -1 : 1);
retval = ((a.value*1.0 <= b.value*1.0) ? 1 : -1);
return retval;
})
retval.dataToDraw = graphData.splice(0,7);
//use positive values for drawing;
$.each(retval.dataToDraw, function(index, item) {
if (item.value > 0) {
item.value = 0;
}
if (item.value < 0) {
item.value = Math.abs(item.value);
}
});
//TODO aumentar el símbolo de moneda $
retval.inefficiencyCostToShow = "$ " + Math.round(retval.inefficiencyCost);
retval.efficiencyIndexToShow = Math.round(retval.efficiencyIndex * 100) / 100;
@@ -366,16 +366,32 @@ ViewDashboardPresenter.prototype.returnIndicatorSecondLevelPei = function(modelD
$.each(modelData, function(index, originalObject) {
var map = {
"name" : "datalabel",
"averageTime" : "value",
"inefficiencyCost" : "value",
"deviationTime" : "dispersion"
};
var newObject = that.helper.merge(originalObject, {}, map);
newObject.datalabel = ((newObject.datalabel == null) ? "" : newObject.datalabel.substring(0, 7));
originalObject.inefficiencyCostToShow = "$ " + Math.round(originalObject.inefficiencyCost);
originalObject.efficiencyIndexToShow = Math.round(originalObject.efficiencyIndex * 100) / 100;
graphData.push(newObject);
originalObject.deviationTimeToShow = Math.round(originalObject.deviationTime);
//use positive values for drawing;
if (newObject.value > 0) {
newObject.value = 0;
}
if (newObject.value < 0) {
newObject.value = Math.abs(newObject.value);
}
if (newObject.value > 0) {
graphData.push(newObject);
}
});
var retval = {};
graphData.sort(function(a,b) {
var retval = 0;
retval = ((a.value*1.0 <= b.value*1.0) ? 1 : -1);
return retval;
})
retval.dataToDraw = graphData.splice(0,7);
retval.entityData = modelData;
return retval;
@@ -391,16 +407,33 @@ ViewDashboardPresenter.prototype.returnIndicatorSecondLevelUei = function(modelD
$.each(modelData, function(index, originalObject) {
var map = {
"name" : "datalabel",
"averageTime" : "value",
"inefficiencyCost" : "value",
"deviationTime" : "dispersion"
};
var newObject = that.helper.merge(originalObject, {}, map);
newObject.datalabel = ((newObject.datalabel == null) ? "" : newObject.datalabel.substring(0, 7));
originalObject.inefficiencyCostToShow = "$ " +Math.round(originalObject.inefficiencyCost);
originalObject.efficiencyIndexToShow = Math.round(originalObject.efficiencyIndex * 100) / 100;
graphData.push(newObject);
originalObject.deviationTimeToShow = Math.round(originalObject.deviationTime);
//use positive values for drawing;
if (newObject.value > 0) {
newObject.value = 0;
}
if (newObject.value < 0) {
newObject.value = Math.abs(newObject.value);
}
if (newObject.value > 0) {
graphData.push(newObject);
}
});
var retval = {};
graphData.sort(function(a,b) {
var retval = 0;
retval = ((a.value*1.0 <= b.value*1.0) ? 1 : -1);
return retval;
})
retval.dataToDraw = graphData.splice(0,7);
retval.entityData = modelData;
return retval;

View File

@@ -134,7 +134,6 @@ WidgetBuilder.prototype.buildSpecialIndicatorSecondView = function (secondViewDa
$retval.find(".sind-index-selector").text(G_STRING.ID_EFFICIENCY_INDEX);
$retval.find(".sind-cost-selector").text(G_STRING.ID_INEFFICIENCY_COST);
$retval.find('.breadcrumb').find('li').remove();
$retval.find('.breadcrumb').append ('<li><a class="bread-back-selector" href="#"><i class="fa fa-chevron-left fa-fw"></i>' + window.currentIndicator.title + '</a></li>');
$retval.find('.breadcrumb').append ('<li><b>' + window.currentEntityData.name + '</b></li>');
@@ -273,7 +272,7 @@ $(document).ready(function() {
} else {
favoriteData = 0;
}*/
if (typeof idWidGet != "undefined") {
if (typeof idWidGet != "undefined" && el.hasClass('ind-button-selector')) {
var widgetsObj = {
'indicatorId': idWidGet,
'x': item.x,
@@ -513,7 +512,7 @@ var fillStatusIndicatorFirstView = function (presenterData) {
showLabels: true
}
};
var graph1 = new PieChart(presenterData.graph1Data, graphParams1, null, null);
graph1.drawChart();
var graphParams2 = graphParams1;
@@ -588,8 +587,8 @@ var fillSpecialIndicatorFirstView = function(presenterData) {
graph: {
allowDrillDown:false,
allowTransition:true,
axisX:{ showAxis: true, label: G_STRING.ID_YEAR },
axisY:{ showAxis: true, label: "Q" },
axisX:{ showAxis: true, label: G_STRING.ID_GROUPS},
axisY:{ showAxis: true, label: G_STRING.ID_COSTS},
gridLinesX:false,
gridLinesY:true,
showTip: true,
@@ -670,8 +669,8 @@ var fillSpecialIndicatorSecondView = function(presenterData) {
gridLinesX: true,
gridLinesY: true,
area: {visible: false, css:"area"},
axisX:{ showAxis: true, label: G_STRING.ID_USERS },
axisY:{ showAxis: true, label: G_STRING.ID_TIME_HOURS },
axisX:{ showAxis: true, label: G_STRING.ID_USER },
axisY:{ showAxis: true, label: G_STRING.ID_COSTS },
showErrorBars: true
}
@@ -680,6 +679,7 @@ var fillSpecialIndicatorSecondView = function(presenterData) {
var indicatorPrincipalData = widgetBuilder.getIndicatorLoadedById(window.currentEntityData.indicatorId);
if (window.currentIndicator.type == "1010") {
detailParams.graph.axisX.label = G_STRING.ID_TASK;
var graph = new BarChart(presenterData.dataToDraw, detailParams, null, null);
graph.drawChart();
}
@@ -788,7 +788,7 @@ var fillGeneralIndicatorFirstView = function (presenterData) {
allowDrillDown:false,
allowTransition:true,
axisX:{ showAxis: true, label: G_STRING.ID_YEAR },
axisY:{ showAxis: true, label: "Q" },
axisY:{ showAxis: true, label: G_STRING.ID_COSTS},
gridLinesX:false,
gridLinesY:true,
showTip: true,
@@ -810,7 +810,7 @@ var fillGeneralIndicatorFirstView = function (presenterData) {
allowDrillDown:false,
allowTransition:true,
axisX:{ showAxis: true, label: G_STRING.ID_YEAR },
axisY:{ showAxis: true, label: "Q" },
axisY:{ showAxis: true, label: G_STRING.ID_COSTS },
gridLinesX:false,
gridLinesY:true,
showTip: true,

View File

@@ -0,0 +1,760 @@
/**************************************************************/
var WidgetBuilder = function () {
this.helper = new ViewDashboardHelper();
}
WidgetBuilder.prototype.getIndicatorWidget = function (indicator) {
var retval = null;
switch(indicator.type) {
case "1010": retval = this.buildSpecialIndicatorButton(indicator); break;
case "1030": retval = this.buildSpecialIndicatorButton(indicator); break;
case "1050": retval = this.buildStatusIndicatorButton(indicator); break;
case "1020":
case "1040":
case "1060":
case "1070":
case "1080":
retval = this.buildIndicatorButton(indicator); break;
}
if(retval == null) {throw new Error(indicator.type + " has not associated a widget.");}
return retval;
};
WidgetBuilder.prototype.buildSpecialIndicatorButton = function (indicator) {
_.templateSettings.variable = "indicator";
var template = _.template ($("script.specialIndicatorButtonTemplate").html());
var $retval = $(template(indicator));
if(indicator.comparative < 0){
$retval.find(".ind-container-selector").removeClass("panel-green").addClass("panel-red");
$retval.find(".ind-symbol-selector").removeClass("fa-chevron-up").addClass("fa-chevron-down");
}
if(indicator.comparative > 0){
$retval.find(".ind-container-selector").removeClass("panel-red").addClass("panel-green");
$retval.find(".ind-symbol-selector").removeClass("fa-chevron-down").addClass("fa-chevron-up");
}
if(indicator.comparative == 0){
$retval.find(".ind-symbol-selector").removeClass("fa-chevron-up");
$retval.find(".ind-symbol-selector").removeClass("fa-chevron-down");
$retval.find(".ind-symbol-selector").addClass("fa-circle-o");
$retval.find(".ind-container-selector").removeClass("panel-red").addClass("panel-green");
}
return $retval;
}
WidgetBuilder.prototype.buildStatusIndicatorButton = function (indicator) {
_.templateSettings.variable = "indicator";
var template = _.template ($("script.statusIndicatorButtonTemplate").html());
var $retval = $(template(indicator));
return $retval;
}
WidgetBuilder.prototype.buildIndicatorButton = function (indicator) {
_.templateSettings.variable = "indicator";
var template = _.template ($("script.statusIndicatorButtonTemplate").html());
var $retval = $(template(indicator));
var $comparative = $retval.find('.ind-comparative-selector');
var $title = $retval.find('.ind-title-selector');
if (indicator.isWellDone) {
$comparative.text("(" + indicator.directionSymbol + " " + indicator.comparative + "%)-"+ G_STRING.ID_WELL_DONE);
$retval.find(".ind-container-selector").removeClass("panel-low").addClass("panel-high");
}
else {
$comparative.text("Goal: " + indicator.directionSymbol + " " + indicator.comparative + "%");
$retval.find(".ind-container-selector").removeClass("panel-high").addClass("panel-low");
}
return $retval;
}
WidgetBuilder.prototype.buildSpecialIndicatorFirstView = function (indicatorData) {
if (indicatorData == null) { throw new Error ("indicatorData is null."); }
if (!indicatorData.hasOwnProperty("id")) { throw new Error ("indicatorData has no id."); }
_.templateSettings.variable = "indicator";
var template = _.template ($("script.specialIndicatorMainPanel").html());
var $retval = $(template(indicatorData));
var indicatorPrincipalData = this.getIndicatorLoadedById(indicatorData.id)
$retval.find('.breadcrumb').find('li').remove()
$retval.find('.breadcrumb').append ('<li><b>'+indicatorPrincipalData.title+'</b></li>')
$retval.find(".sind-index-selector").text(G_STRING.ID_EFFICIENCY_INDEX);
$retval.find(".sind-cost-selector").text(G_STRING.ID_INEFFICIENCY_COST);
this.setColorForInefficiency($retval.find(".sind-cost-number-selector"), indicatorData);
return $retval;
}
WidgetBuilder.prototype.buildSpecialIndicatorFirstViewDetail = function (oneItemDetail) {
//detailData = {indicatorId, uid, name, averateTime...}
if (oneItemDetail == null){throw new Error("oneItemDetail is null ");}
if (!typeof(oneItemDetail) === 'object'){throw new Error( "detailData is not and object ->" + oneItemDetail);}
if (!oneItemDetail.hasOwnProperty("name")){throw new Error("buildSpecialIndicatorFirstViewDetail -> detailData has not the name param. Has it the correct Type? ->" + oneItemDetail);}
_.templateSettings.variable = "detailData";
var template = _.template ($("script.specialIndicatorDetail").html());
var $retval = $(template(oneItemDetail));
$retval.find(".detail-efficiency-selector").text(G_STRING.ID_EFFICIENCY_INDEX);
$retval.find(".detail-cost-selector").text(G_STRING.ID_INEFFICIENCY_COST);
this.setColorForInefficiency($retval.find(".detail-cost-number-selector"), oneItemDetail);
return $retval;
}
WidgetBuilder.prototype.buildStatusIndicatorFirstView = function (indicatorData) {
if (indicatorData == null) { throw new Error ("indicatorData is null."); }
if (!indicatorData.hasOwnProperty("id")) { throw new Error ("indicatorData has no id."); }
_.templateSettings.variable = "indicator";
var template = _.template ($("script.statusIndicatorMainPanel").html());
var $retval = $(template(indicatorData));
var indicatorPrincipalData = this.getIndicatorLoadedById(indicatorData.id)
$retval.find('.breadcrumb').find('li').remove()
$retval.find('.breadcrumb').append ('<li><b>'+indicatorPrincipalData.title+'</b></li>')
return $retval;
}
WidgetBuilder.prototype.buildStatusIndicatorFirstViewDetail = function (oneItemDetail) {
//detailData = {indicatorId, uid, name, averateTime...}
if (oneItemDetail == null){throw new Error("oneItemDetail is null ");}
if (!typeof(oneItemDetail) === 'object'){throw new Error( "detailData is not and object ->" + oneItemDetail);}
if (!oneItemDetail.hasOwnProperty("taskTitle")){throw new Error("detailData has not the name param. Has it the correct Type? ->" + oneItemDetail);}
_.templateSettings.variable = "detailData";
var template = _.template ($("script.statusDetail").html());
var $retval = $(template(oneItemDetail));
return $retval;
}
WidgetBuilder.prototype.buildSpecialIndicatorSecondView = function (secondViewData) {
//presenterData= object {dataToDraw[], entityData[] //user/tasks data}
_.templateSettings.variable = "indicator";
var template = _.template ($("script.specialIndicatorMainPanel").html());
var $retval = $(template(window.currentEntityData));
//var indicatorPrincipalData = this.getIndicatorLoadedById(indicatorId);
//$retval.find(".sind-title-selector").text(indicatorPrincipalData.title);
$retval.find(".sind-index-selector").text(G_STRING.ID_EFFICIENCY_INDEX);
$retval.find(".sind-cost-selector").text(G_STRING.ID_INEFFICIENCY_COST);
$retval.find('.breadcrumb').find('li').remove();
$retval.find('.breadcrumb').append ('<li><a class="bread-back-selector" href="#"><i class="fa fa-chevron-left fa-fw"></i>' + window.currentIndicator.title + '</a></li>');
$retval.find('.breadcrumb').append ('<li><b>' + window.currentEntityData.name + '</b></li>');
this.setColorForInefficiency($retval.find(".sind-cost-number-selector"), window.currentEntityData);
return $retval;
};
WidgetBuilder.prototype.buildSpecialIndicatorSecondViewDetailPei = function (oneItemDetail) {
if (oneItemDetail == null){throw new Error("oneItemDetail is null ");}
if (!typeof(oneItemDetail) === 'object'){throw new Error( "detailData is not and object ->" + oneItemDetail);}
if (!oneItemDetail.hasOwnProperty("name")){throw new Error("buildSpecialIndicatorFirstViewDetail -> detailData has not the name param. Has it the correct Type? ->" + oneItemDetail);}
_.templateSettings.variable = "detailData";
var template = _.template ($("script.specialIndicatorSencondViewDetailPei").html());
var $retval = $(template(oneItemDetail));
$retval.find(".detail-efficiency-selector").text(G_STRING.ID_EFFICIENCY_INDEX);
$retval.find(".detail-cost-selector").text(G_STRING.ID_INEFFICIENCY_COST);
this.setColorForInefficiency($retval.find(".detail-cost-number-selector"), oneItemDetail);
return $retval;
}
WidgetBuilder.prototype.buildSpecialIndicatorSecondViewDetailUei = function (oneItemDetail) {
if (oneItemDetail == null){throw new Error("oneItemDetail is null ");}
if (!typeof(oneItemDetail) === 'object'){throw new Error( "detailData is not and object ->" + oneItemDetail);}
if (!oneItemDetail.hasOwnProperty("name")){throw new Error("buildSpecialIndicatorFirstViewDetail -> detailData has not the name param. Has it the correct Type? ->" + oneItemDetail);}
_.templateSettings.variable = "detailData";
var template = _.template ($("script.specialIndicatorSencondViewDetailUei").html());
var $retval = $(template(oneItemDetail));
$retval.find(".detail-efficiency-selector").text(G_STRING.ID_EFFICIENCY_INDEX);
$retval.find(".detail-cost-selector").text(G_STRING.ID_INEFFICIENCY_COST);
this.setColorForInefficiency($retval.find(".detail-cost-number-selector"), oneItemDetail);
return $retval;
}
WidgetBuilder.prototype.buildSpecialIndicatorSecondViewDetaiUei = function (oneItemDetail) {
if (oneItemDetail == null){throw new Error("oneItemDetail is null ");}
if (!typeof(oneItemDetail) === 'object'){throw new Error( "detailData is not and object ->" + oneItemDetail);}
if (!oneItemDetail.hasOwnProperty("name")){throw new Error("buildSpecialIndicatorFirstViewDetail -> detailData has not the name param. Has it the correct Type? ->" + oneItemDetail);}
_.templateSettings.variable = "detailData";
var template = _.template ($("script.specialIndicatorSencondViewDetailUei").html());
var $retval = $(template(oneItemDetail));
$retval.find(".detail-efficiency-selector").text(G_STRING.ID_EFFICIENCY_INDEX);
$retval.find(".detail-cost-selector").text(G_STRING.ID_INEFFICIENCY_COST);
this.setColorForInefficiency($retval.find(".detail-cost-number-selector"), oneItemDetail);
return $retval;
}
WidgetBuilder.prototype.getIndicatorLoadedById = function (searchedIndicatorId) {
var retval = null;
for (key in window.loadedIndicators) {
var indicator = window.loadedIndicators[key];
if (indicator.id == searchedIndicatorId) {
retval = indicator;
}
}
if (retval == null) { throw new Error(searchedIndicatorId + " was not found in the loaded indicators.");}
return retval;
}
WidgetBuilder.prototype.buildGeneralIndicatorFirstView = function (indicatorData) {
_.templateSettings.variable = "indicator";
var template = _.template ($("script.generalIndicatorMainPanel").html());
var $retval = $(template(indicatorData));
$retval.find(".ind-title-selector").text(window.currentIndicator.title);
return $retval;
}
WidgetBuilder.prototype.setColorForInefficiency = function ($widget, indicatorData) {
//turn red/gree the font according if is positive or negative: var $widget = $retval.find(".sind-cost-number-selector");
$widget.removeClass("red");
$widget.removeClass("green");
if (indicatorData.inefficiencyCost >= 0) {
$widget.addClass("green");
}
else {
$widget.addClass("red");
}
}
/**********************************************************************/
helper = new ViewDashboardHelper();
var ws = urlProxy.split('/');
model = new ViewDashboardModel(token, urlProxy, ws[3]);
presenter = new ViewDashboardPresenter(model);
window.loadedIndicators = []; //updated in das-title-selector.click->fillIndicatorWidgets, ready->fillIndicatorWidgets
window.currentEntityData = null;
window.currentIndicator = null;//updated in ind-button-selector.click ->loadIndicator, ready->loadIndicator
window.currentDashboardId = null;
window.currentDetailFunction = null;
window.currentDetailList = null;
$(document).ready(function() {
initialDraw();
});
var initialDraw = function () {
presenter.getUserDashboards(pageUserId)
.then(function(dashboardsVM) {
fillDashboardsList(dashboardsVM);
if (window.currentDashboardId == null) {return;}
/**** window initialization with favorite dashboard*****/
presenter.getDashboardIndicators(window.currentDashboardId, defaultInitDate(), defaultEndDate())
.done(function(indicatorsVM) {
fillIndicatorWidgets(indicatorsVM);
});
});
}
var loadIndicator = function (indicatorId, initDate, endDate) {
if (indicatorId == null || indicatorId === undefined) {return;}
var builder = new WidgetBuilder();
window.currentIndicator = builder.getIndicatorLoadedById(indicatorId);
presenter.getIndicatorData(indicatorId, window.currentIndicator.type, initDate, endDate)
.done(function (viewModel) {
switch (window.currentIndicator.type) {
case "1010":
case "1030":
fillSpecialIndicatorFirstView(viewModel);
break;
case "1050":
fillStatusIndicatorFirstView(viewModel);
break;
default:
fillGeneralIndicatorFirstView(viewModel);
break;
}
});
}
var setIndicatorActiveMarker = function () {
$('.panel-footer').each (function () {
$(this).removeClass('panel-active');
var indicatorId = $(this).parents('.ind-button-selector').data('indicator-id');
if (window.currentIndicator.id == indicatorId) {
$(this).addClass('panel-active');
}
});
}
var getFavoriteIndicator = function() {
var retval = (window.loadedIndicators.length > 0)
? window.loadedIndicators[0]
: null;
for (key in window.loadedIndicators) {
var indicator = window.loadedIndicators[key];
if (indicator.favorite == 1) {
retval = indicator;
}
}
if (retval==null) {throw new Error ('No favorites found.');}
return retval;
}
var defaultInitDate = function() {
var date = new Date();
var dateMonth = date.getMonth();
var dateYear = date.getFullYear();
var initDate = $('#year').val() + '-' + $('#month').val() + '-' + '01';
return initDate;
}
var defaultEndDate = function () {
var date = new Date();
var dateMonth = date.getMonth();
var dateYear = date.getFullYear();
return dateYear + "-" + (dateMonth + 1) + "-30";
}
var fillDashboardsList = function (presenterData) {
if (presenterData == null || presenterData.length == 0) {
$('#dashboardsList').append(G_STRING['ID_NO_DATA_TO_DISPLAY']);
}
_.templateSettings.variable = "dashboard";
var template = _.template ($("script.dashboardButtonTemplate").html())
for (key in presenterData) {
var dashboard = presenterData[key];
$('#dashboardsList').append(template(dashboard));
if (dashboard.isFavorite == 1) {
window.currentDashboardId = dashboard.id;
$('#dashboardButton-' + dashboard.id)
.find('.das-icon-selector')
.addClass('selected');
}
}
};
var fillIndicatorWidgets = function (presenterData) {
if (presenterData == null || presenterData === undefined) {return;}
var widgetBuilder = new WidgetBuilder();
var grid = $('#indicatorsGridStack');
window.loadedIndicators = presenterData;
$.each(presenterData, function(key, indicator) {
var $widget = widgetBuilder.getIndicatorWidget(indicator);
grid.append($widget, indicator.toDrawX, indicator.toDrawY, indicator.toDrawWidth, indicator.toDrawHeight, true);
});
}
var fillStatusIndicatorFirstView = function (presenterData) {
var widgetBuilder = new WidgetBuilder();
var panel = $('#indicatorsDataGridStack').data('gridstack');
panel.remove_all();
$('#relatedDetailGridStack').data('gridstack').remove_all();
var $widget = widgetBuilder.buildStatusIndicatorFirstView(presenterData);
panel.add_widget($widget, 0, 15, 20, 4.7, true);
var graphParams1 = {
canvas : {
containerId:'graph1',
width:300,
height:300,
stretch:true
},
graph: {
allowDrillDown:true,
allowTransition:true,
showTip: true,
allowZoom: false,
showLabels: true
}
};
var graph1 = new PieChart(presenterData.graph1Data, graphParams1, null, null);
graph1.drawChart();
var graphParams2 = graphParams1;
graphParams2.canvas.containerId = "graph2";
var graph2 = new PieChart(presenterData.graph2Data, graphParams2, null, null);
graph2.drawChart();
var graphParams3 = graphParams1;
graphParams3.canvas.containerId = "graph3";
var graph3 = new PieChart(presenterData.graph3Data, graphParams3, null, null);
graph3.drawChart();
var indicatorPrincipalData = widgetBuilder.getIndicatorLoadedById(presenterData.id)
setIndicatorActiveMarker();
$('#relatedLabel').hide();
}
var fillStatusIndicatorFirstViewDetail = function(presenterData) {
var widgetBuilder = new WidgetBuilder();
var gridDetail = $('#relatedDetailGridStack').data('gridstack');
//gridDetail.remove_all();
$.each(presenterData.dataList, function(index, dataItem) {
var $widget = widgetBuilder.buildStatusIndicatorFirstViewDetail(dataItem);
var x = (index % 2 == 0) ? 6 : 0;
gridDetail.add_widget($widget, x, 15, 6, 2, true);
});
if (window.currentIndicator.type == "1010") {
$('#relatedLabel').find('h3').text(G_STRING['ID_RELATED_PROCESS']);
}
if (window.currentIndicator.type == "1030") {
$('#relatedLabel').find('h3').text(G_STRING['ID_RELATED_GROUPS']);
}
if (window.currentIndicator.type == "1050") {
$('#relatedLabel').find('h3').text(G_STRING['ID_RELATED_PROCESS']);
}
}
var fillSpecialIndicatorFirstView = function(presenterData) {
$('#relatedLabel').show();
var widgetBuilder = new WidgetBuilder();
var panel = $('#indicatorsDataGridStack').data('gridstack');
panel.remove_all();
$('#relatedDetailGridStack').data('gridstack').remove_all();
var $widget = widgetBuilder.buildSpecialIndicatorFirstView(presenterData);
panel.add_widget($widget, 0, 15, 20, 4.7, true);
var peiParams = {
canvas : {
containerId:'specialIndicatorGraph',
width:300,
height:300,
stretch:true
},
graph: {
allowDrillDown:false,
allowTransition:true,
showTip: true,
allowZoom: false,
gapWidth:0.3,
useShadows: true,
thickness: 30,
showLabels: true
}
};
var ueiParams = {
canvas : {
containerId:'specialIndicatorGraph',
width:500,
height:300,
stretch:true
},
graph: {
allowDrillDown:false,
allowTransition:true,
axisX:{ showAxis: true, label: "Group" },
axisY:{ showAxis: true, label: "Cost" },
gridLinesX:false,
gridLinesY:true,
showTip: true,
allowZoom: false,
useShadows: true,
paddingTop: 50
}
};
var indicatorPrincipalData = widgetBuilder.getIndicatorLoadedById(presenterData.id)
if (indicatorPrincipalData.type == "1010") {
var graph = new Pie3DChart(presenterData.dataToDraw, peiParams, null, null);
graph.drawChart();
//the pie chart goes to much upwards,so a margin is added:
$('#specialIndicatorGraph').css('margin-top','60px');
}
if (indicatorPrincipalData.type == "1030") {
var graph = new BarChart(presenterData.dataToDraw, ueiParams, null, null);
graph.drawChart();
}
this.fillSpecialIndicatorFirstViewDetail(presenter.orderDataList(presenterData.data, selectedOrderOfDetailList()));
setIndicatorActiveMarker();
}
var fillSpecialIndicatorFirstViewDetail = function (list) {
//presenterData = { id: "indId", efficiencyIndex: "0.11764706", efficiencyVariation: -0.08235294,
// inefficiencyCost: "-127.5000", inefficiencyCostToShow: -127, efficiencyIndexToShow: 0.12
// data: {indicatorId, uid, name, averateTime...}, dataToDraw: [{datalabe, value}] }
var widgetBuilder = new WidgetBuilder();
var gridDetail = $('#relatedDetailGridStack').data('gridstack');
gridDetail.remove_all();
window.currentDetailList = list;
window.currentDetailFunction = fillSpecialIndicatorFirstViewDetail;
$.each(list, function(index, dataItem) {
var $widget = widgetBuilder.buildSpecialIndicatorFirstViewDetail(dataItem);
var x = (index % 2 == 0) ? 6 : 0;
//the first 2 elements are not hidden
if (index < 2) {
$widget.removeClass("hideme");
}
gridDetail.add_widget($widget, x, 15, 6, 2, true);
});
if (window.currentIndicator.type == "1010") {
$('#relatedLabel').find('h3').text(G_STRING['ID_RELATED_PROCESS']);
}
if (window.currentIndicator.type == "1030") {
$('#relatedLabel').find('h3').text(G_STRING['ID_RELATED_GROUPS']);
}
hideScrollIfAllDivsAreVisible();
}
var fillSpecialIndicatorSecondView = function(presenterData) {
//presenterData= object {dataToDraw[], entityData[] //user/tasks data}
var widgetBuilder = new WidgetBuilder();
var panel = $('#indicatorsDataGridStack').data('gridstack');
panel.remove_all();
var $widget = widgetBuilder.buildSpecialIndicatorSecondView(presenterData);
panel.add_widget($widget, 0, 15, 20, 4.7, true);
var detailParams = {
canvas : {
containerId:'specialIndicatorGraph',
width:300,
height:300,
stretch:true
},
graph: {
allowTransition: false,
allowDrillDown: true,
showTip: true,
allowZoom: false,
useShadows: false,
gridLinesX: true,
gridLinesY: true,
area: {visible: false, css:"area"},
axisX:{ showAxis: true, label: "User" },
axisY:{ showAxis: true, label: "Cost" },
showErrorBars: true
}
};
var indicatorPrincipalData = widgetBuilder.getIndicatorLoadedById(window.currentEntityData.indicatorId);
if (window.currentIndicator.type == "1010") {
detailParams.graph.axisX.label = "Task";
var graph = new BarChart(presenterData.dataToDraw, detailParams, null, null);
graph.drawChart();
}
if (window.currentIndicator.type == "1030") {
var graph = new BarChart(presenterData.dataToDraw, detailParams, null, null);
graph.drawChart();
}
this.fillSpecialIndicatorSecondViewDetail(presenter.orderDataList(presenterData.entityData, selectedOrderOfDetailList()));
}
var fillSpecialIndicatorSecondViewDetail = function (list) {
//presenterData = { entityData: Array[{name,uid,inefficiencyCost,
// inefficiencyIndex, deviationTime,
// averageTime}],
// dataToDraw: Array[{datalabel, value}] }
var widgetBuilder = new WidgetBuilder();
var gridDetail = $('#relatedDetailGridStack').data('gridstack');
gridDetail.remove_all();
window.currentDetailList = list;
window.currentDetailFunction = fillSpecialIndicatorSecondViewDetail;
$.each(list, function(index, dataItem) {
if (window.currentIndicator.type == "1010") {
var $widget = widgetBuilder.buildSpecialIndicatorSecondViewDetailPei(dataItem);
}
if (window.currentIndicator.type == "1030") {
var $widget = widgetBuilder.buildSpecialIndicatorSecondViewDetailUei(dataItem);
}
var x = (index % 2 == 0) ? 6 : 0;
//the first 2 elements are not hidden
if (index < 2) {
$widget.removeClass("hideme");
}
gridDetail.add_widget($widget, x, 15, 6, 2, true);
});
if (window.currentIndicator.type == "1010") {
$('#relatedLabel').find('h3').text(G_STRING['ID_RELATED_TASKS']);
}
if (window.currentIndicator.type == "1030") {
$('#relatedLabel').find('h3').text(G_STRING['ID_RELATED_USERS']);
}
hideScrollIfAllDivsAreVisible();
}
var fillGeneralIndicatorFirstView = function (presenterData) {
var widgetBuilder = new WidgetBuilder();
var panel = $('#indicatorsDataGridStack').data('gridstack');
panel.remove_all();
$('#relatedDetailGridStack').data('gridstack').remove_all();
var $widget = widgetBuilder.buildGeneralIndicatorFirstView(presenterData);
panel.add_widget($widget, 0, 15, 20, 4.7, true);
$('#relatedLabel').find('h3').text('');
var generalLineParams1 = {
canvas : {
containerId:'generalGraph1',
width:300,
height:300,
stretch:true
},
graph: {
allowTransition: false,
allowDrillDown: true,
showTip: true,
allowZoom: false,
useShadows: false,
gridLinesX: true,
gridLinesY: true,
area: {visible: false, css:"area"},
axisX:{ showAxis: true, label: G_STRING.ID_PROCESS_TASKS },
axisY:{ showAxis: true, label: G_STRING.ID_TIME_HOURS },
showErrorBars: false
}
};
var generalLineParams2 = {
canvas : {
containerId:'generalGraph2',
width:300,
height:300,
stretch:true
},
graph: {
allowTransition: false,
allowDrillDown: true,
showTip: true,
allowZoom: false,
useShadows: false,
gridLinesX: true,
gridLinesY: true,
area: {visible: false, css:"area"},
axisX:{ showAxis: true, label: G_STRING.ID_PROCESS_TASKS },
axisY:{ showAxis: true, label: G_STRING.ID_TIME_HOURS },
showErrorBars: false
}
};
var generalBarParams1 = {
canvas : {
containerId:'generalGraph1',
width:300,
height:300,
stretch:true
},
graph: {
allowDrillDown:false,
allowTransition:true,
axisX:{ showAxis: true, label: G_STRING.ID_YEAR },
axisY:{ showAxis: true, label: "Q" },
gridLinesX:false,
gridLinesY:true,
showTip: true,
allowZoom: false,
useShadows: true,
paddingTop: 50,
colorPalette: ['#5486bf','#bf8d54','#acb30c','#7a0c0c','#bc0000','#906090','#007efb','#62284a','#0c7a7a','#74a9a9']
}
};
var generalBarParams2 = {
canvas : {
containerId:'generalGraph2',
width:300,
height:300,
stretch:true
},
graph: {
allowDrillDown:false,
allowTransition:true,
axisX:{ showAxis: true, label: G_STRING.ID_YEAR },
axisY:{ showAxis: true, label: "Q" },
gridLinesX:false,
gridLinesY:true,
showTip: true,
allowZoom: false,
useShadows: true,
paddingTop: 50,
colorPalette: ['#5486bf','#bf8d54','#acb30c','#7a0c0c','#bc0000','#906090','#007efb','#62284a','#0c7a7a','#74a9a9']
}
};
var graph1 = null;
if (presenterData.graph1Type == '10') {
generalBarParams1.graph.axisX.label = presenterData.graph1XLabel;
generalBarParams1.graph.axisY.label = presenterData.graph1YLabel;
graph1 = new BarChart(presenterData.graph1Data, generalBarParams1, null, null);
} else {
generalLineParams1.graph.axisX.label = presenterData.graph1XLabel;
generalLineParams1.graph.axisY.label = presenterData.graph1YLabel;
graph1 = new LineChart(presenterData.graph1Data, generalLineParams1, null, null);
}
graph1.drawChart();
var graph2 = null;
if (presenterData.graph2Type == '10') {
generalBarParams2.graph.axisX.label = presenterData.graph2XLabel;
generalBarParams2.graph.axisY.label = presenterData.graph2YLabel;
graph2 = new BarChart(presenterData.graph2Data, generalBarParams2, null, null);
} else {
generalLineParams2.graph.axisX.label = presenterData.graph2XLabel;
generalLineParams2.graph.axisY.label = presenterData.graph2YLabel;
graph2 = new LineChart(presenterData.graph2Data, generalLineParams2, null, null);
}
graph2.drawChart();
setIndicatorActiveMarker();
}
var animateProgress = function (indicatorItem, widget){
var getRequestAnimationFrame = function () {
return window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.oRequestAnimationFrame ||
window.msRequestAnimationFrame ||
function ( callback ){
window.setTimeout(enroute, 1 / 60 * 1000);
};
};
var fpAnimationFrame = getRequestAnimationFrame();
var i = 0;
var j = 0;
var indicator = indicatorItem;
var animacion = function () {
var intComparative = parseInt(indicator.comparative);
var divId = "#indicatorButton" + indicator.id;
var $valueLabel = widget
.find('.ind-value-selector');
var $progressBar = widget
.find('.ind-progress-selector');
if (!($valueLabel.length > 0)) {throw new Error ('"No ind-value-selector found for " + divId');}
this.helper.assert($progressBar.length > 0, "No ind-progress-selector found for " + divId);
$progressBar.attr('aria-valuemax', intComparative);
var indexToPaint = Math.min(indicator.value * 100 / intComparative, 100);
if (i <= indexToPaint) {
$progressBar.css('width', i+'%').attr('aria-valuenow', i);
i++;
fpAnimationFrame(animacion);
}
if(j <= indicator.value){
$valueLabel.text(j + "%");
j++;
fpAnimationFrame(animacion);
}
}
fpAnimationFrame(animacion);
};
/*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="dasB" type="button" class="btn btn-success">'+ G_STRING.ID_MANAGERS_DASHBOARDS +'</button> \
</div>';*/

View File

@@ -149,16 +149,30 @@ try {
}
break;
case 'authSourcesNew':
$pluginRegistry = &PMPluginRegistry::getSingleton();
$arr = Array ();
$oDirectory = dir( PATH_RBAC . 'plugins' . PATH_SEP );
$aAuthSourceTypes = array ();
while ($sObject = $oDirectory->read()) {
if (($sObject != '.') && ($sObject != '..') && ($sObject != '.svn') && ($sObject != 'ldap')) {
if (is_file( PATH_RBAC . 'plugins' . PATH_SEP . $sObject )) {
$sType = trim( str_replace( 'class.', '', str_replace( '.php', '', $sObject ) ) );
$aAuthSourceTypes['sType'] = $sType;
$aAuthSourceTypes['sLabel'] = $sType;
$arr[] = $aAuthSourceTypes;
$sType = trim(str_replace(array("class.", ".php"), "", $sObject));
$statusPlugin = $pluginRegistry->getStatusPlugin($sType);
$flagAdd = false;
if (preg_match("/^(?:enabled|disabled)$/", $statusPlugin)) {
if ($statusPlugin == "enabled") {
$flagAdd = true;
}
} else {
$flagAdd = true;
}
if ($flagAdd) {
$arr[] = array("sType" => $sType, "sLabel" => $sType);
}
}
}
}

View File

@@ -42,6 +42,12 @@ switch ($action) {
$urlProxy = 'proxyCasesList';
$action = 'unassigned';
break;
case 'to_revise':
$urlProxy = 'proxyCasesList';
break;
case 'to_reassign':
$urlProxy = 'proxyCasesList';
break;
}
/*----------------------------------********---------------------------------*/

View File

@@ -861,15 +861,33 @@ class Cases
*
* @access public
* @param string $app_uid, Uid for case
* @param string $usr_uid, Uid user
* @return array
*
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
* @copyright Colosa - Bolivia
*/
public function deleteCase($app_uid)
public function deleteCase($app_uid, $usr_uid)
{
Validator::isString($app_uid, '$app_uid');
Validator::appUid($app_uid, '$app_uid');
$criteria = new \Criteria();
$criteria->addSelectColumn( \ApplicationPeer::APP_STATUS );
$criteria->addSelectColumn( \ApplicationPeer::APP_INIT_USER );
$criteria->add( \ApplicationPeer::APP_UID, $app_uid, \Criteria::EQUAL );
$dataset = \ApplicationPeer::doSelectRS($criteria);
$dataset->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
$dataset->next();
$aRow = $dataset->getRow();
if ($aRow['APP_STATUS'] != 'DRAFT') {
throw (new \Exception(\G::LoadTranslation("ID_DELETE_CASE_NO_STATUS")));
}
if ($aRow['APP_INIT_USER'] != $usr_uid) {
throw (new \Exception(\G::LoadTranslation("ID_DELETE_CASE_NO_OWNER")));
}
$case = new \Cases();
$case->removeCase( $app_uid );
}

View File

@@ -190,12 +190,11 @@ class FilesManager
break;
}
$content = $aData['prf_content'];
if (is_string($content)) {
if (file_exists($sDirectory)) {
$directory = $sMainDirectory. PATH_SEP . $sSubDirectory . $aData['prf_filename'];
throw new \Exception(\G::LoadTranslation("ID_EXISTS_FILE", array($directory)));
}
if (file_exists($sDirectory) ) {
$directory = $sMainDirectory. PATH_SEP . $sSubDirectory . $aData['prf_filename'];
throw new \Exception(\G::LoadTranslation("ID_EXISTS_FILE", array($directory)));
}
if (!file_exists($sCheckDirectory)) {
$sPkProcessFiles = \G::generateUniqueID();
$oProcessFiles = new \ProcessFiles();
@@ -555,4 +554,3 @@ class FilesManager
}
}
}

View File

@@ -33,7 +33,7 @@ class ReportingIndicators
$retval = array(
"id" => $indicatorUid,
"efficiencyIndex" => $peiValue,
"efficiencyIndexCompare" => $peiCompare,
"efficiencyIndexToCompare" => $peiCompare,
"efficiencyVariation" => ($peiValue-$peiCompare),
"inefficiencyCost" => $peiCost,
"data"=>$processes);
@@ -68,6 +68,7 @@ class ReportingIndicators
"efficiencyIndex" => $ueiValue,
"efficiencyVariation" => ($ueiValue-$ueiCompare),
"inefficiencyCost" => $ueiCost,
"efficiencyIndexToCompare" => $ueiCompare,
"data"=>$groups);
return $retval;
}

View File

@@ -363,7 +363,7 @@ class User
/*----------------------------------********---------------------------------*/
$this->getFieldNameByFormatFieldName("USR_COST_BY_HOUR") => $record["USR_COST_BY_HOUR"],
$this->getFieldNameByFormatFieldName("USR_UNIT_COST") => $record["USR_UNIT_COST"],
/*---------------------------------********---------------------------------*/
/*----------------------------------********---------------------------------*/
$this->getFieldNameByFormatFieldName("USR_TOTAL_INBOX") => $record["USR_TOTAL_INBOX"],
$this->getFieldNameByFormatFieldName("USR_TOTAL_DRAFT") => $record["USR_TOTAL_DRAFT"],
$this->getFieldNameByFormatFieldName("USR_TOTAL_CANCELLED") => $record["USR_TOTAL_CANCELLED"],

View File

@@ -497,7 +497,10 @@ class BpmnWorkflow extends Project\Bpmn
//Setting as start Task
//or
//Remove as start Task
$this->wp->setStartTask($arrayFlowData["FLO_ELEMENT_DEST"], $flagStartTask);
$bwp = new self;
if ($bwp->getActivity($arrayFlowData["FLO_ELEMENT_DEST"])) {
$this->wp->setStartTask($arrayFlowData["FLO_ELEMENT_DEST"], $flagStartTask);
}
break;
}
}
@@ -1384,6 +1387,10 @@ class BpmnWorkflow extends Project\Bpmn
$activity = $bwp->getActivity($activityData["ACT_UID"]);
if ($activity["BOU_CONTAINER"] != $activityData["BOU_CONTAINER"]) {
$activity = null;
}
if ($forceInsert || is_null($activity)) {
if ($generateUid) {
//Generate and update UID

View File

@@ -809,8 +809,9 @@ class Cases extends Api
public function doDeleteCase($cas_uid)
{
try {
$usr_uid = $this->getUserId();
$cases = new \ProcessMaker\BusinessModel\Cases();
$cases->deleteCase($cas_uid);
$cases->deleteCase($cas_uid, $usr_uid);
} catch (\Exception $e) {
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
}

View File

@@ -317,6 +317,11 @@ CloseWindow = function(){
Ext.getCmp('w').hide();
};
SaveNewDepartment = function(){
if( newForm.getForm().findField('dep_name').getValue().trim() == "") {
Ext.Msg.alert(_('ID_WARNING'), _("ID_FIELD_REQUIRED", _("ID_DEPARTMENT_NAME")));
newForm.getForm().findField('dep_name').setValue("");
return false;
}
waitLoading.show();
var dep_node = Ext.getCmp('treePanel').getSelectionModel().getSelectedNode();
if (dep_node) dep_node.unselect();

View File

@@ -79,6 +79,7 @@
</head>
<body onresize="resizingFrame();">
<!--<div class="ui-layout-north">-->
<div class="loader"></div>
<section class="navBar" id="idNavBar">
<div class="head"></div>
<nav>

View File

@@ -182,7 +182,13 @@ Ext.onReady(function(){
text: _("ID_SAVE"),
handler: function (btn, ev)
{
Ext.getCmp("btnCreateSave").setDisabled(true);
if( newForm.getForm().findField('name').getValue().trim() == "") {
Ext.Msg.alert(_('ID_WARNING'), _("ID_FIELD_REQUIRED", _("ID_GROUP_NAME")));
newForm.getForm().findField('name').setValue("");
return false;
} else {
Ext.getCmp("btnCreateSave").setDisabled(true);
}
SaveNewGroupAction();
}

View File

@@ -207,10 +207,10 @@ Ext.onReady(function(){
Ext.Ajax.request({
url: 'checkDatabases',
success: function(response){
var existMsg = '<span style="color: red;">' + _('ID_EXIST') + '</span>';
var noExistsMsg = '<span style="color: green;">' + _('ID_NO_EXIST') + '</span>';
var existMsg = '<span style="color: red;">' + _('ID_NOT_AVAILABLE_DATABASE') + '</span>';
var noExistsMsg = '<span style="color: green;">' + _('ID_AVAILABLE_DATABASE') + '</span>';
var response = Ext.util.JSON.decode(response.responseText);
Ext.get('wfDatabaseSpan').dom.innerHTML = (response.wfDatabaseExists ? existMsg : noExistsMsg);
Ext.get('database_message').dom.innerHTML = (response.wfDatabaseExists ? existMsg : noExistsMsg);
var dbFlag = ((!response.wfDatabaseExists) || Ext.getCmp('deleteDB').getValue());
wizard.onClientValidation(4, dbFlag);
@@ -784,7 +784,7 @@ Ext.onReady(function(){
}),
{
xtype : 'textfield',
fieldLabel: _('ID_WF_DATABASE_NAME') + ' <span id="wfDatabaseSpan"></span>',
fieldLabel: _('ID_WF_DATABASE_NAME'),
id : 'wfDatabase',
value :'wf_workflow',
allowBlank : false,
@@ -799,6 +799,10 @@ Ext.onReady(function(){
wizard.onClientValidation(4, false);
}}
},
{
xtype : 'displayfield',
id : 'database_message'
},
new Ext.form.Checkbox({
boxLabel : _('ID_DELETE_DATABASES'),
id : 'deleteDB',

View File

@@ -1402,7 +1402,11 @@ importProcessBpmnSubmit = function () {
return;
}
Ext.getCmp('importProcessWindow').close();
window.location.href = "../designer?prj_uid=" + resp_.prj_uid;
if (typeof(importProcessGlobal.processFileType) != "undefined" && importProcessGlobal.processFileType == "bpmn") {
openWindowIfIE("../designer?prj_uid=" + resp_.prj_uid);
} else {
window.location.href = "processes_Map?PRO_UID=" + resp_.prj_uid;
}
},
failure: function (o, resp) {
Ext.getCmp('importProcessWindow').close();

View File

@@ -79,11 +79,13 @@ Ext.onReady( function() {
items : [
{
id : 'DAS_TITLE',
fieldLabel : _('ID_DASHBOARD_TITLE'),
fieldLabel : _('ID_DASHBOARD_TITLE')+ ' *',
xtype : 'textfield',
anchor : '85%',
maxLength : 250,
maskRe : /([a-zA-Z0-9\s]+)$/,
maskRe : /([a-zA-Z0-9_'\s]+)$/,
regex : /([a-zA-Z0-9_'\s]+)$/,
regexText : _('ID_INVALID_VALUE', _('ID_DASHBOARD_TITLE')),
allowBlank : false
},
{
@@ -92,7 +94,7 @@ Ext.onReady( function() {
fieldLabel : _('ID_DESCRIPTION'),
labelSeparator : '',
anchor : '85%',
maskRe : /([a-zA-Z0-9\s]+)$/,
maskRe : /([a-zA-Z0-9_'\s]+)$/,
height : 50,
}
]
@@ -528,13 +530,14 @@ Ext.onReady( function() {
flag = true;
break;
case 'yes':
tabPanel.getItem(component.id).show();
flag = false;
var dasIndUid = Ext.getCmp('DAS_IND_UID_'+component.id).getValue();
if (typeof dasIndUid != 'undefined' && dasIndUid != '') {
removeIndicator(dasIndUid);
}
tabActivate.remove(component.id);
tabPanel.remove(component);
tabPanel.remove(component, true);
break;
}
},
@@ -671,7 +674,6 @@ Ext.onReady( function() {
]
});
ownerInfoGrid.store.load();
ownerInfoGrid.on("afterrender", function(component) {
component.getBottomToolbar().refresh.hideParent = true;
component.getBottomToolbar().refresh.hide();
@@ -698,6 +700,7 @@ Ext.onReady( function() {
}
dashboardOwnerFields.items.items[0].bindStore(dataUserGroup);
} );
storeUsers.on( 'load', function( store, records, options ) {
for (var i=0; i< store.data.length; i++) {
row = [];
@@ -751,11 +754,13 @@ var addTab = function (flag) {
hidden : true
},
{
fieldLabel : _('ID_INDICATOR_TITLE'),
fieldLabel : _('ID_INDICATOR_TITLE')+ ' *',
id : 'IND_TITLE_'+ indexTab,
xtype : 'textfield',
anchor : '85%',
maskRe : /([a-zA-Z0-9\s]+)$/,
maskRe : /([a-zA-Z0-9_'\s]+)$/,
regex : /([a-zA-Z0-9_'\s]+)$/,
regexText : _('ID_INVALID_VALUE', _('ID_INDICATOR_TITLE')),
maxLength : 250,
allowBlank : false
},
@@ -763,7 +768,7 @@ var addTab = function (flag) {
anchor : '85%',
editable : false,
id : 'IND_TYPE_'+ indexTab,
fieldLabel : _('ID_INDICATOR_TYPE'),
fieldLabel : _('ID_INDICATOR_TYPE')+ ' *',
displayField : 'CAT_LABEL_ID',
valueField : 'CAT_UID',
forceSelection : false,
@@ -782,6 +787,7 @@ var addTab = function (flag) {
var fields = ['DAS_IND_FIRST_FIGURE_'+index,'DAS_IND_FIRST_FREQUENCY_'+index,'DAS_IND_SECOND_FIGURE_'+index, 'DAS_IND_SECOND_FREQUENCY_'+index];
if (value == '1050') {
field = Ext.getCmp('IND_PROCESS_'+index);
field.setValue('0');
field.disable();
field.hide();
} else {
@@ -874,18 +880,17 @@ var addTab = function (flag) {
new Ext.form.ComboBox({
anchor : '85%',
editable : false,
fieldLabel : _('ID_PROCESS'),
fieldLabel : _('ID_PROCESS')+ ' *',
id : 'IND_PROCESS_'+ indexTab,
displayField : 'prj_name',
valueField : 'prj_uid',
forceSelection : false,
forceSelection : true,
emptyText : _('ID_EMPTY_PROCESSES'),
selectOnFocus : true,
hidden : true,
typeAhead : true,
autocomplete : true,
triggerAction : 'all',
value : '0',
store : storeProject
}),
new Ext.form.ComboBox({
@@ -1086,7 +1091,6 @@ var saveDashboard = function () {
},
data: JSON.stringify(data),
success: function (response) {
var jsonResp = Ext.util.JSON.decode(response.responseText);
saveAllDashboardOwner(DAS_UID);
saveAllIndicators(DAS_UID);
myMask.hide();
@@ -1109,11 +1113,25 @@ var saveAllIndicators = function (DAS_UID) {
tabPanel.getItem(tabActivate[tab]).show();
var fieldsTab = tabPanel.getItem(tabActivate[tab]).items.items[0].items.items[0].items.items;
if (fieldsTab[1].getValue().trim() == '') {
PMExt.warning(_('ID_DASHBOARD'), _('ID_INDICATOR_TITLE_REQUIRED', tabPanel.getItem(tabActivate[tab]).title));
fieldsTab[1].focus(true,10);
return false;
} else if (fieldsTab[2].getValue().trim() == '') {
PMExt.warning(_('ID_DASHBOARD'), _('ID_INDICATOR_TYPE_REQUIRED', tabPanel.getItem(tabActivate[tab]).title));
fieldsTab[2].focus(true,10);
return false;
} else if (fieldsTab[2].getValue() != '1050' && fieldsTab[4].getValue().trim() == '') {
PMExt.warning(_('ID_DASHBOARD'), _('ID_INDICATOR_PROCESS_REQUIRED', tabPanel.getItem(tabActivate[tab]).title));
fieldsTab[4].focus(true,10);
return false;
}
var goal = fieldsTab[3];
fieldsTab.push(goal.items.items[0]);
fieldsTab.push(goal.items.items[1]);
data = [];
var data = [];
data['DAS_UID'] = DAS_UID;
for (var index in fieldsTab) {
@@ -1122,12 +1140,12 @@ var saveAllIndicators = function (DAS_UID) {
continue;
}
id = node.id;
var id = node.id;
if (typeof id == 'undefined' || id.indexOf('fieldSet_') != -1 ) {
continue;
}
id = id.split('_');
field = '';
var field = '';
for (var part = 0; part<id.length-1; part++) {
if (part == 0) {
field = id[part];
@@ -1135,25 +1153,7 @@ var saveAllIndicators = function (DAS_UID) {
field = field+'_'+id[part];
}
}
value = node.getValue();
if (field == 'IND_TITLE' && value.trim() == '') {
PMExt.warning(_('ID_DASHBOARD'), _('ID_INDICATOR_TITLE_REQUIRED', tabPanel.getItem(tabActivate[tab]).title));
node.focus(true,10);
return false;
} else if (field == 'IND_TYPE' && value.trim() == '') {
PMExt.warning(_('ID_DASHBOARD'), _('ID_INDICATOR_TYPE_REQUIRED', tabPanel.getItem(tabActivate[tab]).title));
node.focus(true,10);
return false;
} else if (field == 'IND_GOAL' && value.trim() == '') {
PMExt.warning(_('ID_DASHBOARD'), _('ID_INDICATOR_GOAL_REQUIRED', tabPanel.getItem(tabActivate[tab]).title));
node.focus(true,10);
return false;
} else if (field == 'IND_PROCESS' && value.trim() == '') {
PMExt.warning(_('ID_DASHBOARD'), _('ID_INDICATOR_PROCESS_REQUIRED', tabPanel.getItem(tabActivate[tab]).title));
node.focus(true,10);
return false;
}
var value = node.getValue();
field = field == 'IND_TITLE' ? 'DAS_IND_TITLE' : field;
field = field == 'IND_TYPE' ? 'DAS_IND_TYPE' : field;

View File

@@ -55,7 +55,9 @@
<div class="huge ind-value-selector"><%- indicator.value %></div>
</div>
<div class="col-xs-9 text-right"><i class="ind-symbol-selector fa fa-chevron-up fa-3x"></i>
<div class="small ind-comparative-selector"><%- indicator.comparative %></div>
<div class="small ind-comparative-selector">
<%- indicator.comparative %> (<%- indicator.percentComparative %> %)
</div>
</div>
</div>
</div>
@@ -209,14 +211,18 @@
</div>
<div class="text-center huge">
<div class="col-xs-12 vcenter-task">
<div class="col-xs-5 ">
<div class="col-xs-4 ">
<div class="blue small"><%- detailData.efficiencyIndexToShow%></div>
<div class="smallB grey fontMedium detail-efficiency-selector ellipsis"></div>
<div class="smallB grey detail-efficiency-selector ellipsis"></div>
</div>
<div class="col-xs-5 ">
<div class="col-xs-4 ">
<div class="small detail-cost-number-selector"><%- detailData.inefficiencyCostToShow%></div>
<div class="smallB grey detail-cost-selector ellipsis"></div>
</div>
<div class="col-xs-4 ">
<div class="blue small"><%- detailData.deviationTimeToShow%></div>
<div class="smallB grey detail-sdv-selector ellipsis">SDV</div>
</div>
</div>
<div class="clearfix"></div>
</div>
@@ -236,15 +242,15 @@
<div class="col-xs-12 vcenter-task">
<div class="col-xs-4 ">
<div class="blue small"><%- detailData.percentageOverdue%> %</div>
<div class="smallB grey fontMedium detail-efficiency-selector">Overdue</div>
<div class="smallB grey fontMedium detail-efficiency-selector">{translate label="ID_OVERDUE"}</div>
</div>
<div class="col-xs-4">
<div class="blue small"><%- detailData.percentageAtRisk%> %</div>
<div class="smallB grey fontMedium detail-efficiency-selector">At Risk</div>
<div class="smallB grey fontMedium detail-efficiency-selector">{translate label="ID_AT_RISK"}</div>
</div>
<div class="col-xs-4 ">
<div class="blue small"><%- detailData.percentageOnTime%> %</div>
<div class="smallB grey fontMedium detail-efficiency-selector">On Time</div>
<div class="smallB grey fontMedium detail-efficiency-selector">{translate label="ID_ON_TIME"}</div>
</div>
</div>
<div class="clearfix"></div>
@@ -286,18 +292,18 @@
<li class="ind-title-selector"></li>
</ol>
</div>
<div class="text-center huge" style="margin:0 auto; width:90%;">
<div class="text-center huge" style="margin:0 auto; width:98%;">
<div class="col-xs-4" style="width:auto;">
<div class="status-graph-title-low">Overdue:</div>
<div id="graph1" style="width:450px; height:300px;"></div>
<div class="status-graph-title-low">{translate label="ID_OVERDUE"}:</div>
<div id="graph1" style="width:400px; height:300px;"></div>
</div>
<div class="col-xs-4" style="width:auto;">
<div class="status-graph-title-medium">At Risk:</div>
<div id="graph2" style="width:450px; height:300px;"></div>
<div class="status-graph-title-medium">{translate label="ID_AT_RISK"}:</div>
<div id="graph2" style="width:400px; height:300px;"></div>
</div>
<div class="col-xs-4" style="width:auto;">
<div class="status-graph-title-high">On Time:</div>
<div id="graph3" style="width:450px; height:300px;"></div>
<div class="status-graph-title-high">{translate label="ID_ON_TIME"}:</div>
<div id="graph3" style="width:400px; height:300px;"></div>
</div>
</div>
<div class="clearfix"></div>
@@ -399,7 +405,7 @@
<center><h3></h3></center>
</div>
<div>
Sort: &nbsp; &nbsp;<a id="sortListButton" class="fa fa-chevron-down fa-1x" style="color:#000;" href="#"></a>
Sort by Cost: &nbsp; &nbsp;<a id="sortListButton" class="fa fa-chevron-up fa-1x" style="color:#000;" href="#"></a>
</div>
</div>

View File

@@ -1,17 +1,450 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Dashboards</title>
<link rel="stylesheet" href="/lib/pmdynaform/libs/bootstrap-3.1.1/css/bootstrap.min.css">
<link rel="stylesheet" href="/css/sb-admin-2.css">
<link rel="stylesheet" href="/css/font-awesome.min.css">
<link href="/css/gridstack.css" rel="stylesheet">
<link href="/css/general.css" rel="stylesheet">
<link href="/css/dashboardStylesForIE.css" rel="stylesheet">
<link href='http://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Chivo:400,400italic' rel='stylesheet' type='text/css'>
<script type="text/javascript" src="/js/jquery/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="/js/jquery/jquery-ui-1.11.2.min.js" ></script>
<script src="/lib/pmdynaform/libs/bootstrap-3.1.1/js/bootstrap.min.js"></script>
<script src="/lib/pmdynaform/libs/underscore/underscore.js"></script>
<script type="text/javascript" >
var urlProxy = '{$urlProxy}';
var pageUserId = '{$usrId}';
var token = '{$credentials.access_token}';
var G_STRING = [];
{foreach from=$translation key=index item=option}
G_STRING['{$index}'] = "{$option}";
{/foreach}
</script>
<script type="text/javascript" src="/jscore/strategicDashboard/viewDashboardHelper.js"></script>
<script type="text/javascript" src="/jscore/strategicDashboard/viewDashboardModel.js"></script>
<script type="text/javascript" src="/jscore/strategicDashboard/viewDashboardPresenter.js"></script>
<script type="text/javascript" src="/jscore/strategicDashboard/viewDashboardViewIE.js"></script>
<script type="text/template" class="specialIndicatorButtonTemplate">
<div class="col-lg-3 col-md-6 dashPro ind-button-selector"
id="indicatorButton-<%- indicator.id %>"
data-indicator-id="<%- indicator.id %>"
data-indicator-type="<%- indicator.type %>"
data-gs-min-width="3" data-gs-min-height="2" data-gs-max-height="2">
<div class="ind-container-selector panel panel-green grid-stack-item-content" style="min-width:200px;">
<a data-toggle="collapse" href="#efficiencyindex" aria-expanded="false" aria-controls="efficiencyindex">
<div class="panel-heading" >
<div class="row">
<div class="col-xs-3">
<div class="huge ind-value-selector"><%- indicator.value %></div>
</div>
<div class="col-xs-9 text-right"><i class="ind-symbol-selector fa fa-chevron-up fa-3x"></i>
<div class="small ind-comparative-selector">
<%- indicator.comparative %> (<%- indicator.percentComparative %> %)
</div>
</div>
</div>
</div>
<div class="panel-footer text-center ind-title-selector">
<%- indicator.title %>
</div>
</a>
</div>
</div>
</script>
<script type="text/template" class="statusIndicatorButtonTemplate">
<div class="col-lg-3 col-md-6 dashPro ind-button-selector"
id="indicatorButton-<%- indicator.id %>"
data-indicator-id="<%- indicator.id %>"
data-indicator-type="<%- indicator.type %>"
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;">
<a data-toggle="collapse" href="#efficiencyindex" aria-expanded="false" aria-controls="efficiencyindex">
<div class="panel-heading status-indicator-low"
style=" width:<%- indicator.percentageOverdue %>%;
visibility: <%- indicator.overdueVisibility %>" >
<div class="row">
<div class="col-xs-12">
<div class="small ind-comparative-selector"><%- indicator.percentageOverdue %>%</div>
</div>
</div>
</div>
<div class="panel-heading status-indicator-medium"
style=" width:<%- indicator.percentageAtRisk %>%;
visibility: <%- indicator.atRiskVisibility %>;" >
<div class="row">
<div class="col-xs-12">
<div class="small ind-comparative-selector"><%- indicator.percentageAtRisk %>%</div>
</div>
</div>
</div>
<div class="panel-heading status-indicator-high"
style=" width:<%- indicator.percentageOnTime %>%;
visibility: <%- indicator.onTimeVisibility %>;">
<div class="row">
<div class="col-xs-12">
<div class="small ind-comparative-selector"><%- indicator.percentageOnTime %>%</div>
</div>
</div>
</div>
<div class="panel-footer text-center ind-title-selector" style="clear:both;">
<%- indicator.title %>
</div>
</a>
</div>
</div>
</script>
<script type="text/template" class="indicatorButtonTemplate">
<div class="col-lg-3 col-md-6 ind-button-selector" id="generalLowItem"
id="indicatorButton-<%- indicator.id %>"
data-indicator-id="<%- indicator.id %>"
data-indicator-type="<%- indicator.type %>"
data-gs-min-width="3" data-gs-min-height="2" data-gs-max-height="2" >
<div class="panel ie-panel panel-low grid-stack-item-content ind-container-selector" style="min-width: 200px;">
<a data-toggle="collapse" href="#completedcases" aria-expanded="false" aria-controls="completedcases">
<div class="panel-heading"> <div class="row"> <div class="col-xs-3">
<div class="huge ind-value-selector">X</div>
</div>
<div class="col-xs-9 text-right"><i class="fa fa-file-text-o fa-3x"></i>
<div class="small ind-comparative-selector ellipsis"><%- indicator.comparative %></div>
</div>
</div>
</div>
<div class="progress progress-xs progress-dark-base ie-progress-dark-base mar-no">
<div role="progressbar"
aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"
class="progress-bar progress-bar-light ind-progress-selector"
style="width: 0%">
</div>
</div>
<div class="panel-footer text-center ind-title-selector">
<span>
<%- indicator.title %>
</span>
</div>
</a>
</div>
</div>
</script>
<script type="text/template" class="specialIndicatorMainPanel">
<div class="process-div well" id="specialIndicatorMainPanel"
data-gs-no-resize="true"
style="clear:both;position:relative;height:auto;">
<div class="panel-heading bluebg sind-title-selector"">
<ol class="breadcrumb">
</ol>
</div>
<div class="text-center huge">
<div class="col-xs-3 vcenter">
<div class="green"><%- indicator.efficiencyIndexToShow %></div>
<div class="small grey sind-index-selector ellipsis"></div>
</div>
<div class="col-xs-3 vcenter" style="margin-right:40px">
<div class="red sind-cost-number-selector"><%- indicator.inefficiencyCostToShow %></div>
<div class="small grey sind-cost-selector ellipsis"></div>
</div>
<div class="col-xs-6" id="specialIndicatorGraph" style="width:540px;height:300px;"></div>
</div>
<div class="clearfix"></div>
</div>
</script>
<script type="text/template" class="specialIndicatorDetail">
<div class="process-div well hideme detail-button-selector" data-gs-no-resize="true"
id="detailData-<%- detailData.uid %>"
data-indicator-id="<%- detailData.indicatorId %>"
data-detail-id="<%- detailData.uid %>"
data-detail-index="<%- detailData.efficiencyIndexToShow %>"
data-detail-cost-to-show="<%- detailData.inefficiencyCostToShow %>"
data-detail-cost="<%- detailData.inefficiencyCost%>"
data-detail-name="<%- detailData.name %>"
>
<div class="col-lg-12 vcenter-task">
<a href="#" class="process-button">
<div class="col-xs-5 text-left title-process">
<div class="small grey detail-title-selector"> <%- detailData.name %></div>
</div>
<div class="col-xs-3 text-center ">
<div class="blue"><%- detailData.efficiencyIndexToShow%></div>
<div class="small grey detail-efficiency-selector ellipsis"></div>
</div>
<div class="col-xs-3 text-center ">
<div class="red detail-cost-number-selector"><%- detailData.inefficiencyCostToShow %></div>
<div class="small grey detail-cost-selector ellipsis"></div>
</div>
<div class="col-xs-1 text-right arrow"><i class="fa fa-chevron-right fa-fw"></i></div>
</a>
</div>
<div class="clearfix"></div>
</div>
</script>
<script type="text/template" class="specialIndicatorSencondViewDetailUei">
<div class="process-div well hideme detail-button-selector" data-gs-no-resize="true"
id="detailData-<%- detailData.uid %>"
data-indicator-id="<%- detailData.indicatorId %>"
data-detail-id="<%- detailData.uid %>">
<div class="panel-heading greenbg">
<div class="col-xs-12 text-center detail-title-selector">
<i class="fa fa-tasks fa-fw"></i>
<span id="usrName"><%- detailData.name %> </span>
<span>(<%- detailData.rankToShow %>)</span>
</div>
<div class="clearfix"></div>
</div>
<div class="text-center huge">
<div class="col-xs-12 vcenter-task">
<div class="col-xs-6 ">
<div class="blue small"><%- detailData.efficiencyIndexToShow%></div>
<div class="smallB grey detail-efficiency-selector ellipsis"></div>
</div>
<div class="col-xs-6 ">
<div class="small detail-cost-number-selector"><%- detailData.inefficiencyCostToShow%></div>
<div class="smallB grey detail-cost-selector ellipsis"></div>
</div>
</div>
<div class="clearfix"></div>
</div>
</div>
</script>
<script type="text/template" class="specialIndicatorSencondViewDetailPei">
<div class="process-div well hideme detail-button-selector" data-gs-no-resize="true"
id="detailData-<%- detailData.uid %>"
data-indicator-id="<%- detailData.indicatorId %>"
data-detail-id="<%- detailData.uid %>">
<div class="panel-heading greenbg">
<div class="col-xs-12 text-center detail-title-selector">
<i class="fa fa-tasks fa-fw"></i>
<span id="usrName"><%- detailData.name %> </span>
</div>
<div class="clearfix"></div>
</div>
<div class="text-center huge">
<div class="col-xs-12 vcenter-task">
<div class="col-xs-6 ">
<div class="blue small"><%- detailData.efficiencyIndexToShow%></div>
<div class="smallB grey detail-efficiency-selector ellipsis"></div>
</div>
<div class="col-xs-6 ">
<div class="small detail-cost-number-selector"><%- detailData.inefficiencyCostToShow%></div>
<div class="smallB grey detail-cost-selector ellipsis"></div>
</div>
</div>
<div class="clearfix"></div>
</div>
</div>
</script>
<script type="text/template" class="statusDetail">
<div class="process-div well hideme detail-button-selector" data-gs-no-resize="true"
id="detailData-<%- detailData.uid %>"
data-indicator-id="<%- detailData.indicatorId %>"
data-detail-id="<%- detailData.uid %>">
<div class="panel-heading greenbg">
<div class="col-xs-12 text-center detail-title-selector"><i class="fa fa-tasks fa-fw"></i> <span id="usrName"><%- detailData.taskTitle %></span> </div>
<div class="clearfix"></div>
</div>
<div class="text-center huge">
<div class="col-xs-12 vcenter-task">
<div class="col-xs-4 ">
<div class="blue small"><%- detailData.percentageOverdue%> %</div>
<div class="smallB grey fontMedium detail-efficiency-selector">Overdue</div>
</div>
<div class="col-xs-4">
<div class="blue small"><%- detailData.percentageAtRisk%> %</div>
<div class="smallB grey fontMedium detail-efficiency-selector">At Risk</div>
</div>
<div class="col-xs-4 ">
<div class="blue small"><%- detailData.percentageOnTime%> %</div>
<div class="smallB grey fontMedium detail-efficiency-selector">On Time</div>
</div>
</div>
<div class="clearfix"></div>
</div>
</div>
</script>
<script type="text/template" class="dashboardButtonTemplate">
<div id="dashboardButton-<%- dashboard.id %>" class="btn-group pull-left"
data-dashboard-id="<%- dashboard.id %>" >
<button type="button" class="btn btn-success das-icon-selector">
<i class="fa fa-star fa-1x"></i>
</button>
<button type="button" class="btn btn-success das-title-selector" >
<%- dashboard.title %>
</button>
</div>
</script>
<script type="text/template" class="generalIndicatorMainPanel">
<div class="process-div well" data-gs-no-resize="true" style="clear:both;position:relative;height:auto;">
<div class="panel-heading bluebg">
<ol class="breadcrumb">
<li class="ind-title-selector"></li>
</ol>
</div>
<div class="text-center huge">
<div class="col-xs-6" id="generalGraph1" style="width:600px; height:300px;"><img src="../dist/img/graph.png" /></div>
<div class="col-xs-6" id="generalGraph2" style="width:600px; height:300px;margin-left:60px;"><img src="../dist/img/graph.png" /></div>
</div>
<div class="clearfix"></div>
</div>
</script>
<script type="text/template" class="statusIndicatorMainPanel">
<div class="process-div well" data-gs-no-resize="true" style="clear:both;position:relative;height:auto;">
<div class="panel-heading bluebg">
<ol class="breadcrumb">
<li class="ind-title-selector"></li>
</ol>
</div>
<div class="text-center huge" style="margin:0 auto; width:98%;">
<div class="col-xs-4" style="width:auto;">
<div class="status-graph-title-low">Overdue:</div>
<div id="graph1" style="width:400px; height:300px;"></div>
</div>
<div class="col-xs-4" style="width:auto;">
<div class="status-graph-title-medium">At Risk:</div>
<div id="graph2" style="width:400px; height:300px;"></div>
</div>
<div class="col-xs-4" style="width:auto;">
<div class="status-graph-title-high">On Time:</div>
<div id="graph3" style="width:400px; height:300px;"></div>
</div>
</div>
<div class="clearfix"></div>
</div>
</script>
</head>
<body id="page-top" class="index">
<div id="wrapper">
For better compatibility with Internet Explorer, a new tab with the KPIs has been opened. Please select this tab on the tab list above to see all the KPI's functionality.
</div>
<body id="page-top" class="index">
<div id="wrapper">
<div id="page-wrapper">
<div class="title-process" style="height:50px;"> </div>
<div class="title-process" style="margin-top:50px; width:500px; clear:both; border:1px solid #999; margin:0 auto; padding:15px;">
This is just a basic view of your indexes. For better compatibility with Internet Explorer, a new tab with the KPIs has been opened. Please select this new tab on the tab list above to see all our KPIs functionality.
</div>
<!--Cabezera-->
<div class="row" style="visibility:hidden;">
<div class="col-lg-12">
<div class="panel panel-default">
<div class="panel-body">
<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-chevron-down fa-1x"></i>
</a>
<h4 id="titleH4" class="header-dashboard">{translate label="ID_MANAGERS_DASHBOARDS"}</h4>
<div class="pull-right dashboard-right container-fluid">
<div class="row pull-left">
<div class="span4 pull-left">
<h5 class="pull-left">{translate label="ID_DASH_COMPARE_MONTH"}:</h5>
</div>
<div class="span4 pull-left">
<select id="year" class="form-control pull-right ">
{literal}
<script>
now = new Date();
anio = now.getFullYear();
for(a=anio;a>=anio-7;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 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 class="clearfix"></div>
<div class="collapse" id="collapseExample">
<div class="well">
<p class="text-center">{translate label="ID_DASH_CLICK_TO_VIEW"}</p>
<p>
<!-- Split button -->
<div id="dashboardsList">
</div>
</p>
<div class="clearfix"></div>
</div>
</div>
</div>
</div>
</div>
<!-- /.col-lg-12 -->
</div>
<!-- Indicators -->
<div class="row">
<div class="indicators">
<div id="indicatorsGridStack" class="grid-stack" data-gs-width="12" data-gs-animate="no" >
<!--Here are added dynamically the Indicators-->
</div>
</div>
<!-- Details by Indicator -->
<div class="col-lg-12 col-md-12 bottom">
<div id="indicatorsDataGridStack" class="grid-stack" data-gs-width="12" data-gs-animate="no" >
<!--Here are added dynamically the Dat by indicator-->
</div>
</div>
<div id="relatedLabel" style="clear:both; visibility:hidden;">
<div>
<center><h3></h3></center>
</div>
<div>
Sort by Cost: &nbsp; &nbsp;<a id="sortListButton" class="fa fa-chevron-up fa-1x" style="color:#000;" href="#"></a>
</div>
</div>
<div class="col-lg-12 col-md-12">
<div id="relatedDetailGridStack" class="grid-stack" data-gs-width="12"
data-gs-animate="no" style="clear:both;">
</div>
</div>
</div>
</div>
</div>
</body>
</html>

View File

@@ -521,7 +521,11 @@ Ext.onReady(function () {
id : 'USR_COST_BY_HOUR',
fieldLabel : _('ID_COST_BY_HOUR'),
xtype : 'numberfield',
allowNegative: false,
decimalSeparator : '.',
maskRe : /^[0-9]/i,
regex : /^[0-9]/i,
regexText : _('ID_INVALID_VALUE', _('ID_COST_BY_HOUR')),
maxLength : 13,
width : 80
},

View File

@@ -6,7 +6,7 @@
<USR_USERNAME type="text" size="30" maxlength="50" required="true" validate="Any" autocomplete="0">
<en><![CDATA[User]]></en>
</USR_USERNAME>
<USR_EMAIL type="text" size="30" required="true" maxlength="254" autocomplete="0">
<USR_EMAIL type="text" size="30" required="true" maxlength="100" autocomplete="0">
<en><![CDATA[Email]]></en>
</USR_EMAIL>
<URL type="hidden"/>

View File

@@ -16,7 +16,7 @@
{$form.updateButton}
</fieldset>
<div class="FormRequiredTextMessage"><font color="red">* </font>Required Field</div> </div>
<div class="FormRequiredTextMessage"></div>
<div class="boxBottom"><div class="a">&nbsp;</div><div class="b">&nbsp;</div><div class="c">&nbsp;</div></div>
</div>
<script type="text/javascript">

View File

@@ -53,7 +53,7 @@
background-color: #e14333;
}
.status-indicator-medium {
background-color: #fada5e;
background-color: #fcb322;
}
.status-indicator-high {
background-color: #1fbc99;
@@ -87,7 +87,7 @@
.ind-title-selector {
text-overflow: ellipsis;
white-space: nowrap;
overflow:hidden;
/*overflow:hidden;*/
}
.ellipsis {

View File

@@ -71,18 +71,19 @@
content: "\f065";
}
.grid-stack-item[data-gs-width="12"] { width: 100% }
.grid-stack-item[data-gs-width="11"] { width: 91.66666667% }
.grid-stack-item[data-gs-width="10"] { width: 83.33333333% }
.grid-stack-item[data-gs-width="9"] { width: 75% }
.grid-stack-item[data-gs-width="8"] { width: 66.66666667% }
.grid-stack-item[data-gs-width="7"] { width: 58.33333333% }
.grid-stack-item[data-gs-width="6"] { width: 50% }
.grid-stack-item[data-gs-width="5"] { width: 41.66666667% }
.grid-stack-item[data-gs-width="4"] { width: 33.33333333% }
.grid-stack-item[data-gs-width="3"] { width: 25% }
.grid-stack-item[data-gs-width="2"] { width: 16.66666667% }
.grid-stack-item[data-gs-width="1"] { width: 8.33333333% }
.grid-stack-item[data-gs-width="12"] { width: 100%; margin-bottom: 45px; }
.grid-stack-item[data-gs-width="11"] { width: 91.66666667%; margin-bottom: 45px; }
.grid-stack-item[data-gs-width="10"] { width: 83.33333333% ; margin-bottom: 45px; }
.grid-stack-item[data-gs-width="9"] { width: 75%; margin-bottom: 45px; }
.grid-stack-item[data-gs-width="8"] { width: 66.66666667% ; margin-bottom: 45px; }
.grid-stack-item[data-gs-width="7"] { width: 58.33333333%; margin-bottom: 45px; }
.grid-stack-item[data-gs-width="6"] { width: 50%; margin-bottom: 45px; }
.grid-stack-item[data-gs-width="5"] { width: 41.66666667%; margin-bottom: 45px; }
.grid-stack-item[data-gs-width="4"] { width: 33.33333333%; margin-bottom: 45px; }
.grid-stack-item[data-gs-width="3"] { width: 25%; margin-bottom: 45px; }
.grid-stack-item[data-gs-width="2"] { width: 16.66666667%; margin-bottom: 45px; }
.grid-stack-item[data-gs-width="1"] { width: 8.33333333%; margin-bottom: 45px; }
.grid-stack-item[data-gs-x="12"] { left: 100% }
.grid-stack-item[data-gs-x="11"] { left: 91.66666667% }

View File

@@ -547,6 +547,7 @@ table.dataTable thead .sorting:after {
.indicators{
margin-bottom: 20px;
margin-bottom: 45px;
}
.panel-green:hover, .panel-red:hover, .panel-high:hover, .panel-low:hover{
@@ -566,7 +567,7 @@ table.dataTable thead .sorting:after {
}
.panel-active{
background-color: #D99058;
/*background-color: #D99058;*/
position: relative;
}
@@ -583,7 +584,7 @@ table.dataTable thead .sorting:after {
.panel-active:after {
border-color: rgba(136, 183, 213, 0);
background-color: #000;
/*background-color: #000;*/
border-top-color: #fff;
border-width: 20px;
margin-left: -20px;
@@ -633,6 +634,7 @@ table.dataTable thead .sorting:after {
.process-div .panel-heading{
color:#606368;
font-size: 20px;
}
.process-div .panel-heading a{