Skip to content

Commit

Permalink
[ADOP-2547] fixing logic gap where case is Awaiting Payment
Browse files Browse the repository at this point in the history
  • Loading branch information
hfilmore committed Oct 24, 2024
1 parent 71e52cf commit 45931ee
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/steps/review-pay-submit/reviewPaySubmitSequence.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { CaseWithId } from '../../app/case/case';
import { State } from '../../app/case/definition';
import { Sections, Step } from '../constants';
import * as Urls from '../urls';

Expand All @@ -11,7 +12,8 @@ export const reviewPaySubmitSequence: Step[] = [
{
url: Urls.CHECK_ANSWERS_URL,
showInSection: Sections.ReviewPaySubmit,
getNextStep: () => Urls.STATEMENT_OF_TRUTH,
getNextStep: data =>
(data as Partial<CaseWithId>).state === State.AwaitingPayment ? Urls.PAY_AND_SUBMIT_URL : Urls.STATEMENT_OF_TRUTH,
},
{
url: Urls.STATEMENT_OF_TRUTH,
Expand Down

0 comments on commit 45931ee

Please sign in to comment.