Enhance attendance report
This commit is contained in:
+374
-121
@@ -1,8 +1,3 @@
|
||||
/**
|
||||
* Attendance Report Page Styles
|
||||
* static/css/attendance.css
|
||||
*/
|
||||
|
||||
/* Page Container */
|
||||
.attendance-page {
|
||||
max-width: 1400px;
|
||||
@@ -109,7 +104,43 @@
|
||||
}
|
||||
|
||||
.stat-card.warning::before {
|
||||
background: linear-gradient(90deg, var(--warning-color), #b45309);
|
||||
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;
|
||||
}
|
||||
|
||||
.stat-card:hover {
|
||||
@@ -129,20 +160,24 @@
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.stat-card.primary .stat-icon {
|
||||
.stat-icon.primary {
|
||||
background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
|
||||
}
|
||||
|
||||
.stat-card.success .stat-icon {
|
||||
.stat-icon.success {
|
||||
background: linear-gradient(135deg, var(--success-color), #047857);
|
||||
}
|
||||
|
||||
.stat-card.info .stat-icon {
|
||||
.stat-icon.info {
|
||||
background: linear-gradient(135deg, var(--info-color), #0369a1);
|
||||
}
|
||||
|
||||
.stat-card.warning .stat-icon {
|
||||
background: linear-gradient(135deg, var(--warning-color), #b45309);
|
||||
.stat-icon.warning {
|
||||
background: linear-gradient(135deg, var(--warning-color), #d97706);
|
||||
}
|
||||
|
||||
.stat-icon.danger {
|
||||
background: linear-gradient(135deg, var(--danger-color), #b91c1c);
|
||||
}
|
||||
|
||||
.stat-content {
|
||||
@@ -154,20 +189,13 @@
|
||||
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);
|
||||
font-style: italic;
|
||||
margin: 0;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
/* Filters Section */
|
||||
@@ -183,7 +211,7 @@
|
||||
}
|
||||
|
||||
.filters-header {
|
||||
padding: var(--spacing-6);
|
||||
padding: var(--spacing-6) var(--spacing-6) var(--spacing-4);
|
||||
border-bottom: 1px solid var(--gray-200);
|
||||
background: var(--gray-50);
|
||||
}
|
||||
@@ -202,14 +230,11 @@
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -220,9 +245,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);
|
||||
@@ -290,6 +315,12 @@
|
||||
color: var(--primary-color);
|
||||
}
|
||||
|
||||
.record-count {
|
||||
font-size: 14px;
|
||||
color: #6c757d;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.table-controls {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -354,12 +385,46 @@
|
||||
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);
|
||||
}
|
||||
@@ -368,6 +433,20 @@
|
||||
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;
|
||||
@@ -430,6 +509,129 @@
|
||||
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;
|
||||
@@ -462,20 +664,36 @@
|
||||
/* Action Buttons */
|
||||
.record-actions {
|
||||
display: flex;
|
||||
gap: var(--spacing-1);
|
||||
gap: 4px;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
.action-btn {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
border: none;
|
||||
border-radius: var(--radius);
|
||||
cursor: pointer;
|
||||
transition: var(--transition);
|
||||
display: flex;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: var(--font-size-xs);
|
||||
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;
|
||||
}
|
||||
|
||||
.btn-view {
|
||||
@@ -511,28 +729,28 @@
|
||||
/* Empty State */
|
||||
.empty-state {
|
||||
text-align: center;
|
||||
padding: var(--spacing-20);
|
||||
color: var(--gray-500);
|
||||
padding: 60px 20px;
|
||||
color: #6b7280;
|
||||
}
|
||||
|
||||
.empty-icon {
|
||||
font-size: 4rem;
|
||||
color: var(--gray-300);
|
||||
margin-bottom: var(--spacing-4);
|
||||
.empty-state i {
|
||||
font-size: 4em;
|
||||
margin-bottom: 20px;
|
||||
color: #d1d5db;
|
||||
}
|
||||
|
||||
.empty-state h3 {
|
||||
font-size: var(--font-size-xl);
|
||||
color: var(--gray-700);
|
||||
margin-bottom: var(--spacing-2);
|
||||
font-size: 1.5em;
|
||||
margin-bottom: 10px;
|
||||
color: #374151;
|
||||
}
|
||||
|
||||
.empty-state p {
|
||||
font-size: var(--font-size-base);
|
||||
margin-bottom: var(--spacing-6);
|
||||
margin-bottom: 20px;
|
||||
max-width: 400px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
/* Pagination */
|
||||
@@ -634,65 +852,63 @@
|
||||
|
||||
/* Modal Styles */
|
||||
.modal {
|
||||
display: none;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
z-index: var(--z-modal);
|
||||
backdrop-filter: blur(4px);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
.modal-content {
|
||||
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%;
|
||||
background: white;
|
||||
border-radius: 12px;
|
||||
max-width: 600px;
|
||||
width: 90%;
|
||||
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: var(--spacing-6);
|
||||
border-bottom: 1px solid var(--gray-200);
|
||||
padding: 20px;
|
||||
border-bottom: 1px solid #e5e7eb;
|
||||
background: #f9fafb;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
background: var(--gray-50);
|
||||
}
|
||||
|
||||
.modal-header h3 {
|
||||
margin: 0;
|
||||
font-size: var(--font-size-xl);
|
||||
font-weight: 600;
|
||||
color: var(--gray-900);
|
||||
color: #111827;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.modal-close {
|
||||
background: none;
|
||||
border: none;
|
||||
font-size: var(--font-size-xl);
|
||||
font-size: 18px;
|
||||
cursor: pointer;
|
||||
color: var(--gray-500);
|
||||
padding: var(--spacing-2);
|
||||
border-radius: var(--radius);
|
||||
transition: var(--transition);
|
||||
color: #6b7280;
|
||||
padding: 4px;
|
||||
border-radius: 4px;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
.modal-close:hover {
|
||||
background: var(--gray-200);
|
||||
color: var(--gray-700);
|
||||
background: #e5e7eb;
|
||||
color: #374151;
|
||||
}
|
||||
|
||||
.modal-body {
|
||||
padding: var(--spacing-6);
|
||||
padding: 20px;
|
||||
max-height: 60vh;
|
||||
overflow-y: auto;
|
||||
}
|
||||
@@ -706,7 +922,81 @@
|
||||
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);
|
||||
@@ -765,57 +1055,20 @@
|
||||
.record-actions {
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
|
||||
@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 {
|
||||
/* 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) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.attendance-table-section {
|
||||
box-shadow: none;
|
||||
border: 1px solid #ccc;
|
||||
|
||||
.location-data {
|
||||
font-size: 8px;
|
||||
padding: 1px 3px;
|
||||
}
|
||||
|
||||
.action-btn {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.pagination-container {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.coordinates {
|
||||
display: none; /* Hide coordinates on mobile */
|
||||
}
|
||||
+301
-599
File diff suppressed because it is too large
Load Diff
+389
-593
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user