- navigate(
- `/employee/${item.id}?for=attendance`
- )
+ navigate(`/employee/${item.id}`)
}
className="text-heading text-truncate cursor-pointer"
>
@@ -594,10 +594,9 @@ useEffect(() => {
{item.jobRole || "Not Assign Yet"}
+
- {item.joiningDate
- ? moment(item.joiningDate).format("DD-MMM-YYYY")
- : "NA"}
+ {moment(item.joiningDate)?.format("DD-MMM-YYYY")}
|
{showInactive ? (
@@ -626,47 +625,56 @@ useEffect(() => {
+ {/* View always visible */}
-
- {!item.isSystem && (
+
+ {/* If ACTIVE employee */}
+ {item.isActive && (
<>
+
+ {/* Suspend only when active */}
+ {item.isActive && (
+
+ )}
+
+
>
)}
+
+ {/* If INACTIVE employee AND inactive toggle is ON */}
+ {!item.isActive && showInactive && (
+
+ )}
|
@@ -683,9 +691,8 @@ useEffect(() => {