mirror of
https://github.com/R0m1k3/LogiFlow.git
synced 2026-10-12 09:47:54 +02:00
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
This commit is contained in:
1 parent
1aa3069d89
commit
bac38b76d7
1 file changed
+2
-4
@@ -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],
|
||||
|
||||
Reference in new issue
Block a user