IO-3515 Minimally functional form fill out.

This commit is contained in:
Patrick Fic
2026-01-29 16:26:16 -08:00
parent 96731a29e1
commit 20dad2caba
6 changed files with 124 additions and 18 deletions

View File

@@ -70,7 +70,7 @@ async function handleBillOcr(request, response) {
response.status(200).send({
success: true,
status: 'COMPLETED',
data: await generateBillFormData({ processedData: null, jobid, bodyshopid, partsorderid }), //This is broken if the processedData is not overwritten in the function for testing.
data: await generateBillFormData({ processedData: null, jobid, bodyshopid, partsorderid, req: request }), //This is broken if the processedData is not overwritten in the function for testing.
message: 'Invoice processing completed'
});
return;
@@ -84,7 +84,7 @@ async function handleBillOcr(request, response) {
if (fileType === 'image') {
console.log('Image => 1 page, processing synchronously');
const processedData = await processSinglePageDocument(uploadedFile.buffer);
const billForm = await generateBillFormData({ processedData: processedData, jobid, bodyshopid, partsorderid });
const billForm = await generateBillFormData({ processedData: processedData, jobid, bodyshopid, partsorderid, req: request });
response.status(200).send({
success: true,
status: 'COMPLETED',
@@ -100,7 +100,7 @@ async function handleBillOcr(request, response) {
// Process synchronously for single-page documents
console.log('PDF => 1 page, processing synchronously');
const processedData = await processSinglePageDocument(uploadedFile.buffer);
const billForm = await generateBillFormData({ processedData: processedData, jobid, bodyshopid, partsorderid });
const billForm = await generateBillFormData({ processedData: processedData, jobid, bodyshopid, partsorderid, req: request });
//const billResult = await generateBillFormData({ result, });
response.status(200).send({
success: true,