Merge branch 'dev' into 'staging'
Dev See merge request frontend/marketplace!165
This commit is contained in:
commit
05c86fa79f
@ -139,7 +139,7 @@ export default function CustomWrapperDrawer({ serviceData }: Props) {
|
||||
fontWeight: 500,
|
||||
}}
|
||||
>
|
||||
{currencyFormatter.format(Math.floor(serviceData.price) / 100)}
|
||||
{currencyFormatter.format(serviceData.price / 100)}
|
||||
</Typography>
|
||||
</Box>
|
||||
</Box>
|
||||
|
@ -312,7 +312,7 @@ function Drawers() {
|
||||
mr: "20px",
|
||||
}}
|
||||
>
|
||||
{currencyFormatter.format(Math.floor(cart.priceAfterDiscounts) / 100)}
|
||||
{currencyFormatter.format(cart.priceAfterDiscounts / 100)}
|
||||
</Typography>
|
||||
</Box>
|
||||
</Badge>
|
||||
|
@ -31,6 +31,7 @@ const arrayMenu: MenuItem[] = [
|
||||
{ name: "Корзина", url: "/cart" },
|
||||
{ name: "Поддержка", url: "/support" },
|
||||
{ name: "История", url: "/history" },
|
||||
{name: "Мой кошелёк", url: "/wallet"},
|
||||
];
|
||||
|
||||
interface DialogMenuProps {
|
||||
|
@ -29,7 +29,7 @@ export const Select = ({ items, selectedItem, setSelectedItem }: SelectProps) =>
|
||||
<Box>
|
||||
<Box
|
||||
sx={{
|
||||
zIndex: 1,
|
||||
zIndex: 2,
|
||||
position: "relative",
|
||||
width: "100%",
|
||||
height: "56px",
|
||||
@ -73,7 +73,7 @@ export const Select = ({ items, selectedItem, setSelectedItem }: SelectProps) =>
|
||||
value=""
|
||||
open={opened}
|
||||
MenuProps={{ disablePortal: true }}
|
||||
sx={{ width: "100%" }}
|
||||
sx={{ width: "100%",zIndex: 1, }}
|
||||
onChange={selectItem}
|
||||
onClick={() => setOpened((isOpened) => !isOpened)}
|
||||
>
|
||||
|
@ -155,7 +155,7 @@ export default function TotalPrice({ priceAfterDiscounts, priceBeforeDiscounts,
|
||||
order: upMd ? 2 : 1,
|
||||
}}
|
||||
>
|
||||
{currencyFormatter.format(Math.floor(priceAfterDiscounts) / 100)}
|
||||
{currencyFormatter.format(priceAfterDiscounts / 100)}
|
||||
</Typography>
|
||||
</Box>
|
||||
</Badge>
|
||||
|
@ -126,7 +126,7 @@ export default function CustomWrapper({ serviceData, last, first }: Props) {
|
||||
fontWeight: 500,
|
||||
}}
|
||||
>
|
||||
{currencyFormatter.format(Math.floor(serviceData.price) / 100)}
|
||||
{currencyFormatter.format(serviceData.price / 100)}
|
||||
</Typography>
|
||||
</Box>
|
||||
<CloseButton style={{ height: "22 px", width: "22px" }} onClick={deleteService} />
|
||||
|
@ -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%",
|
||||
|
@ -102,7 +102,7 @@ export default function Payment() {
|
||||
fromSquiz,
|
||||
body: {
|
||||
type: selectedPaymentMethod,
|
||||
amount: Math.floor(fromSquiz ? Number(paymentValueField) * 100 : Number(paymentValueField)),
|
||||
amount: Math.trunc(Number(paymentValueField) * 100),
|
||||
},
|
||||
paymentPurpose: notEnoughMoneyAmount ? "paycart" : "replenishwallet",
|
||||
});
|
||||
@ -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"}
|
||||
|
@ -31,7 +31,6 @@ export default function TariffCard({ icon, headerText, text, sx, price, buttonPr
|
||||
flexDirection: "column",
|
||||
alignItems: "start",
|
||||
p: "20px",
|
||||
zIndex: isMobile ? -1 : undefined,
|
||||
|
||||
boxShadow: cardShadow,
|
||||
...sx,
|
||||
|
@ -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