Skip to content

Commit

Permalink
Add payment info to transfer submission POST call
Browse files Browse the repository at this point in the history
  • Loading branch information
owillborn committed Feb 24, 2023
1 parent d9f8626 commit f902d50
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions ppr-ui/src/utils/mhr-api-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -407,9 +407,10 @@ export async function validateDocumentID (documentId: string) {
}
}

export async function submitMhrTransfer (payloadData, mhrNumber) {
export async function submitMhrTransfer (payloadData, mhrNumber, staffPayment) {
const paymentParams = `?${mhrStaffPaymentParameters(staffPayment)}`
try {
const result = await axios.post(`transfers/${mhrNumber}`, payloadData, getDefaultConfig())
const result = await axios.post(`transfers/${mhrNumber}${paymentParams}`, payloadData, getDefaultConfig())
if (!result?.data) {
throw new Error('Invalid API response')
}
Expand Down
3 changes: 2 additions & 1 deletion ppr-ui/src/views/mhrInformation/MhrInformation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -764,7 +764,8 @@ export default defineComponent({
}
localState.loading = true
const apiData = await buildApiData()
const mhrTransferFiling = await submitMhrTransfer(apiData, getMhrInformation.value.mhrNumber)
const mhrTransferFiling =
await submitMhrTransfer(apiData, getMhrInformation.value.mhrNumber, localState.staffPayment)
localState.loading = false
if (!mhrTransferFiling.error) {
setUnsavedChanges(false)
Expand Down

0 comments on commit f902d50

Please sign in to comment.