Merge branch 'master' of bitbucket.org:colosa/processmaker
This commit is contained in:
@@ -15,12 +15,17 @@
|
|||||||
*/
|
*/
|
||||||
class AppNotes extends BaseAppNotes
|
class AppNotes extends BaseAppNotes
|
||||||
{
|
{
|
||||||
public function getNotesList ($appUid, $usrUid = '', $start = '', $limit = '')
|
public function getNotesList (
|
||||||
|
$appUid,
|
||||||
|
$usrUid = '',
|
||||||
|
$start = '',
|
||||||
|
$limit = 25,
|
||||||
|
$sort = 'APP_NOTES.NOTE_DATE',
|
||||||
|
$dir = 'DESC',
|
||||||
|
$dateFrom = '',
|
||||||
|
$dateTo = '',
|
||||||
|
$search = '')
|
||||||
{
|
{
|
||||||
require_once ("classes/model/Users.php");
|
|
||||||
|
|
||||||
G::LoadClass( 'ArrayPeer' );
|
|
||||||
|
|
||||||
$Criteria = new Criteria( 'workflow' );
|
$Criteria = new Criteria( 'workflow' );
|
||||||
$Criteria->clearSelectColumns();
|
$Criteria->clearSelectColumns();
|
||||||
|
|
||||||
@@ -41,13 +46,26 @@ class AppNotes extends BaseAppNotes
|
|||||||
|
|
||||||
$Criteria->addJoin( AppNotesPeer::USR_UID, UsersPeer::USR_UID, Criteria::LEFT_JOIN );
|
$Criteria->addJoin( AppNotesPeer::USR_UID, UsersPeer::USR_UID, Criteria::LEFT_JOIN );
|
||||||
|
|
||||||
$Criteria->add( appNotesPeer::APP_UID, $appUid, CRITERIA::EQUAL );
|
$Criteria->add( AppNotesPeer::APP_UID, $appUid, Criteria::EQUAL );
|
||||||
|
|
||||||
if ($usrUid != '') {
|
if ($usrUid != '') {
|
||||||
$Criteria->add( appNotesPeer::USR_UID, $usrUid, CRITERIA::EQUAL );
|
$Criteria->add( AppNotesPeer::USR_UID, $usrUid, Criteria::EQUAL );
|
||||||
|
}
|
||||||
|
if ($dateFrom != '') {
|
||||||
|
$Criteria->add( AppNotesPeer::NOTE_DATE, $dateFrom, Criteria::GREATER_EQUAL );
|
||||||
|
}
|
||||||
|
if ($dateTo != '') {
|
||||||
|
$Criteria->add( AppNotesPeer::NOTE_DATE, $dateTo, Criteria::LESS_EQUAL );
|
||||||
|
}
|
||||||
|
if ($search != '') {
|
||||||
|
$Criteria->add( AppNotesPeer::NOTE_CONTENT, '%'.$search.'%', Criteria::LIKE );
|
||||||
}
|
}
|
||||||
|
|
||||||
$Criteria->addDescendingOrderByColumn( AppNotesPeer::NOTE_DATE );
|
if ($dir == 'DESC') {
|
||||||
|
$Criteria->addDescendingOrderByColumn($sort);
|
||||||
|
} else {
|
||||||
|
$Criteria->addAscendingOrderByColumn($sort);
|
||||||
|
}
|
||||||
|
|
||||||
$response = array ();
|
$response = array ();
|
||||||
$totalCount = AppNotesPeer::doCount( $Criteria );
|
$totalCount = AppNotesPeer::doCount( $Criteria );
|
||||||
|
|||||||
@@ -649,7 +649,7 @@ class Cases
|
|||||||
$case = new \Cases();
|
$case = new \Cases();
|
||||||
$fields = $case->loadCase($app_uid);
|
$fields = $case->loadCase($app_uid);
|
||||||
if ($fields['APP_STATUS'] == 'CANCELLED') {
|
if ($fields['APP_STATUS'] == 'CANCELLED') {
|
||||||
throw (new \Exception("The case '$app_uid' is canceled"));
|
throw (new \Exception("The case '$app_uid' is already canceled"));
|
||||||
}
|
}
|
||||||
$case->cancelCase( $app_uid, $del_index, $usr_uid );
|
$case->cancelCase( $app_uid, $del_index, $usr_uid );
|
||||||
}
|
}
|
||||||
@@ -1348,7 +1348,7 @@ class Cases
|
|||||||
|
|
||||||
$case = new \Cases();
|
$case = new \Cases();
|
||||||
$fields = $case->loadCase($app_uid);
|
$fields = $case->loadCase($app_uid);
|
||||||
$data = array_merge($fields['APP_DATA'], array('APP_DATA' => $app_data));
|
$data['APP_DATA'] = array_merge($fields['APP_DATA'], $app_data);
|
||||||
$case->updateCase($app_uid, $data);
|
$case->updateCase($app_uid, $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1362,9 +1362,23 @@ class Cases
|
|||||||
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
|
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
|
||||||
* @copyright Colosa - Bolivia
|
* @copyright Colosa - Bolivia
|
||||||
*/
|
*/
|
||||||
public function getCaseNotes($app_uid, $usr_uid) {
|
public function getCaseNotes($app_uid, $usr_uid, $data_get) {
|
||||||
Validator::isString($app_uid, '$app_uid');
|
Validator::isString($app_uid, '$app_uid');
|
||||||
Validator::appUid($app_uid, '$app_uid');
|
Validator::appUid($app_uid, '$app_uid');
|
||||||
|
Validator::isString($usr_uid, '$usr_uid');
|
||||||
|
Validator::usrUid($usr_uid, '$usr_uid');
|
||||||
|
Validator::isArray($data_get, '$data_get');
|
||||||
|
|
||||||
|
Validator::isArray($data_get, '$data_get');
|
||||||
|
$start = isset( $data_get["start"] ) ? $data_get["start"] : "0";
|
||||||
|
$limit = isset( $data_get["limit"] ) ? $data_get["limit"] : "";
|
||||||
|
$sort = isset( $data_get["sort"] ) ? $data_get["sort"] : "APP_NOTES.NOTE_DATE";
|
||||||
|
$dir = isset( $data_get["dir"] ) ? $data_get["dir"] : "DESC";
|
||||||
|
$user = isset( $data_get["user"] ) ? $data_get["user"] : "";
|
||||||
|
$dateFrom = (!empty( $data_get["dateFrom"] )) ? substr( $data_get["dateFrom"], 0, 10 ) : "";
|
||||||
|
$dateTo = (!empty( $data_get["dateTo"] )) ? substr( $data_get["dateTo"], 0, 10 ) : "";
|
||||||
|
$search = isset( $data_get["search"] ) ? $data_get["search"] : "";
|
||||||
|
$paged = isset( $data_get["paged"] ) ? $data_get["paged"] : true;
|
||||||
|
|
||||||
$case = new \Cases();
|
$case = new \Cases();
|
||||||
$caseLoad = $case->loadCase($app_uid);
|
$caseLoad = $case->loadCase($app_uid);
|
||||||
@@ -1376,19 +1390,64 @@ class Cases
|
|||||||
throw (new \Exception("You do not have permission to cases notes."));
|
throw (new \Exception("You do not have permission to cases notes."));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($sort != 'APP_NOTE.NOTE_DATE') {
|
||||||
|
$sort = G::toUpper($sort);
|
||||||
|
$columnsAppCacheView = \AppNotesPeer::getFieldNames(\BasePeer::TYPE_FIELDNAME);
|
||||||
|
if (!(in_array($sort, $columnsAppCacheView))) {
|
||||||
|
$sort = 'APP_NOTES.NOTE_DATE';
|
||||||
|
} else {
|
||||||
|
$sort = 'APP_NOTES.'.$sort;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ((int)$start == 1 || (int)$start == 0) {
|
||||||
|
$start = 0;
|
||||||
|
}
|
||||||
|
$dir = G::toUpper($dir);
|
||||||
|
if (!($dir == 'DESC' || $dir == 'ASC')) {
|
||||||
|
$dir = 'DESC';
|
||||||
|
}
|
||||||
|
if ($user != '') {
|
||||||
|
Validator::usrUid($user, '$usr_uid');
|
||||||
|
}
|
||||||
|
if ($dateFrom != '') {
|
||||||
|
Validator::isDate($dateFrom, 'Y-m-d', '$date_from');
|
||||||
|
}
|
||||||
|
if ($dateTo != '') {
|
||||||
|
Validator::isDate($dateTo, 'Y-m-d', '$date_to');
|
||||||
|
}
|
||||||
|
|
||||||
$appNote = new \AppNotes();
|
$appNote = new \AppNotes();
|
||||||
$note_data = $appNote->getNotesList($app_uid);
|
$note_data = $appNote->getNotesList($app_uid, $user, $start, $limit, $sort, $dir, $dateFrom, $dateTo, $search);
|
||||||
$response = array();
|
$response = array();
|
||||||
|
if ($paged === true) {
|
||||||
$response['total'] = $note_data['array']['totalCount'];
|
$response['total'] = $note_data['array']['totalCount'];
|
||||||
$response['notes'] = array();
|
$response['start'] = $start;
|
||||||
|
$response['limit'] = $limit;
|
||||||
|
$response['sort'] = $sort;
|
||||||
|
$response['dir'] = $dir;
|
||||||
|
$response['usr_uid'] = $user;
|
||||||
|
$response['date_to'] = $dateTo;
|
||||||
|
$response['date_from'] = $dateFrom;
|
||||||
|
$response['search'] = $search;
|
||||||
|
$response['data'] = array();
|
||||||
$con = 0;
|
$con = 0;
|
||||||
foreach ($note_data['array']['notes'] as $value) {
|
foreach ($note_data['array']['notes'] as $value) {
|
||||||
$response['notes'][$con]['app_uid'] = $value['APP_UID'];
|
$response['data'][$con]['app_uid'] = $value['APP_UID'];
|
||||||
$response['notes'][$con]['usr_uid'] = $value['USR_UID'];
|
$response['data'][$con]['usr_uid'] = $value['USR_UID'];
|
||||||
$response['notes'][$con]['note_date'] = $value['NOTE_DATE'];
|
$response['data'][$con]['note_date'] = $value['NOTE_DATE'];
|
||||||
$response['notes'][$con]['note_content'] = $value['NOTE_CONTENT'];
|
$response['data'][$con]['note_content'] = $value['NOTE_CONTENT'];
|
||||||
$con++;
|
$con++;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
$con = 0;
|
||||||
|
foreach ($note_data['array']['notes'] as $value) {
|
||||||
|
$response[$con]['app_uid'] = $value['APP_UID'];
|
||||||
|
$response[$con]['usr_uid'] = $value['USR_UID'];
|
||||||
|
$response[$con]['note_date'] = $value['NOTE_DATE'];
|
||||||
|
$response[$con]['note_content'] = $value['NOTE_CONTENT'];
|
||||||
|
$con++;
|
||||||
|
}
|
||||||
|
}
|
||||||
return $response;
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -408,7 +408,13 @@ class OutputDocument
|
|||||||
switch ($aProperties['report_generator']) {
|
switch ($aProperties['report_generator']) {
|
||||||
case 'TCPDF':
|
case 'TCPDF':
|
||||||
$o = new \OutputDocument();
|
$o = new \OutputDocument();
|
||||||
|
if (strlen($sContent) == 0) {
|
||||||
|
libxml_use_internal_errors(true);
|
||||||
|
$o->generateTcpdf($sUID, $aFields, $sPath, $sFilename, ' ', $sLandscape, $aProperties);
|
||||||
|
libxml_use_internal_errors(false);
|
||||||
|
} else {
|
||||||
$o->generateTcpdf($sUID, $aFields, $sPath, $sFilename, $sContent, $sLandscape, $aProperties);
|
$o->generateTcpdf($sUID, $aFields, $sPath, $sFilename, $sContent, $sLandscape, $aProperties);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 'HTML2PDF':
|
case 'HTML2PDF':
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -267,7 +267,7 @@ class OutputDocument
|
|||||||
$aData['out_doc_pdf_security_open_password'] = \G::encrypt( $aData['out_doc_pdf_security_open_password'], $outDocUid );
|
$aData['out_doc_pdf_security_open_password'] = \G::encrypt( $aData['out_doc_pdf_security_open_password'], $outDocUid );
|
||||||
$aData['out_doc_pdf_security_owner_password'] = \G::encrypt( $aData['out_doc_pdf_security_owner_password'], $outDocUid );
|
$aData['out_doc_pdf_security_owner_password'] = \G::encrypt( $aData['out_doc_pdf_security_owner_password'], $outDocUid );
|
||||||
}
|
}
|
||||||
$this->updateOutputDocument($sProcessUID, $aData, $outDocUid);
|
$this->updateOutputDocument($sProcessUID, $aData, $outDocUid, 1);
|
||||||
//Return
|
//Return
|
||||||
unset($aData["PRO_UID"]);
|
unset($aData["PRO_UID"]);
|
||||||
$aData = array_change_key_case($aData, CASE_LOWER);
|
$aData = array_change_key_case($aData, CASE_LOWER);
|
||||||
@@ -283,10 +283,11 @@ class OutputDocument
|
|||||||
* @param string $sProcessUID
|
* @param string $sProcessUID
|
||||||
* @param array $aData
|
* @param array $aData
|
||||||
* @param string $sOutputDocumentUID
|
* @param string $sOutputDocumentUID
|
||||||
|
* @param int $sFlag
|
||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
*/
|
*/
|
||||||
public function updateOutputDocument($sProcessUID, $aData, $sOutputDocumentUID = '')
|
public function updateOutputDocument($sProcessUID, $aData, $sOutputDocumentUID = '', $sFlag)
|
||||||
{
|
{
|
||||||
$oConnection = \Propel::getConnection(\OutputDocumentPeer::DATABASE_NAME);
|
$oConnection = \Propel::getConnection(\OutputDocumentPeer::DATABASE_NAME);
|
||||||
$pemission = $aData['out_doc_pdf_security_permissions'];
|
$pemission = $aData['out_doc_pdf_security_permissions'];
|
||||||
@@ -306,6 +307,9 @@ class OutputDocument
|
|||||||
if ($oOutputDocument->validate()) {
|
if ($oOutputDocument->validate()) {
|
||||||
$oConnection->begin();
|
$oConnection->begin();
|
||||||
if (isset($aData['OUT_DOC_TITLE'])) {
|
if (isset($aData['OUT_DOC_TITLE'])) {
|
||||||
|
if ($this->existsTitle($sProcessUID, $aData["OUT_DOC_TITLE"]) && $sFlag == 0) {
|
||||||
|
throw (new \Exception(\G::LoadTranslation("ID_OUTPUT_NOT_SAVE")));
|
||||||
|
}
|
||||||
$oOutputDocument->setOutDocTitle($aData['OUT_DOC_TITLE']);
|
$oOutputDocument->setOutDocTitle($aData['OUT_DOC_TITLE']);
|
||||||
}
|
}
|
||||||
if (isset($aData['OUT_DOC_DESCRIPTION'])) {
|
if (isset($aData['OUT_DOC_DESCRIPTION'])) {
|
||||||
|
|||||||
@@ -18,9 +18,9 @@ class Cases extends Api
|
|||||||
/**
|
/**
|
||||||
* Get list Cases To Do
|
* Get list Cases To Do
|
||||||
*
|
*
|
||||||
* @param string $paged {@from path}
|
|
||||||
* @param string $start {@from path}
|
* @param string $start {@from path}
|
||||||
* @param string $limit {@from path}
|
* @param string $limit {@from path}
|
||||||
|
* @param string $sort {@from path}
|
||||||
* @param string $dir {@from path}
|
* @param string $dir {@from path}
|
||||||
* @param string $cat_uid {@from path}
|
* @param string $cat_uid {@from path}
|
||||||
* @param string $pro_uid {@from path}
|
* @param string $pro_uid {@from path}
|
||||||
@@ -65,9 +65,9 @@ class Cases extends Api
|
|||||||
/**
|
/**
|
||||||
* Get list Cases To Do with paged
|
* Get list Cases To Do with paged
|
||||||
*
|
*
|
||||||
* @param string $paged {@from path}
|
|
||||||
* @param string $start {@from path}
|
* @param string $start {@from path}
|
||||||
* @param string $limit {@from path}
|
* @param string $limit {@from path}
|
||||||
|
* @param string $sort {@from path}
|
||||||
* @param string $dir {@from path}
|
* @param string $dir {@from path}
|
||||||
* @param string $cat_uid {@from path}
|
* @param string $cat_uid {@from path}
|
||||||
* @param string $pro_uid {@from path}
|
* @param string $pro_uid {@from path}
|
||||||
@@ -112,9 +112,9 @@ class Cases extends Api
|
|||||||
/**
|
/**
|
||||||
* Get list Cases Draft
|
* Get list Cases Draft
|
||||||
*
|
*
|
||||||
* @param string $paged {@from path}
|
|
||||||
* @param string $start {@from path}
|
* @param string $start {@from path}
|
||||||
* @param string $limit {@from path}
|
* @param string $limit {@from path}
|
||||||
|
* @param string $sort {@from path}
|
||||||
* @param string $dir {@from path}
|
* @param string $dir {@from path}
|
||||||
* @param string $cat_uid {@from path}
|
* @param string $cat_uid {@from path}
|
||||||
* @param string $pro_uid {@from path}
|
* @param string $pro_uid {@from path}
|
||||||
@@ -159,9 +159,9 @@ class Cases extends Api
|
|||||||
/**
|
/**
|
||||||
* Get list Cases Draft with paged
|
* Get list Cases Draft with paged
|
||||||
*
|
*
|
||||||
* @param string $paged {@from path}
|
|
||||||
* @param string $start {@from path}
|
* @param string $start {@from path}
|
||||||
* @param string $limit {@from path}
|
* @param string $limit {@from path}
|
||||||
|
* @param string $sort {@from path}
|
||||||
* @param string $dir {@from path}
|
* @param string $dir {@from path}
|
||||||
* @param string $cat_uid {@from path}
|
* @param string $cat_uid {@from path}
|
||||||
* @param string $pro_uid {@from path}
|
* @param string $pro_uid {@from path}
|
||||||
@@ -206,9 +206,9 @@ class Cases extends Api
|
|||||||
/**
|
/**
|
||||||
* Get list Cases Participated
|
* Get list Cases Participated
|
||||||
*
|
*
|
||||||
* @param string $paged {@from path}
|
|
||||||
* @param string $start {@from path}
|
* @param string $start {@from path}
|
||||||
* @param string $limit {@from path}
|
* @param string $limit {@from path}
|
||||||
|
* @param string $sort {@from path}
|
||||||
* @param string $dir {@from path}
|
* @param string $dir {@from path}
|
||||||
* @param string $cat_uid {@from path}
|
* @param string $cat_uid {@from path}
|
||||||
* @param string $pro_uid {@from path}
|
* @param string $pro_uid {@from path}
|
||||||
@@ -253,9 +253,9 @@ class Cases extends Api
|
|||||||
/**
|
/**
|
||||||
* Get list Cases Participated with paged
|
* Get list Cases Participated with paged
|
||||||
*
|
*
|
||||||
* @param string $paged {@from path}
|
|
||||||
* @param string $start {@from path}
|
* @param string $start {@from path}
|
||||||
* @param string $limit {@from path}
|
* @param string $limit {@from path}
|
||||||
|
* @param string $sort {@from path}
|
||||||
* @param string $dir {@from path}
|
* @param string $dir {@from path}
|
||||||
* @param string $cat_uid {@from path}
|
* @param string $cat_uid {@from path}
|
||||||
* @param string $pro_uid {@from path}
|
* @param string $pro_uid {@from path}
|
||||||
@@ -300,9 +300,9 @@ class Cases extends Api
|
|||||||
/**
|
/**
|
||||||
* Get list Cases Unassigned
|
* Get list Cases Unassigned
|
||||||
*
|
*
|
||||||
* @param string $paged {@from path}
|
|
||||||
* @param string $start {@from path}
|
* @param string $start {@from path}
|
||||||
* @param string $limit {@from path}
|
* @param string $limit {@from path}
|
||||||
|
* @param string $sort {@from path}
|
||||||
* @param string $dir {@from path}
|
* @param string $dir {@from path}
|
||||||
* @param string $cat_uid {@from path}
|
* @param string $cat_uid {@from path}
|
||||||
* @param string $pro_uid {@from path}
|
* @param string $pro_uid {@from path}
|
||||||
@@ -347,9 +347,9 @@ class Cases extends Api
|
|||||||
/**
|
/**
|
||||||
* Get list Cases Unassigned with paged
|
* Get list Cases Unassigned with paged
|
||||||
*
|
*
|
||||||
* @param string $paged {@from path}
|
|
||||||
* @param string $start {@from path}
|
* @param string $start {@from path}
|
||||||
* @param string $limit {@from path}
|
* @param string $limit {@from path}
|
||||||
|
* @param string $sort {@from path}
|
||||||
* @param string $dir {@from path}
|
* @param string $dir {@from path}
|
||||||
* @param string $cat_uid {@from path}
|
* @param string $cat_uid {@from path}
|
||||||
* @param string $pro_uid {@from path}
|
* @param string $pro_uid {@from path}
|
||||||
@@ -394,9 +394,9 @@ class Cases extends Api
|
|||||||
/**
|
/**
|
||||||
* Get list Cases Paused
|
* Get list Cases Paused
|
||||||
*
|
*
|
||||||
* @param string $paged {@from path}
|
|
||||||
* @param string $start {@from path}
|
* @param string $start {@from path}
|
||||||
* @param string $limit {@from path}
|
* @param string $limit {@from path}
|
||||||
|
* @param string $sort {@from path}
|
||||||
* @param string $dir {@from path}
|
* @param string $dir {@from path}
|
||||||
* @param string $cat_uid {@from path}
|
* @param string $cat_uid {@from path}
|
||||||
* @param string $pro_uid {@from path}
|
* @param string $pro_uid {@from path}
|
||||||
@@ -441,9 +441,9 @@ class Cases extends Api
|
|||||||
/**
|
/**
|
||||||
* Get list Cases Paused with paged
|
* Get list Cases Paused with paged
|
||||||
*
|
*
|
||||||
* @param string $paged {@from path}
|
|
||||||
* @param string $start {@from path}
|
* @param string $start {@from path}
|
||||||
* @param string $limit {@from path}
|
* @param string $limit {@from path}
|
||||||
|
* @param string $sort {@from path}
|
||||||
* @param string $dir {@from path}
|
* @param string $dir {@from path}
|
||||||
* @param string $cat_uid {@from path}
|
* @param string $cat_uid {@from path}
|
||||||
* @param string $pro_uid {@from path}
|
* @param string $pro_uid {@from path}
|
||||||
@@ -488,16 +488,16 @@ class Cases extends Api
|
|||||||
/**
|
/**
|
||||||
* Get list Cases Advanced Search
|
* Get list Cases Advanced Search
|
||||||
*
|
*
|
||||||
* @param string $paged {@from path}
|
|
||||||
* @param string $start {@from path}
|
* @param string $start {@from path}
|
||||||
* @param string $limit {@from path}
|
* @param string $limit {@from path}
|
||||||
|
* @param string $sort {@from path}
|
||||||
* @param string $dir {@from path}
|
* @param string $dir {@from path}
|
||||||
* @param string $cat_uid {@from path}
|
* @param string $cat_uid {@from path}
|
||||||
* @param string $pro_uid {@from path}
|
* @param string $pro_uid {@from path}
|
||||||
* @param string $app_status {@from path}
|
* @param string $app_status {@from path}
|
||||||
* @param string $user {@from path}
|
* @param string $user {@from path}
|
||||||
* @param string $dateFrom {@from path}
|
* @param string $date_from {@from path}
|
||||||
* @param string $dateTo {@from path}
|
* @param string $date_to {@from path}
|
||||||
* @param string $search {@from path}
|
* @param string $search {@from path}
|
||||||
* @return array
|
* @return array
|
||||||
*
|
*
|
||||||
@@ -515,8 +515,8 @@ class Cases extends Api
|
|||||||
$pro_uid = '',
|
$pro_uid = '',
|
||||||
$app_status = '',
|
$app_status = '',
|
||||||
$user = '',
|
$user = '',
|
||||||
$dateFrom = '',
|
$date_from = '',
|
||||||
$dateTo = '',
|
$date_to = '',
|
||||||
$search = ''
|
$search = ''
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@@ -533,8 +533,8 @@ class Cases extends Api
|
|||||||
$dataList['process'] = $pro_uid;
|
$dataList['process'] = $pro_uid;
|
||||||
$dataList['status'] = $app_status;
|
$dataList['status'] = $app_status;
|
||||||
$dataList['user'] = $user;
|
$dataList['user'] = $user;
|
||||||
$dataList['dateFrom'] = $dateFrom;
|
$dataList['dateFrom'] = $date_from;
|
||||||
$dataList['dateTo'] = $dateTo;
|
$dataList['dateTo'] = $date_to;
|
||||||
$dataList['search'] = $search;
|
$dataList['search'] = $search;
|
||||||
$oCases = new \BusinessModel\Cases();
|
$oCases = new \BusinessModel\Cases();
|
||||||
$response = $oCases->getList($dataList);
|
$response = $oCases->getList($dataList);
|
||||||
@@ -547,16 +547,16 @@ class Cases extends Api
|
|||||||
/**
|
/**
|
||||||
* Get list Cases Advanced Search with Paged
|
* Get list Cases Advanced Search with Paged
|
||||||
*
|
*
|
||||||
* @param string $paged {@from path}
|
|
||||||
* @param string $start {@from path}
|
* @param string $start {@from path}
|
||||||
* @param string $limit {@from path}
|
* @param string $limit {@from path}
|
||||||
|
* @param string $sort {@from path}
|
||||||
* @param string $dir {@from path}
|
* @param string $dir {@from path}
|
||||||
* @param string $cat_uid {@from path}
|
* @param string $cat_uid {@from path}
|
||||||
* @param string $pro_uid {@from path}
|
* @param string $pro_uid {@from path}
|
||||||
* @param string $app_status {@from path}
|
* @param string $app_status {@from path}
|
||||||
* @param string $usr_uid {@from path}
|
* @param string $usr_uid {@from path}
|
||||||
* @param string $dateFrom {@from path}
|
* @param string $date_from {@from path}
|
||||||
* @param string $dateTo {@from path}
|
* @param string $date_to {@from path}
|
||||||
* @param string $search {@from path}
|
* @param string $search {@from path}
|
||||||
* @return array
|
* @return array
|
||||||
*
|
*
|
||||||
@@ -868,19 +868,97 @@ class Cases extends Api
|
|||||||
/**
|
/**
|
||||||
* Get Case Notes
|
* Get Case Notes
|
||||||
*
|
*
|
||||||
* @param string $app_uid {@min 1}{@max 32}
|
* @param string $start {@from path}
|
||||||
|
* @param string $limit {@from path}
|
||||||
|
* @param string $sort {@from path}
|
||||||
|
* @param string $dir {@from path}
|
||||||
|
* @param string $usr_uid {@from path}
|
||||||
|
* @param string $date_from {@from path}
|
||||||
|
* @param string $date_to {@from path}
|
||||||
|
* @param string $search {@from path}
|
||||||
|
* @return array
|
||||||
*
|
*
|
||||||
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
|
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
|
||||||
* @copyright Colosa - Bolivia
|
* @copyright Colosa - Bolivia
|
||||||
*
|
*
|
||||||
* @url GET /:app_uid/notes
|
* @url GET /:app_uid/notes
|
||||||
*/
|
*/
|
||||||
public function doGetCaseNotes($app_uid)
|
public function doGetCaseNotes(
|
||||||
|
$app_uid,
|
||||||
|
$start = 0,
|
||||||
|
$limit = 25,
|
||||||
|
$sort = 'APP_CACHE_VIEW.APP_NUMBER',
|
||||||
|
$dir = 'DESC',
|
||||||
|
$usr_uid = '',
|
||||||
|
$date_from = '',
|
||||||
|
$date_to = '',
|
||||||
|
$search = ''
|
||||||
|
)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
|
$dataList['paged'] = false;
|
||||||
|
|
||||||
|
$dataList['start'] = $start;
|
||||||
|
$dataList['limit'] = $limit;
|
||||||
|
$dataList['sort'] = $sort;
|
||||||
|
$dataList['dir'] = $dir;
|
||||||
|
$dataList['user'] = $usr_uid;
|
||||||
|
$dataList['dateFrom'] = $date_from;
|
||||||
|
$dataList['dateTo'] = $date_to;
|
||||||
|
$dataList['search'] = $search;
|
||||||
|
|
||||||
$usr_uid = $this->getUserId();
|
$usr_uid = $this->getUserId();
|
||||||
$cases = new \BusinessModel\Cases();
|
$cases = new \BusinessModel\Cases();
|
||||||
$response = $cases->getCaseNotes($app_uid, $usr_uid);
|
$response = $cases->getCaseNotes($app_uid, $usr_uid, $dataList);
|
||||||
|
return $response;
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get Case Notes with Paged
|
||||||
|
*
|
||||||
|
* @param string $start {@from path}
|
||||||
|
* @param string $limit {@from path}
|
||||||
|
* @param string $sort {@from path}
|
||||||
|
* @param string $dir {@from path}
|
||||||
|
* @param string $usr_uid {@from path}
|
||||||
|
* @param string $date_from {@from path}
|
||||||
|
* @param string $date_to {@from path}
|
||||||
|
* @param string $search {@from path}
|
||||||
|
* @return array
|
||||||
|
*
|
||||||
|
* @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
|
||||||
|
* @copyright Colosa - Bolivia
|
||||||
|
*
|
||||||
|
* @url GET /:app_uid/notes/paged
|
||||||
|
*/
|
||||||
|
public function doGetCaseNotesPaged(
|
||||||
|
$app_uid,
|
||||||
|
$start = 0,
|
||||||
|
$limit = 25,
|
||||||
|
$sort = 'APP_CACHE_VIEW.APP_NUMBER',
|
||||||
|
$dir = 'DESC',
|
||||||
|
$usr_uid = '',
|
||||||
|
$date_from = '',
|
||||||
|
$date_to = '',
|
||||||
|
$search = ''
|
||||||
|
)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$dataList['start'] = $start;
|
||||||
|
$dataList['limit'] = $limit;
|
||||||
|
$dataList['sort'] = $sort;
|
||||||
|
$dataList['dir'] = $dir;
|
||||||
|
$dataList['user'] = $usr_uid;
|
||||||
|
$dataList['dateFrom'] = $date_from;
|
||||||
|
$dataList['dateTo'] = $date_to;
|
||||||
|
$dataList['search'] = $search;
|
||||||
|
|
||||||
|
$usr_uid = $this->getUserId();
|
||||||
|
$cases = new \BusinessModel\Cases();
|
||||||
|
$response = $cases->getCaseNotes($app_uid, $usr_uid, $dataList);
|
||||||
return $response;
|
return $response;
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ class OutputDocuments extends Api
|
|||||||
try {
|
try {
|
||||||
$request_data = (array)($request_data);
|
$request_data = (array)($request_data);
|
||||||
$outputDocument = new \BusinessModel\OutputDocument();
|
$outputDocument = new \BusinessModel\OutputDocument();
|
||||||
$arrayData = $outputDocument->updateOutputDocument($prjUid, $request_data, $outputDocumentUid);
|
$arrayData = $outputDocument->updateOutputDocument($prjUid, $request_data, $outputDocumentUid, 0);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
//Response
|
//Response
|
||||||
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
|
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
|
||||||
|
|||||||
@@ -67,23 +67,25 @@
|
|||||||
{/if}
|
{/if}
|
||||||
</head>
|
</head>
|
||||||
<body onresize="resizingFrame();">
|
<body onresize="resizingFrame();">
|
||||||
<section class="navBar" id="idNavBar">
|
<section class="navBar">
|
||||||
<div class="head"></div>
|
<div class="head"></div>
|
||||||
<nav>
|
<nav>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#" class="mafe-button-save"></a></li>
|
<li><a href="#" class="mafe-button-save"></a></li>
|
||||||
<li><a href="#" class="mafe-button-export-process"></a></li>
|
<li><a href="#" class="mafe-button-export-process"></a></li>
|
||||||
<li><a href="#" class="mafe-button-undo"></a> <a href="#" class="mafe-button-redo"></a></li>
|
<li><a href="#" class="mafe-button-undo"></a> <a href="#" class="mafe-button-redo"></a></li>
|
||||||
<li><input type="button" value="" class="mafe-button-zoom"> </li>
|
<li></li>
|
||||||
<li><a href="#" title="Full screen"class="mafe-button-fullscreen"></a></li>
|
<li><a href="#" title="" class="mafe-button-fullscreen"></a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="content">
|
<section class="content">
|
||||||
<div class="bpmn_shapes" id="idBpmnShapes">
|
<div class="bpmn_shapes">
|
||||||
<div class="head"><span class="mafe-shapes-collapse-icon"></span></div>
|
<div class="head"><span class="mafe-shapes-collapse-icon"></span></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="content_controls" id="idContentControls">
|
<div class="content_controls">
|
||||||
<div class="head"><span class="mafe-controls-collapse-icon"></span></div>
|
<div class="head"><span class="mafe-controls-collapse-icon"></span></div>
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
|
|||||||
Reference in New Issue
Block a user