diff --git a/src/app/claim/claim-info/claim-info.component.ts b/src/app/claim/claim-info/claim-info.component.ts index b0448812..84cc2d88 100644 --- a/src/app/claim/claim-info/claim-info.component.ts +++ b/src/app/claim/claim-info/claim-info.component.ts @@ -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) diff --git a/src/app/claim/claim.service.ts b/src/app/claim/claim.service.ts index 6bfb4a95..6050c1cd 100644 --- a/src/app/claim/claim.service.ts +++ b/src/app/claim/claim.service.ts @@ -99,6 +99,7 @@ export class ClaimService { } saveChanges(): Observable { + 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)) ); }