gunsmith-common 2.2.5 → 2.2.6
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/shared/controls/package-selector/package-selector.component.mjs +18 -6
- package/esm2020/shared/services/file-upload.service.mjs +1 -6
- package/esm2020/shared/services/index.mjs +4 -1
- package/esm2020/shared/services/quickbooks.service.mjs +30 -0
- package/esm2020/shared/services/work-order-discount.service.mjs +38 -0
- package/esm2020/shared/services/work-order-shipping-item.service.mjs +38 -0
- package/esm2020/shared/types/index.mjs +3 -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-shipping-item.mjs +3 -0
- package/fesm2015/gunsmith-common.mjs +129 -12
- package/fesm2015/gunsmith-common.mjs.map +1 -1
- package/fesm2020/gunsmith-common.mjs +123 -12
- package/fesm2020/gunsmith-common.mjs.map +1 -1
- package/gunsmith-common-2.2.6.tgz +0 -0
- package/package.json +1 -1
- package/shared/controls/package-selector/package-selector.component.d.ts +2 -1
- package/shared/services/file-upload.service.d.ts +0 -1
- package/shared/services/index.d.ts +3 -0
- package/shared/services/quickbooks.service.d.ts +12 -0
- package/shared/services/work-order-discount.service.d.ts +17 -0
- package/shared/services/work-order-shipping-item.service.d.ts +17 -0
- package/shared/types/index.d.ts +2 -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-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,13 @@ class RefinishCode {
|
|
|
455
459
|
class WorkOrderListItem {
|
|
456
460
|
}
|
|
457
461
|
|
|
462
|
+
class WorkOrderShippingItem {
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
class WorkOrderDiscount {
|
|
466
|
+
constructor() { }
|
|
467
|
+
}
|
|
468
|
+
|
|
458
469
|
function adjustHoliday(finishDate, holidays) {
|
|
459
470
|
while (holidays.map(h => new Date(h.holiday)).findIndex(h => DateTime.fromJSDate(h) === DateTime.fromJSDate(finishDate)) !== -1) {
|
|
460
471
|
do {
|
|
@@ -1011,11 +1022,6 @@ class FileUploadService {
|
|
|
1011
1022
|
deleteFile(fileName) {
|
|
1012
1023
|
return this.http.delete(`${this.url}/${fileName}`);
|
|
1013
1024
|
}
|
|
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
1025
|
retrieveFile(fileName) {
|
|
1020
1026
|
return this.http.get(`${this.url}/${fileName}`, { responseType: 'blob' })
|
|
1021
1027
|
.pipe(switchMap((response) => {
|
|
@@ -1730,6 +1736,105 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
1730
1736
|
}] }];
|
|
1731
1737
|
} });
|
|
1732
1738
|
|
|
1739
|
+
class WorkOrderShippingItemService {
|
|
1740
|
+
constructor(http, env) {
|
|
1741
|
+
this.http = http;
|
|
1742
|
+
this.env = env;
|
|
1743
|
+
this.url = `${this.env.baseUrl}api/work-orders`;
|
|
1744
|
+
}
|
|
1745
|
+
getShippingItems(workOrderId) {
|
|
1746
|
+
return this.http.get(`${this.url}/${workOrderId}/shipping-items`);
|
|
1747
|
+
}
|
|
1748
|
+
getShippingItem(workOrderId, shippingItemId) {
|
|
1749
|
+
return this.http.get(`${this.url}/${workOrderId}/shipping-items/${shippingItemId}`);
|
|
1750
|
+
}
|
|
1751
|
+
createShippingItem(workOrderId, shippingItem) {
|
|
1752
|
+
return this.http.post(`${this.url}/${workOrderId}/shipping-items`, shippingItem);
|
|
1753
|
+
}
|
|
1754
|
+
updateShippingItem(workOrderId, shippingItemId, shippingItem) {
|
|
1755
|
+
return this.http.put(`${this.url}/${workOrderId}/shipping-items/${shippingItemId}`, shippingItem);
|
|
1756
|
+
}
|
|
1757
|
+
deleteShippingItem(workOrderId, shippingItemId) {
|
|
1758
|
+
return this.http.delete(`${this.url}/${workOrderId}/shipping-items/${shippingItemId}`);
|
|
1759
|
+
}
|
|
1760
|
+
}
|
|
1761
|
+
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 });
|
|
1762
|
+
WorkOrderShippingItemService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: WorkOrderShippingItemService, providedIn: 'root' });
|
|
1763
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: WorkOrderShippingItemService, decorators: [{
|
|
1764
|
+
type: Injectable,
|
|
1765
|
+
args: [{
|
|
1766
|
+
providedIn: 'root'
|
|
1767
|
+
}]
|
|
1768
|
+
}], ctorParameters: function () {
|
|
1769
|
+
return [{ type: i1.HttpClient }, { type: undefined, decorators: [{
|
|
1770
|
+
type: Inject,
|
|
1771
|
+
args: ['env']
|
|
1772
|
+
}] }];
|
|
1773
|
+
} });
|
|
1774
|
+
|
|
1775
|
+
class WorkOrderDiscountService {
|
|
1776
|
+
constructor(http, env) {
|
|
1777
|
+
this.http = http;
|
|
1778
|
+
this.env = env;
|
|
1779
|
+
this.url = `${this.env.baseUrl}api/work-orders`;
|
|
1780
|
+
}
|
|
1781
|
+
getDiscounts(workOrderId) {
|
|
1782
|
+
return this.http.get(`${this.url}/${workOrderId}/discounts`);
|
|
1783
|
+
}
|
|
1784
|
+
getDiscount(workOrderId, discountId) {
|
|
1785
|
+
return this.http.get(`${this.url}/${workOrderId}/discounts/${discountId}`);
|
|
1786
|
+
}
|
|
1787
|
+
createDiscount(workOrderId, discount) {
|
|
1788
|
+
return this.http.post(`${this.url}/${workOrderId}/discounts`, discount);
|
|
1789
|
+
}
|
|
1790
|
+
updateDiscount(workOrderId, discountId, discount) {
|
|
1791
|
+
return this.http.put(`${this.url}/${workOrderId}/discounts/${discountId}`, discount);
|
|
1792
|
+
}
|
|
1793
|
+
deleteDiscount(workOrderId, discountId) {
|
|
1794
|
+
return this.http.delete(`${this.url}/${workOrderId}/discounts/${discountId}`);
|
|
1795
|
+
}
|
|
1796
|
+
}
|
|
1797
|
+
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 });
|
|
1798
|
+
WorkOrderDiscountService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: WorkOrderDiscountService, providedIn: 'root' });
|
|
1799
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: WorkOrderDiscountService, decorators: [{
|
|
1800
|
+
type: Injectable,
|
|
1801
|
+
args: [{
|
|
1802
|
+
providedIn: 'root'
|
|
1803
|
+
}]
|
|
1804
|
+
}], ctorParameters: function () {
|
|
1805
|
+
return [{ type: i1.HttpClient }, { type: undefined, decorators: [{
|
|
1806
|
+
type: Inject,
|
|
1807
|
+
args: ['env']
|
|
1808
|
+
}] }];
|
|
1809
|
+
} });
|
|
1810
|
+
|
|
1811
|
+
class QuickbooksService {
|
|
1812
|
+
constructor(http, env) {
|
|
1813
|
+
this.http = http;
|
|
1814
|
+
this.env = env;
|
|
1815
|
+
this.url = this.env.baseUrl + 'api/quickbooks';
|
|
1816
|
+
}
|
|
1817
|
+
getQwcFile() {
|
|
1818
|
+
return this.http.get(`${this.url}`, { responseType: 'blob' })
|
|
1819
|
+
.pipe(switchMap$1((response) => {
|
|
1820
|
+
return of(new File([response], 'GunSmith.qwc', { type: response.type }));
|
|
1821
|
+
}));
|
|
1822
|
+
}
|
|
1823
|
+
}
|
|
1824
|
+
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 });
|
|
1825
|
+
QuickbooksService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: QuickbooksService, providedIn: 'root' });
|
|
1826
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: QuickbooksService, decorators: [{
|
|
1827
|
+
type: Injectable,
|
|
1828
|
+
args: [{
|
|
1829
|
+
providedIn: 'root'
|
|
1830
|
+
}]
|
|
1831
|
+
}], ctorParameters: function () {
|
|
1832
|
+
return [{ type: i1.HttpClient }, { type: undefined, decorators: [{
|
|
1833
|
+
type: Inject,
|
|
1834
|
+
args: ['env']
|
|
1835
|
+
}] }];
|
|
1836
|
+
} });
|
|
1837
|
+
|
|
1733
1838
|
class PhonePipe {
|
|
1734
1839
|
transform(value, args) {
|
|
1735
1840
|
if (value && value.length >= 10) {
|
|
@@ -1881,6 +1986,7 @@ class PackageSelectorComponent {
|
|
|
1881
1986
|
this.packageService = packageService;
|
|
1882
1987
|
this.fb = fb;
|
|
1883
1988
|
this.inj = inj;
|
|
1989
|
+
this.gunsmithOnly = false;
|
|
1884
1990
|
this.packages = [];
|
|
1885
1991
|
this.packageVariations = [];
|
|
1886
1992
|
this.packageOptionalItems = [];
|
|
@@ -1931,6 +2037,12 @@ class PackageSelectorComponent {
|
|
|
1931
2037
|
optionalItems: this.fb.control([]),
|
|
1932
2038
|
variations: this.fb.array([])
|
|
1933
2039
|
});
|
|
2040
|
+
this.packageForm.controls.variations.valueChanges
|
|
2041
|
+
.subscribe(value => {
|
|
2042
|
+
if (value) {
|
|
2043
|
+
this.packageForm.controls.variations.setValue(value.map(v => v.id ? v : null), { emitEvent: false });
|
|
2044
|
+
}
|
|
2045
|
+
});
|
|
1934
2046
|
this.packageForm.controls.package.valueChanges
|
|
1935
2047
|
.subscribe(value => {
|
|
1936
2048
|
this.packageForm.controls.optionalItems.reset();
|
|
@@ -1952,11 +2064,14 @@ class PackageSelectorComponent {
|
|
|
1952
2064
|
setPackageOptions(packagez) {
|
|
1953
2065
|
var _a, _b;
|
|
1954
2066
|
this.packageOptionalItems = packagez.optionalItems;
|
|
1955
|
-
this.packageVariations = packagez.variations;
|
|
2067
|
+
this.packageVariations = this.gunsmithOnly ? packagez.variations : packagez.variations.filter(v => !v.gunsmithOnly);
|
|
1956
2068
|
this.variations.clear({ emitEvent: false });
|
|
1957
2069
|
for (let v of this.packageVariations) {
|
|
1958
2070
|
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
|
-
|
|
2071
|
+
if (v.gunsmithOnly)
|
|
2072
|
+
this.variations.push(this.fb.control(selectedVariation), { emitEvent: false });
|
|
2073
|
+
else
|
|
2074
|
+
this.variations.push(this.fb.control(selectedVariation, Validators.required), { emitEvent: false });
|
|
1960
2075
|
}
|
|
1961
2076
|
}
|
|
1962
2077
|
setValue(packageDetail) {
|
|
@@ -2009,7 +2124,7 @@ class PackageSelectorComponent {
|
|
|
2009
2124
|
}
|
|
2010
2125
|
}
|
|
2011
2126
|
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: [
|
|
2127
|
+
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
2128
|
{
|
|
2014
2129
|
provide: NG_VALUE_ACCESSOR,
|
|
2015
2130
|
multi: true,
|
|
@@ -2020,7 +2135,7 @@ PackageSelectorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0
|
|
|
2020
2135
|
multi: true,
|
|
2021
2136
|
useExisting: PackageSelectorComponent
|
|
2022
2137
|
}
|
|
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\"
|
|
2138
|
+
], 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
2139
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PackageSelectorComponent, decorators: [{
|
|
2025
2140
|
type: Component,
|
|
2026
2141
|
args: [{ selector: 'cgw-package-selector', providers: [
|
|
@@ -2034,11 +2149,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
2034
2149
|
multi: true,
|
|
2035
2150
|
useExisting: PackageSelectorComponent
|
|
2036
2151
|
}
|
|
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\"
|
|
2152
|
+
], 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
2153
|
}], ctorParameters: function () { return [{ type: PackageService }, { type: i2.FormBuilder }, { type: i0.Injector }]; }, propDecorators: { firearmId: [{
|
|
2039
2154
|
type: Input
|
|
2040
2155
|
}], projectType: [{
|
|
2041
2156
|
type: Input
|
|
2157
|
+
}], gunsmithOnly: [{
|
|
2158
|
+
type: Input
|
|
2042
2159
|
}] } });
|
|
2043
2160
|
|
|
2044
2161
|
class SharedModule {
|
|
@@ -2196,5 +2313,5 @@ var NotificationType;
|
|
|
2196
2313
|
* Generated bundle index. Do not edit.
|
|
2197
2314
|
*/
|
|
2198
2315
|
|
|
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 };
|
|
2316
|
+
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, 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, WorkOrderPackageDetail, WorkOrderRefinishItem, WorkOrderService, WorkOrderShippingItem, WorkOrderShippingItemService, WorkOrderStatus, WorkOrderType, calculateFinishDate, coatingDescriptionValidator, coatingValueValidator, convertEnumToObjectArray, getCoatingValues, getCoatings, hasCoatingDescription, hasCoatingValues, refinishDetailsValidator, touchControls };
|
|
2200
2317
|
//# sourceMappingURL=gunsmith-common.mjs.map
|