fix: Use attachments array instead of attachments_names in old format normalizeData

This commit is contained in:
AI Assistant
2025-11-24 17:58:17 +03:00
parent 6bf5cfad26
commit 8c85eda7ac

View File

@@ -213,7 +213,7 @@ export function generateConfirmationFormHTML(data: any): string {
description: claim.description || null,
reason: claim.reason || caseData.category || null,
},
attachments: data.attachments_names || [],
attachments: data.attachments || data.attachments_names || [], // ✅ Используем полный массив attachments с field_label
offenders: offenders.map((o: any) => Object.assign({}, baseOffender, o || {})),
meta: data.meta || {},
};
@@ -668,7 +668,7 @@ export function generateConfirmationFormHTML(data: any): string {
description: claim.description || null,
reason: claim.reason || caseData.category || null,
},
attachments: data.attachments_names || [],
attachments: data.attachments || data.attachments_names || [], // ✅ Используем полный массив attachments с field_label
offenders: offenders.map(function(o) {
return {
accountname: o.name || o.accountname || null,