import { Form, Tabs, Row, Col, Input, Modal, Button, Select } from "antd"; import { useState } from "react"; import { useCompanyData } from "../../Hooks/Companies"; // @ts-ignore import zippy from "../../assets/zippyicon.svg"; // @ts-ignore import evo from "../../assets/evoicon.png"; // @ts-ignore import zeelog from "../../assets/zeelogicon.svg"; // @ts-ignore import ontime from "../../assets/ontimeicon.svg"; // @ts-ignore import tt from "../../assets/tticon.svg"; import { useCustomerByComanyData } from "../../Hooks/Customers"; const TabPane = Tabs.TabPane; const AssignedEdit = ({ recordData, editOpen, setEditOpen }: any) => { const handleCancel = () => { setEditOpen(!editOpen); }; const onSubmit = () => {}; const [companyName, setCompanyName] = useState(); const [companyId, setCompanyId] = useState(); const [customerName, setCustomerName] = useState(); const companyData = useCompanyData({ name: companyName }); const customerData = useCustomerByComanyData( { name: customerName, page: 1, page_size: 5, }, companyId ); const getImageSource = (source: string) => { switch (source) { case "Zippy": return zippy; case "EVO": return evo; case "Ontime": return ontime; case "Zeelog": return zeelog; case "TT": return tt; default: return tt; } }; return (
setCustomerName(value)} options={customerData?.data?.data?.map((item) => ({ label: item?.name, value: item?.id, }))} value={customerName} filterOption={false} autoClearSearchValue={false} allowClear />
); }; export default AssignedEdit;