diff --git a/src/main/resources/templates/admin/business/process-detail.ftl b/src/main/resources/templates/admin/business/process-detail.ftl index c7fb3ee..ff04455 100644 --- a/src/main/resources/templates/admin/business/process-detail.ftl +++ b/src/main/resources/templates/admin/business/process-detail.ftl @@ -118,7 +118,7 @@ - + {{attachment.name}} @@ -344,7 +344,9 @@ const mapAttachment = attachment => { if (hasText(attachment)) { try { - return JSON.parse(attachment) + return JSON.parse(attachment).map(item => ({ + ...item, isImage: isImage(item.name) + })) } catch (e) { return [] } @@ -368,7 +370,9 @@ })) this.procurementDetails = procurementDetails - this.attachments = attachments + this.attachments = attachments.map(item => ({ + ...item, isImage: isImage(item.name) + })) }) .catch(({ response }) => { if (response) { diff --git a/src/main/resources/templates/admin/business/process-new.ftl b/src/main/resources/templates/admin/business/process-new.ftl index 8a7eb4f..9946f81 100644 --- a/src/main/resources/templates/admin/business/process-new.ftl +++ b/src/main/resources/templates/admin/business/process-new.ftl @@ -125,7 +125,7 @@ - +