fix: update error code icon handling to use URL if available

This commit is contained in:
2025-11-27 17:39:39 +07:00
parent 55c50f6f7f
commit 5fdfb47f9e
2 changed files with 2 additions and 2 deletions

View File

@@ -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('/');

View File

@@ -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,