From bac38b76d7622c7f8abfd8295abda587143e0a09 Mon Sep 17 00:00:00 2001 From: michaelschal <35957947-michaelschal@users.noreply.replit.com> Date: Thu, 21 Aug 2025 11:33:23 +0000 Subject: [PATCH 1/2] Update year selector in advertising module to show current year and next five Adjusts the year selection range in the advertising module to display the current year and the following five years, setting the current year as the default. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 0ec86cdf-a5be-4b0e-84a3-07b926f5cc80 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/0ec86cdf-a5be-4b0e-84a3-07b926f5cc80/0gylnen --- client/src/pages/Publicities.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/client/src/pages/Publicities.tsx b/client/src/pages/Publicities.tsx index 50a7b75..07e3ec9 100644 --- a/client/src/pages/Publicities.tsx +++ b/client/src/pages/Publicities.tsx @@ -34,11 +34,9 @@ export default function Publicities() { // Seuls les admins peuvent modifier/supprimer const canModify = user?.role === 'admin'; - // Generate year options (2020 to current year + 5 years) + // Generate year options (current year + 5 years ahead) const currentYear = new Date().getFullYear(); - const startYear = 2020; - const endYear = currentYear + 5; - const yearOptions = Array.from({ length: endYear - startYear + 1 }, (_, i) => startYear + i); + const yearOptions = Array.from({ length: 6 }, (_, i) => currentYear + i); const { data: publicities = [], isLoading } = useQuery({ queryKey: ['/api/publicities', selectedYear, selectedStoreId], From 393ee4a23145d16131a11b594edfef5e338d2d19 Mon Sep 17 00:00:00 2001 From: michaelschal <35957947-michaelschal@users.noreply.replit.com> Date: Thu, 21 Aug 2025 11:34:41 +0000 Subject: [PATCH 2/2] Set default year selection to the current year for better usability Update the year selector component in Publicities.tsx to default to the current year, improving the user experience by pre-selecting the most relevant year. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 0ec86cdf-a5be-4b0e-84a3-07b926f5cc80 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/0ec86cdf-a5be-4b0e-84a3-07b926f5cc80/0gylnen --- client/src/pages/Publicities.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/src/pages/Publicities.tsx b/client/src/pages/Publicities.tsx index 07e3ec9..6c1d43a 100644 --- a/client/src/pages/Publicities.tsx +++ b/client/src/pages/Publicities.tsx @@ -286,9 +286,10 @@ export default function Publicities() {