Merge branch 'Issues_Jun_3W' of https://git.marcoaiot.com/admin/marco.pms.web into Issues_Jun_3W
This commit is contained in:
commit
5861288a9d
@ -115,7 +115,7 @@ const NoteCardDirectoryEditable = ({
|
|||||||
</GlobalModel>
|
</GlobalModel>
|
||||||
)}
|
)}
|
||||||
<div
|
<div
|
||||||
className="card p-1 shadow-sm border-1 mb-4 p-4 rounded"
|
className="card shadow-sm border-1 mb-3 p-4 rounded"
|
||||||
style={{
|
style={{
|
||||||
width: "100%",
|
width: "100%",
|
||||||
background: noteItem.isActive ? "#fff" : "#f8f6f6",
|
background: noteItem.isActive ? "#fff" : "#f8f6f6",
|
||||||
@ -127,7 +127,7 @@ const NoteCardDirectoryEditable = ({
|
|||||||
<div className="d-flex align-items-center">
|
<div className="d-flex align-items-center">
|
||||||
|
|
||||||
<Avatar
|
<Avatar
|
||||||
size="xs"
|
size="xxs"
|
||||||
firstName={noteItem?.createdBy?.firstName}
|
firstName={noteItem?.createdBy?.firstName}
|
||||||
lastName={noteItem?.createdBy?.lastName}
|
lastName={noteItem?.createdBy?.lastName}
|
||||||
className="m-0"
|
className="m-0"
|
||||||
@ -136,7 +136,7 @@ const NoteCardDirectoryEditable = ({
|
|||||||
<div className="d-flex ms-0 align-middle cursor-pointer" onClick={() =>contactProfile(noteItem.contactId)}>
|
<div className="d-flex ms-0 align-middle cursor-pointer" onClick={() =>contactProfile(noteItem.contactId)}>
|
||||||
<span>
|
<span>
|
||||||
<span className="fw-bold "> {noteItem?.contactName} </span> <span className="text-muted font-weight-normal">
|
<span className="fw-bold "> {noteItem?.contactName} </span> <span className="text-muted font-weight-normal">
|
||||||
( {noteItem?.organizationName})
|
({noteItem?.organizationName})
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
@ -220,7 +220,7 @@ const NoteCardDirectoryEditable = ({
|
|||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
<div
|
<div
|
||||||
className="px-10 pb-2 text-start"
|
className="mx-4 px-10 text-start"
|
||||||
dangerouslySetInnerHTML={{ __html: noteItem.note }}
|
dangerouslySetInnerHTML={{ __html: noteItem.note }}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
@ -133,11 +133,11 @@ const NotesCardViewDirectory = ({ notes, setNotesForFilter, searchText, filterAp
|
|||||||
style={{ marginBottom: '70px' }}>
|
style={{ marginBottom: '70px' }}>
|
||||||
{/* Previous Button */}
|
{/* Previous Button */}
|
||||||
<button
|
<button
|
||||||
className="btn btn-sm rounded-circle border text-secondary" // Added text-secondary for lighter color, kept btn-sm for smaller size like in image
|
className="btn btn-sm rounded-circle border text-secondary"
|
||||||
onClick={() => handlePageClick(Math.max(1, currentPage - 1))}
|
onClick={() => handlePageClick(Math.max(1, currentPage - 1))}
|
||||||
disabled={currentPage === 1}
|
disabled={currentPage === 1}
|
||||||
title="Previous"
|
title="Previous"
|
||||||
style={{ width: "38px", height: "38px", padding: 0 }} // Ensure consistent size
|
style={{ width: "30px", height: "30px", padding: 0, fontSize: "0.75rem" }} // Adjusted width, height, and font size
|
||||||
>
|
>
|
||||||
«
|
«
|
||||||
</button>
|
</button>
|
||||||
@ -148,10 +148,8 @@ const NotesCardViewDirectory = ({ notes, setNotesForFilter, searchText, filterAp
|
|||||||
return (
|
return (
|
||||||
<button
|
<button
|
||||||
key={page}
|
key={page}
|
||||||
// Changed btn-sm to just btn, adjusted class for active/inactive state backgrounds and text colors
|
className={`btn rounded-circle border ${page === currentPage ? "btn-primary text-white" : "btn-light text-secondary"}`}
|
||||||
className={`btn rounded-circle border ${page === currentPage ? "btn-primary text-white" : "btn-light text-secondary"
|
style={{ width: "30px", height: "30px", padding: 0, fontSize: "0.75rem", lineHeight: "1" }} // Adjusted width, height, and font size
|
||||||
}`}
|
|
||||||
style={{ width: "38px", height: "38px", padding: 0, fontSize: "1rem", lineHeight: "1" }} // Adjusted size and font for better fit
|
|
||||||
onClick={() => handlePageClick(page)}
|
onClick={() => handlePageClick(page)}
|
||||||
>
|
>
|
||||||
{page}
|
{page}
|
||||||
@ -161,11 +159,11 @@ const NotesCardViewDirectory = ({ notes, setNotesForFilter, searchText, filterAp
|
|||||||
|
|
||||||
{/* Next Button */}
|
{/* Next Button */}
|
||||||
<button
|
<button
|
||||||
className="btn btn-sm rounded-circle border text-secondary" // Added text-secondary for lighter color, kept btn-sm
|
className="btn btn-sm rounded-circle border text-secondary"
|
||||||
onClick={() => handlePageClick(Math.min(totalPages, currentPage + 1))}
|
onClick={() => handlePageClick(Math.min(totalPages, currentPage + 1))}
|
||||||
disabled={currentPage === totalPages}
|
disabled={currentPage === totalPages}
|
||||||
title="Next"
|
title="Next"
|
||||||
style={{ width: "38px", height: "38px", padding: 0 }} // Ensure consistent size
|
style={{ width: "30px", height: "30px", padding: 0, fontSize: "0.75rem" }} // Adjusted width, height, and font size
|
||||||
>
|
>
|
||||||
»
|
»
|
||||||
</button>
|
</button>
|
||||||
|
@ -135,7 +135,7 @@ const NotesDirectory = ({
|
|||||||
|
|
||||||
<div className="d-flex justify-content-end">
|
<div className="d-flex justify-content-end">
|
||||||
<span
|
<span
|
||||||
className={`btn btn-sm ${addNote ? "btn-danger" : "btn-primary"}`}
|
className={`btn btn-sm ${addNote ? "btn-secondary" : "btn-primary"}`}
|
||||||
onClick={() => setAddNote(!addNote)}
|
onClick={() => setAddNote(!addNote)}
|
||||||
>
|
>
|
||||||
{addNote ? "Hide Editor" : "Add a Note"}
|
{addNote ? "Hide Editor" : "Add a Note"}
|
||||||
|
@ -172,8 +172,7 @@ const ManageEmployee = ({ employeeId, onClosed }) => {
|
|||||||
.then((response) => {
|
.then((response) => {
|
||||||
cacheData("employeeProfileInfo", data);
|
cacheData("employeeProfileInfo", data);
|
||||||
showToast(
|
showToast(
|
||||||
`Employee details ${
|
`Employee details ${data.id == null ? "created" : "updated"
|
||||||
data.id == null ? "created" : "updated"
|
|
||||||
} successfully.`,
|
} successfully.`,
|
||||||
"success"
|
"success"
|
||||||
);
|
);
|
||||||
@ -207,24 +206,24 @@ const ManageEmployee = ({ employeeId, onClosed }) => {
|
|||||||
reset(
|
reset(
|
||||||
currentEmployee
|
currentEmployee
|
||||||
? {
|
? {
|
||||||
id: currentEmployee.id || null,
|
id: currentEmployee.id || null,
|
||||||
firstName: currentEmployee.firstName || "",
|
firstName: currentEmployee.firstName || "",
|
||||||
middleName: currentEmployee.middleName || "",
|
middleName: currentEmployee.middleName || "",
|
||||||
lastName: currentEmployee.lastName || "",
|
lastName: currentEmployee.lastName || "",
|
||||||
email: currentEmployee.email || "",
|
email: currentEmployee.email || "",
|
||||||
currentAddress: currentEmployee.currentAddress || "",
|
currentAddress: currentEmployee.currentAddress || "",
|
||||||
birthDate: formatDate(currentEmployee.birthDate) || "",
|
birthDate: formatDate(currentEmployee.birthDate) || "",
|
||||||
joiningDate: formatDate(currentEmployee.joiningDate) || "",
|
joiningDate: formatDate(currentEmployee.joiningDate) || "",
|
||||||
emergencyPhoneNumber: currentEmployee.emergencyPhoneNumber || "",
|
emergencyPhoneNumber: currentEmployee.emergencyPhoneNumber || "",
|
||||||
emergencyContactPerson:
|
emergencyContactPerson:
|
||||||
currentEmployee.emergencyContactPerson || "",
|
currentEmployee.emergencyContactPerson || "",
|
||||||
aadharNumber: currentEmployee.aadharNumber || "",
|
aadharNumber: currentEmployee.aadharNumber || "",
|
||||||
gender: currentEmployee.gender || "",
|
gender: currentEmployee.gender || "",
|
||||||
panNumber: currentEmployee.panNumber || "",
|
panNumber: currentEmployee.panNumber || "",
|
||||||
permanentAddress: currentEmployee.permanentAddress || "",
|
permanentAddress: currentEmployee.permanentAddress || "",
|
||||||
phoneNumber: currentEmployee.phoneNumber || "",
|
phoneNumber: currentEmployee.phoneNumber || "",
|
||||||
jobRoleId: currentEmployee.jobRoleId?.toString() || "",
|
jobRoleId: currentEmployee.jobRoleId?.toString() || "",
|
||||||
}
|
}
|
||||||
: {} // Empty object resets the form
|
: {} // Empty object resets the form
|
||||||
);
|
);
|
||||||
setCurrentAddressLength(currentEmployee?.currentAddress?.length || 0);
|
setCurrentAddressLength(currentEmployee?.currentAddress?.length || 0);
|
||||||
@ -233,410 +232,417 @@ const ManageEmployee = ({ employeeId, onClosed }) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
|
||||||
{/* <div className="c">
|
{/* <div className="c">
|
||||||
{!currentEmployee && empLoading && employeeId && (
|
{!currentEmployee && empLoading && employeeId && (
|
||||||
<p>Loading Employee Data...</p>
|
<p>Loading Employee Data...</p>
|
||||||
)} */}
|
)} */}
|
||||||
|
|
||||||
<form onSubmit={handleSubmit( onSubmit )} className="p-sm-0 p-2">
|
<form onSubmit={handleSubmit(onSubmit)} className="p-sm-5 p-2 position-relative">
|
||||||
|
{/* Cross button */}
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
className="btn-close position-absolute top-0 end-0 m-2"
|
||||||
|
aria-label="Close"
|
||||||
|
onClick={onClosed}
|
||||||
|
></button>
|
||||||
<div className="text-center"><p className="fs-6 fw-semibold"> {employee ? "Update Employee" : "Create Employee"}</p></div>
|
<div className="text-center"><p className="fs-6 fw-semibold"> {employee ? "Update Employee" : "Create Employee"}</p></div>
|
||||||
<div className="row mb-3">
|
<div className="row mb-3">
|
||||||
<div className="col-sm-4">
|
<div className="col-sm-4">
|
||||||
{" "}
|
{" "}
|
||||||
<div className="form-text text-start">First Name</div>
|
<div className="form-text text-start">First Name</div>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
name="FirstName"
|
name="FirstName"
|
||||||
{...register("firstName")}
|
{...register("firstName")}
|
||||||
className="form-control form-control-sm"
|
className="form-control form-control-sm"
|
||||||
id="firstName"
|
id="firstName"
|
||||||
placeholder="First Name"
|
placeholder="First Name"
|
||||||
/>
|
/>
|
||||||
{errors.firstName && (
|
{errors.firstName && (
|
||||||
<div
|
<div
|
||||||
className="danger-text text-start"
|
className="danger-text text-start"
|
||||||
style={{ fontSize: "12px" }}
|
style={{ fontSize: "12px" }}
|
||||||
>
|
>
|
||||||
{errors.firstName.message}
|
{errors.firstName.message}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>{" "}
|
</div>{" "}
|
||||||
<div className="col-sm-4">
|
<div className="col-sm-4">
|
||||||
<div className="form-text text-start">Middle Name</div>
|
<div className="form-text text-start">Middle Name</div>
|
||||||
|
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
{...register("middleName")}
|
{...register("middleName")}
|
||||||
className="form-control form-control-sm"
|
className="form-control form-control-sm"
|
||||||
id="middleName"
|
id="middleName"
|
||||||
placeholder="Middle Name"
|
placeholder="Middle Name"
|
||||||
/>
|
/>
|
||||||
{errors.middleName && (
|
{errors.middleName && (
|
||||||
<div
|
<div
|
||||||
className="danger-text text-start "
|
className="danger-text text-start "
|
||||||
style={{ fontSize: "12px" }}
|
style={{ fontSize: "12px" }}
|
||||||
>
|
>
|
||||||
{errors.middleName.message}
|
{errors.middleName.message}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="col-sm-4">
|
<div className="col-sm-4">
|
||||||
<div className="form-text text-start">Last Name</div>
|
<div className="form-text text-start">Last Name</div>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
{...register("lastName")}
|
{...register("lastName")}
|
||||||
className="form-control form-control-sm"
|
className="form-control form-control-sm"
|
||||||
id="lastName"
|
id="lastName"
|
||||||
placeholder="Last Name"
|
placeholder="Last Name"
|
||||||
/>
|
/>
|
||||||
{errors.lastName && (
|
{errors.lastName && (
|
||||||
<div
|
<div
|
||||||
className="danger-text text-start"
|
className="danger-text text-start"
|
||||||
style={{ fontSize: "12px" }}
|
style={{ fontSize: "12px" }}
|
||||||
>
|
>
|
||||||
{errors.lastName.message}
|
{errors.lastName.message}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="row mb-3">
|
<div className="row mb-3">
|
||||||
<div className="col-sm-6">
|
<div className="col-sm-6">
|
||||||
<div className="form-text text-start">Email</div>
|
<div className="form-text text-start">Email</div>
|
||||||
<input
|
<input
|
||||||
type="email"
|
type="email"
|
||||||
id="email"
|
id="email"
|
||||||
{...register("email")}
|
{...register("email")}
|
||||||
className="form-control form-control-sm"
|
className="form-control form-control-sm"
|
||||||
placeholder="example@domain.com"
|
placeholder="example@domain.com"
|
||||||
maxLength={80}
|
maxLength={80}
|
||||||
aria-describedby="Email"
|
aria-describedby="Email"
|
||||||
disabled={!!currentEmployee?.email}
|
disabled={!!currentEmployee?.email}
|
||||||
/>
|
/>
|
||||||
{errors.email && (
|
{errors.email && (
|
||||||
<div
|
<div
|
||||||
className="danger-text text-start"
|
className="danger-text text-start"
|
||||||
style={{ fontSize: "12px" }}
|
style={{ fontSize: "12px" }}
|
||||||
>
|
>
|
||||||
{errors.email.message}
|
{errors.email.message}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="col-sm-6">
|
<div className="col-sm-6">
|
||||||
<div className="form-text text-start">Phone Number</div>
|
<div className="form-text text-start">Phone Number</div>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
keyboardType="numeric"
|
keyboardType="numeric"
|
||||||
id="phoneNumber"
|
id="phoneNumber"
|
||||||
{...register("phoneNumber")}
|
{...register("phoneNumber")}
|
||||||
className="form-control form-control-sm"
|
className="form-control form-control-sm"
|
||||||
placeholder="Phone Number"
|
placeholder="Phone Number"
|
||||||
inputMode="numeric"
|
inputMode="numeric"
|
||||||
maxLength={10}
|
maxLength={10}
|
||||||
/>
|
/>
|
||||||
{errors.phoneNumber && (
|
{errors.phoneNumber && (
|
||||||
<div
|
<div
|
||||||
className="danger-text text-start"
|
className="danger-text text-start"
|
||||||
style={{ fontSize: "12px" }}
|
style={{ fontSize: "12px" }}
|
||||||
>
|
>
|
||||||
{errors.phoneNumber.message}
|
{errors.phoneNumber.message}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="row mb-3"></div>
|
<div className="row mb-3"></div>
|
||||||
<div className="row mb-3">
|
<div className="row mb-3">
|
||||||
<div className="col-sm-4">
|
<div className="col-sm-4">
|
||||||
<div className="form-text text-start">Gender</div>
|
<div className="form-text text-start">Gender</div>
|
||||||
|
|
||||||
<div className="input-group input-group-merge ">
|
<div className="input-group input-group-merge ">
|
||||||
<select
|
<select
|
||||||
className="form-select form-select-sm "
|
className="form-select form-select-sm "
|
||||||
{...register("gender")}
|
{...register("gender")}
|
||||||
id="gender"
|
id="gender"
|
||||||
aria-label=""
|
aria-label=""
|
||||||
>
|
>
|
||||||
<option disabled value="">
|
<option disabled value="">
|
||||||
Select Gender
|
Select Gender
|
||||||
</option>
|
</option>
|
||||||
<option value="Male">Male </option>
|
<option value="Male">Male </option>
|
||||||
<option value="Female">Female</option>
|
<option value="Female">Female</option>
|
||||||
<option value="Other">Other</option>
|
<option value="Other">Other</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
{errors.gender && (
|
{errors.gender && (
|
||||||
<div
|
<div
|
||||||
className="danger-text text-start"
|
className="danger-text text-start"
|
||||||
style={{ fontSize: "12px" }}
|
style={{ fontSize: "12px" }}
|
||||||
>
|
>
|
||||||
{errors.gender.message}
|
{errors.gender.message}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="col-sm-4">
|
<div className="col-sm-4">
|
||||||
<div className="form-text text-start">Birth Date</div>
|
<div className="form-text text-start">Birth Date</div>
|
||||||
|
|
||||||
<div className="input-group input-group-merge ">
|
<div className="input-group input-group-merge ">
|
||||||
<input
|
<input
|
||||||
className="form-control form-control-sm"
|
className="form-control form-control-sm"
|
||||||
type="date"
|
type="date"
|
||||||
{...register("birthDate")}
|
{...register("birthDate")}
|
||||||
id="birthDate"
|
id="birthDate"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
{errors.birthDate && (
|
{errors.birthDate && (
|
||||||
<div
|
<div
|
||||||
className="danger-text text-start"
|
className="danger-text text-start"
|
||||||
style={{ fontSize: "12px" }}
|
style={{ fontSize: "12px" }}
|
||||||
>
|
>
|
||||||
{errors.birthDate.message}
|
{errors.birthDate.message}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="col-sm-4">
|
<div className="col-sm-4">
|
||||||
<div className="form-text text-start">Joining Date</div>
|
<div className="form-text text-start">Joining Date</div>
|
||||||
|
|
||||||
<div className="input-group input-group-merge ">
|
<div className="input-group input-group-merge ">
|
||||||
<input
|
<input
|
||||||
className="form-control form-control-sm"
|
className="form-control form-control-sm"
|
||||||
type="date"
|
type="date"
|
||||||
{...register("joiningDate")}
|
{...register("joiningDate")}
|
||||||
id="joiningDate"
|
id="joiningDate"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
{errors.joiningDate && (
|
{errors.joiningDate && (
|
||||||
<div
|
<div
|
||||||
className="danger-text text-start"
|
className="danger-text text-start"
|
||||||
style={{ fontSize: "12px" }}
|
style={{ fontSize: "12px" }}
|
||||||
>
|
>
|
||||||
{errors.joiningDate.message}
|
{errors.joiningDate.message}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="row mb-3">
|
<div className="row mb-3">
|
||||||
<div className="col-sm-6">
|
<div className="col-sm-6">
|
||||||
<div className="form-text text-start">Current Address</div>
|
<div className="form-text text-start">Current Address</div>
|
||||||
|
|
||||||
<textarea
|
<textarea
|
||||||
id="currentAddress"
|
id="currentAddress"
|
||||||
className="form-control form-control-sm"
|
className="form-control form-control-sm"
|
||||||
placeholder="Current Address"
|
placeholder="Current Address"
|
||||||
aria-label="Current Address"
|
aria-label="Current Address"
|
||||||
aria-describedby="basic-icon-default-message2"
|
aria-describedby="basic-icon-default-message2"
|
||||||
{...register("currentAddress")}
|
{...register("currentAddress")}
|
||||||
maxLength={500}
|
maxLength={500}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
setCurrentAddressLength(e.target.value.length);
|
setCurrentAddressLength(e.target.value.length);
|
||||||
// let react-hook-form still handle it
|
// let react-hook-form still handle it
|
||||||
register("currentAddress").onChange(e);
|
register("currentAddress").onChange(e);
|
||||||
}}
|
}}
|
||||||
></textarea>
|
></textarea>
|
||||||
<div className="text-end muted">
|
<div className="text-end muted">
|
||||||
<small>
|
<small>
|
||||||
{" "}
|
{" "}
|
||||||
{500 - currentAddressLength} characters left
|
{500 - currentAddressLength} characters left
|
||||||
</small>
|
</small>
|
||||||
</div>
|
</div>
|
||||||
{errors.currentAddress && (
|
{errors.currentAddress && (
|
||||||
<div
|
<div
|
||||||
className="danger-text text-start"
|
className="danger-text text-start"
|
||||||
style={{ fontSize: "12px" }}
|
style={{ fontSize: "12px" }}
|
||||||
>
|
>
|
||||||
{errors.currentAddress.message}
|
{errors.currentAddress.message}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="col-sm-6">
|
<div className="col-sm-6">
|
||||||
<div className="form-text text-start">
|
<div className="form-text text-start">
|
||||||
Permanent Address
|
Permanent Address
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<textarea
|
<textarea
|
||||||
id="permanentAddress"
|
id="permanentAddress"
|
||||||
className="form-control form-control-sm"
|
className="form-control form-control-sm"
|
||||||
placeholder="Permanent Address"
|
placeholder="Permanent Address"
|
||||||
aria-label="Permanent Address"
|
aria-label="Permanent Address"
|
||||||
aria-describedby="basic-icon-default-message2"
|
aria-describedby="basic-icon-default-message2"
|
||||||
{...register("permanentAddress")}
|
{...register("permanentAddress")}
|
||||||
maxLength={500}
|
maxLength={500}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
setPermanentAddressLength(e.target.value.length);
|
setPermanentAddressLength(e.target.value.length);
|
||||||
register("permanentAddress").onChange(e);
|
register("permanentAddress").onChange(e);
|
||||||
}}
|
}}
|
||||||
></textarea>
|
></textarea>
|
||||||
<div className="text-end muted">
|
<div className="text-end muted">
|
||||||
<small>
|
<small>
|
||||||
{500 - permanentAddressLength} characters left
|
{500 - permanentAddressLength} characters left
|
||||||
</small>
|
</small>
|
||||||
</div>
|
</div>
|
||||||
{errors.permanentAddress && (
|
{errors.permanentAddress && (
|
||||||
<div
|
<div
|
||||||
className="danger-text text-start"
|
className="danger-text text-start"
|
||||||
style={{ fontSize: "12px" }}
|
style={{ fontSize: "12px" }}
|
||||||
>
|
>
|
||||||
{errors.permanentAddress.message}
|
{errors.permanentAddress.message}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="row mb-3">
|
<div className="row mb-3">
|
||||||
{" "}
|
{" "}
|
||||||
<div className="divider">
|
<div className="divider">
|
||||||
<div className="divider-text">Other Information</div>
|
<div className="divider-text">Other Information</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="row mb-3">
|
<div className="row mb-3">
|
||||||
<div className="col-sm-4">
|
<div className="col-sm-4">
|
||||||
<div className="form-text text-start">Role</div>
|
<div className="form-text text-start">Role</div>
|
||||||
<div className="input-group input-group-merge ">
|
<div className="input-group input-group-merge ">
|
||||||
<select
|
<select
|
||||||
className="form-select form-select-sm"
|
className="form-select form-select-sm"
|
||||||
{...register("jobRoleId")}
|
{...register("jobRoleId")}
|
||||||
id="jobRoleId"
|
id="jobRoleId"
|
||||||
aria-label=""
|
aria-label=""
|
||||||
>
|
>
|
||||||
<option disabled value="">
|
<option disabled value="">
|
||||||
Select Role
|
Select Role
|
||||||
</option>
|
</option>
|
||||||
{[...job_role]
|
{[...job_role]
|
||||||
.sort((a, b) => a?.name?.localeCompare(b.name))
|
.sort((a, b) => a?.name?.localeCompare(b.name))
|
||||||
.map((item) => (
|
.map((item) => (
|
||||||
<option value={item?.id} key={item.id}>
|
<option value={item?.id} key={item.id}>
|
||||||
{item?.name}{" "}
|
{item?.name}{" "}
|
||||||
</option>
|
</option>
|
||||||
))}
|
))}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
{errors.jobRoleId && (
|
{errors.jobRoleId && (
|
||||||
<div
|
<div
|
||||||
className="danger-text text-start"
|
className="danger-text text-start"
|
||||||
style={{ fontSize: "12px" }}
|
style={{ fontSize: "12px" }}
|
||||||
>
|
>
|
||||||
{errors.jobRoleId.message}
|
{errors.jobRoleId.message}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="col-sm-4">
|
<div className="col-sm-4">
|
||||||
<div className="form-text text-start">
|
<div className="form-text text-start">
|
||||||
Emergency Contact Person
|
Emergency Contact Person
|
||||||
</div>
|
</div>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
{...register("emergencyContactPerson")}
|
{...register("emergencyContactPerson")}
|
||||||
className="form-control form-control-sm"
|
className="form-control form-control-sm"
|
||||||
id="emergencyContactPerson"
|
id="emergencyContactPerson"
|
||||||
maxLength={50}
|
maxLength={50}
|
||||||
placeholder="Contact Person"
|
placeholder="Contact Person"
|
||||||
/>
|
/>
|
||||||
{errors.emergencyContactPerson && (
|
{errors.emergencyContactPerson && (
|
||||||
<div
|
<div
|
||||||
className="danger-text text-start"
|
className="danger-text text-start"
|
||||||
style={{ fontSize: "12px" }}
|
style={{ fontSize: "12px" }}
|
||||||
>
|
>
|
||||||
{errors.emergencyContactPerson.message}
|
{errors.emergencyContactPerson.message}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="col-sm-4">
|
<div className="col-sm-4">
|
||||||
<div className="form-text text-start">
|
<div className="form-text text-start">
|
||||||
Emergency Phone Number
|
Emergency Phone Number
|
||||||
</div>
|
</div>
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
{...register("emergencyPhoneNumber")}
|
{...register("emergencyPhoneNumber")}
|
||||||
className="form-control form-control-sm phone-mask"
|
className="form-control form-control-sm phone-mask"
|
||||||
id="emergencyPhoneNumber"
|
id="emergencyPhoneNumber"
|
||||||
placeholder="Phone Number"
|
placeholder="Phone Number"
|
||||||
inputMode="numeric"
|
inputMode="numeric"
|
||||||
maxLength={10}
|
maxLength={10}
|
||||||
/>
|
/>
|
||||||
{errors.emergencyPhoneNumber && (
|
{errors.emergencyPhoneNumber && (
|
||||||
<div
|
<div
|
||||||
className="danger-text text-start"
|
className="danger-text text-start"
|
||||||
style={{ fontSize: "12px" }}
|
style={{ fontSize: "12px" }}
|
||||||
>
|
>
|
||||||
{errors.emergencyPhoneNumber.message}
|
{errors.emergencyPhoneNumber.message}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="row mb-3 d-none">
|
<div className="row mb-3 d-none">
|
||||||
<div className="col-sm-6">
|
<div className="col-sm-6">
|
||||||
<div className="form-text text-start">AADHAR Number</div>
|
<div className="form-text text-start">AADHAR Number</div>
|
||||||
|
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
{...register("aadharNumber")}
|
{...register("aadharNumber")}
|
||||||
className="form-control form-control-sm"
|
className="form-control form-control-sm"
|
||||||
id="aadharNumber"
|
id="aadharNumber"
|
||||||
placeholder="AADHAR Number"
|
placeholder="AADHAR Number"
|
||||||
maxLength={12}
|
maxLength={12}
|
||||||
inputMode="numeric"
|
inputMode="numeric"
|
||||||
/>
|
/>
|
||||||
{errors.aadharNumber && (
|
{errors.aadharNumber && (
|
||||||
<div className="danger-text text-start">
|
<div className="danger-text text-start">
|
||||||
{errors.aadharNumber.message}
|
{errors.aadharNumber.message}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="col-sm-6 d-none">
|
<div className="col-sm-6 d-none">
|
||||||
<div className="form-text text-start">PAN Number</div>
|
<div className="form-text text-start">PAN Number</div>
|
||||||
|
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
{...register("panNumber")}
|
{...register("panNumber")}
|
||||||
className="form-control form-control-sm"
|
className="form-control form-control-sm"
|
||||||
id="panNumber"
|
id="panNumber"
|
||||||
placeholder="PAN Number"
|
placeholder="PAN Number"
|
||||||
maxLength={10}
|
maxLength={10}
|
||||||
/>
|
/>
|
||||||
{errors.panNumber && (
|
{errors.panNumber && (
|
||||||
<div
|
<div
|
||||||
className="danger-text text-start"
|
className="danger-text text-start"
|
||||||
style={{ fontSize: "12px" }}
|
style={{ fontSize: "12px" }}
|
||||||
>
|
>
|
||||||
{errors.panNumber.message}
|
{errors.panNumber.message}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{employeeId && (
|
{employeeId && (
|
||||||
<div className="row mb-3 d-none">
|
<div className="row mb-3 d-none">
|
||||||
<div className="col-sm-12">
|
<div className="col-sm-12">
|
||||||
<input type="text" name="id" {...register("id")} />
|
<input type="text" name="id" {...register("id")} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<div className="row justify-content-start">
|
<div className="row justify-content-start">
|
||||||
<div className="col-sm-12">
|
<div className="col-sm-12">
|
||||||
<button
|
<button
|
||||||
aria-label="manage employee"
|
aria-label="manage employee"
|
||||||
type="submit"
|
type="submit"
|
||||||
className="btn btn-sm btn-primary"
|
className="btn btn-sm btn-primary"
|
||||||
disabled={isloading}
|
disabled={isloading}
|
||||||
>
|
>
|
||||||
{isloading
|
{isloading
|
||||||
? "Please Wait..."
|
? "Please Wait..."
|
||||||
: employeeId
|
: employeeId
|
||||||
? "Update"
|
? "Update"
|
||||||
: "Create"}
|
: "Create"}
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
<button
|
||||||
|
aria-label="manage employee"
|
||||||
|
type="reset"
|
||||||
|
className="btn btn-sm btn-primary ms-2"
|
||||||
|
disabled={isloading}
|
||||||
|
>
|
||||||
|
Clear
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
|
||||||
<button
|
|
||||||
aria-label="manage employee"
|
|
||||||
type="reset"
|
|
||||||
className="btn btn-sm btn-primary ms-2"
|
|
||||||
disabled={isloading}
|
|
||||||
>
|
|
||||||
Clear
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -112,7 +112,7 @@ const TaskPlannng = () => {
|
|||||||
<Breadcrumb
|
<Breadcrumb
|
||||||
data={[
|
data={[
|
||||||
{ label: "Home", link: "/dashboard" },
|
{ label: "Home", link: "/dashboard" },
|
||||||
{ label: "Daily Task Planning", link: "/activities/task" },
|
{ label: "Daily Task Planning" }
|
||||||
]}
|
]}
|
||||||
></Breadcrumb>
|
></Breadcrumb>
|
||||||
{project_listLoader && <p>Loading..</p>}
|
{project_listLoader && <p>Loading..</p>}
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user