add: path icon & error code color in all notif error

This commit is contained in:
2025-12-08 11:29:16 +07:00
parent 555a68e90c
commit d063478fc2

View File

@@ -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 ")}` : ""}