Skip to content

Commit

Permalink
Fix bugs from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
haworku committed Apr 24, 2024
1 parent 466fd31 commit 21495e4
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
26 changes: 23 additions & 3 deletions services/app-web/src/components/Modal/V2/UnlockSubmitModalV2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,20 @@ export const UnlockSubmitModalV2 = ({
console.info('unlock rate not implemented yet')
break

case 'SUBMIT_RATE' || 'RESUBMIT_RATE':
console.info('submit/resubmit rate not implemented yet')
case 'SUBMIT_RATE' :
console.info('submit rate not implemented yet')
break
case 'SUBMIT_CONTRACT' || 'RESUBMIT_CONTRACT':
case 'RESUBMIT_RATE' :
console.info('submit rate not implemented yet')
break
case 'SUBMIT_CONTRACT':
result = await submitMutationWrapperV2(
submitContract,
submissionData.id,
unlockSubmitModalInput
)
break;
case 'RESUBMIT_CONTRACT':
result = await submitMutationWrapperV2(
submitContract,
submissionData.id,
Expand Down Expand Up @@ -255,6 +265,16 @@ export const UnlockSubmitModalV2 = ({
navigate(
`/dashboard/submissions?justSubmitted=${submissionName}`
)
} else {
await client.refetchQueries({
include: [FetchContractDocument],
})
// TODO: Remove HPP code fully from here, this is a hack to get through linked rates
// neded because sidebar UI that also displays questions that assumes latest data fetched on this page
// and we haven't had to migrate that yet to contract and ratesyet
await client.refetchQueries({
include: [FetchHealthPlanPackageWithQuestionsDocument],
})
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ export const SubmissionSummaryV2 = (): React.ReactElement => {
contractID: id ?? 'unknown-contract',
},
},
fetchPolicy: 'network-only'
})
const contract = fetchContractData?.fetchContract.contract
if (fetchContractLoading) {
Expand Down

0 comments on commit 21495e4

Please sign in to comment.