Ref: modification components in selfcheckout
This commit is contained in:
parent
251a6a2a6a
commit
ab7a02bcca
40 changed files with 1315 additions and 557 deletions
28
package/components/molecules/ProductRow.tsx
Normal file
28
package/components/molecules/ProductRow.tsx
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
"use client";
|
||||
|
||||
import { TableCell, TableRow } from '@mui/material';
|
||||
import React from 'react';
|
||||
|
||||
interface ProductRowProps {
|
||||
amount: number;
|
||||
name: string;
|
||||
unitValue: number;
|
||||
tax: number;
|
||||
discount: number;
|
||||
total: number;
|
||||
}
|
||||
|
||||
const ProductRow: React.FC<ProductRowProps> = ({ amount, name, unitValue, tax, discount, total }) => {
|
||||
return (
|
||||
<TableRow>
|
||||
<TableCell>{amount}</TableCell>
|
||||
<TableCell>{name}</TableCell>
|
||||
<TableCell>${unitValue.toFixed(2)}</TableCell>
|
||||
<TableCell>${tax.toFixed(2)}</TableCell>
|
||||
<TableCell>${discount.toFixed(2)}</TableCell>
|
||||
<TableCell>${total.toFixed(2)}</TableCell>
|
||||
</TableRow>
|
||||
);
|
||||
};
|
||||
|
||||
export default ProductRow;
|
||||
Loading…
Add table
Add a link
Reference in a new issue