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

Merge branch '18.04' into develop

parents 3b86c748 424c4b0a
No related branches found
No related tags found
No related merge requests found
...@@ -30,8 +30,8 @@ if (empty($user)) { ...@@ -30,8 +30,8 @@ if (empty($user)) {
$lastname = empty($profile->family_name) ? 'utilisateur' : $profile->family_name; $lastname = empty($profile->family_name) ? 'utilisateur' : $profile->family_name;
\User\models\UserModel::create(['user' => ['userId' => $idToken->sub, 'firstname' => $firstname, 'lastname' => $lastname, 'changePassword' => 'N']]); \User\models\UserModel::create(['user' => ['userId' => $idToken->sub, 'firstname' => $firstname, 'lastname' => $lastname, 'changePassword' => 'N']]);
$user = \User\models\UserModel::getByUserId(['userId' => $idToken->sub]); $user = \User\models\UserModel::getByUserId(['userId' => $idToken->sub]);
\User\models\UserModel::addGroup(['id' => $user['id'], 'groupId' => 'AGENT']); \User\models\UserModel::addGroup(['id' => $user['id'], 'groupId' => $ozwilloConfig['groupId']]);
\User\models\UserEntityModel::addUserEntity(['id' => $user['id'], 'entityId' => 'VILLE', 'primaryEntity' => 'Y']); \User\models\UserEntityModel::addUserEntity(['id' => $user['id'], 'entityId' => $ozwilloConfig['entityId'], 'primaryEntity' => 'Y']);
} }
$_SESSION['ozwillo']['userId'] = $idToken->sub; $_SESSION['ozwillo']['userId'] = $idToken->sub;
......
...@@ -6,4 +6,6 @@ ...@@ -6,4 +6,6 @@
<URI>https://accounts.ozwillo-preprod.eu/</URI> <URI>https://accounts.ozwillo-preprod.eu/</URI>
<CLIENT_ID>db8aa58f-e578-4ad9-96c6-47d95faa5c65</CLIENT_ID> <CLIENT_ID>db8aa58f-e578-4ad9-96c6-47d95faa5c65</CLIENT_ID>
<CLIENT_SECRET>P4RO8tUhERQLWFIuqVvgtPPaoY16jtZ+4bUTI94AzzM</CLIENT_SECRET> <CLIENT_SECRET>P4RO8tUhERQLWFIuqVvgtPPaoY16jtZ+4bUTI94AzzM</CLIENT_SECRET>
<ENTITY_ID>VILLE</ENTITY_ID>
<GROUP_ID>AGENT</GROUP_ID>
</ROOT> </ROOT>
...@@ -490,10 +490,10 @@ class PrintControler extends PrintFunctions ...@@ -490,10 +490,10 @@ class PrintControler extends PrintFunctions
$pdf->SetFont('Arial','',11); $pdf->SetFont('Arial','',11);
foreach ($this->array_print[$cpt]['retrieve_VisaWorkflow'] as $key => $value) { foreach ($this->array_print[$cpt]['retrieve_VisaWorkflow'] as $key => $value) {
$signatory = ''; $signatory = '';
if($value['signatory']){ if($value['signatory'] || ($value['requested_signature'] && empty($value['process_date']))){
$signatory = ' ('._SIGNATORY.')'; $signatory = ' ('._SIGNATORY.')';
} else if ($value['requested_signature'] && empty($value['process_date'])) { } else {
$signatory = ' ('._REQUESTED_SIGNATURE.')'; $signatory = ' ('._VISA_USER_SEARCH_MIN.')';
} }
$pdf->Cell(140,5,utf8_decode($key+1 . '. ' .$value['firstname']. ' ' . $value['lastname'] . $signatory),1,0, 'L', false); $pdf->Cell(140,5,utf8_decode($key+1 . '. ' .$value['firstname']. ' ' . $value['lastname'] . $signatory),1,0, 'L', false);
$pdf->Cell(42,5,functions::format_date_db($value['process_date'], true, '', true),1,1, 'C', false); $pdf->Cell(42,5,functions::format_date_db($value['process_date'], true, '', true),1,1, 'C', false);
......
...@@ -84,4 +84,11 @@ span.change { ...@@ -84,4 +84,11 @@ span.change {
/*color:white;*/ /*color:white;*/
background-color: #BAD1E2; background-color: #BAD1E2;
border-radius: 5px; border-radius: 5px;
} }
\ No newline at end of file
.visaWorkFlowBasket {
width:50%;
text-align:center !important;
background-color:transparent !important;
font-size: 14px;
}
<?php <?php
/**
* Copyright Maarch since 2008 under licence GPLv3.
* See LICENCE.txt file at the root folder for more details.
* This file is part of Maarch software.
*
*/
require_once('core/class/class_core_tools.php'); require_once('core/class/class_core_tools.php');
$Core_Tools = new core_tools; $Core_Tools = new core_tools;
$Core_Tools->load_lang(); $Core_Tools->load_lang();
$status = 0; $status = 0;
if(isset($_REQUEST['typeList'])){ if (isset($_REQUEST['typeList'])) {
$typeList = $_REQUEST['typeList']; $typeList = $_REQUEST['typeList'];
}else{ } else {
$typeList = 'entity_id'; $typeList = 'entity_id';
} }
if(isset($_REQUEST['showStatus'])){ if (isset($_REQUEST['showStatus'])) {
$showStatus = true; $showStatus = true;
}else{ } else {
$showStatus = false; $showStatus = false;
} }
require_once('modules/entities/class/class_manage_listdiff.php');
$diffListObj = new diffusion_list();
$difflist = $diffListObj->get_listinstance($_REQUEST['res_id'], false, $_SESSION['collection_id_choice'],$typeList);
# Include display of list //VISA WORKFLOW
$roles = $diffListObj->list_difflist_roles(); if ($typeList=='VISA_CIRCUIT') {
$visaWorkflow = \SrcCore\models\DatabaseModel::select([
'select' => ['u.firstname', 'u.lastname', 'l.process_date', 'l.process_comment', 'l.signatory', 'l.requested_signature'],
'table' => ['listinstance l, users u'],
'where' => ['l.res_id = ?', 'l.difflist_type = ?', 'u.user_id = l.item_id'],
'data' => [$_REQUEST['res_id'], 'VISA_CIRCUIT'],
'order_by' => ['l.listinstance_id asc']
]);
ob_start(); if (!empty($visaWorkflow)) {
require_once 'modules/entities/difflist_display.php'; $return = '<table style="width:100%;margin-top: 5px;">';
$return .= str_replace(array("\r", "\n", "\t"), array("", "", ""), ob_get_contents()); $return .= '<tr><td class="sstit visaWorkFlowBasket">'._ADMIN_USERS.'</td>';
ob_end_clean(); $return .= '<td class="sstit visaWorkFlowBasket">'._PROCESS_DATE.'</td></tr>';
foreach ($visaWorkflow as $key => $value) {
$signatory = '';
if ($value['signatory'] || ($value['requested_signature'] && empty($value['process_date']))) {
$signatory = ' ('._SIGNATORY.')';
} else {
$signatory = ' ('._VISA_USER_SEARCH_MIN.')';
}
$nb = $key+1;
$return .= '<tr><td style="width:50%;padding: 8px 0px 7px 10px;">'. $nb . '. ' .$value['firstname']. ' ' . $value['lastname'] . $signatory.'</td>';
$return .= '<td style="width:50%; text-align:center;">'.functions::format_date_db($value['process_date'], true, '', true) . '</td></tr>';
}
$return .= '</table>';
} else {
$return .= '<div style="font-style:italic;text-align:center;color:#ea0000;margin:10px;">'._DIFF_LIST.' '._IS_EMPTY.'</div>';
}
} else {
require_once('modules/entities/class/class_manage_listdiff.php');
$diffListObj = new diffusion_list();
$difflist = $diffListObj->get_listinstance($_REQUEST['res_id'], false, $_SESSION['collection_id_choice'], $typeList);
# Include display of list
$roles = $diffListObj->list_difflist_roles();
echo "{status : " . $status . ", toShow : '" . addslashes($return) . "'}"; ob_start();
exit (); require_once 'modules/entities/difflist_display.php';
$return .= str_replace(array("\r", "\n", "\t"), array("", "", ""), ob_get_contents());
ob_end_clean();
}
echo "{status : " . $status . ", toShow : '" . addslashes($return) . "'}";
exit();
...@@ -127,6 +127,8 @@ class CoreConfigModel ...@@ -127,6 +127,8 @@ class CoreConfigModel
$ozwilloConfig['uri'] = (string)$loadedXml->URI; $ozwilloConfig['uri'] = (string)$loadedXml->URI;
$ozwilloConfig['clientId'] = (string)$loadedXml->CLIENT_ID; $ozwilloConfig['clientId'] = (string)$loadedXml->CLIENT_ID;
$ozwilloConfig['clientSecret'] = (string)$loadedXml->CLIENT_SECRET; $ozwilloConfig['clientSecret'] = (string)$loadedXml->CLIENT_SECRET;
$ozwilloConfig['groupId'] = (string)$loadedXml->GROUP_ID;
$ozwilloConfig['entityId'] = (string)$loadedXml->ENTITY_ID;
} }
} }
......
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