From 686512516d594a3c64bbea463f6cca63ddf5e1b8 Mon Sep 17 00:00:00 2001 From: michaelschal <35957947-michaelschal@users.noreply.replit.com> Date: Wed, 9 Jul 2025 19:58:38 +0000 Subject: [PATCH] Improve application layout and elements for use on different screen sizes Adds CSS classes and updates component structures to enhance responsiveness. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 91318273-c764-4fd4-be04-bdc12c38af32 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/0715008c-7244-40f4-befc-26c014852236/44fdf252-fbbe-4731-95e0-abf005cc2ded.jpg --- client/src/components/NewSaleForm.tsx | 73 +++++++++--------- client/src/components/SalesHistory.tsx | 50 +++++++----- client/src/index.css | 68 +++++++++++++++++ client/src/pages/Dashboard.tsx | 101 +++++++++++++------------ client/src/pages/Login.tsx | 32 ++++---- 5 files changed, 202 insertions(+), 122 deletions(-) diff --git a/client/src/components/NewSaleForm.tsx b/client/src/components/NewSaleForm.tsx index b79c3ac..7b66f1a 100644 --- a/client/src/components/NewSaleForm.tsx +++ b/client/src/components/NewSaleForm.tsx @@ -159,29 +159,29 @@ export default function NewSaleForm() { return ( - - -
- + + +
+
- Nouvelle Vente + Nouvelle Vente
-

+

Enregistrement d'une vente de feux d'artifice

- +
- + {/* Seller Information */} -
-

-
- +
+

+
+
- Informations Vendeur + Informations Vendeur

-
+
{/* Product Information */} -
-

-
- +
+

+
+
- Informations Produit + Informations Produit

-
+
{/* Customer Information */} -
-

-
- +
+

+
+
- Informations Client + Informations Client

-
+
{/* Identity Information */} -
-

-
- +
+

+
+
- Pièce d'Identité + Pièce d'Identité

-
+
{/* Form Actions */} -
+
diff --git a/client/src/components/SalesHistory.tsx b/client/src/components/SalesHistory.tsx index ea9c679..8bbeabe 100644 --- a/client/src/components/SalesHistory.tsx +++ b/client/src/components/SalesHistory.tsx @@ -143,37 +143,45 @@ export default function SalesHistory({ canDelete = false }: SalesHistoryProps) { }; return ( - - - - - Historique des Ventes + + + +
+ +
+ Historique des Ventes
+

+ Consultation et gestion des ventes enregistrées +

- + {/* Filters */} -
-
+
+
- + setStartDate(e.target.value)} + className="responsive-body" />
- + setEndDate(e.target.value)} + className="responsive-body" />
-
@@ -183,21 +191,21 @@ export default function SalesHistory({ canDelete = false }: SalesHistoryProps) {
) : sales.length === 0 ? ( -
+
Aucune vente trouvée
) : ( -
+
- Date/Heure - Vendeur - Client - Article - Quantité - Gencode - Actions + Date/Heure + Vendeur + Client + Article + Quantité + Gencode + Actions diff --git a/client/src/index.css b/client/src/index.css index fb4ebfd..6dc1329 100644 --- a/client/src/index.css +++ b/client/src/index.css @@ -191,6 +191,74 @@ box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1); } + /* Mobile responsive utilities */ + .mobile-padding { + @apply px-3 sm:px-4 md:px-6 lg:px-8; + } + + .mobile-text-responsive { + @apply text-sm sm:text-base lg:text-lg; + } + + .mobile-header-responsive { + @apply text-lg sm:text-xl lg:text-2xl; + } + + .mobile-button-responsive { + @apply text-xs sm:text-sm lg:text-base px-3 sm:px-4 py-2 sm:py-2.5; + } + + .mobile-grid-responsive { + @apply grid-cols-1 sm:grid-cols-2 lg:grid-cols-3; + } + + .mobile-gap-responsive { + @apply gap-2 sm:gap-4 lg:gap-6; + } + + .mobile-form-responsive { + @apply space-y-4 sm:space-y-6 lg:space-y-8; + } + + /* Touch-friendly interactive elements */ + .touch-friendly { + @apply min-h-[44px] min-w-[44px]; + } + + .touch-friendly-button { + @apply h-11 sm:h-10 lg:h-9 px-4 sm:px-3 lg:px-4; + } + + /* Responsive text sizes */ + .responsive-title { + @apply text-xl sm:text-2xl lg:text-3xl; + } + + .responsive-subtitle { + @apply text-sm sm:text-base lg:text-lg; + } + + .responsive-body { + @apply text-sm sm:text-base; + } + + .responsive-caption { + @apply text-xs sm:text-sm; + } + + /* Mobile-first form improvements */ + .mobile-form-section { + @apply p-4 sm:p-6 lg:p-8; + } + + .mobile-card-header { + @apply p-4 sm:p-6 lg:p-8; + } + + .mobile-card-content { + @apply p-4 sm:p-6 lg:p-8; + } + /* Animation keyframes */ @keyframes slideInRight { from { diff --git a/client/src/pages/Dashboard.tsx b/client/src/pages/Dashboard.tsx index 1653c5d..f7f3537 100644 --- a/client/src/pages/Dashboard.tsx +++ b/client/src/pages/Dashboard.tsx @@ -41,32 +41,32 @@ function DashboardContent() {
{/* Modern Header */}
-
-
-
+
+
+
-
- +
+
-
+
-
-

RegisFlow

-

Registre des ventes des Feux d'artifice

+
+

RegisFlow

+

Registre des ventes des Feux d'artifice

-
+
{/* Store Selector for Admin */} {isAdmin && !isLoadingStores && ( -
+
@@ -97,13 +97,13 @@ export default function Login() { control={form.control} name="password" render={({ field }) => ( - - Mot de passe + + Mot de passe @@ -113,7 +113,7 @@ export default function Login() { />