gunsmith-common 2.3.12 → 2.3.14

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.
@@ -1,16 +1,14 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { Injectable, Inject, Pipe, Directive, Input, Component, EventEmitter, Output, NgModule } from '@angular/core';
3
3
  import * as i1 from '@angular/common/http';
4
- import { of, switchMap as switchMap$1, lastValueFrom, forkJoin, Subject } from 'rxjs';
4
+ import { of, switchMap as switchMap$1, EMPTY, forkJoin, Subject } from 'rxjs';
5
5
  import { switchMap } from 'rxjs/operators';
6
- import { __awaiter } from 'tslib';
7
6
  import { DateTime } from 'luxon';
8
- import * as i2 from '@angular/forms';
9
- import { NgControl, Validators, NG_VALUE_ACCESSOR, NG_VALIDATORS, FormsModule, ReactiveFormsModule } from '@angular/forms';
10
- import * as i3 from '@progress/kendo-angular-dropdowns';
11
- import { DropDownsModule } from '@progress/kendo-angular-dropdowns';
12
- import * as i2$1 from '@angular/common';
7
+ import * as i1$1 from '@angular/forms';
8
+ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
9
+ import * as i2 from '@angular/common';
13
10
  import { CommonModule } from '@angular/common';
11
+ import { DropDownsModule } from '@progress/kendo-angular-dropdowns';
14
12
  import { trigger, transition, style, animate } from '@angular/animations';
15
13
 
16
14
  function touchControls(formGroup) {
@@ -539,6 +537,15 @@ class MillingTypeAddon {
539
537
  class Address {
540
538
  }
541
539
 
540
+ class BillingInfo {
541
+ }
542
+
543
+ class WorkOrderTotal {
544
+ }
545
+
546
+ class WorkOrderBillingTransaction {
547
+ }
548
+
542
549
  class CustomerService {
543
550
  constructor(http, env) {
544
551
  this.http = http;
@@ -862,6 +869,9 @@ class WorkOrderService {
862
869
  params: this.createWorkOrderParams(statuses, id, customerName, customerEmail, serialNumber, orderTypes, projectTypes, users, specialOrder)
863
870
  });
864
871
  }
872
+ readWorkOrderTotal(id) {
873
+ return this.http.get(`${this.url}/${id}/totals`);
874
+ }
865
875
  createWorkOrderParams(statuses = null, id = null, customerName = null, customerEmail = null, serialNumber = null, orderTypes = null, projectTypes = null, users = null, specialOrder = null) {
866
876
  const params = {};
867
877
  if (statuses) {
@@ -1021,6 +1031,19 @@ class WorkOrderService {
1021
1031
  createInventoryItems(workOrderId, inventoryItems) {
1022
1032
  return this.http.post(`${this.url}/${workOrderId}/inventory-items/collection`, inventoryItems);
1023
1033
  }
1034
+ // Billing
1035
+ processTransaction(workOrderId, billingInfo) {
1036
+ return this.http.post(`${this.url}/${workOrderId}/billing`, billingInfo);
1037
+ }
1038
+ getTransactions(workOrderId) {
1039
+ return this.http.get(`${this.url}/${workOrderId}/billing`);
1040
+ }
1041
+ refundTransaction(workOrderId, transactionId, refundAmount) {
1042
+ return this.http.post(`${this.url}/${workOrderId}/billing/${transactionId}/refund`, refundAmount);
1043
+ }
1044
+ createBillingTransaction(workOrderId, billingTransaction) {
1045
+ return this.http.post(`${this.url}/${workOrderId}/billing/transaction`, billingTransaction);
1046
+ }
1024
1047
  }
1025
1048
  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 });
1026
1049
  WorkOrderService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: WorkOrderService, providedIn: 'root' });
@@ -2026,24 +2049,20 @@ class FinishDateHelperService {
2026
2049
  return this.adjustHoliday(finishDate.toJSDate());
2027
2050
  }
2028
2051
  calculate(receivedDate, workOrderType) {
2029
- return __awaiter(this, void 0, void 0, function* () {
2030
- if (!receivedDate) {
2031
- return null;
2032
- }
2033
- if (!this.configs) {
2034
- return yield lastValueFrom(forkJoin([
2035
- this.configService.readConfigs(),
2036
- this.holidayService.readHolidays(),
2037
- ]).pipe(switchMap$1(([configs, holidays]) => {
2038
- this.configs = configs;
2039
- this.holidays = holidays;
2040
- return of(this.calculateFinishDate(receivedDate, workOrderType));
2041
- })));
2042
- }
2043
- return yield new Promise((resolve) => {
2044
- resolve(this.calculateFinishDate(receivedDate, workOrderType));
2045
- });
2046
- });
2052
+ if (!receivedDate) {
2053
+ return EMPTY;
2054
+ }
2055
+ if (!this.configs) {
2056
+ return forkJoin([
2057
+ this.configService.readConfigs(),
2058
+ this.holidayService.readHolidays(),
2059
+ ]).pipe(switchMap$1(([configs, holidays]) => {
2060
+ this.configs = configs;
2061
+ this.holidays = holidays;
2062
+ return of(this.calculateFinishDate(receivedDate, workOrderType));
2063
+ }));
2064
+ }
2065
+ return of(this.calculateFinishDate(receivedDate, workOrderType));
2047
2066
  }
2048
2067
  }
2049
2068
  FinishDateHelperService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FinishDateHelperService, deps: [{ token: ConfigurationService }, { token: WorkHolidayService }], target: i0.ɵɵFactoryTarget.Injectable });
@@ -2189,14 +2208,14 @@ class DisableControlDirective {
2189
2208
  this.ngControl.control[action]();
2190
2209
  }
2191
2210
  }
2192
- DisableControlDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DisableControlDirective, deps: [{ token: i2.NgControl }], target: i0.ɵɵFactoryTarget.Directive });
2211
+ DisableControlDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DisableControlDirective, deps: [{ token: i1$1.NgControl }], target: i0.ɵɵFactoryTarget.Directive });
2193
2212
  DisableControlDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: DisableControlDirective, selector: "[disableControl]", inputs: { disableControl: "disableControl" }, ngImport: i0 });
2194
2213
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: DisableControlDirective, decorators: [{
2195
2214
  type: Directive,
2196
2215
  args: [{
2197
2216
  selector: '[disableControl]'
2198
2217
  }]
2199
- }], ctorParameters: function () { return [{ type: i2.NgControl }]; }, propDecorators: { disableControl: [{
2218
+ }], ctorParameters: function () { return [{ type: i1$1.NgControl }]; }, propDecorators: { disableControl: [{
2200
2219
  type: Input
2201
2220
  }] } });
2202
2221
 
@@ -2245,192 +2264,10 @@ function refinishDetailsValidator() {
2245
2264
  };
2246
2265
  }
2247
2266
 
2248
- class PackageSelectorComponent {
2249
- constructor(packageService, fb, inj) {
2250
- this.packageService = packageService;
2251
- this.fb = fb;
2252
- this.inj = inj;
2253
- this.gunsmithOnly = false;
2254
- this.packages = [];
2255
- this.packageVariations = [];
2256
- this.packageOptionalItems = [];
2257
- this.onChangeSubs = [];
2258
- this.onTouched = () => { };
2259
- this.touched = false;
2260
- this.disabled = false;
2261
- this.createForm();
2262
- }
2263
- ngOnChanges(changes) {
2264
- if (this.canGetPackages(changes)) {
2265
- this.getPackages();
2266
- this.packageForm.reset();
2267
- }
2268
- else {
2269
- this.packages = [];
2270
- this.packageForm.reset();
2271
- }
2272
- }
2273
- canGetPackages(changes) {
2274
- return (changes.firearmId && changes.firearmId.currentValue && this.projectType === ProjectType.Firearm && (this.workOrderType == WorkOrderType.Standard || this.workOrderType == WorkOrderType.NewInBox)) ||
2275
- (changes.projectType && changes.projectType.currentValue === ProjectType.Firearm && this.firearmId && (this.workOrderType == WorkOrderType.Standard || this.workOrderType == WorkOrderType.NewInBox)) ||
2276
- (changes.workOrderType && (changes.workOrderType.currentValue === WorkOrderType.Standard || changes.workOrderType.currentValue === WorkOrderType.NewInBox) && this.firearmId && this.projectType === ProjectType.Firearm);
2277
- }
2278
- ngAfterViewInit() {
2279
- const outerControl = this.inj.get(NgControl).control;
2280
- const prevMarkAsTouched = outerControl.markAsTouched;
2281
- outerControl.markAsTouched = (...args) => {
2282
- this.packageForm.markAllAsTouched();
2283
- prevMarkAsTouched.bind(outerControl)(...args);
2284
- };
2285
- }
2286
- ngOnDestroy() {
2287
- for (let sub of this.onChangeSubs) {
2288
- sub.unsubscribe();
2289
- }
2290
- }
2291
- getPackages() {
2292
- this.packageService.readPackagesByFirearm(this.firearmId, this.gunsmithOnly)
2293
- .subscribe(packages => {
2294
- this.packages = packages;
2295
- if (this.packageForm.controls.package.value) {
2296
- let packagez = this.packages.find(p => p.id === this.packageForm.controls.package.value.id);
2297
- this.setPackageOptions(packagez);
2298
- }
2299
- });
2300
- }
2301
- createForm() {
2302
- this.packageForm = this.fb.group({
2303
- package: null,
2304
- optionalItems: this.fb.control([]),
2305
- variations: this.fb.array([])
2306
- });
2307
- this.packageForm.controls.variations.valueChanges
2308
- .subscribe(value => {
2309
- if (value) {
2310
- this.packageForm.controls.variations.setValue(value.map(v => (v === null || v === void 0 ? void 0 : v.id) ? v : null), { emitEvent: false });
2311
- }
2312
- });
2313
- this.packageForm.controls.package.valueChanges
2314
- .subscribe(value => {
2315
- this.packageForm.controls.optionalItems.reset();
2316
- this.packageOptionalItems = [];
2317
- this.variations.clear({ emitEvent: false });
2318
- this.packageVariations = [];
2319
- if (value === null || value === void 0 ? void 0 : value.id) {
2320
- this.setPackageOptions(value);
2321
- }
2322
- else {
2323
- if (this.packageDetail) {
2324
- this.packageDetail.variations = null;
2325
- this.packageDetail.optionalItems = null;
2326
- }
2327
- }
2328
- });
2329
- }
2330
- get variations() { return this.packageForm.controls.variations; }
2331
- setPackageOptions(packagez) {
2332
- var _a, _b;
2333
- this.packageOptionalItems = packagez.optionalItems;
2334
- this.packageVariations = this.gunsmithOnly ? packagez.variations : packagez.variations.filter(v => !v.gunsmithOnly);
2335
- this.variations.clear({ emitEvent: false });
2336
- for (let v of this.packageVariations) {
2337
- 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);
2338
- if (v.gunsmithOnly)
2339
- this.variations.push(this.fb.control(selectedVariation), { emitEvent: false });
2340
- else
2341
- this.variations.push(this.fb.control(selectedVariation, Validators.required), { emitEvent: false });
2342
- }
2343
- }
2344
- setValue(packageDetail) {
2345
- this.packageForm.reset(packageDetail);
2346
- }
2347
- validate(control) {
2348
- if (this.packageForm.valid) {
2349
- return null;
2350
- }
2351
- let errors = {};
2352
- for (let v of this.variations.controls) {
2353
- if (v.invalid) {
2354
- return v.errors;
2355
- }
2356
- }
2357
- return errors;
2358
- }
2359
- addControlErrors(allErrors, controlName) {
2360
- const errors = Object.assign({}, allErrors);
2361
- const controlErrors = this.packageForm.controls[controlName].errors;
2362
- if (controlErrors) {
2363
- errors[controlName] = controlErrors;
2364
- }
2365
- return errors;
2366
- }
2367
- writeValue(packageDetail) {
2368
- if (packageDetail) {
2369
- this.packageDetail = Object.assign({}, packageDetail);
2370
- this.setValue(packageDetail);
2371
- }
2372
- else {
2373
- this.packageForm.reset();
2374
- }
2375
- }
2376
- registerOnChange(onChange) {
2377
- const sub = this.packageForm.valueChanges.subscribe(onChange);
2378
- this.onChangeSubs.push(sub);
2379
- }
2380
- registerOnTouched(onTouched) {
2381
- this.onTouched = onTouched;
2382
- }
2383
- setDisabledState(isDisabled) {
2384
- this.disabled = isDisabled;
2385
- if (isDisabled) {
2386
- this.packageForm.disable();
2387
- }
2388
- else {
2389
- this.packageForm.enable();
2390
- }
2391
- }
2392
- }
2393
- 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 });
2394
- PackageSelectorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: PackageSelectorComponent, selector: "cgw-package-selector", inputs: { firearmId: "firearmId", projectType: "projectType", workOrderType: "workOrderType", gunsmithOnly: "gunsmithOnly" }, providers: [
2395
- {
2396
- provide: NG_VALUE_ACCESSOR,
2397
- multi: true,
2398
- useExisting: PackageSelectorComponent
2399
- },
2400
- {
2401
- provide: NG_VALIDATORS,
2402
- multi: true,
2403
- useExisting: PackageSelectorComponent
2404
- }
2405
- ], 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</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=\"id\"\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]" }] });
2406
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PackageSelectorComponent, decorators: [{
2407
- type: Component,
2408
- args: [{ selector: 'cgw-package-selector', providers: [
2409
- {
2410
- provide: NG_VALUE_ACCESSOR,
2411
- multi: true,
2412
- useExisting: PackageSelectorComponent
2413
- },
2414
- {
2415
- provide: NG_VALIDATORS,
2416
- multi: true,
2417
- useExisting: PackageSelectorComponent
2418
- }
2419
- ], template: "<div [formGroup]=\"packageForm\">\n <div class=\"row mb-2\">\n <div class=\"col\">\n <label for=\"waitlist-gun-package\">Package</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=\"id\"\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: [""] }]
2420
- }], ctorParameters: function () { return [{ type: PackageService }, { type: i2.FormBuilder }, { type: i0.Injector }]; }, propDecorators: { firearmId: [{
2421
- type: Input
2422
- }], projectType: [{
2423
- type: Input
2424
- }], workOrderType: [{
2425
- type: Input
2426
- }], gunsmithOnly: [{
2427
- type: Input
2428
- }] } });
2429
-
2430
2267
  class FormErrorMessageComponent {
2431
2268
  }
2432
2269
  FormErrorMessageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormErrorMessageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2433
- FormErrorMessageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: FormErrorMessageComponent, selector: "cgw-error-message", inputs: { control: "control", controlName: "controlName" }, ngImport: i0, template: "<div *ngIf=\"control.invalid && (control.dirty || control.touched)\" class=\"error-container text-danger\">\n <div *ngIf=\"control.errors.required\">\n {{controlName}} is required.\n </div>\n</div>\n", styles: [""], directives: [{ type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
2270
+ FormErrorMessageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.11", type: FormErrorMessageComponent, selector: "cgw-error-message", inputs: { control: "control", controlName: "controlName" }, ngImport: i0, template: "<div *ngIf=\"control.invalid && (control.dirty || control.touched)\" class=\"error-container text-danger\">\n <div *ngIf=\"control.errors.required\">\n {{controlName}} is required.\n </div>\n</div>\n", styles: [""], directives: [{ type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
2434
2271
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FormErrorMessageComponent, decorators: [{
2435
2272
  type: Component,
2436
2273
  args: [{ selector: 'cgw-error-message', template: "<div *ngIf=\"control.invalid && (control.dirty || control.touched)\" class=\"error-container text-danger\">\n <div *ngIf=\"control.errors.required\">\n {{controlName}} is required.\n </div>\n</div>\n", styles: [""] }]
@@ -2471,7 +2308,6 @@ SharedModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "
2471
2308
  DisableControlDirective,
2472
2309
  NewLinePipe,
2473
2310
  FrameMaterialPipe,
2474
- PackageSelectorComponent,
2475
2311
  FormErrorMessageComponent,
2476
2312
  ModalHeaderComponent], imports: [CommonModule, DropDownsModule, FormsModule, ReactiveFormsModule], exports: [PhonePipe,
2477
2313
  FileNamePipe,
@@ -2479,7 +2315,6 @@ SharedModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "
2479
2315
  NewLinePipe,
2480
2316
  DisableControlDirective,
2481
2317
  FrameMaterialPipe,
2482
- PackageSelectorComponent,
2483
2318
  FormErrorMessageComponent,
2484
2319
  ModalHeaderComponent] });
2485
2320
  SharedModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: SharedModule, imports: [[CommonModule, DropDownsModule, FormsModule, ReactiveFormsModule]] });
@@ -2493,7 +2328,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
2493
2328
  DisableControlDirective,
2494
2329
  NewLinePipe,
2495
2330
  FrameMaterialPipe,
2496
- PackageSelectorComponent,
2497
2331
  FormErrorMessageComponent,
2498
2332
  ModalHeaderComponent
2499
2333
  ],
@@ -2505,7 +2339,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
2505
2339
  NewLinePipe,
2506
2340
  DisableControlDirective,
2507
2341
  FrameMaterialPipe,
2508
- PackageSelectorComponent,
2509
2342
  FormErrorMessageComponent,
2510
2343
  ModalHeaderComponent
2511
2344
  ],
@@ -2570,7 +2403,7 @@ class NotificationBarComponent {
2570
2403
  }
2571
2404
  }
2572
2405
  NotificationBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NotificationBarComponent, deps: [{ token: NotificationService }], target: i0.ɵɵFactoryTarget.Component });
2573
- 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:1000001;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] });
2406
+ 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:1000001;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.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], animations: [fadeOutAnimation] });
2574
2407
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: NotificationBarComponent, decorators: [{
2575
2408
  type: Component,
2576
2409
  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:1000001;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"] }]
@@ -2612,5 +2445,5 @@ var NotificationType;
2612
2445
  * Generated bundle index. Do not edit.
2613
2446
  */
2614
2447
 
2615
- export { Address, BaseService, BundleItem, ChangeOrderPackageDetail, ChangeOrderStatus, Coating, CoatingService, CoatingValue, CoatingValueService, Configuration, ConfigurationService, Customer, CustomerService, Dealer, DealerContact, DealerCoupon, DealerService, DisableControlDirective, EnumPipe, FileNamePipe, FileUploadService, FilterOptions, FinishDateHelperService, Firearm, FirearmMillingTypeService, FirearmOptic, FirearmOpticService, FirearmService, FirearmSightService, FormErrorMessageComponent, FrameMaterial, FrameMaterialPipe, GunCaliber, GunPart, GunPartOption, GunPartService, InventoryItem, InventoryService, JFile, Material, MaterialService, MillingDetail, MillingItem, MillingType, MillingTypeAddon, MillingTypeAddonOption, MillingTypeAddonService, MillingTypeService, ModalHeaderComponent, MountType, MountTypeService, NewLinePipe, NotificationBarComponent, NotificationModule, NotificationService, NotificationType, Optic, OpticService, OpticSight, OpticStatus, Package, PackageItem, PackageOptionalItem, PackageOptionalItemService, PackageSelectorComponent, PackageService, PackageTotal, PackageVariation, PackageVariationOption, PackageVariationService, PhonePipe, Product, ProductService, ProjectType, PurchaseOrder, PurchaseOrderRefinishItem, PurchaseOrderService, PurchaseOrderStatus, QuickbooksService, RearSightPosition, RefinishCode, RefinishCodeService, RefinishDetail, ReportMillingItem, ReportRefinishItem, SharedModule, ShieldRMSOptions, Sight, SightMaterialService, SightMaterialType, SightService, SightType, SightTypeEnum, SightTypeService, SlideAddon, SlideAddonService, 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, coatingDescriptionValidator, coatingValueValidator, convertEnumToObjectArray, getCoatingValues, getCoatings, hasCoatingDescription, hasCoatingValues, refinishDetailsValidator, touchControls };
2448
+ export { Address, BaseService, BillingInfo, BundleItem, ChangeOrderPackageDetail, ChangeOrderStatus, Coating, CoatingService, CoatingValue, CoatingValueService, Configuration, ConfigurationService, Customer, CustomerService, Dealer, DealerContact, DealerCoupon, DealerService, DisableControlDirective, EnumPipe, FileNamePipe, FileUploadService, FilterOptions, FinishDateHelperService, Firearm, FirearmMillingTypeService, FirearmOptic, FirearmOpticService, FirearmService, FirearmSightService, FormErrorMessageComponent, FrameMaterial, FrameMaterialPipe, GunCaliber, GunPart, GunPartOption, GunPartService, InventoryItem, InventoryService, JFile, Material, MaterialService, MillingDetail, MillingItem, MillingType, MillingTypeAddon, MillingTypeAddonOption, MillingTypeAddonService, MillingTypeService, ModalHeaderComponent, MountType, MountTypeService, NewLinePipe, NotificationBarComponent, NotificationModule, NotificationService, NotificationType, Optic, OpticService, OpticSight, OpticStatus, Package, PackageItem, PackageOptionalItem, PackageOptionalItemService, PackageService, PackageTotal, PackageVariation, PackageVariationOption, PackageVariationService, PhonePipe, Product, ProductService, ProjectType, PurchaseOrder, PurchaseOrderRefinishItem, PurchaseOrderService, PurchaseOrderStatus, QuickbooksService, RearSightPosition, RefinishCode, RefinishCodeService, RefinishDetail, ReportMillingItem, ReportRefinishItem, SharedModule, ShieldRMSOptions, Sight, SightMaterialService, SightMaterialType, SightService, SightType, SightTypeEnum, SightTypeService, SlideAddon, SlideAddonService, State, StateService, StatusHistoryService, Total, TotalItem, TotalsService, UserService, Vendor, VendorContact, VendorService, WaitlistAction, WaitlistCustomerService, WaitlistGun, WaitlistGunPackageDetail, WaitlistHistory, WaitlistItem, WaitlistProjectService, WaitlistService, WaitlistStatus, WorkChangeOrder, WorkHoliday, WorkHolidayService, WorkOrder, WorkOrderAction, WorkOrderBillingTransaction, WorkOrderDiscount, WorkOrderDiscountService, WorkOrderHistory, WorkOrderInventoryItem, WorkOrderListItem, WorkOrderNonInventoryItem, WorkOrderNonInventoryItemService, WorkOrderPackageDetail, WorkOrderRefinishItem, WorkOrderService, WorkOrderShippingItem, WorkOrderShippingItemService, WorkOrderStatus, WorkOrderTotal, WorkOrderType, coatingDescriptionValidator, coatingValueValidator, convertEnumToObjectArray, getCoatingValues, getCoatings, hasCoatingDescription, hasCoatingValues, refinishDetailsValidator, touchControls };
2616
2449
  //# sourceMappingURL=gunsmith-common.mjs.map