gunsmith-common 2.3.2 → 2.3.4

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.
Files changed (45) hide show
  1. package/esm2020/shared/controls/package-selector/package-selector.component.mjs +3 -3
  2. package/esm2020/shared/services/base.service.mjs +9 -5
  3. package/esm2020/shared/services/coating.service.mjs +1 -41
  4. package/esm2020/shared/services/finish-date-helper.service.mjs +71 -0
  5. package/esm2020/shared/services/firearm.service.mjs +11 -31
  6. package/esm2020/shared/services/gun-part.service.mjs +20 -26
  7. package/esm2020/shared/services/index.mjs +2 -2
  8. package/esm2020/shared/services/inventory.service.mjs +9 -22
  9. package/esm2020/shared/services/optic.service.mjs +6 -23
  10. package/esm2020/shared/types/configuration.mjs +1 -1
  11. package/esm2020/shared/types/firearm-optic.mjs +2 -1
  12. package/esm2020/shared/types/firearm.mjs +1 -1
  13. package/esm2020/shared/types/index.mjs +1 -3
  14. package/esm2020/shared/types/milling-item.mjs +1 -1
  15. package/esm2020/shared/types/work-order.mjs +3 -1
  16. package/esm2020/shared/utils/index.mjs +1 -2
  17. package/fesm2015/gunsmith-common.mjs +152 -270
  18. package/fesm2015/gunsmith-common.mjs.map +1 -1
  19. package/fesm2020/gunsmith-common.mjs +149 -268
  20. package/fesm2020/gunsmith-common.mjs.map +1 -1
  21. package/gunsmith-common-2.3.4.tgz +0 -0
  22. package/package.json +1 -1
  23. package/shared/services/coating.service.d.ts +1 -8
  24. package/shared/services/finish-date-helper.service.d.ts +16 -0
  25. package/shared/services/firearm.service.d.ts +5 -11
  26. package/shared/services/gun-part.service.d.ts +8 -10
  27. package/shared/services/index.d.ts +1 -1
  28. package/shared/services/inventory.service.d.ts +4 -8
  29. package/shared/services/optic.service.d.ts +3 -8
  30. package/shared/types/configuration.d.ts +1 -0
  31. package/shared/types/firearm-optic.d.ts +1 -0
  32. package/shared/types/firearm.d.ts +0 -2
  33. package/shared/types/index.d.ts +0 -2
  34. package/shared/types/milling-item.d.ts +5 -2
  35. package/shared/types/work-order.d.ts +4 -0
  36. package/shared/utils/index.d.ts +0 -1
  37. package/esm2020/shared/services/firearm-series.service.mjs +0 -45
  38. package/esm2020/shared/types/firearm-series-optic.mjs +0 -9
  39. package/esm2020/shared/types/firearm-series.mjs +0 -10
  40. package/esm2020/shared/utils/finish-date-calculator.mjs +0 -30
  41. package/gunsmith-common-2.3.2.tgz +0 -0
  42. package/shared/services/firearm-series.service.d.ts +0 -18
  43. package/shared/types/firearm-series-optic.d.ts +0 -11
  44. package/shared/types/firearm-series.d.ts +0 -11
  45. package/shared/utils/finish-date-calculator.d.ts +0 -2
@@ -1,9 +1,9 @@
1
- import { DateTime } from 'luxon';
2
1
  import * as i0 from '@angular/core';
3
2
  import { Injectable, Inject, Pipe, Directive, Input, Component, EventEmitter, Output, NgModule } from '@angular/core';
4
3
  import * as i1 from '@angular/common/http';
5
- import { of, switchMap as switchMap$1, Subject } from 'rxjs';
4
+ import { of, switchMap as switchMap$1, lastValueFrom, forkJoin, Subject } from 'rxjs';
6
5
  import { switchMap } from 'rxjs/operators';
6
+ import { DateTime } from 'luxon';
7
7
  import * as i2 from '@angular/forms';
8
8
  import { NgControl, Validators, NG_VALUE_ACCESSOR, NG_VALIDATORS, FormsModule, ReactiveFormsModule } from '@angular/forms';
9
9
  import * as i3 from '@progress/kendo-angular-dropdowns';
@@ -221,6 +221,8 @@ class WorkOrder {
221
221
  this.logo = false;
222
222
  this.milling = false;
223
223
  this.specialOrder = false;
224
+ this.slideAddons = [];
225
+ this.sights = [];
224
226
  this.projectType = ProjectType.Firearm;
225
227
  this.status = WorkOrderStatus.InShop;
226
228
  this.histories = [];
@@ -313,25 +315,6 @@ var RearSightPosition;
313
315
  RearSightPosition[RearSightPosition["Behind"] = 1] = "Behind";
314
316
  })(RearSightPosition || (RearSightPosition = {}));
315
317
 
316
- class FirearmSeries {
317
- constructor() {
318
- this.active = true;
319
- this.blackFrontSights = false;
320
- this.tritiumFrontSights = false;
321
- this.fiberOpticFrontSights = false;
322
- this.firearmSeriesOptics = [];
323
- }
324
- }
325
-
326
- class FirearmSeriesOptic {
327
- constructor() {
328
- this.rearFrontSightBlack = false;
329
- this.rearFrontSightTritium = false;
330
- this.rearBehindSightBlack = false;
331
- this.rearBehindSightTritium = false;
332
- }
333
- }
334
-
335
318
  var FrameMaterial;
336
319
  (function (FrameMaterial) {
337
320
  FrameMaterial[FrameMaterial["All"] = 0] = "All";
@@ -524,6 +507,7 @@ class FirearmOptic {
524
507
  this.rearSights = [];
525
508
  this.keepDovetail = false;
526
509
  this.removeDovetail = false;
510
+ this.active = true;
527
511
  }
528
512
  }
529
513
 
@@ -537,34 +521,6 @@ class SlideAddon {
537
521
  }
538
522
  }
539
523
 
540
- function adjustHoliday(finishDate, holidays) {
541
- while (holidays.map(h => new Date(h.holiday)).findIndex(h => DateTime.fromJSDate(h) === DateTime.fromJSDate(finishDate)) !== -1) {
542
- do {
543
- finishDate = DateTime.fromJSDate(finishDate).plus({ days: 1 }).toJSDate();
544
- } while (finishDate.getDay() === 0 || finishDate.getDay() === 6);
545
- }
546
- return finishDate;
547
- }
548
- function calculateFinishDate(receivedDate, workOrderType, configs, holidays) {
549
- if (!receivedDate) {
550
- return null;
551
- }
552
- let finishDate = DateTime.fromJSDate(receivedDate).startOf("day");
553
- if (workOrderType === WorkOrderType.Warranty) {
554
- finishDate = finishDate.plus({ weeks: configs.warrantyWeeks });
555
- }
556
- else if (workOrderType === WorkOrderType.Expedited) {
557
- finishDate = finishDate.plus({ weeks: configs.expeditedWeeks });
558
- }
559
- else if (workOrderType === WorkOrderType.NewInBox) {
560
- finishDate = finishDate.plus({ weeks: configs.newInBoxWeeks });
561
- }
562
- else {
563
- finishDate = finishDate.plus({ weeks: configs.standardWeeks });
564
- }
565
- return adjustHoliday(finishDate.toJSDate(), holidays);
566
- }
567
-
568
524
  class CustomerService {
569
525
  constructor(http, env) {
570
526
  this.http = http;
@@ -608,99 +564,117 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
608
564
  args: ['env']
609
565
  }] }]; } });
610
566
 
611
- class FirearmService {
612
- constructor(http, env) {
567
+ class BaseService {
568
+ constructor(http) {
613
569
  this.http = http;
614
- this.env = env;
615
- this.url = this.env.baseUrl + 'api/firearms';
616
570
  }
617
- readFirearms(includeInactive = false) {
618
- return this.http.get(this.url, {
619
- params: {
620
- includeInactive: includeInactive.toString()
571
+ getUrl(...params) {
572
+ let baseUrl = this.urlSegments[0];
573
+ for (let i = 0; i < params.length; i++) {
574
+ baseUrl += `/${params[i]}`;
575
+ if (this.urlSegments.length > i + 1) {
576
+ baseUrl += `/${this.urlSegments[i + 1]}`;
621
577
  }
622
- });
578
+ }
579
+ return baseUrl;
580
+ }
581
+ getAll(...params) {
582
+ return this.http.get(this.getUrl(...params));
623
583
  }
624
- readFirearm(firearmId) {
625
- return this.http.get(`${this.url}/${firearmId}`);
584
+ getAllWithParams(queryParams, ...params) {
585
+ return this.http
586
+ .get(this.getUrl(...params), { params: queryParams });
587
+ }
588
+ get(...params) {
589
+ return this.http.get(this.getUrl(...params));
626
590
  }
627
- createFirearm(firearm) {
628
- return this.http.post(this.url, firearm);
591
+ create(item, ...params) {
592
+ return this.http
593
+ .post(this.getUrl(...params), item);
629
594
  }
630
- updateFirearm(firearmId, firearm) {
631
- return this.http.put(`${this.url}/${firearmId}`, firearm);
595
+ update(item, ...params) {
596
+ return this.http
597
+ .put(this.getUrl(...params), item);
632
598
  }
633
- deleteFirearm(firearmId) {
634
- return this.http.delete(`${this.url}/${firearmId}`);
599
+ delete(...params) {
600
+ return this.http
601
+ .delete(this.getUrl(...params));
635
602
  }
636
- readFirearmSeries(firearmId) {
637
- return this.http.get(`${this.url}/${firearmId}/series`);
603
+ }
604
+ BaseService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: BaseService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
605
+ BaseService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: BaseService, providedIn: 'root' });
606
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: BaseService, decorators: [{
607
+ type: Injectable,
608
+ args: [{
609
+ providedIn: 'root'
610
+ }]
611
+ }], ctorParameters: function () { return [{ type: i1.HttpClient }]; } });
612
+
613
+ class FirearmService extends BaseService {
614
+ constructor(http, env) {
615
+ super(http);
616
+ this.http = http;
617
+ this.env = env;
618
+ this.urlSegments = [`${this.env.baseUrl}api/firearms`];
638
619
  }
639
620
  readFirearmMaterial(firearmId) {
640
- return this.http.get(`${this.url}/${firearmId}/material`);
621
+ return this.http.get(`${this.getUrl(firearmId)}/material`);
641
622
  }
642
623
  readFirearmCosmetics(firearmId) {
643
- return this.http.get(`${this.url}/${firearmId}/cosmetics`);
624
+ return this.http.get(`${this.getUrl(firearmId)}/cosmetics`);
644
625
  }
645
626
  }
646
- FirearmService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FirearmService, deps: [{ token: i1.HttpClient }, { token: 'env' }], target: i0.ɵɵFactoryTarget.Injectable });
647
- FirearmService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FirearmService, providedIn: 'root' });
627
+ FirearmService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FirearmService, deps: [{ token: i1.HttpClient }, { token: "env" }], target: i0.ɵɵFactoryTarget.Injectable });
628
+ FirearmService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FirearmService, providedIn: "root" });
648
629
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FirearmService, decorators: [{
649
630
  type: Injectable,
650
631
  args: [{
651
- providedIn: 'root'
632
+ providedIn: "root",
652
633
  }]
653
634
  }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: undefined, decorators: [{
654
635
  type: Inject,
655
- args: ['env']
636
+ args: ["env"]
656
637
  }] }]; } });
657
638
 
658
- class GunPartService {
639
+ class GunPartService extends BaseService {
659
640
  constructor(http, env) {
641
+ super(http);
660
642
  this.http = http;
661
643
  this.env = env;
662
- this.url = this.env.baseUrl + 'api/gun-parts';
644
+ this.urlSegments = [`${this.env.baseUrl}api/gun-parts`];
663
645
  }
664
- readGunParts(includeInactive = false, gunsmith = null, customer = null) {
646
+ getParams(includeInactive, gunsmith, customer) {
665
647
  const params = {
666
- includeInactive: includeInactive.toString()
648
+ includeInactive: includeInactive.toString(),
667
649
  };
668
650
  if (gunsmith !== null) {
669
- params['gunsmith'] = gunsmith.toString();
651
+ params["gunsmith"] = gunsmith.toString();
670
652
  }
671
653
  if (customer !== null) {
672
- params['customer'] = customer.toString();
654
+ params["customer"] = customer.toString();
673
655
  }
674
- return this.http.get(this.url, {
675
- params: params
676
- });
677
- }
678
- readGunPart(id) {
679
- return this.http.get(`${this.url}/${id}`);
680
- }
681
- createGunPart(gunPart) {
682
- return this.http.post(this.url, gunPart);
656
+ return params;
683
657
  }
684
- updateGunPart(id, gunPart) {
685
- return this.http.put(`${this.url}/${id}`, gunPart);
658
+ getAllCustomer() {
659
+ return this.getAllWithParams(this.getParams(false, null, true));
686
660
  }
687
- deleteGunPart(id) {
688
- return this.http.delete(`${this.url}/${id}`);
661
+ getAllGunsmith() {
662
+ return this.getAllWithParams(this.getParams(false, true, null));
689
663
  }
690
- readPartCoatings(id) {
691
- return this.http.get(`${this.url}/${id}/coatings`);
664
+ getPartCoatings(id) {
665
+ return this.http.get(`${this.getUrl(id)}/coatings`);
692
666
  }
693
667
  }
694
- GunPartService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: GunPartService, deps: [{ token: i1.HttpClient }, { token: 'env' }], target: i0.ɵɵFactoryTarget.Injectable });
695
- GunPartService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: GunPartService, providedIn: 'root' });
668
+ GunPartService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: GunPartService, deps: [{ token: i1.HttpClient }, { token: "env" }], target: i0.ɵɵFactoryTarget.Injectable });
669
+ GunPartService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: GunPartService, providedIn: "root" });
696
670
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: GunPartService, decorators: [{
697
671
  type: Injectable,
698
672
  args: [{
699
- providedIn: 'root'
673
+ providedIn: "root",
700
674
  }]
701
675
  }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: undefined, decorators: [{
702
676
  type: Inject,
703
- args: ['env']
677
+ args: ["env"]
704
678
  }] }]; } });
705
679
 
706
680
  class StateService {
@@ -1250,33 +1224,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
1250
1224
  args: ['env']
1251
1225
  }] }]; } });
1252
1226
 
1253
- class OpticService {
1227
+ class OpticService extends BaseService {
1254
1228
  constructor(http, env) {
1229
+ super(http);
1255
1230
  this.http = http;
1256
1231
  this.env = env;
1257
- this.url = this.env.baseUrl + 'api/optics';
1258
- }
1259
- readOptics(includeInactive = false) {
1260
- return this.http.get(this.url, {
1261
- params: {
1262
- includeInactive: includeInactive.toString()
1263
- }
1264
- });
1265
- }
1266
- readOptic(opticId) {
1267
- return this.http.get(`${this.url}/${opticId}`);
1268
- }
1269
- createOptic(optic) {
1270
- return this.http.post(this.url, optic);
1271
- }
1272
- updateOptic(opticId, optic) {
1273
- return this.http.put(`${this.url}/${opticId}`, optic);
1274
- }
1275
- deleteOptic(opticId) {
1276
- return this.http.delete(`${this.url}/${opticId}`);
1232
+ this.urlSegments = [`${this.env.baseUrl}api/optics`];
1277
1233
  }
1278
1234
  readOpticReport() {
1279
- return this.http.get(`${this.url}/report`);
1235
+ return this.http.get(`${this.getUrl()}/report`);
1280
1236
  }
1281
1237
  }
1282
1238
  OpticService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: OpticService, deps: [{ token: i1.HttpClient }, { token: 'env' }], target: i0.ɵɵFactoryTarget.Injectable });
@@ -1316,89 +1272,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
1316
1272
  args: ['env']
1317
1273
  }] }]; } });
1318
1274
 
1319
- class FirearmSeriesService {
1320
- constructor(http, env) {
1321
- this.http = http;
1322
- this.env = env;
1323
- this.url = this.env.baseUrl + 'api/firearm-serieses';
1324
- }
1325
- readSerieses(includeInactive = false) {
1326
- return this.http.get(this.url, {
1327
- params: {
1328
- includeInactive: includeInactive.toString()
1329
- }
1330
- });
1331
- }
1332
- readSeries(firearmSeriesId) {
1333
- return this.http.get(`${this.url}/${firearmSeriesId}`);
1334
- }
1335
- createSeries(firearmSeries) {
1336
- return this.http.post(this.url, firearmSeries);
1337
- }
1338
- updateSeries(firearmSeriesId, firearmSeries) {
1339
- return this.http.put(`${this.url}/${firearmSeriesId}`, firearmSeries);
1340
- }
1341
- deleteSeries(firearmSeriesId) {
1342
- return this.http.delete(`${this.url}/${firearmSeriesId}`);
1343
- }
1344
- readSeriesOptics(firearmSeriesId) {
1345
- return this.http.get(`${this.url}/${firearmSeriesId}/optics`);
1346
- }
1347
- }
1348
- FirearmSeriesService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FirearmSeriesService, deps: [{ token: i1.HttpClient }, { token: 'env' }], target: i0.ɵɵFactoryTarget.Injectable });
1349
- FirearmSeriesService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FirearmSeriesService, providedIn: 'root' });
1350
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FirearmSeriesService, decorators: [{
1351
- type: Injectable,
1352
- args: [{
1353
- providedIn: 'root'
1354
- }]
1355
- }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: undefined, decorators: [{
1356
- type: Inject,
1357
- args: ['env']
1358
- }] }]; } });
1359
-
1360
- class BaseService {
1361
- constructor(http) {
1362
- this.http = http;
1363
- }
1364
- getUrl(...params) {
1365
- let baseUrl = this.urlSegments[0];
1366
- for (let i = 0; i < params.length; i++) {
1367
- baseUrl += `/${params[i]}`;
1368
- if (this.urlSegments.length > i + 1) {
1369
- baseUrl += `/${this.urlSegments[i + 1]}`;
1370
- }
1371
- }
1372
- return baseUrl;
1373
- }
1374
- getAll(...params) {
1375
- return this.http.get(this.getUrl(...params));
1376
- }
1377
- getAllWithParams(queryParams, ...params) {
1378
- return this.http.get(this.getUrl(...params), { params: queryParams });
1379
- }
1380
- get(...params) {
1381
- return this.http.get(this.getUrl(...params));
1382
- }
1383
- create(item, ...params) {
1384
- return this.http.post(this.getUrl(...params), item);
1385
- }
1386
- update(item, ...params) {
1387
- return this.http.put(this.getUrl(...params), item);
1388
- }
1389
- delete(...params) {
1390
- return this.http.delete(this.getUrl(...params));
1391
- }
1392
- }
1393
- BaseService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: BaseService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
1394
- BaseService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: BaseService, providedIn: 'root' });
1395
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: BaseService, decorators: [{
1396
- type: Injectable,
1397
- args: [{
1398
- providedIn: 'root'
1399
- }]
1400
- }], ctorParameters: function () { return [{ type: i1.HttpClient }]; } });
1401
-
1402
1275
  class MillingTypeService extends BaseService {
1403
1276
  constructor(http, env) {
1404
1277
  super(http);
@@ -1426,46 +1299,6 @@ class CoatingService extends BaseService {
1426
1299
  this.env = env;
1427
1300
  this.urlSegments = [`${this.env.baseUrl}api/coatings`];
1428
1301
  }
1429
- // readCoatings(includeInactive = false): Observable<Coating[]> {
1430
- // const params = {
1431
- // includeInactive: includeInactive.toString(),
1432
- // };
1433
- // return this.http.get<Coating[]>(this.url, {
1434
- // params: params,
1435
- // });
1436
- // }
1437
- // readCoating(id: number): Observable<Coating> {
1438
- // return this.http.get<Coating>(`${this.url}/${id}`);
1439
- // }
1440
- // createCoating(coating: Coating): Observable<Coating> {
1441
- // return this.http.post<Coating>(this.url, coating);
1442
- // }
1443
- // updateCoating(id: number, coating: Coating): Observable<Coating> {
1444
- // return this.http.put<Coating>(`${this.url}/${id}`, coating);
1445
- // }
1446
- // deleteCoating(id: number): Observable<any> {
1447
- // return this.http.delete(`${this.url}/${id}`);
1448
- // }
1449
- // Coating Values
1450
- readCoatingValues(coatingId, includeInactive = false) {
1451
- return this.http.get(`${this.url}/${coatingId}/coating-values`, {
1452
- params: {
1453
- includeInactive: includeInactive.toString(),
1454
- },
1455
- });
1456
- }
1457
- readCoatingValue(coatingId, coatingValueId) {
1458
- return this.http.get(`${this.url}/${coatingId}/coating-values/${coatingValueId}`);
1459
- }
1460
- createCoatingValue(coatingId, coatingValue) {
1461
- return this.http.post(`${this.url}/${coatingId}/coating-values`, coatingValue);
1462
- }
1463
- updateCoatingValue(coatingId, coatingValueId, coatingValue) {
1464
- return this.http.put(`${this.url}/${coatingId}/coating-values/${coatingValueId}`, coatingValue);
1465
- }
1466
- deleteCoatingValue(coatingId, coatingValueId) {
1467
- return this.http.delete(`${this.url}/${coatingId}/coating-values/${coatingValueId}`);
1468
- }
1469
1302
  }
1470
1303
  CoatingService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CoatingService, deps: [{ token: i1.HttpClient }, { token: "env" }], target: i0.ɵɵFactoryTarget.Injectable });
1471
1304
  CoatingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: CoatingService, providedIn: "root" });
@@ -1644,38 +1477,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
1644
1477
  args: ['env']
1645
1478
  }] }]; } });
1646
1479
 
1647
- class InventoryService {
1480
+ class InventoryService extends BaseService {
1648
1481
  constructor(http, env) {
1482
+ super(http);
1649
1483
  this.http = http;
1650
1484
  this.env = env;
1651
- this.url = this.env.baseUrl + 'api/inventory-items';
1652
- }
1653
- readInventoryItems(includeInactive = false, search = null) {
1654
- const params = {
1655
- includeInactive: includeInactive.toString()
1656
- };
1657
- if (search !== null) {
1658
- params['search'] = search;
1659
- }
1660
- return this.http.get(this.url, { params: params });
1661
- }
1662
- updateInventoryItem(id, item) {
1663
- return this.http.put(`${this.url}/${id}`, item);
1664
- }
1665
- createInventoryItem(item) {
1666
- return this.http.post(this.url, item);
1485
+ this.urlSegments = [`${this.env.baseUrl}api/inventory-items`];
1667
1486
  }
1668
1487
  }
1669
- InventoryService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: InventoryService, deps: [{ token: i1.HttpClient }, { token: 'env' }], target: i0.ɵɵFactoryTarget.Injectable });
1670
- InventoryService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: InventoryService, providedIn: 'root' });
1488
+ InventoryService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: InventoryService, deps: [{ token: i1.HttpClient }, { token: "env" }], target: i0.ɵɵFactoryTarget.Injectable });
1489
+ InventoryService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: InventoryService, providedIn: "root" });
1671
1490
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: InventoryService, decorators: [{
1672
1491
  type: Injectable,
1673
1492
  args: [{
1674
- providedIn: 'root'
1493
+ providedIn: "root",
1675
1494
  }]
1676
1495
  }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: undefined, decorators: [{
1677
1496
  type: Inject,
1678
- args: ['env']
1497
+ args: ["env"]
1679
1498
  }] }]; } });
1680
1499
 
1681
1500
  class StatusHistoryService {
@@ -2074,6 +1893,68 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
2074
1893
  args: ["env"]
2075
1894
  }] }]; } });
2076
1895
 
1896
+ class FinishDateHelperService {
1897
+ constructor(configService, holidayService) {
1898
+ this.configService = configService;
1899
+ this.holidayService = holidayService;
1900
+ this.holidays = [];
1901
+ }
1902
+ adjustHoliday(finishDate) {
1903
+ while (this.holidays
1904
+ .map((h) => new Date(h.holiday))
1905
+ .findIndex((h) => h === finishDate) !== -1) {
1906
+ do {
1907
+ finishDate = DateTime.fromJSDate(finishDate)
1908
+ .plus({ days: 1 })
1909
+ .toJSDate();
1910
+ } while (finishDate.getDay() === 0 || finishDate.getDay() === 6);
1911
+ }
1912
+ return finishDate;
1913
+ }
1914
+ calculateFinishDate(receivedDate, workOrderType) {
1915
+ let finishDate = DateTime.fromJSDate(receivedDate).startOf("day");
1916
+ if (workOrderType === WorkOrderType.Warranty) {
1917
+ finishDate = finishDate.plus({ weeks: this.configs.warrantyWeeks });
1918
+ }
1919
+ else if (workOrderType === WorkOrderType.Expedited) {
1920
+ finishDate = finishDate.plus({ weeks: this.configs.expeditedWeeks });
1921
+ }
1922
+ else if (workOrderType === WorkOrderType.NewInBox) {
1923
+ finishDate = finishDate.plus({ weeks: this.configs.newInBoxWeeks });
1924
+ }
1925
+ else {
1926
+ finishDate = finishDate.plus({ weeks: this.configs.standardWeeks });
1927
+ }
1928
+ return this.adjustHoliday(finishDate.toJSDate());
1929
+ }
1930
+ async calculate(receivedDate, workOrderType) {
1931
+ if (!receivedDate) {
1932
+ return null;
1933
+ }
1934
+ if (!this.configs) {
1935
+ return await lastValueFrom(forkJoin([
1936
+ this.configService.readConfigs(),
1937
+ this.holidayService.readHolidays(),
1938
+ ]).pipe(switchMap$1(([configs, holidays]) => {
1939
+ this.configs = configs;
1940
+ this.holidays = holidays;
1941
+ return of(this.calculateFinishDate(receivedDate, workOrderType));
1942
+ })));
1943
+ }
1944
+ return await new Promise((resolve) => {
1945
+ resolve(this.calculateFinishDate(receivedDate, workOrderType));
1946
+ });
1947
+ }
1948
+ }
1949
+ 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 });
1950
+ FinishDateHelperService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FinishDateHelperService, providedIn: "root" });
1951
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FinishDateHelperService, decorators: [{
1952
+ type: Injectable,
1953
+ args: [{
1954
+ providedIn: "root",
1955
+ }]
1956
+ }], ctorParameters: function () { return [{ type: ConfigurationService }, { type: WorkHolidayService }]; } });
1957
+
2077
1958
  class PhonePipe {
2078
1959
  transform(value, args) {
2079
1960
  if (value && value.length >= 10) {
@@ -2376,7 +2257,7 @@ PackageSelectorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0
2376
2257
  multi: true,
2377
2258
  useExisting: PackageSelectorComponent
2378
2259
  }
2379
- ], 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=\"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]" }] });
2260
+ ], 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]" }] });
2380
2261
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PackageSelectorComponent, decorators: [{
2381
2262
  type: Component,
2382
2263
  args: [{ selector: 'cgw-package-selector', providers: [
@@ -2390,7 +2271,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
2390
2271
  multi: true,
2391
2272
  useExisting: PackageSelectorComponent
2392
2273
  }
2393
- ], 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=\"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: [""] }]
2274
+ ], 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: [""] }]
2394
2275
  }], ctorParameters: function () { return [{ type: PackageService }, { type: i2.FormBuilder }, { type: i0.Injector }]; }, propDecorators: { firearmId: [{
2395
2276
  type: Input
2396
2277
  }], projectType: [{
@@ -2586,5 +2467,5 @@ var NotificationType;
2586
2467
  * Generated bundle index. Do not edit.
2587
2468
  */
2588
2469
 
2589
- export { BaseService, BundleItem, ChangeOrderPackageDetail, ChangeOrderStatus, Coating, CoatingService, CoatingValue, CoatingValueService, Configuration, ConfigurationService, Customer, CustomerService, Dealer, DealerContact, DealerCoupon, DealerService, DisableControlDirective, EnumPipe, FileNamePipe, FileUploadService, FilterOptions, Firearm, FirearmOptic, FirearmOpticService, FirearmSeries, FirearmSeriesOptic, FirearmSeriesService, FirearmService, FirearmSightService, FormErrorMessageComponent, FrameMaterial, FrameMaterialPipe, GunCaliber, GunPart, GunPartOption, GunPartService, InventoryItem, InventoryService, JFile, Material, MaterialService, MillingDetail, MillingItem, MillingType, 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, calculateFinishDate, coatingDescriptionValidator, coatingValueValidator, convertEnumToObjectArray, getCoatingValues, getCoatings, hasCoatingDescription, hasCoatingValues, refinishDetailsValidator, touchControls };
2470
+ export { BaseService, BundleItem, ChangeOrderPackageDetail, ChangeOrderStatus, Coating, CoatingService, CoatingValue, CoatingValueService, Configuration, ConfigurationService, Customer, CustomerService, Dealer, DealerContact, DealerCoupon, DealerService, DisableControlDirective, EnumPipe, FileNamePipe, FileUploadService, FilterOptions, FinishDateHelperService, Firearm, FirearmOptic, FirearmOpticService, FirearmService, FirearmSightService, FormErrorMessageComponent, FrameMaterial, FrameMaterialPipe, GunCaliber, GunPart, GunPartOption, GunPartService, InventoryItem, InventoryService, JFile, Material, MaterialService, MillingDetail, MillingItem, MillingType, 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 };
2590
2471
  //# sourceMappingURL=gunsmith-common.mjs.map