claim_id fix (#70)

This commit is contained in:
Denis Ezhov 2019-03-19 18:14:01 +03:00 committed by GitHub
parent 923288d432
commit d99a693c26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -55,7 +55,7 @@ export class ClaimInfoComponent implements OnInit {
claimInfo => {
const editEndpoint = `/claims/${claimInfo.party_id}/${
ClaimActionType.edit
}/${claimInfo.party_id}`;
}/${claimInfo.claim_id}`;
this.router.navigate([editEndpoint]).then(() => this.success());
},
e => this.failed(e)

View File

@ -99,6 +99,7 @@ export class ClaimService {
}
saveChanges(): Observable<void> {
this.isLoading$.next(true);
const { partyId, claimId } = this.claimInfoContainer;
const units = this.toModificationUnits(this.containers);
return this.papiClaimService.getClaim(partyId, claimId).pipe(
@ -107,7 +108,8 @@ export class ClaimService {
.updateClaim(partyId, claimId, claimInfo.revision, units)
.pipe(map(() => claimInfo.revision))
),
switchMap(revision => this.pollClaimChange(revision))
switchMap(revision => this.pollClaimChange(revision)),
tap(() => this.isLoading$.next(false))
);
}