Compare commits

..

No commits in common. "62887548cf7f9c107faab2ff4c65ae94039d99b5" and "7308bd8d03ccf85858cf1f22568bf9de49dfb19a" have entirely different histories.

3 changed files with 8 additions and 24 deletions

View File

@ -12,7 +12,7 @@ import {checkIfCurrentDate} from "../../utils/dateUtils";
const schema = z.object({
markTime: z.string().nonempty({message:"Time is required"}),
description:z.string().max(200,"description should less than 200 chracters").optional()
description:z.string().optional()
});
const CheckCheckOutmodel = ({modeldata,closeModal,handleSubmitForm,}) => {
@ -29,8 +29,7 @@ const CheckCheckOutmodel = ({modeldata,closeModal,handleSubmitForm,}) => {
reset,
setValue,
} = useForm({
resolver: zodResolver( schema ),
mode:"onChange"
resolver: zodResolver(schema),
});
const onSubmit = ( data ) =>
@ -85,8 +84,7 @@ const CheckCheckOutmodel = ({modeldata,closeModal,handleSubmitForm,}) => {
rows="3"
name="description"
className="form-control"
{...register( "description" )}
maxLength={200}
{...register("description")}
/>
{errors.description && (
<p className="text-danger">{errors.description.message}</p>

View File

@ -121,7 +121,6 @@ const ManageEmployee = () => {
register,
control,
handleSubmit,
watch,
formState: { errors },
reset,
getValues,
@ -145,11 +144,8 @@ const ManageEmployee = () => {
PhoneNumber: currentEmployee?.phoneNumber || "",
JobRoleId: currentEmployee?.jobRoleId || "",
},
mode: "onChange",
});
const AadharNumberValue = watch("AadharNumber") || "";
const onSubmit = (data) => {
setLoading(true);
@ -342,7 +338,6 @@ const ManageEmployee = () => {
{...register("PhoneNumber")}
className="form-control form-control-sm"
placeholder="Phone Number"
inputMode="numeric"
/>
{errors.PhoneNumber && (
<div
@ -434,8 +429,7 @@ const ManageEmployee = () => {
placeholder="Current Address"
aria-label="Current Address"
aria-describedby="basic-icon-default-message2"
{...register( "CurrentAddress" )}
maxLength={500}
{...register("CurrentAddress")}
></textarea>
{errors.CurrentAddress && (
<div
@ -457,8 +451,7 @@ const ManageEmployee = () => {
placeholder="Permanent Address"
aria-label="Permanent Address"
aria-describedby="basic-icon-default-message2"
{...register( "PermanentAddress" )}
maxLength={500}
{...register("PermanentAddress")}
></textarea>
{errors.PermanentAddress && (
<div
@ -481,7 +474,7 @@ const ManageEmployee = () => {
<div className="form-text text-start">Role</div>
<div className="input-group input-group-merge ">
<select
className="form-select form-select-sm"
className="form-select form-select-sm "
{...register("JobRoleId")}
id="JobRoleId"
aria-label=""
@ -514,7 +507,6 @@ const ManageEmployee = () => {
{...register("EmergencyContactPerson")}
className="form-control form-control-sm"
id="EmergencyContactPerson"
maxLength={50}
placeholder="Contact Person"
/>
{errors.EmergencyContactPerson && (
@ -536,7 +528,6 @@ const ManageEmployee = () => {
className="form-control form-control-sm phone-mask"
id="EmergencyPhoneNumber"
placeholder="Phone Number"
inputMode="numeric"
/>
{errors.EmergencyPhoneNumber && (
<div
@ -558,8 +549,6 @@ const ManageEmployee = () => {
className="form-control form-control-sm"
id="AadharNumber"
placeholder="AADHAR Number"
maxLength={12}
inputMode="numeric"
/>
{errors.AadharNumber && (
<div className="danger-text text-start">
@ -576,7 +565,6 @@ const ManageEmployee = () => {
className="form-control form-control-sm"
id="PanNumber"
placeholder="PAN Number"
maxLength={10}
/>
{errors.PanNumber && (
<div

View File

@ -62,9 +62,7 @@ const ManageProjectInfo = ( {project,handleSubmitForm, onClose} ) =>
endDate: formatDate(project?.endDate ) || currentDate,
projectStatusId: String(project?.projectStatusId || "0"),
},
mode:"onChange"
}
})
useEffect( () =>
@ -212,7 +210,7 @@ const ManageProjectInfo = ( {project,handleSubmitForm, onClose} ) =>
name="projectAddress"
className="form-control"
{...register( "projectAddress" )}
maxLength={500}
/>
</div>
{errors.projectAddress && <div className="danger-text text-start" style={{fontSize:"12px"}}>{errors.projectAddress.message}</div>}