Skip to content

Commit 665febd

Browse files
committed
#3887 fixed materialId not being included in WBS reimbursement product submission
1 parent d3adccd commit 665febd

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

src/frontend/src/pages/FinancePage/ReimbursementRequestForm/ReimbursementProductTable.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -576,11 +576,19 @@ const ReimbursementProductTable: React.FC<ReimbursementProductTableProps> = ({
576576
shouldValidate: true,
577577
shouldDirty: true
578578
});
579+
setValue(`reimbursementProducts.${product.index}.materialId`, material.materialId, {
580+
shouldValidate: true,
581+
shouldDirty: true
582+
});
579583
} else {
580584
setValue(`reimbursementProducts.${product.index}.name`, '', {
581585
shouldValidate: true,
582586
shouldDirty: true
583587
});
588+
setValue(`reimbursementProducts.${product.index}.materialId`, undefined, {
589+
shouldValidate: true,
590+
shouldDirty: true
591+
});
584592
}
585593
}}
586594
/>

src/frontend/src/pages/FinancePage/ReimbursementRequestForm/ReimbursementRequestForm.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@ const ReimbursementRequestForm: React.FC<ReimbursementRequestFormProps> = ({
264264
reason: product.reason as WbsNumber,
265265
cost: product.cost,
266266
name: product.name,
267+
materialId: product.materialId,
267268
refundSources: product.refundSources
268269
});
269270
}
@@ -321,6 +322,7 @@ const ReimbursementRequestForm: React.FC<ReimbursementRequestFormProps> = ({
321322
reason: product.reason as WbsNumber,
322323
cost: product.cost,
323324
name: product.name,
325+
materialId: product.materialId,
324326
refundSources: product.refundSources
325327
});
326328
}

0 commit comments

Comments
 (0)