diff --git a/app/modules/absensi/services/absensi.service.js b/app/modules/absensi/services/absensi.service.js index e86e11b..b9b744a 100644 --- a/app/modules/absensi/services/absensi.service.js +++ b/app/modules/absensi/services/absensi.service.js @@ -64,7 +64,7 @@ const create = async (req, res) => { if (attendance && attendance.clock_in) { // 🕛 Jika jam antara 12–15 → lunch_in - if (currentHour >= 12 && currentHour < 18 && !attendance.lunch_in) { + if (currentHour >= 12 && currentHour < 15 && !attendance.lunch_in) { attendance.lunch_in = now.toDate(); await attendance.save({ transaction: t }); await t.commit(); @@ -72,7 +72,7 @@ const create = async (req, res) => { } // 🕒 Jika jam >= 15 → otomatis clock_out - if (currentHour >= 19 && !attendance.clock_out) { + if (currentHour >= 15 && !attendance.clock_out) { attendance.clock_out = now.toDate(); const durationMs = moment(attendance.clock_out).diff(moment(attendance.clock_in)); @@ -89,7 +89,7 @@ const create = async (req, res) => { clock_in: moment(attendance.clock_in).tz('Asia/Jakarta').format('YYYY-MM-DD HH:mm:ss'), clock_out: moment(attendance.clock_out).tz('Asia/Jakarta').format('YYYY-MM-DD HH:mm:ss'), work_duration: attendance.work_duration, - }, 'Absen pulang otomatis setelah jam 15:00'); + }, 'Absen pulang berhasil'); } await t.rollback();