repair: change message wa notification

This commit is contained in:
2026-01-05 16:10:29 +07:00
parent 0c16b2a3fd
commit 71c5e94f42
3 changed files with 97 additions and 72 deletions

View File

@@ -61,10 +61,24 @@ const getNotificationErrorUserByIdDb = async (id) => {
const queryText = `
SELECT
a.*,
b. is_active as contact_is_active
b. is_active as contact_is_active,
d.error_code,
d.error_code_name,
e.device_name
FROM notification_error_user a
LEFT JOIN contact b ON a.contact_phone = b.contact_phone
LEFT JOIN notification_error c ON a.notification_error_id = c.notification_error_id
LEFT JOIN brand_code d ON d.error_code_id = c.error_code_id
LEFT JOIN m_device e ON c.error_chanel = e.listen_channel
WHERE a.notification_error_user_id = $1 AND a.deleted_at IS NULL
`;
const result = await pool.query(queryText, [id]);