gunsmith-common 2.1.15 → 2.1.20

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 (130) hide show
  1. package/{esm2015/gunsmith-common.js → esm2020/gunsmith-common.mjs} +0 -0
  2. package/{esm2015/notification/fade-out.animation.js → esm2020/notification/fade-out.animation.mjs} +0 -0
  3. package/{esm2015/notification/index.js → esm2020/notification/index.mjs} +0 -0
  4. package/esm2020/notification/notification-bar/notification-bar.component.mjs +43 -0
  5. package/{esm2015/notification/notification-message.js → esm2020/notification/notification-message.mjs} +0 -0
  6. package/{esm2015/notification/notification-type.enum.js → esm2020/notification/notification-type.enum.mjs} +0 -0
  7. package/{esm2015/notification/notification.module.js → esm2020/notification/notification.module.mjs} +5 -5
  8. package/{esm2015/notification/notification.service.js → esm2020/notification/notification.service.mjs} +4 -4
  9. package/{esm2015/public_api.js → esm2020/public_api.mjs} +0 -0
  10. package/{esm2015/shared/directives/disable-control.directive.js → esm2020/shared/directives/disable-control.directive.mjs} +4 -4
  11. package/{esm2015/shared/directives/index.js → esm2020/shared/directives/index.mjs} +0 -0
  12. package/{esm2015/shared/directives/refinish-details-validators.js → esm2020/shared/directives/refinish-details-validators.mjs} +0 -0
  13. package/{esm2015/shared/pipes/enum.pipe.js → esm2020/shared/pipes/enum.pipe.mjs} +4 -4
  14. package/{esm2015/shared/pipes/file-name.pipe.js → esm2020/shared/pipes/file-name.pipe.mjs} +4 -4
  15. package/{esm2015/shared/pipes/frame-material.pipe.js → esm2020/shared/pipes/frame-material.pipe.mjs} +4 -4
  16. package/{esm2015/shared/pipes/index.js → esm2020/shared/pipes/index.mjs} +0 -0
  17. package/{esm2015/shared/pipes/new-line.pipe.js → esm2020/shared/pipes/new-line.pipe.mjs} +4 -4
  18. package/{esm2015/shared/pipes/phone.pipe.js → esm2020/shared/pipes/phone.pipe.mjs} +4 -4
  19. package/{esm2015/shared/services/coating.service.js → esm2020/shared/services/coating.service.mjs} +4 -4
  20. package/{esm2015/shared/services/configuration.service.js → esm2020/shared/services/configuration.service.mjs} +4 -4
  21. package/{esm2015/shared/services/cosmetic-milling.service.js → esm2020/shared/services/cosmetic-milling.service.mjs} +4 -4
  22. package/{esm2015/shared/services/customer.service.js → esm2020/shared/services/customer.service.mjs} +4 -4
  23. package/{esm2015/shared/services/dealer.service.js → esm2020/shared/services/dealer.service.mjs} +4 -4
  24. package/{esm2015/shared/services/file-upload.service.js → esm2020/shared/services/file-upload.service.mjs} +4 -4
  25. package/{esm2015/shared/services/firearm-series.service.js → esm2020/shared/services/firearm-series.service.mjs} +4 -4
  26. package/{esm2015/shared/services/firearm.service.js → esm2020/shared/services/firearm.service.mjs} +4 -4
  27. package/{esm2015/shared/services/gun-part.service.js → esm2020/shared/services/gun-part.service.mjs} +4 -4
  28. package/{esm2015/shared/services/index.js → esm2020/shared/services/index.mjs} +2 -1
  29. package/{esm2015/shared/services/inventory.service.js → esm2020/shared/services/inventory.service.mjs} +4 -4
  30. package/{esm2015/shared/services/material.service.js → esm2020/shared/services/material.service.mjs} +4 -4
  31. package/{esm2015/shared/services/milling-type.service.js → esm2020/shared/services/milling-type.service.mjs} +4 -4
  32. package/{esm2015/shared/services/optic.service.js → esm2020/shared/services/optic.service.mjs} +4 -4
  33. package/{esm2015/shared/services/product.service.js → esm2020/shared/services/product.service.mjs} +4 -4
  34. package/{esm2015/shared/services/purchase-order.service.js → esm2020/shared/services/purchase-order.service.mjs} +4 -4
  35. package/{esm2015/shared/services/state.service.js → esm2020/shared/services/state.service.mjs} +4 -4
  36. package/esm2020/shared/services/status-history.service.mjs +40 -0
  37. package/{esm2015/shared/services/totals.service.js → esm2020/shared/services/totals.service.mjs} +4 -4
  38. package/{esm2015/shared/services/user.service.js → esm2020/shared/services/user.service.mjs} +4 -4
  39. package/{esm2015/shared/services/vendor.service.js → esm2020/shared/services/vendor.service.mjs} +4 -4
  40. package/{esm2015/shared/services/waitlist-customer.service.js → esm2020/shared/services/waitlist-customer.service.mjs} +4 -4
  41. package/{esm2015/shared/services/waitlist-project.service.js → esm2020/shared/services/waitlist-project.service.mjs} +4 -4
  42. package/{esm2015/shared/services/waitlist.service.js → esm2020/shared/services/waitlist.service.mjs} +4 -4
  43. package/{esm2015/shared/services/work-holiday.service.js → esm2020/shared/services/work-holiday.service.mjs} +4 -4
  44. package/{esm2015/shared/services/work-order.service.js → esm2020/shared/services/work-order.service.mjs} +4 -4
  45. package/{esm2015/shared/shared.module.js → esm2020/shared/shared.module.mjs} +5 -5
  46. package/{esm2015/shared/types/bundle-item.js → esm2020/shared/types/bundle-item.mjs} +0 -0
  47. package/{esm2015/shared/types/change-order-status.js → esm2020/shared/types/change-order-status.mjs} +0 -0
  48. package/{esm2015/shared/types/coating-value.js → esm2020/shared/types/coating-value.mjs} +0 -0
  49. package/{esm2015/shared/types/coating.js → esm2020/shared/types/coating.mjs} +0 -0
  50. package/{esm2015/shared/types/configuration.js → esm2020/shared/types/configuration.mjs} +0 -0
  51. package/{esm2015/shared/types/cosmetic-milling.js → esm2020/shared/types/cosmetic-milling.mjs} +0 -0
  52. package/{esm2015/shared/types/customer.js → esm2020/shared/types/customer.mjs} +0 -0
  53. package/{esm2015/shared/types/dealer-contact.js → esm2020/shared/types/dealer-contact.mjs} +0 -0
  54. package/{esm2015/shared/types/dealer-coupon.js → esm2020/shared/types/dealer-coupon.mjs} +0 -0
  55. package/{esm2015/shared/types/dealer.js → esm2020/shared/types/dealer.mjs} +0 -0
  56. package/{esm2015/shared/types/filter-options.js → esm2020/shared/types/filter-options.mjs} +0 -0
  57. package/{esm2015/shared/types/firearm-series-optic.js → esm2020/shared/types/firearm-series-optic.mjs} +0 -0
  58. package/{esm2015/shared/types/firearm-series.js → esm2020/shared/types/firearm-series.mjs} +0 -0
  59. package/{esm2015/shared/types/firearm.js → esm2020/shared/types/firearm.mjs} +0 -0
  60. package/{esm2015/shared/types/frame-material.js → esm2020/shared/types/frame-material.mjs} +0 -0
  61. package/{esm2015/shared/types/gun-caliber.js → esm2020/shared/types/gun-caliber.mjs} +0 -0
  62. package/esm2020/shared/types/gun-part-option.mjs +3 -0
  63. package/esm2020/shared/types/gun-part.mjs +11 -0
  64. package/{esm2015/shared/types/index.js → esm2020/shared/types/index.mjs} +2 -1
  65. package/{esm2015/shared/types/inventory-item.js → esm2020/shared/types/inventory-item.mjs} +0 -0
  66. package/{esm2015/shared/types/j-file.js → esm2020/shared/types/j-file.mjs} +0 -0
  67. package/{esm2015/shared/types/material.js → esm2020/shared/types/material.mjs} +0 -0
  68. package/{esm2015/shared/types/milling-detail.js → esm2020/shared/types/milling-detail.mjs} +0 -0
  69. package/{esm2015/shared/types/milling-item.js → esm2020/shared/types/milling-item.mjs} +0 -0
  70. package/{esm2015/shared/types/milling-type.js → esm2020/shared/types/milling-type.mjs} +0 -0
  71. package/{esm2015/shared/types/mount-type.js → esm2020/shared/types/mount-type.mjs} +0 -0
  72. package/{esm2015/shared/types/optic-status.js → esm2020/shared/types/optic-status.mjs} +0 -0
  73. package/{esm2015/shared/types/optic.js → esm2020/shared/types/optic.mjs} +0 -0
  74. package/{esm2015/shared/types/product.js → esm2020/shared/types/product.mjs} +0 -0
  75. package/{esm2015/shared/types/project-type.js → esm2020/shared/types/project-type.mjs} +0 -0
  76. package/esm2020/shared/types/purchase-order-refinish-item.mjs +3 -0
  77. package/{esm2015/shared/types/purchase-order-status.js → esm2020/shared/types/purchase-order-status.mjs} +0 -0
  78. package/{esm2015/shared/types/purchase-order.js → esm2020/shared/types/purchase-order.mjs} +0 -0
  79. package/{esm2015/shared/types/rear-sight-position.js → esm2020/shared/types/rear-sight-position.mjs} +0 -0
  80. package/{esm2015/shared/types/refinish-detail.js → esm2020/shared/types/refinish-detail.mjs} +1 -1
  81. package/{esm2015/shared/types/report-milling-item.js → esm2020/shared/types/report-milling-item.mjs} +0 -0
  82. package/esm2020/shared/types/report-refinish-item.mjs +3 -0
  83. package/{esm2015/shared/types/sight-type.js → esm2020/shared/types/sight-type.mjs} +0 -0
  84. package/{esm2015/shared/types/state.js → esm2020/shared/types/state.mjs} +0 -0
  85. package/{esm2015/shared/types/total-item.js → esm2020/shared/types/total-item.mjs} +1 -1
  86. package/{esm2015/shared/types/total.js → esm2020/shared/types/total.mjs} +0 -0
  87. package/{esm2015/shared/types/vendor-contact.js → esm2020/shared/types/vendor-contact.mjs} +0 -0
  88. package/{esm2015/shared/types/vendor.js → esm2020/shared/types/vendor.mjs} +0 -0
  89. package/{esm2015/shared/types/waitlist-action.js → esm2020/shared/types/waitlist-action.mjs} +0 -0
  90. package/{esm2015/shared/types/waitlist-gun.js → esm2020/shared/types/waitlist-gun.mjs} +0 -0
  91. package/{esm2015/shared/types/waitlist-history.js → esm2020/shared/types/waitlist-history.mjs} +0 -0
  92. package/{esm2015/shared/types/waitlist-item.js → esm2020/shared/types/waitlist-item.mjs} +0 -0
  93. package/{esm2015/shared/types/waitlist-status.js → esm2020/shared/types/waitlist-status.mjs} +0 -0
  94. package/{esm2015/shared/types/work-change-order.js → esm2020/shared/types/work-change-order.mjs} +0 -0
  95. package/{esm2015/shared/types/work-holiday.js → esm2020/shared/types/work-holiday.mjs} +0 -0
  96. package/{esm2015/shared/types/work-order-action.js → esm2020/shared/types/work-order-action.mjs} +0 -0
  97. package/{esm2015/shared/types/work-order-history.js → esm2020/shared/types/work-order-history.mjs} +0 -0
  98. package/esm2020/shared/types/work-order-refinish-item.mjs +3 -0
  99. package/{esm2015/shared/types/work-order-status.js → esm2020/shared/types/work-order-status.mjs} +2 -1
  100. package/{esm2015/shared/types/work-order-type.js → esm2020/shared/types/work-order-type.mjs} +0 -0
  101. package/{esm2015/shared/types/work-order.js → esm2020/shared/types/work-order.mjs} +0 -0
  102. package/{esm2015/shared/utils/coating-helpers.js → esm2020/shared/utils/coating-helpers.mjs} +0 -0
  103. package/{esm2015/shared/utils/enum-object.js → esm2020/shared/utils/enum-object.mjs} +0 -0
  104. package/{esm2015/shared/utils/finish-date-calculator.js → esm2020/shared/utils/finish-date-calculator.mjs} +0 -0
  105. package/{esm2015/shared/utils/index.js → esm2020/shared/utils/index.mjs} +0 -0
  106. package/{esm2015/shared/utils/invalid-form-control-toucher.js → esm2020/shared/utils/invalid-form-control-toucher.mjs} +0 -0
  107. package/fesm2015/gunsmith-common.mjs +1855 -0
  108. package/fesm2015/gunsmith-common.mjs.map +1 -0
  109. package/{fesm2015/gunsmith-common.js → fesm2020/gunsmith-common.mjs} +147 -112
  110. package/fesm2020/gunsmith-common.mjs.map +1 -0
  111. package/package.json +19 -6
  112. package/shared/services/index.d.ts +1 -0
  113. package/shared/services/status-history.service.d.ts +14 -0
  114. package/shared/types/gun-part-option.d.ts +9 -0
  115. package/shared/types/gun-part.d.ts +2 -0
  116. package/shared/types/index.d.ts +1 -0
  117. package/shared/types/purchase-order-refinish-item.d.ts +2 -0
  118. package/shared/types/refinish-detail.d.ts +2 -0
  119. package/shared/types/report-refinish-item.d.ts +2 -0
  120. package/shared/types/total-item.d.ts +1 -1
  121. package/shared/types/work-order-refinish-item.d.ts +2 -0
  122. package/shared/types/work-order-status.d.ts +1 -0
  123. package/bundles/gunsmith-common.umd.js +0 -2096
  124. package/bundles/gunsmith-common.umd.js.map +0 -1
  125. package/esm2015/notification/notification-bar/notification-bar.component.js +0 -48
  126. package/esm2015/shared/types/gun-part.js +0 -10
  127. package/esm2015/shared/types/purchase-order-refinish-item.js +0 -3
  128. package/esm2015/shared/types/report-refinish-item.js +0 -3
  129. package/esm2015/shared/types/work-order-refinish-item.js +0 -3
  130. package/fesm2015/gunsmith-common.js.map +0 -1
@@ -1,2096 +0,0 @@
1
- (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('luxon'), require('@angular/core'), require('@angular/common/http'), require('rxjs'), require('rxjs/operators'), require('@angular/forms'), require('@angular/common'), require('@angular/animations')) :
3
- typeof define === 'function' && define.amd ? define('gunsmith-common', ['exports', 'luxon', '@angular/core', '@angular/common/http', 'rxjs', 'rxjs/operators', '@angular/forms', '@angular/common', '@angular/animations'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global['gunsmith-common'] = {}, global.luxon, global.ng.core, global.ng.common.http, global.rxjs, global.rxjs.operators, global.ng.forms, global.ng.common, global.ng.animations));
5
- }(this, (function (exports, luxon, i0, i1, rxjs, operators, i1$1, i2, animations) { 'use strict';
6
-
7
- function _interopNamespace(e) {
8
- if (e && e.__esModule) return e;
9
- var n = Object.create(null);
10
- if (e) {
11
- Object.keys(e).forEach(function (k) {
12
- if (k !== 'default') {
13
- var d = Object.getOwnPropertyDescriptor(e, k);
14
- Object.defineProperty(n, k, d.get ? d : {
15
- enumerable: true,
16
- get: function () {
17
- return e[k];
18
- }
19
- });
20
- }
21
- });
22
- }
23
- n['default'] = e;
24
- return Object.freeze(n);
25
- }
26
-
27
- var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
28
- var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
29
- var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
30
- var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
31
-
32
- function touchControls(formGroup) {
33
- Object.keys(formGroup.controls).forEach(function (field) {
34
- var control = formGroup.get(field);
35
- control.markAsTouched({ onlySelf: true });
36
- });
37
- }
38
-
39
- function convertEnumToObjectArray(value) {
40
- var enumObject = [];
41
- for (var n in value) {
42
- if (typeof value[n] === 'number') {
43
- enumObject.push({ id: value[n], name: n.replace(/([A-Z])/g, ' $1').trim() });
44
- }
45
- }
46
- return enumObject;
47
- }
48
-
49
- function getCoatings(part, coatings, material) {
50
- if (part && part.id === 1)
51
- return coatings.filter(function (c) { return part.coatings.map(function (pc) { return pc.id; }).includes(c.id)
52
- && c.materials.map(function (m) { return m.id; }).includes(material.id); });
53
- else if (part)
54
- return coatings.filter(function (c) { return part.coatings.map(function (pc) { return pc.id; }).includes(c.id); });
55
- else
56
- return [];
57
- }
58
- function getCoatingValues(coating) {
59
- if (coating)
60
- return coating.coatingValues;
61
- else
62
- return [];
63
- }
64
- function hasCoatingValues(coating) {
65
- return coating && coating.coatingValues && coating.coatingValues.length > 0;
66
- }
67
- function hasCoatingDescription(coating) {
68
- return coating && coating.valueLabel && (!coating.coatingValues || !coating.coatingValues.length);
69
- }
70
-
71
- var Configuration = /** @class */ (function () {
72
- function Configuration() {
73
- }
74
- return Configuration;
75
- }());
76
-
77
- var Customer = /** @class */ (function () {
78
- function Customer() {
79
- this.active = true;
80
- }
81
- return Customer;
82
- }());
83
-
84
- var Dealer = /** @class */ (function () {
85
- function Dealer() {
86
- this.couponDiscount = 20;
87
- this.active = true;
88
- this.contacts = [];
89
- }
90
- return Dealer;
91
- }());
92
-
93
- var DealerContact = /** @class */ (function () {
94
- function DealerContact() {
95
- }
96
- return DealerContact;
97
- }());
98
-
99
- var DealerCoupon = /** @class */ (function () {
100
- function DealerCoupon() {
101
- }
102
- return DealerCoupon;
103
- }());
104
-
105
- var FilterOptions = /** @class */ (function () {
106
- function FilterOptions() {
107
- this.workOrderType = true;
108
- this.status = true;
109
- this.warranty = true;
110
- this.specialOrder = true;
111
- }
112
- return FilterOptions;
113
- }());
114
-
115
- exports.GunCaliber = void 0;
116
- (function (GunCaliber) {
117
- GunCaliber[GunCaliber["9mm"] = 0] = "9mm";
118
- GunCaliber[GunCaliber["40Caliber"] = 1] = "40Caliber";
119
- GunCaliber[GunCaliber["45Caliber"] = 2] = "45Caliber";
120
- })(exports.GunCaliber || (exports.GunCaliber = {}));
121
-
122
- var Firearm = /** @class */ (function () {
123
- function Firearm() {
124
- this.active = true;
125
- }
126
- return Firearm;
127
- }());
128
-
129
- var GunPart = /** @class */ (function () {
130
- function GunPart() {
131
- this.coatings = [];
132
- this.defaultControl = false;
133
- this.customer = false;
134
- this.gunsmith = false;
135
- this.active = true;
136
- }
137
- return GunPart;
138
- }());
139
-
140
- var Vendor = /** @class */ (function () {
141
- function Vendor() {
142
- this.active = true;
143
- this.contacts = [];
144
- }
145
- return Vendor;
146
- }());
147
-
148
- var VendorContact = /** @class */ (function () {
149
- function VendorContact() {
150
- }
151
- return VendorContact;
152
- }());
153
-
154
- var State = /** @class */ (function () {
155
- function State() {
156
- }
157
- return State;
158
- }());
159
-
160
- exports.WaitlistAction = void 0;
161
- (function (WaitlistAction) {
162
- WaitlistAction[WaitlistAction["SendShipmentEmail"] = 0] = "SendShipmentEmail";
163
- WaitlistAction[WaitlistAction["SendShipmentNoResponse"] = 2] = "SendShipmentNoResponse";
164
- WaitlistAction[WaitlistAction["SendWaitingOnShipmentEmail"] = 3] = "SendWaitingOnShipmentEmail";
165
- WaitlistAction[WaitlistAction["SendWaitingOnShipmentNoResponse"] = 5] = "SendWaitingOnShipmentNoResponse";
166
- WaitlistAction[WaitlistAction["SendInShopEmail"] = 6] = "SendInShopEmail";
167
- })(exports.WaitlistAction || (exports.WaitlistAction = {}));
168
-
169
- exports.ProjectType = void 0;
170
- (function (ProjectType) {
171
- ProjectType[ProjectType["Firearm"] = 0] = "Firearm";
172
- ProjectType[ProjectType["SlideOnly"] = 1] = "SlideOnly";
173
- ProjectType[ProjectType["PartsOnly"] = 2] = "PartsOnly";
174
- })(exports.ProjectType || (exports.ProjectType = {}));
175
-
176
- var WaitlistGun = /** @class */ (function () {
177
- function WaitlistGun() {
178
- this.projectType = exports.ProjectType.Firearm;
179
- this.logo = false;
180
- this.refinish = false;
181
- this.milling = false;
182
- this.specialOrder = false;
183
- this.refinishDetails = [];
184
- }
185
- return WaitlistGun;
186
- }());
187
-
188
- var WaitlistHistory = /** @class */ (function () {
189
- function WaitlistHistory() {
190
- }
191
- return WaitlistHistory;
192
- }());
193
-
194
- exports.WaitlistStatus = void 0;
195
- (function (WaitlistStatus) {
196
- WaitlistStatus[WaitlistStatus["NewRequest"] = 0] = "NewRequest";
197
- WaitlistStatus[WaitlistStatus["ShipmentEmailSent"] = 1] = "ShipmentEmailSent";
198
- WaitlistStatus[WaitlistStatus["ShipmentEmailReminderSent"] = 2] = "ShipmentEmailReminderSent";
199
- WaitlistStatus[WaitlistStatus["ShipmentEmailNoResponse"] = 3] = "ShipmentEmailNoResponse";
200
- WaitlistStatus[WaitlistStatus["WaitingOnShipment"] = 4] = "WaitingOnShipment";
201
- WaitlistStatus[WaitlistStatus["WaitingOnShipmentReminderSent"] = 5] = "WaitingOnShipmentReminderSent";
202
- WaitlistStatus[WaitlistStatus["WaitingOnShipmentNoResponse"] = 6] = "WaitingOnShipmentNoResponse";
203
- WaitlistStatus[WaitlistStatus["InShop"] = 7] = "InShop";
204
- WaitlistStatus[WaitlistStatus["Cancelled"] = 8] = "Cancelled";
205
- WaitlistStatus[WaitlistStatus["OnHold"] = 9] = "OnHold";
206
- WaitlistStatus[WaitlistStatus["Voided"] = 10] = "Voided";
207
- })(exports.WaitlistStatus || (exports.WaitlistStatus = {}));
208
-
209
- exports.WorkOrderType = void 0;
210
- (function (WorkOrderType) {
211
- WorkOrderType[WorkOrderType["Standard"] = 0] = "Standard";
212
- WorkOrderType[WorkOrderType["NewInBox"] = 1] = "NewInBox";
213
- WorkOrderType[WorkOrderType["Expedited"] = 2] = "Expedited";
214
- WorkOrderType[WorkOrderType["Warranty"] = 5] = "Warranty";
215
- })(exports.WorkOrderType || (exports.WorkOrderType = {}));
216
-
217
- var WaitlistItem = /** @class */ (function () {
218
- function WaitlistItem() {
219
- this.requestDate = new Date();
220
- this.status = exports.WaitlistStatus.NewRequest;
221
- this.workOrderType = exports.WorkOrderType.Standard;
222
- this.guns = [];
223
- this.histories = [];
224
- }
225
- return WaitlistItem;
226
- }());
227
-
228
- var WorkChangeOrder = /** @class */ (function () {
229
- function WorkChangeOrder() {
230
- }
231
- return WorkChangeOrder;
232
- }());
233
-
234
- var WorkHoliday = /** @class */ (function () {
235
- function WorkHoliday() {
236
- }
237
- return WorkHoliday;
238
- }());
239
-
240
- exports.WorkOrderStatus = void 0;
241
- (function (WorkOrderStatus) {
242
- WorkOrderStatus[WorkOrderStatus["InShop"] = 0] = "InShop";
243
- WorkOrderStatus[WorkOrderStatus["OnBench"] = 1] = "OnBench";
244
- WorkOrderStatus[WorkOrderStatus["OutOfShop"] = 2] = "OutOfShop";
245
- WorkOrderStatus[WorkOrderStatus["WaitingOnCustomer"] = 3] = "WaitingOnCustomer";
246
- WorkOrderStatus[WorkOrderStatus["CustomerNotified"] = 4] = "CustomerNotified";
247
- WorkOrderStatus[WorkOrderStatus["ShippingPostponed"] = 10] = "ShippingPostponed";
248
- WorkOrderStatus[WorkOrderStatus["FflNeeded"] = 11] = "FflNeeded";
249
- WorkOrderStatus[WorkOrderStatus["ReadyToShip"] = 5] = "ReadyToShip";
250
- WorkOrderStatus[WorkOrderStatus["Completed"] = 6] = "Completed";
251
- WorkOrderStatus[WorkOrderStatus["Cancelled"] = 7] = "Cancelled";
252
- WorkOrderStatus[WorkOrderStatus["Voided"] = 8] = "Voided";
253
- WorkOrderStatus[WorkOrderStatus["OnHold"] = 9] = "OnHold";
254
- })(exports.WorkOrderStatus || (exports.WorkOrderStatus = {}));
255
-
256
- var WorkOrder = /** @class */ (function () {
257
- function WorkOrder() {
258
- this.id = 0;
259
- this.receivedDate = new Date();
260
- this.workOrderType = exports.WorkOrderType.Standard;
261
- this.refinish = false;
262
- this.logo = false;
263
- this.milling = false;
264
- this.specialOrder = false;
265
- this.projectType = exports.ProjectType.Firearm;
266
- this.status = exports.WorkOrderStatus.InShop;
267
- this.histories = [];
268
- }
269
- return WorkOrder;
270
- }());
271
-
272
- var WorkOrderHistory = /** @class */ (function () {
273
- function WorkOrderHistory() {
274
- }
275
- return WorkOrderHistory;
276
- }());
277
-
278
- var RefinishDetail = /** @class */ (function () {
279
- function RefinishDetail() {
280
- }
281
- return RefinishDetail;
282
- }());
283
-
284
- var Coating = /** @class */ (function () {
285
- function Coating() {
286
- this.coatingValues = [];
287
- this.materials = [];
288
- this.active = true;
289
- }
290
- return Coating;
291
- }());
292
-
293
- var CoatingValue = /** @class */ (function () {
294
- function CoatingValue() {
295
- this.active = true;
296
- }
297
- return CoatingValue;
298
- }());
299
-
300
- exports.WorkOrderAction = void 0;
301
- (function (WorkOrderAction) {
302
- WorkOrderAction[WorkOrderAction["SendOnBenchEmail"] = 1] = "SendOnBenchEmail";
303
- WorkOrderAction[WorkOrderAction["SendWaitingOnCustomerEmail"] = 3] = "SendWaitingOnCustomerEmail";
304
- WorkOrderAction[WorkOrderAction["SendCustomerNotification"] = 4] = "SendCustomerNotification";
305
- })(exports.WorkOrderAction || (exports.WorkOrderAction = {}));
306
-
307
- var Optic = /** @class */ (function () {
308
- function Optic() {
309
- this.active = true;
310
- }
311
- return Optic;
312
- }());
313
-
314
- exports.OpticStatus = void 0;
315
- (function (OpticStatus) {
316
- OpticStatus[OpticStatus["Included"] = 0] = "Included";
317
- OpticStatus[OpticStatus["NotIncluded"] = 1] = "NotIncluded";
318
- OpticStatus[OpticStatus["Supply"] = 2] = "Supply";
319
- })(exports.OpticStatus || (exports.OpticStatus = {}));
320
-
321
- var Product = /** @class */ (function () {
322
- function Product() {
323
- }
324
- return Product;
325
- }());
326
-
327
- var BundleItem = /** @class */ (function () {
328
- function BundleItem() {
329
- this.allowedVariations = [];
330
- }
331
- return BundleItem;
332
- }());
333
-
334
- exports.ChangeOrderStatus = void 0;
335
- (function (ChangeOrderStatus) {
336
- ChangeOrderStatus[ChangeOrderStatus["WaitingOnCustomer"] = 0] = "WaitingOnCustomer";
337
- ChangeOrderStatus[ChangeOrderStatus["Confirmed"] = 1] = "Confirmed";
338
- ChangeOrderStatus[ChangeOrderStatus["Cancelled"] = 2] = "Cancelled";
339
- ChangeOrderStatus[ChangeOrderStatus["NoResponse"] = 3] = "NoResponse";
340
- ChangeOrderStatus[ChangeOrderStatus["Unconfirmed"] = 4] = "Unconfirmed";
341
- })(exports.ChangeOrderStatus || (exports.ChangeOrderStatus = {}));
342
-
343
- exports.MountType = void 0;
344
- (function (MountType) {
345
- MountType[MountType["Direct"] = 0] = "Direct";
346
- MountType[MountType["Plate"] = 1] = "Plate";
347
- })(exports.MountType || (exports.MountType = {}));
348
-
349
- exports.SightType = void 0;
350
- (function (SightType) {
351
- SightType[SightType["Black"] = 0] = "Black";
352
- SightType[SightType["Tritium"] = 1] = "Tritium";
353
- })(exports.SightType || (exports.SightType = {}));
354
-
355
- var MillingDetail = /** @class */ (function () {
356
- function MillingDetail() {
357
- this.barrelCrown = false;
358
- this.bushingInstallation = false;
359
- }
360
- return MillingDetail;
361
- }());
362
-
363
- exports.RearSightPosition = void 0;
364
- (function (RearSightPosition) {
365
- RearSightPosition[RearSightPosition["InFront"] = 0] = "InFront";
366
- RearSightPosition[RearSightPosition["Behind"] = 1] = "Behind";
367
- })(exports.RearSightPosition || (exports.RearSightPosition = {}));
368
-
369
- var FirearmSeries = /** @class */ (function () {
370
- function FirearmSeries() {
371
- this.active = true;
372
- this.millingFrontSights = false;
373
- this.firearmSeriesOptics = [];
374
- }
375
- return FirearmSeries;
376
- }());
377
-
378
- var FirearmSeriesOptic = /** @class */ (function () {
379
- function FirearmSeriesOptic() {
380
- this.rearFrontSightBlack = false;
381
- this.rearFrontSightTritium = false;
382
- this.rearBehindSightBlack = false;
383
- this.rearBehindSightTritium = false;
384
- }
385
- return FirearmSeriesOptic;
386
- }());
387
-
388
- exports.FrameMaterial = void 0;
389
- (function (FrameMaterial) {
390
- FrameMaterial[FrameMaterial["All"] = 0] = "All";
391
- FrameMaterial[FrameMaterial["Polymer"] = 1] = "Polymer";
392
- FrameMaterial[FrameMaterial["Aluminum"] = 2] = "Aluminum";
393
- FrameMaterial[FrameMaterial["Steel"] = 3] = "Steel";
394
- })(exports.FrameMaterial || (exports.FrameMaterial = {}));
395
-
396
- var MillingType = /** @class */ (function () {
397
- function MillingType() {
398
- this.active = true;
399
- }
400
- return MillingType;
401
- }());
402
-
403
- var CosmeticMilling = /** @class */ (function () {
404
- function CosmeticMilling() {
405
- this.active = true;
406
- }
407
- return CosmeticMilling;
408
- }());
409
-
410
- var MillingItem = /** @class */ (function () {
411
- function MillingItem() {
412
- }
413
- return MillingItem;
414
- }());
415
-
416
- var WorkOrderRefinishItem = /** @class */ (function () {
417
- function WorkOrderRefinishItem() {
418
- }
419
- return WorkOrderRefinishItem;
420
- }());
421
-
422
- var PurchaseOrderRefinishItem = /** @class */ (function () {
423
- function PurchaseOrderRefinishItem() {
424
- }
425
- return PurchaseOrderRefinishItem;
426
- }());
427
-
428
- var Material = /** @class */ (function () {
429
- function Material() {
430
- this.active = true;
431
- }
432
- return Material;
433
- }());
434
-
435
- exports.PurchaseOrderStatus = void 0;
436
- (function (PurchaseOrderStatus) {
437
- PurchaseOrderStatus[PurchaseOrderStatus["Open"] = 0] = "Open";
438
- PurchaseOrderStatus[PurchaseOrderStatus["Closed"] = 1] = "Closed";
439
- PurchaseOrderStatus[PurchaseOrderStatus["Cancelled"] = 2] = "Cancelled";
440
- PurchaseOrderStatus[PurchaseOrderStatus["Voided"] = 3] = "Voided";
441
- })(exports.PurchaseOrderStatus || (exports.PurchaseOrderStatus = {}));
442
-
443
- var PurchaseOrder = /** @class */ (function () {
444
- function PurchaseOrder() {
445
- this.date = new Date();
446
- this.status = exports.PurchaseOrderStatus.Open;
447
- this.refinishItems = [];
448
- }
449
- return PurchaseOrder;
450
- }());
451
-
452
- var ReportMillingItem = /** @class */ (function () {
453
- function ReportMillingItem() {
454
- }
455
- return ReportMillingItem;
456
- }());
457
-
458
- var ReportRefinishItem = /** @class */ (function () {
459
- function ReportRefinishItem() {
460
- }
461
- return ReportRefinishItem;
462
- }());
463
-
464
- var Total = /** @class */ (function () {
465
- function Total() {
466
- }
467
- return Total;
468
- }());
469
-
470
- var TotalItem = /** @class */ (function () {
471
- function TotalItem() {
472
- }
473
- return TotalItem;
474
- }());
475
-
476
- var InventoryItem = /** @class */ (function () {
477
- function InventoryItem() {
478
- this.active = true;
479
- }
480
- return InventoryItem;
481
- }());
482
-
483
- var JFile = /** @class */ (function () {
484
- function JFile() {
485
- }
486
- return JFile;
487
- }());
488
-
489
- function adjustHoliday(finishDate, holidays) {
490
- while (holidays.map(function (h) { return new Date(h.holiday); }).findIndex(function (h) { return luxon.DateTime.fromJSDate(h) === luxon.DateTime.fromJSDate(finishDate); }) !== -1) {
491
- do {
492
- finishDate = luxon.DateTime.fromJSDate(finishDate).plus({ days: 1 }).toJSDate();
493
- } while (finishDate.getDay() === 0 || finishDate.getDay() === 6);
494
- }
495
- return finishDate;
496
- }
497
- function calculateFinishDate(receivedDate, workOrderType, configs, holidays) {
498
- if (!receivedDate) {
499
- return null;
500
- }
501
- var finishDate = luxon.DateTime.fromJSDate(receivedDate).startOf("day");
502
- if (workOrderType === exports.WorkOrderType.Warranty) {
503
- finishDate = finishDate.plus({ weeks: configs.warrantyWeeks });
504
- }
505
- else if (workOrderType === exports.WorkOrderType.Expedited) {
506
- finishDate = finishDate.plus({ weeks: configs.expeditedWeeks });
507
- }
508
- else if (workOrderType === exports.WorkOrderType.NewInBox) {
509
- finishDate = finishDate.plus({ weeks: configs.newInBoxWeeks });
510
- }
511
- else {
512
- finishDate = finishDate.plus({ weeks: configs.standardWeeks });
513
- }
514
- return adjustHoliday(finishDate.toJSDate(), holidays);
515
- }
516
-
517
- var CustomerService = /** @class */ (function () {
518
- function CustomerService(http, env) {
519
- this.http = http;
520
- this.env = env;
521
- this.url = this.env.baseUrl + 'api/customers';
522
- }
523
- CustomerService.prototype.readCustomers = function (includeInactive, filter) {
524
- if (includeInactive === void 0) { includeInactive = false; }
525
- if (filter === void 0) { filter = null; }
526
- var params = {};
527
- if (includeInactive) {
528
- params['includeInactive'] = includeInactive.toString();
529
- }
530
- if (filter) {
531
- params['filter'] = filter;
532
- }
533
- return this.http.get(this.url, {
534
- params: params
535
- });
536
- };
537
- CustomerService.prototype.readCustomer = function (id) {
538
- return this.http.get(this.url + "/" + id);
539
- };
540
- CustomerService.prototype.createCustomer = function (customer) {
541
- return this.http.post(this.url, customer);
542
- };
543
- CustomerService.prototype.updateCustomer = function (id, customer) {
544
- return this.http.put(this.url + "/" + id, customer);
545
- };
546
- CustomerService.prototype.deleteCustomer = function (id) {
547
- return this.http.delete(this.url + "/" + id);
548
- };
549
- return CustomerService;
550
- }());
551
- CustomerService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: CustomerService, deps: [{ token: i1__namespace.HttpClient }, { token: 'env' }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
552
- CustomerService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: CustomerService, providedIn: 'root' });
553
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: CustomerService, decorators: [{
554
- type: i0.Injectable,
555
- args: [{
556
- providedIn: 'root'
557
- }]
558
- }], ctorParameters: function () {
559
- return [{ type: i1__namespace.HttpClient }, { type: undefined, decorators: [{
560
- type: i0.Inject,
561
- args: ['env']
562
- }] }];
563
- } });
564
-
565
- var FirearmService = /** @class */ (function () {
566
- function FirearmService(http, env) {
567
- this.http = http;
568
- this.env = env;
569
- this.url = this.env.baseUrl + 'api/firearms';
570
- }
571
- FirearmService.prototype.readFirearms = function (includeInactive) {
572
- if (includeInactive === void 0) { includeInactive = false; }
573
- return this.http.get(this.url, {
574
- params: {
575
- includeInactive: includeInactive.toString()
576
- }
577
- });
578
- };
579
- FirearmService.prototype.readFirearm = function (firearmId) {
580
- return this.http.get(this.url + "/" + firearmId);
581
- };
582
- FirearmService.prototype.createFirearm = function (firearm) {
583
- return this.http.post(this.url, firearm);
584
- };
585
- FirearmService.prototype.updateFirearm = function (firearmId, firearm) {
586
- return this.http.put(this.url + "/" + firearmId, firearm);
587
- };
588
- FirearmService.prototype.deleteFirearm = function (firearmId) {
589
- return this.http.delete(this.url + "/" + firearmId);
590
- };
591
- FirearmService.prototype.readFirearmSeries = function (firearmId) {
592
- return this.http.get(this.url + "/" + firearmId + "/series");
593
- };
594
- FirearmService.prototype.readFirearmMaterial = function (firearmId) {
595
- return this.http.get(this.url + "/" + firearmId + "/material");
596
- };
597
- return FirearmService;
598
- }());
599
- FirearmService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: FirearmService, deps: [{ token: i1__namespace.HttpClient }, { token: 'env' }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
600
- FirearmService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: FirearmService, providedIn: 'root' });
601
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: FirearmService, decorators: [{
602
- type: i0.Injectable,
603
- args: [{
604
- providedIn: 'root'
605
- }]
606
- }], ctorParameters: function () {
607
- return [{ type: i1__namespace.HttpClient }, { type: undefined, decorators: [{
608
- type: i0.Inject,
609
- args: ['env']
610
- }] }];
611
- } });
612
-
613
- var GunPartService = /** @class */ (function () {
614
- function GunPartService(http, env) {
615
- this.http = http;
616
- this.env = env;
617
- this.url = this.env.baseUrl + 'api/gun-parts';
618
- }
619
- GunPartService.prototype.readGunParts = function (includeInactive, gunsmith, customer) {
620
- if (includeInactive === void 0) { includeInactive = false; }
621
- if (gunsmith === void 0) { gunsmith = null; }
622
- if (customer === void 0) { customer = null; }
623
- var params = {
624
- includeInactive: includeInactive.toString()
625
- };
626
- if (gunsmith !== null) {
627
- params['gunsmith'] = gunsmith.toString();
628
- }
629
- if (customer !== null) {
630
- params['customer'] = customer.toString();
631
- }
632
- return this.http.get(this.url, {
633
- params: params
634
- });
635
- };
636
- GunPartService.prototype.readGunPart = function (id) {
637
- return this.http.get(this.url + "/" + id);
638
- };
639
- GunPartService.prototype.createGunPart = function (gunPart) {
640
- return this.http.post(this.url, gunPart);
641
- };
642
- GunPartService.prototype.updateGunPart = function (id, gunPart) {
643
- return this.http.put(this.url + "/" + id, gunPart);
644
- };
645
- GunPartService.prototype.deleteGunPart = function (id) {
646
- return this.http.delete(this.url + "/" + id);
647
- };
648
- GunPartService.prototype.readPartCoatings = function (id) {
649
- return this.http.get(this.url + "/" + id + "/coatings");
650
- };
651
- return GunPartService;
652
- }());
653
- GunPartService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: GunPartService, deps: [{ token: i1__namespace.HttpClient }, { token: 'env' }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
654
- GunPartService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: GunPartService, providedIn: 'root' });
655
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: GunPartService, decorators: [{
656
- type: i0.Injectable,
657
- args: [{
658
- providedIn: 'root'
659
- }]
660
- }], ctorParameters: function () {
661
- return [{ type: i1__namespace.HttpClient }, { type: undefined, decorators: [{
662
- type: i0.Inject,
663
- args: ['env']
664
- }] }];
665
- } });
666
-
667
- var StateService = /** @class */ (function () {
668
- function StateService(http, env) {
669
- this.http = http;
670
- this.env = env;
671
- this.url = this.env.baseUrl + 'api/states';
672
- }
673
- StateService.prototype.getStates = function () {
674
- return this.http.get(this.url);
675
- };
676
- return StateService;
677
- }());
678
- StateService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: StateService, deps: [{ token: i1__namespace.HttpClient }, { token: 'env' }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
679
- StateService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: StateService, providedIn: 'root' });
680
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: StateService, decorators: [{
681
- type: i0.Injectable,
682
- args: [{
683
- providedIn: 'root'
684
- }]
685
- }], ctorParameters: function () {
686
- return [{ type: i1__namespace.HttpClient }, { type: undefined, decorators: [{
687
- type: i0.Inject,
688
- args: ['env']
689
- }] }];
690
- } });
691
-
692
- var VendorService = /** @class */ (function () {
693
- function VendorService(http, env) {
694
- this.http = http;
695
- this.env = env;
696
- this.url = this.env.baseUrl + 'api/vendors';
697
- }
698
- VendorService.prototype.readVendors = function (includeInactive) {
699
- if (includeInactive === void 0) { includeInactive = false; }
700
- return this.http.get(this.url, {
701
- params: {
702
- includeInactive: includeInactive.toString()
703
- }
704
- });
705
- };
706
- VendorService.prototype.readVendor = function (id) {
707
- return this.http.get(this.url + "/" + id);
708
- };
709
- VendorService.prototype.createVendor = function (Vendor) {
710
- return this.http.post(this.url, Vendor);
711
- };
712
- VendorService.prototype.updateVendor = function (id, Vendor) {
713
- return this.http.put(this.url + "/" + id, Vendor);
714
- };
715
- VendorService.prototype.deleteVendor = function (id) {
716
- return this.http.delete(this.url + "/" + id);
717
- };
718
- return VendorService;
719
- }());
720
- VendorService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: VendorService, deps: [{ token: i1__namespace.HttpClient }, { token: 'env' }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
721
- VendorService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: VendorService, providedIn: 'root' });
722
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: VendorService, decorators: [{
723
- type: i0.Injectable,
724
- args: [{
725
- providedIn: 'root'
726
- }]
727
- }], ctorParameters: function () {
728
- return [{ type: i1__namespace.HttpClient }, { type: undefined, decorators: [{
729
- type: i0.Inject,
730
- args: ['env']
731
- }] }];
732
- } });
733
-
734
- var TotalsService = /** @class */ (function () {
735
- function TotalsService(http, env) {
736
- this.http = http;
737
- this.env = env;
738
- this.url = this.env.baseUrl + 'api/';
739
- }
740
- TotalsService.prototype.readTotals = function (startDate, endDate, groupBy) {
741
- return this.http.get(this.url + 'work-orders/totals', {
742
- params: {
743
- startDate: startDate.toUTCString(),
744
- endDate: endDate.toUTCString(),
745
- groupBy: groupBy.toString()
746
- }
747
- });
748
- };
749
- TotalsService.prototype.readMillingTotals = function (startDate, endDate, groupBy) {
750
- return this.http.get(this.url + 'milling-totals', {
751
- params: {
752
- startDate: startDate.toUTCString(),
753
- endDate: endDate.toUTCString(),
754
- groupBy: groupBy.toString()
755
- }
756
- });
757
- };
758
- TotalsService.prototype.readRefinishTotals = function (startDate, endDate, groupBy) {
759
- return this.http.get(this.url + 'refinish-totals', {
760
- params: {
761
- startDate: startDate.toUTCString(),
762
- endDate: endDate.toUTCString(),
763
- groupBy: groupBy.toString()
764
- }
765
- });
766
- };
767
- return TotalsService;
768
- }());
769
- TotalsService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: TotalsService, deps: [{ token: i1__namespace.HttpClient }, { token: 'env' }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
770
- TotalsService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: TotalsService, providedIn: 'root' });
771
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: TotalsService, decorators: [{
772
- type: i0.Injectable,
773
- args: [{
774
- providedIn: 'root'
775
- }]
776
- }], ctorParameters: function () {
777
- return [{ type: i1__namespace.HttpClient }, { type: undefined, decorators: [{
778
- type: i0.Inject,
779
- args: ['env']
780
- }] }];
781
- } });
782
-
783
- var WorkHolidayService = /** @class */ (function () {
784
- function WorkHolidayService(http, env) {
785
- this.http = http;
786
- this.env = env;
787
- this.url = this.env.baseUrl + 'api/holidays';
788
- }
789
- WorkHolidayService.prototype.readHolidays = function () {
790
- return this.http.get(this.url);
791
- };
792
- WorkHolidayService.prototype.createHoliday = function (holiday) {
793
- return this.http.post(this.url, holiday);
794
- };
795
- WorkHolidayService.prototype.deleteHoliday = function (id) {
796
- return this.http.delete(this.url + "/" + id);
797
- };
798
- return WorkHolidayService;
799
- }());
800
- WorkHolidayService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: WorkHolidayService, deps: [{ token: i1__namespace.HttpClient }, { token: 'env' }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
801
- WorkHolidayService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: WorkHolidayService, providedIn: 'root' });
802
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: WorkHolidayService, decorators: [{
803
- type: i0.Injectable,
804
- args: [{
805
- providedIn: 'root'
806
- }]
807
- }], ctorParameters: function () {
808
- return [{ type: i1__namespace.HttpClient }, { type: undefined, decorators: [{
809
- type: i0.Inject,
810
- args: ['env']
811
- }] }];
812
- } });
813
-
814
- var WorkOrderService = /** @class */ (function () {
815
- function WorkOrderService(http, env) {
816
- this.http = http;
817
- this.env = env;
818
- this.url = this.env.baseUrl + 'api/work-orders';
819
- }
820
- WorkOrderService.prototype.doWorkOrderAction = function (id, actionId) {
821
- return this.http.get(this.url + "/" + id + "/actions/" + actionId);
822
- };
823
- WorkOrderService.prototype.readWorkOrders = function (statuses, id, customerName, customerEmail, serialNumber, orderTypes, projectTypes, users, specialOrder) {
824
- if (statuses === void 0) { statuses = null; }
825
- if (id === void 0) { id = null; }
826
- if (customerName === void 0) { customerName = null; }
827
- if (customerEmail === void 0) { customerEmail = null; }
828
- if (serialNumber === void 0) { serialNumber = null; }
829
- if (orderTypes === void 0) { orderTypes = null; }
830
- if (projectTypes === void 0) { projectTypes = null; }
831
- if (users === void 0) { users = null; }
832
- if (specialOrder === void 0) { specialOrder = null; }
833
- var params = {};
834
- if (statuses) {
835
- params['statuses'] = statuses.map(function (status) { return status.toString(); });
836
- }
837
- if (id) {
838
- params['id'] = id.toString();
839
- }
840
- if (customerName) {
841
- params['customerName'] = customerName;
842
- }
843
- if (customerEmail) {
844
- params['customerEmail'] = customerEmail;
845
- }
846
- if (serialNumber) {
847
- params['serialNumber'] = serialNumber;
848
- }
849
- if (orderTypes !== null) {
850
- params['orderTypes'] = orderTypes.map(function (type) { return type.toString(); });
851
- }
852
- if (projectTypes) {
853
- params['projectTypes'] = projectTypes.map(function (t) { return t.toString(); });
854
- }
855
- if (users) {
856
- params['users'] = users;
857
- }
858
- if (specialOrder) {
859
- params['specialOrder'] = specialOrder.toString();
860
- }
861
- return this.http.get(this.url, {
862
- params: params
863
- });
864
- };
865
- WorkOrderService.prototype.readWorkOrder = function (workOrderId) {
866
- return this.http.get(this.url + "/" + workOrderId);
867
- };
868
- WorkOrderService.prototype.createWorkOrder = function (workOrder) {
869
- return this.http.post(this.url, workOrder);
870
- };
871
- WorkOrderService.prototype.updateWorkOrder = function (workOrderId, workOrder) {
872
- return this.http.put(this.url + "/" + workOrderId, workOrder);
873
- };
874
- WorkOrderService.prototype.deleteWorkOrder = function (workOrderId) {
875
- return this.http.delete(this.url + "/" + workOrderId);
876
- };
877
- WorkOrderService.prototype.recalcWorkDates = function () {
878
- return this.http.get(this.url + "/recalc-dates");
879
- };
880
- // Change Orders
881
- WorkOrderService.prototype.readChangeOrders = function (workOrderId) {
882
- return this.http.get(this.url + "/" + workOrderId + "/change-orders");
883
- };
884
- WorkOrderService.prototype.readChangeOrder = function (workOrderId, changeOrderId) {
885
- return this.http.get(this.url + "/" + workOrderId + "/change-orders/" + changeOrderId);
886
- };
887
- WorkOrderService.prototype.createChangeOrder = function (workOrderId, changeOrder) {
888
- return this.http.post(this.url + "/" + workOrderId + "/change-orders", changeOrder);
889
- };
890
- WorkOrderService.prototype.updateChangeOrder = function (workOrderId, changeOrderId, changeOrder) {
891
- return this.http.put(this.url + "/" + workOrderId + "/change-orders/" + changeOrderId, changeOrder);
892
- };
893
- WorkOrderService.prototype.deleteChangeOrder = function (workOrderId, changeOrderId) {
894
- return this.http.delete(this.url + "/" + workOrderId + "/change-orders/" + changeOrderId);
895
- };
896
- WorkOrderService.prototype.confirmChangeOrder = function (token) {
897
- return this.http.get(this.env.baseUrl + "api/change-orders/customer", {
898
- params: {
899
- token: token
900
- }
901
- });
902
- };
903
- WorkOrderService.prototype.cancelChangeOrder = function (token) {
904
- return this.http.delete(this.env.baseUrl + "api/change-orders/customer", {
905
- params: {
906
- token: token
907
- }
908
- });
909
- };
910
- // Checklist
911
- WorkOrderService.prototype.createChecklists = function (workOrderId, refinishItemIds) {
912
- return this.http.get(this.url + "/" + workOrderId + "/refinish-items/" + refinishItemIds.join(',') + '/pdfs', { responseType: "blob" });
913
- };
914
- // Refinish Items
915
- WorkOrderService.prototype.readRefinishItems = function (workOrderId) {
916
- return this.http.get(this.url + "/" + workOrderId + "/refinish-items");
917
- };
918
- WorkOrderService.prototype.readRefinishItemCollection = function (workOrderId, itemIds) {
919
- return this.http.get(this.url + "/" + workOrderId + "/refinish-items/collection/" + itemIds.join(','));
920
- };
921
- WorkOrderService.prototype.readRefinishItem = function (workOrderId, refinishItemId) {
922
- return this.http.get(this.url + "/" + workOrderId + "/refinish-items/" + refinishItemId);
923
- };
924
- WorkOrderService.prototype.createRefinishItems = function (workOrderId, refinishItems) {
925
- return this.http.post(this.url + "/" + workOrderId + "/refinish-items/collection", refinishItems);
926
- };
927
- WorkOrderService.prototype.updateRefinishItem = function (workOrderId, refinishItemId, refinishItem) {
928
- return this.http.put(this.url + "/" + workOrderId + "/refinish-items/" + refinishItemId, refinishItem);
929
- };
930
- WorkOrderService.prototype.deleteRefinishItem = function (workOrderId, refinishItemId) {
931
- return this.http.delete(this.url + "/" + workOrderId + "/refinish-items/" + refinishItemId);
932
- };
933
- // Milling Items
934
- WorkOrderService.prototype.readMillingItems = function (workOrderId) {
935
- return this.http.get(this.url + "/" + workOrderId + "/milling-items");
936
- };
937
- WorkOrderService.prototype.readMillingItem = function (workOrderId, millingItemId) {
938
- return this.http.get(this.url + "/" + workOrderId + "/milling-items/" + millingItemId);
939
- };
940
- WorkOrderService.prototype.createMillingItem = function (workOrderId, millingItem) {
941
- return this.http.post(this.url + "/" + workOrderId + "/milling-items", millingItem);
942
- };
943
- WorkOrderService.prototype.updateMillingItem = function (workOrderId, millingItemId, millingItem) {
944
- return this.http.put(this.url + "/" + workOrderId + "/milling-items/" + millingItemId, millingItem);
945
- };
946
- WorkOrderService.prototype.deleteMillingItem = function (workOrderId, millingItemId) {
947
- return this.http.delete(this.url + "/" + workOrderId + "/milling-items/" + millingItemId);
948
- };
949
- // Report Items
950
- WorkOrderService.prototype.readReportMillingItems = function () {
951
- return this.http.get(this.env.baseUrl + "api/report-milling-items");
952
- };
953
- WorkOrderService.prototype.readReportRefinishItems = function () {
954
- return this.http.get(this.env.baseUrl + "api/report-refinish-items");
955
- };
956
- return WorkOrderService;
957
- }());
958
- WorkOrderService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: WorkOrderService, deps: [{ token: i1__namespace.HttpClient }, { token: 'env' }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
959
- WorkOrderService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: WorkOrderService, providedIn: 'root' });
960
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: WorkOrderService, decorators: [{
961
- type: i0.Injectable,
962
- args: [{
963
- providedIn: 'root'
964
- }]
965
- }], ctorParameters: function () {
966
- return [{ type: i1__namespace.HttpClient }, { type: undefined, decorators: [{
967
- type: i0.Inject,
968
- args: ['env']
969
- }] }];
970
- } });
971
-
972
- var DealerService = /** @class */ (function () {
973
- function DealerService(http, env) {
974
- this.http = http;
975
- this.env = env;
976
- this.url = this.env.baseUrl + 'api/dealers';
977
- }
978
- DealerService.prototype.readDealers = function (includeInactive) {
979
- if (includeInactive === void 0) { includeInactive = false; }
980
- return this.http.get(this.url, {
981
- params: {
982
- includeInactive: includeInactive.toString()
983
- }
984
- });
985
- };
986
- DealerService.prototype.readDealer = function (id) {
987
- return this.http.get(this.url + "/" + id);
988
- };
989
- DealerService.prototype.createDealer = function (dealer) {
990
- return this.http.post(this.url, dealer);
991
- };
992
- DealerService.prototype.updateDealer = function (id, dealer) {
993
- return this.http.put(this.url + "/" + id, dealer);
994
- };
995
- DealerService.prototype.deleteDealer = function (id) {
996
- return this.http.delete(this.url + "/" + id);
997
- };
998
- DealerService.prototype.updateDealerCoupon = function (dealerId, couponId, dealerCoupon) {
999
- return this.http.put(this.url + "/" + dealerId + "/coupons/" + couponId, dealerCoupon);
1000
- };
1001
- return DealerService;
1002
- }());
1003
- DealerService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: DealerService, deps: [{ token: i1__namespace.HttpClient }, { token: 'env' }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1004
- DealerService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: DealerService, providedIn: 'root' });
1005
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: DealerService, decorators: [{
1006
- type: i0.Injectable,
1007
- args: [{
1008
- providedIn: 'root'
1009
- }]
1010
- }], ctorParameters: function () {
1011
- return [{ type: i1__namespace.HttpClient }, { type: undefined, decorators: [{
1012
- type: i0.Inject,
1013
- args: ['env']
1014
- }] }];
1015
- } });
1016
-
1017
- var FileUploadService = /** @class */ (function () {
1018
- function FileUploadService(http, env) {
1019
- this.http = http;
1020
- this.env = env;
1021
- this.url = this.env.baseUrl + 'api/uploads';
1022
- }
1023
- FileUploadService.prototype.deleteFile = function (fileName) {
1024
- return this.http.delete(this.url + "/" + fileName);
1025
- };
1026
- FileUploadService.prototype.saveFile = function (file) {
1027
- var formData = new FormData();
1028
- formData.append('fileKey', file, file.name);
1029
- return this.http.post(this.url, formData, { responseType: "text" });
1030
- };
1031
- FileUploadService.prototype.retrieveFile = function (fileName) {
1032
- return this.http.get(this.url + "/" + fileName, { responseType: 'blob' })
1033
- .pipe(operators.switchMap(function (response) {
1034
- return rxjs.of(new File([response], fileName, { type: response.type }));
1035
- }));
1036
- };
1037
- return FileUploadService;
1038
- }());
1039
- FileUploadService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: FileUploadService, deps: [{ token: i1__namespace.HttpClient }, { token: 'env' }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1040
- FileUploadService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: FileUploadService, providedIn: 'root' });
1041
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: FileUploadService, decorators: [{
1042
- type: i0.Injectable,
1043
- args: [{
1044
- providedIn: 'root'
1045
- }]
1046
- }], ctorParameters: function () {
1047
- return [{ type: i1__namespace.HttpClient }, { type: undefined, decorators: [{
1048
- type: i0.Inject,
1049
- args: ['env']
1050
- }] }];
1051
- } });
1052
-
1053
- var WaitlistService = /** @class */ (function () {
1054
- function WaitlistService(http, env) {
1055
- this.http = http;
1056
- this.env = env;
1057
- this.url = this.env.baseUrl + 'api/waitlist-items';
1058
- }
1059
- WaitlistService.prototype.retrieveWaitlistItems = function (statuses, id, customerName, customerEmail, serialNumber, workOrderTypes, projectTypes) {
1060
- if (statuses === void 0) { statuses = null; }
1061
- if (id === void 0) { id = null; }
1062
- if (customerName === void 0) { customerName = null; }
1063
- if (customerEmail === void 0) { customerEmail = null; }
1064
- if (serialNumber === void 0) { serialNumber = null; }
1065
- if (workOrderTypes === void 0) { workOrderTypes = null; }
1066
- if (projectTypes === void 0) { projectTypes = null; }
1067
- var params = {};
1068
- if (statuses) {
1069
- params['statuses'] = statuses.map(function (status) { return status.toString(); });
1070
- }
1071
- if (id) {
1072
- params['id'] = id.toString();
1073
- }
1074
- if (customerName) {
1075
- params['customerName'] = customerName;
1076
- }
1077
- if (customerEmail) {
1078
- params['customerEmail'] = customerEmail;
1079
- }
1080
- if (serialNumber) {
1081
- params['serialNumber'] = serialNumber;
1082
- }
1083
- if (workOrderTypes) {
1084
- params['workOrderTypes'] = workOrderTypes.map(function (t) { return t.toString(); });
1085
- }
1086
- if (projectTypes) {
1087
- params['projectTypes'] = projectTypes.map(function (t) { return t.toString(); });
1088
- }
1089
- return this.http.get(this.url, {
1090
- params: params
1091
- });
1092
- };
1093
- WaitlistService.prototype.retrieveWaitlistItem = function (id) {
1094
- return this.http.get(this.url + "/" + id);
1095
- };
1096
- WaitlistService.prototype.createWaitlistItem = function (waitlistItem) {
1097
- return this.http.post(this.url, waitlistItem);
1098
- };
1099
- WaitlistService.prototype.updateWaitlistItem = function (id, waitlistItem) {
1100
- return this.http.put(this.url + "/" + id, waitlistItem);
1101
- };
1102
- WaitlistService.prototype.deleteWaitlistItem = function (id) {
1103
- return this.http.delete(this.url + "/" + id);
1104
- };
1105
- WaitlistService.prototype.doWaitlistAction = function (id, actionId) {
1106
- return this.http.get(this.url + "/" + id + "/actions/" + actionId);
1107
- };
1108
- WaitlistService.prototype.retrieveProjectPdf = function (id, projectId) {
1109
- return this.http.get(this.url + "/" + id + "/projects/" + projectId + "/pdf", { responseType: "blob" });
1110
- };
1111
- WaitlistService.prototype.retrieveProjects = function (waitlistId) {
1112
- return this.http.get(this.url + "/" + waitlistId + "/projects");
1113
- };
1114
- WaitlistService.prototype.retrieveProject = function (waitlistId, projectId) {
1115
- return this.http.get(this.url + "/" + waitlistId + "/projects/" + projectId);
1116
- };
1117
- WaitlistService.prototype.createProject = function (waitlistId, project) {
1118
- return this.http.post(this.url + "/" + waitlistId + "/projects", project);
1119
- };
1120
- WaitlistService.prototype.updateProject = function (waitlistId, projectId, project) {
1121
- return this.http.put(this.url + "/" + waitlistId + "/projects/" + projectId, project);
1122
- };
1123
- WaitlistService.prototype.deleteProject = function (waitlistId, projectId) {
1124
- return this.http.delete(this.url + "/" + waitlistId + "/projects/" + projectId);
1125
- };
1126
- return WaitlistService;
1127
- }());
1128
- WaitlistService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: WaitlistService, deps: [{ token: i1__namespace.HttpClient }, { token: 'env' }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1129
- WaitlistService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: WaitlistService, providedIn: 'root' });
1130
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: WaitlistService, decorators: [{
1131
- type: i0.Injectable,
1132
- args: [{
1133
- providedIn: 'root'
1134
- }]
1135
- }], ctorParameters: function () {
1136
- return [{ type: i1__namespace.HttpClient }, { type: undefined, decorators: [{
1137
- type: i0.Inject,
1138
- args: ['env']
1139
- }] }];
1140
- } });
1141
-
1142
- var ConfigurationService = /** @class */ (function () {
1143
- function ConfigurationService(http, env) {
1144
- this.http = http;
1145
- this.env = env;
1146
- this.url = this.env.baseUrl + 'api/configs';
1147
- }
1148
- ConfigurationService.prototype.readConfigs = function () {
1149
- return this.http.get(this.url);
1150
- };
1151
- ConfigurationService.prototype.updateConfigs = function (configuration) {
1152
- return this.http.put(this.url + "/1", configuration);
1153
- };
1154
- return ConfigurationService;
1155
- }());
1156
- ConfigurationService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: ConfigurationService, deps: [{ token: i1__namespace.HttpClient }, { token: 'env' }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1157
- ConfigurationService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: ConfigurationService, providedIn: 'root' });
1158
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: ConfigurationService, decorators: [{
1159
- type: i0.Injectable,
1160
- args: [{
1161
- providedIn: 'root'
1162
- }]
1163
- }], ctorParameters: function () {
1164
- return [{ type: i1__namespace.HttpClient }, { type: undefined, decorators: [{
1165
- type: i0.Inject,
1166
- args: ['env']
1167
- }] }];
1168
- } });
1169
-
1170
- var WaitlistCustomerService = /** @class */ (function () {
1171
- function WaitlistCustomerService(http, env) {
1172
- this.http = http;
1173
- this.env = env;
1174
- this.url = this.env.baseUrl + 'api/waitlist-items/customer';
1175
- }
1176
- WaitlistCustomerService.prototype.readWaitlistItem = function (token) {
1177
- return this.http.get(this.url, {
1178
- params: { token: token }
1179
- });
1180
- };
1181
- WaitlistCustomerService.prototype.updateWaitlistItem = function (token, waitlistItem) {
1182
- return this.http.put(this.url + "/" + waitlistItem.id, waitlistItem, {
1183
- params: { token: token }
1184
- });
1185
- };
1186
- WaitlistCustomerService.prototype.cancelWaitlistItem = function (token) {
1187
- return this.http.delete("" + this.url, {
1188
- params: { token: token }
1189
- });
1190
- };
1191
- return WaitlistCustomerService;
1192
- }());
1193
- WaitlistCustomerService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: WaitlistCustomerService, deps: [{ token: i1__namespace.HttpClient }, { token: 'env' }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1194
- WaitlistCustomerService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: WaitlistCustomerService, providedIn: 'root' });
1195
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: WaitlistCustomerService, decorators: [{
1196
- type: i0.Injectable,
1197
- args: [{
1198
- providedIn: 'root'
1199
- }]
1200
- }], ctorParameters: function () {
1201
- return [{ type: i1__namespace.HttpClient }, { type: undefined, decorators: [{
1202
- type: i0.Inject,
1203
- args: ['env']
1204
- }] }];
1205
- } });
1206
-
1207
- var OpticService = /** @class */ (function () {
1208
- function OpticService(http, env) {
1209
- this.http = http;
1210
- this.env = env;
1211
- this.url = this.env.baseUrl + 'api/optics';
1212
- }
1213
- OpticService.prototype.readOptics = function (includeInactive) {
1214
- if (includeInactive === void 0) { includeInactive = false; }
1215
- return this.http.get(this.url, {
1216
- params: {
1217
- includeInactive: includeInactive.toString()
1218
- }
1219
- });
1220
- };
1221
- OpticService.prototype.readOptic = function (opticId) {
1222
- return this.http.get(this.url + "/" + opticId);
1223
- };
1224
- OpticService.prototype.createOptic = function (optic) {
1225
- return this.http.post(this.url, optic);
1226
- };
1227
- OpticService.prototype.updateOptic = function (opticId, optic) {
1228
- return this.http.put(this.url + "/" + opticId, optic);
1229
- };
1230
- OpticService.prototype.deleteOptic = function (opticId) {
1231
- return this.http.delete(this.url + "/" + opticId);
1232
- };
1233
- return OpticService;
1234
- }());
1235
- OpticService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: OpticService, deps: [{ token: i1__namespace.HttpClient }, { token: 'env' }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1236
- OpticService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: OpticService, providedIn: 'root' });
1237
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: OpticService, decorators: [{
1238
- type: i0.Injectable,
1239
- args: [{
1240
- providedIn: 'root'
1241
- }]
1242
- }], ctorParameters: function () {
1243
- return [{ type: i1__namespace.HttpClient }, { type: undefined, decorators: [{
1244
- type: i0.Inject,
1245
- args: ['env']
1246
- }] }];
1247
- } });
1248
-
1249
- var ProductService = /** @class */ (function () {
1250
- function ProductService(http, env) {
1251
- this.http = http;
1252
- this.env = env;
1253
- this.url = this.env.baseUrl + 'api/products';
1254
- }
1255
- ProductService.prototype.readProducts = function (sku) {
1256
- return this.http.get(this.url, { params: { sku: sku } });
1257
- };
1258
- ProductService.prototype.readProductBundleItems = function (id) {
1259
- return this.http.get(this.url + "/" + id + "/bundle-items");
1260
- };
1261
- return ProductService;
1262
- }());
1263
- ProductService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: ProductService, deps: [{ token: i1__namespace.HttpClient }, { token: 'env' }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1264
- ProductService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: ProductService, providedIn: 'root' });
1265
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: ProductService, decorators: [{
1266
- type: i0.Injectable,
1267
- args: [{
1268
- providedIn: 'root'
1269
- }]
1270
- }], ctorParameters: function () {
1271
- return [{ type: i1__namespace.HttpClient }, { type: undefined, decorators: [{
1272
- type: i0.Inject,
1273
- args: ['env']
1274
- }] }];
1275
- } });
1276
-
1277
- var FirearmSeriesService = /** @class */ (function () {
1278
- function FirearmSeriesService(http, env) {
1279
- this.http = http;
1280
- this.env = env;
1281
- this.url = this.env.baseUrl + 'api/firearm-serieses';
1282
- }
1283
- FirearmSeriesService.prototype.readSerieses = function (includeInactive) {
1284
- if (includeInactive === void 0) { includeInactive = false; }
1285
- return this.http.get(this.url, {
1286
- params: {
1287
- includeInactive: includeInactive.toString()
1288
- }
1289
- });
1290
- };
1291
- FirearmSeriesService.prototype.readSeries = function (firearmSeriesId) {
1292
- return this.http.get(this.url + "/" + firearmSeriesId);
1293
- };
1294
- FirearmSeriesService.prototype.createSeries = function (firearmSeries) {
1295
- return this.http.post(this.url, firearmSeries);
1296
- };
1297
- FirearmSeriesService.prototype.updateSeries = function (firearmSeriesId, firearmSeries) {
1298
- return this.http.put(this.url + "/" + firearmSeriesId, firearmSeries);
1299
- };
1300
- FirearmSeriesService.prototype.deleteSeries = function (firearmSeriesId) {
1301
- return this.http.delete(this.url + "/" + firearmSeriesId);
1302
- };
1303
- FirearmSeriesService.prototype.readSeriesOptics = function (firearmSeriesId) {
1304
- return this.http.get(this.url + "/" + firearmSeriesId + "/optics");
1305
- };
1306
- return FirearmSeriesService;
1307
- }());
1308
- FirearmSeriesService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: FirearmSeriesService, deps: [{ token: i1__namespace.HttpClient }, { token: 'env' }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1309
- FirearmSeriesService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: FirearmSeriesService, providedIn: 'root' });
1310
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: FirearmSeriesService, decorators: [{
1311
- type: i0.Injectable,
1312
- args: [{
1313
- providedIn: 'root'
1314
- }]
1315
- }], ctorParameters: function () {
1316
- return [{ type: i1__namespace.HttpClient }, { type: undefined, decorators: [{
1317
- type: i0.Inject,
1318
- args: ['env']
1319
- }] }];
1320
- } });
1321
-
1322
- var MillingTypeService = /** @class */ (function () {
1323
- function MillingTypeService(http, env) {
1324
- this.http = http;
1325
- this.env = env;
1326
- this.url = this.env.baseUrl + 'api/milling-types';
1327
- }
1328
- MillingTypeService.prototype.readMillingTypes = function (includeInactive) {
1329
- if (includeInactive === void 0) { includeInactive = false; }
1330
- var params = {};
1331
- if (includeInactive) {
1332
- params['includeInactive'] = includeInactive.toString();
1333
- }
1334
- return this.http.get(this.url, {
1335
- params: params
1336
- });
1337
- };
1338
- MillingTypeService.prototype.readMillingType = function (id) {
1339
- return this.http.get(this.url + "/" + id);
1340
- };
1341
- MillingTypeService.prototype.createMillingType = function (millingType) {
1342
- return this.http.post(this.url, millingType);
1343
- };
1344
- MillingTypeService.prototype.updateMillingType = function (id, millingType) {
1345
- return this.http.put(this.url + "/" + id, millingType);
1346
- };
1347
- MillingTypeService.prototype.deleteMillingType = function (id) {
1348
- return this.http.delete(this.url + "/" + id);
1349
- };
1350
- return MillingTypeService;
1351
- }());
1352
- MillingTypeService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: MillingTypeService, deps: [{ token: i1__namespace.HttpClient }, { token: 'env' }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1353
- MillingTypeService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: MillingTypeService, providedIn: 'root' });
1354
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: MillingTypeService, decorators: [{
1355
- type: i0.Injectable,
1356
- args: [{
1357
- providedIn: 'root'
1358
- }]
1359
- }], ctorParameters: function () {
1360
- return [{ type: i1__namespace.HttpClient }, { type: undefined, decorators: [{
1361
- type: i0.Inject,
1362
- args: ['env']
1363
- }] }];
1364
- } });
1365
-
1366
- var CosmeticMillingService = /** @class */ (function () {
1367
- function CosmeticMillingService(http, env) {
1368
- this.http = http;
1369
- this.env = env;
1370
- this.url = this.env.baseUrl + 'api/cosmetic-millings';
1371
- }
1372
- CosmeticMillingService.prototype.readCosmeticMillings = function (includeInactive) {
1373
- if (includeInactive === void 0) { includeInactive = false; }
1374
- return this.http.get(this.url, {
1375
- params: {
1376
- includeInactive: includeInactive.toString()
1377
- }
1378
- });
1379
- };
1380
- CosmeticMillingService.prototype.readCosmeticMilling = function (id) {
1381
- return this.http.get(this.url + "/" + id);
1382
- };
1383
- CosmeticMillingService.prototype.createCosmeticMilling = function (cosmeticMilling) {
1384
- return this.http.post(this.url, cosmeticMilling);
1385
- };
1386
- CosmeticMillingService.prototype.updateCosmeticMilling = function (id, cosmeticMilling) {
1387
- return this.http.put(this.url + "/" + id, cosmeticMilling);
1388
- };
1389
- CosmeticMillingService.prototype.deleteCosmeticMilling = function (id) {
1390
- return this.http.delete(this.url + "/" + id);
1391
- };
1392
- return CosmeticMillingService;
1393
- }());
1394
- CosmeticMillingService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: CosmeticMillingService, deps: [{ token: i1__namespace.HttpClient }, { token: 'env' }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1395
- CosmeticMillingService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: CosmeticMillingService, providedIn: 'root' });
1396
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: CosmeticMillingService, decorators: [{
1397
- type: i0.Injectable,
1398
- args: [{
1399
- providedIn: 'root'
1400
- }]
1401
- }], ctorParameters: function () {
1402
- return [{ type: i1__namespace.HttpClient }, { type: undefined, decorators: [{
1403
- type: i0.Inject,
1404
- args: ['env']
1405
- }] }];
1406
- } });
1407
-
1408
- var CoatingService = /** @class */ (function () {
1409
- function CoatingService(http, env) {
1410
- this.http = http;
1411
- this.env = env;
1412
- this.url = this.env.baseUrl + 'api/coatings';
1413
- }
1414
- CoatingService.prototype.readCoatings = function (includeInactive) {
1415
- if (includeInactive === void 0) { includeInactive = false; }
1416
- var params = {
1417
- includeInactive: includeInactive.toString()
1418
- };
1419
- return this.http.get(this.url, {
1420
- params: params
1421
- });
1422
- };
1423
- CoatingService.prototype.readCoating = function (id) {
1424
- return this.http.get(this.url + "/" + id);
1425
- };
1426
- CoatingService.prototype.createCoating = function (coating) {
1427
- return this.http.post(this.url, coating);
1428
- };
1429
- CoatingService.prototype.updateCoating = function (id, coating) {
1430
- return this.http.put(this.url + "/" + id, coating);
1431
- };
1432
- CoatingService.prototype.deleteCoating = function (id) {
1433
- return this.http.delete(this.url + "/" + id);
1434
- };
1435
- // Coating Values
1436
- CoatingService.prototype.readCoatingValues = function (coatingId, includeInactive) {
1437
- if (includeInactive === void 0) { includeInactive = false; }
1438
- return this.http.get(this.url + "/" + coatingId + "/coating-values", {
1439
- params: {
1440
- includeInactive: includeInactive.toString()
1441
- }
1442
- });
1443
- };
1444
- CoatingService.prototype.readCoatingValue = function (coatingId, coatingValueId) {
1445
- return this.http.get(this.url + "/" + coatingId + "/coating-values/" + coatingValueId);
1446
- };
1447
- CoatingService.prototype.createCoatingValue = function (coatingId, coatingValue) {
1448
- return this.http.post(this.url + "/" + coatingId + "/coating-values", coatingValue);
1449
- };
1450
- CoatingService.prototype.updateCoatingValue = function (coatingId, coatingValueId, coatingValue) {
1451
- return this.http.put(this.url + "/" + coatingId + "/coating-values/" + coatingValueId, coatingValue);
1452
- };
1453
- CoatingService.prototype.deleteCoatingValue = function (coatingId, coatingValueId) {
1454
- return this.http.delete(this.url + "/" + coatingId + "/coating-values/" + coatingValueId);
1455
- };
1456
- return CoatingService;
1457
- }());
1458
- CoatingService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: CoatingService, deps: [{ token: i1__namespace.HttpClient }, { token: 'env' }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1459
- CoatingService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: CoatingService, providedIn: 'root' });
1460
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: CoatingService, decorators: [{
1461
- type: i0.Injectable,
1462
- args: [{
1463
- providedIn: 'root'
1464
- }]
1465
- }], ctorParameters: function () {
1466
- return [{ type: i1__namespace.HttpClient }, { type: undefined, decorators: [{
1467
- type: i0.Inject,
1468
- args: ['env']
1469
- }] }];
1470
- } });
1471
-
1472
- var MaterialService = /** @class */ (function () {
1473
- function MaterialService(http, env) {
1474
- this.http = http;
1475
- this.env = env;
1476
- this.url = this.env.baseUrl + 'api/materials';
1477
- }
1478
- MaterialService.prototype.readMaterials = function (includeInactive) {
1479
- if (includeInactive === void 0) { includeInactive = false; }
1480
- return this.http.get(this.url, {
1481
- params: {
1482
- includeInactive: includeInactive.toString()
1483
- }
1484
- });
1485
- };
1486
- return MaterialService;
1487
- }());
1488
- MaterialService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: MaterialService, deps: [{ token: i1__namespace.HttpClient }, { token: 'env' }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1489
- MaterialService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: MaterialService, providedIn: 'root' });
1490
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: MaterialService, decorators: [{
1491
- type: i0.Injectable,
1492
- args: [{
1493
- providedIn: 'root'
1494
- }]
1495
- }], ctorParameters: function () {
1496
- return [{ type: i1__namespace.HttpClient }, { type: undefined, decorators: [{
1497
- type: i0.Inject,
1498
- args: ['env']
1499
- }] }];
1500
- } });
1501
-
1502
- var PurchaseOrderService = /** @class */ (function () {
1503
- function PurchaseOrderService(http, env) {
1504
- this.http = http;
1505
- this.env = env;
1506
- this.url = this.env.baseUrl + 'api/purchase-orders';
1507
- }
1508
- PurchaseOrderService.prototype.readPurchaseOrders = function (statuses, id, date, vendorId, serialNumber) {
1509
- if (statuses === void 0) { statuses = null; }
1510
- if (id === void 0) { id = null; }
1511
- if (date === void 0) { date = null; }
1512
- if (vendorId === void 0) { vendorId = null; }
1513
- if (serialNumber === void 0) { serialNumber = null; }
1514
- var params = {};
1515
- if (statuses) {
1516
- params['statuses'] = statuses.map(function (s) { return s.toString(); });
1517
- }
1518
- if (id) {
1519
- params['id'] = id;
1520
- }
1521
- if (date) {
1522
- params['date'] = date.toUTCString();
1523
- }
1524
- if (vendorId) {
1525
- params['vendorId'] = vendorId;
1526
- }
1527
- if (serialNumber) {
1528
- params['serialNumber'] = serialNumber;
1529
- }
1530
- return this.http.get(this.url, {
1531
- params: params
1532
- });
1533
- };
1534
- PurchaseOrderService.prototype.readPurchaseOrder = function (id) {
1535
- return this.http.get(this.url + "/" + id);
1536
- };
1537
- PurchaseOrderService.prototype.createPurchaseOrder = function (purchaseOrder) {
1538
- return this.http.post(this.url, purchaseOrder);
1539
- };
1540
- PurchaseOrderService.prototype.updatePurchaseOrder = function (id, purchaseOrder) {
1541
- return this.http.put(this.url + "/" + id, purchaseOrder);
1542
- };
1543
- PurchaseOrderService.prototype.deletePurchaseOrder = function (id) {
1544
- return this.http.delete(this.url + "/" + id);
1545
- };
1546
- PurchaseOrderService.prototype.getRefinishItems = function () {
1547
- return this.http.get(this.env.baseUrl + "api/purchase-order-refinish-items");
1548
- };
1549
- // Refinish Items
1550
- PurchaseOrderService.prototype.readRefinishItemCollection = function (purchaseOrderId, itemIds) {
1551
- return this.http.get(this.url + "/" + purchaseOrderId + "/refinish-items/collection/" + itemIds.join(','));
1552
- };
1553
- PurchaseOrderService.prototype.readRefinishItem = function (purchaseOrderId, refinishItemId) {
1554
- return this.http.get(this.url + "/" + purchaseOrderId + "/refinish-items/" + refinishItemId);
1555
- };
1556
- PurchaseOrderService.prototype.createRefinishItem = function (purchaseOrderId, refinishItem) {
1557
- return this.http.post(this.url + "/" + purchaseOrderId + "/refinish-items", refinishItem);
1558
- };
1559
- PurchaseOrderService.prototype.createRefinishItemCollection = function (purchaseOrderId, refinishItems) {
1560
- return this.http.post(this.url + "/" + purchaseOrderId + "/refinish-items/collection", refinishItems);
1561
- };
1562
- PurchaseOrderService.prototype.updateRefinishItem = function (purchaseOrderId, refinishItemId, refinishItem) {
1563
- return this.http.put(this.url + "/" + purchaseOrderId + "/refinish-items/" + refinishItemId, refinishItem);
1564
- };
1565
- PurchaseOrderService.prototype.updateRefinishItemCollection = function (purchaseOrderId, itemIds, refinishItems) {
1566
- return this.http.put(this.url + "/" + purchaseOrderId + "/refinish-items/collection/" + itemIds.join(','), refinishItems);
1567
- };
1568
- PurchaseOrderService.prototype.deleteRefinishItem = function (purchaseOrderId, refinishItemId) {
1569
- return this.http.delete(this.url + "/" + purchaseOrderId + "/refinish-items/" + refinishItemId);
1570
- };
1571
- PurchaseOrderService.prototype.getPdf = function (purchaseOrderId) {
1572
- return this.http.get(this.url + "/" + purchaseOrderId + "/pdf", { responseType: "blob" });
1573
- };
1574
- PurchaseOrderService.prototype.getBatf = function (purchaseOrderId) {
1575
- return this.http.get(this.url + "/" + purchaseOrderId + "/batf", { responseType: "blob" });
1576
- };
1577
- return PurchaseOrderService;
1578
- }());
1579
- PurchaseOrderService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: PurchaseOrderService, deps: [{ token: i1__namespace.HttpClient }, { token: 'env' }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1580
- PurchaseOrderService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: PurchaseOrderService, providedIn: 'root' });
1581
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: PurchaseOrderService, decorators: [{
1582
- type: i0.Injectable,
1583
- args: [{
1584
- providedIn: 'root'
1585
- }]
1586
- }], ctorParameters: function () {
1587
- return [{ type: i1__namespace.HttpClient }, { type: undefined, decorators: [{
1588
- type: i0.Inject,
1589
- args: ['env']
1590
- }] }];
1591
- } });
1592
-
1593
- var UserService = /** @class */ (function () {
1594
- function UserService(http, env) {
1595
- this.http = http;
1596
- this.env = env;
1597
- this.url = this.env.baseUrl + 'api/users';
1598
- }
1599
- UserService.prototype.readUsers = function () {
1600
- return this.http.get(this.url);
1601
- };
1602
- return UserService;
1603
- }());
1604
- UserService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: UserService, deps: [{ token: i1__namespace.HttpClient }, { token: 'env' }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1605
- UserService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: UserService, providedIn: 'root' });
1606
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: UserService, decorators: [{
1607
- type: i0.Injectable,
1608
- args: [{
1609
- providedIn: 'root'
1610
- }]
1611
- }], ctorParameters: function () {
1612
- return [{ type: i1__namespace.HttpClient }, { type: undefined, decorators: [{
1613
- type: i0.Inject,
1614
- args: ['env']
1615
- }] }];
1616
- } });
1617
-
1618
- var WaitlistProjectService = /** @class */ (function () {
1619
- function WaitlistProjectService(http, env) {
1620
- this.http = http;
1621
- this.env = env;
1622
- this.url = this.env.baseUrl + 'api/waitlist-projects';
1623
- }
1624
- WaitlistProjectService.prototype.readRefinishDetails = function (projectId) {
1625
- return this.http.get(this.url + "/" + projectId + "/refinish-details");
1626
- };
1627
- WaitlistProjectService.prototype.updateRefinishDetails = function (projectId, details) {
1628
- return this.http.put(this.url + "/" + projectId + "/refinish-details", details);
1629
- };
1630
- WaitlistProjectService.prototype.readMillingDetail = function (projectId) {
1631
- return this.http.get(this.url + "/" + projectId + "/milling-details");
1632
- };
1633
- WaitlistProjectService.prototype.createMillingDetail = function (projectId, detail) {
1634
- return this.http.post(this.url + "/" + projectId + "/milling-details", detail);
1635
- };
1636
- WaitlistProjectService.prototype.updateMillingDetail = function (projectId, detailId, detail) {
1637
- return this.http.put(this.url + "/" + projectId + "/milling-details/" + detailId, detail);
1638
- };
1639
- return WaitlistProjectService;
1640
- }());
1641
- WaitlistProjectService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: WaitlistProjectService, deps: [{ token: i1__namespace.HttpClient }, { token: 'env' }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1642
- WaitlistProjectService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: WaitlistProjectService, providedIn: 'root' });
1643
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: WaitlistProjectService, decorators: [{
1644
- type: i0.Injectable,
1645
- args: [{
1646
- providedIn: 'root'
1647
- }]
1648
- }], ctorParameters: function () {
1649
- return [{ type: i1__namespace.HttpClient }, { type: undefined, decorators: [{
1650
- type: i0.Inject,
1651
- args: ['env']
1652
- }] }];
1653
- } });
1654
-
1655
- var InventoryService = /** @class */ (function () {
1656
- function InventoryService(http, env) {
1657
- this.http = http;
1658
- this.env = env;
1659
- this.url = this.env.baseUrl + 'api/inventory-items';
1660
- }
1661
- InventoryService.prototype.readInventoryItems = function (includeInactive, search) {
1662
- if (includeInactive === void 0) { includeInactive = false; }
1663
- if (search === void 0) { search = null; }
1664
- var params = {
1665
- includeInactive: includeInactive.toString()
1666
- };
1667
- if (search !== null) {
1668
- params['search'] = search;
1669
- }
1670
- return this.http.get(this.url, { params: params });
1671
- };
1672
- return InventoryService;
1673
- }());
1674
- InventoryService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: InventoryService, deps: [{ token: i1__namespace.HttpClient }, { token: 'env' }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1675
- InventoryService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: InventoryService, providedIn: 'root' });
1676
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: InventoryService, decorators: [{
1677
- type: i0.Injectable,
1678
- args: [{
1679
- providedIn: 'root'
1680
- }]
1681
- }], ctorParameters: function () {
1682
- return [{ type: i1__namespace.HttpClient }, { type: undefined, decorators: [{
1683
- type: i0.Inject,
1684
- args: ['env']
1685
- }] }];
1686
- } });
1687
-
1688
- var PhonePipe = /** @class */ (function () {
1689
- function PhonePipe() {
1690
- }
1691
- PhonePipe.prototype.transform = function (value, args) {
1692
- if (value && value.length >= 10) {
1693
- return "(" + value.slice(0, 3) + ") " + value.slice(3, 6) + "-" + value.slice(6);
1694
- }
1695
- return '';
1696
- };
1697
- return PhonePipe;
1698
- }());
1699
- PhonePipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: PhonePipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
1700
- PhonePipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: PhonePipe, name: "phone" });
1701
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: PhonePipe, decorators: [{
1702
- type: i0.Pipe,
1703
- args: [{
1704
- name: 'phone'
1705
- }]
1706
- }] });
1707
-
1708
- var FileNamePipe = /** @class */ (function () {
1709
- function FileNamePipe() {
1710
- }
1711
- FileNamePipe.prototype.transform = function (value, args) {
1712
- return value.replace(/(\{){0,1}[0-9a-fA-F]{8}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{4}\-[0-9a-fA-F]{12}(\}){0,1}-/, '');
1713
- };
1714
- return FileNamePipe;
1715
- }());
1716
- FileNamePipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: FileNamePipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
1717
- FileNamePipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: FileNamePipe, name: "fileName" });
1718
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: FileNamePipe, decorators: [{
1719
- type: i0.Pipe,
1720
- args: [{
1721
- name: 'fileName'
1722
- }]
1723
- }] });
1724
-
1725
- var EnumPipe = /** @class */ (function () {
1726
- function EnumPipe() {
1727
- }
1728
- EnumPipe.prototype.transform = function (value, args) {
1729
- return value.replace(/([A-Z])/g, ' $1').trim();
1730
- };
1731
- return EnumPipe;
1732
- }());
1733
- EnumPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: EnumPipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
1734
- EnumPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: EnumPipe, name: "enum" });
1735
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: EnumPipe, decorators: [{
1736
- type: i0.Pipe,
1737
- args: [{
1738
- name: 'enum'
1739
- }]
1740
- }] });
1741
-
1742
- var NewLinePipe = /** @class */ (function () {
1743
- function NewLinePipe() {
1744
- }
1745
- NewLinePipe.prototype.transform = function (value, args) {
1746
- return value ? value.replace(/(?:\r\n|\r|\n)/g, '<br>') : '';
1747
- };
1748
- return NewLinePipe;
1749
- }());
1750
- NewLinePipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: NewLinePipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
1751
- NewLinePipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: NewLinePipe, name: "newLine" });
1752
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: NewLinePipe, decorators: [{
1753
- type: i0.Pipe,
1754
- args: [{
1755
- name: 'newLine'
1756
- }]
1757
- }] });
1758
-
1759
- var FrameMaterialPipe = /** @class */ (function () {
1760
- function FrameMaterialPipe() {
1761
- this.frameMaterial = [
1762
- { id: 0, name: 'All' },
1763
- { id: 1, name: 'Polymer' },
1764
- { id: 2, name: 'Aluminum' },
1765
- { id: 3, name: 'Steel' },
1766
- ];
1767
- }
1768
- FrameMaterialPipe.prototype.transform = function (value, args) {
1769
- return this.frameMaterial.find(function (fm) { return fm.id == value; }).name;
1770
- };
1771
- return FrameMaterialPipe;
1772
- }());
1773
- FrameMaterialPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: FrameMaterialPipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
1774
- FrameMaterialPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: FrameMaterialPipe, name: "frameMaterial" });
1775
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: FrameMaterialPipe, decorators: [{
1776
- type: i0.Pipe,
1777
- args: [{
1778
- name: 'frameMaterial'
1779
- }]
1780
- }] });
1781
-
1782
- var DisableControlDirective = /** @class */ (function () {
1783
- function DisableControlDirective(ngControl) {
1784
- this.ngControl = ngControl;
1785
- }
1786
- Object.defineProperty(DisableControlDirective.prototype, "disableControl", {
1787
- set: function (condition) {
1788
- var action = condition ? 'disable' : 'enable';
1789
- this.ngControl.control[action]();
1790
- },
1791
- enumerable: false,
1792
- configurable: true
1793
- });
1794
- return DisableControlDirective;
1795
- }());
1796
- DisableControlDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: DisableControlDirective, deps: [{ token: i1__namespace$1.NgControl }], target: i0__namespace.ɵɵFactoryTarget.Directive });
1797
- DisableControlDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.1.2", type: DisableControlDirective, selector: "[disableControl]", inputs: { disableControl: "disableControl" }, ngImport: i0__namespace });
1798
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: DisableControlDirective, decorators: [{
1799
- type: i0.Directive,
1800
- args: [{
1801
- selector: '[disableControl]'
1802
- }]
1803
- }], ctorParameters: function () { return [{ type: i1__namespace$1.NgControl }]; }, propDecorators: { disableControl: [{
1804
- type: i0.Input
1805
- }] } });
1806
-
1807
- function coatingValueValidator() {
1808
- return function (control) {
1809
- if (!control.parent) {
1810
- return null;
1811
- }
1812
- var coatingControl = control.parent.get('coating');
1813
- if (!coatingControl) {
1814
- return null;
1815
- }
1816
- var coating = coatingControl.value;
1817
- return coating && coating.valueLabel && coating.coatingValues && coating.coatingValues.length &&
1818
- !control.value ? { value: control.value } : null;
1819
- };
1820
- }
1821
- function coatingDescriptionValidator() {
1822
- return function (control) {
1823
- if (!control.parent) {
1824
- return null;
1825
- }
1826
- var coatingControl = control.parent.get('coating');
1827
- if (!coatingControl) {
1828
- return null;
1829
- }
1830
- var coating = coatingControl.value;
1831
- return coating && coating.valueLabel && (!coating.coatingValues || !coating.coatingValues.length) &&
1832
- !control.value ? { value: control.value } : null;
1833
- };
1834
- }
1835
- function refinishDetailsValidator() {
1836
- return function (control) {
1837
- var formArray = control;
1838
- var isValid = false;
1839
- if (!formArray.controls.length) {
1840
- isValid = true;
1841
- }
1842
- for (var i = 0; i < formArray.controls.length; i++) {
1843
- var formGroup = formArray.controls[i];
1844
- if (formGroup.get('coating').value && formGroup.get('coating').value.id) {
1845
- isValid = true;
1846
- }
1847
- }
1848
- return !isValid ? { 'allNone': { value: true } } : null;
1849
- };
1850
- }
1851
-
1852
- var SharedModule = /** @class */ (function () {
1853
- function SharedModule() {
1854
- }
1855
- return SharedModule;
1856
- }());
1857
- SharedModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: SharedModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1858
- SharedModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: SharedModule, declarations: [PhonePipe,
1859
- FileNamePipe,
1860
- EnumPipe,
1861
- DisableControlDirective,
1862
- NewLinePipe,
1863
- FrameMaterialPipe], exports: [PhonePipe,
1864
- FileNamePipe,
1865
- EnumPipe,
1866
- NewLinePipe,
1867
- DisableControlDirective,
1868
- FrameMaterialPipe] });
1869
- SharedModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: SharedModule, imports: [[]] });
1870
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: SharedModule, decorators: [{
1871
- type: i0.NgModule,
1872
- args: [{
1873
- declarations: [
1874
- PhonePipe,
1875
- FileNamePipe,
1876
- EnumPipe,
1877
- DisableControlDirective,
1878
- NewLinePipe,
1879
- FrameMaterialPipe
1880
- ],
1881
- imports: [],
1882
- exports: [
1883
- PhonePipe,
1884
- FileNamePipe,
1885
- EnumPipe,
1886
- NewLinePipe,
1887
- DisableControlDirective,
1888
- FrameMaterialPipe
1889
- ]
1890
- }]
1891
- }] });
1892
-
1893
- var fadeOutAnimation = animations.trigger('fadeOutAnimation', [
1894
- animations.transition('true => void', [
1895
- animations.style({
1896
- opacity: 1
1897
- }),
1898
- animations.animate('0.2s', animations.style({ opacity: 0 })),
1899
- ])
1900
- ]);
1901
-
1902
- var NotificationService = /** @class */ (function () {
1903
- function NotificationService() {
1904
- this.messageUpdatedSource = new rxjs.Subject();
1905
- this.messageUpdated = this.messageUpdatedSource.asObservable();
1906
- }
1907
- NotificationService.prototype.addMessage = function (type, message) {
1908
- this.messageUpdatedSource.next({ index: 0, type: type, message: message });
1909
- };
1910
- return NotificationService;
1911
- }());
1912
- NotificationService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: NotificationService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1913
- NotificationService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: NotificationService, providedIn: 'root' });
1914
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: NotificationService, decorators: [{
1915
- type: i0.Injectable,
1916
- args: [{
1917
- providedIn: 'root'
1918
- }]
1919
- }], ctorParameters: function () { return []; } });
1920
-
1921
- var NotificationBarComponent = /** @class */ (function () {
1922
- function NotificationBarComponent(notificationService) {
1923
- this.notificationService = notificationService;
1924
- this.messages = [];
1925
- }
1926
- Object.defineProperty(NotificationBarComponent.prototype, "viewMessages", {
1927
- get: function () {
1928
- if (this.messages.length > 3) {
1929
- return this.messages.slice(0).reverse().slice(0, 2);
1930
- }
1931
- return this.messages.slice(0).reverse();
1932
- },
1933
- enumerable: false,
1934
- configurable: true
1935
- });
1936
- ;
1937
- NotificationBarComponent.prototype.ngOnInit = function () {
1938
- var _this = this;
1939
- this.notificationService.messageUpdated.subscribe(function (message) {
1940
- _this.messages.push(message);
1941
- setTimeout(function () {
1942
- _this.messages.shift();
1943
- }, 4000);
1944
- });
1945
- };
1946
- NotificationBarComponent.prototype.getIconClass = function (message) {
1947
- return {
1948
- 'fa-exclamation-triangle': message.type == 1,
1949
- 'fa-info-circle': message.type == 0,
1950
- };
1951
- };
1952
- NotificationBarComponent.prototype.shouldFade = function () {
1953
- return this.messages.length < 3;
1954
- };
1955
- return NotificationBarComponent;
1956
- }());
1957
- NotificationBarComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: NotificationBarComponent, deps: [{ token: NotificationService }], target: i0__namespace.ɵɵFactoryTarget.Component });
1958
- NotificationBarComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.1.2", type: NotificationBarComponent, selector: "app-notification-bar", ngImport: i0__namespace, template: "<div class=\"notification-bar\" *ngIf=\"messages.length\">\r\n <div *ngFor=\"let message of viewMessages\" class=\"notification-pill\" [class.error]=\"message.type == 1\" [@fadeOutAnimation]=\"shouldFade()\">\r\n <i class=\"fa\" [ngClass]=\"getIconClass(message)\"></i> <span class=\"ml-1\">{{message.message}}</span>\r\n </div>\r\n <div *ngIf=\"messages.length > 3\" class=\"notification-pill\">{{messages.length - 2}} more...</div>\r\n</div>\r\n", styles: [".notification-bar{position:fixed;top:0;left:0;right:0;z-index:10001;pointer-events:none}.notification-bar .notification-pill{max-width:300px;margin:10px auto;border-radius:20px;color:#2a2b4b;background:#f2f2f2;padding:8px;text-align:center;box-shadow:inset 0 2px 4px hsla(0,0%,100%,.5),inset 0 -2px 4px rgba(0,0,0,.9),0 2px 4px rgba(0,0,0,.5)}.notification-bar .error{color:#711e16!important;background:#f8d8d4!important}"], directives: [{ type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], animations: [fadeOutAnimation] });
1959
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: NotificationBarComponent, decorators: [{
1960
- type: i0.Component,
1961
- args: [{
1962
- selector: 'app-notification-bar',
1963
- templateUrl: './notification-bar.component.html',
1964
- styleUrls: ['./notification-bar.component.scss'],
1965
- animations: [fadeOutAnimation],
1966
- }]
1967
- }], ctorParameters: function () { return [{ type: NotificationService }]; } });
1968
-
1969
- var NotificationModule = /** @class */ (function () {
1970
- function NotificationModule() {
1971
- }
1972
- return NotificationModule;
1973
- }());
1974
- NotificationModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: NotificationModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1975
- NotificationModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: NotificationModule, declarations: [NotificationBarComponent], imports: [i2.CommonModule], exports: [NotificationBarComponent] });
1976
- NotificationModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: NotificationModule, imports: [[
1977
- i2.CommonModule
1978
- ]] });
1979
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.1.2", ngImport: i0__namespace, type: NotificationModule, decorators: [{
1980
- type: i0.NgModule,
1981
- args: [{
1982
- imports: [
1983
- i2.CommonModule
1984
- ],
1985
- exports: [
1986
- NotificationBarComponent
1987
- ],
1988
- declarations: [
1989
- NotificationBarComponent
1990
- ]
1991
- }]
1992
- }] });
1993
-
1994
- exports.NotificationType = void 0;
1995
- (function (NotificationType) {
1996
- NotificationType[NotificationType["Info"] = 0] = "Info";
1997
- NotificationType[NotificationType["Error"] = 1] = "Error";
1998
- })(exports.NotificationType || (exports.NotificationType = {}));
1999
-
2000
- /*
2001
- * Public API Surface of gunsmith-common
2002
- */
2003
-
2004
- /**
2005
- * Generated bundle index. Do not edit.
2006
- */
2007
-
2008
- exports.BundleItem = BundleItem;
2009
- exports.Coating = Coating;
2010
- exports.CoatingService = CoatingService;
2011
- exports.CoatingValue = CoatingValue;
2012
- exports.Configuration = Configuration;
2013
- exports.ConfigurationService = ConfigurationService;
2014
- exports.CosmeticMilling = CosmeticMilling;
2015
- exports.CosmeticMillingService = CosmeticMillingService;
2016
- exports.Customer = Customer;
2017
- exports.CustomerService = CustomerService;
2018
- exports.Dealer = Dealer;
2019
- exports.DealerContact = DealerContact;
2020
- exports.DealerCoupon = DealerCoupon;
2021
- exports.DealerService = DealerService;
2022
- exports.DisableControlDirective = DisableControlDirective;
2023
- exports.EnumPipe = EnumPipe;
2024
- exports.FileNamePipe = FileNamePipe;
2025
- exports.FileUploadService = FileUploadService;
2026
- exports.FilterOptions = FilterOptions;
2027
- exports.Firearm = Firearm;
2028
- exports.FirearmSeries = FirearmSeries;
2029
- exports.FirearmSeriesOptic = FirearmSeriesOptic;
2030
- exports.FirearmSeriesService = FirearmSeriesService;
2031
- exports.FirearmService = FirearmService;
2032
- exports.FrameMaterialPipe = FrameMaterialPipe;
2033
- exports.GunPart = GunPart;
2034
- exports.GunPartService = GunPartService;
2035
- exports.InventoryItem = InventoryItem;
2036
- exports.InventoryService = InventoryService;
2037
- exports.JFile = JFile;
2038
- exports.Material = Material;
2039
- exports.MaterialService = MaterialService;
2040
- exports.MillingDetail = MillingDetail;
2041
- exports.MillingItem = MillingItem;
2042
- exports.MillingType = MillingType;
2043
- exports.MillingTypeService = MillingTypeService;
2044
- exports.NewLinePipe = NewLinePipe;
2045
- exports.NotificationBarComponent = NotificationBarComponent;
2046
- exports.NotificationModule = NotificationModule;
2047
- exports.NotificationService = NotificationService;
2048
- exports.Optic = Optic;
2049
- exports.OpticService = OpticService;
2050
- exports.PhonePipe = PhonePipe;
2051
- exports.Product = Product;
2052
- exports.ProductService = ProductService;
2053
- exports.PurchaseOrder = PurchaseOrder;
2054
- exports.PurchaseOrderRefinishItem = PurchaseOrderRefinishItem;
2055
- exports.PurchaseOrderService = PurchaseOrderService;
2056
- exports.RefinishDetail = RefinishDetail;
2057
- exports.ReportMillingItem = ReportMillingItem;
2058
- exports.ReportRefinishItem = ReportRefinishItem;
2059
- exports.SharedModule = SharedModule;
2060
- exports.State = State;
2061
- exports.StateService = StateService;
2062
- exports.Total = Total;
2063
- exports.TotalItem = TotalItem;
2064
- exports.TotalsService = TotalsService;
2065
- exports.UserService = UserService;
2066
- exports.Vendor = Vendor;
2067
- exports.VendorContact = VendorContact;
2068
- exports.VendorService = VendorService;
2069
- exports.WaitlistCustomerService = WaitlistCustomerService;
2070
- exports.WaitlistGun = WaitlistGun;
2071
- exports.WaitlistHistory = WaitlistHistory;
2072
- exports.WaitlistItem = WaitlistItem;
2073
- exports.WaitlistProjectService = WaitlistProjectService;
2074
- exports.WaitlistService = WaitlistService;
2075
- exports.WorkChangeOrder = WorkChangeOrder;
2076
- exports.WorkHoliday = WorkHoliday;
2077
- exports.WorkHolidayService = WorkHolidayService;
2078
- exports.WorkOrder = WorkOrder;
2079
- exports.WorkOrderHistory = WorkOrderHistory;
2080
- exports.WorkOrderRefinishItem = WorkOrderRefinishItem;
2081
- exports.WorkOrderService = WorkOrderService;
2082
- exports.calculateFinishDate = calculateFinishDate;
2083
- exports.coatingDescriptionValidator = coatingDescriptionValidator;
2084
- exports.coatingValueValidator = coatingValueValidator;
2085
- exports.convertEnumToObjectArray = convertEnumToObjectArray;
2086
- exports.getCoatingValues = getCoatingValues;
2087
- exports.getCoatings = getCoatings;
2088
- exports.hasCoatingDescription = hasCoatingDescription;
2089
- exports.hasCoatingValues = hasCoatingValues;
2090
- exports.refinishDetailsValidator = refinishDetailsValidator;
2091
- exports.touchControls = touchControls;
2092
-
2093
- Object.defineProperty(exports, '__esModule', { value: true });
2094
-
2095
- })));
2096
- //# sourceMappingURL=gunsmith-common.umd.js.map