diff --git a/application/views/employees/attendance_monthly.php b/application/views/employees/attendance_monthly.php
index 04c976c..a2e7f92 100644
--- a/application/views/employees/attendance_monthly.php
+++ b/application/views/employees/attendance_monthly.php
@@ -16,8 +16,33 @@
.calendar-card .badge{
font-size:10px;
-
- }
+}
+
+ .badge-custom {
+ background-color: #ff8874;
+ color: #fff;
+}
+
+ .badge-custom1{
+ background-color: #27F549;
+ color: #fff;
+}
+
+ .badge-custom2 {
+ background-color: #CB21FF;
+ color: #fff;
+}
+
+ .badge-custom3 {
+ background-color: #94A600;
+ color: #fff;
+}
+
+ .badge-custom4 {
+ background-color: #8200C7;
+ color: #fff;
+}
+
@@ -121,7 +146,7 @@
| Izin |
- |
+ |
| Alpha |
@@ -131,6 +156,10 @@
Terlambat |
|
+
+ | Total Early Leave Minutes |
+ |
+
@@ -138,29 +167,34 @@
- | Total Hari Kerja |
+ Total Hari Kerja |
|
Hari |
| Cuti |
- |
+ |
Hari |
| Total Jam Kerja |
|
Jam |
+
+
+ | Total Late Minutes |
+ |
+ Menit |
- | Total Overtime Hours |
- |
+ Total Overtime Hours |
+ |
Jam |
- | Total Terlambat / Menit |
- |
- Menit |
+ Total Alpha |
+ |
+ Hari |
@@ -224,34 +258,25 @@
$('#d_status').text(res.header.status);
// Header - perhitungan
- $('#d_total_hari_kerja').text(res.detail.length);
- $('#d_present_count').text(res.detail.filter(d => d.attendance_status === 'present').length);
- $('#d_total_hadir').text(res.detail.filter(d => d.attendance_status === 'present').length);
- $('#d_late_count').text(res.detail.filter(d => d.attendance_status === 'late').length);
- $('#d_total_permit').text(res.detail.filter(d => d.attendance_status === 'permit').length);
+ $('#d_total_hari_kerja').text(res.header.total_hari_kerja);
+ $('#d_present_count').text(res.header.total_present);
+ $('#d_total_hadir').text(res.header.total_hadir);
+ $('#d_late_count').text(res.header.total_late);
+ $('#d_total_permit').text(res.header.total_permit);
- $('#d_sick_count').text(res.detail.filter(d => d.attendance_status === 'sick').length);
- $('#d_total_work_hours').text(res.detail.filter(d => d.attendance_status === 'present').length * 8); // Asumsi 8 jam kerja per hari
- $('#d_late_minutes').text(res.detail.reduce((total, d) => {
- if (d.attendance_status === 'late') {
- return total + parseInt(d.late_minutes);
- }
- return total;
- }, 0));
-
- const totalLateMinutes = res.detail
- .filter(d => d.attendance_status === 'late')
- .reduce((sum, d) => sum + (Number(d.total_late_minutes) || 0), 0);
- $('#d_total_late_minutes').text(totalLateMinutes);
+ $('#d_sick_count').text(res.header.total_sick);
+ $('#d_total_overtime_hours').text(res.header.total_overtime_hours);
+ $('#d_total_work_hours').text(res.header.total_work_hours);
+ $('#d_total_annual').text(res.header.total_annual);
+ $('#d_total_late_minutes').text(res.header.total_late_minutes);
+ $('#d_total_early_leave_minutes').text(res.header.total_early_leave_minutes);
+
- $('#d_overtime_hours').text(res.detail.filter(d => d.attendance_status === 'present' && d.overtime_hours)
- .reduce((total, d) => total + parseFloat(d.overtime_hours || 0), 0)
- );
-
- $('#d_leave_count').text(res.detail.filter(d => d.attendance_status === 'permit').length);
- $('#d_absent_count').text(res.detail.filter(d => d.attendance_status === 'alpha').length);
- $('#d_late_count').text(res.detail.filter(d => d.attendance_status === 'late').length);
+ $('#d_leave_count').text(res.header.total_leave);
+ $('#d_absent_count').text(res.header.total_alpha);
+ $('#d_late_count').text(res.header.total_late);
+ $('#d_total_alpha').text(res.header.total_alpha);
// Mapping data absensi berdasarkan tanggal