gunsmith-common 2.3.16 → 2.3.18

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