Adicion de contadores para bandejas CANCELED y PAUSED
This commit is contained in:
@@ -4048,8 +4048,9 @@ class Cases
|
|||||||
$this->getExecuteTriggerProcess($sApplicationUID, "UNPAUSE");
|
$this->getExecuteTriggerProcess($sApplicationUID, "UNPAUSE");
|
||||||
|
|
||||||
/*----------------------------------********---------------------------------*/
|
/*----------------------------------********---------------------------------*/
|
||||||
|
$aData = array_merge($aFieldsDel, $aData);
|
||||||
$oListPaused = new ListPaused();
|
$oListPaused = new ListPaused();
|
||||||
$oListPaused->remove($sApplicationUID, $iDelegation, true);
|
$oListPaused->remove($sApplicationUID, $iDelegation, $aData);
|
||||||
/*----------------------------------********---------------------------------*/
|
/*----------------------------------********---------------------------------*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -103,6 +103,10 @@ class ListCanceled extends BaseListCanceled {
|
|||||||
$oListInbox = new ListInbox();
|
$oListInbox = new ListInbox();
|
||||||
$oListInbox->removeAll($data['APP_UID']);
|
$oListInbox->removeAll($data['APP_UID']);
|
||||||
|
|
||||||
|
$users = new Users();
|
||||||
|
$users->refreshTotal($data['USR_UID'], 'removed', 'inbox');
|
||||||
|
$users->refreshTotal($data['USR_UID'], 'add', 'canceled');
|
||||||
|
|
||||||
$con = Propel::getConnection( ListCanceledPeer::DATABASE_NAME );
|
$con = Propel::getConnection( ListCanceledPeer::DATABASE_NAME );
|
||||||
try {
|
try {
|
||||||
$this->fromArray( $data, BasePeer::TYPE_FIELDNAME );
|
$this->fromArray( $data, BasePeer::TYPE_FIELDNAME );
|
||||||
|
|||||||
@@ -118,6 +118,14 @@ class ListPaused extends BaseListPaused {
|
|||||||
$oListInbox = new ListInbox();
|
$oListInbox = new ListInbox();
|
||||||
$oListInbox->remove($data['APP_UID'], $data['DEL_INDEX']);
|
$oListInbox->remove($data['APP_UID'], $data['DEL_INDEX']);
|
||||||
|
|
||||||
|
$users = new Users();
|
||||||
|
if ($data['APP_STATUS'] == 'DRAFT') {
|
||||||
|
$users->refreshTotal($data['USR_UID'], 'removed', 'draft');
|
||||||
|
} else {
|
||||||
|
$users->refreshTotal($data['USR_UID'], 'removed', 'inbox');
|
||||||
|
}
|
||||||
|
$users->refreshTotal($data['USR_UID'], 'add', 'paused');
|
||||||
|
|
||||||
$con = Propel::getConnection( ListPausedPeer::DATABASE_NAME );
|
$con = Propel::getConnection( ListPausedPeer::DATABASE_NAME );
|
||||||
try {
|
try {
|
||||||
$this->fromArray( $data, BasePeer::TYPE_FIELDNAME );
|
$this->fromArray( $data, BasePeer::TYPE_FIELDNAME );
|
||||||
@@ -172,8 +180,20 @@ class ListPaused extends BaseListPaused {
|
|||||||
* @throws type
|
* @throws type
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public function remove ($app_uid, $del_index)
|
public function remove ($app_uid, $del_index, $data_inbox)
|
||||||
{
|
{
|
||||||
|
$users = new Users();
|
||||||
|
$users->refreshTotal($data_inbox['USR_UID'], 'removed', 'paused');
|
||||||
|
|
||||||
|
$oRow = ApplicationPeer::retrieveByPK($app_uid);
|
||||||
|
$aFields = $oRow->toArray( BasePeer::TYPE_FIELDNAME );
|
||||||
|
$data_inbox['APP_STATUS'] = $aFields['APP_STATUS'];
|
||||||
|
if ($data_inbox['APP_STATUS'] == 'TO_DO') {
|
||||||
|
$users->refreshTotal($data_inbox['USR_UID'], 'add', 'inbox');
|
||||||
|
}
|
||||||
|
$listInbox = new ListInbox();
|
||||||
|
$listInbox->newRow($data_inbox, $data_inbox['USR_UID']);
|
||||||
|
|
||||||
$con = Propel::getConnection( ListPausedPeer::DATABASE_NAME );
|
$con = Propel::getConnection( ListPausedPeer::DATABASE_NAME );
|
||||||
try {
|
try {
|
||||||
$this->setAppUid($app_uid);
|
$this->setAppUid($app_uid);
|
||||||
|
|||||||
Reference in New Issue
Block a user