From d7de31ac2aaf5d8c20f07336cea63a5a150e21c5 Mon Sep 17 00:00:00 2001 From: michaelschal <35957947-michaelschal@users.noreply.replit.com> Date: Thu, 11 Sep 2025 09:39:26 +0000 Subject: [PATCH] Improve task display and data loading logic Adjust CSS to prevent horizontal scrolling issues, simplify task data fetching by enabling it when a user is logged in, and add critical responsive utility classes to Tailwind CSS configuration for the Tasks module. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 95e8aab4-f39f-4b48-aa57-a759ec15ba3d Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/95e8aab4-f39f-4b48-aa57-a759ec15ba3d/0iFumsU --- client/src/index.css | 2 -- client/src/pages/Tasks.tsx | 2 +- tailwind.config.ts | 13 +++++++++++++ 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/client/src/index.css b/client/src/index.css index 8bf46e5..8ed9dc3 100644 --- a/client/src/index.css +++ b/client/src/index.css @@ -62,13 +62,11 @@ html, body { @apply font-sans antialiased bg-surface text-foreground; - overflow-x: hidden !important; max-width: 100vw; height: 100%; } #root { - overflow-x: hidden !important; max-width: 100vw; height: 100%; } diff --git a/client/src/pages/Tasks.tsx b/client/src/pages/Tasks.tsx index b3c35b9..4ddc565 100644 --- a/client/src/pages/Tasks.tsx +++ b/client/src/pages/Tasks.tsx @@ -378,7 +378,7 @@ export default function Tasks() { throw error; } }, - enabled: !!user && (user.role === 'admin' || (user.role === 'directeur' || user.role === 'manager' ? !!selectedStoreId : true)), + enabled: !!user, // Charger les données dès que l'utilisateur est connecté }); // Fetch users for task assignment - seulement pour admin/manager/directeur diff --git a/tailwind.config.ts b/tailwind.config.ts index ab1bca5..307d868 100644 --- a/tailwind.config.ts +++ b/tailwind.config.ts @@ -3,6 +3,19 @@ import type { Config } from "tailwindcss"; export default { darkMode: ["class"], content: ["./client/index.html", "./client/src/**/*.{js,jsx,ts,tsx}"], + safelist: [ + // Classes responsive critiques pour le module Tâches + 'hidden', 'block', 'flex', 'grid', + 'sm:hidden', 'sm:block', 'sm:flex', 'sm:grid', + 'md:hidden', 'md:block', 'md:flex', 'md:grid', + 'lg:hidden', 'lg:block', 'lg:flex', 'lg:grid', + 'grid-cols-1', 'sm:grid-cols-2', 'sm:grid-cols-3', 'lg:grid-cols-4', + 'min-h-[44px]', 'text-base', 'text-sm', 'text-xs', + 'p-3', 'p-4', 'px-3', 'px-4', 'py-2', 'py-3', + 'gap-2', 'gap-3', 'gap-4', 'sm:gap-4', + 'order-1', 'order-2', 'sm:order-1', 'sm:order-2', + 'flex-col', 'sm:flex-row', 'justify-stretch', 'sm:justify-end' + ], theme: { extend: { borderRadius: {