НКО
This commit is contained in:
parent
adf272ba5b
commit
7d91b09757
@ -12,6 +12,8 @@ import ShoppingCartIcon from '@mui/icons-material/ShoppingCart';
|
||||
import ListItemText from '@mui/material/ListItemText';
|
||||
import IconButton from '@mui/material/IconButton';
|
||||
import DeleteIcon from '@mui/icons-material/Delete';
|
||||
import FormControlLabel from '@mui/material/FormControlLabel';
|
||||
import Checkbox from '@mui/material/Checkbox';
|
||||
import theme from "../../../../../theme";
|
||||
|
||||
|
||||
@ -81,6 +83,14 @@ const DataGridElement: React.FC<MWProps> = ({ openModal }) => {
|
||||
let price = 0;
|
||||
let prices = 0;
|
||||
|
||||
const [checkboxStates, setCheckboxStates] = React.useState(1);
|
||||
|
||||
const checkboxToggle = () => {
|
||||
checkboxStates == 1
|
||||
? setCheckboxStates( 0.2 )
|
||||
: setCheckboxStates( 1 )
|
||||
}
|
||||
|
||||
const { data } = useDemoData({
|
||||
dataSet: "Commodity",
|
||||
rowLength: 10,
|
||||
@ -213,10 +223,18 @@ const DataGridElement: React.FC<MWProps> = ({ openModal }) => {
|
||||
<Typography id="transition-modal-title" variant="caption">
|
||||
Корзина
|
||||
</Typography>
|
||||
|
||||
<FormControlLabel sx={{ marginTop: "15px", }} control={
|
||||
<Checkbox sx={{
|
||||
color: theme.palette.secondary.main,
|
||||
'&.Mui-checked': {
|
||||
color: theme.palette.secondary.main,
|
||||
},
|
||||
}} onClick={ () => checkboxToggle() } />
|
||||
} label="НКО" />
|
||||
|
||||
<List sx={{
|
||||
width: "50%",
|
||||
marginTop: "15px",
|
||||
border: "1px solid",
|
||||
borderColor: theme.palette.secondary.main
|
||||
}}>
|
||||
@ -288,11 +306,10 @@ const DataGridElement: React.FC<MWProps> = ({ openModal }) => {
|
||||
textAlign: "center",
|
||||
marginTop: "10px"
|
||||
}}>
|
||||
ИТОГО:   { prices } ₽
|
||||
ИТОГО:   { checkboxStates * prices } ₽
|
||||
</Typography>
|
||||
|
||||
</List>
|
||||
|
||||
</Box>
|
||||
|
||||
</Box>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user