Merge remote-tracking branch 'origin/statistics'

# Conflicts:
#	src/client/models/DealSchema.ts
This commit is contained in:
2024-11-21 02:05:01 +03:00
36 changed files with 845 additions and 3 deletions

View File

@@ -0,0 +1,23 @@
import { FC } from "react";
import ObjectSelect, { ObjectSelectProps } from "../ObjectSelect/ObjectSelect.tsx";
import { UserSchema } from "../../client";
import useManagersList from "../../pages/LeadsPage/hooks/useManagersList.tsx";
type Props = Omit<
ObjectSelectProps<UserSchema | null>,
"data" | "getValueFn" | "getLabelFn"
>;
const UserSelect: FC<Props> = props => {
const { objects: managers } = useManagersList();
return (
<ObjectSelect
data={managers}
getLabelFn={(manager: UserSchema) => `${manager.firstName} ${manager.secondName}`}
getValueFn={(manager: UserSchema) => manager.id.toString()}
clearable
{...props}
onClear={() => props.onChange(null)}
/>
);
};
export default UserSelect;

View File

@@ -4,7 +4,7 @@ import {
IconBarcode,
IconBox,
IconBuildingWarehouse,
IconCash,
IconCash, IconChartDots,
IconDashboard,
IconFileBarcode,
IconHome2,
@@ -93,6 +93,11 @@ const mockdata = [
label: "Маркетплейсы",
href: "/marketplaces",
},
{
icon: IconChartDots,
label: "Статистика",
href: "/statistics",
}
];
export function Navbar() {