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