taxtank-core 1.0.9 → 1.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -16136,20 +16136,8 @@ class VehicleClaimService extends RestService$1 {
16136
16136
  }
16137
16137
  listenEvents() {
16138
16138
  this.eventDispatcherService.on([AppEventTypeEnum.VEHICLE_CLAIM_DETAILS_UPDATED]).subscribe(() => {
16139
- // @TODO it prevents updateWorkUsage (because cache is empty), need to make all changes either on front or back
16140
- // this.refreshCache();
16141
- });
16142
- }
16143
- /**
16144
- * Update workUsage for all vehicle claims if logbook best period changed
16145
- * @TODO Vik: Best period move this and related logic to backend
16146
- */
16147
- updateWorkUsage(bestLogbooks) {
16148
- const batch$ = (this.cache ?? []).map((claim) => {
16149
- const claimToUpdate = plainToClass(VehicleClaim, Object.assign({}, claim, { workUsage: bestLogbooks.getWorkUsage(claim) }));
16150
- return this.put(claimToUpdate);
16139
+ this.refreshCache();
16151
16140
  });
16152
- return combineLatest(batch$);
16153
16141
  }
16154
16142
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.2", ngImport: i0, type: VehicleClaimService, deps: [{ token: 'environment' }], target: i0.ɵɵFactoryTarget.Injectable }); }
16155
16143
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.2", ngImport: i0, type: VehicleClaimService, providedIn: 'root' }); }