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.
- package/esm2020/notification/notification-bar/notification-bar.component.mjs +3 -3
- package/esm2020/shared/controls/package-selector/package-selector.component.mjs +18 -6
- package/esm2020/shared/services/base.service.mjs +43 -0
- package/esm2020/shared/services/file-upload.service.mjs +1 -6
- package/esm2020/shared/services/index.mjs +6 -1
- package/esm2020/shared/services/quickbooks.service.mjs +30 -0
- package/esm2020/shared/services/work-order-discount.service.mjs +25 -0
- package/esm2020/shared/services/work-order-non-inventory-item.service.mjs +25 -0
- package/esm2020/shared/services/work-order-shipping-item.service.mjs +25 -0
- package/esm2020/shared/types/index.mjs +4 -1
- package/esm2020/shared/types/inventory-item.mjs +4 -1
- package/esm2020/shared/types/milling-type.mjs +1 -1
- package/esm2020/shared/types/package-optional-item.mjs +1 -1
- package/esm2020/shared/types/package-variation-option.mjs +1 -1
- package/esm2020/shared/types/package-variation.mjs +1 -1
- package/esm2020/shared/types/package.mjs +1 -1
- package/esm2020/shared/types/refinish-code.mjs +1 -1
- package/esm2020/shared/types/waitlist-gun.mjs +2 -1
- package/esm2020/shared/types/work-order-discount.mjs +4 -0
- package/esm2020/shared/types/work-order-non-inventory-item.mjs +3 -0
- package/esm2020/shared/types/work-order-shipping-item.mjs +3 -0
- package/fesm2015/gunsmith-common.mjs +167 -14
- package/fesm2015/gunsmith-common.mjs.map +1 -1
- package/fesm2020/gunsmith-common.mjs +159 -14
- package/fesm2020/gunsmith-common.mjs.map +1 -1
- package/gunsmith-common-2.2.7.tgz +0 -0
- package/package.json +1 -1
- package/shared/controls/package-selector/package-selector.component.d.ts +2 -1
- package/shared/services/base.service.d.ts +16 -0
- package/shared/services/file-upload.service.d.ts +0 -1
- package/shared/services/index.d.ts +5 -0
- package/shared/services/quickbooks.service.d.ts +12 -0
- package/shared/services/work-order-discount.service.d.ts +11 -0
- package/shared/services/work-order-non-inventory-item.service.d.ts +11 -0
- package/shared/services/work-order-shipping-item.service.d.ts +11 -0
- package/shared/types/index.d.ts +3 -0
- package/shared/types/inventory-item.d.ts +1 -0
- package/shared/types/milling-type.d.ts +1 -0
- package/shared/types/package-optional-item.d.ts +4 -0
- package/shared/types/package-variation-option.d.ts +4 -0
- package/shared/types/package-variation.d.ts +1 -0
- package/shared/types/package.d.ts +1 -0
- package/shared/types/refinish-code.d.ts +1 -0
- package/shared/types/waitlist-gun.d.ts +1 -0
- package/shared/types/work-order-discount.d.ts +8 -0
- package/shared/types/work-order-non-inventory-item.d.ts +8 -0
- package/shared/types/work-order-shipping-item.d.ts +7 -0
- package/gunsmith-common-2.2.5.tgz +0 -0
|
@@ -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 {
|
|
@@ -993,11 +1007,6 @@ class FileUploadService {
|
|
|
993
1007
|
deleteFile(fileName) {
|
|
994
1008
|
return this.http.delete(`${this.url}/${fileName}`);
|
|
995
1009
|
}
|
|
996
|
-
saveFile(file) {
|
|
997
|
-
const formData = new FormData();
|
|
998
|
-
formData.append('fileKey', file, file.name);
|
|
999
|
-
return this.http.post(this.url, formData, { responseType: "text" });
|
|
1000
|
-
}
|
|
1001
1010
|
retrieveFile(fileName) {
|
|
1002
1011
|
return this.http.get(`${this.url}/${fileName}`, { responseType: 'blob' })
|
|
1003
1012
|
.pipe(switchMap((response) => {
|
|
@@ -1678,6 +1687,130 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
1678
1687
|
args: ['env']
|
|
1679
1688
|
}] }]; } });
|
|
1680
1689
|
|
|
1690
|
+
class BaseService {
|
|
1691
|
+
constructor(http) {
|
|
1692
|
+
this.http = http;
|
|
1693
|
+
}
|
|
1694
|
+
getUrl(...params) {
|
|
1695
|
+
let baseUrl = this.urlSegments[0];
|
|
1696
|
+
for (let i = 0; i < params.length; i++) {
|
|
1697
|
+
baseUrl += `/${params[i]}`;
|
|
1698
|
+
if (this.urlSegments.length > i + 1) {
|
|
1699
|
+
baseUrl += `/${this.urlSegments[i + 1]}`;
|
|
1700
|
+
}
|
|
1701
|
+
}
|
|
1702
|
+
return baseUrl;
|
|
1703
|
+
}
|
|
1704
|
+
getAll(...params) {
|
|
1705
|
+
return this.http.get(this.getUrl(...params));
|
|
1706
|
+
}
|
|
1707
|
+
get(...params) {
|
|
1708
|
+
return this.http.get(this.getUrl(...params));
|
|
1709
|
+
}
|
|
1710
|
+
create(item, ...params) {
|
|
1711
|
+
return this.http.post(this.getUrl(...params), item);
|
|
1712
|
+
}
|
|
1713
|
+
update(item, ...params) {
|
|
1714
|
+
return this.http.put(this.getUrl(...params), item);
|
|
1715
|
+
}
|
|
1716
|
+
delete(...params) {
|
|
1717
|
+
return this.http.delete(this.getUrl(...params));
|
|
1718
|
+
}
|
|
1719
|
+
}
|
|
1720
|
+
BaseService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: BaseService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1721
|
+
BaseService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: BaseService, providedIn: 'root' });
|
|
1722
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: BaseService, decorators: [{
|
|
1723
|
+
type: Injectable,
|
|
1724
|
+
args: [{
|
|
1725
|
+
providedIn: 'root'
|
|
1726
|
+
}]
|
|
1727
|
+
}], ctorParameters: function () { return [{ type: i1.HttpClient }]; } });
|
|
1728
|
+
|
|
1729
|
+
class WorkOrderShippingItemService extends BaseService {
|
|
1730
|
+
constructor(http, env) {
|
|
1731
|
+
super(http);
|
|
1732
|
+
this.http = http;
|
|
1733
|
+
this.env = env;
|
|
1734
|
+
this.urlSegments = [`${this.env.baseUrl}api/work-orders`, 'shipping-items'];
|
|
1735
|
+
}
|
|
1736
|
+
}
|
|
1737
|
+
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 });
|
|
1738
|
+
WorkOrderShippingItemService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: WorkOrderShippingItemService, providedIn: 'root' });
|
|
1739
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: WorkOrderShippingItemService, decorators: [{
|
|
1740
|
+
type: Injectable,
|
|
1741
|
+
args: [{
|
|
1742
|
+
providedIn: 'root'
|
|
1743
|
+
}]
|
|
1744
|
+
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: undefined, decorators: [{
|
|
1745
|
+
type: Inject,
|
|
1746
|
+
args: ['env']
|
|
1747
|
+
}] }]; } });
|
|
1748
|
+
|
|
1749
|
+
class WorkOrderDiscountService extends BaseService {
|
|
1750
|
+
constructor(http, env) {
|
|
1751
|
+
super(http);
|
|
1752
|
+
this.http = http;
|
|
1753
|
+
this.env = env;
|
|
1754
|
+
this.urlSegments = [`${this.env.baseUrl}api/work-orders`, 'discounts'];
|
|
1755
|
+
}
|
|
1756
|
+
}
|
|
1757
|
+
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 });
|
|
1758
|
+
WorkOrderDiscountService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: WorkOrderDiscountService, providedIn: 'root' });
|
|
1759
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: WorkOrderDiscountService, decorators: [{
|
|
1760
|
+
type: Injectable,
|
|
1761
|
+
args: [{
|
|
1762
|
+
providedIn: 'root'
|
|
1763
|
+
}]
|
|
1764
|
+
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: undefined, decorators: [{
|
|
1765
|
+
type: Inject,
|
|
1766
|
+
args: ['env']
|
|
1767
|
+
}] }]; } });
|
|
1768
|
+
|
|
1769
|
+
class QuickbooksService {
|
|
1770
|
+
constructor(http, env) {
|
|
1771
|
+
this.http = http;
|
|
1772
|
+
this.env = env;
|
|
1773
|
+
this.url = this.env.baseUrl + 'api/quickbooks';
|
|
1774
|
+
}
|
|
1775
|
+
getQwcFile() {
|
|
1776
|
+
return this.http.get(`${this.url}`, { responseType: 'blob' })
|
|
1777
|
+
.pipe(switchMap$1((response) => {
|
|
1778
|
+
return of(new File([response], 'GunSmith.qwc', { type: response.type }));
|
|
1779
|
+
}));
|
|
1780
|
+
}
|
|
1781
|
+
}
|
|
1782
|
+
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 });
|
|
1783
|
+
QuickbooksService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: QuickbooksService, providedIn: 'root' });
|
|
1784
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: QuickbooksService, decorators: [{
|
|
1785
|
+
type: Injectable,
|
|
1786
|
+
args: [{
|
|
1787
|
+
providedIn: 'root'
|
|
1788
|
+
}]
|
|
1789
|
+
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: undefined, decorators: [{
|
|
1790
|
+
type: Inject,
|
|
1791
|
+
args: ['env']
|
|
1792
|
+
}] }]; } });
|
|
1793
|
+
|
|
1794
|
+
class WorkOrderNonInventoryItemService extends BaseService {
|
|
1795
|
+
constructor(http, env) {
|
|
1796
|
+
super(http);
|
|
1797
|
+
this.http = http;
|
|
1798
|
+
this.env = env;
|
|
1799
|
+
this.urlSegments = [`${this.env.baseUrl}api/work-orders`, 'non-inventory-items'];
|
|
1800
|
+
}
|
|
1801
|
+
}
|
|
1802
|
+
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 });
|
|
1803
|
+
WorkOrderNonInventoryItemService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: WorkOrderNonInventoryItemService, providedIn: 'root' });
|
|
1804
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: WorkOrderNonInventoryItemService, decorators: [{
|
|
1805
|
+
type: Injectable,
|
|
1806
|
+
args: [{
|
|
1807
|
+
providedIn: 'root'
|
|
1808
|
+
}]
|
|
1809
|
+
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: undefined, decorators: [{
|
|
1810
|
+
type: Inject,
|
|
1811
|
+
args: ['env']
|
|
1812
|
+
}] }]; } });
|
|
1813
|
+
|
|
1681
1814
|
class PhonePipe {
|
|
1682
1815
|
transform(value, args) {
|
|
1683
1816
|
if (value && value.length >= 10) {
|
|
@@ -1829,6 +1962,7 @@ class PackageSelectorComponent {
|
|
|
1829
1962
|
this.packageService = packageService;
|
|
1830
1963
|
this.fb = fb;
|
|
1831
1964
|
this.inj = inj;
|
|
1965
|
+
this.gunsmithOnly = false;
|
|
1832
1966
|
this.packages = [];
|
|
1833
1967
|
this.packageVariations = [];
|
|
1834
1968
|
this.packageOptionalItems = [];
|
|
@@ -1878,6 +2012,12 @@ class PackageSelectorComponent {
|
|
|
1878
2012
|
optionalItems: this.fb.control([]),
|
|
1879
2013
|
variations: this.fb.array([])
|
|
1880
2014
|
});
|
|
2015
|
+
this.packageForm.controls.variations.valueChanges
|
|
2016
|
+
.subscribe(value => {
|
|
2017
|
+
if (value) {
|
|
2018
|
+
this.packageForm.controls.variations.setValue(value.map(v => v.id ? v : null), { emitEvent: false });
|
|
2019
|
+
}
|
|
2020
|
+
});
|
|
1881
2021
|
this.packageForm.controls.package.valueChanges
|
|
1882
2022
|
.subscribe(value => {
|
|
1883
2023
|
this.packageForm.controls.optionalItems.reset();
|
|
@@ -1898,11 +2038,14 @@ class PackageSelectorComponent {
|
|
|
1898
2038
|
get variations() { return this.packageForm.controls.variations; }
|
|
1899
2039
|
setPackageOptions(packagez) {
|
|
1900
2040
|
this.packageOptionalItems = packagez.optionalItems;
|
|
1901
|
-
this.packageVariations = packagez.variations;
|
|
2041
|
+
this.packageVariations = this.gunsmithOnly ? packagez.variations : packagez.variations.filter(v => !v.gunsmithOnly);
|
|
1902
2042
|
this.variations.clear({ emitEvent: false });
|
|
1903
2043
|
for (let v of this.packageVariations) {
|
|
1904
2044
|
let selectedVariation = this.packageDetail?.variations?.find(pv => pv.packageVariationId === v.id);
|
|
1905
|
-
|
|
2045
|
+
if (v.gunsmithOnly)
|
|
2046
|
+
this.variations.push(this.fb.control(selectedVariation), { emitEvent: false });
|
|
2047
|
+
else
|
|
2048
|
+
this.variations.push(this.fb.control(selectedVariation, Validators.required), { emitEvent: false });
|
|
1906
2049
|
}
|
|
1907
2050
|
}
|
|
1908
2051
|
setValue(packageDetail) {
|
|
@@ -1955,7 +2098,7 @@ class PackageSelectorComponent {
|
|
|
1955
2098
|
}
|
|
1956
2099
|
}
|
|
1957
2100
|
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 });
|
|
1958
|
-
PackageSelectorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: PackageSelectorComponent, selector: "cgw-package-selector", inputs: { firearmId: "firearmId", projectType: "projectType" }, providers: [
|
|
2101
|
+
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: [
|
|
1959
2102
|
{
|
|
1960
2103
|
provide: NG_VALUE_ACCESSOR,
|
|
1961
2104
|
multi: true,
|
|
@@ -1966,7 +2109,7 @@ PackageSelectorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0
|
|
|
1966
2109
|
multi: true,
|
|
1967
2110
|
useExisting: PackageSelectorComponent
|
|
1968
2111
|
}
|
|
1969
|
-
], 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\"
|
|
2112
|
+
], 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]" }] });
|
|
1970
2113
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PackageSelectorComponent, decorators: [{
|
|
1971
2114
|
type: Component,
|
|
1972
2115
|
args: [{ selector: 'cgw-package-selector', providers: [
|
|
@@ -1980,11 +2123,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
1980
2123
|
multi: true,
|
|
1981
2124
|
useExisting: PackageSelectorComponent
|
|
1982
2125
|
}
|
|
1983
|
-
], 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\"
|
|
2126
|
+
], 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: [""] }]
|
|
1984
2127
|
}], ctorParameters: function () { return [{ type: PackageService }, { type: i2.FormBuilder }, { type: i0.Injector }]; }, propDecorators: { firearmId: [{
|
|
1985
2128
|
type: Input
|
|
1986
2129
|
}], projectType: [{
|
|
1987
2130
|
type: Input
|
|
2131
|
+
}], gunsmithOnly: [{
|
|
2132
|
+
type: Input
|
|
1988
2133
|
}] } });
|
|
1989
2134
|
|
|
1990
2135
|
class SharedModule {
|
|
@@ -2100,10 +2245,10 @@ class NotificationBarComponent {
|
|
|
2100
2245
|
}
|
|
2101
2246
|
}
|
|
2102
2247
|
NotificationBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NotificationBarComponent, deps: [{ token: NotificationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
2103
|
-
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
|
|
2248
|
+
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] });
|
|
2104
2249
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NotificationBarComponent, decorators: [{
|
|
2105
2250
|
type: Component,
|
|
2106
|
-
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
|
|
2251
|
+
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"] }]
|
|
2107
2252
|
}], ctorParameters: function () { return [{ type: NotificationService }]; } });
|
|
2108
2253
|
|
|
2109
2254
|
class NotificationModule {
|
|
@@ -2142,5 +2287,5 @@ var NotificationType;
|
|
|
2142
2287
|
* Generated bundle index. Do not edit.
|
|
2143
2288
|
*/
|
|
2144
2289
|
|
|
2145
|
-
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 };
|
|
2290
|
+
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 };
|
|
2146
2291
|
//# sourceMappingURL=gunsmith-common.mjs.map
|