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 {
|
|
@@ -993,11 +1004,6 @@ class FileUploadService {
|
|
|
993
1004
|
deleteFile(fileName) {
|
|
994
1005
|
return this.http.delete(`${this.url}/${fileName}`);
|
|
995
1006
|
}
|
|
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
1007
|
retrieveFile(fileName) {
|
|
1002
1008
|
return this.http.get(`${this.url}/${fileName}`, { responseType: 'blob' })
|
|
1003
1009
|
.pipe(switchMap((response) => {
|
|
@@ -1678,6 +1684,99 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
1678
1684
|
args: ['env']
|
|
1679
1685
|
}] }]; } });
|
|
1680
1686
|
|
|
1687
|
+
class WorkOrderShippingItemService {
|
|
1688
|
+
constructor(http, env) {
|
|
1689
|
+
this.http = http;
|
|
1690
|
+
this.env = env;
|
|
1691
|
+
this.url = `${this.env.baseUrl}api/work-orders`;
|
|
1692
|
+
}
|
|
1693
|
+
getShippingItems(workOrderId) {
|
|
1694
|
+
return this.http.get(`${this.url}/${workOrderId}/shipping-items`);
|
|
1695
|
+
}
|
|
1696
|
+
getShippingItem(workOrderId, shippingItemId) {
|
|
1697
|
+
return this.http.get(`${this.url}/${workOrderId}/shipping-items/${shippingItemId}`);
|
|
1698
|
+
}
|
|
1699
|
+
createShippingItem(workOrderId, shippingItem) {
|
|
1700
|
+
return this.http.post(`${this.url}/${workOrderId}/shipping-items`, shippingItem);
|
|
1701
|
+
}
|
|
1702
|
+
updateShippingItem(workOrderId, shippingItemId, shippingItem) {
|
|
1703
|
+
return this.http.put(`${this.url}/${workOrderId}/shipping-items/${shippingItemId}`, shippingItem);
|
|
1704
|
+
}
|
|
1705
|
+
deleteShippingItem(workOrderId, shippingItemId) {
|
|
1706
|
+
return this.http.delete(`${this.url}/${workOrderId}/shipping-items/${shippingItemId}`);
|
|
1707
|
+
}
|
|
1708
|
+
}
|
|
1709
|
+
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 });
|
|
1710
|
+
WorkOrderShippingItemService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: WorkOrderShippingItemService, providedIn: 'root' });
|
|
1711
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: WorkOrderShippingItemService, decorators: [{
|
|
1712
|
+
type: Injectable,
|
|
1713
|
+
args: [{
|
|
1714
|
+
providedIn: 'root'
|
|
1715
|
+
}]
|
|
1716
|
+
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: undefined, decorators: [{
|
|
1717
|
+
type: Inject,
|
|
1718
|
+
args: ['env']
|
|
1719
|
+
}] }]; } });
|
|
1720
|
+
|
|
1721
|
+
class WorkOrderDiscountService {
|
|
1722
|
+
constructor(http, env) {
|
|
1723
|
+
this.http = http;
|
|
1724
|
+
this.env = env;
|
|
1725
|
+
this.url = `${this.env.baseUrl}api/work-orders`;
|
|
1726
|
+
}
|
|
1727
|
+
getDiscounts(workOrderId) {
|
|
1728
|
+
return this.http.get(`${this.url}/${workOrderId}/discounts`);
|
|
1729
|
+
}
|
|
1730
|
+
getDiscount(workOrderId, discountId) {
|
|
1731
|
+
return this.http.get(`${this.url}/${workOrderId}/discounts/${discountId}`);
|
|
1732
|
+
}
|
|
1733
|
+
createDiscount(workOrderId, discount) {
|
|
1734
|
+
return this.http.post(`${this.url}/${workOrderId}/discounts`, discount);
|
|
1735
|
+
}
|
|
1736
|
+
updateDiscount(workOrderId, discountId, discount) {
|
|
1737
|
+
return this.http.put(`${this.url}/${workOrderId}/discounts/${discountId}`, discount);
|
|
1738
|
+
}
|
|
1739
|
+
deleteDiscount(workOrderId, discountId) {
|
|
1740
|
+
return this.http.delete(`${this.url}/${workOrderId}/discounts/${discountId}`);
|
|
1741
|
+
}
|
|
1742
|
+
}
|
|
1743
|
+
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 });
|
|
1744
|
+
WorkOrderDiscountService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: WorkOrderDiscountService, providedIn: 'root' });
|
|
1745
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: WorkOrderDiscountService, decorators: [{
|
|
1746
|
+
type: Injectable,
|
|
1747
|
+
args: [{
|
|
1748
|
+
providedIn: 'root'
|
|
1749
|
+
}]
|
|
1750
|
+
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: undefined, decorators: [{
|
|
1751
|
+
type: Inject,
|
|
1752
|
+
args: ['env']
|
|
1753
|
+
}] }]; } });
|
|
1754
|
+
|
|
1755
|
+
class QuickbooksService {
|
|
1756
|
+
constructor(http, env) {
|
|
1757
|
+
this.http = http;
|
|
1758
|
+
this.env = env;
|
|
1759
|
+
this.url = this.env.baseUrl + 'api/quickbooks';
|
|
1760
|
+
}
|
|
1761
|
+
getQwcFile() {
|
|
1762
|
+
return this.http.get(`${this.url}`, { responseType: 'blob' })
|
|
1763
|
+
.pipe(switchMap$1((response) => {
|
|
1764
|
+
return of(new File([response], 'GunSmith.qwc', { type: response.type }));
|
|
1765
|
+
}));
|
|
1766
|
+
}
|
|
1767
|
+
}
|
|
1768
|
+
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 });
|
|
1769
|
+
QuickbooksService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: QuickbooksService, providedIn: 'root' });
|
|
1770
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: QuickbooksService, decorators: [{
|
|
1771
|
+
type: Injectable,
|
|
1772
|
+
args: [{
|
|
1773
|
+
providedIn: 'root'
|
|
1774
|
+
}]
|
|
1775
|
+
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: undefined, decorators: [{
|
|
1776
|
+
type: Inject,
|
|
1777
|
+
args: ['env']
|
|
1778
|
+
}] }]; } });
|
|
1779
|
+
|
|
1681
1780
|
class PhonePipe {
|
|
1682
1781
|
transform(value, args) {
|
|
1683
1782
|
if (value && value.length >= 10) {
|
|
@@ -1829,6 +1928,7 @@ class PackageSelectorComponent {
|
|
|
1829
1928
|
this.packageService = packageService;
|
|
1830
1929
|
this.fb = fb;
|
|
1831
1930
|
this.inj = inj;
|
|
1931
|
+
this.gunsmithOnly = false;
|
|
1832
1932
|
this.packages = [];
|
|
1833
1933
|
this.packageVariations = [];
|
|
1834
1934
|
this.packageOptionalItems = [];
|
|
@@ -1878,6 +1978,12 @@ class PackageSelectorComponent {
|
|
|
1878
1978
|
optionalItems: this.fb.control([]),
|
|
1879
1979
|
variations: this.fb.array([])
|
|
1880
1980
|
});
|
|
1981
|
+
this.packageForm.controls.variations.valueChanges
|
|
1982
|
+
.subscribe(value => {
|
|
1983
|
+
if (value) {
|
|
1984
|
+
this.packageForm.controls.variations.setValue(value.map(v => v.id ? v : null), { emitEvent: false });
|
|
1985
|
+
}
|
|
1986
|
+
});
|
|
1881
1987
|
this.packageForm.controls.package.valueChanges
|
|
1882
1988
|
.subscribe(value => {
|
|
1883
1989
|
this.packageForm.controls.optionalItems.reset();
|
|
@@ -1898,11 +2004,14 @@ class PackageSelectorComponent {
|
|
|
1898
2004
|
get variations() { return this.packageForm.controls.variations; }
|
|
1899
2005
|
setPackageOptions(packagez) {
|
|
1900
2006
|
this.packageOptionalItems = packagez.optionalItems;
|
|
1901
|
-
this.packageVariations = packagez.variations;
|
|
2007
|
+
this.packageVariations = this.gunsmithOnly ? packagez.variations : packagez.variations.filter(v => !v.gunsmithOnly);
|
|
1902
2008
|
this.variations.clear({ emitEvent: false });
|
|
1903
2009
|
for (let v of this.packageVariations) {
|
|
1904
2010
|
let selectedVariation = this.packageDetail?.variations?.find(pv => pv.packageVariationId === v.id);
|
|
1905
|
-
|
|
2011
|
+
if (v.gunsmithOnly)
|
|
2012
|
+
this.variations.push(this.fb.control(selectedVariation), { emitEvent: false });
|
|
2013
|
+
else
|
|
2014
|
+
this.variations.push(this.fb.control(selectedVariation, Validators.required), { emitEvent: false });
|
|
1906
2015
|
}
|
|
1907
2016
|
}
|
|
1908
2017
|
setValue(packageDetail) {
|
|
@@ -1955,7 +2064,7 @@ class PackageSelectorComponent {
|
|
|
1955
2064
|
}
|
|
1956
2065
|
}
|
|
1957
2066
|
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: [
|
|
2067
|
+
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
2068
|
{
|
|
1960
2069
|
provide: NG_VALUE_ACCESSOR,
|
|
1961
2070
|
multi: true,
|
|
@@ -1966,7 +2075,7 @@ PackageSelectorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0
|
|
|
1966
2075
|
multi: true,
|
|
1967
2076
|
useExisting: PackageSelectorComponent
|
|
1968
2077
|
}
|
|
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\"
|
|
2078
|
+
], 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
2079
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PackageSelectorComponent, decorators: [{
|
|
1971
2080
|
type: Component,
|
|
1972
2081
|
args: [{ selector: 'cgw-package-selector', providers: [
|
|
@@ -1980,11 +2089,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
1980
2089
|
multi: true,
|
|
1981
2090
|
useExisting: PackageSelectorComponent
|
|
1982
2091
|
}
|
|
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\"
|
|
2092
|
+
], 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
2093
|
}], ctorParameters: function () { return [{ type: PackageService }, { type: i2.FormBuilder }, { type: i0.Injector }]; }, propDecorators: { firearmId: [{
|
|
1985
2094
|
type: Input
|
|
1986
2095
|
}], projectType: [{
|
|
1987
2096
|
type: Input
|
|
2097
|
+
}], gunsmithOnly: [{
|
|
2098
|
+
type: Input
|
|
1988
2099
|
}] } });
|
|
1989
2100
|
|
|
1990
2101
|
class SharedModule {
|
|
@@ -2142,5 +2253,5 @@ var NotificationType;
|
|
|
2142
2253
|
* Generated bundle index. Do not edit.
|
|
2143
2254
|
*/
|
|
2144
2255
|
|
|
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 };
|
|
2256
|
+
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 };
|
|
2146
2257
|
//# sourceMappingURL=gunsmith-common.mjs.map
|