Skip to content
Snippets Groups Projects
Verified Commit 130da1ce authored by Damien's avatar Damien
Browse files

FEAT #59 History for reports

parent 3187de2e
No related branches found
No related tags found
No related merge requests found
......@@ -16,6 +16,7 @@ namespace Report\controllers;
use Core\Models\GroupModel;
use Core\Models\ServiceModel;
use History\controllers\HistoryController;
use Report\models\ReportModel;
use Slim\Http\Request;
use Slim\Http\Response;
......@@ -83,6 +84,15 @@ class ReportController
ReportModel::deleteForGroupId(['groupId' => $aArgs['groupId'], 'reportIds' => $reportIdsToDelete]);
}
HistoryController::add([
'tableName' => 'usergroups_reports',
'recordId' => $aArgs['groupId'],
'eventType' => 'UP',
'info' => _REPORT_MODIFICATION,
'moduleId' => 'report',
'eventId' => 'reportModification',
]);
return $response->withJson(['success' => 'success']);
}
}
......
......@@ -23,3 +23,4 @@ define('_INVALID_CLAUSE', 'Clause is not valid');
define('_PRIORITY_CREATION', 'Priority creation');
define('_PRIORITY_MODIFICATION', 'Priority modification');
define('_PRIORITY_SUPPRESSION', 'Priority suppression');
define('_REPORT_MODIFICATION', 'Report modification');
......@@ -23,3 +23,4 @@ define('_INVALID_CLAUSE', 'Clause non valide');
define('_PRIORITY_CREATION', 'Création priorité');
define('_PRIORITY_MODIFICATION', 'Modification priorité');
define('_PRIORITY_SUPPRESSION', 'Suppression priorité');
define('_REPORT_MODIFICATION', 'Modification états et édition');
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment