feat: Implement initial product data fetching API and establish the Product Requirements Document.

This commit is contained in:
Michael committed 2026-02-23 11:27:14 +01:00
1 parent 17498dcc10
commit b7caf552a2
4 files changed
+108 -196

No files matched your search

+1 -1
View File
@@ -40,7 +40,7 @@ export async function getProductRows(input: GetProductRowsInput): Promise<Produc
// ... (allowedPeriods calculation remains the same)
const now = new Date();
const allowedPeriods = new Set<string>();
for (let i = 12; i >= 1; i--) {
for (let i = 12; i >= 0; i--) { // i >= 0 au lieu de 1 pour inclure le mois en cours
const d = new Date(now.getFullYear(), now.getMonth() - i, 1);
allowedPeriods.add(`${d.getFullYear()}${String(d.getMonth() + 1).padStart(2, "0")}`);
}