gunsmith-common 2.1.16 → 2.1.21

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