“NA” Should Be Displayed When Employee Has No Email Instead of “–”
This commit is contained in:
parent
12b632f087
commit
30267e779b
@ -149,7 +149,7 @@ const Documents = ({ Document_Entity, Entity }) => {
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div className="col-6 col-md-6 col-lg-8 text-end">
|
||||
<div className="col-12 col-md-6 col-lg-8 text-end">
|
||||
{(isSelf || canUploadDocument) && (
|
||||
<button
|
||||
className="btn btn-sm btn-primary me-3"
|
||||
|
@ -51,7 +51,6 @@ const EmpAttendance = () => {
|
||||
new Date(b?.checkInTime).getTime() - new Date(a?.checkInTime).getTime()
|
||||
);
|
||||
|
||||
console.log(sorted);
|
||||
|
||||
const { currentPage, totalPages, currentItems, paginate } = usePagination(
|
||||
sorted,
|
||||
|
@ -176,11 +176,9 @@ const EmployeeList = () => {
|
||||
useEffect(() => {
|
||||
if (!loading && Array.isArray(employees)) {
|
||||
const sorted = [...employees].sort((a, b) => {
|
||||
const nameA = `${a.firstName || ""}${a.middleName || ""}${
|
||||
a.lastName || ""
|
||||
const nameA = `${a.firstName || ""}${a.middleName || ""}${a.lastName || ""
|
||||
}`.toLowerCase();
|
||||
const nameB = `${b.firstName || ""}${b.middleName || ""}${
|
||||
b.lastName || ""
|
||||
const nameB = `${b.firstName || ""}${b.middleName || ""}${b.lastName || ""
|
||||
}`.toLowerCase();
|
||||
return nameA?.localeCompare(nameB);
|
||||
});
|
||||
@ -258,8 +256,7 @@ const EmployeeList = () => {
|
||||
? "Suspend Employee"
|
||||
: "Reactivate Employee"
|
||||
}
|
||||
message={`Are you sure you want to ${
|
||||
selectedEmpFordelete?.isActive ? "suspend" : "reactivate"
|
||||
message={`Are you sure you want to ${selectedEmpFordelete?.isActive ? "suspend" : "reactivate"
|
||||
} this employee?`}
|
||||
onSubmit={(id) =>
|
||||
suspendEmployee({
|
||||
@ -471,8 +468,7 @@ const EmployeeList = () => {
|
||||
Status
|
||||
</th>
|
||||
<th
|
||||
className={`sorting_disabled ${
|
||||
!Manage_Employee && "d-none"
|
||||
className={`sorting_disabled ${!Manage_Employee && "d-none"
|
||||
}`}
|
||||
rowSpan="1"
|
||||
colSpan="1"
|
||||
@ -549,11 +545,10 @@ const EmployeeList = () => {
|
||||
{item.email}
|
||||
</span>
|
||||
) : (
|
||||
<span className="text-truncate text-italic">
|
||||
-
|
||||
</span>
|
||||
<span className="d-block text-start text-muted fst-italic">NA</span>
|
||||
)}
|
||||
</td>
|
||||
|
||||
<td className="text-start d-none d-sm-table-cell">
|
||||
<span className="text-truncate">
|
||||
<i className="bx bxs-phone-call text-primary me-2"></i>
|
||||
@ -568,8 +563,13 @@ const EmployeeList = () => {
|
||||
</td>
|
||||
|
||||
<td className="d-none d-md-table-cell">
|
||||
{moment(item.joiningDate)?.format("DD-MMM-YYYY")}
|
||||
{item.joiningDate ? (
|
||||
moment(item.joiningDate).format("DD-MMM-YYYY")
|
||||
) : (
|
||||
<span className="d-block text-center text-muted fst-italic">NA</span>
|
||||
)}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{showInactive ? (
|
||||
<span
|
||||
|
Loading…
x
Reference in New Issue
Block a user