Revert "Enhance attendance report"

This reverts commit c07b815b78.
This commit is contained in:
Nguyen Ngo
2025-08-01 12:50:36 -04:00
parent c07b815b78
commit c6abd4521b
6 changed files with 1425 additions and 1889 deletions
+121 -374
View File
@@ -1,3 +1,8 @@
/**
* Attendance Report Page Styles
* static/css/attendance.css
*/
/* Page Container */
.attendance-page {
max-width: 1400px;
@@ -104,43 +109,7 @@
}
.stat-card.warning::before {
background: linear-gradient(90deg, var(--warning-color), #d97706);
}
.stat-card.danger::before {
background: linear-gradient(90deg, var(--danger-color), #b91c1c);
}
/* NEW: Enhanced Statistics Card for Location Data */
.stat-card.location-stats {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
border: none;
}
.stat-card.location-stats::before {
background: linear-gradient(90deg, #667eea, #764ba2);
}
.stat-card.location-stats .stat-icon {
background: rgba(255, 255, 255, 0.2);
color: white;
border: 2px solid rgba(255, 255, 255, 0.3);
}
.stat-card.location-stats .stat-content h3 {
color: white;
}
.stat-card.location-stats .stat-content p {
color: rgba(255, 255, 255, 0.9);
}
.stat-card.location-stats .stat-content small {
color: rgba(255, 255, 255, 0.8);
font-size: 0.75rem;
display: block;
margin-top: 4px;
background: linear-gradient(90deg, var(--warning-color), #b45309);
}
.stat-card:hover {
@@ -160,24 +129,20 @@
flex-shrink: 0;
}
.stat-icon.primary {
.stat-card.primary .stat-icon {
background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
}
.stat-icon.success {
.stat-card.success .stat-icon {
background: linear-gradient(135deg, var(--success-color), #047857);
}
.stat-icon.info {
.stat-card.info .stat-icon {
background: linear-gradient(135deg, var(--info-color), #0369a1);
}
.stat-icon.warning {
background: linear-gradient(135deg, var(--warning-color), #d97706);
}
.stat-icon.danger {
background: linear-gradient(135deg, var(--danger-color), #b91c1c);
.stat-card.warning .stat-icon {
background: linear-gradient(135deg, var(--warning-color), #b45309);
}
.stat-content {
@@ -189,13 +154,20 @@
font-weight: 700;
color: var(--gray-900);
margin-bottom: var(--spacing-1);
line-height: 1;
}
.stat-content p {
color: var(--gray-600);
font-size: var(--font-size-base);
margin-bottom: var(--spacing-1);
font-weight: 500;
}
.stat-trend {
font-size: var(--font-size-sm);
color: var(--gray-500);
margin: 0;
font-weight: 500;
font-style: italic;
}
/* Filters Section */
@@ -211,7 +183,7 @@
}
.filters-header {
padding: var(--spacing-6) var(--spacing-6) var(--spacing-4);
padding: var(--spacing-6);
border-bottom: 1px solid var(--gray-200);
background: var(--gray-50);
}
@@ -230,11 +202,14 @@
color: var(--primary-color);
}
.filters-form {
padding: var(--spacing-6);
}
.filter-row {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: var(--spacing-4);
padding: var(--spacing-6);
align-items: end;
}
@@ -245,9 +220,9 @@
}
.filter-group label {
font-size: var(--font-size-sm);
font-weight: 600;
color: var(--gray-700);
font-size: var(--font-size-sm);
display: flex;
align-items: center;
gap: var(--spacing-2);
@@ -315,12 +290,6 @@
color: var(--primary-color);
}
.record-count {
font-size: 14px;
color: #6c757d;
font-weight: normal;
}
.table-controls {
display: flex;
align-items: center;
@@ -385,46 +354,12 @@
font-size: var(--font-size-xs);
}
/* NEW: Enhanced Table Styles for Location Columns */
.attendance-table th:nth-child(7),
.attendance-table th:nth-child(8),
.attendance-table th:nth-child(9),
.attendance-table th:nth-child(10) {
background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
border-left: 2px solid #667eea;
position: relative;
}
.attendance-table th:nth-child(7)::before {
content: "📍";
position: absolute;
left: 4px;
top: 50%;
transform: translateY(-50%);
font-size: 10px;
}
.attendance-table th[onclick*="sortTable(6)"] i,
.attendance-table th[onclick*="sortTable(7)"] i,
.attendance-table th[onclick*="sortTable(8)"] i,
.attendance-table th[onclick*="sortTable(9)"] i {
color: #667eea;
}
.attendance-table td {
padding: var(--spacing-4) var(--spacing-3);
border-bottom: 1px solid var(--gray-200);
vertical-align: middle;
}
.attendance-table td:nth-child(7),
.attendance-table td:nth-child(8),
.attendance-table td:nth-child(9),
.attendance-table td:nth-child(10) {
background: rgba(102, 126, 234, 0.02);
border-left: 1px solid #e5e7eb;
}
.attendance-table tbody tr {
transition: var(--transition);
}
@@ -433,20 +368,6 @@
background: var(--gray-50);
}
.attendance-table tbody tr:hover .location-data,
.attendance-table tbody tr:hover .accuracy-badge,
.attendance-table tbody tr:hover .location-indicator {
transform: scale(1.02);
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.attendance-table tbody tr:focus,
.attendance-table tbody tr:focus-within {
background: rgba(102, 126, 234, 0.1) !important;
outline: 2px solid #667eea;
outline-offset: -2px;
}
/* Table Cell Content */
.employee-info {
display: flex;
@@ -509,129 +430,6 @@
color: var(--info-color);
}
/* NEW: Location Data Specific Styles */
.location-data {
font-family: 'Courier New', monospace;
font-size: 11px;
color: #495057;
background: #f8f9fa;
padding: 4px 6px;
border-radius: 4px;
margin: 2px 0;
border: 1px solid #e9ecef;
}
.coordinates {
display: block;
line-height: 1.3;
white-space: nowrap;
}
.accuracy-badge {
display: inline-block;
padding: 2px 6px;
border-radius: 10px;
font-size: 10px;
font-weight: 600;
text-transform: uppercase;
margin-top: 2px;
border: 1px solid transparent;
}
.accuracy-high {
background: #d4f4dd;
color: #166534;
border-color: #166534;
}
.accuracy-medium {
background: #fef3c7;
color: #92400e;
border-color: #92400e;
}
.accuracy-low {
background: #fee2e2;
color: #991b1b;
border-color: #991b1b;
}
.location-indicator {
display: inline-flex;
align-items: center;
gap: 4px;
padding: 3px 8px;
border-radius: 12px;
font-size: 10px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.5px;
border: 1px solid transparent;
}
.has-gps {
background: #d4f4dd;
color: #166534;
border-color: #166534;
}
.has-gps i {
color: #10b981;
}
.no-gps {
background: #fee2e2;
color: #991b1b;
border-color: #991b1b;
}
.no-gps i {
color: #ef4444;
}
.address-info {
font-size: 11px;
color: #6c757d;
max-width: 150px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
margin-top: 2px;
padding: 2px 4px;
background: #f8f9fa;
border-radius: 3px;
}
.address-info:hover {
white-space: normal;
max-width: none;
position: relative;
z-index: 10;
background: #fff;
box-shadow: 0 2px 8px rgba(0,0,0,0.15);
border: 1px solid #dee2e6;
padding: 6px 8px;
}
.map-link {
color: #2563eb;
text-decoration: none;
font-size: 10px;
display: inline-flex;
align-items: center;
gap: 3px;
margin-top: 3px;
padding: 2px 4px;
border-radius: 3px;
transition: all 0.2s ease;
}
.map-link:hover {
text-decoration: underline;
background: #eff6ff;
color: #1d4ed8;
}
/* Status Badge */
.status-badge {
display: inline-flex;
@@ -664,36 +462,20 @@
/* Action Buttons */
.record-actions {
display: flex;
gap: 4px;
align-items: center;
justify-content: flex-start;
gap: var(--spacing-1);
}
.action-btn {
display: inline-flex;
width: 32px;
height: 32px;
border: none;
border-radius: var(--radius);
cursor: pointer;
transition: var(--transition);
display: flex;
align-items: center;
justify-content: center;
width: 24px;
height: 24px;
border: none;
border-radius: 4px;
cursor: pointer;
transition: all 0.2s ease;
font-size: 10px;
}
.action-btn:hover {
transform: scale(1.1);
}
.action-btn[title*="View"] {
background: #eff6ff;
color: #2563eb;
}
.action-btn[title*="View"]:hover {
background: #dbeafe;
color: #1d4ed8;
font-size: var(--font-size-xs);
}
.btn-view {
@@ -729,28 +511,28 @@
/* Empty State */
.empty-state {
text-align: center;
padding: 60px 20px;
color: #6b7280;
padding: var(--spacing-20);
color: var(--gray-500);
}
.empty-state i {
font-size: 4em;
margin-bottom: 20px;
color: #d1d5db;
.empty-icon {
font-size: 4rem;
color: var(--gray-300);
margin-bottom: var(--spacing-4);
}
.empty-state h3 {
font-size: 1.5em;
margin-bottom: 10px;
color: #374151;
font-size: var(--font-size-xl);
color: var(--gray-700);
margin-bottom: var(--spacing-2);
}
.empty-state p {
margin-bottom: 20px;
font-size: var(--font-size-base);
margin-bottom: var(--spacing-6);
max-width: 400px;
margin-left: auto;
margin-right: auto;
line-height: 1.5;
}
/* Pagination */
@@ -852,63 +634,65 @@
/* Modal Styles */
.modal {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
display: flex;
align-items: center;
justify-content: center;
z-index: 1000;
z-index: var(--z-modal);
backdrop-filter: blur(4px);
}
.modal-content {
background: white;
border-radius: 12px;
max-width: 600px;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background: var(--white);
border-radius: var(--radius-xl);
box-shadow: var(--shadow-xl);
width: 90%;
max-width: 600px;
max-height: 80vh;
overflow: hidden;
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}
.modal-header {
padding: 20px;
border-bottom: 1px solid #e5e7eb;
background: #f9fafb;
padding: var(--spacing-6);
border-bottom: 1px solid var(--gray-200);
display: flex;
justify-content: space-between;
align-items: center;
background: var(--gray-50);
}
.modal-header h3 {
margin: 0;
color: #111827;
display: flex;
align-items: center;
gap: 8px;
font-size: var(--font-size-xl);
font-weight: 600;
color: var(--gray-900);
}
.modal-close {
background: none;
border: none;
font-size: 18px;
font-size: var(--font-size-xl);
cursor: pointer;
color: #6b7280;
padding: 4px;
border-radius: 4px;
transition: all 0.2s ease;
color: var(--gray-500);
padding: var(--spacing-2);
border-radius: var(--radius);
transition: var(--transition);
}
.modal-close:hover {
background: #e5e7eb;
color: #374151;
background: var(--gray-200);
color: var(--gray-700);
}
.modal-body {
padding: 20px;
padding: var(--spacing-6);
max-height: 60vh;
overflow-y: auto;
}
@@ -922,81 +706,7 @@
background: var(--gray-50);
}
.record-detail-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 20px;
font-size: 14px;
}
.detail-item {
display: flex;
flex-direction: column;
gap: 6px;
padding: 12px;
background: #f9fafb;
border-radius: 8px;
border: 1px solid #e5e7eb;
}
.detail-item strong {
color: #374151;
font-size: 11px;
text-transform: uppercase;
letter-spacing: 0.5px;
font-weight: 600;
}
.detail-item span {
color: #111827;
font-weight: 500;
font-family: 'Courier New', monospace;
font-size: 13px;
}
/* Loading States */
.loading-location {
background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
background-size: 200% 100%;
animation: loading 1.5s infinite;
}
@keyframes loading {
0% {
background-position: 200% 0;
}
100% {
background-position: -200% 0;
}
}
/* Tooltip Enhancements */
[title] {
cursor: help;
}
/* Responsive Design */
@media (max-width: 1200px) {
.attendance-table {
font-size: 11px;
}
.location-data {
font-size: 9px;
padding: 2px 4px;
}
.accuracy-badge {
font-size: 8px;
padding: 1px 4px;
}
.address-info {
max-width: 100px;
font-size: 9px;
}
}
@media (max-width: 768px) {
.attendance-page {
padding: var(--spacing-4);
@@ -1055,20 +765,57 @@
.record-actions {
flex-direction: column;
}
}
/* Hide coordinates and address columns on mobile */
.attendance-table th:nth-child(8),
.attendance-table td:nth-child(8),
.attendance-table th:nth-child(10),
.attendance-table td:nth-child(10) {
@media (max-width: 480px) {
.attendance-table th,
.attendance-table td {
padding: var(--spacing-2);
font-size: var(--font-size-xs);
}
.employee-id {
font-size: var(--font-size-xs);
}
.time-info {
font-size: var(--font-size-xs);
}
.stat-icon {
width: 50px;
height: 50px;
font-size: 1.25rem;
}
.stat-content h3 {
font-size: var(--font-size-2xl);
}
}
/* Print Styles */
@media print {
.attendance-page {
background: white;
box-shadow: none;
}
.attendance-header,
.filters-section,
.charts-section {
display: none;
}
.location-data {
font-size: 8px;
padding: 1px 3px;
.attendance-table-section {
box-shadow: none;
border: 1px solid #ccc;
}
.coordinates {
display: none; /* Hide coordinates on mobile */
}
.action-btn {
display: none;
}
.pagination-container {
display: none;
}
}