Merge branch 'Issues_Oct_4W_V1' of https://git.marcoaiot.com/admin/marco.pms.web into Kartik_Bug#1496
This commit is contained in:
commit
d4d07803f6
@ -123,12 +123,15 @@ const AttendLogs = ({ Id }) => {
|
|||||||
}, []);
|
}, []);
|
||||||
return (
|
return (
|
||||||
<div className="table-responsive">
|
<div className="table-responsive">
|
||||||
<div className="text-start">
|
<div className="mb-3">
|
||||||
|
<h5 className="mb-4">Attendance Logs</h5>
|
||||||
{logs && !loading && (
|
{logs && !loading && (
|
||||||
<p>
|
<p className="mb-0 text-start">
|
||||||
Attendance logs for{" "}
|
Showing logs for{" "}
|
||||||
{logs[0]?.employee?.firstName + " " + logs[0]?.employee?.lastName}{" "}
|
<strong>
|
||||||
on {formatUTCToLocalTime(logs[0]?.activityTime)}
|
{logs[0]?.employee?.firstName + " " + logs[0]?.employee?.lastName}
|
||||||
|
</strong>{" "}
|
||||||
|
on <strong>{formatUTCToLocalTime(logs[0]?.activityTime)}</strong>
|
||||||
</p>
|
</p>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
@ -142,9 +145,9 @@ const AttendLogs = ({ Id }) => {
|
|||||||
<table className="table table-sm mb-0">
|
<table className="table table-sm mb-0">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
<th>Activity</th>
|
||||||
<th>Date</th>
|
<th>Date</th>
|
||||||
<th>Time</th>
|
<th>Time</th>
|
||||||
<th>Activity</th>
|
|
||||||
<th>Location</th>
|
<th>Location</th>
|
||||||
<th>Recored By</th>
|
<th>Recored By</th>
|
||||||
<th>Description</th>
|
<th>Description</th>
|
||||||
@ -156,11 +159,16 @@ const AttendLogs = ({ Id }) => {
|
|||||||
.sort((a, b) => b.id - a.id)
|
.sort((a, b) => b.id - a.id)
|
||||||
.map((log, index) => (
|
.map((log, index) => (
|
||||||
<tr key={index}>
|
<tr key={index}>
|
||||||
<td>{formatUTCToLocalTime(log.activityTime)}</td>
|
|
||||||
<td>{convertShortTime(log.activityTime)}</td>
|
|
||||||
<td>
|
<td>
|
||||||
{whichActivityPerform(log.activity, log.activityTime)}
|
{whichActivityPerform(log.activity, log.activityTime)}
|
||||||
</td>
|
</td>
|
||||||
|
<td>
|
||||||
|
<div className="py-2">
|
||||||
|
{formatUTCToLocalTime(log.activityTime)}
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td>{convertShortTime(log.activityTime)}</td>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
{log?.latitude != 0 ? (
|
{log?.latitude != 0 ? (
|
||||||
<i
|
<i
|
||||||
@ -179,9 +187,8 @@ const AttendLogs = ({ Id }) => {
|
|||||||
)}
|
)}
|
||||||
</td>
|
</td>
|
||||||
<td className="text-wrap">
|
<td className="text-wrap">
|
||||||
{`${log?.updatedByEmployee?.firstName ?? ""} ${
|
{`${log?.updatedByEmployee?.firstName ?? ""} ${log?.updatedByEmployee?.lastName ?? ""
|
||||||
log?.updatedByEmployee?.lastName ?? ""
|
}`}
|
||||||
}`}
|
|
||||||
</td>
|
</td>
|
||||||
<td className="text-wrap" colSpan={3}>
|
<td className="text-wrap" colSpan={3}>
|
||||||
{log?.comment?.length > 50
|
{log?.comment?.length > 50
|
||||||
|
|||||||
@ -110,25 +110,32 @@ const Attendance = ({ getRole, handleModalData, searchTerm, projectId, organizat
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
<div className="d-flex justify-content-between align-items-center py-2 px-2">
|
||||||
|
{/* Left side - Date */}
|
||||||
|
<div className="text-start">
|
||||||
|
<strong>Date: {formatUTCToLocalTime(todayDate)}</strong>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Right side - Pending Attendance toggle */}
|
||||||
|
<div className="form-check form-switch m-0">
|
||||||
|
<input
|
||||||
|
type="checkbox"
|
||||||
|
className="form-check-input"
|
||||||
|
role="switch"
|
||||||
|
id="inactiveEmployeesCheckbox"
|
||||||
|
disabled={isFetching}
|
||||||
|
checked={ShowPending}
|
||||||
|
onChange={(e) => setShowPending(e.target.checked)}
|
||||||
|
/>
|
||||||
|
<label className="form-check-label" htmlFor="inactiveEmployeesCheckbox">
|
||||||
|
Pending Attendance
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div
|
<div
|
||||||
className="table-responsive text-nowrap h-100"
|
className="table-responsive text-nowrap h-100"
|
||||||
style={{ minHeight: "200px" }} // Ensures fixed height
|
style={{ minHeight: "200px" }} // Ensures fixed height
|
||||||
>
|
>
|
||||||
<div className="d-flex text-start align-items-center py-2">
|
|
||||||
<strong>Date : {formatUTCToLocalTime(todayDate)}</strong>
|
|
||||||
<div className="form-check form-switch text-start m-0 ms-5">
|
|
||||||
<input
|
|
||||||
type="checkbox"
|
|
||||||
className="form-check-input"
|
|
||||||
role="switch"
|
|
||||||
id="inactiveEmployeesCheckbox"
|
|
||||||
disabled={isFetching}
|
|
||||||
checked={ShowPending}
|
|
||||||
onChange={(e) => setShowPending(e.target.checked)}
|
|
||||||
/>
|
|
||||||
<label className="form-check-label ms-0">Pending Attendance</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{attLoading ? (
|
{attLoading ? (
|
||||||
<div>Loading...</div>
|
<div>Loading...</div>
|
||||||
) : currentItems?.length > 0 ? (
|
) : currentItems?.length > 0 ? (
|
||||||
|
|||||||
@ -174,37 +174,38 @@ const AttendanceLog = ({ handleModalData, searchTerm, organizationId }) => {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div
|
<div
|
||||||
className="dataTables_length text-start py-2 d-flex flex-wrap justify-content-between"
|
className="dataTables_length text-start py-2 d-flex flex-wrap justify-content-between align-items-center"
|
||||||
id="DataTables_Table_0_length"
|
id="DataTables_Table_0_length"
|
||||||
>
|
>
|
||||||
<div className="d-flex flex-wrap align-items-center gap-2 gap-md-3 my-0">
|
{/* Left Side - Date Picker */}
|
||||||
{/* Date Range Picker */}
|
<div className="d-flex align-items-center">
|
||||||
<div className="flex-grow-1 flex-md-grow-0">
|
<DateRangePicker
|
||||||
<DateRangePicker
|
onRangeChange={setDateRange}
|
||||||
onRangeChange={setDateRange}
|
defaultStartDate={yesterday}
|
||||||
defaultStartDate={yesterday}
|
/>
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* Pending Attendance Switch */}
|
|
||||||
<div className="form-check form-switch text-start mb-0">
|
|
||||||
<input
|
|
||||||
type="checkbox"
|
|
||||||
className="form-check-input"
|
|
||||||
role="switch"
|
|
||||||
id="inactiveEmployeesCheckbox"
|
|
||||||
disabled={isFetching}
|
|
||||||
checked={showPending}
|
|
||||||
onChange={(e) => setShowPending(e.target.checked)}
|
|
||||||
/>
|
|
||||||
<label className="form-check-label ms-0 ms-md-0">
|
|
||||||
Pending Attendance
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{/* Right Side - Pending Attendance Switch */}
|
||||||
|
<div className="form-check form-switch d-flex align-items-center mb-2">
|
||||||
|
<input
|
||||||
|
type="checkbox"
|
||||||
|
className="form-check-input"
|
||||||
|
role="switch"
|
||||||
|
id="inactiveEmployeesCheckbox"
|
||||||
|
disabled={isFetching}
|
||||||
|
checked={showPending}
|
||||||
|
onChange={(e) => setShowPending(e.target.checked)}
|
||||||
|
/>
|
||||||
|
<label
|
||||||
|
className="form-check-label ms-2"
|
||||||
|
htmlFor="inactiveEmployeesCheckbox"
|
||||||
|
>
|
||||||
|
Pending Attendance
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div
|
<div
|
||||||
className="table-responsive text-nowrap"
|
className="table-responsive text-nowrap"
|
||||||
style={{ minHeight: "200px" }}
|
style={{ minHeight: "200px" }}
|
||||||
@ -255,7 +256,7 @@ const AttendanceLog = ({ handleModalData, searchTerm, organizationId }) => {
|
|||||||
className="table-row-header"
|
className="table-row-header"
|
||||||
>
|
>
|
||||||
<td colSpan={8} className="text-start">
|
<td colSpan={8} className="text-start">
|
||||||
<strong>
|
<strong className="d-inline-block my-1 ms-2">
|
||||||
{moment(currentDate).format("DD-MM-YYYY")}
|
{moment(currentDate).format("DD-MM-YYYY")}
|
||||||
</strong>
|
</strong>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@ -124,7 +124,7 @@ const ExpenseList = ({ filters, groupBy = "transactionDate", searchText }) => {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: "expensesType",
|
key: "expensesType",
|
||||||
label: "Expense Type",
|
label: "Expense Category",
|
||||||
getValue: (e) => e.expensesType?.name || "N/A",
|
getValue: (e) => e.expensesType?.name || "N/A",
|
||||||
align: "text-start",
|
align: "text-start",
|
||||||
},
|
},
|
||||||
@ -267,10 +267,10 @@ const ExpenseList = ({ filters, groupBy = "transactionDate", searchText }) => {
|
|||||||
<td colSpan={8} className="text-start">
|
<td colSpan={8} className="text-start">
|
||||||
<div className="d-flex align-items-center">
|
<div className="d-flex align-items-center">
|
||||||
{" "}
|
{" "}
|
||||||
<small className="fs-6 py-1">
|
<small className="fs-6 ms-2 py-1">
|
||||||
{displayField} :{" "}
|
{displayField} :{" "}
|
||||||
</small>{" "}
|
</small>{" "}
|
||||||
<small className="fs-6 ms-3">
|
<small className="fs-6 ms-3">
|
||||||
{IsGroupedByDate
|
{IsGroupedByDate
|
||||||
? formatUTCToLocalTime(key)
|
? formatUTCToLocalTime(key)
|
||||||
: key}
|
: key}
|
||||||
|
|||||||
@ -179,7 +179,7 @@ const AttendancePage = () => {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Search + Organization filter */}
|
{/* Search + Organization filter */}
|
||||||
<div className="col-12 col-md-auto mt-2 mt-md-0 ms-md-auto">
|
<div className="col-12 col-md-auto pb-2 m-0 mt-md-0 ms-md-auto nav-tabs">
|
||||||
<div className="row g-2">
|
<div className="row g-2">
|
||||||
<div className="col-12 col-sm-6">
|
<div className="col-12 col-sm-6">
|
||||||
<select
|
<select
|
||||||
|
|||||||
@ -115,7 +115,7 @@ const ExpensePage = () => {
|
|||||||
{IsViewAll || IsViewSelf || IsCreatedAble ? (
|
{IsViewAll || IsViewSelf || IsCreatedAble ? (
|
||||||
<>
|
<>
|
||||||
<div className="card my-3 px-sm-4 px-0">
|
<div className="card my-3 px-sm-4 px-0">
|
||||||
<div className="card-body py-2 px-3">
|
<div className="card-body py-2 px-3 me-n1">
|
||||||
<div className="row align-items-center">
|
<div className="row align-items-center">
|
||||||
<div className="col-6">
|
<div className="col-6">
|
||||||
<input
|
<input
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user