remove minor error while code review

This commit is contained in:
Vikas Nale 2025-05-07 13:16:02 +05:30
parent 978c7b8e4b
commit 130fffcc16
3 changed files with 17 additions and 19 deletions

View File

@ -84,7 +84,7 @@ const AttendLogs = ({ Id }) => {
document.querySelectorAll('[data-bs-toggle="tooltip"]')
);
tooltipTriggerList.forEach((el) => new bootstrap.Tooltip(el));
}, [] );
}, []);
return (
<div className="table-responsive">
<div className="text-start">
@ -106,13 +106,12 @@ const AttendLogs = ({ Id }) => {
<table className="table table-sm mb-0">
<thead>
<tr>
<th >Date</th>
<th >Time</th>
<th >Activity</th>
<th >Location</th>
<th >Recored By</th>
<th >Description</th>
<th>Date</th>
<th>Time</th>
<th>Activity</th>
<th>Location</th>
<th>Recored By</th>
<th>Description</th>
</tr>
</thead>
<tbody>
@ -127,7 +126,7 @@ const AttendLogs = ({ Id }) => {
<td>
{log?.latitude != 0 ? (
<i
class="bx bx-location-plus text-danger cursor-pointer"
className="bx bx-location-plus text-danger cursor-pointer"
data-bs-toggle="tooltip"
data-bs-offset="0,8"
data-bs-placement="top"
@ -141,13 +140,14 @@ const AttendLogs = ({ Id }) => {
"--"
)}
</td>
<td className="text-wrap" >
{`${logs[0]?.updatedByEmployee?.firstName ?? ''} ${logs[0]?.updatedByEmployee?.lastName ?? ''}`}
<td className="text-wrap">
{`${logs[0]?.updatedByEmployee?.firstName ?? ""} ${
logs[0]?.updatedByEmployee?.lastName ?? ""
}`}
</td>
<td className="text-wrap" colSpan={3} >
<td className="text-wrap" colSpan={3}>
{log?.comment || "--"}
</td>
</tr>
))}
</tbody>

View File

@ -62,7 +62,7 @@ const AttendancePage = () => {
modalElement.classList.remove("show");
modalElement.style.display = "none";
document.body.classList.remove("modal-open");
document.querySelector(".modal-backdrop").remove();
document.querySelector(".modal-backdrop")?.remove();
}
};
@ -93,11 +93,10 @@ const AttendancePage = () => {
}, [modelConfig, isCreateModalOpen]);
useEffect(() => {
setAttendances(attendance);
}, [ attendance ] );
}, [attendance]);
useEffect(() => {
if (selectedProject === 1 || selectedProject === undefined ) {
if (selectedProject === 1 || selectedProject === undefined) {
dispatch(setProjectId(loginUser?.projects[0]));
}
}, [selectedProject, loginUser?.projects]);
@ -108,7 +107,7 @@ const AttendancePage = () => {
className="modal fade show"
style={{ display: "block" }}
id="check-Out-modal"
tabindex="-1"
tabIndex="-1"
aria-hidden="true"
>
<AttendanceModel

View File

@ -200,7 +200,6 @@ const DailyTask = () => {
task.assignmentDate.includes(date)
).map((task, index) => {
const refIndex = index * 10 + i;
console.log(refIndex);
return (
<React.Fragment key={index}>
<tr>