Merge remote-tracking branch 'origin/statistics'
# Conflicts: # src/client/models/DealSchema.ts
This commit is contained in:
23
src/components/ManagerSelect/ManagerSelect.tsx
Normal file
23
src/components/ManagerSelect/ManagerSelect.tsx
Normal 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;
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user