diff --git a/src/pages/master/brandDevice/EditBrandDevice.jsx b/src/pages/master/brandDevice/EditBrandDevice.jsx index 5aa8213..d0eed90 100644 --- a/src/pages/master/brandDevice/EditBrandDevice.jsx +++ b/src/pages/master/brandDevice/EditBrandDevice.jsx @@ -479,14 +479,14 @@ const EditBrandDevice = () => { return; } - if (!solutionData || solutionData.length === 0) { - NotifAlert({ - icon: 'warning', - title: 'Perhatian', - message: 'Setiap error code harus memiliki minimal 1 solution!', - }); - return; - } + // if (!solutionData || solutionData.length === 0) { + // NotifAlert({ + // icon: 'warning', + // title: 'Perhatian', + // message: 'Setiap error code harus memiliki minimal 1 solution!', + // }); + // return; + // } const formattedSolutions = solutionData.map(solution => { const solutionType = solution.type || 'text'; diff --git a/src/pages/notification/component/ListNotification.jsx b/src/pages/notification/component/ListNotification.jsx index 01f9e31..03aa741 100644 --- a/src/pages/notification/component/ListNotification.jsx +++ b/src/pages/notification/component/ListNotification.jsx @@ -421,7 +421,7 @@ const ListNotification = memo(function ListNotification(props) { {notification.title}
- {notification.issue} + Error Code {notification.issue}
@@ -734,8 +734,8 @@ const ListNotification = memo(function ListNotification(props) { {/* Kolom Kanan: Card */} - - + + @@ -746,13 +746,16 @@ const ListNotification = memo(function ListNotification(props) { Added at {log.timestamp} +
- Added by: {log.addedBy.name} + {log.addedBy.name} +
+ +
- + + Description: { - + - - - - - Handling Guideline - - - - - - - - - - Spare Part - - - - - - - - - - Log Activity - - - - - - - - - - + - {notification.error_code?.solution && - notification.error_code.solution.length > 0 ? ( - <> - {notification.error_code.solution - .filter((sol) => sol.is_active) // Hanya tampilkan solusi yang aktif - .map((sol, index) => ( -
- {sol.path_document ? ( - - PDF - - } - > -
+ + + Handling Guideline + + + + + {notification.error_code?.solution && + notification.error_code.solution.length > 0 ? ( + <> + {notification.error_code.solution + .filter((sol) => sol.is_active) // Hanya tampilkan solusi yang aktif + .map((sol, index) => ( +
+ {sol.path_document ? ( + -
+ hoverable + extra={ - {' '} - {sol.file_upload_name || - 'Solution Document.pdf'} + PDF - - lihat disini - -
-
- - ) : null} - {sol.type_solution === 'text' && - sol.text_solution ? ( - - {sol.solution_name}: - - } - bodyStyle={{ - padding: '8px 12px', - marginBottom: '4px', - }} - extra={ - - {sol.type_solution.toUpperCase()} - - } - > -
+ } + >
- {sol.text_solution} +
+ + {' '} + {sol.file_upload_name || + 'Solution Document.pdf'} + + + lihat disini + +
-
-
- ) : null} -
- ))} - - ) : ( -
- Tidak ada dokumen solusi tersedia -
- )} - -
+ + ) : null} + {sol.type_solution === 'text' && + sol.text_solution ? ( + + {sol.solution_name}: + + } + bodyStyle={{ + padding: '8px 12px', + marginBottom: '4px', + }} + extra={ + + {sol.type_solution.toUpperCase()} + + } + > +
+
+ {sol.text_solution} +
+
+
+ ) : null} +
+ ))} + + ) : ( +
+ Tidak ada dokumen solusi tersedia +
+ )} +
+
+
- - + - {notification.spareparts && - notification.spareparts.length > 0 ? ( - notification.spareparts.map((sparepart, index) => ( - - - -
+ + + Spare Part + + + + + {notification.spareparts && + notification.spareparts.length > 0 ? ( + notification.spareparts.map((sparepart, index) => ( + + + - -
- - {sparepart.sparepart_stok} - - - - - - {sparepart.sparepart_name} - - - {sparepart.sparepart_description || - 'Deskripsi tidak tersedia'} -
- Kode: {sparepart.sparepart_code}{' '} - | Qty: {sparepart.sparepart_qty}{' '} - | Unit:{' '} - {sparepart.sparepart_unit} +
-
- -
-
- )) - ) : ( -
- Tidak ada spare parts terkait -
- )} -
-
+ + {sparepart.sparepart_stok} + + + + + + {sparepart.sparepart_name} + + + {sparepart.sparepart_description || + 'Deskripsi tidak tersedia'} + +
+ Kode:{' '} + {sparepart.sparepart_code} | + Qty:{' '} + {sparepart.sparepart_qty} | + Unit:{' '} + {sparepart.sparepart_unit} +
+
+ +
+
+ )) + ) : ( +
+ Tidak ada spare parts terkait +
+ )} + + + - - - - + + + + - {isAddingLog && ( - <> - - Add New Log / Update Progress - - - setNewLogDescription(e.target.value) - } - disabled={submitLoading} - /> - - )} - - {isAddingLog && ( - - )} - - - {logHistoryData.map((log) => ( + Log Activity + + + + - - {log.addedBy.name}:{' '} - {log.description} - - - {log.timestamp} - + {isAddingLog && ( + <> + + Add New Log / Update Progress + + + setNewLogDescription( + e.target.value + ) + } + disabled={submitLoading} + /> + + )} + + {isAddingLog && ( + + )} + - ))} - - + {logHistoryData.map((log) => ( + + + {log.addedBy.name}:{' '} + {log.description} + + + {log.timestamp} + + + ))} + + +