diff --git a/src/components/Organization/OrgPickerFromSPId.jsx b/src/components/Organization/OrgPickerFromSPId.jsx index 2b6da36f..0c11fd0a 100644 --- a/src/components/Organization/OrgPickerFromSPId.jsx +++ b/src/components/Organization/OrgPickerFromSPId.jsx @@ -12,13 +12,12 @@ import { spridSchema } from "./OrganizationSchema"; import { OrgCardSkeleton } from "./OrganizationSkeleton"; import { useQueryClient } from "@tanstack/react-query"; - // Zod schema: only allow exactly 4 digits const OrgPickerFromSPId = ({ title, placeholder }) => { - const { onClose, startStep, flowType, onOpen, prevStep,orgData } = + const { onClose, startStep, flowType, onOpen, prevStep, orgData } = useOrganizationModal(); - const clientQuery = useQueryClient() + const clientQuery = useQueryClient(); const { register, handleSubmit, @@ -37,33 +36,42 @@ const OrgPickerFromSPId = ({ title, placeholder }) => { const onSubmit = (formdata) => { setSPRID(formdata.spridSearchText); }; - + const handleCrateOrg = () => { - clientQuery.removeQueries({queryKey:["organization"]}) - onOpen({ startStep: 4,orgData:null }) + clientQuery.removeQueries({ queryKey: ["organization"] }); + onOpen({ startStep: 4, orgData: null }); }; const SP = watch("spridSearchText"); return ( -
-
-
- - -
+
+ +
+ {/* Input Section */} +
+ + +
- + {/* Button Section */} +
+ +
+
+
{" "} {errors.spridSearchText && ( @@ -124,7 +132,7 @@ const OrgPickerFromSPId = ({ title, placeholder }) => { No organization found for "{SPRID}"
) : null} -
+
Do not have SPRID or could not find organization ?