Skip to content
Snippets Groups Projects
Commit 8cfba9d1 authored by Florian Azizian's avatar Florian Azizian
Browse files

FEAT Add dest user in history when document is send to maarch Parapheur.

parent de16a663
No related branches found
No related tags found
No related merge requests found
......@@ -132,8 +132,9 @@ function manage_form($arr_id, $history, $id_action, $label_action, $status, $col
require_once "modules/visa/class/class_modules_tools.php";
$circuit_visa = new visa();
$db = new Database();
$coll_id = $_SESSION['current_basket']['coll_id'];
$db = new Database();
$coll_id = $_SESSION['current_basket']['coll_id'];
$message = '';
foreach ($arr_id as $res_id) {
$result .= $res_id.'#';
......@@ -180,6 +181,9 @@ function manage_form($arr_id, $history, $id_action, $label_action, $status, $col
'objectSent' => $objectSent,
'userId' => $_SESSION['user']['UserId']
]);
$processingUserInfo = MaarchParapheurController::getUserById(['config' => $config, 'id' => $processingUser]);
$message = ' (à ' . $processingUserInfo['firstname'] . ' ' . $processingUserInfo['lastname'] . ')';
}
}
......@@ -213,7 +217,7 @@ function manage_form($arr_id, $history, $id_action, $label_action, $status, $col
$stmt = $db->query('SELECT status FROM res_letterbox WHERE res_id = ?', array($res_id));
$resource = $stmt->fetchObject();
$message = '';
if ($resource->status == 'EVIS' || $resource->status == 'ESIG') {
$sequence = $circuit_visa->getCurrentStep($res_id, $coll_id, 'VISA_CIRCUIT');
$stepDetails = array();
......
......@@ -235,6 +235,18 @@ class MaarchParapheurController
return $response['status'];
}
public static function getUserById($aArgs)
{
$response = \SrcCore\models\CurlModel::exec([
'url' => $aArgs['config']['data']['url'] . '/rest/users/'.$aArgs['id'],
'user' => $aArgs['config']['data']['userId'],
'password' => $aArgs['config']['data']['password'],
'method' => 'GET'
]);
return $response['user'];
}
public static function getHandwrittenDocument($aArgs)
{
$response = \SrcCore\models\CurlModel::exec([
......
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