перенос кнопок в корзине, тариф с шильдиком

This commit is contained in:
Tamara 2024-03-04 00:25:14 +03:00
parent e81a5d50a6
commit c730993fef
2 changed files with 19 additions and 17 deletions

@ -74,9 +74,7 @@ export async function getCustomTariffs(
const tempCustomTariffsResponse = { const tempCustomTariffsResponse = {
...customTariffsResponse, ...customTariffsResponse,
squiz: customTariffsResponse.squiz.filter( squiz: customTariffsResponse.squiz
({ name }) => !name.toLocaleLowerCase().includes("шильдик")
),
}; };
return [tempCustomTariffsResponse] return [tempCustomTariffsResponse]

@ -92,7 +92,8 @@ export default function TotalPrice({ priceAfterDiscounts, priceBeforeDiscounts,
color: theme.palette.gray.dark, color: theme.palette.gray.dark,
width: upMd ? "31.5%" : undefined, width: upMd ? "31.5%" : undefined,
display: "flex", display: "flex",
alignItems: "center", alignItems: upMd ? "center" : "start",
flexDirection: upMd ? "row" : "column",
gap: "30px" gap: "30px"
}} }}
> >
@ -129,6 +130,7 @@ export default function TotalPrice({ priceAfterDiscounts, priceBeforeDiscounts,
height: "31px", height: "31px",
padding: "5px 10px", padding: "5px 10px",
right: "0px", right: "0px",
top: upMd ? 0 : "17px",
}, },
}} }}
> >
@ -158,20 +160,22 @@ export default function TotalPrice({ priceAfterDiscounts, priceBeforeDiscounts,
</Typography> </Typography>
</Box> </Box>
</Badge> </Badge>
<Box sx={{display: "flex", alignItems: "center",
gap: "30px", flexWrap: "wrap",}}>
{notEnoughMoneyAmount > 0 && ( {notEnoughMoneyAmount > 0 && (
<Alert severity="error" variant="filled"> <Alert severity="error" variant="filled">
Нехватает {currencyFormatter.format(notEnoughMoneyAmount / 100)} Не хватает {currencyFormatter.format(notEnoughMoneyAmount / 100)}
</Alert> </Alert>
)} )}
<Button <Button
variant="pena-contained-dark" variant="pena-contained-dark"
disabled = {cart.priceAfterDiscounts === 0} disabled = {cart.priceAfterDiscounts === 0}
onClick={() => (notEnoughMoneyAmount === 0 ? !loading && handlePayClick() : handleReplenishWallet())} onClick={() => (notEnoughMoneyAmount === 0 ? !loading && handlePayClick() : handleReplenishWallet())}
sx={{ mt: "10px" }}
> >
{loading ? <Loader size={24} /> : notEnoughMoneyAmount === 0 ? "Оплатить" : "Пополнить"} {loading ? <Loader size={24} /> : notEnoughMoneyAmount === 0 ? "Оплатить" : "Пополнить"}
</Button> </Button>
</Box> </Box>
</Box> </Box>
</Box>
); );
} }