add: sparepart in detail notification error
This commit is contained in:
@@ -57,6 +57,8 @@ class NotificationService {
|
||||
// Get solutions for this error code
|
||||
const solutions = (await getSolutionsByErrorCodeIdDb(errorCode.error_code_id)) || [];
|
||||
|
||||
const spareparts = await getSparepartsByErrorCodeIdDb(errorCode.error_code_id);
|
||||
|
||||
const solutionsWithDetails = await Promise.all(
|
||||
solutions.map(async (solution) => {
|
||||
let fileData = null;
|
||||
@@ -75,13 +77,12 @@ class NotificationService {
|
||||
})
|
||||
);
|
||||
|
||||
const spareparts = await getSparepartsByErrorCodeIdDb(errorCode.error_code_id);
|
||||
|
||||
notification.error_code = {
|
||||
...errorCode,
|
||||
solution: solutionsWithDetails
|
||||
solution: solutionsWithDetails,
|
||||
spareparts: spareparts
|
||||
};
|
||||
notification.spareparts = spareparts;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user