taxtank-core 0.22.0 → 0.22.1

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.
@@ -166,7 +166,7 @@
166
166
  });
167
167
  // clone request to add new parameters
168
168
  var clonedReq = request.clone();
169
- if (!params.get('financialYear')) {
169
+ if (!params.get('financialYear') && !request.urlWithParams.includes('?financialYear')) {
170
170
  params = params.set('financialYear', localStorage.getItem('financialYear'));
171
171
  clonedReq = request.clone({
172
172
  params: params
@@ -14667,11 +14667,11 @@
14667
14667
  _this.cacheSubject.next(_this.cache);
14668
14668
  }));
14669
14669
  };
14670
- /**
14671
- * Run forecast update script on backend when user switched financial year
14672
- */
14673
- UserService.prototype.switchFinancialYear = function () {
14674
- return this.http.get(this.environment.apiV2 + "/financial-year/switch");
14670
+ UserService.prototype.switchFinancialYear = function (year) {
14671
+ return this.http.get(this.environment.apiV2 + "/financial-year/switch", { params: new i1.HttpParams({ fromString: "financialYear=" + year }) }).pipe(operators.map(function () {
14672
+ localStorage.setItem('financialYear', year.toString());
14673
+ window.location.reload();
14674
+ }));
14675
14675
  };
14676
14676
  /**
14677
14677
  * clear service cache