Skip to content

Commit

Permalink
#3252 - fix
Browse files Browse the repository at this point in the history
  • Loading branch information
romanlesnikov committed Mar 23, 2021
1 parent 18f553e commit 3f63c59
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions install/sql/system.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4576,8 +4576,8 @@ INSERT INTO `sys_grid_actions` (`object`, `type`, `name`, `title`, `icon`, `conf
('sys_badges_administration', 'independent', 'add', '_adm_form_btn_badges_add', '', 0, 1);

INSERT INTO `sys_grid_actions` (`object`, `type`, `name`, `title`, `icon`, `confirm`, `order`, `icon_only`) VALUES
('sys_reports_administration', 'single', 'check_in', '_adm_form_btn_reports_check_in', 'check-square', 0, 1, 1),
('sys_reports_administration', 'single', 'check_out', '_adm_form_btn_reports_check_out', 'square', 0, 2, 1);
('sys_reports_administration', 'single', 'check_in', '_adm_form_btn_reports_check_in', 'lock-open', 0, 1, 1),
('sys_reports_administration', 'single', 'check_out', '_adm_form_btn_reports_check_out', 'lock', 0, 2, 1);


INSERT INTO `sys_grid_actions` (`object`, `type`, `name`, `title`, `icon`, `icon_only`, `confirm`, `order`) VALUES
Expand Down
6 changes: 5 additions & 1 deletion template/scripts/BxBaseReportsGrid.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ private function _performActionStatus($iStatus, $sCmtsText)
$aIdsAffected = array ();
foreach($aIds as $iId) {
$oReport = BxDolReport::getObjectInstance($CNF['OBJECT_REPORTS'], $iId, true);
$oReport->changeStatusReport($iStatus, bx_get_logged_profile_id(), _t($sCmtsText));
$oReport->changeStatusReport($iStatus, bx_get_logged_profile_id(), _t($sCmtsText));
$aIdsAffected[] = $iId;
$iAffected++;
}
Expand Down Expand Up @@ -209,8 +209,12 @@ protected function _getActionCheckIn($sType, $sKey, $a, $isSmall = false, $isDis

protected function _getActionCheckOut($sType, $sKey, $a, $isSmall = false, $isDisabled = false, $aRow = array())
{
if ($aRow["checked_by"] != bx_get_logged_profile_id())
return '';

if($aRow["status"] != BX_DOL_REPORT_STASUS_IN_PROCESS)
return '';

return parent::_getActionDefault ($sType, $sKey, $a, $isSmall, $isDisabled, $aRow);
}

Expand Down

0 comments on commit 3f63c59

Please sign in to comment.