Merge branch 'fix-payment-input-and-payment-history-layout' into dev
This commit is contained in:
commit
e1a93be228
@ -100,10 +100,10 @@ export default function AccordionWrapper2({ tariff, price, last, first, createdA
|
||||
fontWeight: 500,
|
||||
color: /* valuesByKey.expired */ false ? theme.palette.text.disabled : theme.palette.gray.dark,
|
||||
px: 0,
|
||||
width: "200px",
|
||||
width: upMd? "200px" : "auto",
|
||||
maxWidth: "200px",
|
||||
overflow: "hidden",
|
||||
textOverflow: "ellipsis"
|
||||
textOverflow: "ellipsis",
|
||||
}}
|
||||
>
|
||||
{tariff.isCustom ? "Мой тариф" : tariff.name}
|
||||
@ -112,7 +112,7 @@ export default function AccordionWrapper2({ tariff, price, last, first, createdA
|
||||
<Box
|
||||
sx={{
|
||||
display: "flex",
|
||||
justifyContent: "space-between",
|
||||
justifyContent: "space-between",
|
||||
alignItems: "center",
|
||||
flexFlow: "1",
|
||||
flexBasis: "60%",
|
||||
|
@ -122,7 +122,7 @@ export default function Payment() {
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (Number(paymentValueField) < 900) {
|
||||
enqueueSnackbar("Минимальная сумма 900р");
|
||||
|
||||
@ -290,7 +290,10 @@ export default function Payment() {
|
||||
value: paymentValueField,
|
||||
type: "number",
|
||||
}}
|
||||
onChange={(e) => setPaymentValueField(e.target.value.replace(/^0+(?=\d\.)/, ""))}
|
||||
onChange={(e) => {
|
||||
const value = parseFloat(e.target.value.replace(/^0+(?=\d\.)/, ""));
|
||||
setPaymentValueField(isNaN(value) ? "" : value.toString());
|
||||
}}
|
||||
id="payment-amount"
|
||||
gap={upMd ? "16px" : "10px"}
|
||||
color={"#F2F3F7"}
|
||||
|
@ -16,5 +16,7 @@ export function useCart(): CartData {
|
||||
return calcCart(cartTariffs ?? [], discounts ?? [], purchasesAmount, userId, isUserNko);
|
||||
}, [cartTariffs, discounts, purchasesAmount, userId, isUserNko]);
|
||||
|
||||
console.log("Тут калькулятор покалькулировал. Вот что говорит: ", cart)
|
||||
|
||||
return cart;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user