gunsmith-common 2.3.8 → 2.3.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.
@@ -1013,45 +1013,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
1013
1013
  args: ['env']
1014
1014
  }] }]; } });
1015
1015
 
1016
- class DealerService {
1016
+ class DealerService extends BaseService {
1017
1017
  constructor(http, env) {
1018
+ super(http);
1018
1019
  this.http = http;
1019
1020
  this.env = env;
1020
- this.url = this.env.baseUrl + 'api/dealers';
1021
- }
1022
- readDealers(includeInactive = false) {
1023
- return this.http.get(this.url, {
1024
- params: {
1025
- includeInactive: includeInactive.toString()
1026
- }
1027
- });
1028
- }
1029
- readDealer(id) {
1030
- return this.http.get(`${this.url}/${id}`);
1031
- }
1032
- createDealer(dealer) {
1033
- return this.http.post(this.url, dealer);
1034
- }
1035
- updateDealer(id, dealer) {
1036
- return this.http.put(`${this.url}/${id}`, dealer);
1037
- }
1038
- deleteDealer(id) {
1039
- return this.http.delete(`${this.url}/${id}`);
1021
+ this.urlSegments = [`${this.env.baseUrl}api/dealers`];
1040
1022
  }
1041
1023
  updateDealerCoupon(dealerId, couponId, dealerCoupon) {
1042
- return this.http.put(`${this.url}/${dealerId}/coupons/${couponId}`, dealerCoupon);
1024
+ return this.http.put(`${this.getUrl(dealerId)}/coupons/${couponId}`, dealerCoupon);
1025
+ }
1026
+ sendExpiredEmail() {
1027
+ return this.http.get(`${this.getUrl()}/expired-email`);
1043
1028
  }
1044
1029
  }
1045
- DealerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DealerService, deps: [{ token: i1.HttpClient }, { token: 'env' }], target: i0.ɵɵFactoryTarget.Injectable });
1046
- DealerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DealerService, providedIn: 'root' });
1030
+ DealerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DealerService, deps: [{ token: i1.HttpClient }, { token: "env" }], target: i0.ɵɵFactoryTarget.Injectable });
1031
+ DealerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DealerService, providedIn: "root" });
1047
1032
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DealerService, decorators: [{
1048
1033
  type: Injectable,
1049
1034
  args: [{
1050
- providedIn: 'root'
1035
+ providedIn: "root",
1051
1036
  }]
1052
1037
  }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: undefined, decorators: [{
1053
1038
  type: Inject,
1054
- args: ['env']
1039
+ args: ["env"]
1055
1040
  }] }]; } });
1056
1041
 
1057
1042
  class FileUploadService {
@@ -1731,6 +1716,9 @@ class SightService extends BaseService {
1731
1716
  this.env = env;
1732
1717
  this.urlSegments = [`${this.env.baseUrl}api/sights`];
1733
1718
  }
1719
+ getSightReport() {
1720
+ return this.http.get(`${this.env.baseUrl}api/sights/report`);
1721
+ }
1734
1722
  }
1735
1723
  SightService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SightService, deps: [{ token: i1.HttpClient }, { token: "env" }], target: i0.ɵɵFactoryTarget.Injectable });
1736
1724
  SightService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SightService, providedIn: 'root' });