fixed build issue
This commit is contained in:
@@ -74,7 +74,9 @@ const DatePicker = <T extends FieldValues>({
|
||||
maxDate={maxDate}
|
||||
onlyMonthPicker={onlyMonthPicker}
|
||||
plugins={
|
||||
timePicker ? [<TimePicker position="bottom" />] : []
|
||||
timePicker
|
||||
? [<TimePicker key={name} position="bottom" />]
|
||||
: []
|
||||
}
|
||||
onlyYearPicker={onlyYearPicker}
|
||||
multiple={multiple}
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
"use client";
|
||||
import { ExclamationIcon, PencilSquareIcon, TrashIcon } from "@/assets/icons";
|
||||
import {
|
||||
ExclamationIcon,
|
||||
EyeIcon,
|
||||
PencilSquareIcon,
|
||||
TrashIcon,
|
||||
} from "@/assets/icons";
|
||||
import ConfirmationModal from "@/components/ui/ConfirmationModal";
|
||||
import { _TooltipDefaultParams } from "@/constants/tooltip";
|
||||
import {
|
||||
Table,
|
||||
TableBody,
|
||||
@@ -11,6 +15,7 @@ import {
|
||||
TableRow,
|
||||
} from "@/components/ui/table";
|
||||
import TableSkeleton from "@/components/ui/TableSkeleton";
|
||||
import { _TooltipDefaultParams } from "@/constants/tooltip";
|
||||
import { formatPhoneNumber } from "@/utils/shared";
|
||||
import Link from "next/link";
|
||||
import { Tooltip } from "react-tooltip";
|
||||
@@ -116,6 +121,17 @@ const CompaniesTable = ({}: IProps) => {
|
||||
<span className="sr-only">Edit Company </span>
|
||||
<PencilSquareIcon />
|
||||
</button>
|
||||
<button
|
||||
data-tooltip-id="details"
|
||||
data-tooltip-content="Details"
|
||||
data-tooltip-place="top"
|
||||
onClick={() => {
|
||||
router.push(`${pathName}/details/${company.id}`);
|
||||
}}
|
||||
>
|
||||
<Tooltip {..._TooltipDefaultParams({ id: "details" })} />
|
||||
<EyeIcon />
|
||||
</button>
|
||||
<button
|
||||
data-tooltip-id="feedback"
|
||||
data-tooltip-content="Feedback"
|
||||
|
||||
@@ -38,7 +38,7 @@ const AssignToCompanyModalContent: FC<IProps> = ({
|
||||
: [],
|
||||
);
|
||||
}
|
||||
}, [status]);
|
||||
}, [status, isSuccess, data?.data.companies]);
|
||||
|
||||
const assignCompany = (data: TAssignCustomerToCompanyCredentials) => {
|
||||
setCompanies(data);
|
||||
|
||||
@@ -39,7 +39,7 @@ const useCreateCompanyPresenter = ({ defaultValues, editMode, id }: IProps) => {
|
||||
);
|
||||
setValue("tags.categories", categories);
|
||||
}
|
||||
}, [defaultValues]);
|
||||
}, [defaultValues,setValue]);
|
||||
const router = useRouter();
|
||||
const { data: companyCategories } = useCompanyCategoriesQuery();
|
||||
const { mutate: createCompany, isPending: isCreating } = useCreateCompany();
|
||||
|
||||
@@ -44,7 +44,7 @@ const useCreateCustomerPresenter = ({
|
||||
);
|
||||
setValue("companies", companies);
|
||||
}
|
||||
}, [defaultValues]);
|
||||
}, [defaultValues, setValue]);
|
||||
const onSubmit: SubmitHandler<CreateCustomerCredentials> = (data) => {
|
||||
if (editMode) {
|
||||
updateCustomer({
|
||||
|
||||
Reference in New Issue
Block a user