gunsmith-common 2.2.5 → 2.2.7

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.
Files changed (48) hide show
  1. package/esm2020/notification/notification-bar/notification-bar.component.mjs +3 -3
  2. package/esm2020/shared/controls/package-selector/package-selector.component.mjs +18 -6
  3. package/esm2020/shared/services/base.service.mjs +43 -0
  4. package/esm2020/shared/services/file-upload.service.mjs +1 -6
  5. package/esm2020/shared/services/index.mjs +6 -1
  6. package/esm2020/shared/services/quickbooks.service.mjs +30 -0
  7. package/esm2020/shared/services/work-order-discount.service.mjs +25 -0
  8. package/esm2020/shared/services/work-order-non-inventory-item.service.mjs +25 -0
  9. package/esm2020/shared/services/work-order-shipping-item.service.mjs +25 -0
  10. package/esm2020/shared/types/index.mjs +4 -1
  11. package/esm2020/shared/types/inventory-item.mjs +4 -1
  12. package/esm2020/shared/types/milling-type.mjs +1 -1
  13. package/esm2020/shared/types/package-optional-item.mjs +1 -1
  14. package/esm2020/shared/types/package-variation-option.mjs +1 -1
  15. package/esm2020/shared/types/package-variation.mjs +1 -1
  16. package/esm2020/shared/types/package.mjs +1 -1
  17. package/esm2020/shared/types/refinish-code.mjs +1 -1
  18. package/esm2020/shared/types/waitlist-gun.mjs +2 -1
  19. package/esm2020/shared/types/work-order-discount.mjs +4 -0
  20. package/esm2020/shared/types/work-order-non-inventory-item.mjs +3 -0
  21. package/esm2020/shared/types/work-order-shipping-item.mjs +3 -0
  22. package/fesm2015/gunsmith-common.mjs +167 -14
  23. package/fesm2015/gunsmith-common.mjs.map +1 -1
  24. package/fesm2020/gunsmith-common.mjs +159 -14
  25. package/fesm2020/gunsmith-common.mjs.map +1 -1
  26. package/gunsmith-common-2.2.7.tgz +0 -0
  27. package/package.json +1 -1
  28. package/shared/controls/package-selector/package-selector.component.d.ts +2 -1
  29. package/shared/services/base.service.d.ts +16 -0
  30. package/shared/services/file-upload.service.d.ts +0 -1
  31. package/shared/services/index.d.ts +5 -0
  32. package/shared/services/quickbooks.service.d.ts +12 -0
  33. package/shared/services/work-order-discount.service.d.ts +11 -0
  34. package/shared/services/work-order-non-inventory-item.service.d.ts +11 -0
  35. package/shared/services/work-order-shipping-item.service.d.ts +11 -0
  36. package/shared/types/index.d.ts +3 -0
  37. package/shared/types/inventory-item.d.ts +1 -0
  38. package/shared/types/milling-type.d.ts +1 -0
  39. package/shared/types/package-optional-item.d.ts +4 -0
  40. package/shared/types/package-variation-option.d.ts +4 -0
  41. package/shared/types/package-variation.d.ts +1 -0
  42. package/shared/types/package.d.ts +1 -0
  43. package/shared/types/refinish-code.d.ts +1 -0
  44. package/shared/types/waitlist-gun.d.ts +1 -0
  45. package/shared/types/work-order-discount.d.ts +8 -0
  46. package/shared/types/work-order-non-inventory-item.d.ts +8 -0
  47. package/shared/types/work-order-shipping-item.d.ts +7 -0
  48. package/gunsmith-common-2.2.5.tgz +0 -0
@@ -0,0 +1,4 @@
1
+ export class WorkOrderDiscount {
2
+ constructor() { }
3
+ }
4
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid29yay1vcmRlci1kaXNjb3VudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2d1bnNtaXRoLWNvbW1vbi9zcmMvc2hhcmVkL3R5cGVzL3dvcmstb3JkZXItZGlzY291bnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsTUFBTSxPQUFPLGlCQUFpQjtJQUMxQixnQkFBZ0IsQ0FBQztDQU9wQiIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBjbGFzcyBXb3JrT3JkZXJEaXNjb3VudCB7XG4gICAgY29uc3RydWN0b3IoKSB7IH1cbiAgICBcbiAgICBpZDogbnVtYmVyO1xuICAgIHdvcmtPcmRlcklkOiBudW1iZXI7XG4gICAgYW1vdW50OiBudW1iZXI7XG4gICAgZGVzY3JpcHRpb246IHN0cmluZztcbiAgICB0aW1lc3RhbXA6IHN0cmluZztcbn0iXX0=
@@ -0,0 +1,3 @@
1
+ export class WorkOrderNonInventoryItem {
2
+ }
3
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid29yay1vcmRlci1ub24taW52ZW50b3J5LWl0ZW0uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9ndW5zbWl0aC1jb21tb24vc3JjL3NoYXJlZC90eXBlcy93b3JrLW9yZGVyLW5vbi1pbnZlbnRvcnktaXRlbS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxNQUFNLE9BQU8seUJBQXlCO0NBT3JDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGNsYXNzIFdvcmtPcmRlck5vbkludmVudG9yeUl0ZW0ge1xuICAgIGlkOiBudW1iZXI7XG4gICAgd29ya09yZGVySWQ6IG51bWJlcjtcbiAgICBkZXNjcmlwdGlvbjogc3RyaW5nO1xuICAgIHByaWNlOiBudW1iZXI7XG4gICAgcXVhbnRpdHk6IG51bWJlcjtcbiAgICB0aW1lc3RhbXA6IHN0cmluZztcbn0iXX0=
@@ -0,0 +1,3 @@
1
+ export class WorkOrderShippingItem {
2
+ }
3
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid29yay1vcmRlci1zaGlwcGluZy1pdGVtLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvZ3Vuc21pdGgtY29tbW9uL3NyYy9zaGFyZWQvdHlwZXMvd29yay1vcmRlci1zaGlwcGluZy1pdGVtLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE1BQU0sT0FBTyxxQkFBcUI7Q0FNakMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgY2xhc3MgV29ya09yZGVyU2hpcHBpbmdJdGVtIHtcbiAgICBpZDogbnVtYmVyO1xuICAgIHdvcmtPcmRlcklkOiBudW1iZXI7XG4gICAgc2hpcHBpbmdDb3N0OiBudW1iZXI7XG4gICAgZGVzY3JpcHRpb246IG51bWJlcjtcbiAgICB0aW1lc3RhbXA6IHN0cmluZztcbn0iXX0=
@@ -2,7 +2,7 @@ import { DateTime } from 'luxon';
2
2
  import * as i0 from '@angular/core';
3
3
  import { Injectable, Inject, Pipe, Directive, Input, Component, NgModule } from '@angular/core';
4
4
  import * as i1 from '@angular/common/http';
5
- import { of, Subject } from 'rxjs';
5
+ import { of, switchMap as switchMap$1, Subject } from 'rxjs';
6
6
  import { switchMap } from 'rxjs/operators';
7
7
  import * as i2 from '@angular/forms';
8
8
  import { NgControl, Validators, NG_VALUE_ACCESSOR, NG_VALIDATORS, FormsModule, ReactiveFormsModule } from '@angular/forms';
@@ -143,6 +143,7 @@ class WaitlistGun {
143
143
  this.refinish = false;
144
144
  this.milling = false;
145
145
  this.specialOrder = false;
146
+ this.shippingLabel = false;
146
147
  this.refinishDetails = [];
147
148
  }
148
149
  }
@@ -388,6 +389,9 @@ class TotalItem {
388
389
 
389
390
  class InventoryItem {
390
391
  constructor() {
392
+ this.price = 0;
393
+ this.count = 0;
394
+ this.orderPoint = 0;
391
395
  this.active = true;
392
396
  }
393
397
  }
@@ -455,6 +459,16 @@ class RefinishCode {
455
459
  class WorkOrderListItem {
456
460
  }
457
461
 
462
+ class WorkOrderShippingItem {
463
+ }
464
+
465
+ class WorkOrderDiscount {
466
+ constructor() { }
467
+ }
468
+
469
+ class WorkOrderNonInventoryItem {
470
+ }
471
+
458
472
  function adjustHoliday(finishDate, holidays) {
459
473
  while (holidays.map(h => new Date(h.holiday)).findIndex(h => DateTime.fromJSDate(h) === DateTime.fromJSDate(finishDate)) !== -1) {
460
474
  do {
@@ -1011,11 +1025,6 @@ class FileUploadService {
1011
1025
  deleteFile(fileName) {
1012
1026
  return this.http.delete(`${this.url}/${fileName}`);
1013
1027
  }
1014
- saveFile(file) {
1015
- const formData = new FormData();
1016
- formData.append('fileKey', file, file.name);
1017
- return this.http.post(this.url, formData, { responseType: "text" });
1018
- }
1019
1028
  retrieveFile(fileName) {
1020
1029
  return this.http.get(`${this.url}/${fileName}`, { responseType: 'blob' })
1021
1030
  .pipe(switchMap((response) => {
@@ -1730,6 +1739,138 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
1730
1739
  }] }];
1731
1740
  } });
1732
1741
 
1742
+ class BaseService {
1743
+ constructor(http) {
1744
+ this.http = http;
1745
+ }
1746
+ getUrl(...params) {
1747
+ let baseUrl = this.urlSegments[0];
1748
+ for (let i = 0; i < params.length; i++) {
1749
+ baseUrl += `/${params[i]}`;
1750
+ if (this.urlSegments.length > i + 1) {
1751
+ baseUrl += `/${this.urlSegments[i + 1]}`;
1752
+ }
1753
+ }
1754
+ return baseUrl;
1755
+ }
1756
+ getAll(...params) {
1757
+ return this.http.get(this.getUrl(...params));
1758
+ }
1759
+ get(...params) {
1760
+ return this.http.get(this.getUrl(...params));
1761
+ }
1762
+ create(item, ...params) {
1763
+ return this.http.post(this.getUrl(...params), item);
1764
+ }
1765
+ update(item, ...params) {
1766
+ return this.http.put(this.getUrl(...params), item);
1767
+ }
1768
+ delete(...params) {
1769
+ return this.http.delete(this.getUrl(...params));
1770
+ }
1771
+ }
1772
+ BaseService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: BaseService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
1773
+ BaseService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: BaseService, providedIn: 'root' });
1774
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: BaseService, decorators: [{
1775
+ type: Injectable,
1776
+ args: [{
1777
+ providedIn: 'root'
1778
+ }]
1779
+ }], ctorParameters: function () { return [{ type: i1.HttpClient }]; } });
1780
+
1781
+ class WorkOrderShippingItemService extends BaseService {
1782
+ constructor(http, env) {
1783
+ super(http);
1784
+ this.http = http;
1785
+ this.env = env;
1786
+ this.urlSegments = [`${this.env.baseUrl}api/work-orders`, 'shipping-items'];
1787
+ }
1788
+ }
1789
+ WorkOrderShippingItemService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: WorkOrderShippingItemService, deps: [{ token: i1.HttpClient }, { token: 'env' }], target: i0.ɵɵFactoryTarget.Injectable });
1790
+ WorkOrderShippingItemService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: WorkOrderShippingItemService, providedIn: 'root' });
1791
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: WorkOrderShippingItemService, decorators: [{
1792
+ type: Injectable,
1793
+ args: [{
1794
+ providedIn: 'root'
1795
+ }]
1796
+ }], ctorParameters: function () {
1797
+ return [{ type: i1.HttpClient }, { type: undefined, decorators: [{
1798
+ type: Inject,
1799
+ args: ['env']
1800
+ }] }];
1801
+ } });
1802
+
1803
+ class WorkOrderDiscountService extends BaseService {
1804
+ constructor(http, env) {
1805
+ super(http);
1806
+ this.http = http;
1807
+ this.env = env;
1808
+ this.urlSegments = [`${this.env.baseUrl}api/work-orders`, 'discounts'];
1809
+ }
1810
+ }
1811
+ WorkOrderDiscountService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: WorkOrderDiscountService, deps: [{ token: i1.HttpClient }, { token: 'env' }], target: i0.ɵɵFactoryTarget.Injectable });
1812
+ WorkOrderDiscountService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: WorkOrderDiscountService, providedIn: 'root' });
1813
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: WorkOrderDiscountService, decorators: [{
1814
+ type: Injectable,
1815
+ args: [{
1816
+ providedIn: 'root'
1817
+ }]
1818
+ }], ctorParameters: function () {
1819
+ return [{ type: i1.HttpClient }, { type: undefined, decorators: [{
1820
+ type: Inject,
1821
+ args: ['env']
1822
+ }] }];
1823
+ } });
1824
+
1825
+ class QuickbooksService {
1826
+ constructor(http, env) {
1827
+ this.http = http;
1828
+ this.env = env;
1829
+ this.url = this.env.baseUrl + 'api/quickbooks';
1830
+ }
1831
+ getQwcFile() {
1832
+ return this.http.get(`${this.url}`, { responseType: 'blob' })
1833
+ .pipe(switchMap$1((response) => {
1834
+ return of(new File([response], 'GunSmith.qwc', { type: response.type }));
1835
+ }));
1836
+ }
1837
+ }
1838
+ QuickbooksService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: QuickbooksService, deps: [{ token: i1.HttpClient }, { token: 'env' }], target: i0.ɵɵFactoryTarget.Injectable });
1839
+ QuickbooksService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: QuickbooksService, providedIn: 'root' });
1840
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: QuickbooksService, decorators: [{
1841
+ type: Injectable,
1842
+ args: [{
1843
+ providedIn: 'root'
1844
+ }]
1845
+ }], ctorParameters: function () {
1846
+ return [{ type: i1.HttpClient }, { type: undefined, decorators: [{
1847
+ type: Inject,
1848
+ args: ['env']
1849
+ }] }];
1850
+ } });
1851
+
1852
+ class WorkOrderNonInventoryItemService extends BaseService {
1853
+ constructor(http, env) {
1854
+ super(http);
1855
+ this.http = http;
1856
+ this.env = env;
1857
+ this.urlSegments = [`${this.env.baseUrl}api/work-orders`, 'non-inventory-items'];
1858
+ }
1859
+ }
1860
+ WorkOrderNonInventoryItemService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: WorkOrderNonInventoryItemService, deps: [{ token: i1.HttpClient }, { token: 'env' }], target: i0.ɵɵFactoryTarget.Injectable });
1861
+ WorkOrderNonInventoryItemService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: WorkOrderNonInventoryItemService, providedIn: 'root' });
1862
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: WorkOrderNonInventoryItemService, decorators: [{
1863
+ type: Injectable,
1864
+ args: [{
1865
+ providedIn: 'root'
1866
+ }]
1867
+ }], ctorParameters: function () {
1868
+ return [{ type: i1.HttpClient }, { type: undefined, decorators: [{
1869
+ type: Inject,
1870
+ args: ['env']
1871
+ }] }];
1872
+ } });
1873
+
1733
1874
  class PhonePipe {
1734
1875
  transform(value, args) {
1735
1876
  if (value && value.length >= 10) {
@@ -1881,6 +2022,7 @@ class PackageSelectorComponent {
1881
2022
  this.packageService = packageService;
1882
2023
  this.fb = fb;
1883
2024
  this.inj = inj;
2025
+ this.gunsmithOnly = false;
1884
2026
  this.packages = [];
1885
2027
  this.packageVariations = [];
1886
2028
  this.packageOptionalItems = [];
@@ -1931,6 +2073,12 @@ class PackageSelectorComponent {
1931
2073
  optionalItems: this.fb.control([]),
1932
2074
  variations: this.fb.array([])
1933
2075
  });
2076
+ this.packageForm.controls.variations.valueChanges
2077
+ .subscribe(value => {
2078
+ if (value) {
2079
+ this.packageForm.controls.variations.setValue(value.map(v => v.id ? v : null), { emitEvent: false });
2080
+ }
2081
+ });
1934
2082
  this.packageForm.controls.package.valueChanges
1935
2083
  .subscribe(value => {
1936
2084
  this.packageForm.controls.optionalItems.reset();
@@ -1952,11 +2100,14 @@ class PackageSelectorComponent {
1952
2100
  setPackageOptions(packagez) {
1953
2101
  var _a, _b;
1954
2102
  this.packageOptionalItems = packagez.optionalItems;
1955
- this.packageVariations = packagez.variations;
2103
+ this.packageVariations = this.gunsmithOnly ? packagez.variations : packagez.variations.filter(v => !v.gunsmithOnly);
1956
2104
  this.variations.clear({ emitEvent: false });
1957
2105
  for (let v of this.packageVariations) {
1958
2106
  let selectedVariation = (_b = (_a = this.packageDetail) === null || _a === void 0 ? void 0 : _a.variations) === null || _b === void 0 ? void 0 : _b.find(pv => pv.packageVariationId === v.id);
1959
- this.variations.push(this.fb.control(selectedVariation, Validators.required), { emitEvent: false });
2107
+ if (v.gunsmithOnly)
2108
+ this.variations.push(this.fb.control(selectedVariation), { emitEvent: false });
2109
+ else
2110
+ this.variations.push(this.fb.control(selectedVariation, Validators.required), { emitEvent: false });
1960
2111
  }
1961
2112
  }
1962
2113
  setValue(packageDetail) {
@@ -2009,7 +2160,7 @@ class PackageSelectorComponent {
2009
2160
  }
2010
2161
  }
2011
2162
  PackageSelectorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PackageSelectorComponent, deps: [{ token: PackageService }, { token: i2.FormBuilder }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
2012
- PackageSelectorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: PackageSelectorComponent, selector: "cgw-package-selector", inputs: { firearmId: "firearmId", projectType: "projectType" }, providers: [
2163
+ PackageSelectorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: PackageSelectorComponent, selector: "cgw-package-selector", inputs: { firearmId: "firearmId", projectType: "projectType", gunsmithOnly: "gunsmithOnly" }, providers: [
2013
2164
  {
2014
2165
  provide: NG_VALUE_ACCESSOR,
2015
2166
  multi: true,
@@ -2020,7 +2171,7 @@ PackageSelectorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0
2020
2171
  multi: true,
2021
2172
  useExisting: PackageSelectorComponent
2022
2173
  }
2023
- ], usesOnChanges: true, ngImport: i0, template: "<div [formGroup]=\"packageForm\">\n <div class=\"row mb-2\">\n <div class=\"col\">\n <label for=\"waitlist-gun-package\">Package - <span class=\"fst-italic fs-7\">Select a model to list available packages</span></label>\n <kendo-dropdownlist [data]=\"packages\"\n [defaultItem]=\"{name: 'No Package', id: null}\"\n id=\"waitlist-gun-package\"\n formControlName=\"package\"\n textField=\"name\"\n valueField=\"id\"\n size=\"small\"></kendo-dropdownlist>\n </div>\n </div>\n <div formArrayName=\"variations\" *ngFor=\"let variationControl of variations.controls; let i = index\">\n <div class=\"row mb-2\">\n <div class=\"col\">\n <label [for]=\"'waitlist-gun-package-variation-' + i\">{{packageVariations[i]?.name}}</label>\n <kendo-dropdownlist [data]=\"packageVariations[i]?.options\"\n [id]=\"'waitlist-gun-package-variation-' + i\"\n textField=\"optionName\"\n [formControl]=\"variationControl\"\n valueField=\"id\"\n size=\"small\"></kendo-dropdownlist>\n </div>\n </div>\n <div *ngIf=\"variationControl.invalid && (variationControl.dirty || variationControl.touched)\" class=\"error-container text-danger\">\n <div *ngIf=\"variationControl.errors.required\">\n {{packageVariations[i]?.name}} is required.\n </div>\n </div>\n </div>\n <div class=\"row mb-2\" *ngIf=\"packageOptionalItems?.length\">\n <div class=\"col\">\n <label for=\"waitlist-gun-package-addons\">Add-ons (Additional charges will apply)</label>\n <kendo-multiselect id=\"waitlist-gun-package-addons\"\n [data]=\"packageOptionalItems\"\n formControlName=\"optionalItems\"\n textField=\"name\"\n valueField=\"inventoryItemId\"\n size=\"small\"></kendo-multiselect>\n </div>\n </div>\n</div>\n", styles: [""], components: [{ type: i3.DropDownListComponent, selector: "kendo-dropdownlist", inputs: ["iconClass", "loading", "data", "value", "textField", "valueField", "popupSettings", "listHeight", "defaultItem", "disabled", "itemDisabled", "readonly", "filterable", "virtual", "ignoreCase", "delay", "valuePrimitive", "tabindex", "tabIndex", "size", "rounded", "fillMode", "id"], outputs: ["valueChange", "filterChange", "selectionChange", "open", "opened", "close", "closed", "focus", "blur"], exportAs: ["kendoDropDownList"] }, { type: i3.MultiSelectComponent, selector: "kendo-multiselect", inputs: ["focusableId", "autoClose", "loading", "data", "value", "valueField", "textField", "tabindex", "tabIndex", "size", "rounded", "fillMode", "placeholder", "disabled", "itemDisabled", "checkboxes", "readonly", "filterable", "virtual", "popupSettings", "listHeight", "valuePrimitive", "clearButton", "tagMapper", "allowCustom", "valueNormalizer"], outputs: ["filterChange", "valueChange", "open", "opened", "close", "closed", "focus", "blur", "removeTag"], exportAs: ["kendoMultiSelect"] }], directives: [{ type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
2174
+ ], usesOnChanges: true, ngImport: i0, template: "<div [formGroup]=\"packageForm\">\n <div class=\"row mb-2\">\n <div class=\"col\">\n <label for=\"waitlist-gun-package\">Package - <span class=\"fst-italic fs-7\">Select a model to list available packages</span></label>\n <kendo-dropdownlist [data]=\"packages\"\n [defaultItem]=\"{name: 'No Package', id: null}\"\n id=\"waitlist-gun-package\"\n formControlName=\"package\"\n textField=\"name\"\n valueField=\"id\"\n size=\"small\"></kendo-dropdownlist>\n </div>\n </div>\n <div formArrayName=\"variations\" *ngFor=\"let variationControl of variations.controls; let i = index\">\n <div class=\"row mb-2\">\n <div class=\"col\">\n <label [for]=\"'waitlist-gun-package-variation-' + i\">{{packageVariations[i]?.name}}</label>\n <kendo-dropdownlist [data]=\"packageVariations[i]?.options\"\n [id]=\"'waitlist-gun-package-variation-' + i\"\n [defaultItem]=\"{optionName: '', id: null}\"\n textField=\"optionName\"\n [formControl]=\"variationControl\"\n valueField=\"id\"\n size=\"small\" *ngIf=\"packageVariations[i]?.gunsmithOnly\">\n <ng-template kendoDropDownListItemTemplate let-dataItem>\n <span class=\"fw-bold\">{{ dataItem?.sku }}</span> - {{ dataItem?.optionName }} <span *ngIf=\"dataItem?.serviceChargeItemPrice\">(add ${{dataItem.serviceChargeItemPrice.toFixed(2)}})</span>\n </ng-template>\n </kendo-dropdownlist>\n <kendo-dropdownlist [data]=\"packageVariations[i]?.options\"\n [id]=\"'waitlist-gun-package-variation-' + i\"\n textField=\"optionName\"\n [formControl]=\"variationControl\"\n valueField=\"id\"\n size=\"small\" *ngIf=\"!packageVariations[i]?.gunsmithOnly\">\n <ng-template kendoDropDownListItemTemplate let-dataItem>\n <span class=\"fw-bold\">{{ dataItem?.sku }}</span> - {{ dataItem?.optionName }} <span *ngIf=\"dataItem?.serviceChargeItemPrice\">(add ${{dataItem.serviceChargeItemPrice.toFixed(2)}})</span>\n </ng-template>\n </kendo-dropdownlist>\n </div>\n </div>\n <div *ngIf=\"variationControl.invalid && (variationControl.dirty || variationControl.touched)\" class=\"error-container text-danger\">\n <div *ngIf=\"variationControl.errors.required\">\n {{packageVariations[i]?.name}} is required.\n </div>\n </div>\n </div>\n <div class=\"row mb-2\" *ngIf=\"packageOptionalItems?.length\">\n <div class=\"col\">\n <label for=\"waitlist-gun-package-addons\">Add-ons (Additional charges will apply)</label>\n <kendo-multiselect id=\"waitlist-gun-package-addons\"\n [data]=\"packageOptionalItems\"\n formControlName=\"optionalItems\"\n textField=\"name\"\n valueField=\"inventoryItemId\"\n size=\"small\">\n <ng-template kendoMultiSelectItemTemplate let-dataItem>\n <span class=\"fw-bold\">{{ dataItem?.sku }}</span> - {{ dataItem?.name }}\n </ng-template>\n </kendo-multiselect>\n </div>\n </div>\n</div>\n", styles: [""], components: [{ type: i3.DropDownListComponent, selector: "kendo-dropdownlist", inputs: ["iconClass", "loading", "data", "value", "textField", "valueField", "popupSettings", "listHeight", "defaultItem", "disabled", "itemDisabled", "readonly", "filterable", "virtual", "ignoreCase", "delay", "valuePrimitive", "tabindex", "tabIndex", "size", "rounded", "fillMode", "id"], outputs: ["valueChange", "filterChange", "selectionChange", "open", "opened", "close", "closed", "focus", "blur"], exportAs: ["kendoDropDownList"] }, { type: i3.MultiSelectComponent, selector: "kendo-multiselect", inputs: ["focusableId", "autoClose", "loading", "data", "value", "valueField", "textField", "tabindex", "tabIndex", "size", "rounded", "fillMode", "placeholder", "disabled", "itemDisabled", "checkboxes", "readonly", "filterable", "virtual", "popupSettings", "listHeight", "valuePrimitive", "clearButton", "tagMapper", "allowCustom", "valueNormalizer"], outputs: ["filterChange", "valueChange", "open", "opened", "close", "closed", "focus", "blur", "removeTag"], exportAs: ["kendoMultiSelect"] }], directives: [{ type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { type: i3.ItemTemplateDirective, selector: "[kendoDropDownListItemTemplate],[kendoComboBoxItemTemplate],[kendoAutoCompleteItemTemplate],[kendoMultiSelectItemTemplate]" }] });
2024
2175
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PackageSelectorComponent, decorators: [{
2025
2176
  type: Component,
2026
2177
  args: [{ selector: 'cgw-package-selector', providers: [
@@ -2034,11 +2185,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
2034
2185
  multi: true,
2035
2186
  useExisting: PackageSelectorComponent
2036
2187
  }
2037
- ], template: "<div [formGroup]=\"packageForm\">\n <div class=\"row mb-2\">\n <div class=\"col\">\n <label for=\"waitlist-gun-package\">Package - <span class=\"fst-italic fs-7\">Select a model to list available packages</span></label>\n <kendo-dropdownlist [data]=\"packages\"\n [defaultItem]=\"{name: 'No Package', id: null}\"\n id=\"waitlist-gun-package\"\n formControlName=\"package\"\n textField=\"name\"\n valueField=\"id\"\n size=\"small\"></kendo-dropdownlist>\n </div>\n </div>\n <div formArrayName=\"variations\" *ngFor=\"let variationControl of variations.controls; let i = index\">\n <div class=\"row mb-2\">\n <div class=\"col\">\n <label [for]=\"'waitlist-gun-package-variation-' + i\">{{packageVariations[i]?.name}}</label>\n <kendo-dropdownlist [data]=\"packageVariations[i]?.options\"\n [id]=\"'waitlist-gun-package-variation-' + i\"\n textField=\"optionName\"\n [formControl]=\"variationControl\"\n valueField=\"id\"\n size=\"small\"></kendo-dropdownlist>\n </div>\n </div>\n <div *ngIf=\"variationControl.invalid && (variationControl.dirty || variationControl.touched)\" class=\"error-container text-danger\">\n <div *ngIf=\"variationControl.errors.required\">\n {{packageVariations[i]?.name}} is required.\n </div>\n </div>\n </div>\n <div class=\"row mb-2\" *ngIf=\"packageOptionalItems?.length\">\n <div class=\"col\">\n <label for=\"waitlist-gun-package-addons\">Add-ons (Additional charges will apply)</label>\n <kendo-multiselect id=\"waitlist-gun-package-addons\"\n [data]=\"packageOptionalItems\"\n formControlName=\"optionalItems\"\n textField=\"name\"\n valueField=\"inventoryItemId\"\n size=\"small\"></kendo-multiselect>\n </div>\n </div>\n</div>\n", styles: [""] }]
2188
+ ], template: "<div [formGroup]=\"packageForm\">\n <div class=\"row mb-2\">\n <div class=\"col\">\n <label for=\"waitlist-gun-package\">Package - <span class=\"fst-italic fs-7\">Select a model to list available packages</span></label>\n <kendo-dropdownlist [data]=\"packages\"\n [defaultItem]=\"{name: 'No Package', id: null}\"\n id=\"waitlist-gun-package\"\n formControlName=\"package\"\n textField=\"name\"\n valueField=\"id\"\n size=\"small\"></kendo-dropdownlist>\n </div>\n </div>\n <div formArrayName=\"variations\" *ngFor=\"let variationControl of variations.controls; let i = index\">\n <div class=\"row mb-2\">\n <div class=\"col\">\n <label [for]=\"'waitlist-gun-package-variation-' + i\">{{packageVariations[i]?.name}}</label>\n <kendo-dropdownlist [data]=\"packageVariations[i]?.options\"\n [id]=\"'waitlist-gun-package-variation-' + i\"\n [defaultItem]=\"{optionName: '', id: null}\"\n textField=\"optionName\"\n [formControl]=\"variationControl\"\n valueField=\"id\"\n size=\"small\" *ngIf=\"packageVariations[i]?.gunsmithOnly\">\n <ng-template kendoDropDownListItemTemplate let-dataItem>\n <span class=\"fw-bold\">{{ dataItem?.sku }}</span> - {{ dataItem?.optionName }} <span *ngIf=\"dataItem?.serviceChargeItemPrice\">(add ${{dataItem.serviceChargeItemPrice.toFixed(2)}})</span>\n </ng-template>\n </kendo-dropdownlist>\n <kendo-dropdownlist [data]=\"packageVariations[i]?.options\"\n [id]=\"'waitlist-gun-package-variation-' + i\"\n textField=\"optionName\"\n [formControl]=\"variationControl\"\n valueField=\"id\"\n size=\"small\" *ngIf=\"!packageVariations[i]?.gunsmithOnly\">\n <ng-template kendoDropDownListItemTemplate let-dataItem>\n <span class=\"fw-bold\">{{ dataItem?.sku }}</span> - {{ dataItem?.optionName }} <span *ngIf=\"dataItem?.serviceChargeItemPrice\">(add ${{dataItem.serviceChargeItemPrice.toFixed(2)}})</span>\n </ng-template>\n </kendo-dropdownlist>\n </div>\n </div>\n <div *ngIf=\"variationControl.invalid && (variationControl.dirty || variationControl.touched)\" class=\"error-container text-danger\">\n <div *ngIf=\"variationControl.errors.required\">\n {{packageVariations[i]?.name}} is required.\n </div>\n </div>\n </div>\n <div class=\"row mb-2\" *ngIf=\"packageOptionalItems?.length\">\n <div class=\"col\">\n <label for=\"waitlist-gun-package-addons\">Add-ons (Additional charges will apply)</label>\n <kendo-multiselect id=\"waitlist-gun-package-addons\"\n [data]=\"packageOptionalItems\"\n formControlName=\"optionalItems\"\n textField=\"name\"\n valueField=\"inventoryItemId\"\n size=\"small\">\n <ng-template kendoMultiSelectItemTemplate let-dataItem>\n <span class=\"fw-bold\">{{ dataItem?.sku }}</span> - {{ dataItem?.name }}\n </ng-template>\n </kendo-multiselect>\n </div>\n </div>\n</div>\n", styles: [""] }]
2038
2189
  }], ctorParameters: function () { return [{ type: PackageService }, { type: i2.FormBuilder }, { type: i0.Injector }]; }, propDecorators: { firearmId: [{
2039
2190
  type: Input
2040
2191
  }], projectType: [{
2041
2192
  type: Input
2193
+ }], gunsmithOnly: [{
2194
+ type: Input
2042
2195
  }] } });
2043
2196
 
2044
2197
  class SharedModule {
@@ -2154,10 +2307,10 @@ class NotificationBarComponent {
2154
2307
  }
2155
2308
  }
2156
2309
  NotificationBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NotificationBarComponent, deps: [{ token: NotificationService }], target: i0.ɵɵFactoryTarget.Component });
2157
- NotificationBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: NotificationBarComponent, selector: "app-notification-bar", ngImport: i0, template: "<div class=\"notification-bar\" *ngIf=\"messages.length\">\n <div *ngFor=\"let message of viewMessages\" class=\"notification-pill\" [class.error]=\"message.type == 1\" [@fadeOutAnimation]=\"shouldFade()\">\n <i class=\"fa\" [ngClass]=\"getIconClass(message)\"></i> <span class=\"ms-1\">{{message.message}}</span>\n </div>\n <div *ngIf=\"messages.length > 3\" class=\"notification-pill\">{{messages.length - 2}} more...</div>\n</div>\n", styles: [".notification-bar{position:fixed;top:0;left:0;right:0;z-index:10001;pointer-events:none}.notification-bar .notification-pill{max-width:300px;margin:10px auto;border-radius:4px;color:#000;background:rgba(16,16,16,.4);padding:8px;text-align:center}.notification-bar .error{color:#711e16!important;background:rgba(248,216,212,.6)!important}\n"], directives: [{ type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], animations: [fadeOutAnimation] });
2310
+ NotificationBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: NotificationBarComponent, selector: "app-notification-bar", ngImport: i0, template: "<div class=\"notification-bar\" *ngIf=\"messages.length\">\n <div *ngFor=\"let message of viewMessages\" class=\"notification-pill\" [class.error]=\"message.type == 1\" [@fadeOutAnimation]=\"shouldFade()\">\n <i class=\"fa\" [ngClass]=\"getIconClass(message)\"></i> <span class=\"ms-1\">{{message.message}}</span>\n </div>\n <div *ngIf=\"messages.length > 3\" class=\"notification-pill\">{{messages.length - 2}} more...</div>\n</div>\n", styles: [".notification-bar{position:fixed;top:0;left:0;right:0;z-index:10001;pointer-events:none}.notification-bar .notification-pill{max-width:300px;margin:10px auto;border-radius:4px;color:#000;background:#181818;padding:8px;text-align:center;color:#fff}.notification-bar .error{color:#711e16!important;background:#f8d8d4!important}\n"], directives: [{ type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], animations: [fadeOutAnimation] });
2158
2311
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NotificationBarComponent, decorators: [{
2159
2312
  type: Component,
2160
- args: [{ selector: 'app-notification-bar', animations: [fadeOutAnimation], template: "<div class=\"notification-bar\" *ngIf=\"messages.length\">\n <div *ngFor=\"let message of viewMessages\" class=\"notification-pill\" [class.error]=\"message.type == 1\" [@fadeOutAnimation]=\"shouldFade()\">\n <i class=\"fa\" [ngClass]=\"getIconClass(message)\"></i> <span class=\"ms-1\">{{message.message}}</span>\n </div>\n <div *ngIf=\"messages.length > 3\" class=\"notification-pill\">{{messages.length - 2}} more...</div>\n</div>\n", styles: [".notification-bar{position:fixed;top:0;left:0;right:0;z-index:10001;pointer-events:none}.notification-bar .notification-pill{max-width:300px;margin:10px auto;border-radius:4px;color:#000;background:rgba(16,16,16,.4);padding:8px;text-align:center}.notification-bar .error{color:#711e16!important;background:rgba(248,216,212,.6)!important}\n"] }]
2313
+ args: [{ selector: 'app-notification-bar', animations: [fadeOutAnimation], template: "<div class=\"notification-bar\" *ngIf=\"messages.length\">\n <div *ngFor=\"let message of viewMessages\" class=\"notification-pill\" [class.error]=\"message.type == 1\" [@fadeOutAnimation]=\"shouldFade()\">\n <i class=\"fa\" [ngClass]=\"getIconClass(message)\"></i> <span class=\"ms-1\">{{message.message}}</span>\n </div>\n <div *ngIf=\"messages.length > 3\" class=\"notification-pill\">{{messages.length - 2}} more...</div>\n</div>\n", styles: [".notification-bar{position:fixed;top:0;left:0;right:0;z-index:10001;pointer-events:none}.notification-bar .notification-pill{max-width:300px;margin:10px auto;border-radius:4px;color:#000;background:#181818;padding:8px;text-align:center;color:#fff}.notification-bar .error{color:#711e16!important;background:#f8d8d4!important}\n"] }]
2161
2314
  }], ctorParameters: function () { return [{ type: NotificationService }]; } });
2162
2315
 
2163
2316
  class NotificationModule {
@@ -2196,5 +2349,5 @@ var NotificationType;
2196
2349
  * Generated bundle index. Do not edit.
2197
2350
  */
2198
2351
 
2199
- export { BundleItem, ChangeOrderStatus, Coating, CoatingService, CoatingValue, Configuration, ConfigurationService, Customer, CustomerService, Dealer, DealerContact, DealerCoupon, DealerService, DisableControlDirective, EnumPipe, FileNamePipe, FileUploadService, FilterOptions, Firearm, FirearmSeries, FirearmSeriesOptic, FirearmSeriesService, FirearmService, FrameMaterial, FrameMaterialPipe, GunCaliber, GunPart, GunPartOption, GunPartService, InventoryItem, InventoryService, JFile, Material, MaterialService, MillingDetail, MillingItem, MillingType, MillingTypeService, MountType, NewLinePipe, NotificationBarComponent, NotificationModule, NotificationService, NotificationType, Optic, OpticService, OpticStatus, Package, PackageItem, PackageOptionalItem, PackageSelectorComponent, PackageService, PackageTotal, PackageVariation, PackageVariationOption, PhonePipe, Product, ProductService, ProjectType, PurchaseOrder, PurchaseOrderRefinishItem, PurchaseOrderService, PurchaseOrderStatus, RearSightPosition, RefinishCode, RefinishCodeService, RefinishDetail, ReportMillingItem, ReportRefinishItem, SharedModule, ShieldRMSOptions, SightType, State, StateService, StatusHistoryService, Total, TotalItem, TotalsService, UserService, Vendor, VendorContact, VendorService, WaitlistAction, WaitlistCustomerService, WaitlistGun, WaitlistGunPackageDetail, WaitlistHistory, WaitlistItem, WaitlistProjectService, WaitlistService, WaitlistStatus, WorkChangeOrder, WorkHoliday, WorkHolidayService, WorkOrder, WorkOrderAction, WorkOrderHistory, WorkOrderInventoryItem, WorkOrderListItem, WorkOrderPackageDetail, WorkOrderRefinishItem, WorkOrderService, WorkOrderStatus, WorkOrderType, calculateFinishDate, coatingDescriptionValidator, coatingValueValidator, convertEnumToObjectArray, getCoatingValues, getCoatings, hasCoatingDescription, hasCoatingValues, refinishDetailsValidator, touchControls };
2352
+ export { BaseService, BundleItem, ChangeOrderStatus, Coating, CoatingService, CoatingValue, Configuration, ConfigurationService, Customer, CustomerService, Dealer, DealerContact, DealerCoupon, DealerService, DisableControlDirective, EnumPipe, FileNamePipe, FileUploadService, FilterOptions, Firearm, FirearmSeries, FirearmSeriesOptic, FirearmSeriesService, FirearmService, FrameMaterial, FrameMaterialPipe, GunCaliber, GunPart, GunPartOption, GunPartService, InventoryItem, InventoryService, JFile, Material, MaterialService, MillingDetail, MillingItem, MillingType, MillingTypeService, MountType, NewLinePipe, NotificationBarComponent, NotificationModule, NotificationService, NotificationType, Optic, OpticService, OpticStatus, Package, PackageItem, PackageOptionalItem, PackageSelectorComponent, PackageService, PackageTotal, PackageVariation, PackageVariationOption, PhonePipe, Product, ProductService, ProjectType, PurchaseOrder, PurchaseOrderRefinishItem, PurchaseOrderService, PurchaseOrderStatus, QuickbooksService, RearSightPosition, RefinishCode, RefinishCodeService, RefinishDetail, ReportMillingItem, ReportRefinishItem, SharedModule, ShieldRMSOptions, SightType, State, StateService, StatusHistoryService, Total, TotalItem, TotalsService, UserService, Vendor, VendorContact, VendorService, WaitlistAction, WaitlistCustomerService, WaitlistGun, WaitlistGunPackageDetail, WaitlistHistory, WaitlistItem, WaitlistProjectService, WaitlistService, WaitlistStatus, WorkChangeOrder, WorkHoliday, WorkHolidayService, WorkOrder, WorkOrderAction, WorkOrderDiscount, WorkOrderDiscountService, WorkOrderHistory, WorkOrderInventoryItem, WorkOrderListItem, WorkOrderNonInventoryItem, WorkOrderNonInventoryItemService, WorkOrderPackageDetail, WorkOrderRefinishItem, WorkOrderService, WorkOrderShippingItem, WorkOrderShippingItemService, WorkOrderStatus, WorkOrderType, calculateFinishDate, coatingDescriptionValidator, coatingValueValidator, convertEnumToObjectArray, getCoatingValues, getCoatings, hasCoatingDescription, hasCoatingValues, refinishDetailsValidator, touchControls };
2200
2353
  //# sourceMappingURL=gunsmith-common.mjs.map