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";
|
|
@@ -608,99 +591,113 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
608
591
|
args: ['env']
|
|
609
592
|
}] }]; } });
|
|
610
593
|
|
|
611
|
-
class
|
|
612
|
-
constructor(http
|
|
594
|
+
class BaseService {
|
|
595
|
+
constructor(http) {
|
|
613
596
|
this.http = http;
|
|
614
|
-
this.env = env;
|
|
615
|
-
this.url = this.env.baseUrl + 'api/firearms';
|
|
616
597
|
}
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
598
|
+
getUrl(...params) {
|
|
599
|
+
let baseUrl = this.urlSegments[0];
|
|
600
|
+
for (let i = 0; i < params.length; i++) {
|
|
601
|
+
baseUrl += `/${params[i]}`;
|
|
602
|
+
if (this.urlSegments.length > i + 1) {
|
|
603
|
+
baseUrl += `/${this.urlSegments[i + 1]}`;
|
|
621
604
|
}
|
|
622
|
-
}
|
|
605
|
+
}
|
|
606
|
+
return baseUrl;
|
|
623
607
|
}
|
|
624
|
-
|
|
625
|
-
return this.http.get(
|
|
608
|
+
getAll(...params) {
|
|
609
|
+
return this.http.get(this.getUrl(...params));
|
|
610
|
+
}
|
|
611
|
+
getAllWithParams(queryParams, ...params) {
|
|
612
|
+
return this.http.get(this.getUrl(...params), { params: queryParams });
|
|
626
613
|
}
|
|
627
|
-
|
|
628
|
-
return this.http.
|
|
614
|
+
get(...params) {
|
|
615
|
+
return this.http.get(this.getUrl(...params));
|
|
629
616
|
}
|
|
630
|
-
|
|
631
|
-
return this.http.
|
|
617
|
+
create(item, ...params) {
|
|
618
|
+
return this.http.post(this.getUrl(...params), item);
|
|
632
619
|
}
|
|
633
|
-
|
|
634
|
-
return this.http.
|
|
620
|
+
update(item, ...params) {
|
|
621
|
+
return this.http.put(this.getUrl(...params), item);
|
|
635
622
|
}
|
|
636
|
-
|
|
637
|
-
return this.http.
|
|
623
|
+
delete(...params) {
|
|
624
|
+
return this.http.delete(this.getUrl(...params));
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
BaseService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: BaseService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
628
|
+
BaseService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: BaseService, providedIn: 'root' });
|
|
629
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: BaseService, decorators: [{
|
|
630
|
+
type: Injectable,
|
|
631
|
+
args: [{
|
|
632
|
+
providedIn: 'root'
|
|
633
|
+
}]
|
|
634
|
+
}], ctorParameters: function () { return [{ type: i1.HttpClient }]; } });
|
|
635
|
+
|
|
636
|
+
class FirearmService extends BaseService {
|
|
637
|
+
constructor(http, env) {
|
|
638
|
+
super(http);
|
|
639
|
+
this.http = http;
|
|
640
|
+
this.env = env;
|
|
641
|
+
this.urlSegments = [`${this.env.baseUrl}api/firearms`];
|
|
638
642
|
}
|
|
639
643
|
readFirearmMaterial(firearmId) {
|
|
640
|
-
return this.http.get(`${this.
|
|
644
|
+
return this.http.get(`${this.getUrl(firearmId)}/material`);
|
|
641
645
|
}
|
|
642
646
|
readFirearmCosmetics(firearmId) {
|
|
643
|
-
return this.http.get(`${this.
|
|
647
|
+
return this.http.get(`${this.getUrl(firearmId)}/cosmetics`);
|
|
644
648
|
}
|
|
645
649
|
}
|
|
646
|
-
FirearmService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FirearmService, deps: [{ token: i1.HttpClient }, { token:
|
|
647
|
-
FirearmService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FirearmService, providedIn:
|
|
650
|
+
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 });
|
|
651
|
+
FirearmService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FirearmService, providedIn: "root" });
|
|
648
652
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: FirearmService, decorators: [{
|
|
649
653
|
type: Injectable,
|
|
650
654
|
args: [{
|
|
651
|
-
providedIn:
|
|
655
|
+
providedIn: "root",
|
|
652
656
|
}]
|
|
653
657
|
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: undefined, decorators: [{
|
|
654
658
|
type: Inject,
|
|
655
|
-
args: [
|
|
659
|
+
args: ["env"]
|
|
656
660
|
}] }]; } });
|
|
657
661
|
|
|
658
|
-
class GunPartService {
|
|
662
|
+
class GunPartService extends BaseService {
|
|
659
663
|
constructor(http, env) {
|
|
664
|
+
super(http);
|
|
660
665
|
this.http = http;
|
|
661
666
|
this.env = env;
|
|
662
|
-
this.
|
|
667
|
+
this.urlSegments = [`${this.env.baseUrl}api/gun-parts`];
|
|
663
668
|
}
|
|
664
|
-
|
|
669
|
+
getParams(includeInactive, gunsmith, customer) {
|
|
665
670
|
const params = {
|
|
666
|
-
includeInactive: includeInactive.toString()
|
|
671
|
+
includeInactive: includeInactive.toString(),
|
|
667
672
|
};
|
|
668
673
|
if (gunsmith !== null) {
|
|
669
|
-
params[
|
|
674
|
+
params["gunsmith"] = gunsmith.toString();
|
|
670
675
|
}
|
|
671
676
|
if (customer !== null) {
|
|
672
|
-
params[
|
|
677
|
+
params["customer"] = customer.toString();
|
|
673
678
|
}
|
|
674
|
-
return
|
|
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);
|
|
679
|
+
return params;
|
|
683
680
|
}
|
|
684
|
-
|
|
685
|
-
return this.
|
|
681
|
+
getAllCustomer() {
|
|
682
|
+
return this.getAllWithParams(this.getParams(false, null, true));
|
|
686
683
|
}
|
|
687
|
-
|
|
688
|
-
return this.
|
|
684
|
+
getAllGunsmith() {
|
|
685
|
+
return this.getAllWithParams(this.getParams(false, true, null));
|
|
689
686
|
}
|
|
690
|
-
|
|
691
|
-
return this.http.get(`${this.
|
|
687
|
+
getPartCoatings(id) {
|
|
688
|
+
return this.http.get(`${this.getUrl(id)}/coatings`);
|
|
692
689
|
}
|
|
693
690
|
}
|
|
694
|
-
GunPartService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: GunPartService, deps: [{ token: i1.HttpClient }, { token:
|
|
695
|
-
GunPartService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: GunPartService, providedIn:
|
|
691
|
+
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 });
|
|
692
|
+
GunPartService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: GunPartService, providedIn: "root" });
|
|
696
693
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: GunPartService, decorators: [{
|
|
697
694
|
type: Injectable,
|
|
698
695
|
args: [{
|
|
699
|
-
providedIn:
|
|
696
|
+
providedIn: "root",
|
|
700
697
|
}]
|
|
701
698
|
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: undefined, decorators: [{
|
|
702
699
|
type: Inject,
|
|
703
|
-
args: [
|
|
700
|
+
args: ["env"]
|
|
704
701
|
}] }]; } });
|
|
705
702
|
|
|
706
703
|
class StateService {
|
|
@@ -1250,33 +1247,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
1250
1247
|
args: ['env']
|
|
1251
1248
|
}] }]; } });
|
|
1252
1249
|
|
|
1253
|
-
class OpticService {
|
|
1250
|
+
class OpticService extends BaseService {
|
|
1254
1251
|
constructor(http, env) {
|
|
1252
|
+
super(http);
|
|
1255
1253
|
this.http = http;
|
|
1256
1254
|
this.env = env;
|
|
1257
|
-
this.
|
|
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}`);
|
|
1255
|
+
this.urlSegments = [`${this.env.baseUrl}api/optics`];
|
|
1277
1256
|
}
|
|
1278
1257
|
readOpticReport() {
|
|
1279
|
-
return this.http.get(`${this.
|
|
1258
|
+
return this.http.get(`${this.getUrl()}/report`);
|
|
1280
1259
|
}
|
|
1281
1260
|
}
|
|
1282
1261
|
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 +1295,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
1316
1295
|
args: ['env']
|
|
1317
1296
|
}] }]; } });
|
|
1318
1297
|
|
|
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
1298
|
class MillingTypeService extends BaseService {
|
|
1403
1299
|
constructor(http, env) {
|
|
1404
1300
|
super(http);
|
|
@@ -1644,38 +1540,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
1644
1540
|
args: ['env']
|
|
1645
1541
|
}] }]; } });
|
|
1646
1542
|
|
|
1647
|
-
class InventoryService {
|
|
1543
|
+
class InventoryService extends BaseService {
|
|
1648
1544
|
constructor(http, env) {
|
|
1545
|
+
super(http);
|
|
1649
1546
|
this.http = http;
|
|
1650
1547
|
this.env = env;
|
|
1651
|
-
this.
|
|
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);
|
|
1548
|
+
this.urlSegments = [`${this.env.baseUrl}api/inventory-items`];
|
|
1667
1549
|
}
|
|
1668
1550
|
}
|
|
1669
|
-
InventoryService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: InventoryService, deps: [{ token: i1.HttpClient }, { token:
|
|
1670
|
-
InventoryService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: InventoryService, providedIn:
|
|
1551
|
+
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 });
|
|
1552
|
+
InventoryService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: InventoryService, providedIn: "root" });
|
|
1671
1553
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: InventoryService, decorators: [{
|
|
1672
1554
|
type: Injectable,
|
|
1673
1555
|
args: [{
|
|
1674
|
-
providedIn:
|
|
1556
|
+
providedIn: "root",
|
|
1675
1557
|
}]
|
|
1676
1558
|
}], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: undefined, decorators: [{
|
|
1677
1559
|
type: Inject,
|
|
1678
|
-
args: [
|
|
1560
|
+
args: ["env"]
|
|
1679
1561
|
}] }]; } });
|
|
1680
1562
|
|
|
1681
1563
|
class StatusHistoryService {
|
|
@@ -2282,7 +2164,7 @@ class PackageSelectorComponent {
|
|
|
2282
2164
|
this.packageForm.controls.variations.valueChanges
|
|
2283
2165
|
.subscribe(value => {
|
|
2284
2166
|
if (value) {
|
|
2285
|
-
this.packageForm.controls.variations.setValue(value.map(v => v
|
|
2167
|
+
this.packageForm.controls.variations.setValue(value.map(v => v?.id ? v : null), { emitEvent: false });
|
|
2286
2168
|
}
|
|
2287
2169
|
});
|
|
2288
2170
|
this.packageForm.controls.package.valueChanges
|
|
@@ -2376,7 +2258,7 @@ PackageSelectorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0
|
|
|
2376
2258
|
multi: true,
|
|
2377
2259
|
useExisting: PackageSelectorComponent
|
|
2378
2260
|
}
|
|
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
|
|
2261
|
+
], 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
2262
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: PackageSelectorComponent, decorators: [{
|
|
2381
2263
|
type: Component,
|
|
2382
2264
|
args: [{ selector: 'cgw-package-selector', providers: [
|
|
@@ -2390,7 +2272,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImpo
|
|
|
2390
2272
|
multi: true,
|
|
2391
2273
|
useExisting: PackageSelectorComponent
|
|
2392
2274
|
}
|
|
2393
|
-
], template: "<div [formGroup]=\"packageForm\">\n <div class=\"row mb-2\">\n <div class=\"col\">\n <label for=\"waitlist-gun-package\">Package
|
|
2275
|
+
], 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
2276
|
}], ctorParameters: function () { return [{ type: PackageService }, { type: i2.FormBuilder }, { type: i0.Injector }]; }, propDecorators: { firearmId: [{
|
|
2395
2277
|
type: Input
|
|
2396
2278
|
}], projectType: [{
|
|
@@ -2586,5 +2468,5 @@ var NotificationType;
|
|
|
2586
2468
|
* Generated bundle index. Do not edit.
|
|
2587
2469
|
*/
|
|
2588
2470
|
|
|
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,
|
|
2471
|
+
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 };
|
|
2590
2472
|
//# sourceMappingURL=gunsmith-common.mjs.map
|