refactor: replaced rem with mantine constants
This commit is contained in:
@ -4,7 +4,7 @@ import { Button, Group, Stack, TextInput } from "@mantine/core";
|
|||||||
import { useForm } from "@mantine/form";
|
import { useForm } from "@mantine/form";
|
||||||
import { useProjectsContext } from "@/app/deals/contexts/ProjectsContext";
|
import { useProjectsContext } from "@/app/deals/contexts/ProjectsContext";
|
||||||
import { ClientSchema } from "@/lib/client";
|
import { ClientSchema } from "@/lib/client";
|
||||||
import ClientSelect from "@/modules/dealModularEditorTabs/Clients/shared/components/ClientSelect";
|
import ClientSelect from "@/modules/dealModularEditorTabs/Clients/components/ClientSelect";
|
||||||
import { ModuleNames } from "@/modules/modules";
|
import { ModuleNames } from "@/modules/modules";
|
||||||
|
|
||||||
export type CreateDealForm = {
|
export type CreateDealForm = {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import React, { FC } from "react";
|
import React, { FC } from "react";
|
||||||
import { Drawer, rem } from "@mantine/core";
|
import { Drawer } from "@mantine/core";
|
||||||
import BoardsDrawerBody from "@/app/deals/drawers/BoardsMobileEditorDrawer/components/BoardsDrawerBody";
|
import BoardsDrawerBody from "@/app/deals/drawers/BoardsMobileEditorDrawer/components/BoardsDrawerBody";
|
||||||
import { BoardsMobileContextProvider } from "@/app/deals/drawers/BoardsMobileEditorDrawer/contexts/BoardsMobileContext";
|
import { BoardsMobileContextProvider } from "@/app/deals/drawers/BoardsMobileEditorDrawer/contexts/BoardsMobileContext";
|
||||||
import { DrawerProps } from "@/drawers/types";
|
import { DrawerProps } from "@/drawers/types";
|
||||||
@ -30,7 +30,7 @@ const BoardsMobileEditorDrawer: FC<DrawerProps<Props>> = ({
|
|||||||
height: "100%",
|
height: "100%",
|
||||||
display: "flex",
|
display: "flex",
|
||||||
flexDirection: "column",
|
flexDirection: "column",
|
||||||
gap: rem(10),
|
gap: "xs",
|
||||||
},
|
},
|
||||||
}}>
|
}}>
|
||||||
<BoardsMobileContextProvider project={project}>
|
<BoardsMobileContextProvider project={project}>
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import React, { FC } from "react";
|
import React, { FC } from "react";
|
||||||
import { Center, Divider, Drawer, rem, Text } from "@mantine/core";
|
import { Center, Divider, Drawer, Text } from "@mantine/core";
|
||||||
import { ProjectsContextProvider } from "@/app/deals/contexts/ProjectsContext";
|
import { ProjectsContextProvider } from "@/app/deals/contexts/ProjectsContext";
|
||||||
import ProjectsDrawerBody from "@/app/deals/drawers/StatusesMobileEditorDrawer/components/ProjectsDrawerBody";
|
import ProjectsDrawerBody from "@/app/deals/drawers/StatusesMobileEditorDrawer/components/ProjectsDrawerBody";
|
||||||
import { DrawerProps } from "@/drawers/types";
|
import { DrawerProps } from "@/drawers/types";
|
||||||
@ -30,7 +30,7 @@ const ProjectsMobileEditorDrawer: FC<DrawerProps<Props>> = ({
|
|||||||
height: "100%",
|
height: "100%",
|
||||||
display: "flex",
|
display: "flex",
|
||||||
flexDirection: "column",
|
flexDirection: "column",
|
||||||
gap: rem(10),
|
gap: "xs",
|
||||||
},
|
},
|
||||||
}}>
|
}}>
|
||||||
<Center>
|
<Center>
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import React, { FC } from "react";
|
import React, { FC } from "react";
|
||||||
import { Drawer, rem } from "@mantine/core";
|
import { Drawer } from "@mantine/core";
|
||||||
import StatusesDrawerBody from "@/app/deals/drawers/StatusesMobileEditorDrawer/components/StatusesDrawerBody";
|
import StatusesDrawerBody from "@/app/deals/drawers/StatusesMobileEditorDrawer/components/StatusesDrawerBody";
|
||||||
import { StatusesMobileContextProvider } from "@/app/deals/drawers/StatusesMobileEditorDrawer/contexts/BoardStatusesContext";
|
import { StatusesMobileContextProvider } from "@/app/deals/drawers/StatusesMobileEditorDrawer/contexts/BoardStatusesContext";
|
||||||
import { DrawerProps } from "@/drawers/types";
|
import { DrawerProps } from "@/drawers/types";
|
||||||
@ -30,7 +30,7 @@ const StatusesMobileEditorDrawer: FC<DrawerProps<Props>> = ({
|
|||||||
height: "100%",
|
height: "100%",
|
||||||
display: "flex",
|
display: "flex",
|
||||||
flexDirection: "column",
|
flexDirection: "column",
|
||||||
gap: rem(10),
|
gap: "xs",
|
||||||
},
|
},
|
||||||
}}>
|
}}>
|
||||||
<StatusesMobileContextProvider board={board}>
|
<StatusesMobileContextProvider board={board}>
|
||||||
|
|||||||
@ -4,7 +4,6 @@ import {
|
|||||||
Button,
|
Button,
|
||||||
Flex,
|
Flex,
|
||||||
NumberInput,
|
NumberInput,
|
||||||
rem,
|
|
||||||
Space,
|
Space,
|
||||||
Text,
|
Text,
|
||||||
TextInput,
|
TextInput,
|
||||||
@ -37,7 +36,7 @@ const DealsBoardFiltersModal = ({
|
|||||||
return (
|
return (
|
||||||
<form onSubmit={filtersForm.onSubmit(onSubmit)}>
|
<form onSubmit={filtersForm.onSubmit(onSubmit)}>
|
||||||
<Flex
|
<Flex
|
||||||
gap={rem(10)}
|
gap={"xs"}
|
||||||
direction={"column"}>
|
direction={"column"}>
|
||||||
<NumberInput
|
<NumberInput
|
||||||
label={"ID"}
|
label={"ID"}
|
||||||
|
|||||||
@ -4,7 +4,6 @@ import {
|
|||||||
Button,
|
Button,
|
||||||
Flex,
|
Flex,
|
||||||
NumberInput,
|
NumberInput,
|
||||||
rem,
|
|
||||||
Space,
|
Space,
|
||||||
Text,
|
Text,
|
||||||
TextInput,
|
TextInput,
|
||||||
@ -39,7 +38,7 @@ const DealsScheduleFiltersModal = ({
|
|||||||
return (
|
return (
|
||||||
<form onSubmit={filtersForm.onSubmit(onSubmit)}>
|
<form onSubmit={filtersForm.onSubmit(onSubmit)}>
|
||||||
<Flex
|
<Flex
|
||||||
gap={rem(10)}
|
gap={"xs"}
|
||||||
direction={"column"}>
|
direction={"column"}>
|
||||||
<NumberInput
|
<NumberInput
|
||||||
label={"ID"}
|
label={"ID"}
|
||||||
|
|||||||
@ -4,7 +4,6 @@ import {
|
|||||||
Button,
|
Button,
|
||||||
Flex,
|
Flex,
|
||||||
NumberInput,
|
NumberInput,
|
||||||
rem,
|
|
||||||
Space,
|
Space,
|
||||||
Text,
|
Text,
|
||||||
TextInput,
|
TextInput,
|
||||||
@ -39,7 +38,7 @@ const DealsTableFiltersModal = ({
|
|||||||
return (
|
return (
|
||||||
<form onSubmit={filtersForm.onSubmit(onSubmit)}>
|
<form onSubmit={filtersForm.onSubmit(onSubmit)}>
|
||||||
<Flex
|
<Flex
|
||||||
gap={rem(10)}
|
gap={"xs"}
|
||||||
direction={"column"}>
|
direction={"column"}>
|
||||||
<NumberInput
|
<NumberInput
|
||||||
label={"ID"}
|
label={"ID"}
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
.draggable-row[data-is-dragging='true'] td {
|
.draggable-row[data-is-dragging='true'] td {
|
||||||
opacity: 0.75;
|
opacity: 0.75;
|
||||||
border: rem(1px) solid light-dark(var(--mantine-color-gray-3), var(--mantine-color-dark-4));
|
border: 1px solid light-dark(var(--mantine-color-gray-3), var(--mantine-color-dark-4));
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import { FC } from "react";
|
import { FC } from "react";
|
||||||
import { IconTrash } from "@tabler/icons-react";
|
import { IconTrash } from "@tabler/icons-react";
|
||||||
import { isNumber } from "lodash";
|
import { isNumber } from "lodash";
|
||||||
import { Flex, Input, NumberInput, rem } from "@mantine/core";
|
import { Flex, Input, NumberInput } from "@mantine/core";
|
||||||
import ActionIconWithTip from "@/components/ui/ActionIconWithTip/ActionIconWithTip";
|
import ActionIconWithTip from "@/components/ui/ActionIconWithTip/ActionIconWithTip";
|
||||||
import InlineButton from "@/components/ui/InlineButton/InlineButton";
|
import InlineButton from "@/components/ui/InlineButton/InlineButton";
|
||||||
import { ServicePriceRangeSchema } from "@/lib/client";
|
import { ServicePriceRangeSchema } from "@/lib/client";
|
||||||
@ -50,7 +50,7 @@ const RangePriceInput: FC<PriceRangeInputType> = props => {
|
|||||||
{props.value.map((range, idx) => (
|
{props.value.map((range, idx) => (
|
||||||
<Flex
|
<Flex
|
||||||
key={idx}
|
key={idx}
|
||||||
gap={rem(10)}
|
gap={"xs"}
|
||||||
align={"flex-end"}>
|
align={"flex-end"}>
|
||||||
<ActionIconWithTip onClick={() => onDeleteRange(idx)}>
|
<ActionIconWithTip onClick={() => onDeleteRange(idx)}>
|
||||||
<IconTrash />
|
<IconTrash />
|
||||||
|
|||||||
@ -98,7 +98,7 @@ const ImageDropzone: FC<Props> = (props: Props) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Flex
|
<Flex
|
||||||
gap={rem(10)}
|
gap={"xs"}
|
||||||
direction={"column"}>
|
direction={"column"}>
|
||||||
<Fieldset legend={"Изображение"}>
|
<Fieldset legend={"Изображение"}>
|
||||||
<Flex justify={"center"}>
|
<Flex justify={"center"}>
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { Button, Flex, rem, TextInput } from "@mantine/core";
|
import { Button, Flex, TextInput } from "@mantine/core";
|
||||||
import { useForm } from "@mantine/form";
|
import { useForm } from "@mantine/form";
|
||||||
import { ContextModalProps } from "@mantine/modals";
|
import { ContextModalProps } from "@mantine/modals";
|
||||||
|
|
||||||
@ -35,7 +35,7 @@ const EnterNameModal = ({
|
|||||||
return (
|
return (
|
||||||
<form onSubmit={form.onSubmit(values => onSubmit(values))}>
|
<form onSubmit={form.onSubmit(values => onSubmit(values))}>
|
||||||
<Flex
|
<Flex
|
||||||
gap={rem(10)}
|
gap={"xs"}
|
||||||
direction={"column"}>
|
direction={"column"}>
|
||||||
<TextInput
|
<TextInput
|
||||||
{...form.getInputProps("name")}
|
{...form.getInputProps("name")}
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
import { FC } from "react";
|
import { FC } from "react";
|
||||||
import { Stack } from "@mantine/core";
|
import { Stack } from "@mantine/core";
|
||||||
import { DealSchema } from "@/lib/client";
|
import { DealSchema } from "@/lib/client";
|
||||||
import ClientDataForm from "@/modules/dealModularEditorTabs/Clients/shared/components/ClientDataForm";
|
import ClientDataForm from "@/modules/dealModularEditorTabs/Clients/components/ClientDataForm";
|
||||||
import ClientSelectForm from "@/modules/dealModularEditorTabs/Clients/shared/components/ClientSelectForm";
|
import ClientSelectForm from "@/modules/dealModularEditorTabs/Clients/components/ClientSelectForm";
|
||||||
import { ClientTabContextProvider } from "@/modules/dealModularEditorTabs/Clients/shared/contexts/ClientTabContext";
|
import { ClientTabContextProvider } from "./contexts/ClientTabContext";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
value: DealSchema;
|
value: DealSchema;
|
||||||
@ -1,7 +1,7 @@
|
|||||||
import { Fieldset, Group, Stack } from "@mantine/core";
|
import { Fieldset, Group, Stack } from "@mantine/core";
|
||||||
import InlineButton from "@/components/ui/InlineButton/InlineButton";
|
import InlineButton from "@/components/ui/InlineButton/InlineButton";
|
||||||
import useIsMobile from "@/hooks/utils/useIsMobile";
|
import useIsMobile from "@/hooks/utils/useIsMobile";
|
||||||
import ClientSelect from "@/modules/dealModularEditorTabs/Clients/shared/components/ClientSelect";
|
import ClientSelect from "@/modules/dealModularEditorTabs/Clients/components/ClientSelect";
|
||||||
import { useClientTabContext } from "../contexts/ClientTabContext";
|
import { useClientTabContext } from "../contexts/ClientTabContext";
|
||||||
|
|
||||||
const ClientSelectForm = () => {
|
const ClientSelectForm = () => {
|
||||||
@ -1,7 +1,7 @@
|
|||||||
import { FC } from "react";
|
import { FC } from "react";
|
||||||
import { IconTrash } from "@tabler/icons-react";
|
import { IconTrash } from "@tabler/icons-react";
|
||||||
import { isNumber } from "lodash";
|
import { isNumber } from "lodash";
|
||||||
import { Divider, Group, NumberInput, rem, Stack, Text } from "@mantine/core";
|
import { Divider, Group, NumberInput, Stack, Text } from "@mantine/core";
|
||||||
import { useDebouncedCallback } from "@mantine/hooks";
|
import { useDebouncedCallback } from "@mantine/hooks";
|
||||||
import ActionIconWithTip from "@/components/ui/ActionIconWithTip/ActionIconWithTip";
|
import ActionIconWithTip from "@/components/ui/ActionIconWithTip/ActionIconWithTip";
|
||||||
import { DealServiceSchema } from "@/lib/client";
|
import { DealServiceSchema } from "@/lib/client";
|
||||||
@ -64,7 +64,7 @@ const DealServiceRow: FC<Props> = ({ value, onChange, onDelete }) => {
|
|||||||
display: "flex",
|
display: "flex",
|
||||||
cursor: "pointer",
|
cursor: "pointer",
|
||||||
pointerEvents: "auto",
|
pointerEvents: "auto",
|
||||||
paddingRight: rem(10),
|
paddingRight: "xs",
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
rightSection={
|
rightSection={
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { Fieldset, Flex, rem, TextInput } from "@mantine/core";
|
import { Fieldset, Flex, TextInput } from "@mantine/core";
|
||||||
import { useForm } from "@mantine/form";
|
import { useForm } from "@mantine/form";
|
||||||
import { ContextModalProps } from "@mantine/modals";
|
import { ContextModalProps } from "@mantine/modals";
|
||||||
import {
|
import {
|
||||||
@ -59,7 +59,7 @@ const ProductEditorModal = ({
|
|||||||
closeOnSubmit
|
closeOnSubmit
|
||||||
onClose={onClose}>
|
onClose={onClose}>
|
||||||
<Flex
|
<Flex
|
||||||
gap={rem(10)}
|
gap={"xs"}
|
||||||
direction={"column"}>
|
direction={"column"}>
|
||||||
<Fieldset legend={"Основные характеристики"}>
|
<Fieldset legend={"Основные характеристики"}>
|
||||||
<TextInput
|
<TextInput
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
export { default as CommonServicesTab } from "@/modules/dealModularEditorTabs/FulfillmentBase/mobile/CommonServicesTab";
|
export { default as CommonServicesTab } from "@/modules/dealModularEditorTabs/FulfillmentBase/mobile/CommonServicesTab";
|
||||||
export { default as FulfillmentBaseTab } from "@/modules/dealModularEditorTabs/FulfillmentBase/desktop/FulfillmentBaseTab";
|
export { default as FulfillmentBaseTab } from "@/modules/dealModularEditorTabs/FulfillmentBase/desktop/FulfillmentBaseTab";
|
||||||
export { default as ProductsTab } from "@/modules/dealModularEditorTabs/FulfillmentBase/mobile/ProductsTab";
|
export { default as ProductsTab } from "@/modules/dealModularEditorTabs/FulfillmentBase/mobile/ProductsTab";
|
||||||
export { default as ClientsTab } from "@/modules/dealModularEditorTabs/Clients/shared/ClientsTab";
|
export { default as ClientsTab } from "@/modules/dealModularEditorTabs/Clients/ClientsTab";
|
||||||
|
|||||||
Reference in New Issue
Block a user