fix(wa): pakai getTechById (getTechnicianById tidak ada) - notifikasi tiket oleh admin kini terkirim
This commit is contained in:
1 parent
02af750226
commit
b65eb3195c
1 file changed
+2
-2
@@ -3493,7 +3493,7 @@ router.post('/tickets/create', requireAdminSession, express.urlencoded({ extende
|
||||
const waNotify = require('../services/waNotifyService');
|
||||
const cust = custId ? customerSvc.getCustomerById(custId) : null;
|
||||
const techSvc = require('../services/techService');
|
||||
const tech = techId ? techSvc.getTechnicianById(techId) : null;
|
||||
const tech = techId ? techSvc.getTechById(techId) : null;
|
||||
|
||||
const custName = cust ? cust.name : 'Tugas Umum / Maintenance Admin';
|
||||
const custPhone = cust ? cust.phone : '-';
|
||||
@@ -3554,7 +3554,7 @@ router.post('/tickets/:id/update', requireAdminSession, express.urlencoded({ ext
|
||||
if (settings.whatsapp_enabled) {
|
||||
const waNotify = require('../services/waNotifyService');
|
||||
const techSvc = require('../services/techService');
|
||||
const newTech = techSvc.getTechnicianById(techId);
|
||||
const newTech = techSvc.getTechById(techId);
|
||||
const updatedTicket = ticketSvc.getTicketById(ticketId);
|
||||
|
||||
if (newTech && newTech.phone && updatedTicket) {
|
||||
|
||||
Reference in new issue
Block a user