diff --git a/db/notification_error.db.js b/db/notification_error.db.js index a2068aa..721e36d 100644 --- a/db/notification_error.db.js +++ b/db/notification_error.db.js @@ -111,6 +111,8 @@ const getAllNotificationDb = async (searchParams = {}) => { b.error_code, b.error_code_name, + b.error_code_color, + b.path_icon, b.created_at, c.solution_name, @@ -122,13 +124,16 @@ const getAllNotificationDb = async (searchParams = {}) => { COALESCE(d.device_name, '') + ' - ' + COALESCE(b.error_code_name, '') AS device_name_error - FROM notification_error a - LEFT JOIN brand_code b - ON a.error_code_id = b.error_code_id AND b.deleted_at IS NULL - LEFT JOIN brand_code_solution c - ON b.error_code_id = c.error_code_id AND c.deleted_at IS NULL - LEFT JOIN m_device d - ON b.brand_id = d.brand_id AND d.deleted_at IS NULL + FROM notification_error a + + LEFT JOIN brand_code b + ON a.error_code_id = b.error_code_id AND b.deleted_at IS NULL + + LEFT JOIN brand_code_solution c + ON b.error_code_id = c.error_code_id AND c.deleted_at IS NULL + + LEFT JOIN m_device d + ON b.brand_id = d.brand_id AND d.deleted_at IS NULL WHERE a.deleted_at IS NULL ${whereConditions.length > 0 ? ` AND ${whereConditions.join(" AND ")}` : ""}