Fix four defects the screenshots and tests exposed
Verifying the rendered pages rather than the build turned up real bugs: - The WP-00 health page still sat at src/app/page.tsx and silently won the route over the new Aperçu screen, so the home page was a database status readout. Moved to /api/sante, where a probe belongs, and wired into the compose healthcheck. - The unassigned row showed a +14 h delta against a contract of zero, reading as an overshoot when it is simply the volume left to staff. It now shows what there is to fill. - Two sidebar entries lit at once: an anchor link matched its own page, and /equipe matched an employee record. Highlighting now resolves to the most specific match, and a test asserts exactly one entry lights per screen. - Section tabs with no built screen pointed at the home page, which reads as a broken tab. They now lead to their first entry's placeholder. Also gives truncated compliance alerts a title attribute, so a narrow cell no longer says there is a problem without saying which. Playwright can reuse a preinstalled browser through PLAYWRIGHT_CHROMIUM_PATH when its revision differs from the bundled one. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Cr9dkEHwbDgkWPnyGj1Rjv
This commit is contained in:
11 files changed
+260
-47
No files matched your search
@@ -12,6 +12,8 @@ export interface CounterStripProps {
|
||||
counters: WeekCountersView;
|
||||
/** Vrai si le contrat est au forfait jours : pas de comparaison horaire. */
|
||||
forfaitJours?: boolean;
|
||||
/** Ligne des besoins sans titulaire : il n'y a pas de contrat à comparer. */
|
||||
unassigned?: boolean;
|
||||
className?: string;
|
||||
}
|
||||
|
||||
@@ -32,8 +34,23 @@ function Cell({ label, value }: { label: string; value: string }) {
|
||||
export function CounterStrip({
|
||||
counters,
|
||||
forfaitJours = false,
|
||||
unassigned = false,
|
||||
className,
|
||||
}: CounterStripProps) {
|
||||
// Un besoin non couvert n'a pas de contrat : afficher un écart le compare à
|
||||
// zéro et fait lire « +14 h » comme un dépassement, alors que c'est
|
||||
// simplement le volume à pourvoir.
|
||||
if (unassigned) {
|
||||
return (
|
||||
<div className={cx('flex items-center gap-2 text-micro', className)}>
|
||||
<span className="text-ink-3">À pourvoir</span>
|
||||
<span className="tnum font-semibold text-ink-2">
|
||||
{counters.plannedLabel}
|
||||
</span>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
if (forfaitJours) {
|
||||
return (
|
||||
<div className={cx('flex items-center gap-2 text-micro', className)}>
|
||||
|
||||
@@ -87,7 +87,13 @@ export function ShiftChip({
|
||||
</span>
|
||||
|
||||
{alert ? (
|
||||
<span className="mt-px flex items-center gap-1 font-medium text-danger-soft-ink">
|
||||
// Le motif est tronqué dans une cellule étroite : le `title` garde le
|
||||
// texte complet accessible, sinon l'alerte dit qu'il y a un problème
|
||||
// sans jamais dire lequel.
|
||||
<span
|
||||
className="mt-px flex items-center gap-1 font-medium text-danger-soft-ink"
|
||||
title={alert}
|
||||
>
|
||||
<span aria-hidden>▲</span>
|
||||
<span className="truncate">{alert}</span>
|
||||
</span>
|
||||
|
||||
@@ -106,6 +106,7 @@ function Row({ row, days }: { row: DemoWeekRow; days: readonly string[] }) {
|
||||
<CounterStrip
|
||||
counters={counters}
|
||||
forfaitJours={row.employee.forfaitJours ?? false}
|
||||
unassigned={row.unassigned ?? false}
|
||||
className="mt-1"
|
||||
/>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user