From 4e1b658e0577b5c8f345f4835ce63d20ceea8a36 Mon Sep 17 00:00:00 2001 From: Rinat Arsaev <11846445+A77AY@users.noreply.github.com> Date: Wed, 24 Aug 2022 11:03:31 +0300 Subject: [PATCH] Fix claim creation (#127) --- .../create-claim-dialog/create-claim-dialog.component.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/app/sections/search-claims/components/create-claim-dialog/create-claim-dialog.component.ts b/src/app/sections/search-claims/components/create-claim-dialog/create-claim-dialog.component.ts index 826f1596..296c1a60 100644 --- a/src/app/sections/search-claims/components/create-claim-dialog/create-claim-dialog.component.ts +++ b/src/app/sections/search-claims/components/create-claim-dialog/create-claim-dialog.component.ts @@ -34,15 +34,13 @@ export class CreateClaimDialogComponent extends BaseDialogSuperclass< create() { this.claimService - .CreateClaim(this.dialogData.partyId, []) + .CreateClaim(this.control.value, []) .pipe(progressTo(this.progress$), untilDestroyed(this)) .subscribe({ next: (claim) => { this.notificationService.success('Claim successfully created'); + void this.router.navigate([`party/${claim.party_id}/claim/${claim.id}`]); this.closeWithSuccess(); - void this.router.navigate([ - `party/${this.dialogData.partyId}/claim/${claim.id}`, - ]); }, error: (err) => { this.errorService.error(err, 'An error occurred while claim creation');