Merge pull request #130 from R0m1k3/1.1

Update product data to correctly display expiry dates
This commit is contained in:
LogiFlow authored and GitHub committed 2025-08-14 14:04:24 +02:00
commit 2620645e60
2 files changed
+2

No files matched your search

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

+2
View File
@@ -1368,6 +1368,7 @@ export class DatabaseStorage implements IStorage {
const results = await query.orderBy(asc(dlcProducts.expiryDate));
return results.map((row: any) => ({
...row.dlcProduct,
dlcDate: row.dlcProduct.expiryDate, // ✅ Mapping expiryDate vers dlcDate pour frontend
supplier: row.supplier,
group: row.group,
creator: row.creator || { id: row.dlcProduct.createdBy, username: 'unknown' }
@@ -1389,6 +1390,7 @@ export class DatabaseStorage implements IStorage {
if (!result) return undefined;
return {
...result.dlcProduct,
dlcDate: result.dlcProduct.expiryDate, // ✅ Mapping expiryDate vers dlcDate pour frontend
supplier: result.supplier,
group: result.group,
creator: result.creator || { id: result.dlcProduct.createdBy, username: 'unknown' }