Fix claim creation (#127)

This commit is contained in:
Rinat Arsaev 2022-08-24 11:03:31 +03:00 committed by GitHub
parent 516f21ab0b
commit 4e1b658e05
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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');