add: sparepart in detail notification error
This commit is contained in:
@@ -17,6 +17,10 @@ const {
|
|||||||
getNotificationErrorLogByNotificationErrorIdDb,
|
getNotificationErrorLogByNotificationErrorIdDb,
|
||||||
} = require('../db/notification_error_log.db');
|
} = require('../db/notification_error_log.db');
|
||||||
|
|
||||||
|
const {
|
||||||
|
getSparepartsByErrorCodeIdDb,
|
||||||
|
} = require('../db/brand_sparepart.db');
|
||||||
|
|
||||||
const { getFileUploadByPathDb } = require('../db/file_uploads.db');
|
const { getFileUploadByPathDb } = require('../db/file_uploads.db');
|
||||||
|
|
||||||
const { ErrorHandler } = require('../helpers/error');
|
const { ErrorHandler } = require('../helpers/error');
|
||||||
@@ -71,10 +75,13 @@ class NotificationService {
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const spareparts = await getSparepartsByErrorCodeIdDb(errorCode.error_code_id);
|
||||||
|
|
||||||
notification.error_code = {
|
notification.error_code = {
|
||||||
...errorCode,
|
...errorCode,
|
||||||
solution: solutionsWithDetails
|
solution: solutionsWithDetails
|
||||||
};
|
};
|
||||||
|
notification.spareparts = spareparts;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user