diff --git a/src/client/models/DealSummary.ts b/src/client/models/DealSummary.ts index da0833d..a0273fc 100644 --- a/src/client/models/DealSummary.ts +++ b/src/client/models/DealSummary.ts @@ -8,6 +8,7 @@ export type DealSummary = { name: string; clientName: string; changedAt: string; + createdAt: string; deadline: string; status: number; totalPrice: number; diff --git a/src/client/services/DealService.ts b/src/client/services/DealService.ts index 36f104e..6560d47 100644 --- a/src/client/services/DealService.ts +++ b/src/client/services/DealService.ts @@ -134,10 +134,20 @@ export class DealService { * @returns DealSummaryResponse Successful Response * @throws ApiError */ - public static getDealSummaries(): CancelablePromise { + public static getDealSummaries({ + full, + }: { + full: (boolean | null), + }): CancelablePromise { return __request(OpenAPI, { method: 'GET', url: '/deal/summaries', + query: { + 'full': full, + }, + errors: { + 422: `Validation Error`, + }, }); } /** diff --git a/src/components/Navbar/Navbar.tsx b/src/components/Navbar/Navbar.tsx index f191a2b..e3d789b 100644 --- a/src/components/Navbar/Navbar.tsx +++ b/src/components/Navbar/Navbar.tsx @@ -2,13 +2,15 @@ import {Center, Flex, Image, rem, Stack, Tooltip, UnstyledButton, useMantineColo import { IconBarcode, IconBox, - IconCash, IconDashboard, + IconCash, + IconDashboard, IconFileBarcode, IconHome2, IconLogout, IconMan, IconMoon, IconSun, + IconTable, } from '@tabler/icons-react'; import classes from './Navbar.module.css'; import {useAppDispatch} from "../../redux/store.ts"; @@ -40,16 +42,17 @@ function NavbarLink(props: NavbarLinkProps) { } const mockdata = [ - // { - // icon: IconHome2, - // label: 'Главная', - // href: '/' - // }, + { icon: IconCash, label: 'Сделки', href: '/leads' }, + { + icon: IconTable, + label: 'Таблица сделок', + href: '/deals' + }, { icon: IconMan, label: 'Клиенты', diff --git a/src/components/ObjectSelect/ObjectSelect.tsx b/src/components/ObjectSelect/ObjectSelect.tsx index 7378ece..e99ba0c 100644 --- a/src/components/ObjectSelect/ObjectSelect.tsx +++ b/src/components/ObjectSelect/ObjectSelect.tsx @@ -26,10 +26,12 @@ type RestProps = { filterBy?: (item: SelectObjectType) => boolean; }; const defaultGetLabelFn = (item: T): string => { + return item.name; } const defaultGetValueFn = (item: T): string => { + if (!item) return item; return item.id.toString(); } export type ObjectSelectProps = @@ -85,6 +87,7 @@ const ObjectSelect = (props: ObjectSelectProps) => { if (isControlled || !internalValue) return; props.onChange(internalValue); }, [internalValue]); + const restProps = omit(props, ['filterBy', 'groupBy', 'getValueFn', 'getLabelFn']); return (