gunsmith-common 2.1.11

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