gunsmith-common 2.3.19 → 2.3.21

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