Adding Organization form at Create Service.

This commit is contained in:
Kartik Sharma 2025-11-18 10:10:44 +05:30
parent 8de1230f79
commit b14353dd4f

View File

@ -14,6 +14,7 @@ import SelectMultiple from "../common/SelectMultiple";
import { projectSchema } from "./ServiceProjectSchema";
import {
useOrganization,
useOrganizationModal,
useOrganizationsList,
} from "../../hooks/useOrganization";
import { error } from "pdf-lib";
@ -106,6 +107,8 @@ const ManageServiceProject = ({ serviceProjectId, onClose }) => {
});
}
}, [projectdata]);
const { onOpen: openOrgModal } = useOrganizationModal();
return (
<FormProvider {...methods}>
<form className="px-3 py-2" onSubmit={handleSubmit(onSubmit)}>
@ -141,6 +144,10 @@ const ManageServiceProject = ({ serviceProjectId, onClose }) => {
</select>
<i
className="bx bx-plus-circle bx-xs cursor-pointer text-primary"
onClick={() => {
onClose();
openOrgModal({ startStep: 2 }); // Step 4 = ManagOrg
}}
/>
</div>
{errors?.clientId && (