Adicion de contadores para bandejas CANCELED y PAUSED
This commit is contained in:
@@ -103,6 +103,10 @@ class ListCanceled extends BaseListCanceled {
|
||||
$oListInbox = new ListInbox();
|
||||
$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 );
|
||||
try {
|
||||
$this->fromArray( $data, BasePeer::TYPE_FIELDNAME );
|
||||
|
||||
@@ -118,6 +118,14 @@ class ListPaused extends BaseListPaused {
|
||||
$oListInbox = new ListInbox();
|
||||
$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 );
|
||||
try {
|
||||
$this->fromArray( $data, BasePeer::TYPE_FIELDNAME );
|
||||
@@ -172,8 +180,20 @@ class ListPaused extends BaseListPaused {
|
||||
* @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 );
|
||||
try {
|
||||
$this->setAppUid($app_uid);
|
||||
|
||||
Reference in New Issue
Block a user