gunsmith-common 2.1.31 → 2.2.1
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/public_api.mjs +2 -1
- package/esm2020/shared/controls/package-selector/package-selector.component.mjs +168 -0
- package/esm2020/shared/pipes/new-line.pipe.mjs +1 -1
- package/esm2020/shared/services/index.mjs +2 -1
- package/esm2020/shared/services/material.service.mjs +1 -1
- package/esm2020/shared/services/package.service.mjs +47 -0
- package/esm2020/shared/services/status-history.service.mjs +1 -1
- package/esm2020/shared/services/user.service.mjs +1 -1
- package/esm2020/shared/services/waitlist.service.mjs +4 -1
- package/esm2020/shared/services/work-order.service.mjs +10 -1
- package/esm2020/shared/shared.module.mjs +28 -7
- package/esm2020/shared/types/index.mjs +9 -1
- package/esm2020/shared/types/package-item.mjs +3 -0
- package/esm2020/shared/types/package-optional-item.mjs +3 -0
- package/esm2020/shared/types/package-total.mjs +3 -0
- package/esm2020/shared/types/package-variation-option.mjs +3 -0
- package/esm2020/shared/types/package-variation.mjs +6 -0
- package/esm2020/shared/types/package.mjs +10 -0
- package/esm2020/shared/types/waitlist-gun-package-detail.mjs +7 -0
- package/esm2020/shared/types/waitlist-gun.mjs +1 -1
- package/esm2020/shared/types/work-order-package-detail.mjs +7 -0
- package/esm2020/shared/types/work-order.mjs +1 -1
- package/fesm2015/gunsmith-common.mjs +294 -14
- package/fesm2015/gunsmith-common.mjs.map +1 -1
- package/fesm2020/gunsmith-common.mjs +291 -14
- package/fesm2020/gunsmith-common.mjs.map +1 -1
- package/package.json +1 -1
- package/public_api.d.ts +1 -0
- package/shared/controls/package-selector/package-selector.component.d.ts +38 -0
- package/shared/services/index.d.ts +1 -0
- package/shared/services/package.service.d.ts +16 -0
- package/shared/services/waitlist.service.d.ts +2 -1
- package/shared/services/work-order.service.d.ts +2 -1
- package/shared/shared.module.d.ts +5 -1
- package/shared/types/index.d.ts +8 -0
- package/shared/types/package-item.d.ts +9 -0
- package/shared/types/package-optional-item.d.ts +6 -0
- package/shared/types/package-total.d.ts +5 -0
- package/shared/types/package-variation-option.d.ts +10 -0
- package/shared/types/package-variation.d.ts +8 -0
- package/shared/types/package.d.ts +13 -0
- package/shared/types/waitlist-gun-package-detail.d.ts +10 -0
- package/shared/types/waitlist-gun.d.ts +2 -0
- package/shared/types/work-order-package-detail.d.ts +10 -0
- package/shared/types/work-order.d.ts +2 -0
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { DateTime } from 'luxon';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { Injectable, Inject, Pipe, Directive, Input,
|
|
3
|
+
import { Injectable, Inject, Pipe, Directive, Input, Component, NgModule } from '@angular/core';
|
|
4
4
|
import * as i1 from '@angular/common/http';
|
|
5
5
|
import { of, Subject } from 'rxjs';
|
|
6
6
|
import { switchMap } from 'rxjs/operators';
|
|
7
|
-
import * as
|
|
8
|
-
import
|
|
7
|
+
import * as i2 from '@angular/forms';
|
|
8
|
+
import { NgControl, Validators, NG_VALUE_ACCESSOR, NG_VALIDATORS, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
9
|
+
import * as i3 from '@progress/kendo-angular-dropdowns';
|
|
10
|
+
import { DropDownsModule } from '@progress/kendo-angular-dropdowns';
|
|
11
|
+
import * as i2$1 from '@angular/common';
|
|
9
12
|
import { CommonModule } from '@angular/common';
|
|
10
13
|
import { trigger, transition, style, animate } from '@angular/animations';
|
|
11
14
|
|
|
@@ -406,6 +409,48 @@ var ShieldRMSOptions;
|
|
|
406
409
|
ShieldRMSOptions[ShieldRMSOptions["RemoveBUIS"] = 1] = "RemoveBUIS";
|
|
407
410
|
})(ShieldRMSOptions || (ShieldRMSOptions = {}));
|
|
408
411
|
|
|
412
|
+
class PackageItem {
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
class Package {
|
|
416
|
+
constructor() {
|
|
417
|
+
this.active = true;
|
|
418
|
+
this.firearms = [];
|
|
419
|
+
this.items = [];
|
|
420
|
+
this.optionalItems = [];
|
|
421
|
+
this.variations = [];
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
class PackageOptionalItem {
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
class PackageVariation {
|
|
429
|
+
constructor() {
|
|
430
|
+
this.options = [];
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
class PackageVariationOption {
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
class WaitlistGunPackageDetail {
|
|
438
|
+
constructor() {
|
|
439
|
+
this.optionalItems = [];
|
|
440
|
+
this.variations = [];
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
class WorkOrderPackageDetail {
|
|
445
|
+
constructor() {
|
|
446
|
+
this.optionalItems = [];
|
|
447
|
+
this.variations = [];
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
class PackageTotal {
|
|
452
|
+
}
|
|
453
|
+
|
|
409
454
|
function adjustHoliday(finishDate, holidays) {
|
|
410
455
|
while (holidays.map(h => new Date(h.holiday)).findIndex(h => DateTime.fromJSDate(h) === DateTime.fromJSDate(finishDate)) !== -1) {
|
|
411
456
|
do {
|
|
@@ -839,6 +884,15 @@ class WorkOrderService {
|
|
|
839
884
|
readReportRefinishItems() {
|
|
840
885
|
return this.http.get(`${this.env.baseUrl}api/report-refinish-items`);
|
|
841
886
|
}
|
|
887
|
+
readPackageDetailTotals(startDate, endDate, statuses) {
|
|
888
|
+
return this.http.get(`${this.url}/package-details/totals`, {
|
|
889
|
+
params: {
|
|
890
|
+
startDate: startDate.toUTCString(),
|
|
891
|
+
endDate: endDate.toUTCString(),
|
|
892
|
+
statuses: statuses.map(status => status.toString())
|
|
893
|
+
}
|
|
894
|
+
});
|
|
895
|
+
}
|
|
842
896
|
}
|
|
843
897
|
WorkOrderService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: WorkOrderService, deps: [{ token: i1.HttpClient }, { token: 'env' }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
844
898
|
WorkOrderService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: WorkOrderService, providedIn: 'root' });
|
|
@@ -992,6 +1046,9 @@ class WaitlistService {
|
|
|
992
1046
|
deleteProject(waitlistId, projectId) {
|
|
993
1047
|
return this.http.delete(`${this.url}/${waitlistId}/projects/${projectId}`);
|
|
994
1048
|
}
|
|
1049
|
+
readPackageDetailTotals() {
|
|
1050
|
+
return this.http.get(`${this.url}/package-details/totals`);
|
|
1051
|
+
}
|
|
995
1052
|
}
|
|
996
1053
|
WaitlistService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: WaitlistService, deps: [{ token: i1.HttpClient }, { token: 'env' }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
997
1054
|
WaitlistService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: WaitlistService, providedIn: 'root' });
|
|
@@ -1536,6 +1593,49 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
1536
1593
|
args: ['env']
|
|
1537
1594
|
}] }]; } });
|
|
1538
1595
|
|
|
1596
|
+
class PackageService {
|
|
1597
|
+
constructor(http, env) {
|
|
1598
|
+
this.http = http;
|
|
1599
|
+
this.env = env;
|
|
1600
|
+
this.url = this.env.baseUrl + 'api/packages';
|
|
1601
|
+
}
|
|
1602
|
+
readPackages(includeInactive = false, sku = null, name = null) {
|
|
1603
|
+
const params = {
|
|
1604
|
+
includeInactive
|
|
1605
|
+
};
|
|
1606
|
+
if (sku) {
|
|
1607
|
+
params['sku'] = sku;
|
|
1608
|
+
}
|
|
1609
|
+
if (name) {
|
|
1610
|
+
params['name'] = name;
|
|
1611
|
+
}
|
|
1612
|
+
return this.http.get(this.url, { params: params });
|
|
1613
|
+
}
|
|
1614
|
+
readPackage(id) {
|
|
1615
|
+
return this.http.get(`${this.url}/${id}`);
|
|
1616
|
+
}
|
|
1617
|
+
readPackagesByFirearm(firearmId) {
|
|
1618
|
+
return this.http.get(`${this.env.baseUrl}api/firearms/${firearmId}/packages`);
|
|
1619
|
+
}
|
|
1620
|
+
savePackage(packagez) {
|
|
1621
|
+
if (packagez.id) {
|
|
1622
|
+
return this.http.put(`${this.url}/${packagez.id}`, packagez);
|
|
1623
|
+
}
|
|
1624
|
+
return this.http.post(this.url, packagez);
|
|
1625
|
+
}
|
|
1626
|
+
}
|
|
1627
|
+
PackageService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PackageService, deps: [{ token: i1.HttpClient }, { token: 'env' }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1628
|
+
PackageService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PackageService, providedIn: 'root' });
|
|
1629
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PackageService, decorators: [{
|
|
1630
|
+
type: Injectable,
|
|
1631
|
+
args: [{
|
|
1632
|
+
providedIn: 'root'
|
|
1633
|
+
}]
|
|
1634
|
+
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: undefined, decorators: [{
|
|
1635
|
+
type: Inject,
|
|
1636
|
+
args: ['env']
|
|
1637
|
+
}] }]; } });
|
|
1638
|
+
|
|
1539
1639
|
class PhonePipe {
|
|
1540
1640
|
transform(value, args) {
|
|
1541
1641
|
if (value && value.length >= 10) {
|
|
@@ -1626,14 +1726,14 @@ class DisableControlDirective {
|
|
|
1626
1726
|
this.ngControl.control[action]();
|
|
1627
1727
|
}
|
|
1628
1728
|
}
|
|
1629
|
-
DisableControlDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DisableControlDirective, deps: [{ token:
|
|
1729
|
+
DisableControlDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DisableControlDirective, deps: [{ token: i2.NgControl }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1630
1730
|
DisableControlDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: DisableControlDirective, selector: "[disableControl]", inputs: { disableControl: "disableControl" }, ngImport: i0 });
|
|
1631
1731
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DisableControlDirective, decorators: [{
|
|
1632
1732
|
type: Directive,
|
|
1633
1733
|
args: [{
|
|
1634
1734
|
selector: '[disableControl]'
|
|
1635
1735
|
}]
|
|
1636
|
-
}], ctorParameters: function () { return [{ type:
|
|
1736
|
+
}], ctorParameters: function () { return [{ type: i2.NgControl }]; }, propDecorators: { disableControl: [{
|
|
1637
1737
|
type: Input
|
|
1638
1738
|
}] } });
|
|
1639
1739
|
|
|
@@ -1682,6 +1782,166 @@ function refinishDetailsValidator() {
|
|
|
1682
1782
|
};
|
|
1683
1783
|
}
|
|
1684
1784
|
|
|
1785
|
+
class PackageSelectorComponent {
|
|
1786
|
+
constructor(packageService, fb, inj) {
|
|
1787
|
+
this.packageService = packageService;
|
|
1788
|
+
this.fb = fb;
|
|
1789
|
+
this.inj = inj;
|
|
1790
|
+
this.packages = [];
|
|
1791
|
+
this.packageVariations = [];
|
|
1792
|
+
this.packageOptionalItems = [];
|
|
1793
|
+
this.onChangeSubs = [];
|
|
1794
|
+
this.onTouched = () => { };
|
|
1795
|
+
this.touched = false;
|
|
1796
|
+
this.disabled = false;
|
|
1797
|
+
this.createForm();
|
|
1798
|
+
}
|
|
1799
|
+
ngOnChanges(changes) {
|
|
1800
|
+
if (changes.firearmId.currentValue) {
|
|
1801
|
+
this.getPackages();
|
|
1802
|
+
this.packageForm.reset();
|
|
1803
|
+
}
|
|
1804
|
+
else {
|
|
1805
|
+
this.packages = [];
|
|
1806
|
+
this.packageForm.reset();
|
|
1807
|
+
}
|
|
1808
|
+
}
|
|
1809
|
+
ngAfterViewInit() {
|
|
1810
|
+
const outerControl = this.inj.get(NgControl).control;
|
|
1811
|
+
const prevMarkAsTouched = outerControl.markAsTouched;
|
|
1812
|
+
outerControl.markAsTouched = (...args) => {
|
|
1813
|
+
this.packageForm.markAllAsTouched();
|
|
1814
|
+
prevMarkAsTouched.bind(outerControl)(...args);
|
|
1815
|
+
};
|
|
1816
|
+
}
|
|
1817
|
+
ngOnDestroy() {
|
|
1818
|
+
for (let sub of this.onChangeSubs) {
|
|
1819
|
+
sub.unsubscribe();
|
|
1820
|
+
}
|
|
1821
|
+
}
|
|
1822
|
+
getPackages() {
|
|
1823
|
+
this.packageService.readPackagesByFirearm(this.firearmId)
|
|
1824
|
+
.subscribe(packages => {
|
|
1825
|
+
this.packages = packages;
|
|
1826
|
+
if (this.packageForm.controls.package.value) {
|
|
1827
|
+
let packagez = this.packages.find(p => p.id === this.packageForm.controls.package.value.id);
|
|
1828
|
+
this.setPackageOptions(packagez);
|
|
1829
|
+
}
|
|
1830
|
+
});
|
|
1831
|
+
}
|
|
1832
|
+
createForm() {
|
|
1833
|
+
this.packageForm = this.fb.group({
|
|
1834
|
+
package: null,
|
|
1835
|
+
optionalItems: this.fb.control([]),
|
|
1836
|
+
variations: this.fb.array([])
|
|
1837
|
+
});
|
|
1838
|
+
this.packageForm.controls.package.valueChanges
|
|
1839
|
+
.subscribe(value => {
|
|
1840
|
+
this.packageForm.controls.optionalItems.reset();
|
|
1841
|
+
this.packageOptionalItems = [];
|
|
1842
|
+
this.variations.clear({ emitEvent: false });
|
|
1843
|
+
this.packageVariations = [];
|
|
1844
|
+
if (value?.id) {
|
|
1845
|
+
this.setPackageOptions(value);
|
|
1846
|
+
}
|
|
1847
|
+
else {
|
|
1848
|
+
if (this.packageDetail) {
|
|
1849
|
+
this.packageDetail.variations = null;
|
|
1850
|
+
this.packageDetail.optionalItems = null;
|
|
1851
|
+
}
|
|
1852
|
+
}
|
|
1853
|
+
});
|
|
1854
|
+
}
|
|
1855
|
+
get variations() { return this.packageForm.controls.variations; }
|
|
1856
|
+
setPackageOptions(packagez) {
|
|
1857
|
+
this.packageOptionalItems = packagez.optionalItems;
|
|
1858
|
+
this.packageVariations = packagez.variations;
|
|
1859
|
+
this.variations.clear({ emitEvent: false });
|
|
1860
|
+
for (let v of this.packageVariations) {
|
|
1861
|
+
let selectedVariation = this.packageDetail?.variations?.find(pv => pv.packageVariationId === v.id);
|
|
1862
|
+
this.variations.push(this.fb.control(selectedVariation, Validators.required), { emitEvent: false });
|
|
1863
|
+
}
|
|
1864
|
+
}
|
|
1865
|
+
setValue(packageDetail) {
|
|
1866
|
+
this.packageForm.reset(packageDetail);
|
|
1867
|
+
}
|
|
1868
|
+
validate(control) {
|
|
1869
|
+
if (this.packageForm.valid) {
|
|
1870
|
+
return null;
|
|
1871
|
+
}
|
|
1872
|
+
let errors = {};
|
|
1873
|
+
for (let v of this.variations.controls) {
|
|
1874
|
+
if (v.invalid) {
|
|
1875
|
+
return v.errors;
|
|
1876
|
+
}
|
|
1877
|
+
}
|
|
1878
|
+
return errors;
|
|
1879
|
+
}
|
|
1880
|
+
addControlErrors(allErrors, controlName) {
|
|
1881
|
+
const errors = { ...allErrors };
|
|
1882
|
+
const controlErrors = this.packageForm.controls[controlName].errors;
|
|
1883
|
+
if (controlErrors) {
|
|
1884
|
+
errors[controlName] = controlErrors;
|
|
1885
|
+
}
|
|
1886
|
+
return errors;
|
|
1887
|
+
}
|
|
1888
|
+
writeValue(packageDetail) {
|
|
1889
|
+
if (packageDetail) {
|
|
1890
|
+
this.packageDetail = Object.assign({}, packageDetail);
|
|
1891
|
+
this.setValue(packageDetail);
|
|
1892
|
+
}
|
|
1893
|
+
else {
|
|
1894
|
+
this.packageForm.reset();
|
|
1895
|
+
}
|
|
1896
|
+
}
|
|
1897
|
+
registerOnChange(onChange) {
|
|
1898
|
+
const sub = this.packageForm.valueChanges.subscribe(onChange);
|
|
1899
|
+
this.onChangeSubs.push(sub);
|
|
1900
|
+
}
|
|
1901
|
+
registerOnTouched(onTouched) {
|
|
1902
|
+
this.onTouched = onTouched;
|
|
1903
|
+
}
|
|
1904
|
+
setDisabledState(isDisabled) {
|
|
1905
|
+
this.disabled = isDisabled;
|
|
1906
|
+
if (isDisabled) {
|
|
1907
|
+
this.packageForm.disable();
|
|
1908
|
+
}
|
|
1909
|
+
else {
|
|
1910
|
+
this.packageForm.enable();
|
|
1911
|
+
}
|
|
1912
|
+
}
|
|
1913
|
+
}
|
|
1914
|
+
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 });
|
|
1915
|
+
PackageSelectorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: PackageSelectorComponent, selector: "cgw-package-selector", inputs: { firearmId: "firearmId" }, providers: [
|
|
1916
|
+
{
|
|
1917
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1918
|
+
multi: true,
|
|
1919
|
+
useExisting: PackageSelectorComponent
|
|
1920
|
+
},
|
|
1921
|
+
{
|
|
1922
|
+
provide: NG_VALIDATORS,
|
|
1923
|
+
multi: true,
|
|
1924
|
+
useExisting: PackageSelectorComponent
|
|
1925
|
+
}
|
|
1926
|
+
], usesOnChanges: true, ngImport: i0, template: "<div [formGroup]=\"packageForm\">\r\n <div class=\"row mb-2\">\r\n <div class=\"col\">\r\n <label for=\"waitlist-gun-package\">Package - <span class=\"fst-italic fs-7\">Select a model to list available packages</span></label>\r\n <kendo-dropdownlist [data]=\"packages\"\r\n [defaultItem]=\"{name: 'No Package', id: null}\"\r\n id=\"waitlist-gun-package\"\r\n formControlName=\"package\"\r\n textField=\"name\"\r\n valueField=\"id\"\r\n size=\"small\"></kendo-dropdownlist>\r\n </div>\r\n </div>\r\n <div formArrayName=\"variations\" *ngFor=\"let variationControl of variations.controls; let i = index\">\r\n <div class=\"row mb-2\">\r\n <div class=\"col\">\r\n <label [for]=\"'waitlist-gun-package-variation-' + i\">{{packageVariations[i]?.name}}</label>\r\n <kendo-dropdownlist [data]=\"packageVariations[i]?.options\"\r\n [id]=\"'waitlist-gun-package-variation-' + i\"\r\n textField=\"optionName\"\r\n [formControl]=\"variationControl\"\r\n valueField=\"id\"\r\n size=\"small\"></kendo-dropdownlist>\r\n </div>\r\n </div>\r\n <div *ngIf=\"variationControl.invalid && (variationControl.dirty || variationControl.touched)\" class=\"error-container text-danger\">\r\n <div *ngIf=\"variationControl.errors.required\">\r\n {{packageVariations[i]?.name}} is required.\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"row mb-2\" *ngIf=\"packageOptionalItems?.length\">\r\n <div class=\"col\">\r\n <label for=\"waitlist-gun-package-addons\">Add-ons (Additional charges will apply)</label>\r\n <kendo-multiselect id=\"waitlist-gun-package-addons\"\r\n [data]=\"packageOptionalItems\"\r\n formControlName=\"optionalItems\"\r\n textField=\"name\"\r\n valueField=\"inventoryItemId\"\r\n size=\"small\"></kendo-multiselect>\r\n </div>\r\n </div>\r\n</div>\r\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"] }] });
|
|
1927
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PackageSelectorComponent, decorators: [{
|
|
1928
|
+
type: Component,
|
|
1929
|
+
args: [{ selector: 'cgw-package-selector', providers: [
|
|
1930
|
+
{
|
|
1931
|
+
provide: NG_VALUE_ACCESSOR,
|
|
1932
|
+
multi: true,
|
|
1933
|
+
useExisting: PackageSelectorComponent
|
|
1934
|
+
},
|
|
1935
|
+
{
|
|
1936
|
+
provide: NG_VALIDATORS,
|
|
1937
|
+
multi: true,
|
|
1938
|
+
useExisting: PackageSelectorComponent
|
|
1939
|
+
}
|
|
1940
|
+
], template: "<div [formGroup]=\"packageForm\">\r\n <div class=\"row mb-2\">\r\n <div class=\"col\">\r\n <label for=\"waitlist-gun-package\">Package - <span class=\"fst-italic fs-7\">Select a model to list available packages</span></label>\r\n <kendo-dropdownlist [data]=\"packages\"\r\n [defaultItem]=\"{name: 'No Package', id: null}\"\r\n id=\"waitlist-gun-package\"\r\n formControlName=\"package\"\r\n textField=\"name\"\r\n valueField=\"id\"\r\n size=\"small\"></kendo-dropdownlist>\r\n </div>\r\n </div>\r\n <div formArrayName=\"variations\" *ngFor=\"let variationControl of variations.controls; let i = index\">\r\n <div class=\"row mb-2\">\r\n <div class=\"col\">\r\n <label [for]=\"'waitlist-gun-package-variation-' + i\">{{packageVariations[i]?.name}}</label>\r\n <kendo-dropdownlist [data]=\"packageVariations[i]?.options\"\r\n [id]=\"'waitlist-gun-package-variation-' + i\"\r\n textField=\"optionName\"\r\n [formControl]=\"variationControl\"\r\n valueField=\"id\"\r\n size=\"small\"></kendo-dropdownlist>\r\n </div>\r\n </div>\r\n <div *ngIf=\"variationControl.invalid && (variationControl.dirty || variationControl.touched)\" class=\"error-container text-danger\">\r\n <div *ngIf=\"variationControl.errors.required\">\r\n {{packageVariations[i]?.name}} is required.\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"row mb-2\" *ngIf=\"packageOptionalItems?.length\">\r\n <div class=\"col\">\r\n <label for=\"waitlist-gun-package-addons\">Add-ons (Additional charges will apply)</label>\r\n <kendo-multiselect id=\"waitlist-gun-package-addons\"\r\n [data]=\"packageOptionalItems\"\r\n formControlName=\"optionalItems\"\r\n textField=\"name\"\r\n valueField=\"inventoryItemId\"\r\n size=\"small\"></kendo-multiselect>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [""] }]
|
|
1941
|
+
}], ctorParameters: function () { return [{ type: PackageService }, { type: i2.FormBuilder }, { type: i0.Injector }]; }, propDecorators: { firearmId: [{
|
|
1942
|
+
type: Input
|
|
1943
|
+
}] } });
|
|
1944
|
+
|
|
1685
1945
|
class SharedModule {
|
|
1686
1946
|
}
|
|
1687
1947
|
SharedModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SharedModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
@@ -1690,13 +1950,23 @@ SharedModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "
|
|
|
1690
1950
|
EnumPipe,
|
|
1691
1951
|
DisableControlDirective,
|
|
1692
1952
|
NewLinePipe,
|
|
1693
|
-
FrameMaterialPipe
|
|
1953
|
+
FrameMaterialPipe,
|
|
1954
|
+
PackageSelectorComponent], imports: [CommonModule,
|
|
1955
|
+
DropDownsModule,
|
|
1956
|
+
FormsModule,
|
|
1957
|
+
ReactiveFormsModule], exports: [PhonePipe,
|
|
1694
1958
|
FileNamePipe,
|
|
1695
1959
|
EnumPipe,
|
|
1696
1960
|
NewLinePipe,
|
|
1697
1961
|
DisableControlDirective,
|
|
1698
|
-
FrameMaterialPipe
|
|
1699
|
-
|
|
1962
|
+
FrameMaterialPipe,
|
|
1963
|
+
PackageSelectorComponent] });
|
|
1964
|
+
SharedModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SharedModule, imports: [[
|
|
1965
|
+
CommonModule,
|
|
1966
|
+
DropDownsModule,
|
|
1967
|
+
FormsModule,
|
|
1968
|
+
ReactiveFormsModule
|
|
1969
|
+
]] });
|
|
1700
1970
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SharedModule, decorators: [{
|
|
1701
1971
|
type: NgModule,
|
|
1702
1972
|
args: [{
|
|
@@ -1706,16 +1976,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
1706
1976
|
EnumPipe,
|
|
1707
1977
|
DisableControlDirective,
|
|
1708
1978
|
NewLinePipe,
|
|
1709
|
-
FrameMaterialPipe
|
|
1979
|
+
FrameMaterialPipe,
|
|
1980
|
+
PackageSelectorComponent
|
|
1981
|
+
],
|
|
1982
|
+
imports: [
|
|
1983
|
+
CommonModule,
|
|
1984
|
+
DropDownsModule,
|
|
1985
|
+
FormsModule,
|
|
1986
|
+
ReactiveFormsModule
|
|
1710
1987
|
],
|
|
1711
|
-
imports: [],
|
|
1712
1988
|
exports: [
|
|
1713
1989
|
PhonePipe,
|
|
1714
1990
|
FileNamePipe,
|
|
1715
1991
|
EnumPipe,
|
|
1716
1992
|
NewLinePipe,
|
|
1717
1993
|
DisableControlDirective,
|
|
1718
|
-
FrameMaterialPipe
|
|
1994
|
+
FrameMaterialPipe,
|
|
1995
|
+
PackageSelectorComponent
|
|
1719
1996
|
]
|
|
1720
1997
|
}]
|
|
1721
1998
|
}] });
|
|
@@ -1778,10 +2055,10 @@ class NotificationBarComponent {
|
|
|
1778
2055
|
}
|
|
1779
2056
|
}
|
|
1780
2057
|
NotificationBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NotificationBarComponent, deps: [{ token: NotificationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1781
|
-
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\">\r\n <div *ngFor=\"let message of viewMessages\" class=\"notification-pill\" [class.error]=\"message.type == 1\" [@fadeOutAnimation]=\"shouldFade()\">\r\n <i class=\"fa\" [ngClass]=\"getIconClass(message)\"></i> <span class=\"ms-1\">{{message.message}}</span>\r\n </div>\r\n <div *ngIf=\"messages.length > 3\" class=\"notification-pill\">{{messages.length - 2}} more...</div>\r\n</div>\r\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:
|
|
2058
|
+
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\">\r\n <div *ngFor=\"let message of viewMessages\" class=\"notification-pill\" [class.error]=\"message.type == 1\" [@fadeOutAnimation]=\"shouldFade()\">\r\n <i class=\"fa\" [ngClass]=\"getIconClass(message)\"></i> <span class=\"ms-1\">{{message.message}}</span>\r\n </div>\r\n <div *ngIf=\"messages.length > 3\" class=\"notification-pill\">{{messages.length - 2}} more...</div>\r\n</div>\r\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(0,0,0,.3);padding:8px;text-align:center}.notification-bar .error{color:#711e16!important;background:rgba(248,216,212,.3)!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] });
|
|
1782
2059
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NotificationBarComponent, decorators: [{
|
|
1783
2060
|
type: Component,
|
|
1784
|
-
args: [{ selector: 'app-notification-bar', animations: [fadeOutAnimation], template: "<div class=\"notification-bar\" *ngIf=\"messages.length\">\r\n <div *ngFor=\"let message of viewMessages\" class=\"notification-pill\" [class.error]=\"message.type == 1\" [@fadeOutAnimation]=\"shouldFade()\">\r\n <i class=\"fa\" [ngClass]=\"getIconClass(message)\"></i> <span class=\"ms-1\">{{message.message}}</span>\r\n </div>\r\n <div *ngIf=\"messages.length > 3\" class=\"notification-pill\">{{messages.length - 2}} more...</div>\r\n</div>\r\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:
|
|
2061
|
+
args: [{ selector: 'app-notification-bar', animations: [fadeOutAnimation], template: "<div class=\"notification-bar\" *ngIf=\"messages.length\">\r\n <div *ngFor=\"let message of viewMessages\" class=\"notification-pill\" [class.error]=\"message.type == 1\" [@fadeOutAnimation]=\"shouldFade()\">\r\n <i class=\"fa\" [ngClass]=\"getIconClass(message)\"></i> <span class=\"ms-1\">{{message.message}}</span>\r\n </div>\r\n <div *ngIf=\"messages.length > 3\" class=\"notification-pill\">{{messages.length - 2}} more...</div>\r\n</div>\r\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(0,0,0,.3);padding:8px;text-align:center}.notification-bar .error{color:#711e16!important;background:rgba(248,216,212,.3)!important}\n"] }]
|
|
1785
2062
|
}], ctorParameters: function () { return [{ type: NotificationService }]; } });
|
|
1786
2063
|
|
|
1787
2064
|
class NotificationModule {
|
|
@@ -1820,5 +2097,5 @@ var NotificationType;
|
|
|
1820
2097
|
* Generated bundle index. Do not edit.
|
|
1821
2098
|
*/
|
|
1822
2099
|
|
|
1823
|
-
export { BundleItem, ChangeOrderStatus, Coating, CoatingService, CoatingValue, Configuration, ConfigurationService, CosmeticMilling, CosmeticMillingService, 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, PhonePipe, Product, ProductService, ProjectType, PurchaseOrder, PurchaseOrderRefinishItem, PurchaseOrderService, PurchaseOrderStatus, RearSightPosition, RefinishDetail, ReportMillingItem, ReportRefinishItem, SharedModule, ShieldRMSOptions, SightType, State, StateService, StatusHistoryService, Total, TotalItem, TotalsService, UserService, Vendor, VendorContact, VendorService, WaitlistAction, WaitlistCustomerService, WaitlistGun, WaitlistHistory, WaitlistItem, WaitlistProjectService, WaitlistService, WaitlistStatus, WorkChangeOrder, WorkHoliday, WorkHolidayService, WorkOrder, WorkOrderAction, WorkOrderHistory, WorkOrderRefinishItem, WorkOrderService, WorkOrderStatus, WorkOrderType, calculateFinishDate, coatingDescriptionValidator, coatingValueValidator, convertEnumToObjectArray, getCoatingValues, getCoatings, hasCoatingDescription, hasCoatingValues, refinishDetailsValidator, touchControls };
|
|
2100
|
+
export { BundleItem, ChangeOrderStatus, Coating, CoatingService, CoatingValue, Configuration, ConfigurationService, CosmeticMilling, CosmeticMillingService, 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, 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, WorkOrderPackageDetail, WorkOrderRefinishItem, WorkOrderService, WorkOrderStatus, WorkOrderType, calculateFinishDate, coatingDescriptionValidator, coatingValueValidator, convertEnumToObjectArray, getCoatingValues, getCoatings, hasCoatingDescription, hasCoatingValues, refinishDetailsValidator, touchControls };
|
|
1824
2101
|
//# sourceMappingURL=gunsmith-common.mjs.map
|