Ref: modification components in selfcheckout

This commit is contained in:
Luis Felipe Cadavid 2024-09-30 15:17:38 -05:00
parent 251a6a2a6a
commit ab7a02bcca
40 changed files with 1315 additions and 557 deletions

View file

@ -0,0 +1,47 @@
"use client";
import Grid2 from '@mui/material/Grid2';
import React from 'react';
import ActionButtons from '@molecules/ActionButtons';
import ProductSearch from '@molecules/ProductSearch';
import SaleSummary from '@molecules/SaleSummary';
interface ControlPanelProps {
onVoidOrder: () => void;
onVoidLast: () => void;
onResume: () => void;
onSearchPLU: (plu: string) => void;
subtotal: number;
discount: number;
tax: number;
total: number;
}
const ControlPanel: React.FC<ControlPanelProps> = ({
onVoidOrder,
onVoidLast,
onResume,
onSearchPLU,
subtotal,
discount,
tax,
total
}) => {
return (
<Grid2 container spacing={4}>
<Grid2 size={{xs:12}}>
<ActionButtons onVoidOrder={onVoidOrder} onVoidLast={onVoidLast} onResume={onResume} />
</Grid2>
<Grid2 size={{xs:12}}>
<ProductSearch onSearch={onSearchPLU} />
</Grid2>
<Grid2 size={{xs:12}}>
<SaleSummary subtotal={subtotal} discount={discount} tax={tax} total={total} />
</Grid2>
</Grid2>
);
};
export default ControlPanel;