Update attendance report display
This commit is contained in:
@@ -993,40 +993,16 @@
|
|||||||
opacity: 0.8;
|
opacity: 0.8;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Location accuracy level colors - based on distance */
|
/* Location accuracy level colors - 2-level system based on 0.5 mile threshold */
|
||||||
.location-accuracy-badge.accuracy-excellent {
|
|
||||||
background: var(--success-light);
|
|
||||||
color: var(--success-color);
|
|
||||||
border: 1px solid rgba(5, 150, 105, 0.3);
|
|
||||||
}
|
|
||||||
|
|
||||||
.location-accuracy-badge.accuracy-accurate {
|
.location-accuracy-badge.accuracy-accurate {
|
||||||
background: var(--success-light);
|
background: #dcfce7;
|
||||||
color: var(--success-color);
|
|
||||||
border: 1px solid rgba(5, 150, 105, 0.3);
|
|
||||||
}
|
|
||||||
|
|
||||||
.location-accuracy-badge.accuracy-good {
|
|
||||||
background: #ecfdf5;
|
|
||||||
color: #059669;
|
color: #059669;
|
||||||
border: 1px solid rgba(5, 150, 105, 0.2);
|
border: 1px solid rgba(5, 150, 105, 0.3);
|
||||||
}
|
|
||||||
|
|
||||||
.location-accuracy-badge.accuracy-fair {
|
|
||||||
background: var(--warning-light);
|
|
||||||
color: var(--warning-color);
|
|
||||||
border: 1px solid rgba(245, 158, 11, 0.3);
|
|
||||||
}
|
|
||||||
|
|
||||||
.location-accuracy-badge.accuracy-poor {
|
|
||||||
background: var(--danger-light);
|
|
||||||
color: var(--danger-color);
|
|
||||||
border: 1px solid rgba(220, 38, 38, 0.3);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.location-accuracy-badge.accuracy-inaccurate {
|
.location-accuracy-badge.accuracy-inaccurate {
|
||||||
background: var(--danger-light);
|
background: #fee2e2;
|
||||||
color: var(--danger-color);
|
color: #dc2626;
|
||||||
border: 1px solid rgba(220, 38, 38, 0.3);
|
border: 1px solid rgba(220, 38, 38, 0.3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -657,16 +657,14 @@ function extractLocationAccuracy(cell) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function extractLocationAccuracyLevel(cell) {
|
function extractLocationAccuracyLevel(cell) {
|
||||||
const text = cell.textContent.toLowerCase();
|
// Get the numerical accuracy value from the cell
|
||||||
if (
|
const accuracy = extractLocationAccuracy(cell);
|
||||||
text.includes("high") ||
|
|
||||||
text.includes("excellent") ||
|
// Return 2-level accuracy based on 0.5-mile threshold
|
||||||
text.includes("good")
|
if (accuracy !== null && accuracy !== undefined) {
|
||||||
)
|
return accuracy <= 0.5 ? "accurate" : "inaccurate";
|
||||||
return "High";
|
}
|
||||||
if (text.includes("medium") || text.includes("fair")) return "Medium";
|
return "unknown";
|
||||||
if (text.includes("low") || text.includes("poor")) return "Low";
|
|
||||||
return "Unknown";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function createTableRow(record, displayIndex) {
|
function createTableRow(record, displayIndex) {
|
||||||
@@ -690,17 +688,17 @@ function createTableRow(record, displayIndex) {
|
|||||||
}"
|
}"
|
||||||
title="Distance between QR location and check-in location: ${
|
title="Distance between QR location and check-in location: ${
|
||||||
record.location_accuracy
|
record.location_accuracy
|
||||||
} miles">
|
} miles - ${record.accuracy_level}">
|
||||||
<i class="fas fa-ruler"></i>
|
<i class="fas fa-ruler"></i>
|
||||||
${record.location_accuracy.toFixed(3)} mi
|
${record.location_accuracy.toFixed(3)} mi
|
||||||
<small>(${record.accuracy_level})</small>
|
<small>(${record.accuracy_level})</small>
|
||||||
</span>`
|
</span>`
|
||||||
: `<span class="location-accuracy-badge accuracy-unknown" title="Location accuracy could not be calculated">
|
: `<span class="location-accuracy-badge accuracy-unknown" title="Location accuracy could not be calculated">
|
||||||
<i class="fas fa-question-circle"></i>
|
<i class="fas fa-question-circle"></i>
|
||||||
Unknown
|
Unknown
|
||||||
</span>`;
|
</span>`;
|
||||||
|
|
||||||
// FIXED: Address display logic based on location accuracy
|
// Address display logic based on location accuracy
|
||||||
let addressDisplayHTML = "";
|
let addressDisplayHTML = "";
|
||||||
let addressToShow = record.checked_in_address;
|
let addressToShow = record.checked_in_address;
|
||||||
let addressIcon = "fas fa-location-arrow";
|
let addressIcon = "fas fa-location-arrow";
|
||||||
|
|||||||
Reference in New Issue
Block a user