feat: ensure numeric conversion for stock values in ProductCardRow component
This commit is contained in:
parent
4d22d85851
commit
f6503ace2b
@ -63,9 +63,9 @@ export function ProductCardRow({
|
||||
const { can, hasRole } = useCan();
|
||||
const isVerifier = hasRole('developer') || hasRole('owner');
|
||||
const variantCount = product.variants_count ?? 0;
|
||||
const totalStock = product.total_stock ?? 0;
|
||||
const totalReject = product.total_reject_stock ?? 0;
|
||||
const totalRetail = product.total_retail_stock ?? 0;
|
||||
const totalStock = Number(product.total_stock ?? 0);
|
||||
const totalReject = Number(product.total_reject_stock ?? 0);
|
||||
const totalRetail = Number(product.total_retail_stock ?? 0);
|
||||
const totalAll = totalStock + totalReject + totalRetail;
|
||||
|
||||
const isPending = product.status === 'pending';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user