feat: setting manager for a deal

This commit is contained in:
2024-11-17 13:55:58 +04:00
parent 873ab7e2bb
commit 7bebd40f81
7 changed files with 57 additions and 0 deletions

View File

@@ -30,6 +30,7 @@ import { IconBarcode, IconPrinter } from "@tabler/icons-react";
import styles from "../../../ui/LeadsPage.module.css";
import { base64ToBlob } from "../../../../../shared/lib/utils.ts";
import { DatePickerInput } from "@mantine/dates";
import ManagerSelect from "../../../../../components/ManagerSelect/ManagerSelect.tsx";
type Props = {
deal: DealSchema;
@@ -209,6 +210,11 @@ const Content: FC<Props> = ({ deal }) => {
{...form.getInputProps("receivingSlotDate")}
/>
<ManagerSelect
placeholder={"Укажите менеджера"}
label={"Менеджер"}
{...form.getInputProps("manager")}
/>
</Flex>
</Fieldset>
<Flex

View File

@@ -0,0 +1,11 @@
import ObjectList from "../../../hooks/objectList.tsx";
import { UserService } from "../../../client";
const useManagersList = () =>
ObjectList({
queryFn: UserService.getManagers,
getObjectsFn: response => response.managers,
queryKey: "getManagers",
});
export default useManagersList;