Skip to content

Commit

Permalink
portalicious: fix navigation post create-payment
Browse files Browse the repository at this point in the history
AB#32308

After creating a new payment, the user should be redirected to the payment page. This was not working.

This does not address the originally reported bug in the linked bug item, but that is because the bug is _actually_ expected behaviour.
  • Loading branch information
aberonni committed Dec 19, 2024
1 parent b023582 commit 6850484
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,14 @@ export class CreatePaymentComponent {
return;
}

this.dialogVisible.set(false);
// Do not set dialogVisible to false here, otherwise the addCurrentStepToQueryParams
// effect will be triggered, blocking the user from navigating away
// this.dialogVisible.set(false);

await this.paymentApiService.invalidateCache(
this.projectId,
signal(paymentId),
);

await this.router.navigate([
'/',
Expand All @@ -190,8 +197,6 @@ export class CreatePaymentComponent {
this.toastService.showToast({
detail: $localize`Payment created.`,
});

void this.paymentApiService.invalidateCache(this.projectId);
},
onError: (error) => {
this.toastService.showToast({
Expand Down

0 comments on commit 6850484

Please sign in to comment.