Change the UI of all components and add stars for all mandatory fields. #370

Merged
vikas.nale merged 10 commits from UI_Changes_PMS into Document_Manag 2025-09-08 06:30:58 +00:00
Showing only changes of commit 5c59ac3115 - Show all commits

View File

@ -18,6 +18,7 @@ import {
import { clearApiCacheKey } from "../../slices/apiCacheSlice";
import { useMutation } from "@tanstack/react-query";
import Label from "../common/Label";
import DatePicker from "../common/DatePicker";
const mobileNumberRegex = /^[0-9]\d{9}$/;
@ -371,41 +372,43 @@ const ManageEmployee = ({ employeeId, onClosed, IsAllEmployee }) => {
)}
</div>
<div className="col-sm-4">
<Label className="form-text text-start" required>Birth Date</Label>
<Label className="form-text text-start" required>
Birth Date
</Label>
<div className="input-group">
<input
className="form-control form-control-sm"
type="date"
{...register("birthDate")}
id="birthDate"
<DatePicker
name="birthDate"
control={control} // from useForm()
placeholder="DD-MM-YYYY"
maxDate={new Date()} // restrict future dates (e.g., birth date must be today or past)
className="w-100"
/>
</div>
{errors.birthDate && (
<div
className="danger-text text-start"
style={{ fontSize: "12px" }}
>
<div className="danger-text text-start" style={{ fontSize: "12px" }}>
{errors.birthDate.message}
</div>
)}
</div>
<div className="col-sm-4">
<Label className="form-text text-start" required>Joining Date</Label>
<Label className="form-text text-start" required>
Joining Date
</Label>
<div className="input-group">
<input
className="form-control form-control-sm"
type="date"
{...register("joiningDate")}
id="joiningDate"
<DatePicker
name="joiningDate"
control={control} // from useForm()
placeholder="DD-MM-YYYY"
// For joining date, we dont block future dates
className="w-100"
/>
</div>
{errors.joiningDate && (
<div
className="danger-text text-start"
style={{ fontSize: "12px" }}
>
<div className="danger-text text-start" style={{ fontSize: "12px" }}>
{errors.joiningDate.message}
</div>
)}