fix: update error code icon handling to use URL if available
This commit is contained in:
@@ -159,7 +159,7 @@ const EditBrandDevice = () => {
|
||||
sparepart: ec.sparepart || [],
|
||||
errorCodeIcon: ec.path_icon
|
||||
? {
|
||||
name: 'icon',
|
||||
name: ec.path_icon.split('/').pop(), // Ambil nama file dari path
|
||||
uploadPath: ec.path_icon,
|
||||
url: (() => {
|
||||
const pathParts = ec.path_icon.split('/');
|
||||
|
||||
@@ -152,7 +152,7 @@ const ErrorCodeSimpleForm = ({
|
||||
<div style={{ marginTop: 8 }}>
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: 8 }}>
|
||||
<img
|
||||
src={errorCodeIcon.uploadPath}
|
||||
src={errorCodeIcon.url || errorCodeIcon.uploadPath}
|
||||
alt="Error Code Icon"
|
||||
style={{
|
||||
width: 50,
|
||||
|
||||
Reference in New Issue
Block a user