gunsmith-common 2.3.1 → 2.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/shared/controls/package-selector/package-selector.component.mjs +4 -4
- package/esm2020/shared/services/firearm.service.mjs +11 -31
- package/esm2020/shared/services/gun-part.service.mjs +20 -26
- package/esm2020/shared/services/index.mjs +1 -2
- package/esm2020/shared/services/inventory.service.mjs +9 -22
- package/esm2020/shared/services/optic.service.mjs +6 -23
- package/esm2020/shared/types/firearm.mjs +1 -1
- package/esm2020/shared/types/index.mjs +1 -3
- package/esm2020/shared/types/milling-item.mjs +1 -1
- package/esm2020/shared/types/sight.mjs +1 -1
- package/esm2020/shared/types/work-order.mjs +3 -1
- package/fesm2015/gunsmith-common.mjs +81 -201
- package/fesm2015/gunsmith-common.mjs.map +1 -1
- package/fesm2020/gunsmith-common.mjs +81 -199
- package/fesm2020/gunsmith-common.mjs.map +1 -1
- package/gunsmith-common-2.3.3.tgz +0 -0
- package/package.json +1 -1
- package/shared/services/firearm.service.d.ts +5 -11
- package/shared/services/gun-part.service.d.ts +8 -10
- package/shared/services/index.d.ts +0 -1
- package/shared/services/inventory.service.d.ts +4 -8
- package/shared/services/optic.service.d.ts +3 -8
- package/shared/types/firearm.d.ts +0 -2
- package/shared/types/index.d.ts +0 -2
- package/shared/types/milling-item.d.ts +5 -2
- package/shared/types/sight.d.ts +1 -1
- package/shared/types/work-order.d.ts +4 -0
- package/esm2020/shared/services/firearm-series.service.mjs +0 -45
- package/esm2020/shared/types/firearm-series-optic.mjs +0 -9
- package/esm2020/shared/types/firearm-series.mjs +0 -10
- package/gunsmith-common-2.3.1.tgz +0 -0
- package/shared/services/firearm-series.service.d.ts +0 -18
- package/shared/types/firearm-series-optic.d.ts +0 -11
- package/shared/types/firearm-series.d.ts +0 -11
|
@@ -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";
|
|
@@ -610,102 +593,116 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
610
593
|
}] }];
|
|
611
594
|
} });
|
|
612
595
|
|
|
613
|
-
class
|
|
614
|
-
constructor(http
|
|
596
|
+
class BaseService {
|
|
597
|
+
constructor(http) {
|
|
615
598
|
this.http = http;
|
|
616
|
-
this.env = env;
|
|
617
|
-
this.url = this.env.baseUrl + 'api/firearms';
|
|
618
599
|
}
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
600
|
+
getUrl(...params) {
|
|
601
|
+
let baseUrl = this.urlSegments[0];
|
|
602
|
+
for (let i = 0; i < params.length; i++) {
|
|
603
|
+
baseUrl += `/${params[i]}`;
|
|
604
|
+
if (this.urlSegments.length > i + 1) {
|
|
605
|
+
baseUrl += `/${this.urlSegments[i + 1]}`;
|
|
623
606
|
}
|
|
624
|
-
}
|
|
607
|
+
}
|
|
608
|
+
return baseUrl;
|
|
609
|
+
}
|
|
610
|
+
getAll(...params) {
|
|
611
|
+
return this.http.get(this.getUrl(...params));
|
|
612
|
+
}
|
|
613
|
+
getAllWithParams(queryParams, ...params) {
|
|
614
|
+
return this.http.get(this.getUrl(...params), { params: queryParams });
|
|
625
615
|
}
|
|
626
|
-
|
|
627
|
-
return this.http.get(
|
|
616
|
+
get(...params) {
|
|
617
|
+
return this.http.get(this.getUrl(...params));
|
|
628
618
|
}
|
|
629
|
-
|
|
630
|
-
return this.http.post(this.
|
|
619
|
+
create(item, ...params) {
|
|
620
|
+
return this.http.post(this.getUrl(...params), item);
|
|
631
621
|
}
|
|
632
|
-
|
|
633
|
-
return this.http.put(
|
|
622
|
+
update(item, ...params) {
|
|
623
|
+
return this.http.put(this.getUrl(...params), item);
|
|
634
624
|
}
|
|
635
|
-
|
|
636
|
-
return this.http.delete(
|
|
625
|
+
delete(...params) {
|
|
626
|
+
return this.http.delete(this.getUrl(...params));
|
|
637
627
|
}
|
|
638
|
-
|
|
639
|
-
|
|
628
|
+
}
|
|
629
|
+
BaseService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: BaseService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
630
|
+
BaseService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: BaseService, providedIn: 'root' });
|
|
631
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: BaseService, decorators: [{
|
|
632
|
+
type: Injectable,
|
|
633
|
+
args: [{
|
|
634
|
+
providedIn: 'root'
|
|
635
|
+
}]
|
|
636
|
+
}], ctorParameters: function () { return [{ type: i1.HttpClient }]; } });
|
|
637
|
+
|
|
638
|
+
class FirearmService extends BaseService {
|
|
639
|
+
constructor(http, env) {
|
|
640
|
+
super(http);
|
|
641
|
+
this.http = http;
|
|
642
|
+
this.env = env;
|
|
643
|
+
this.urlSegments = [`${this.env.baseUrl}api/firearms`];
|
|
640
644
|
}
|
|
641
645
|
readFirearmMaterial(firearmId) {
|
|
642
|
-
return this.http.get(`${this.
|
|
646
|
+
return this.http.get(`${this.getUrl(firearmId)}/material`);
|
|
643
647
|
}
|
|
644
648
|
readFirearmCosmetics(firearmId) {
|
|
645
|
-
return this.http.get(`${this.
|
|
649
|
+
return this.http.get(`${this.getUrl(firearmId)}/cosmetics`);
|
|
646
650
|
}
|
|
647
651
|
}
|
|
648
|
-
FirearmService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FirearmService, deps: [{ token: i1.HttpClient }, { token:
|
|
649
|
-
FirearmService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FirearmService, providedIn:
|
|
652
|
+
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 });
|
|
653
|
+
FirearmService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FirearmService, providedIn: "root" });
|
|
650
654
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FirearmService, decorators: [{
|
|
651
655
|
type: Injectable,
|
|
652
656
|
args: [{
|
|
653
|
-
providedIn:
|
|
657
|
+
providedIn: "root",
|
|
654
658
|
}]
|
|
655
659
|
}], ctorParameters: function () {
|
|
656
660
|
return [{ type: i1.HttpClient }, { type: undefined, decorators: [{
|
|
657
661
|
type: Inject,
|
|
658
|
-
args: [
|
|
662
|
+
args: ["env"]
|
|
659
663
|
}] }];
|
|
660
664
|
} });
|
|
661
665
|
|
|
662
|
-
class GunPartService {
|
|
666
|
+
class GunPartService extends BaseService {
|
|
663
667
|
constructor(http, env) {
|
|
668
|
+
super(http);
|
|
664
669
|
this.http = http;
|
|
665
670
|
this.env = env;
|
|
666
|
-
this.
|
|
671
|
+
this.urlSegments = [`${this.env.baseUrl}api/gun-parts`];
|
|
667
672
|
}
|
|
668
|
-
|
|
673
|
+
getParams(includeInactive, gunsmith, customer) {
|
|
669
674
|
const params = {
|
|
670
|
-
includeInactive: includeInactive.toString()
|
|
675
|
+
includeInactive: includeInactive.toString(),
|
|
671
676
|
};
|
|
672
677
|
if (gunsmith !== null) {
|
|
673
|
-
params[
|
|
678
|
+
params["gunsmith"] = gunsmith.toString();
|
|
674
679
|
}
|
|
675
680
|
if (customer !== null) {
|
|
676
|
-
params[
|
|
681
|
+
params["customer"] = customer.toString();
|
|
677
682
|
}
|
|
678
|
-
return
|
|
679
|
-
params: params
|
|
680
|
-
});
|
|
681
|
-
}
|
|
682
|
-
readGunPart(id) {
|
|
683
|
-
return this.http.get(`${this.url}/${id}`);
|
|
684
|
-
}
|
|
685
|
-
createGunPart(gunPart) {
|
|
686
|
-
return this.http.post(this.url, gunPart);
|
|
683
|
+
return params;
|
|
687
684
|
}
|
|
688
|
-
|
|
689
|
-
return this.
|
|
685
|
+
getAllCustomer() {
|
|
686
|
+
return this.getAllWithParams(this.getParams(false, null, true));
|
|
690
687
|
}
|
|
691
|
-
|
|
692
|
-
return this.
|
|
688
|
+
getAllGunsmith() {
|
|
689
|
+
return this.getAllWithParams(this.getParams(false, true, null));
|
|
693
690
|
}
|
|
694
|
-
|
|
695
|
-
return this.http.get(`${this.
|
|
691
|
+
getPartCoatings(id) {
|
|
692
|
+
return this.http.get(`${this.getUrl(id)}/coatings`);
|
|
696
693
|
}
|
|
697
694
|
}
|
|
698
|
-
GunPartService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: GunPartService, deps: [{ token: i1.HttpClient }, { token:
|
|
699
|
-
GunPartService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: GunPartService, providedIn:
|
|
695
|
+
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 });
|
|
696
|
+
GunPartService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: GunPartService, providedIn: "root" });
|
|
700
697
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: GunPartService, decorators: [{
|
|
701
698
|
type: Injectable,
|
|
702
699
|
args: [{
|
|
703
|
-
providedIn:
|
|
700
|
+
providedIn: "root",
|
|
704
701
|
}]
|
|
705
702
|
}], ctorParameters: function () {
|
|
706
703
|
return [{ type: i1.HttpClient }, { type: undefined, decorators: [{
|
|
707
704
|
type: Inject,
|
|
708
|
-
args: [
|
|
705
|
+
args: ["env"]
|
|
709
706
|
}] }];
|
|
710
707
|
} });
|
|
711
708
|
|
|
@@ -1276,33 +1273,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
1276
1273
|
}] }];
|
|
1277
1274
|
} });
|
|
1278
1275
|
|
|
1279
|
-
class OpticService {
|
|
1276
|
+
class OpticService extends BaseService {
|
|
1280
1277
|
constructor(http, env) {
|
|
1278
|
+
super(http);
|
|
1281
1279
|
this.http = http;
|
|
1282
1280
|
this.env = env;
|
|
1283
|
-
this.
|
|
1284
|
-
}
|
|
1285
|
-
readOptics(includeInactive = false) {
|
|
1286
|
-
return this.http.get(this.url, {
|
|
1287
|
-
params: {
|
|
1288
|
-
includeInactive: includeInactive.toString()
|
|
1289
|
-
}
|
|
1290
|
-
});
|
|
1291
|
-
}
|
|
1292
|
-
readOptic(opticId) {
|
|
1293
|
-
return this.http.get(`${this.url}/${opticId}`);
|
|
1294
|
-
}
|
|
1295
|
-
createOptic(optic) {
|
|
1296
|
-
return this.http.post(this.url, optic);
|
|
1297
|
-
}
|
|
1298
|
-
updateOptic(opticId, optic) {
|
|
1299
|
-
return this.http.put(`${this.url}/${opticId}`, optic);
|
|
1300
|
-
}
|
|
1301
|
-
deleteOptic(opticId) {
|
|
1302
|
-
return this.http.delete(`${this.url}/${opticId}`);
|
|
1281
|
+
this.urlSegments = [`${this.env.baseUrl}api/optics`];
|
|
1303
1282
|
}
|
|
1304
1283
|
readOpticReport() {
|
|
1305
|
-
return this.http.get(`${this.
|
|
1284
|
+
return this.http.get(`${this.getUrl()}/report`);
|
|
1306
1285
|
}
|
|
1307
1286
|
}
|
|
1308
1287
|
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 });
|
|
@@ -1346,91 +1325,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
1346
1325
|
}] }];
|
|
1347
1326
|
} });
|
|
1348
1327
|
|
|
1349
|
-
class FirearmSeriesService {
|
|
1350
|
-
constructor(http, env) {
|
|
1351
|
-
this.http = http;
|
|
1352
|
-
this.env = env;
|
|
1353
|
-
this.url = this.env.baseUrl + 'api/firearm-serieses';
|
|
1354
|
-
}
|
|
1355
|
-
readSerieses(includeInactive = false) {
|
|
1356
|
-
return this.http.get(this.url, {
|
|
1357
|
-
params: {
|
|
1358
|
-
includeInactive: includeInactive.toString()
|
|
1359
|
-
}
|
|
1360
|
-
});
|
|
1361
|
-
}
|
|
1362
|
-
readSeries(firearmSeriesId) {
|
|
1363
|
-
return this.http.get(`${this.url}/${firearmSeriesId}`);
|
|
1364
|
-
}
|
|
1365
|
-
createSeries(firearmSeries) {
|
|
1366
|
-
return this.http.post(this.url, firearmSeries);
|
|
1367
|
-
}
|
|
1368
|
-
updateSeries(firearmSeriesId, firearmSeries) {
|
|
1369
|
-
return this.http.put(`${this.url}/${firearmSeriesId}`, firearmSeries);
|
|
1370
|
-
}
|
|
1371
|
-
deleteSeries(firearmSeriesId) {
|
|
1372
|
-
return this.http.delete(`${this.url}/${firearmSeriesId}`);
|
|
1373
|
-
}
|
|
1374
|
-
readSeriesOptics(firearmSeriesId) {
|
|
1375
|
-
return this.http.get(`${this.url}/${firearmSeriesId}/optics`);
|
|
1376
|
-
}
|
|
1377
|
-
}
|
|
1378
|
-
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 });
|
|
1379
|
-
FirearmSeriesService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FirearmSeriesService, providedIn: 'root' });
|
|
1380
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FirearmSeriesService, decorators: [{
|
|
1381
|
-
type: Injectable,
|
|
1382
|
-
args: [{
|
|
1383
|
-
providedIn: 'root'
|
|
1384
|
-
}]
|
|
1385
|
-
}], ctorParameters: function () {
|
|
1386
|
-
return [{ type: i1.HttpClient }, { type: undefined, decorators: [{
|
|
1387
|
-
type: Inject,
|
|
1388
|
-
args: ['env']
|
|
1389
|
-
}] }];
|
|
1390
|
-
} });
|
|
1391
|
-
|
|
1392
|
-
class BaseService {
|
|
1393
|
-
constructor(http) {
|
|
1394
|
-
this.http = http;
|
|
1395
|
-
}
|
|
1396
|
-
getUrl(...params) {
|
|
1397
|
-
let baseUrl = this.urlSegments[0];
|
|
1398
|
-
for (let i = 0; i < params.length; i++) {
|
|
1399
|
-
baseUrl += `/${params[i]}`;
|
|
1400
|
-
if (this.urlSegments.length > i + 1) {
|
|
1401
|
-
baseUrl += `/${this.urlSegments[i + 1]}`;
|
|
1402
|
-
}
|
|
1403
|
-
}
|
|
1404
|
-
return baseUrl;
|
|
1405
|
-
}
|
|
1406
|
-
getAll(...params) {
|
|
1407
|
-
return this.http.get(this.getUrl(...params));
|
|
1408
|
-
}
|
|
1409
|
-
getAllWithParams(queryParams, ...params) {
|
|
1410
|
-
return this.http.get(this.getUrl(...params), { params: queryParams });
|
|
1411
|
-
}
|
|
1412
|
-
get(...params) {
|
|
1413
|
-
return this.http.get(this.getUrl(...params));
|
|
1414
|
-
}
|
|
1415
|
-
create(item, ...params) {
|
|
1416
|
-
return this.http.post(this.getUrl(...params), item);
|
|
1417
|
-
}
|
|
1418
|
-
update(item, ...params) {
|
|
1419
|
-
return this.http.put(this.getUrl(...params), item);
|
|
1420
|
-
}
|
|
1421
|
-
delete(...params) {
|
|
1422
|
-
return this.http.delete(this.getUrl(...params));
|
|
1423
|
-
}
|
|
1424
|
-
}
|
|
1425
|
-
BaseService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: BaseService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1426
|
-
BaseService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: BaseService, providedIn: 'root' });
|
|
1427
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: BaseService, decorators: [{
|
|
1428
|
-
type: Injectable,
|
|
1429
|
-
args: [{
|
|
1430
|
-
providedIn: 'root'
|
|
1431
|
-
}]
|
|
1432
|
-
}], ctorParameters: function () { return [{ type: i1.HttpClient }]; } });
|
|
1433
|
-
|
|
1434
1328
|
class MillingTypeService extends BaseService {
|
|
1435
1329
|
constructor(http, env) {
|
|
1436
1330
|
super(http);
|
|
@@ -1688,39 +1582,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
1688
1582
|
}] }];
|
|
1689
1583
|
} });
|
|
1690
1584
|
|
|
1691
|
-
class InventoryService {
|
|
1585
|
+
class InventoryService extends BaseService {
|
|
1692
1586
|
constructor(http, env) {
|
|
1587
|
+
super(http);
|
|
1693
1588
|
this.http = http;
|
|
1694
1589
|
this.env = env;
|
|
1695
|
-
this.
|
|
1696
|
-
}
|
|
1697
|
-
readInventoryItems(includeInactive = false, search = null) {
|
|
1698
|
-
const params = {
|
|
1699
|
-
includeInactive: includeInactive.toString()
|
|
1700
|
-
};
|
|
1701
|
-
if (search !== null) {
|
|
1702
|
-
params['search'] = search;
|
|
1703
|
-
}
|
|
1704
|
-
return this.http.get(this.url, { params: params });
|
|
1705
|
-
}
|
|
1706
|
-
updateInventoryItem(id, item) {
|
|
1707
|
-
return this.http.put(`${this.url}/${id}`, item);
|
|
1708
|
-
}
|
|
1709
|
-
createInventoryItem(item) {
|
|
1710
|
-
return this.http.post(this.url, item);
|
|
1590
|
+
this.urlSegments = [`${this.env.baseUrl}api/inventory-items`];
|
|
1711
1591
|
}
|
|
1712
1592
|
}
|
|
1713
|
-
InventoryService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: InventoryService, deps: [{ token: i1.HttpClient }, { token:
|
|
1714
|
-
InventoryService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: InventoryService, providedIn:
|
|
1593
|
+
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 });
|
|
1594
|
+
InventoryService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: InventoryService, providedIn: "root" });
|
|
1715
1595
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: InventoryService, decorators: [{
|
|
1716
1596
|
type: Injectable,
|
|
1717
1597
|
args: [{
|
|
1718
|
-
providedIn:
|
|
1598
|
+
providedIn: "root",
|
|
1719
1599
|
}]
|
|
1720
1600
|
}], ctorParameters: function () {
|
|
1721
1601
|
return [{ type: i1.HttpClient }, { type: undefined, decorators: [{
|
|
1722
1602
|
type: Inject,
|
|
1723
|
-
args: [
|
|
1603
|
+
args: ["env"]
|
|
1724
1604
|
}] }];
|
|
1725
1605
|
} });
|
|
1726
1606
|
|
|
@@ -2362,7 +2242,7 @@ class PackageSelectorComponent {
|
|
|
2362
2242
|
this.packageForm.controls.variations.valueChanges
|
|
2363
2243
|
.subscribe(value => {
|
|
2364
2244
|
if (value) {
|
|
2365
|
-
this.packageForm.controls.variations.setValue(value.map(v => v.id ? v : null), { emitEvent: false });
|
|
2245
|
+
this.packageForm.controls.variations.setValue(value.map(v => (v === null || v === void 0 ? void 0 : v.id) ? v : null), { emitEvent: false });
|
|
2366
2246
|
}
|
|
2367
2247
|
});
|
|
2368
2248
|
this.packageForm.controls.package.valueChanges
|
|
@@ -2457,7 +2337,7 @@ PackageSelectorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0
|
|
|
2457
2337
|
multi: true,
|
|
2458
2338
|
useExisting: PackageSelectorComponent
|
|
2459
2339
|
}
|
|
2460
|
-
], 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
|
|
2340
|
+
], 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]" }] });
|
|
2461
2341
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PackageSelectorComponent, decorators: [{
|
|
2462
2342
|
type: Component,
|
|
2463
2343
|
args: [{ selector: 'cgw-package-selector', providers: [
|
|
@@ -2471,7 +2351,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
2471
2351
|
multi: true,
|
|
2472
2352
|
useExisting: PackageSelectorComponent
|
|
2473
2353
|
}
|
|
2474
|
-
], template: "<div [formGroup]=\"packageForm\">\n <div class=\"row mb-2\">\n <div class=\"col\">\n <label for=\"waitlist-gun-package\">Package
|
|
2354
|
+
], 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: [""] }]
|
|
2475
2355
|
}], ctorParameters: function () { return [{ type: PackageService }, { type: i2.FormBuilder }, { type: i0.Injector }]; }, propDecorators: { firearmId: [{
|
|
2476
2356
|
type: Input
|
|
2477
2357
|
}], projectType: [{
|
|
@@ -2667,5 +2547,5 @@ var NotificationType;
|
|
|
2667
2547
|
* Generated bundle index. Do not edit.
|
|
2668
2548
|
*/
|
|
2669
2549
|
|
|
2670
|
-
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,
|
|
2550
|
+
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, 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 };
|
|
2671
2551
|
//# sourceMappingURL=gunsmith-common.mjs.map
|