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

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 = {
...customTariffsResponse,
squiz: customTariffsResponse.squiz.filter(
({ name }) => !name.toLocaleLowerCase().includes("шильдик")
),
squiz: customTariffsResponse.squiz
};
return [tempCustomTariffsResponse]

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