feat: reconcile application vertical slices
Backfill the completed acquisitions, sales, dashboard, pricing, search, public detail, worker, migration, contracts, validation, tests, and implementation-status changes into one verified application slice.
This commit is contained in:
@@ -2,7 +2,16 @@ function toIsoString(value) {
|
||||
return value instanceof Date ? value.toISOString() : value;
|
||||
}
|
||||
|
||||
export function toAdminSaleDto({ sale, saleItem, inventoryItem, saleItems = [saleItem], inventoryItems = [inventoryItem], netProceedsMinor, profitMinor, productName }) {
|
||||
export function toAdminSaleDto({
|
||||
sale,
|
||||
saleItem,
|
||||
inventoryItem,
|
||||
saleItems = [saleItem],
|
||||
inventoryItems = [inventoryItem],
|
||||
netProceedsMinor,
|
||||
profitMinor,
|
||||
productName,
|
||||
}) {
|
||||
return {
|
||||
id: sale.id,
|
||||
sellerId: sale.sellerId,
|
||||
@@ -40,8 +49,11 @@ export function toAdminSaleDto({ sale, saleItem, inventoryItem, saleItems = [sal
|
||||
id: inventoryItem.id,
|
||||
status: inventoryItem.status,
|
||||
},
|
||||
inventoryItems: inventoryItems.map((item) => ({ id: item.id, status: item.status })),
|
||||
inventoryItems: inventoryItems.map((item) => ({
|
||||
id: item.id,
|
||||
status: item.status,
|
||||
})),
|
||||
createdAt: toIsoString(sale.createdAt),
|
||||
updatedAt: toIsoString(sale.updatedAt),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user