From 78286540fefe162e82c96872309949904196cbec Mon Sep 17 00:00:00 2001 From: stephan Date: Wed, 19 Aug 2026 16:56:47 -0400 Subject: [PATCH] =?UTF-8?q?MSIN-4578=20=E2=80=94=20Updated=20bib=20and=20c?= =?UTF-8?q?hip=20order=20management=20functionality.=20Enhanced=20UI=20ele?= =?UTF-8?q?ments=20and=20CSS=20for=20better=20readability=20and=20usabilit?= =?UTF-8?q?y.=20Adjusted=20PHP=20functions=20to=20support=20new=20mileston?= =?UTF-8?q?e=20and=20actual=20date=20reporting,=20including=20improved=20l?= =?UTF-8?q?ocalization=20for=20user=20interface=20texts.=20Incremented=20v?= =?UTF-8?q?ersion=20to=204.73.037=20to=20reflect=20these=20changes.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- css/style.css | 41 ++++++++--- php/inc_fx_bib_ops.php | 78 ++++++++++----------- php/inc_fx_promoteur.php | 7 +- php/inc_fx_promoteur_hub.php | 4 +- php/inc_settings.php | 2 +- sql/MSIN-4578-gestionnaire-dossards-ops.sql | 52 +++++++++----- 6 files changed, 110 insertions(+), 74 deletions(-) diff --git a/css/style.css b/css/style.css index f0fcda5d..04e09926 100644 --- a/css/style.css +++ b/css/style.css @@ -7429,7 +7429,7 @@ button.inscr-gestion-list-remis:hover{ } } -/* MSIN-4578 — Gestionnaire de dossards (ops global, temporaire) */ +/* MSIN-4578 — Gestionnaire de commande de dossards et puces (ops global, temporaire) */ .promoteur-hub-bib-ops{ padding:14px 16px; background:#f4f7fb; @@ -7439,20 +7439,39 @@ button.inscr-gestion-list-remis:hover{ } .bib-ops-table{ margin-bottom:0; + color:#222; +} +/* .table thead du site est orange (#f3a566) — illisible avec un texte coloré. */ +.bib-ops-table.table thead tr{ + background:#eef1f4; + color:#222; } .bib-ops-table th{ - white-space:nowrap; font-weight:600; - color:#1f3b63; - border-bottom:2px solid #f3a566; + color:#222; + border-bottom:1px solid #c5cdd5; + vertical-align:middle; } -.bib-ops-due.is-overdue{ +.bib-ops-table th.bib-ops-th-ms{ + text-align:center; + white-space:normal; + min-width:9.5em; + border-left:1px solid #d5dde5; +} +.bib-ops-table th.bib-ops-th-sub{ + font-weight:500; + font-size:12px; + color:#444; + white-space:nowrap; + border-left:1px solid #d5dde5; +} +.bib-ops-table td.bib-ops-jalon, +.bib-ops-table td.bib-ops-real{ + white-space:nowrap; + font-variant-numeric:tabular-nums; + border-left:1px solid #e8eef4; +} +.bib-ops-jalon.is-overdue{ color:#b3261e; font-weight:600; } -.bib-ops-due.is-done{ - color:#2e7d4f; -} -.bib-ops-done-mark{ - font-weight:700; -} diff --git a/php/inc_fx_bib_ops.php b/php/inc_fx_bib_ops.php index 0aef50a9..80ae4c62 100644 --- a/php/inc_fx_bib_ops.php +++ b/php/inc_fx_bib_ops.php @@ -45,8 +45,7 @@ if (!function_exists('fxBibOpsUserCanAccessGlobal')) { $tabEvents = $objDatabase->fxGetResults( "SELECT e.eve_id, e.eve_nom_fr, e.eve_nom_en, - e.eve_date_debut, e.eve_date_fin, - e.eve_lieu_fr, e.eve_lieu_en + e.eve_date_debut, e.eve_date_fin FROM inscriptions_evenements e WHERE e.eve_actif = 1 AND ( @@ -82,14 +81,9 @@ if (!function_exists('fxBibOpsUserCanAccessGlobal')) { if ($strNom === '') { $strNom = trim((string)($tabRow['eve_nom_' . $strAlt] ?? '')); } - $strLieu = trim((string)($tabRow['eve_lieu_' . $strLangue] ?? '')); - if ($strLieu === '') { - $strLieu = trim((string)($tabRow['eve_lieu_' . $strAlt] ?? '')); - } $tabOut[$intEveId] = [ 'eve_id' => $intEveId, 'nom' => $strNom, - 'lieu' => $strLieu, 'date_label' => fxBibOpsFormatEventDate($tabRow), 'milestones' => [], ]; @@ -164,6 +158,19 @@ if (!function_exists('fxBibOpsUserCanAccessGlobal')) { return $intTs < strtotime(date('Y-m-d')); } + /** Date seule (Y-m-d) pour le rapport ops — pas l’heure. */ + function fxBibOpsFormatReportDate($strValue) { + $strValue = trim((string)$strValue); + if ($strValue === '' || strpos($strValue, '0000-00-00') === 0) { + return ''; + } + $intTs = strtotime($strValue); + if ($intTs <= 0) { + return ''; + } + return date('Y-m-d', $intTs); + } + function fxBibOpsRenderDashboard($strLangue = 'fr') { $strLangue = ($strLangue === 'en') ? 'en' : 'fr'; $tabEvents = fxBibOpsLoadUpcomingBibEvents($strLangue); @@ -172,8 +179,9 @@ if (!function_exists('fxBibOpsUserCanAccessGlobal')) { : []; $strEmptyDue = fxBibTexte('bib_v5_ops_due_empty', 0); $strOverdue = fxBibTexte('bib_v5_ops_overdue', 0); - $strDone = fxBibTexte('bib_v5_ops_done', 0); $strOpen = fxBibTexte('bib_v5_ops_open', 0); + $strJalon = fxBibTexte('bib_v5_cmd_jalon', 0); + $strRealite = fxBibTexte('bib_v5_cmd_realite', 0); $html = '
'; $html .= '
'; @@ -194,13 +202,20 @@ if (!function_exists('fxBibOpsUserCanAccessGlobal')) { $html .= '
'; $html .= ''; - $html .= ''; - $html .= ''; - $html .= ''; + $html .= ''; + $html .= ''; + $html .= ''; + $html .= ''; foreach ($tabKinds as $strKind) { - $html .= ''; + $html .= ''; + } + $html .= ''; + $html .= ''; + foreach ($tabKinds as $strKind) { + $html .= ''; + $html .= ''; } - $html .= ''; $html .= ''; foreach ($tabEvents as $tabEve) { @@ -209,40 +224,25 @@ if (!function_exists('fxBibOpsUserCanAccessGlobal')) { ? fxBibCommandePageUrl($intEveId, $strLangue) : '#'; $html .= ''; - $html .= ''; + $html .= ''; $html .= ''; foreach ($tabKinds as $strKind) { $tabMs = $tabEve['milestones'][$strKind] ?? ['due' => null, 'done_at' => null]; - $strDue = (string)($tabMs['due'] ?? ''); - $strDoneAt = (string)($tabMs['done_at'] ?? ''); + $strDue = fxBibOpsFormatReportDate($tabMs['due'] ?? ''); + $strDoneAt = fxBibOpsFormatReportDate($tabMs['done_at'] ?? ''); $blnOverdue = fxBibOpsDueIsOverdue($strDue, $strDoneAt); - $strClass = 'bib-ops-due'; - if ($strDoneAt !== '') { - $strClass .= ' is-done'; - } elseif ($blnOverdue) { - $strClass .= ' is-overdue'; - } - $strLabel = ($strDue !== '') ? $strDue : $strEmptyDue; - $strTitle = ''; + $strDueClass = 'bib-ops-jalon'; if ($blnOverdue) { - $strTitle = $strOverdue; - } elseif ($strDoneAt !== '') { - $strTitle = $strDone; + $strDueClass .= ' is-overdue'; } - $html .= ''; } $html .= '
' . fxBibEsc(fxBibTexte('bib_v5_ops_col_event', 0)) . '' . fxBibEsc(fxBibTexte('bib_v5_ops_col_dates', 0)) . '
' . fxBibEsc(fxBibTexte('bib_v5_ops_col_event', 0)) . '' . fxBibEsc(fxBibTexte('bib_v5_ops_col_dates', 0)) . '' . fxBibEsc(fxBibTexte('bib_v5_cmd_ms_' . $strKind, 0)) . '' + . fxBibEsc(fxBibTexte('bib_v5_cmd_ms_' . $strKind, 0)) . '
' . fxBibEsc($strJalon) . '' . fxBibEsc($strRealite) . '
' . fxBibEsc($tabEve['nom']) . ''; - if ($tabEve['lieu'] !== '') { - $html .= '
' . fxBibEsc($tabEve['lieu']) . '
'; - } - $html .= '
' . fxBibEsc($tabEve['nom']) . '' . fxBibEsc($tabEve['date_label']) . ''; + $html .= '' + . fxBibEsc($strDoneAt !== '' ? $strDoneAt : $strEmptyDue) . '