PM-2576 "Support for Timer-Event (End-points and Backend)"

- Se han implementado los siguientes End-points:
    GET    /api/1.0/{workspace}/project/{prj_uid}/timer-events
    GET    /api/1.0/{workspace}/project/{prj_uid}/timer-event/{tmrevn_uid}
    GET    /api/1.0/{workspace}/project/{prj_uid}/timer-event/event/{evn_uid}
    POST   /api/1.0/{workspace}/project/{prj_uid}/timer-event
    PUT    /api/1.0/{workspace}/project/{prj_uid}/timer-event/{tmrevn_uid}
    DELETE /api/1.0/{workspace}/project/{prj_uid}/timer-event/{tmrevn_uid}
- Se han implementado la funcionalidad y los metodos necesarios para este nuevo elemento
  en el modulo "BPMN-DESIGNER Backend"
- Se han agregado las validaciones necesarias para filtrar los nuevos tipos de tasks en el
  listado del "New case"
- Se han agregado los metodos necesarios para este nuevo elemento en los modulos Export and Import
- Se han agregado los metodos necesarios para este nuevo elemento en el modulo "Delete process"
- Se a implementado la funcionalidad para este nuevo elemento en el modulo "Running case"
This commit is contained in:
Victor Saisa Lopez
2015-06-30 12:04:53 -04:00
parent a8deb38b4f
commit 8b21d386d2
21 changed files with 8907 additions and 5373 deletions

View File

@@ -3,6 +3,78 @@ namespace ProcessMaker\Util;
class Common extends \Maveriks\Util\Common
{
private $frontEnd = false;
/**
* Set front-end flag (Terminal's front-end)
*
* @param bool $flag Flag
*
* return void
*/
public function setFrontEnd($flag)
{
try {
$this->frontEnd = $flag;
} catch (\Exception $e) {
throw $e;
}
}
/**
* Show front-end (Terminal's front-end)
*
* @param string $option Option
* @param string $data Data string
*
* return void
*/
public function frontEndShow($option, $data = "")
{
try {
if (!$this->frontEnd) {
return;
}
$numc = 100;
switch ($option) {
case "BAR":
echo "\r" . "| " . $data . str_repeat(" ", $numc - 2 - strlen($data));
break;
case "TEXT":
echo "\r" . "| " . $data . str_repeat(" ", $numc - 2 - strlen($data)) . "\n";
break;
default:
//START, END
echo "\r" . "+" . str_repeat("-", $numc - 2) . "+" . "\n";
break;
}
} catch (\Exception $e) {
throw $e;
}
}
/**
* Progress bar (Progress bar for terminal)
*
* @param int $total Total
* @param int $count Count
*
* return string Return a string that represent progress bar
*/
public function progressBar($total, $count)
{
try {
$p = (int)(($count * 100) / $total);
$n = (int)($p / 2);
return "[" . str_repeat("|", $n) . str_repeat(" ", 50 - $n) . "] $p%";
} catch (\Exception $e) {
throw $e;
}
}
/**
* Generate random number
*
@@ -64,4 +136,5 @@ class Common extends \Maveriks\Util\Common
return $sCode;
}
}
}