From a83328492eb3d7aa55287febc6514a93f10a7cf1 Mon Sep 17 00:00:00 2001 From: AlexSserb Date: Tue, 23 Sep 2025 10:41:55 +0400 Subject: [PATCH] feat: products and services tabs for mobile --- .../components/DealEditorBody.tsx | 1 + .../FulfillmentBase.module.css | 22 ++++ .../FulfillmentBase/mobile/ProductsTab.tsx | 38 +++++- .../AddDealProductButton.tsx | 43 +++++++ .../DealProductView/DealProductView.tsx | 94 ++++++++++++++ .../DealProductsTotalLabel.tsx | 35 ++++++ .../components/ProductMenu/ProductMenu.tsx | 54 ++++++++ .../ProductServicesTable.tsx | 115 ++++++++++++++++++ .../useProductServicesTableColumns.tsx | 71 +++++++++++ .../ProductsTabSlider/ProductsTabSlider.tsx | 46 +++++++ .../ProductsTabTable/ProductsTabTable.tsx | 41 +++++++ .../hooks/useDealProductsTableColumns.tsx | 29 +++++ .../ProductsTabViewAffix.tsx | 46 +++++++ .../ProductSelect/ProductSelect.tsx | 0 .../utils/renderProductOption.tsx | 0 .../ServiceSelect/ServiceSelect.tsx | 0 .../DealProductEditorModal.tsx | 2 +- .../components/ServiceWithPriceInput.tsx | 2 +- 18 files changed, 635 insertions(+), 4 deletions(-) create mode 100644 src/modules/dealModularEditorTabs/FulfillmentBase/mobile/components/AddDealProductButton/AddDealProductButton.tsx create mode 100644 src/modules/dealModularEditorTabs/FulfillmentBase/mobile/components/DealProductView/DealProductView.tsx create mode 100644 src/modules/dealModularEditorTabs/FulfillmentBase/mobile/components/DealProductsTotalLabel/DealProductsTotalLabel.tsx create mode 100644 src/modules/dealModularEditorTabs/FulfillmentBase/mobile/components/ProductMenu/ProductMenu.tsx create mode 100644 src/modules/dealModularEditorTabs/FulfillmentBase/mobile/components/ProductServicesTable/ProductServicesTable.tsx create mode 100644 src/modules/dealModularEditorTabs/FulfillmentBase/mobile/components/ProductServicesTable/useProductServicesTableColumns.tsx create mode 100644 src/modules/dealModularEditorTabs/FulfillmentBase/mobile/components/ProductsTabSlider/ProductsTabSlider.tsx create mode 100644 src/modules/dealModularEditorTabs/FulfillmentBase/mobile/components/ProductsTabTable/ProductsTabTable.tsx create mode 100644 src/modules/dealModularEditorTabs/FulfillmentBase/mobile/components/ProductsTabTable/hooks/useDealProductsTableColumns.tsx create mode 100644 src/modules/dealModularEditorTabs/FulfillmentBase/mobile/components/ProductsTabViewAffix/ProductsTabViewAffix.tsx rename src/modules/dealModularEditorTabs/FulfillmentBase/{desktop => shared}/components/ProductSelect/ProductSelect.tsx (100%) rename src/modules/dealModularEditorTabs/FulfillmentBase/{desktop => shared}/components/ProductSelect/utils/renderProductOption.tsx (100%) rename src/modules/dealModularEditorTabs/FulfillmentBase/{desktop => shared}/components/ServiceSelect/ServiceSelect.tsx (100%) diff --git a/src/app/deals/drawers/DealEditorDrawer/components/DealEditorBody.tsx b/src/app/deals/drawers/DealEditorDrawer/components/DealEditorBody.tsx index 83abc57..0026bd1 100644 --- a/src/app/deals/drawers/DealEditorDrawer/components/DealEditorBody.tsx +++ b/src/app/deals/drawers/DealEditorDrawer/components/DealEditorBody.tsx @@ -97,6 +97,7 @@ const DealEditorBody: FC = props => { orientation={isMobile ? "horizontal" : "vertical"} h={isMobile ? "min-content" : "97vh"} mih={isMobile ? "min-content" : "97vh"} + keepMounted={false} classNames={{ tab: styles.tab }}> {getTab("general", "Общая информация", )} diff --git a/src/modules/dealModularEditorTabs/FulfillmentBase/FulfillmentBase.module.css b/src/modules/dealModularEditorTabs/FulfillmentBase/FulfillmentBase.module.css index a0f79e1..43b2b0a 100644 --- a/src/modules/dealModularEditorTabs/FulfillmentBase/FulfillmentBase.module.css +++ b/src/modules/dealModularEditorTabs/FulfillmentBase/FulfillmentBase.module.css @@ -4,9 +4,31 @@ border-radius: var(--mantine-radius-lg); } +.shadow { + @mixin light { + box-shadow: var(--light-shadow); + } + @mixin dark { + box-shadow: var(--dark-shadow); + } +} + .image-container { display: flex; max-height: rem(250); max-width: rem(250); height: 100%; } + +.products-swiper :global(.swiper-pagination) { + @mixin light { + background-color: var(--mantine-color-gray-2); + } + @mixin dark { + background-color: var(--mantine-color-dark-6); + } + + border: 1px solid var(--mantine-color-default-border); + border-radius: var(--mantine-radius-lg); + padding: 3px; +} diff --git a/src/modules/dealModularEditorTabs/FulfillmentBase/mobile/ProductsTab.tsx b/src/modules/dealModularEditorTabs/FulfillmentBase/mobile/ProductsTab.tsx index 7098e04..80ca94f 100644 --- a/src/modules/dealModularEditorTabs/FulfillmentBase/mobile/ProductsTab.tsx +++ b/src/modules/dealModularEditorTabs/FulfillmentBase/mobile/ProductsTab.tsx @@ -1,5 +1,12 @@ -import { FC } from "react"; +import { FC, useEffect, useRef, useState } from "react"; +import { isNull } from "lodash"; +import type { Swiper as SwiperClass } from "swiper/types"; import { DealSchema } from "@/lib/client"; +import ProductsTabSlider from "@/modules/dealModularEditorTabs/FulfillmentBase/mobile/components/ProductsTabSlider/ProductsTabSlider"; +import ProductsTabTable from "@/modules/dealModularEditorTabs/FulfillmentBase/mobile/components/ProductsTabTable/ProductsTabTable"; +import ProductsTabViewAffix, { + ProductsTabView, +} from "@/modules/dealModularEditorTabs/FulfillmentBase/mobile/components/ProductsTabViewAffix/ProductsTabViewAffix"; import { FulfillmentBaseContextProvider } from "@/modules/dealModularEditorTabs/FulfillmentBase/shared/contexts/FulfillmentBaseContext"; type Props = { @@ -7,9 +14,36 @@ type Props = { }; const ProductsTab: FC = ({ value }) => { + const [view, setView] = useState(ProductsTabView.SLIDER); + const swiperRef = useRef(null); + const targetSlideIndex = useRef(null); + + const onProductRowSelect = async (productIndex: number) => { + targetSlideIndex.current = productIndex; + setView(ProductsTabView.SLIDER); + }; + + useEffect(() => { + if ( + view === ProductsTabView.SLIDER && + !isNull(targetSlideIndex.current) + ) { + swiperRef.current?.slideTo(targetSlideIndex.current); + targetSlideIndex.current = null; + } + }, [view]); + return ( - <> + {view === ProductsTabView.SLIDER ? ( + + ) : ( + + )} + setView(value as ProductsTabView)} + /> ); }; diff --git a/src/modules/dealModularEditorTabs/FulfillmentBase/mobile/components/AddDealProductButton/AddDealProductButton.tsx b/src/modules/dealModularEditorTabs/FulfillmentBase/mobile/components/AddDealProductButton/AddDealProductButton.tsx new file mode 100644 index 0000000..ebe4f23 --- /dev/null +++ b/src/modules/dealModularEditorTabs/FulfillmentBase/mobile/components/AddDealProductButton/AddDealProductButton.tsx @@ -0,0 +1,43 @@ +import { FC } from "react"; +import { IconPlus } from "@tabler/icons-react"; +import { ButtonProps, Text } from "@mantine/core"; +import { modals } from "@mantine/modals"; +import InlineButton from "@/components/ui/InlineButton/InlineButton"; +import { useFulfillmentBaseContext } from "@/modules/dealModularEditorTabs/FulfillmentBase/shared/contexts/FulfillmentBaseContext"; + +type Props = ButtonProps; + +const AddDealProductButton: FC = props => { + const { dealProductsList, dealProductsCrud, deal } = + useFulfillmentBaseContext(); + + const onCreateClick = () => { + const productIdsToExclude = dealProductsList.dealProducts.map( + product => product.product.id + ); + + modals.openContextModal({ + modal: "dealProductEditorModal", + title: "Добавление товара", + withCloseButton: false, + innerProps: { + onCreate: values => + dealProductsCrud.onCreate({ ...values, dealId: deal.id }), + productIdsToExclude, + isEditing: false, + clientId: 0, // TODO add clients + }, + }); + }; + + return ( + + + Добавить товар + + ); +}; + +export default AddDealProductButton; diff --git a/src/modules/dealModularEditorTabs/FulfillmentBase/mobile/components/DealProductView/DealProductView.tsx b/src/modules/dealModularEditorTabs/FulfillmentBase/mobile/components/DealProductView/DealProductView.tsx new file mode 100644 index 0000000..6f2eb05 --- /dev/null +++ b/src/modules/dealModularEditorTabs/FulfillmentBase/mobile/components/DealProductView/DealProductView.tsx @@ -0,0 +1,94 @@ +import { FC } from "react"; +import { + Box, + Card, + Flex, + Group, + Image, + Stack, + Text, + Title, +} from "@mantine/core"; +import { modals } from "@mantine/modals"; +import { DealProductSchema } from "@/lib/client"; +import ProductFieldsList from "@/modules/dealModularEditorTabs/FulfillmentBase/desktop/components/ProductView/components/ProductFieldsList"; +import ProductMenu from "@/modules/dealModularEditorTabs/FulfillmentBase/mobile/components/ProductMenu/ProductMenu"; +import ProductServicesTable from "@/modules/dealModularEditorTabs/FulfillmentBase/mobile/components/ProductServicesTable/ProductServicesTable"; +import { useFulfillmentBaseContext } from "@/modules/dealModularEditorTabs/FulfillmentBase/shared/contexts/FulfillmentBaseContext"; +import styles from "../../../FulfillmentBase.module.css"; + +type Props = { + dealProduct: DealProductSchema; +}; + +const DealProductView: FC = ({ dealProduct }) => { + const { dealProductsCrud } = useFulfillmentBaseContext(); + + const onChangeDealProductClick = () => { + modals.openContextModal({ + modal: "dealProductEditorModal", + title: "Добавление товара", + withCloseButton: false, + innerProps: { + onChange: values => + dealProductsCrud.onUpdate( + dealProduct.dealId, + dealProduct.productId, + values + ), + entity: dealProduct, + isEditing: true, + clientId: 0, // TODO add clients + }, + }); + }; + + return ( + + + + {dealProduct.product.name} + + + {dealProduct.product.name} + + + Количество: {dealProduct.quantity} + + + + + + + ); +}; + +export default DealProductView; diff --git a/src/modules/dealModularEditorTabs/FulfillmentBase/mobile/components/DealProductsTotalLabel/DealProductsTotalLabel.tsx b/src/modules/dealModularEditorTabs/FulfillmentBase/mobile/components/DealProductsTotalLabel/DealProductsTotalLabel.tsx new file mode 100644 index 0000000..26ffd02 --- /dev/null +++ b/src/modules/dealModularEditorTabs/FulfillmentBase/mobile/components/DealProductsTotalLabel/DealProductsTotalLabel.tsx @@ -0,0 +1,35 @@ +import { FC, useMemo } from "react"; +import { Title, TitleProps } from "@mantine/core"; +import { DealProductSchema } from "@/lib/client"; +import { useFulfillmentBaseContext } from "@/modules/dealModularEditorTabs/FulfillmentBase/shared/contexts/FulfillmentBaseContext"; + +type Props = TitleProps; + +const DealProductsTotalLabel: FC = ({ order = 4, ...props }) => { + const { dealProductsList } = useFulfillmentBaseContext(); + + const getProductTotal = (dealProduct: DealProductSchema) => + dealProduct.productServices.reduce( + (acc, service) => acc + dealProduct.quantity * service.price, + 0 + ); + + const total = useMemo( + () => + dealProductsList.dealProducts.reduce( + (acc, product) => acc + getProductTotal(product), + 0 + ), + [dealProductsList.dealProducts] + ); + + return ( + + Итог: {total.toLocaleString("ru")}₽ + + ); +}; + +export default DealProductsTotalLabel; diff --git a/src/modules/dealModularEditorTabs/FulfillmentBase/mobile/components/ProductMenu/ProductMenu.tsx b/src/modules/dealModularEditorTabs/FulfillmentBase/mobile/components/ProductMenu/ProductMenu.tsx new file mode 100644 index 0000000..006d091 --- /dev/null +++ b/src/modules/dealModularEditorTabs/FulfillmentBase/mobile/components/ProductMenu/ProductMenu.tsx @@ -0,0 +1,54 @@ +import React, { FC } from "react"; +import { IconDotsVertical, IconEdit, IconTrash } from "@tabler/icons-react"; +import { Box, Group, Menu, Text } from "@mantine/core"; +import ThemeIcon from "@/components/ui/ThemeIcon/ThemeIcon"; +import { DealProductSchema } from "@/lib/client"; + +type Props = { + value: DealProductSchema; + onChange: (dealProduct: DealProductSchema) => void; + onDelete: (dealProduct: DealProductSchema) => void; +}; + +const ProductMenu: FC = ({ value, onChange, onDelete }) => { + return ( + + + e.stopPropagation()}> + + + + + + + { + e.stopPropagation(); + onChange(value); + }}> + + + Редактировать + + + { + e.stopPropagation(); + onDelete(value); + }}> + + + Удалить + + + + + ); +}; + +export default ProductMenu; diff --git a/src/modules/dealModularEditorTabs/FulfillmentBase/mobile/components/ProductServicesTable/ProductServicesTable.tsx b/src/modules/dealModularEditorTabs/FulfillmentBase/mobile/components/ProductServicesTable/ProductServicesTable.tsx new file mode 100644 index 0000000..cace90d --- /dev/null +++ b/src/modules/dealModularEditorTabs/FulfillmentBase/mobile/components/ProductServicesTable/ProductServicesTable.tsx @@ -0,0 +1,115 @@ +import { FC } from "react"; +import { IconMoodSad } from "@tabler/icons-react"; +import { Button, Flex, Group, ScrollArea, Text } from "@mantine/core"; +import { modals } from "@mantine/modals"; +import BaseTable from "@/components/ui/BaseTable/BaseTable"; +import { DealProductSchema, ProductServiceSchema } from "@/lib/client"; +import useProductServicesTableColumns from "@/modules/dealModularEditorTabs/FulfillmentBase/mobile/components/ProductServicesTable/useProductServicesTableColumns"; +import { useFulfillmentBaseContext } from "@/modules/dealModularEditorTabs/FulfillmentBase/shared/contexts/FulfillmentBaseContext"; + +type Props = { + dealProduct: DealProductSchema; +}; + +const ProductServicesTable: FC = ({ dealProduct }) => { + const { productServiceCrud, dealProductsList } = + useFulfillmentBaseContext(); + + const onChange = (item: ProductServiceSchema) => { + const excludeServiceIds = dealProduct.productServices.map( + productService => productService.service.id + ); + const totalQuantity = dealProductsList.dealProducts.reduce( + (sum, prod) => prod.quantity + sum, + 0 + ); + + modals.openContextModal({ + modal: "productServiceEditorModal", + innerProps: { + entity: item, + onChange: values => + productServiceCrud.onUpdate( + item.dealId, + item.productId, + item.serviceId, + values + ), + excludeServiceIds, + quantity: totalQuantity, + isEditing: true, + }, + withCloseButton: false, + }); + }; + + const columns = useProductServicesTableColumns({ + data: dealProduct.productServices, + quantity: dealProduct.quantity, + onDelete: productServiceCrud.onDelete, + onChange, + }); + + const onCreateClick = () => { + const excludeServiceIds = dealProduct.productServices.map( + productService => productService.service.id + ); + + modals.openContextModal({ + modal: "productServiceEditorModal", + innerProps: { + onCreate: values => + productServiceCrud.onCreate({ ...dealProduct, ...values }), + excludeServiceIds, + quantity: dealProduct.quantity, + isEditing: false, + }, + withCloseButton: false, + }); + }; + + const isEmptyTable = dealProduct.productServices.length === 0; + + return ( + + e.stopPropagation()} + onTouchMove={e => e.stopPropagation()}> + + Нет услуг + + + } + /> + + + + ); +}; +export default ProductServicesTable; diff --git a/src/modules/dealModularEditorTabs/FulfillmentBase/mobile/components/ProductServicesTable/useProductServicesTableColumns.tsx b/src/modules/dealModularEditorTabs/FulfillmentBase/mobile/components/ProductServicesTable/useProductServicesTableColumns.tsx new file mode 100644 index 0000000..21f4c37 --- /dev/null +++ b/src/modules/dealModularEditorTabs/FulfillmentBase/mobile/components/ProductServicesTable/useProductServicesTableColumns.tsx @@ -0,0 +1,71 @@ +import { useMemo } from "react"; +import { IconEdit, IconTrash } from "@tabler/icons-react"; +import { DataTableColumn } from "mantine-datatable"; +import { ActionIcon, Flex, Text } from "@mantine/core"; +import { ProductServiceSchema } from "@/lib/client"; + +type Props = { + data: ProductServiceSchema[]; + quantity: number; + onChange: (dealProductService: ProductServiceSchema) => void; + onDelete: (dealProductService: ProductServiceSchema) => void; +}; + +const useProductServicesTableColumns = ({ + data, + quantity, + onChange, + onDelete, +}: Props) => { + const totalPrice = useMemo( + () => data.reduce((acc, row) => acc + row.price * quantity, 0), + [data, quantity] + ); + + return useMemo( + () => + [ + { + accessor: "actions", + title: "Действия", + textAlign: "center", + width: "0%", + render: dealProductService => ( + + onDelete(dealProductService)}> + + + onChange(dealProductService)}> + + + + ), + }, + { + accessor: "service.name", + title: "Услуга", + width: "70%", + }, + { + accessor: "price", + title: "Цена", + width: "30%", + render: productService => + productService.price.toLocaleString("ru"), + footer: data.length > 0 && ( + + Итог: {totalPrice.toLocaleString("ru")}₽ + + ), + }, + ] as DataTableColumn[], + [totalPrice] + ); +}; + +export default useProductServicesTableColumns; diff --git a/src/modules/dealModularEditorTabs/FulfillmentBase/mobile/components/ProductsTabSlider/ProductsTabSlider.tsx b/src/modules/dealModularEditorTabs/FulfillmentBase/mobile/components/ProductsTabSlider/ProductsTabSlider.tsx new file mode 100644 index 0000000..5748308 --- /dev/null +++ b/src/modules/dealModularEditorTabs/FulfillmentBase/mobile/components/ProductsTabSlider/ProductsTabSlider.tsx @@ -0,0 +1,46 @@ +import React, { FC, RefObject } from "react"; +import { Pagination } from "swiper/modules"; +import { Swiper, SwiperSlide } from "swiper/react"; +import type { Swiper as SwiperClass } from "swiper/types"; +import { Box } from "@mantine/core"; +import AddDealProductButton from "@/modules/dealModularEditorTabs/FulfillmentBase/mobile/components/AddDealProductButton/AddDealProductButton"; +import DealProductView from "@/modules/dealModularEditorTabs/FulfillmentBase/mobile/components/DealProductView/DealProductView"; +import { useFulfillmentBaseContext } from "@/modules/dealModularEditorTabs/FulfillmentBase/shared/contexts/FulfillmentBaseContext"; +import classes from "../../../FulfillmentBase.module.css"; + +type Props = { + swiperRef: RefObject; +}; + +const ProductsTabSlider: FC = ({ swiperRef }) => { + const { dealProductsList } = useFulfillmentBaseContext(); + + return ( + (swiperRef.current = swiper)} + spaceBetween={15} + modules={[Pagination]} + direction={"vertical"} + style={{ maxHeight: "calc(100vh - 110px)" }} + className={classes["products-swiper"]} + pagination={{ enabled: true, clickable: true }}> + {dealProductsList.dealProducts.map(dealProduct => ( + + + + ))} + + + + + + + ); +}; + +export default ProductsTabSlider; diff --git a/src/modules/dealModularEditorTabs/FulfillmentBase/mobile/components/ProductsTabTable/ProductsTabTable.tsx b/src/modules/dealModularEditorTabs/FulfillmentBase/mobile/components/ProductsTabTable/ProductsTabTable.tsx new file mode 100644 index 0000000..04f416e --- /dev/null +++ b/src/modules/dealModularEditorTabs/FulfillmentBase/mobile/components/ProductsTabTable/ProductsTabTable.tsx @@ -0,0 +1,41 @@ +import { FC } from "react"; +import { Flex, Stack } from "@mantine/core"; +import BaseTable from "@/components/ui/BaseTable/BaseTable"; +import AddDealProductButton from "@/modules/dealModularEditorTabs/FulfillmentBase/mobile/components/AddDealProductButton/AddDealProductButton"; +import DealProductsTotalLabel from "@/modules/dealModularEditorTabs/FulfillmentBase/mobile/components/DealProductsTotalLabel/DealProductsTotalLabel"; +import useDealServicesTableColumns from "@/modules/dealModularEditorTabs/FulfillmentBase/mobile/components/ProductsTabTable/hooks/useDealProductsTableColumns"; +import { useFulfillmentBaseContext } from "@/modules/dealModularEditorTabs/FulfillmentBase/shared/contexts/FulfillmentBaseContext"; + +type Props = { + onSelect: (index: number) => void; +}; + +const ProductsTabTable: FC = ({ onSelect }) => { + const { dealProductsList } = useFulfillmentBaseContext(); + const columns = useDealServicesTableColumns(); + + return ( + + + + + onSelect(event.index)} + /> + + + ); +}; + +export default ProductsTabTable; diff --git a/src/modules/dealModularEditorTabs/FulfillmentBase/mobile/components/ProductsTabTable/hooks/useDealProductsTableColumns.tsx b/src/modules/dealModularEditorTabs/FulfillmentBase/mobile/components/ProductsTabTable/hooks/useDealProductsTableColumns.tsx new file mode 100644 index 0000000..d32bc8d --- /dev/null +++ b/src/modules/dealModularEditorTabs/FulfillmentBase/mobile/components/ProductsTabTable/hooks/useDealProductsTableColumns.tsx @@ -0,0 +1,29 @@ +import { useMemo } from "react"; +import { DataTableColumn } from "mantine-datatable"; +import { DealProductSchema } from "@/lib/client"; + +const useDealServicesTableColumns = () => { + return useMemo( + () => + [ + { + accessor: "product.name", + title: "Название", + width: "60%", + }, + { + accessor: "quantity", + title: "Кол-во", + width: "20%", + }, + { + accessor: "product.size", + title: "Размер", + width: "20%", + }, + ] as DataTableColumn[], + [] + ); +}; + +export default useDealServicesTableColumns; diff --git a/src/modules/dealModularEditorTabs/FulfillmentBase/mobile/components/ProductsTabViewAffix/ProductsTabViewAffix.tsx b/src/modules/dealModularEditorTabs/FulfillmentBase/mobile/components/ProductsTabViewAffix/ProductsTabViewAffix.tsx new file mode 100644 index 0000000..ee7cf43 --- /dev/null +++ b/src/modules/dealModularEditorTabs/FulfillmentBase/mobile/components/ProductsTabViewAffix/ProductsTabViewAffix.tsx @@ -0,0 +1,46 @@ +import { FC } from "react"; +import { IconLayoutDistributeVertical, IconTable } from "@tabler/icons-react"; +import { + Affix, + Center, + SegmentedControl, + SegmentedControlProps, +} from "@mantine/core"; +import styles from "../../../FulfillmentBase.module.css"; + +export enum ProductsTabView { + TABLE = "table", + SLIDER = "slider", +} + +type Props = Omit; + +const ProductsTabViewAffix: FC = props => { + return ( + +
+ , + }, + { + value: ProductsTabView.TABLE, + label: , + }, + ]} + {...props} + /> +
+
+ ); +}; + +export default ProductsTabViewAffix; diff --git a/src/modules/dealModularEditorTabs/FulfillmentBase/desktop/components/ProductSelect/ProductSelect.tsx b/src/modules/dealModularEditorTabs/FulfillmentBase/shared/components/ProductSelect/ProductSelect.tsx similarity index 100% rename from src/modules/dealModularEditorTabs/FulfillmentBase/desktop/components/ProductSelect/ProductSelect.tsx rename to src/modules/dealModularEditorTabs/FulfillmentBase/shared/components/ProductSelect/ProductSelect.tsx diff --git a/src/modules/dealModularEditorTabs/FulfillmentBase/desktop/components/ProductSelect/utils/renderProductOption.tsx b/src/modules/dealModularEditorTabs/FulfillmentBase/shared/components/ProductSelect/utils/renderProductOption.tsx similarity index 100% rename from src/modules/dealModularEditorTabs/FulfillmentBase/desktop/components/ProductSelect/utils/renderProductOption.tsx rename to src/modules/dealModularEditorTabs/FulfillmentBase/shared/components/ProductSelect/utils/renderProductOption.tsx diff --git a/src/modules/dealModularEditorTabs/FulfillmentBase/desktop/components/ServiceSelect/ServiceSelect.tsx b/src/modules/dealModularEditorTabs/FulfillmentBase/shared/components/ServiceSelect/ServiceSelect.tsx similarity index 100% rename from src/modules/dealModularEditorTabs/FulfillmentBase/desktop/components/ServiceSelect/ServiceSelect.tsx rename to src/modules/dealModularEditorTabs/FulfillmentBase/shared/components/ServiceSelect/ServiceSelect.tsx diff --git a/src/modules/dealModularEditorTabs/FulfillmentBase/shared/modals/DealProductEditorModal/DealProductEditorModal.tsx b/src/modules/dealModularEditorTabs/FulfillmentBase/shared/modals/DealProductEditorModal/DealProductEditorModal.tsx index 409b0f1..2e1f279 100644 --- a/src/modules/dealModularEditorTabs/FulfillmentBase/shared/modals/DealProductEditorModal/DealProductEditorModal.tsx +++ b/src/modules/dealModularEditorTabs/FulfillmentBase/shared/modals/DealProductEditorModal/DealProductEditorModal.tsx @@ -12,7 +12,7 @@ import BaseFormModal, { CreateEditFormProps, } from "@/modals/base/BaseFormModal/BaseFormModal"; import ProductSelect - from "@/modules/dealModularEditorTabs/FulfillmentBase/desktop/components/ProductSelect/ProductSelect"; + from "@/modules/dealModularEditorTabs/FulfillmentBase/shared/components/ProductSelect/ProductSelect"; type RestProps = { clientId: number; diff --git a/src/modules/dealModularEditorTabs/FulfillmentBase/shared/modals/DealServiceEditorModal/components/ServiceWithPriceInput.tsx b/src/modules/dealModularEditorTabs/FulfillmentBase/shared/modals/DealServiceEditorModal/components/ServiceWithPriceInput.tsx index 070764a..7c572a4 100644 --- a/src/modules/dealModularEditorTabs/FulfillmentBase/shared/modals/DealServiceEditorModal/components/ServiceWithPriceInput.tsx +++ b/src/modules/dealModularEditorTabs/FulfillmentBase/shared/modals/DealServiceEditorModal/components/ServiceWithPriceInput.tsx @@ -9,7 +9,7 @@ import { } from "@mantine/core"; import { ObjectSelectProps } from "@/components/selects/ObjectSelect/ObjectSelect"; import { ServiceSchema } from "@/lib/client"; -import ServiceSelect from "@/modules/dealModularEditorTabs/FulfillmentBase/desktop/components/ServiceSelect/ServiceSelect"; +import ServiceSelect from "@/modules/dealModularEditorTabs/FulfillmentBase/shared/components/ServiceSelect/ServiceSelect"; import { ServiceType } from "@/modules/dealModularEditorTabs/FulfillmentBase/shared/types/service"; type ServiceProps = Omit, "data">;