3 |
|
|
4 |
include('../gen/sql/pgsql/consultation.inc.php'); |
include('../gen/sql/pgsql/consultation.inc.php'); |
5 |
|
|
6 |
|
// |
7 |
|
$case_type_consultation = 'CASE WHEN service.type_consultation=\'avec_avis_attendu\' |
8 |
|
THEN \''._("avec avis attendu").'\' |
9 |
|
WHEN service.type_consultation=\'pour_conformite\' |
10 |
|
THEN \''._("pour conformite").'\' |
11 |
|
WHEN service.type_consultation=\'pour_information\' |
12 |
|
THEN \''._("pour information").'\' |
13 |
|
END'; |
14 |
// SELECT |
// SELECT |
15 |
$champAffiche = array( |
$champAffiche = array( |
16 |
'consultation.consultation as "'._("consultation").'"', |
'consultation.consultation as "'._("consultation").'"', |
19 |
'to_char(consultation.date_reception ,\'DD/MM/YYYY\') as "'._("date_reception").'"', |
'to_char(consultation.date_reception ,\'DD/MM/YYYY\') as "'._("date_reception").'"', |
20 |
'to_char(consultation.date_retour ,\'DD/MM/YYYY\') as "'._("date_retour").'"', |
'to_char(consultation.date_retour ,\'DD/MM/YYYY\') as "'._("date_retour").'"', |
21 |
'to_char(consultation.date_limite ,\'DD/MM/YYYY\') as "'._("date_limite").'"', |
'to_char(consultation.date_limite ,\'DD/MM/YYYY\') as "'._("date_limite").'"', |
22 |
'service.libelle as "'._("service").'"', |
'concat(service.abrege,\' \',service.libelle) as "'._("service").'"', |
23 |
'service.type_consultation as "'._("type_consultation").'"', |
$case_type_consultation.' as "'._("type_consultation").'"', |
24 |
'avis_consultation.libelle as "'._("avis_consultation").'"', |
'avis_consultation.libelle as "'._("avis_consultation").'"', |
25 |
'instructeur.nom as "'._("instructeur").'"', |
'instructeur.nom as "'._("instructeur").'"', |
26 |
'division.code as "'._("division").'"', |
'division.code as "'._("division").'"', |
65 |
'to_char(consultation.date_retour ,\'DD/MM/YYYY\') as "'._("date_retour").'"', |
'to_char(consultation.date_retour ,\'DD/MM/YYYY\') as "'._("date_retour").'"', |
66 |
'to_char(consultation.date_limite ,\'DD/MM/YYYY\') as "'._("date_limite").'"', |
'to_char(consultation.date_limite ,\'DD/MM/YYYY\') as "'._("date_limite").'"', |
67 |
'service.libelle as "'._("service").'"', |
'service.libelle as "'._("service").'"', |
68 |
'service.type_consultation as "'._("type_consultation").'"', |
$case_type_consultation.' as "'._("type_consultation").'"', |
69 |
'avis_consultation.libelle as "'._("avis_consultation").'"', |
'avis_consultation.libelle as "'._("avis_consultation").'"', |
70 |
"case consultation.lu when 't' then 'Oui' else 'Non' end as \""._("lu")."\"", |
"case consultation.lu when 't' then 'Oui' else 'Non' end as \""._("lu")."\"", |
71 |
); |
); |
81 |
'lib' => '<span class="om-icon om-icon-16 om-icon-fix mut-add-16" title="'._('Ajouter plusieurs').'">'._('Ajouter plusieurs').'</span>', |
'lib' => '<span class="om-icon om-icon-16 om-icon-fix mut-add-16" title="'._('Ajouter plusieurs').'">'._('Ajouter plusieurs').'</span>', |
82 |
'right' => $right, |
'right' => $right, |
83 |
); |
); |
84 |
|
// |
85 |
|
if (isset($f) && $f->isUserInstructeur() |
86 |
|
&& $f->getDivisionFromDossier($idx) != $_SESSION["division"]) { |
87 |
|
$tab_actions['corner'] = array(); |
88 |
|
} |
89 |
} |
} |
90 |
|
|
91 |
/** |
/** |
101 |
"style" => "non_lu", |
"style" => "non_lu", |
102 |
), |
), |
103 |
), |
), |
104 |
|
); |
105 |
|
/** |
106 |
|
* Options |
107 |
|
*/ |
108 |
|
// On met la ligne en couleur selon le type de condition |
109 |
|
$options[] = array( |
110 |
|
"type" => "condition", |
111 |
|
"field" => $case_type_consultation, |
112 |
|
"case" => array( |
113 |
|
array( |
114 |
|
"values" => array(_("avec avis attendu"), ), |
115 |
|
"style" => "consultation-avec-avis-attendu", |
116 |
|
), |
117 |
|
array( |
118 |
|
"values" => array(_("pour conformite"), ), |
119 |
|
"style" => "consultation-pour-conformite", |
120 |
|
), |
121 |
|
array( |
122 |
|
"values" => array(_("pour information"), ), |
123 |
|
"style" => "consultation-pour-information", |
124 |
|
), |
125 |
|
), |
126 |
); |
); |
127 |
|
|
128 |
?> |
?> |