Skip to content

Commit

Permalink
Suite du traitement de la demande d'avis sur une demande de congés/d'…
Browse files Browse the repository at this point in the history
…absence
  • Loading branch information
pacomte-Paris1 committed Jun 3, 2024
1 parent d38971b commit 169632e
Show file tree
Hide file tree
Showing 25 changed files with 892 additions and 474 deletions.
6 changes: 3 additions & 3 deletions html/affiche_solde.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
$mode = $_POST["mode"];
if ($mode == "")
{
$mode = "resp";
$mode = MODE_RESPONSABLE;
}

$structureid = null;
Expand Down Expand Up @@ -89,7 +89,7 @@
$agentselect = $_POST["agentselect"];
}

if ($mode == 'rh')
if ($mode == MODE_RH)
{
$sql = "SELECT STRUCTUREID FROM STRUCTURE WHERE STRUCTUREIDPARENT = '' OR STRUCTUREIDPARENT NOT IN (SELECT DISTINCT STRUCTUREID FROM STRUCTURE) ORDER BY STRUCTUREIDPARENT"; // NOMLONG
$query = mysqli_query($dbcon, $sql);
Expand Down Expand Up @@ -143,7 +143,7 @@
echo "<br>";

}
elseif (strcasecmp($mode, "resp") == 0)
elseif (strcasecmp($mode, MODE_RESPONSABLE) == 0)
{
$structureliste = $user->structrespliste();
//var_dump("Avant appel enleverstructuresinclues_soldes");
Expand Down
6 changes: 3 additions & 3 deletions html/ajouter_conges.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
$commentaire_supp = null;
$ancienacquis_supp = null;
$remove_array = null;
$mode = 'resp';
$mode = MODE_RESPONSABLE;
if (isset($_POST["nbr_jours_conges"]))
{
$nbr_jours_conges = $_POST["nbr_jours_conges"];
Expand Down Expand Up @@ -169,7 +169,7 @@
//echo "Ce n'est pas un tableau<br>";
}

if ($agentid == "" and strcasecmp($mode, "gestrh") == 0) // Si on est en mode gestrh et qu'aucun agent n'est selectionné
if ($agentid == "" and strcasecmp($mode, MODE_RH) == 0) // Si on est en mode gestrh et qu'aucun agent n'est selectionné
{
echo "<form name='selectagentcongessupp' method='post' >";

Expand All @@ -187,7 +187,7 @@
echo "<input type='submit' class='g2tbouton g2tsuivantbouton' value='Suivant' >";
echo "</form>";
}
elseif ($agentid == "") // On est pas en mode rh ==> Donc on est en mode "resp"
elseif ($agentid == "") // On est pas en mode rh ==> Donc on est en mode MODE_RESPONSABLE
{
echo "<form name='selectagentcongessupp' method='post' >";

Expand Down
10 changes: 5 additions & 5 deletions html/class/affectation.php
Original file line number Diff line number Diff line change
Expand Up @@ -416,10 +416,10 @@ function declarationTPliste($datedebut, $datefin)
* @param boolean $pour_modif
* optional if true and $affiche_declaTP=true, display the part time declaration in edit mode
* @param boolean $mode
* optional if set to "resp" and $affiche_declaTP=true, display all part time declaration. if set to "agent" and $affiche_declaTP=true, display only part time declaration that are in current period
* optional if set to MODE_RESPONSABLE and $affiche_declaTP=true, display all part time declaration. if set to MODE_AGENT and $affiche_declaTP=true, display only part time declaration that are in current period
* @return string HTML text of nomination
*/
function html($affiche_declaTP = false, $pour_modif = false, $mode = "agent")
function html($affiche_declaTP = false, $pour_modif = false, $mode = MODE_AGENT)
{
$agent = new agent($this->dbconnect);
$agent->load($this->agentid());
Expand All @@ -441,9 +441,9 @@ function html($affiche_declaTP = false, $pour_modif = false, $mode = "agent")
if (! is_null($declarationliste)) {

foreach ($declarationliste as $key => $declaration) {
// Si on est en mode "resp" (responsable de service) on affiche toutes les déclarations de TP
// Si on est en mode MODE_RESPONSABLE (responsable de service) on affiche toutes les déclarations de TP
// qui sont liés à cette affectation
if (($this->fonctions->formatdatedb($declaration->datefin()) >= ($this->fonctions->anneeref() . $this->fonctions->debutperiode())) or strcasecmp((string)$mode, "resp") == 0) {
if (($this->fonctions->formatdatedb($declaration->datefin()) >= ($this->fonctions->anneeref() . $this->fonctions->debutperiode())) or strcasecmp((string)$mode, MODE_RESPONSABLE) == 0) {
if (strcasecmp((string)$declaration->statut(), declarationTP::DECLARATIONTP_REFUSE) != 0) {
if ($premiereligne) {
$htmltext = $htmltext . "Tableau des temps partiels déclarés dans G2T pour " . $agent->identitecomplete() . "<br>";
Expand All @@ -467,7 +467,7 @@ function html($affiche_declaTP = false, $pour_modif = false, $mode = "agent")
}
if ($premiereligne) // Si on a affiché aucune ligne de déclaration de TP
{
if (strcasecmp((string)$mode, "resp") == 0) // Si on est en mode responsable
if (strcasecmp((string)$mode, MODE_RESPONSABLE) == 0) // Si on est en mode responsable
$htmltext = $htmltext . "<B>" . $agent->identitecomplete() . " n'a aucune déclaration de temps partiel saisie dans G2T.</B><br>";
else
$htmltext = $htmltext . "<B>" . $agent->identitecomplete() . " n'a aucune déclaration de temps partiel active dans G2T.</B><br>";
Expand Down
Loading

0 comments on commit 169632e

Please sign in to comment.