mirror of
https://github.com/R0m1k3/LogiFlow.git
synced 2026-10-11 17:27:31 +02:00
Update product data to correctly display expiry dates
Map the expiryDate field to dlcDate in the product data retrieval to resolve undefined date issues. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 31f9bd88-0285-4787-81b3-31ceeea5a08b Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/31f9bd88-0285-4787-81b3-31ceeea5a08b/Qz6UlZZ
This commit is contained in:
1 parent
483dfc4936
commit
fb4a4733f1
2 files changed
+2
No files matched your search
@@ -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' }
|
||||
|
||||
Reference in new issue
Block a user