diff --git a/db/device.db.js b/db/device.db.js index 3ea1a12..d0dfd8b 100644 --- a/db/device.db.js +++ b/db/device.db.js @@ -155,15 +155,14 @@ const getDeviceReminderMonthlyDb = async (id) => { return result.recordset; }; -const updateDeviceReminderMonthlyDb = async (deviceId, reminderMonthly, period) => { +const updateDeviceReminderMonthlyDb = async (deviceId, reminderMonthly) => { const queryText = ` UPDATE m_device SET reminder_at_monthly = $1, - period = $2 updated_at = CURRENT_TIMESTAMP WHERE device_id = $2 AND deleted_at IS NULL `; - await pool.query(queryText, [reminderMonthly, deviceId, period]); + await pool.query(queryText, [reminderMonthly, deviceId]); return getDeviceByIdDb(deviceId); }; diff --git a/services/notifikasi-wa.service.js b/services/notifikasi-wa.service.js index 276e0b9..d619488 100644 --- a/services/notifikasi-wa.service.js +++ b/services/notifikasi-wa.service.js @@ -614,7 +614,7 @@ class NotifikasiWaService { } - async onMonthlyReminder(deviceId, reminderMonthly, period) { + async onMonthlyReminder(deviceId, reminderMonthly) { try { const paramDb = { @@ -1179,7 +1179,7 @@ class NotifikasiWaService { `Diberitahukan bahwa terdapat sparepart pada device "${deviceName}" ` + `yang telah memasuki jadwal perawatan.\n\n` + `Silakan segera lakukan pengecekan dan perawatan untuk memastikan kinerja tetap optimal.\n\n` + - `Detail Periode Perawatan:\n` + + `Detaile Perawatan:\n` + `Start Date: ${startDateObj.format('DD-MM-YYYY HH:mm')}\n` + `End Date: ${endDateObj.format('DD-MM-YYYY HH:mm')}\n`