fix: pass socketId from frontend, update claim status to REVIEW, save confirmation as PDF not screenshot

This commit is contained in:
Gitead
2026-04-23 23:29:12 -04:00
parent ca7797841f
commit 4f8a211bf1
3 changed files with 65 additions and 64 deletions

View File

@@ -42,12 +42,14 @@ export async function runClaimSubmitProcessor(
// 1) Call the Python service synchronously (BullMQ worker handles async)
const result = await callPythonSync(endpoint, payload, 10 * 60 * 1000);
// 3) Persist claimNumber if returned
if (result?.claimNumber && claimId) {
// 2) Persist claimNumber and update status to REVIEW after successful submission
if (claimId) {
try {
await storage.updateClaim(claimId, { claimNumber: result.claimNumber });
const updates: Record<string, any> = { status: "REVIEW" };
if (result?.claimNumber) updates.claimNumber = result.claimNumber;
await storage.updateClaim(claimId, updates);
} catch (e) {
console.error("[claimSubmitProcessor] failed to persist claimNumber:", e);
console.error("[claimSubmitProcessor] failed to update claim after submission:", e);
}
}