@esolve/ng-esolve-connect 0.20.8 → 0.20.9

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.
@@ -2,7 +2,7 @@ import * as i0 from '@angular/core';
2
2
  import { InjectionToken, PLATFORM_ID, Injectable, Inject, Optional, NgModule } from '@angular/core';
3
3
  import { isPlatformBrowser, CommonModule } from '@angular/common';
4
4
  import * as i1$2 from '@angular/common/http';
5
- import { HttpParams, HTTP_INTERCEPTORS, HttpClientModule, HttpErrorResponse, HttpHeaders } from '@angular/common/http';
5
+ import { HTTP_INTERCEPTORS, HttpClientModule, HttpErrorResponse, HttpParams, HttpHeaders } from '@angular/common/http';
6
6
  import * as i1 from 'ngx-cookie-service';
7
7
  import { CookieService } from 'ngx-cookie-service';
8
8
  import { BehaviorSubject, throwError, of, iif } from 'rxjs';
@@ -237,9 +237,8 @@ class EsolveAuthInterceptorService {
237
237
  intercept(req, next) {
238
238
  if (req.url.startsWith(`${this.config.api_url}/`)) {
239
239
  const service_identifier = req.url.replace(`${this.config.api_url}/`, '');
240
- const old_params_keys = req.params.keys();
241
240
  const modified_url = req.url;
242
- let params = new HttpParams();
241
+ let params = req.params;
243
242
  const session = this.session.currentSession;
244
243
  if (session.valid) {
245
244
  if (service_identifier !== 'get-access-token.php') {
@@ -247,9 +246,6 @@ class EsolveAuthInterceptorService {
247
246
  }
248
247
  }
249
248
  params = params.set('ws_id', this.config.wsid);
250
- old_params_keys.forEach(key => {
251
- params = params.set(key, req.params.get(key) || '');
252
- });
253
249
  const modified_req = req.clone({
254
250
  url: modified_url,
255
251
  params,
@@ -1809,8 +1805,8 @@ class EsolveLocation {
1809
1805
  this.userid = +record.userid;
1810
1806
  this.importance = +record.importance;
1811
1807
  this.active = !!+record.is_active;
1812
- this.dispatches_stock = record.dispatches_stock;
1813
- this.include_on_enquiries = record.dispatches_stock;
1808
+ this.dispatches_stock = !!+record.dispatches_stock;
1809
+ this.include_on_enquiries = !!+record.include_on_enquiries;
1814
1810
  this.website_url = record.website_url;
1815
1811
  this.address = new EsolveLocationAddress(record.street, record.suburb, record.city, record.province, record.country, record.postal_code, +record.latitude, +record.longitude);
1816
1812
  this.pobox_address = new EsolveLocationPOBoxAddress(record.pobox, record.pobox_city, record.pobox_postal_code);