Fix frontend data display and download issues
- Fixed backend API to return analysis_data as extractedData for frontend compatibility - Added PDF generation to jobQueueService to ensure summary_pdf_path is populated - Generated PDF for existing document to fix download functionality - Backend now properly serves analysis data to frontend - Frontend should now display real financial data instead of N/A values
This commit is contained in:
@@ -104,7 +104,7 @@ export const documentController = {
|
||||
fileSize: doc.file_size,
|
||||
summary: doc.generated_summary,
|
||||
error: doc.error_message,
|
||||
extractedData: doc.extracted_text ? { text: doc.extracted_text } : undefined
|
||||
extractedData: doc.analysis_data || (doc.extracted_text ? { text: doc.extracted_text } : undefined)
|
||||
}));
|
||||
|
||||
res.json(formattedDocuments);
|
||||
@@ -152,7 +152,7 @@ export const documentController = {
|
||||
fileSize: document.file_size,
|
||||
summary: document.generated_summary,
|
||||
error: document.error_message,
|
||||
extractedData: document.extracted_text ? { text: document.extracted_text } : undefined
|
||||
extractedData: document.analysis_data || (document.extracted_text ? { text: document.extracted_text } : undefined)
|
||||
};
|
||||
|
||||
res.json(formattedDocument);
|
||||
|
||||
Reference in New Issue
Block a user