diff --git a/timesheetweek_card.php b/timesheetweek_card.php index baaf1b7..caa9bb2 100644 --- a/timesheetweek_card.php +++ b/timesheetweek_card.php @@ -1569,22 +1569,26 @@ function updateWeekRange(){var v=$('#weekyear').val();var p=parseYearWeek(v);if( // Inputs zone/panier bloqués si statut != brouillon $disabledAttr = ($object->status != tw_status('draft')) ? ' disabled' : ''; - echo '
'; - // EN: Scope the vertical and horizontal centering helper to the specific cells that need alignment (days/zones/baskets/hours/totals). - // FR: Limite l'aide de centrage vertical et horizontal aux cellules spécifiques nécessitant l'alignement (jours/zones/paniers/heures/totaux). - echo ''; - echo ''; +echo '
'; +// EN: Scope the vertical and horizontal centering helper to the specific cells that need alignment (days/zones/baskets/hours/totals). +// FR: Limite l'aide de centrage vertical et horizontal aux cellules spécifiques nécessitant l'alignement (jours/zones/paniers/heures/totaux). +echo ''; +echo '
'; // EN: Apply the vertical-centering helper on each day header to keep labels visually aligned. // FR: Applique l'aide de centrage vertical sur chaque en-tête de jour pour conserver des libellés alignés visuellement. // Header jours - echo ''; - echo ''; +echo ''; +echo ''; foreach ($days as $d) { // EN: Render day headers safely even if week dates are undefined. // FR: Affiche les en-têtes de jours en sécurité même sans dates de semaine définies. @@ -1605,15 +1609,15 @@ function updateWeekRange(){var v=$('#weekyear').val();var p=parseYearWeek(v);if( } echo ''; } - echo ''; - echo ''; +echo ''; +echo ''; // EN: Add the vertical-centering helper on zone and meal cells so both controls stay centered whatever their height. // FR: Ajoute l'aide de centrage vertical sur les cellules zone et repas afin que les deux contrôles restent centrés quelle que soit leur hauteur. // Ligne zone + panier (préfills depuis lignes) if (!$isDailyRateEmployee) { echo ''; -echo ''; +echo ''; foreach ($days as $d) { // EN: Attach the vertical-centering helper to keep both zone selector and meal checkbox aligned. // FR: Attache l'aide de centrage vertical pour garder alignés le sélecteur de zone et la case repas. @@ -1635,7 +1639,7 @@ function updateWeekRange(){var v=$('#weekyear').val();var p=parseYearWeek(v);if( echo ''; echo ''; } -echo ''; +echo ''; echo ''; } @@ -1682,11 +1686,11 @@ function updateWeekRange(){var v=$('#weekyear').val();var p=parseYearWeek(v);if( } foreach ($byproject as $pid => $pdata) { // Ligne projet - echo ''; - $colspan = 1 + count($days) + 1; - echo ''; +$colspan = 1 + count($days) + 1; +echo ''; @@ -1695,7 +1699,7 @@ function updateWeekRange(){var v=$('#weekyear').val();var p=parseYearWeek(v);if( // Tâches foreach ($pdata['tasks'] as $task) { echo ''; -echo ''; - } else { +} else { echo ''; } echo ''; @@ -1758,11 +1762,11 @@ function updateWeekRange(){var v=$('#weekyear').val();var p=parseYearWeek(v);if( } echo ''; echo ''; - } else { +} else { echo ''; // EN: Center overall totals and daily sums for consistent middle alignment. // FR: Centre les totaux généraux et journaliers pour un alignement médian homogène. -echo ''; +echo ''; foreach ($days as $d) { echo ''; } @@ -1772,7 +1776,7 @@ function updateWeekRange(){var v=$('#weekyear').val();var p=parseYearWeek(v);if( echo ''; // EN: Center meal counters to match the rest of the grid alignment. // FR: Centre les compteurs de repas pour correspondre au reste de l'alignement de la grille. -echo ''; +echo ''; $initMeals = array_sum($dayMeal); echo ''; echo ''; @@ -1781,7 +1785,7 @@ function updateWeekRange(){var v=$('#weekyear').val();var p=parseYearWeek(v);if( echo ''; // EN: Center overtime summary cells so every footer row follows the same alignment pattern. // FR: Centre les cellules du récapitulatif des heures supplémentaires pour harmoniser l'alignement de chaque ligne de pied. -echo ''; +echo ''; $ot = ($object->overtime_hours > 0 ? (float) $object->overtime_hours : max(0.0, $grand - $contractedHours)); echo ''; echo '';
'.$langs->trans("ProjectTaskColumn").'
'.$langs->trans("ProjectTaskColumn").''.$langs->trans("Total").'
'.$langs->trans("Total").'
'; - $proj = new Project($db); - $proj->fetch($pid); +echo '
'; +$proj = new Project($db); +$proj->fetch($pid); if (empty($proj->ref)) { $proj->ref = $pdata['ref']; $proj->title = $pdata['title']; } echo tw_get_project_nomurl($proj, 1); echo '
'; +echo ''; $tsk = new Task($db); $tsk->fetch((int)$task['task_id']); if (empty($tsk->label)) { $tsk->id = (int)$task['task_id']; $tsk->ref = $task['task_ref'] ?? ''; $tsk->label = $task['task_label']; } @@ -1738,7 +1742,7 @@ function updateWeekRange(){var v=$('#weekyear').val();var p=parseYearWeek(v);if( // FR: Centre les totaux de tâche pour les garder alignés avec les autres valeurs centrées. if ($isDailyRateEmployee) { echo ''.tw_format_days(($rowTotal > 0 ? ($rowTotal / 8.0) : 0.0), $langs).''.formatHours($rowTotal).'
'.tw_format_days($grandDays, $langs).'
'.$langs->trans("Total").''.$langs->trans("Total").'00:00
'.$langs->trans("Meals").''.$langs->trans("Meals").''.$initMeals.'
'.$langs->trans("Overtime").' ('.formatHours($contractedHours).')'.$langs->trans("Overtime").' ('.formatHours($contractedHours).')'.formatHours($ot).'