othr
This commit is contained in:
@@ -3,8 +3,8 @@ import {ProductService} from "../../../client";
|
||||
|
||||
type Props = {
|
||||
clientId: number,
|
||||
page: number,
|
||||
itemsPerPage: number,
|
||||
page?: number,
|
||||
itemsPerPage?: number,
|
||||
}
|
||||
const useProductsList = (props: Props) => {
|
||||
const {clientId, page, itemsPerPage} = props;
|
||||
|
||||
@@ -1,16 +1,15 @@
|
||||
import PageBlock from "../../../components/PageBlock/PageBlock.tsx";
|
||||
import {FC, useEffect, useState} from "react";
|
||||
import styles from './ProductsPage.module.css';
|
||||
import {Button, Text, Pagination} from "@mantine/core";
|
||||
import {Button, Pagination, Text} from "@mantine/core";
|
||||
import ClientSelect from "../../../components/Selects/ClientSelect/ClientSelect.tsx";
|
||||
import ProductsTable from "../components/ProductsTable/ProductsTable.tsx";
|
||||
import {modals} from "@mantine/modals";
|
||||
import {notifications} from "../../../shared/lib/notifications.ts";
|
||||
import {CreateProductRequest} from "../types.ts";
|
||||
import {ProductSchema, ProductService} from "../../../client";
|
||||
import ServiceSelect from "../../../components/ServiceSelect/ServiceSelect.tsx";
|
||||
import useProductsList from "../hooks/useProductsList.tsx";
|
||||
import useServicesList from "../../ServicesPage/hooks/useServicesList.tsx";
|
||||
import ProductSelect from "../../../components/ProductSelect/ProductSelect.tsx";
|
||||
|
||||
export const ProductsPage: FC = () => {
|
||||
const [clientId, setClientId] = useState(-1);
|
||||
@@ -91,9 +90,11 @@ export const ProductsPage: FC = () => {
|
||||
onClick={() => onCreateProductClick()}
|
||||
variant={"default"}
|
||||
>Создать</Button>
|
||||
{/*<ServiceSelect*/}
|
||||
{/* value={selectedService}*/}
|
||||
{/* onChange={setSelectedService}/>*/}
|
||||
<ProductSelect
|
||||
onChange={event => console.log(event)}
|
||||
clientId={8}
|
||||
limit={10}
|
||||
/>
|
||||
</div>
|
||||
</PageBlock>
|
||||
<PageBlock>
|
||||
|
||||
Reference in New Issue
Block a user