techlify-inventory-common 18.51.0 → 22.0.0

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 (356) hide show
  1. package/fesm2022/techlify-inventory-common-category.module-Dtn1604q.mjs +842 -0
  2. package/fesm2022/techlify-inventory-common-category.module-Dtn1604q.mjs.map +1 -0
  3. package/fesm2022/techlify-inventory-common-location.service-C99J8Lje.mjs +50 -0
  4. package/fesm2022/techlify-inventory-common-location.service-C99J8Lje.mjs.map +1 -0
  5. package/fesm2022/techlify-inventory-common-material.module-ClupVm7-.mjs +190 -0
  6. package/fesm2022/techlify-inventory-common-material.module-ClupVm7-.mjs.map +1 -0
  7. package/fesm2022/techlify-inventory-common-measure.service-DvJUGa0i.mjs +38 -0
  8. package/fesm2022/techlify-inventory-common-measure.service-DvJUGa0i.mjs.map +1 -0
  9. package/fesm2022/techlify-inventory-common-product-category-badges.component-VnfnNhtV.mjs +133 -0
  10. package/fesm2022/techlify-inventory-common-product-category-badges.component-VnfnNhtV.mjs.map +1 -0
  11. package/fesm2022/techlify-inventory-common-product.module-MZoVK3bN.mjs +4278 -0
  12. package/fesm2022/techlify-inventory-common-product.module-MZoVK3bN.mjs.map +1 -0
  13. package/fesm2022/techlify-inventory-common-purchase-order-view.component-CjED8n4_.mjs +852 -0
  14. package/fesm2022/techlify-inventory-common-purchase-order-view.component-CjED8n4_.mjs.map +1 -0
  15. package/fesm2022/techlify-inventory-common-purchase-order.service-ztJ5RRH5.mjs +40 -0
  16. package/fesm2022/techlify-inventory-common-purchase-order.service-ztJ5RRH5.mjs.map +1 -0
  17. package/fesm2022/techlify-inventory-common-recipient.module-gxR77BIj.mjs +647 -0
  18. package/fesm2022/techlify-inventory-common-recipient.module-gxR77BIj.mjs.map +1 -0
  19. package/fesm2022/techlify-inventory-common-shared.module-DP-FVqea.mjs +102 -0
  20. package/fesm2022/techlify-inventory-common-shared.module-DP-FVqea.mjs.map +1 -0
  21. package/fesm2022/techlify-inventory-common-stock-allocation-list.component-Du-VCtbs.mjs +382 -0
  22. package/fesm2022/techlify-inventory-common-stock-allocation-list.component-Du-VCtbs.mjs.map +1 -0
  23. package/fesm2022/techlify-inventory-common-stock-issue-form.component-DfgbqIKn.mjs +486 -0
  24. package/fesm2022/techlify-inventory-common-stock-issue-form.component-DfgbqIKn.mjs.map +1 -0
  25. package/fesm2022/techlify-inventory-common-stock-issue-page.module-DX9n3X1T.mjs +2509 -0
  26. package/fesm2022/techlify-inventory-common-stock-issue-page.module-DX9n3X1T.mjs.map +1 -0
  27. package/fesm2022/techlify-inventory-common-stock-issue-product-view.component-D8aIc5Oh.mjs +208 -0
  28. package/fesm2022/techlify-inventory-common-stock-issue-product-view.component-D8aIc5Oh.mjs.map +1 -0
  29. package/fesm2022/techlify-inventory-common-stock-issue-product.service-BRbfc5KP.mjs +38 -0
  30. package/fesm2022/techlify-inventory-common-stock-issue-product.service-BRbfc5KP.mjs.map +1 -0
  31. package/fesm2022/techlify-inventory-common-stock-issue-view.component-Cp_0YkKh.mjs +239 -0
  32. package/fesm2022/techlify-inventory-common-stock-issue-view.component-Cp_0YkKh.mjs.map +1 -0
  33. package/fesm2022/techlify-inventory-common-stock-issue.service-CLHasWVp.mjs +38 -0
  34. package/fesm2022/techlify-inventory-common-stock-issue.service-CLHasWVp.mjs.map +1 -0
  35. package/fesm2022/techlify-inventory-common-stock-receipts.module-BPxUGNbD.mjs +4195 -0
  36. package/fesm2022/techlify-inventory-common-stock-receipts.module-BPxUGNbD.mjs.map +1 -0
  37. package/fesm2022/techlify-inventory-common-techlify-filter.module-BdRNWNHi.mjs +464 -0
  38. package/fesm2022/techlify-inventory-common-techlify-filter.module-BdRNWNHi.mjs.map +1 -0
  39. package/fesm2022/techlify-inventory-common-techlify-form-service-D9K3W2jt.mjs +13 -0
  40. package/fesm2022/techlify-inventory-common-techlify-form-service-D9K3W2jt.mjs.map +1 -0
  41. package/fesm2022/techlify-inventory-common.mjs +10803 -2
  42. package/fesm2022/techlify-inventory-common.mjs.map +1 -1
  43. package/package.json +9 -11
  44. package/types/techlify-inventory-common.d.ts +1792 -0
  45. package/esm2022/lib/inventory-common/category/category-form/category-form.component.mjs +0 -75
  46. package/esm2022/lib/inventory-common/category/category-form-button/category-form-button.component.mjs +0 -32
  47. package/esm2022/lib/inventory-common/category/category-list-page/category-list-page.component.mjs +0 -64
  48. package/esm2022/lib/inventory-common/category/category-routing.module.mjs +0 -29
  49. package/esm2022/lib/inventory-common/category/category-view/category-view.component.mjs +0 -46
  50. package/esm2022/lib/inventory-common/category/category.module.mjs +0 -62
  51. package/esm2022/lib/inventory-common/category/category.service.mjs +0 -18
  52. package/esm2022/lib/inventory-common/incident/incident-form/incident-form.component.mjs +0 -113
  53. package/esm2022/lib/inventory-common/incident/incident-form-button/incident-form-button.component.mjs +0 -45
  54. package/esm2022/lib/inventory-common/incident/incident-list/incident-list.component.mjs +0 -140
  55. package/esm2022/lib/inventory-common/incident/incident-routing.module.mjs +0 -24
  56. package/esm2022/lib/inventory-common/incident/incident.module.mjs +0 -22
  57. package/esm2022/lib/inventory-common/incident/incident.service.mjs +0 -18
  58. package/esm2022/lib/inventory-common/inventory-common-routing.module.mjs +0 -81
  59. package/esm2022/lib/inventory-common/inventory-common.module.mjs +0 -43
  60. package/esm2022/lib/inventory-common/inventory-dashboard-page/inventory-dashboard-page.component.mjs +0 -44
  61. package/esm2022/lib/inventory-common/inventory-value-report.service.mjs +0 -21
  62. package/esm2022/lib/inventory-common/location/location-form/location-form.component.mjs +0 -63
  63. package/esm2022/lib/inventory-common/location/location-form-button/location-form-button.component.mjs +0 -47
  64. package/esm2022/lib/inventory-common/location/location-information/location-information.component.mjs +0 -36
  65. package/esm2022/lib/inventory-common/location/location-list/location-list.component.mjs +0 -81
  66. package/esm2022/lib/inventory-common/location/location-product-statistics/location-product-statistics.component.mjs +0 -80
  67. package/esm2022/lib/inventory-common/location/location-routing.module.mjs +0 -38
  68. package/esm2022/lib/inventory-common/location/location-status-changer/location-status-changer.component.mjs +0 -64
  69. package/esm2022/lib/inventory-common/location/location-view/location-view.component.mjs +0 -52
  70. package/esm2022/lib/inventory-common/location/location.module.mjs +0 -22
  71. package/esm2022/lib/inventory-common/location/location.service.mjs +0 -33
  72. package/esm2022/lib/inventory-common/location/shelf/shelf-form/shelf-form.component.mjs +0 -86
  73. package/esm2022/lib/inventory-common/location/shelf/shelf-form-button/shelf-form-button.component.mjs +0 -39
  74. package/esm2022/lib/inventory-common/location/shelf/shelf-list/shelf-list.component.mjs +0 -103
  75. package/esm2022/lib/inventory-common/location/shelf/shelf-routing.module.mjs +0 -24
  76. package/esm2022/lib/inventory-common/location/shelf/shelf.module.mjs +0 -22
  77. package/esm2022/lib/inventory-common/location/shelf/shelf.service.mjs +0 -20
  78. package/esm2022/lib/inventory-common/low-stock-report.service.mjs +0 -23
  79. package/esm2022/lib/inventory-common/material.module.mjs +0 -172
  80. package/esm2022/lib/inventory-common/measure/measure-form/measure-form.component.mjs +0 -63
  81. package/esm2022/lib/inventory-common/measure/measure-list/measure-list.component.mjs +0 -75
  82. package/esm2022/lib/inventory-common/measure/measure-routing.module.mjs +0 -24
  83. package/esm2022/lib/inventory-common/measure/measure.module.mjs +0 -43
  84. package/esm2022/lib/inventory-common/measure/measure.service.mjs +0 -18
  85. package/esm2022/lib/inventory-common/product/low-stock-products-widget/low-stock-products-widget.component.mjs +0 -47
  86. package/esm2022/lib/inventory-common/product/low-stock-products-widget/low-stock-products-widget.module.mjs +0 -22
  87. package/esm2022/lib/inventory-common/product/product-basic-info/product-basic-info.component.mjs +0 -58
  88. package/esm2022/lib/inventory-common/product/product-batch-update-form/product-batch-update-form.component.mjs +0 -54
  89. package/esm2022/lib/inventory-common/product/product-delete-button/product-delete-button.component.mjs +0 -54
  90. package/esm2022/lib/inventory-common/product/product-form/product-form.component.mjs +0 -258
  91. package/esm2022/lib/inventory-common/product/product-form-button/product-form-button.component.mjs +0 -15
  92. package/esm2022/lib/inventory-common/product/product-form.service.mjs +0 -17
  93. package/esm2022/lib/inventory-common/product/product-import-page/product-import-page.component.mjs +0 -66
  94. package/esm2022/lib/inventory-common/product/product-list/product-list.component.mjs +0 -177
  95. package/esm2022/lib/inventory-common/product/product-location/product-location-list/product-location-list.component.mjs +0 -61
  96. package/esm2022/lib/inventory-common/product/product-measure-form/product-measure-form.component.mjs +0 -101
  97. package/esm2022/lib/inventory-common/product/product-measures-list/product-measures-list.component.mjs +0 -145
  98. package/esm2022/lib/inventory-common/product/product-nav-bar/product-nav-bar.component.mjs +0 -12
  99. package/esm2022/lib/inventory-common/product/product-quick-search/product-quick-search.component.mjs +0 -69
  100. package/esm2022/lib/inventory-common/product/product-routing.module.mjs +0 -68
  101. package/esm2022/lib/inventory-common/product/product-search/product-search.component.mjs +0 -151
  102. package/esm2022/lib/inventory-common/product/product-search/product-search.module.mjs +0 -39
  103. package/esm2022/lib/inventory-common/product/product-statistics.service.mjs +0 -23
  104. package/esm2022/lib/inventory-common/product/product-summary-chart/product-summary-chart.component.mjs +0 -57
  105. package/esm2022/lib/inventory-common/product/product-summary-chart/product-summary-chart.module.mjs +0 -18
  106. package/esm2022/lib/inventory-common/product/product-summary.service.mjs +0 -20
  107. package/esm2022/lib/inventory-common/product/product-view-page/product-view-page.component.mjs +0 -98
  108. package/esm2022/lib/inventory-common/product/product.module.mjs +0 -145
  109. package/esm2022/lib/inventory-common/product/product.service.mjs +0 -20
  110. package/esm2022/lib/inventory-common/product/widgets/product-category-badges/product-category-badges.component.mjs +0 -15
  111. package/esm2022/lib/inventory-common/product-batch.service.mjs +0 -20
  112. package/esm2022/lib/inventory-common/rating/rating-form/rating-form.component.mjs +0 -112
  113. package/esm2022/lib/inventory-common/rating/rating-form-button/rating-form-button.component.mjs +0 -45
  114. package/esm2022/lib/inventory-common/rating/rating-list/rating-list.component.mjs +0 -135
  115. package/esm2022/lib/inventory-common/rating/rating-routing.module.mjs +0 -23
  116. package/esm2022/lib/inventory-common/rating/rating.module.mjs +0 -22
  117. package/esm2022/lib/inventory-common/rating/rating.service.mjs +0 -18
  118. package/esm2022/lib/inventory-common/recipient/recipient-form/recipient-form.component.mjs +0 -59
  119. package/esm2022/lib/inventory-common/recipient/recipient-list/recipient-list.component.mjs +0 -49
  120. package/esm2022/lib/inventory-common/recipient/recipient-routing.module.mjs +0 -24
  121. package/esm2022/lib/inventory-common/recipient/recipient.module.mjs +0 -18
  122. package/esm2022/lib/inventory-common/recipient/recipient.service.mjs +0 -18
  123. package/esm2022/lib/inventory-common/reports/inventory-value-report/inventory-value-report.component.mjs +0 -152
  124. package/esm2022/lib/inventory-common/reports/low-stock-report/low-stock-report.component.mjs +0 -161
  125. package/esm2022/lib/inventory-common/reports/stock-issue-summary-report/stock-issue-product-data.service.mjs +0 -20
  126. package/esm2022/lib/inventory-common/reports/stock-issue-summary-report/stock-issue-summary-report.component.mjs +0 -98
  127. package/esm2022/lib/inventory-common/services/techlify-form-service.mjs +0 -11
  128. package/esm2022/lib/inventory-common/shared/export-to-excel-button/export-to-excel-button.component.mjs +0 -58
  129. package/esm2022/lib/inventory-common/shared.module.mjs +0 -67
  130. package/esm2022/lib/inventory-common/stock-allocation/stock-allocation-list/stock-allocation-list.component.mjs +0 -81
  131. package/esm2022/lib/inventory-common/stock-allocation/stock-allocation.service.mjs +0 -16
  132. package/esm2022/lib/inventory-common/stock-issue/stock-issue-form/stock-issue-form.component.mjs +0 -198
  133. package/esm2022/lib/inventory-common/stock-issue/stock-issue-import-page/stock-issue-import-page.component.mjs +0 -59
  134. package/esm2022/lib/inventory-common/stock-issue/stock-issue-list/stock-issue-list.component.mjs +0 -149
  135. package/esm2022/lib/inventory-common/stock-issue/stock-issue-page/stock-issue-page.component.mjs +0 -91
  136. package/esm2022/lib/inventory-common/stock-issue/stock-issue-page/stock-issue-page.module.mjs +0 -82
  137. package/esm2022/lib/inventory-common/stock-issue/stock-issue-product-form/stock-issue-product-form-button/stock-issue-product-form-button.component.mjs +0 -35
  138. package/esm2022/lib/inventory-common/stock-issue/stock-issue-product-form/stock-issue-product-form.component.mjs +0 -102
  139. package/esm2022/lib/inventory-common/stock-issue/stock-issue-product-view/stock-issue-product-view.component.mjs +0 -59
  140. package/esm2022/lib/inventory-common/stock-issue/stock-issue-product.service.mjs +0 -16
  141. package/esm2022/lib/inventory-common/stock-issue/stock-issue-products-list/stock-issue-products-list.component.mjs +0 -167
  142. package/esm2022/lib/inventory-common/stock-issue/stock-issue-routing.module.mjs +0 -51
  143. package/esm2022/lib/inventory-common/stock-issue/stock-issue-single-product-form/stock-issue-single-product-form.component.mjs +0 -201
  144. package/esm2022/lib/inventory-common/stock-issue/stock-issue-view/stock-issue-view.component.mjs +0 -64
  145. package/esm2022/lib/inventory-common/stock-issue/stock-issue.module.mjs +0 -47
  146. package/esm2022/lib/inventory-common/stock-issue/stock-issue.service.mjs +0 -18
  147. package/esm2022/lib/inventory-common/stock-receipts/stock-receipt-form/stock-receipt-form.component.mjs +0 -226
  148. package/esm2022/lib/inventory-common/stock-receipts/stock-receipt-import-page/stock-receipt-import-page.component.mjs +0 -74
  149. package/esm2022/lib/inventory-common/stock-receipts/stock-receipt-list/stock-receipt-list.component.mjs +0 -152
  150. package/esm2022/lib/inventory-common/stock-receipts/stock-receipt-product-form/stock-receipt-product-form-button/stock-receipt-product-form-button.component.mjs +0 -37
  151. package/esm2022/lib/inventory-common/stock-receipts/stock-receipt-product-form/stock-receipt-product-form.component.mjs +0 -80
  152. package/esm2022/lib/inventory-common/stock-receipts/stock-receipt-product-list/stock-receipt-product-list.component.mjs +0 -149
  153. package/esm2022/lib/inventory-common/stock-receipts/stock-receipt-product-view/stock-receipt-product-view.component.mjs +0 -59
  154. package/esm2022/lib/inventory-common/stock-receipts/stock-receipt-product.service.mjs +0 -18
  155. package/esm2022/lib/inventory-common/stock-receipts/stock-receipt-single-product-form/stock-receipt-simple-form/stock-receipt-single-product-form.component.mjs +0 -181
  156. package/esm2022/lib/inventory-common/stock-receipts/stock-receipt-view/stock-receipt-view.component.mjs +0 -54
  157. package/esm2022/lib/inventory-common/stock-receipts/stock-receipt.service.mjs +0 -18
  158. package/esm2022/lib/inventory-common/stock-receipts/stock-receipts-page/stock-receipts-page.component.mjs +0 -70
  159. package/esm2022/lib/inventory-common/stock-receipts/stock-receipts-routing.module.mjs +0 -52
  160. package/esm2022/lib/inventory-common/stock-receipts/stock-receipts.module.mjs +0 -104
  161. package/esm2022/lib/inventory-common/stock-summary.service.mjs +0 -26
  162. package/esm2022/lib/inventory-common/stock-transfer/stock-transfer-form/stock-transfer-form.component.mjs +0 -98
  163. package/esm2022/lib/inventory-common/stock-transfer/stock-transfer-list/stock-transfer-list.component.mjs +0 -139
  164. package/esm2022/lib/inventory-common/stock-transfer/stock-transfer.service.mjs +0 -18
  165. package/esm2022/lib/inventory-common/supplier/payee-selector/payee-selector/payee-selector.component.mjs +0 -59
  166. package/esm2022/lib/inventory-common/supplier/payee-selector/payee-selector.module.mjs +0 -21
  167. package/esm2022/lib/inventory-common/supplier/purchase-order/purchase-order-form/purchase-order-form.component.mjs +0 -156
  168. package/esm2022/lib/inventory-common/supplier/purchase-order/purchase-order-listing/purchase-order-listing.component.mjs +0 -67
  169. package/esm2022/lib/inventory-common/supplier/purchase-order/purchase-order-product-list/purchase-order-product-form/purchase-order-product-form.component.mjs +0 -74
  170. package/esm2022/lib/inventory-common/supplier/purchase-order/purchase-order-product-list/purchase-order-product-form-button/purchase-order-product-form-button.component.mjs +0 -38
  171. package/esm2022/lib/inventory-common/supplier/purchase-order/purchase-order-product-list/purchase-order-product-list.component.mjs +0 -61
  172. package/esm2022/lib/inventory-common/supplier/purchase-order/purchase-order-product-list/purchase-order-product.service.mjs +0 -20
  173. package/esm2022/lib/inventory-common/supplier/purchase-order/purchase-order-view/purchase-order-view.component.mjs +0 -64
  174. package/esm2022/lib/inventory-common/supplier/purchase-order/purchase-order.service.mjs +0 -20
  175. package/esm2022/lib/inventory-common/supplier/supplier-branch-delete-button/supplier-branch-delete-button.component.mjs +0 -63
  176. package/esm2022/lib/inventory-common/supplier/supplier-branch-form/supplier-branch-form-button/supplier-branch-form-button.component.mjs +0 -47
  177. package/esm2022/lib/inventory-common/supplier/supplier-branch-form/supplier-branch-form.component.mjs +0 -79
  178. package/esm2022/lib/inventory-common/supplier/supplier-branch.service.mjs +0 -18
  179. package/esm2022/lib/inventory-common/supplier/supplier-branches-list/supplier-branches-list.component.mjs +0 -79
  180. package/esm2022/lib/inventory-common/supplier/supplier-form/supplier-form.component.mjs +0 -94
  181. package/esm2022/lib/inventory-common/supplier/supplier-form/supplier-form.service.mjs +0 -17
  182. package/esm2022/lib/inventory-common/supplier/supplier-information/supplier-information.component.mjs +0 -73
  183. package/esm2022/lib/inventory-common/supplier/supplier-list/supplier-list.component.mjs +0 -68
  184. package/esm2022/lib/inventory-common/supplier/supplier-routing.module.mjs +0 -51
  185. package/esm2022/lib/inventory-common/supplier/supplier-type.service.mjs +0 -25
  186. package/esm2022/lib/inventory-common/supplier/supplier-view/supplier-view.component.mjs +0 -70
  187. package/esm2022/lib/inventory-common/supplier/supplier.component.mjs +0 -20
  188. package/esm2022/lib/inventory-common/supplier/supplier.module.mjs +0 -64
  189. package/esm2022/lib/inventory-common/supplier/supplier.service.mjs +0 -20
  190. package/esm2022/lib/inventory-common/techlify-filter/techlify-filter.component.mjs +0 -116
  191. package/esm2022/lib/inventory-common/techlify-filter/techlify-filter.module.mjs +0 -42
  192. package/esm2022/public-api.mjs +0 -71
  193. package/esm2022/techlify-inventory-common.mjs +0 -5
  194. package/fesm2022/techlify-inventory-common-category.module-oi41ku5U.mjs +0 -288
  195. package/fesm2022/techlify-inventory-common-category.module-oi41ku5U.mjs.map +0 -1
  196. package/fesm2022/techlify-inventory-common-purchase-order-view.component-DkWmMRaW.mjs +0 -227
  197. package/fesm2022/techlify-inventory-common-purchase-order-view.component-DkWmMRaW.mjs.map +0 -1
  198. package/fesm2022/techlify-inventory-common-recipient.module-v77bDJCC.mjs +0 -147
  199. package/fesm2022/techlify-inventory-common-recipient.module-v77bDJCC.mjs.map +0 -1
  200. package/fesm2022/techlify-inventory-common-stock-issue-form.component-ABIh_GkN.mjs +0 -199
  201. package/fesm2022/techlify-inventory-common-stock-issue-form.component-ABIh_GkN.mjs.map +0 -1
  202. package/fesm2022/techlify-inventory-common-stock-issue-product-view.component-3FB_GfyZ.mjs +0 -60
  203. package/fesm2022/techlify-inventory-common-stock-issue-product-view.component-3FB_GfyZ.mjs.map +0 -1
  204. package/fesm2022/techlify-inventory-common-stock-issue-view.component-D4AloV4G.mjs +0 -66
  205. package/fesm2022/techlify-inventory-common-stock-issue-view.component-D4AloV4G.mjs.map +0 -1
  206. package/fesm2022/techlify-inventory-common-techlify-inventory-common-B_42CQL_.mjs +0 -7218
  207. package/fesm2022/techlify-inventory-common-techlify-inventory-common-B_42CQL_.mjs.map +0 -1
  208. package/index.d.ts +0 -5
  209. package/lib/inventory-common/category/category-form/category-form.component.d.ts +0 -18
  210. package/lib/inventory-common/category/category-form-button/category-form-button.component.d.ts +0 -13
  211. package/lib/inventory-common/category/category-list-page/category-list-page.component.d.ts +0 -20
  212. package/lib/inventory-common/category/category-routing.module.d.ts +0 -7
  213. package/lib/inventory-common/category/category-view/category-view.component.d.ts +0 -16
  214. package/lib/inventory-common/category/category.module.d.ts +0 -20
  215. package/lib/inventory-common/category/category.service.d.ts +0 -7
  216. package/lib/inventory-common/incident/incident-form/incident-form.component.d.ts +0 -19
  217. package/lib/inventory-common/incident/incident-form-button/incident-form-button.component.d.ts +0 -15
  218. package/lib/inventory-common/incident/incident-list/incident-list.component.d.ts +0 -22
  219. package/lib/inventory-common/incident/incident-routing.module.d.ts +0 -7
  220. package/lib/inventory-common/incident/incident.module.d.ts +0 -8
  221. package/lib/inventory-common/incident/incident.service.d.ts +0 -7
  222. package/lib/inventory-common/inventory-common-routing.module.d.ts +0 -7
  223. package/lib/inventory-common/inventory-common.module.d.ts +0 -14
  224. package/lib/inventory-common/inventory-dashboard-page/inventory-dashboard-page.component.d.ts +0 -14
  225. package/lib/inventory-common/inventory-value-report.service.d.ts +0 -9
  226. package/lib/inventory-common/location/location-form/location-form.component.d.ts +0 -18
  227. package/lib/inventory-common/location/location-form-button/location-form-button.component.d.ts +0 -13
  228. package/lib/inventory-common/location/location-information/location-information.component.d.ts +0 -12
  229. package/lib/inventory-common/location/location-list/location-list.component.d.ts +0 -18
  230. package/lib/inventory-common/location/location-product-statistics/location-product-statistics.component.d.ts +0 -18
  231. package/lib/inventory-common/location/location-routing.module.d.ts +0 -7
  232. package/lib/inventory-common/location/location-status-changer/location-status-changer.component.d.ts +0 -17
  233. package/lib/inventory-common/location/location-view/location-view.component.d.ts +0 -16
  234. package/lib/inventory-common/location/location.module.d.ts +0 -8
  235. package/lib/inventory-common/location/location.service.d.ts +0 -15
  236. package/lib/inventory-common/location/shelf/shelf-form/shelf-form.component.d.ts +0 -18
  237. package/lib/inventory-common/location/shelf/shelf-form-button/shelf-form-button.component.d.ts +0 -13
  238. package/lib/inventory-common/location/shelf/shelf-list/shelf-list.component.d.ts +0 -19
  239. package/lib/inventory-common/location/shelf/shelf-routing.module.d.ts +0 -7
  240. package/lib/inventory-common/location/shelf/shelf.module.d.ts +0 -8
  241. package/lib/inventory-common/location/shelf/shelf.service.d.ts +0 -8
  242. package/lib/inventory-common/low-stock-report.service.d.ts +0 -10
  243. package/lib/inventory-common/material.module.d.ts +0 -40
  244. package/lib/inventory-common/measure/measure-form/measure-form.component.d.ts +0 -21
  245. package/lib/inventory-common/measure/measure-list/measure-list.component.d.ts +0 -19
  246. package/lib/inventory-common/measure/measure-routing.module.d.ts +0 -7
  247. package/lib/inventory-common/measure/measure.module.d.ts +0 -14
  248. package/lib/inventory-common/measure/measure.service.d.ts +0 -7
  249. package/lib/inventory-common/product/low-stock-products-widget/low-stock-products-widget.component.d.ts +0 -13
  250. package/lib/inventory-common/product/low-stock-products-widget/low-stock-products-widget.module.d.ts +0 -12
  251. package/lib/inventory-common/product/product-basic-info/product-basic-info.component.d.ts +0 -21
  252. package/lib/inventory-common/product/product-batch-update-form/product-batch-update-form.component.d.ts +0 -17
  253. package/lib/inventory-common/product/product-delete-button/product-delete-button.component.d.ts +0 -26
  254. package/lib/inventory-common/product/product-form/product-form.component.d.ts +0 -46
  255. package/lib/inventory-common/product/product-form-button/product-form-button.component.d.ts +0 -7
  256. package/lib/inventory-common/product/product-form.service.d.ts +0 -7
  257. package/lib/inventory-common/product/product-import-page/product-import-page.component.d.ts +0 -10
  258. package/lib/inventory-common/product/product-list/product-list.component.d.ts +0 -34
  259. package/lib/inventory-common/product/product-location/product-location-list/product-location-list.component.d.ts +0 -18
  260. package/lib/inventory-common/product/product-measure-form/product-measure-form.component.d.ts +0 -33
  261. package/lib/inventory-common/product/product-measures-list/product-measures-list.component.d.ts +0 -43
  262. package/lib/inventory-common/product/product-nav-bar/product-nav-bar.component.d.ts +0 -5
  263. package/lib/inventory-common/product/product-quick-search/product-quick-search.component.d.ts +0 -15
  264. package/lib/inventory-common/product/product-routing.module.d.ts +0 -7
  265. package/lib/inventory-common/product/product-search/product-search.component.d.ts +0 -48
  266. package/lib/inventory-common/product/product-search/product-search.module.d.ts +0 -13
  267. package/lib/inventory-common/product/product-statistics.service.d.ts +0 -9
  268. package/lib/inventory-common/product/product-summary-chart/product-summary-chart.component.d.ts +0 -15
  269. package/lib/inventory-common/product/product-summary-chart/product-summary-chart.module.d.ts +0 -10
  270. package/lib/inventory-common/product/product-summary.service.d.ts +0 -8
  271. package/lib/inventory-common/product/product-view-page/product-view-page.component.d.ts +0 -44
  272. package/lib/inventory-common/product/product.module.d.ts +0 -31
  273. package/lib/inventory-common/product/product.service.d.ts +0 -8
  274. package/lib/inventory-common/product/widgets/product-category-badges/product-category-badges.component.d.ts +0 -6
  275. package/lib/inventory-common/product-batch.service.d.ts +0 -8
  276. package/lib/inventory-common/rating/rating-form/rating-form.component.d.ts +0 -19
  277. package/lib/inventory-common/rating/rating-form-button/rating-form-button.component.d.ts +0 -15
  278. package/lib/inventory-common/rating/rating-list/rating-list.component.d.ts +0 -22
  279. package/lib/inventory-common/rating/rating-routing.module.d.ts +0 -7
  280. package/lib/inventory-common/rating/rating.module.d.ts +0 -8
  281. package/lib/inventory-common/rating/rating.service.d.ts +0 -7
  282. package/lib/inventory-common/recipient/recipient-form/recipient-form.component.d.ts +0 -21
  283. package/lib/inventory-common/recipient/recipient-list/recipient-list.component.d.ts +0 -16
  284. package/lib/inventory-common/recipient/recipient-routing.module.d.ts +0 -7
  285. package/lib/inventory-common/recipient/recipient.module.d.ts +0 -9
  286. package/lib/inventory-common/recipient/recipient.service.d.ts +0 -7
  287. package/lib/inventory-common/reports/inventory-value-report/inventory-value-report.component.d.ts +0 -27
  288. package/lib/inventory-common/reports/low-stock-report/low-stock-report.component.d.ts +0 -25
  289. package/lib/inventory-common/reports/stock-issue-summary-report/stock-issue-product-data.service.d.ts +0 -8
  290. package/lib/inventory-common/reports/stock-issue-summary-report/stock-issue-summary-report.component.d.ts +0 -25
  291. package/lib/inventory-common/services/techlify-form-service.d.ts +0 -5
  292. package/lib/inventory-common/shared/export-to-excel-button/export-to-excel-button.component.d.ts +0 -12
  293. package/lib/inventory-common/shared.module.d.ts +0 -13
  294. package/lib/inventory-common/stock-allocation/stock-allocation-list/stock-allocation-list.component.d.ts +0 -19
  295. package/lib/inventory-common/stock-allocation/stock-allocation.service.d.ts +0 -7
  296. package/lib/inventory-common/stock-issue/stock-issue-form/stock-issue-form.component.d.ts +0 -45
  297. package/lib/inventory-common/stock-issue/stock-issue-import-page/stock-issue-import-page.component.d.ts +0 -10
  298. package/lib/inventory-common/stock-issue/stock-issue-list/stock-issue-list.component.d.ts +0 -33
  299. package/lib/inventory-common/stock-issue/stock-issue-page/stock-issue-page.component.d.ts +0 -30
  300. package/lib/inventory-common/stock-issue/stock-issue-page/stock-issue-page.module.d.ts +0 -18
  301. package/lib/inventory-common/stock-issue/stock-issue-product-form/stock-issue-product-form-button/stock-issue-product-form-button.component.d.ts +0 -12
  302. package/lib/inventory-common/stock-issue/stock-issue-product-form/stock-issue-product-form.component.d.ts +0 -21
  303. package/lib/inventory-common/stock-issue/stock-issue-product-view/stock-issue-product-view.component.d.ts +0 -19
  304. package/lib/inventory-common/stock-issue/stock-issue-product.service.d.ts +0 -7
  305. package/lib/inventory-common/stock-issue/stock-issue-products-list/stock-issue-products-list.component.d.ts +0 -41
  306. package/lib/inventory-common/stock-issue/stock-issue-routing.module.d.ts +0 -7
  307. package/lib/inventory-common/stock-issue/stock-issue-single-product-form/stock-issue-single-product-form.component.d.ts +0 -42
  308. package/lib/inventory-common/stock-issue/stock-issue-view/stock-issue-view.component.d.ts +0 -19
  309. package/lib/inventory-common/stock-issue/stock-issue.module.d.ts +0 -14
  310. package/lib/inventory-common/stock-issue/stock-issue.service.d.ts +0 -7
  311. package/lib/inventory-common/stock-receipts/stock-receipt-form/stock-receipt-form.component.d.ts +0 -48
  312. package/lib/inventory-common/stock-receipts/stock-receipt-import-page/stock-receipt-import-page.component.d.ts +0 -10
  313. package/lib/inventory-common/stock-receipts/stock-receipt-list/stock-receipt-list.component.d.ts +0 -30
  314. package/lib/inventory-common/stock-receipts/stock-receipt-product-form/stock-receipt-product-form-button/stock-receipt-product-form-button.component.d.ts +0 -12
  315. package/lib/inventory-common/stock-receipts/stock-receipt-product-form/stock-receipt-product-form.component.d.ts +0 -17
  316. package/lib/inventory-common/stock-receipts/stock-receipt-product-list/stock-receipt-product-list.component.d.ts +0 -31
  317. package/lib/inventory-common/stock-receipts/stock-receipt-product-view/stock-receipt-product-view.component.d.ts +0 -19
  318. package/lib/inventory-common/stock-receipts/stock-receipt-product.service.d.ts +0 -7
  319. package/lib/inventory-common/stock-receipts/stock-receipt-single-product-form/stock-receipt-simple-form/stock-receipt-single-product-form.component.d.ts +0 -33
  320. package/lib/inventory-common/stock-receipts/stock-receipt-view/stock-receipt-view.component.d.ts +0 -19
  321. package/lib/inventory-common/stock-receipts/stock-receipt.service.d.ts +0 -7
  322. package/lib/inventory-common/stock-receipts/stock-receipts-page/stock-receipts-page.component.d.ts +0 -21
  323. package/lib/inventory-common/stock-receipts/stock-receipts-routing.module.d.ts +0 -7
  324. package/lib/inventory-common/stock-receipts/stock-receipts.module.d.ts +0 -22
  325. package/lib/inventory-common/stock-summary.service.d.ts +0 -14
  326. package/lib/inventory-common/stock-transfer/stock-transfer-form/stock-transfer-form.component.d.ts +0 -19
  327. package/lib/inventory-common/stock-transfer/stock-transfer-list/stock-transfer-list.component.d.ts +0 -28
  328. package/lib/inventory-common/stock-transfer/stock-transfer.service.d.ts +0 -7
  329. package/lib/inventory-common/supplier/payee-selector/payee-selector/payee-selector.component.d.ts +0 -20
  330. package/lib/inventory-common/supplier/payee-selector/payee-selector.module.d.ts +0 -11
  331. package/lib/inventory-common/supplier/purchase-order/purchase-order-form/purchase-order-form.component.d.ts +0 -30
  332. package/lib/inventory-common/supplier/purchase-order/purchase-order-listing/purchase-order-listing.component.d.ts +0 -16
  333. package/lib/inventory-common/supplier/purchase-order/purchase-order-product-list/purchase-order-product-form/purchase-order-product-form.component.d.ts +0 -16
  334. package/lib/inventory-common/supplier/purchase-order/purchase-order-product-list/purchase-order-product-form-button/purchase-order-product-form-button.component.d.ts +0 -12
  335. package/lib/inventory-common/supplier/purchase-order/purchase-order-product-list/purchase-order-product-list.component.d.ts +0 -15
  336. package/lib/inventory-common/supplier/purchase-order/purchase-order-product-list/purchase-order-product.service.d.ts +0 -8
  337. package/lib/inventory-common/supplier/purchase-order/purchase-order-view/purchase-order-view.component.d.ts +0 -19
  338. package/lib/inventory-common/supplier/purchase-order/purchase-order.service.d.ts +0 -8
  339. package/lib/inventory-common/supplier/supplier-branch-delete-button/supplier-branch-delete-button.component.d.ts +0 -18
  340. package/lib/inventory-common/supplier/supplier-branch-form/supplier-branch-form-button/supplier-branch-form-button.component.d.ts +0 -13
  341. package/lib/inventory-common/supplier/supplier-branch-form/supplier-branch-form.component.d.ts +0 -22
  342. package/lib/inventory-common/supplier/supplier-branch.service.d.ts +0 -7
  343. package/lib/inventory-common/supplier/supplier-branches-list/supplier-branches-list.component.d.ts +0 -18
  344. package/lib/inventory-common/supplier/supplier-form/supplier-form.component.d.ts +0 -25
  345. package/lib/inventory-common/supplier/supplier-form/supplier-form.service.d.ts +0 -7
  346. package/lib/inventory-common/supplier/supplier-information/supplier-information.component.d.ts +0 -18
  347. package/lib/inventory-common/supplier/supplier-list/supplier-list.component.d.ts +0 -20
  348. package/lib/inventory-common/supplier/supplier-routing.module.d.ts +0 -7
  349. package/lib/inventory-common/supplier/supplier-type.service.d.ts +0 -13
  350. package/lib/inventory-common/supplier/supplier-view/supplier-view.component.d.ts +0 -20
  351. package/lib/inventory-common/supplier/supplier.component.d.ts +0 -10
  352. package/lib/inventory-common/supplier/supplier.module.d.ts +0 -20
  353. package/lib/inventory-common/supplier/supplier.service.d.ts +0 -8
  354. package/lib/inventory-common/techlify-filter/techlify-filter.component.d.ts +0 -31
  355. package/lib/inventory-common/techlify-filter/techlify-filter.module.d.ts +0 -12
  356. package/public-api.d.ts +0 -67
@@ -0,0 +1,486 @@
1
+ import { t as SharedModule } from "./techlify-inventory-common-shared.module-DP-FVqea.mjs";
2
+ import { t as StockIssueService } from "./techlify-inventory-common-stock-issue.service-CLHasWVp.mjs";
3
+ import { t as LocationService } from "./techlify-inventory-common-location.service-C99J8Lje.mjs";
4
+ import * as i0 from "@angular/core";
5
+ import { ChangeDetectionStrategy, Component, signal } from "@angular/core";
6
+ import * as i4 from "@angular/router";
7
+ import moment from "moment";
8
+ import * as i1 from "ngx-techlify-core";
9
+ import { FormConfigurationUtilityService, TechlifyFormComponent } from "ngx-techlify-core";
10
+ import * as i11 from "@angular/material/icon";
11
+ import * as i8 from "@angular/material/card";
12
+ import * as i2 from "@angular/forms";
13
+ import { Validators } from "@angular/forms";
14
+ import * as i7 from "@angular/material/button";
15
+ import * as i10 from "@angular/material/form-field";
16
+ import * as i12 from "@angular/material/input";
17
+ import * as i13 from "@angular/material/tooltip";
18
+ import * as i9 from "@angular/material/datepicker";
19
+ import * as i6 from "@angular/common";
20
+ var StockIssueFormComponent = class StockIssueFormComponent extends TechlifyFormComponent {
21
+ formValidatorService;
22
+ fb;
23
+ stockIssueService;
24
+ route;
25
+ locationService;
26
+ location;
27
+ formConfigService;
28
+ locationCount = signal(0, ...ngDevMode ? [{ debugName: "locationCount" }] : /* istanbul ignore next */ []);
29
+ stockIssue = signal(null, ...ngDevMode ? [{ debugName: "stockIssue" }] : /* istanbul ignore next */ []);
30
+ issuableData = signal(null, ...ngDevMode ? [{ debugName: "issuableData" }] : /* istanbul ignore next */ []);
31
+ formConfigurationUtilityService;
32
+ constructor(formValidatorService, fb, stockIssueService, route, locationService, location, formConfigService) {
33
+ super(formValidatorService);
34
+ this.formValidatorService = formValidatorService;
35
+ this.fb = fb;
36
+ this.stockIssueService = stockIssueService;
37
+ this.route = route;
38
+ this.locationService = locationService;
39
+ this.location = location;
40
+ this.formConfigService = formConfigService;
41
+ this.formConfigurationUtilityService = new FormConfigurationUtilityService();
42
+ this.errorMessages = {
43
+ date: { required: "The date field is required." },
44
+ recipient_id: { required: "Please select a recipient." }
45
+ };
46
+ this.form = this.fb.group({
47
+ date: [/* @__PURE__ */ new Date(), Validators.compose([Validators.required])],
48
+ particulars: [""],
49
+ recipient_id: [""],
50
+ stock_issue_products: this.fb.array([])
51
+ });
52
+ }
53
+ ngOnInit() {
54
+ this.locationService.count().subscribe((count) => {
55
+ this.locationCount.set(count);
56
+ });
57
+ this.formConfigurationUtilityService.initialize(this.formConfigService, "stock-issue").subscribe({ next: () => {
58
+ this.form.get("recipient_id")?.setValidators(this.formConfigurationUtilityService.getFieldRequired("recipient_id") ? Validators.required : null);
59
+ this.form.get("recipient_id")?.updateValueAndValidity();
60
+ } });
61
+ const id = this.route.snapshot.paramMap.get("id");
62
+ if (id) this.loadStockIssue(+id);
63
+ else this.addStockIssueProduct();
64
+ this.route.queryParams.subscribe({ next: (params) => {
65
+ this.issuableData.set({
66
+ issuable_type: params["issuable_type"],
67
+ issuable_id: params["issuable_id"]
68
+ });
69
+ } });
70
+ }
71
+ loadStockIssue(id) {
72
+ this.isWorking = true;
73
+ this.stockIssueService.show(id, { with: "stockIssueProducts.product,stockIssueProducts.location" }).subscribe({
74
+ next: (response) => {
75
+ this.isWorking = false;
76
+ this.stockIssue.set(response.item);
77
+ },
78
+ error: () => {
79
+ this.isWorking = false;
80
+ },
81
+ complete: () => {
82
+ const issue = this.stockIssue();
83
+ this.form.patchValue({
84
+ date: issue.date ? new Date(issue.date) : /* @__PURE__ */ new Date(),
85
+ particulars: issue.details,
86
+ recipient_id: issue.recipient_id
87
+ });
88
+ this.stockIssueProducts.clear();
89
+ issue.stock_issue_products?.forEach((sip) => {
90
+ const group = this.createStockIssueProduct();
91
+ group.patchValue({
92
+ id: sip.id,
93
+ product_id: sip.product_id,
94
+ location_from_id: sip.location_from_id,
95
+ quantity: sip.quantity,
96
+ particulars: sip.particulars
97
+ });
98
+ this.stockIssueProducts.push(group);
99
+ });
100
+ }
101
+ });
102
+ }
103
+ get stockIssueProducts() {
104
+ return this.form.get("stock_issue_products");
105
+ }
106
+ getSelectedLocation(index) {
107
+ return this.stockIssue()?.stock_issue_products?.find((sip) => sip.id === this.stockIssueProducts.at(index)?.get("id")?.value)?.location;
108
+ }
109
+ createStockIssueProduct() {
110
+ return this.fb.group({
111
+ id: [""],
112
+ product_id: ["", Validators.required],
113
+ location_from_id: ["", this.locationCount() > 0 ? Validators.required : null],
114
+ quantity: [0, [Validators.required, Validators.min(0)]],
115
+ particulars: [""],
116
+ issuable_id: [this.issuableData()?.issuable_id ?? ""],
117
+ issuable_type: [this.issuableData()?.issuable_type ?? ""]
118
+ });
119
+ }
120
+ addStockIssueProduct() {
121
+ this.stockIssueProducts.push(this.createStockIssueProduct());
122
+ }
123
+ removeStockIssueProduct(index) {
124
+ this.stockIssueProducts.removeAt(index);
125
+ }
126
+ clearProducts() {
127
+ this.stockIssueProducts.clear();
128
+ }
129
+ save() {
130
+ if (this.form.invalid) {
131
+ this.form.markAllAsTouched();
132
+ this.form.markAsDirty();
133
+ this.alertService.addAlert("Please check the form for errors.", "error");
134
+ return;
135
+ }
136
+ if (this.stockIssueProducts.length === 0) {
137
+ this.alertService.addAlert("Please add at least one product.", "error");
138
+ return;
139
+ }
140
+ const formData = this.form.getRawValue();
141
+ const data = {
142
+ id: this.stockIssue()?.id ?? null,
143
+ date: moment(formData.date).format("YYYY-MM-DD"),
144
+ details: formData.particulars,
145
+ recipient_id: formData.recipient_id || null,
146
+ products: formData.stock_issue_products.map((row) => ({
147
+ id: row.product_id,
148
+ product_id: row.product_id,
149
+ quantity: row.quantity,
150
+ location_from_id: row.location_from_id,
151
+ particulars: row.particulars,
152
+ issuable_id: row.issuable_id,
153
+ issuable_type: row.issuable_type
154
+ }))
155
+ };
156
+ this.isWorking = true;
157
+ (this.stockIssue()?.id ? this.stockIssueService.update(data) : this.stockIssueService.store(data)).subscribe({
158
+ next: () => {
159
+ this.isWorking = false;
160
+ this.alertService.addAlert("Stock issues saved successfully!", "success");
161
+ this.location.back();
162
+ },
163
+ error: () => {
164
+ this.isWorking = false;
165
+ }
166
+ });
167
+ }
168
+ cancel() {
169
+ this.location.back();
170
+ }
171
+ static ɵfac = i0.ɵɵngDeclareFactory({
172
+ minVersion: "12.0.0",
173
+ version: "22.2.5",
174
+ ngImport: i0,
175
+ type: StockIssueFormComponent,
176
+ deps: [
177
+ { token: i1.FormValidatorService },
178
+ { token: i2.FormBuilder },
179
+ { token: StockIssueService },
180
+ { token: i4.ActivatedRoute },
181
+ { token: LocationService },
182
+ { token: i6.Location },
183
+ { token: i1.FormConfigurationFormService }
184
+ ],
185
+ target: i0.ɵɵFactoryTarget.Component
186
+ });
187
+ static ɵcmp = i0.ɵɵngDeclareComponent({
188
+ minVersion: "17.0.0",
189
+ version: "22.2.5",
190
+ type: StockIssueFormComponent,
191
+ isStandalone: true,
192
+ selector: "app-stock-issue-form",
193
+ usesInheritance: true,
194
+ ngImport: i0,
195
+ template: "<mat-card class=\"d-flex flex-column gap-2 container\">\n <mat-card-content>\n\n <div class=\"d-flex flex-row justify-content-between align-items-center gap-1\">\n <h5>\n <span class=\"material-symbols-outlined align-middle\">upload</span>\n Issue Stock\n </h5>\n <app-form-configuration-for-form formCode=\"stock-issue\"></app-form-configuration-for-form>\n </div>\n\n <form class=\"d-flex flex-column gap-2\" [formGroup]=\"form\" (submit)=\"save()\">\n\n <div class=\"d-flex flex-column\">\n <div class=\"d-flex flex-row gap-2 justify-content-between\">\n <mat-form-field appearance='outline' class=\"w-100\">\n <mat-label>Date</mat-label>\n <input matInput [matDatepicker]=\"picker\" placeholder=\"Date\" formControlName=\"date\" required>\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n @if (isFieldValid('date')) {\n <mat-error>{{ getErrorMessage('date') }}</mat-error>\n }\n </mat-form-field>\n\n @if (formConfigurationUtilityService.getFieldEnabled('recipient_id'))\n {\n <mat-form-field appearance='outline' class=\"w-100\">\n <mat-label>Recipient @if\n (formConfigurationUtilityService.getFieldRequired('recipient_id'))\n {\n <sup>*</sup>\n }\n </mat-label>\n <app-searchable-selector apiUrl=\"api/recipients\" formControlName=\"recipient_id\"\n titleField=\"name\"></app-searchable-selector>\n @if (isFieldValid('recipient_id')) {\n <mat-error>{{ getErrorMessage('recipient_id')\n }}</mat-error>\n }\n </mat-form-field>\n }\n\n <mat-form-field appearance='outline' class=\"w-100\">\n <mat-label>Particulars</mat-label>\n <textarea matInput placeholder=\"Particulars\" formControlName=\"particulars\"></textarea>\n </mat-form-field>\n </div>\n </div>\n\n <table class=\"table mt-3\">\n <thead>\n <tr>\n <th scope=\"col\">#</th>\n <th scope=\"col\">Product</th>\n @if (locationCount() > 0) {\n <th scope=\"col\">Location From</th>\n }\n <th scope=\"col\" width=\"45\">Quantity</th>\n <th scope=\"col\">Particulars</th>\n <th scope=\"col\" class=\"text-center\" width=\"50\"></th>\n </tr>\n </thead>\n <tbody formArrayName=\"stock_issue_products\">\n @for (row of stockIssueProducts.controls; track row; let i = $index) {\n <tr [formGroupName]=\"i\">\n <th scope=\"row\">{{ i + 1 }}</th>\n <td>\n <mat-form-field appearance='outline' class=\"w-100\">\n <mat-label>Product</mat-label>\n <app-searchable-selector apiUrl='api/products' formControlName=\"product_id\"\n titleField='name' [cache]=\"true\" required></app-searchable-selector>\n </mat-form-field>\n </td>\n @if (locationCount() > 0) {\n <td>\n <mat-form-field appearance='outline' class=\"w-100\">\n <mat-label>Location From</mat-label>\n <app-searchable-selector apiUrl='api/inventory-locations?status_ids=1'\n formControlName=\"location_from_id\" titleField='title'\n [selectedValue]=\"getSelectedLocation(i)\"></app-searchable-selector>\n <mat-hint>Which warehouse are we taking stock from?</mat-hint>\n </mat-form-field>\n </td>\n }\n <td>\n <mat-form-field appearance='outline' class=\"wpx-90\">\n <mat-label>Quantity</mat-label>\n <input matInput formControlName=\"quantity\" type=\"number\" min=\"0\">\n </mat-form-field>\n </td>\n <td>\n <mat-form-field appearance='outline' class='w-100'>\n <mat-label>Particulars</mat-label>\n <textarea matInput formControlName=\"particulars\" rows=\"2\"></textarea>\n </mat-form-field>\n </td>\n <td class=\"text-center align-middle\">\n <div class=\"d-flex gap-2 justify-content-center align-items-center text-secondary\">\n <app-techlify-icon role='button' name='delete' (click)=\"removeStockIssueProduct(i)\"\n matTooltip=\"Remove row\"></app-techlify-icon>\n </div>\n </td>\n </tr>\n }\n </tbody>\n <tfoot>\n <tr>\n <td colspan=\"6\" class=\"text-end\">\n <div class=\"d-flex flex-row gap-2 justify-content-end\">\n <button mat-button color=\"primary\" type=\"button\" (click)=\"clearProducts()\"\n [disabled]=\"stockIssueProducts.length === 0\">\n <mat-icon>block</mat-icon> CLEAR ALL\n </button>\n <button mat-raised-button color=\"primary\" type=\"button\"\n (click)=\"addStockIssueProduct()\">\n <mat-icon>add</mat-icon> ADD\n </button>\n </div>\n </td>\n </tr>\n </tfoot>\n </table>\n\n <div class=\"d-flex justify-content-end align-items-center gap-2 mt-2\">\n <button [disabled]=\"isWorking\" mat-flat-button type=\"button\" (click)=\"cancel()\">Cancel</button>\n <button [disabled]=\"isWorking || stockIssueProducts.length === 0\" mat-raised-button color=\"primary\"\n type=\"submit\">Save</button>\n </div>\n\n </form>\n\n </mat-card-content>\n</mat-card>",
196
+ dependencies: [
197
+ {
198
+ kind: "ngmodule",
199
+ type: SharedModule
200
+ },
201
+ {
202
+ kind: "component",
203
+ type: i1.FormConfigurationForFormComponent,
204
+ selector: "app-form-configuration-for-form",
205
+ inputs: ["formCode"]
206
+ },
207
+ {
208
+ kind: "component",
209
+ type: i7.MatButton,
210
+ selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ",
211
+ inputs: ["matButton"],
212
+ exportAs: ["matButton", "matAnchor"]
213
+ },
214
+ {
215
+ kind: "component",
216
+ type: i8.MatCard,
217
+ selector: "mat-card",
218
+ inputs: ["appearance"],
219
+ exportAs: ["matCard"]
220
+ },
221
+ {
222
+ kind: "directive",
223
+ type: i8.MatCardContent,
224
+ selector: "mat-card-content"
225
+ },
226
+ {
227
+ kind: "component",
228
+ type: i9.MatDatepicker,
229
+ selector: "mat-datepicker",
230
+ exportAs: ["matDatepicker"]
231
+ },
232
+ {
233
+ kind: "directive",
234
+ type: i9.MatDatepickerInput,
235
+ selector: "input[matDatepicker]",
236
+ inputs: [
237
+ "matDatepicker",
238
+ "min",
239
+ "max",
240
+ "matDatepickerFilter"
241
+ ],
242
+ exportAs: ["matDatepickerInput"]
243
+ },
244
+ {
245
+ kind: "component",
246
+ type: i9.MatDatepickerToggle,
247
+ selector: "mat-datepicker-toggle",
248
+ inputs: [
249
+ "for",
250
+ "tabIndex",
251
+ "aria-label",
252
+ "disabled",
253
+ "disableRipple"
254
+ ],
255
+ exportAs: ["matDatepickerToggle"]
256
+ },
257
+ {
258
+ kind: "component",
259
+ type: i10.MatFormField,
260
+ selector: "mat-form-field",
261
+ inputs: [
262
+ "hideRequiredMarker",
263
+ "color",
264
+ "floatLabel",
265
+ "appearance",
266
+ "subscriptSizing",
267
+ "hintLabel"
268
+ ],
269
+ exportAs: ["matFormField"]
270
+ },
271
+ {
272
+ kind: "directive",
273
+ type: i10.MatLabel,
274
+ selector: "mat-label"
275
+ },
276
+ {
277
+ kind: "directive",
278
+ type: i10.MatHint,
279
+ selector: "mat-hint",
280
+ inputs: ["align", "id"]
281
+ },
282
+ {
283
+ kind: "directive",
284
+ type: i10.MatError,
285
+ selector: "mat-error, [matError]",
286
+ inputs: ["id"]
287
+ },
288
+ {
289
+ kind: "directive",
290
+ type: i10.MatSuffix,
291
+ selector: "[matSuffix], [matIconSuffix], [matTextSuffix]",
292
+ inputs: ["matTextSuffix"]
293
+ },
294
+ {
295
+ kind: "component",
296
+ type: i11.MatIcon,
297
+ selector: "mat-icon",
298
+ inputs: [
299
+ "color",
300
+ "inline",
301
+ "svgIcon",
302
+ "fontSet",
303
+ "fontIcon"
304
+ ],
305
+ exportAs: ["matIcon"]
306
+ },
307
+ {
308
+ kind: "directive",
309
+ type: i12.MatInput,
310
+ selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]",
311
+ inputs: [
312
+ "disabled",
313
+ "id",
314
+ "placeholder",
315
+ "name",
316
+ "required",
317
+ "type",
318
+ "errorStateMatcher",
319
+ "aria-describedby",
320
+ "value",
321
+ "readonly",
322
+ "disabledInteractive"
323
+ ],
324
+ exportAs: ["matInput"]
325
+ },
326
+ {
327
+ kind: "directive",
328
+ type: i13.MatTooltip,
329
+ selector: "[matTooltip]",
330
+ inputs: [
331
+ "matTooltipPosition",
332
+ "matTooltipPositionAtOrigin",
333
+ "matTooltipDisabled",
334
+ "matTooltipShowDelay",
335
+ "matTooltipHideDelay",
336
+ "matTooltipTouchGestures",
337
+ "matTooltip",
338
+ "matTooltipClass"
339
+ ],
340
+ exportAs: ["matTooltip"]
341
+ },
342
+ {
343
+ kind: "directive",
344
+ type: i2.ɵNgNoValidate,
345
+ selector: "form:not([ngNoForm]):not([ngNativeValidate])"
346
+ },
347
+ {
348
+ kind: "directive",
349
+ type: i2.DefaultValueAccessor,
350
+ selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]"
351
+ },
352
+ {
353
+ kind: "directive",
354
+ type: i2.NumberValueAccessor,
355
+ selector: "input[type=number]:not([ngNoCva])[formControlName],input[type=number]:not([ngNoCva])[formControl],input[type=number]:not([ngNoCva])[ngModel]"
356
+ },
357
+ {
358
+ kind: "directive",
359
+ type: i2.NgControlStatus,
360
+ selector: "[formControlName],[ngModel],[formControl]"
361
+ },
362
+ {
363
+ kind: "directive",
364
+ type: i2.NgControlStatusGroup,
365
+ selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]"
366
+ },
367
+ {
368
+ kind: "directive",
369
+ type: i2.RequiredValidator,
370
+ selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]",
371
+ inputs: ["required"]
372
+ },
373
+ {
374
+ kind: "directive",
375
+ type: i2.MinValidator,
376
+ selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]",
377
+ inputs: ["min"]
378
+ },
379
+ {
380
+ kind: "directive",
381
+ type: i2.FormGroupDirective,
382
+ selector: "[formGroup]",
383
+ inputs: ["formGroup"],
384
+ outputs: ["ngSubmit"],
385
+ exportAs: ["ngForm"]
386
+ },
387
+ {
388
+ kind: "directive",
389
+ type: i2.FormControlName,
390
+ selector: "[formControlName]",
391
+ inputs: [
392
+ "formControlName",
393
+ "disabled",
394
+ "ngModel"
395
+ ],
396
+ outputs: ["ngModelChange"]
397
+ },
398
+ {
399
+ kind: "directive",
400
+ type: i2.FormGroupName,
401
+ selector: "[formGroupName]",
402
+ inputs: ["formGroupName"]
403
+ },
404
+ {
405
+ kind: "directive",
406
+ type: i2.FormArrayName,
407
+ selector: "[formArrayName]",
408
+ inputs: ["formArrayName"]
409
+ },
410
+ {
411
+ kind: "component",
412
+ type: i1.SearchableSelectorComponent,
413
+ selector: "app-searchable-selector",
414
+ inputs: [
415
+ "valueField",
416
+ "titleField",
417
+ "subtitleField",
418
+ "apiUrl",
419
+ "multiple",
420
+ "selectedValue",
421
+ "enableSearch",
422
+ "add",
423
+ "addConfig",
424
+ "edit",
425
+ "editConfig",
426
+ "sort",
427
+ "sortBy",
428
+ "searchField",
429
+ "itemComponent",
430
+ "items",
431
+ "apiDataProperty",
432
+ "cache",
433
+ "perPage",
434
+ "inDataSearch",
435
+ "panelWidth",
436
+ "focusSearchOnOpen",
437
+ "isEmitInitialEvent",
438
+ "required",
439
+ "disabled",
440
+ "value"
441
+ ],
442
+ outputs: [
443
+ "selectedValueChange",
444
+ "selectionChange",
445
+ "itemsChange",
446
+ "isItemsEmpty"
447
+ ]
448
+ },
449
+ {
450
+ kind: "component",
451
+ type: i1.TechlifyIconComponent,
452
+ selector: "app-techlify-icon",
453
+ inputs: ["name", "size"]
454
+ }
455
+ ],
456
+ changeDetection: i0.ChangeDetectionStrategy.Eager,
457
+ preserveWhitespaces: true
458
+ });
459
+ };
460
+ i0.ɵɵngDeclareClassMetadata({
461
+ minVersion: "12.0.0",
462
+ version: "22.2.5",
463
+ ngImport: i0,
464
+ type: StockIssueFormComponent,
465
+ decorators: [{
466
+ type: Component,
467
+ args: [{
468
+ selector: "app-stock-issue-form",
469
+ changeDetection: ChangeDetectionStrategy.Eager,
470
+ imports: [SharedModule],
471
+ template: "<mat-card class=\"d-flex flex-column gap-2 container\">\n <mat-card-content>\n\n <div class=\"d-flex flex-row justify-content-between align-items-center gap-1\">\n <h5>\n <span class=\"material-symbols-outlined align-middle\">upload</span>\n Issue Stock\n </h5>\n <app-form-configuration-for-form formCode=\"stock-issue\"></app-form-configuration-for-form>\n </div>\n\n <form class=\"d-flex flex-column gap-2\" [formGroup]=\"form\" (submit)=\"save()\">\n\n <div class=\"d-flex flex-column\">\n <div class=\"d-flex flex-row gap-2 justify-content-between\">\n <mat-form-field appearance='outline' class=\"w-100\">\n <mat-label>Date</mat-label>\n <input matInput [matDatepicker]=\"picker\" placeholder=\"Date\" formControlName=\"date\" required>\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n @if (isFieldValid('date')) {\n <mat-error>{{ getErrorMessage('date') }}</mat-error>\n }\n </mat-form-field>\n\n @if (formConfigurationUtilityService.getFieldEnabled('recipient_id'))\n {\n <mat-form-field appearance='outline' class=\"w-100\">\n <mat-label>Recipient @if\n (formConfigurationUtilityService.getFieldRequired('recipient_id'))\n {\n <sup>*</sup>\n }\n </mat-label>\n <app-searchable-selector apiUrl=\"api/recipients\" formControlName=\"recipient_id\"\n titleField=\"name\"></app-searchable-selector>\n @if (isFieldValid('recipient_id')) {\n <mat-error>{{ getErrorMessage('recipient_id')\n }}</mat-error>\n }\n </mat-form-field>\n }\n\n <mat-form-field appearance='outline' class=\"w-100\">\n <mat-label>Particulars</mat-label>\n <textarea matInput placeholder=\"Particulars\" formControlName=\"particulars\"></textarea>\n </mat-form-field>\n </div>\n </div>\n\n <table class=\"table mt-3\">\n <thead>\n <tr>\n <th scope=\"col\">#</th>\n <th scope=\"col\">Product</th>\n @if (locationCount() > 0) {\n <th scope=\"col\">Location From</th>\n }\n <th scope=\"col\" width=\"45\">Quantity</th>\n <th scope=\"col\">Particulars</th>\n <th scope=\"col\" class=\"text-center\" width=\"50\"></th>\n </tr>\n </thead>\n <tbody formArrayName=\"stock_issue_products\">\n @for (row of stockIssueProducts.controls; track row; let i = $index) {\n <tr [formGroupName]=\"i\">\n <th scope=\"row\">{{ i + 1 }}</th>\n <td>\n <mat-form-field appearance='outline' class=\"w-100\">\n <mat-label>Product</mat-label>\n <app-searchable-selector apiUrl='api/products' formControlName=\"product_id\"\n titleField='name' [cache]=\"true\" required></app-searchable-selector>\n </mat-form-field>\n </td>\n @if (locationCount() > 0) {\n <td>\n <mat-form-field appearance='outline' class=\"w-100\">\n <mat-label>Location From</mat-label>\n <app-searchable-selector apiUrl='api/inventory-locations?status_ids=1'\n formControlName=\"location_from_id\" titleField='title'\n [selectedValue]=\"getSelectedLocation(i)\"></app-searchable-selector>\n <mat-hint>Which warehouse are we taking stock from?</mat-hint>\n </mat-form-field>\n </td>\n }\n <td>\n <mat-form-field appearance='outline' class=\"wpx-90\">\n <mat-label>Quantity</mat-label>\n <input matInput formControlName=\"quantity\" type=\"number\" min=\"0\">\n </mat-form-field>\n </td>\n <td>\n <mat-form-field appearance='outline' class='w-100'>\n <mat-label>Particulars</mat-label>\n <textarea matInput formControlName=\"particulars\" rows=\"2\"></textarea>\n </mat-form-field>\n </td>\n <td class=\"text-center align-middle\">\n <div class=\"d-flex gap-2 justify-content-center align-items-center text-secondary\">\n <app-techlify-icon role='button' name='delete' (click)=\"removeStockIssueProduct(i)\"\n matTooltip=\"Remove row\"></app-techlify-icon>\n </div>\n </td>\n </tr>\n }\n </tbody>\n <tfoot>\n <tr>\n <td colspan=\"6\" class=\"text-end\">\n <div class=\"d-flex flex-row gap-2 justify-content-end\">\n <button mat-button color=\"primary\" type=\"button\" (click)=\"clearProducts()\"\n [disabled]=\"stockIssueProducts.length === 0\">\n <mat-icon>block</mat-icon> CLEAR ALL\n </button>\n <button mat-raised-button color=\"primary\" type=\"button\"\n (click)=\"addStockIssueProduct()\">\n <mat-icon>add</mat-icon> ADD\n </button>\n </div>\n </td>\n </tr>\n </tfoot>\n </table>\n\n <div class=\"d-flex justify-content-end align-items-center gap-2 mt-2\">\n <button [disabled]=\"isWorking\" mat-flat-button type=\"button\" (click)=\"cancel()\">Cancel</button>\n <button [disabled]=\"isWorking || stockIssueProducts.length === 0\" mat-raised-button color=\"primary\"\n type=\"submit\">Save</button>\n </div>\n\n </form>\n\n </mat-card-content>\n</mat-card>"
472
+ }]
473
+ }],
474
+ ctorParameters: () => [
475
+ { type: i1.FormValidatorService },
476
+ { type: i2.FormBuilder },
477
+ { type: StockIssueService },
478
+ { type: i4.ActivatedRoute },
479
+ { type: LocationService },
480
+ { type: i6.Location },
481
+ { type: i1.FormConfigurationFormService }
482
+ ]
483
+ });
484
+ export { StockIssueFormComponent };
485
+
486
+ //# sourceMappingURL=techlify-inventory-common-stock-issue-form.component-DfgbqIKn.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"techlify-inventory-common-stock-issue-form.component-DfgbqIKn.mjs","names":["i3.StockIssueService","i5.LocationService"],"sources":["../../../projects/inventory-common/src/lib/inventory-common/stock-issue/stock-issue-form/stock-issue-form.component.ts","../../../projects/inventory-common/src/lib/inventory-common/stock-issue/stock-issue-form/stock-issue-form.component.html"],"sourcesContent":["import { Component, OnInit, signal, ChangeDetectionStrategy } from \"@angular/core\";\nimport { FormArray, FormBuilder, Validators } from '@angular/forms';\nimport {\n FormConfigurationFormService,\n FormConfigurationUtilityService,\n FormValidatorService,\n TechlifyFormComponent\n} from \"ngx-techlify-core\";\nimport { Location } from '@angular/common';\nimport { StockIssueService } from '../stock-issue.service';\nimport { ActivatedRoute } from '@angular/router';\nimport moment from 'moment';\nimport { LocationService } from '../../location/location.service';\nimport { SharedModule } from \"../../shared.module\";\n\n@Component({\n selector: 'app-stock-issue-form',\n templateUrl: './stock-issue-form.component.html',\n changeDetection: ChangeDetectionStrategy.Eager,\n imports: [\n SharedModule,\n ]\n})\n\nexport class StockIssueFormComponent extends TechlifyFormComponent implements OnInit {\n\n locationCount = signal<number>(0);\n stockIssue = signal<any>(null);\n\n issuableData = signal<{\n issuable_type: String,\n issuable_id: number\n } | null>(null)\n\n public formConfigurationUtilityService: FormConfigurationUtilityService;\n\n constructor(protected override formValidatorService: FormValidatorService,\n private fb: FormBuilder,\n private stockIssueService: StockIssueService,\n private route: ActivatedRoute,\n private locationService: LocationService,\n private location: Location,\n private formConfigService: FormConfigurationFormService\n ) {\n super(formValidatorService);\n\n this.formConfigurationUtilityService = new FormConfigurationUtilityService();\n\n this.errorMessages = {\n date: {\n required: 'The date field is required.',\n },\n recipient_id: {\n required: 'Please select a recipient.',\n },\n };\n\n this.form = this.fb.group({\n date: [new Date(), Validators.compose([Validators.required])],\n particulars: [''],\n recipient_id: [''],\n stock_issue_products: this.fb.array([])\n });\n }\n\n ngOnInit(): void {\n this.locationService.count().subscribe((count: number) => {\n this.locationCount.set(count);\n });\n\n this.formConfigurationUtilityService.initialize(this.formConfigService, 'stock-issue').subscribe({\n next: () => {\n this.form.get('recipient_id')?.setValidators(\n this.formConfigurationUtilityService.getFieldRequired('recipient_id') ? Validators.required : null\n );\n this.form.get('recipient_id')?.updateValueAndValidity();\n }\n });\n\n const id = this.route.snapshot.paramMap.get('id');\n if (id) {\n this.loadStockIssue(+id);\n } else {\n this.addStockIssueProduct();\n }\n\n this.route.queryParams.subscribe({\n next: (params: any) => {\n this.issuableData.set({\n issuable_type: params['issuable_type'],\n issuable_id: params['issuable_id']\n });\n\n }\n })\n }\n\n private loadStockIssue(id: number): void {\n this.isWorking = true;\n this.stockIssueService.show(id, {\n with:\n 'stockIssueProducts.product,stockIssueProducts.location'\n }).subscribe({\n next: (response: any) => {\n this.isWorking = false;\n this.stockIssue.set(response.item);\n },\n error: () => {\n this.isWorking = false;\n },\n complete: () => {\n const issue = this.stockIssue();\n this.form.patchValue({\n date: issue.date ? new Date(issue.date) : new Date(),\n particulars: issue.details,\n recipient_id: issue.recipient_id,\n });\n\n this.stockIssueProducts.clear();\n issue.stock_issue_products?.forEach((sip: any) => {\n const group = this.createStockIssueProduct();\n group.patchValue({\n id: sip.id,\n product_id: sip.product_id,\n location_from_id: sip.location_from_id,\n quantity: sip.quantity,\n particulars: sip.particulars,\n });\n this.stockIssueProducts.push(group);\n });\n }\n });\n }\n\n get stockIssueProducts(): FormArray {\n return this.form.get('stock_issue_products') as FormArray;\n }\n\n getSelectedLocation(index: number): any {\n return this.stockIssue()\n ?.stock_issue_products?.find(\n (sip: any) => sip.id === this.stockIssueProducts.at(index)?.get('id')?.value\n )?.location;\n }\n\n createStockIssueProduct() {\n return this.fb.group({\n id: [''],\n product_id: ['', Validators.required],\n location_from_id: ['', this.locationCount() > 0 ? Validators.required : null],\n quantity: [0, [Validators.required, Validators.min(0)]],\n particulars: [''],\n issuable_id: [this.issuableData()?.issuable_id ?? ''],\n issuable_type: [this.issuableData()?.issuable_type ?? '']\n });\n }\n\n addStockIssueProduct() {\n this.stockIssueProducts.push(this.createStockIssueProduct());\n }\n\n removeStockIssueProduct(index: number) {\n this.stockIssueProducts.removeAt(index);\n }\n\n clearProducts() {\n this.stockIssueProducts.clear();\n }\n\n save() {\n if (this.form.invalid) {\n this.form.markAllAsTouched();\n this.form.markAsDirty();\n this.alertService.addAlert('Please check the form for errors.', 'error');\n return;\n }\n\n if (this.stockIssueProducts.length === 0) {\n this.alertService.addAlert('Please add at least one product.', 'error');\n return;\n }\n\n const formData = this.form.getRawValue();\n const data: any = {\n id: this.stockIssue()?.id ?? null,\n date: moment(formData.date).format('YYYY-MM-DD'),\n details: formData.particulars,\n recipient_id: formData.recipient_id || null,\n products: formData.stock_issue_products.map((row: any) => ({\n id: row.product_id,\n product_id: row.product_id,\n quantity: row.quantity,\n location_from_id: row.location_from_id,\n particulars: row.particulars,\n issuable_id: row.issuable_id,\n issuable_type: row.issuable_type\n }))\n };\n\n this.isWorking = true;\n const request$ = this.stockIssue()?.id\n ? this.stockIssueService.update(data)\n : this.stockIssueService.store(data);\n\n request$.subscribe({\n next: () => {\n this.isWorking = false;\n this.alertService.addAlert('Stock issues saved successfully!', 'success');\n this.location.back();\n },\n error: () => {\n this.isWorking = false;\n }\n });\n }\n\n cancel() {\n this.location.back();\n }\n}\n","<mat-card class=\"d-flex flex-column gap-2 container\">\n <mat-card-content>\n\n <div class=\"d-flex flex-row justify-content-between align-items-center gap-1\">\n <h5>\n <span class=\"material-symbols-outlined align-middle\">upload</span>\n Issue Stock\n </h5>\n <app-form-configuration-for-form formCode=\"stock-issue\"></app-form-configuration-for-form>\n </div>\n\n <form class=\"d-flex flex-column gap-2\" [formGroup]=\"form\" (submit)=\"save()\">\n\n <div class=\"d-flex flex-column\">\n <div class=\"d-flex flex-row gap-2 justify-content-between\">\n <mat-form-field appearance='outline' class=\"w-100\">\n <mat-label>Date</mat-label>\n <input matInput [matDatepicker]=\"picker\" placeholder=\"Date\" formControlName=\"date\" required>\n <mat-datepicker-toggle matSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n @if (isFieldValid('date')) {\n <mat-error>{{ getErrorMessage('date') }}</mat-error>\n }\n </mat-form-field>\n\n @if (formConfigurationUtilityService.getFieldEnabled('recipient_id'))\n {\n <mat-form-field appearance='outline' class=\"w-100\">\n <mat-label>Recipient @if\n (formConfigurationUtilityService.getFieldRequired('recipient_id'))\n {\n <sup>*</sup>\n }\n </mat-label>\n <app-searchable-selector apiUrl=\"api/recipients\" formControlName=\"recipient_id\"\n titleField=\"name\"></app-searchable-selector>\n @if (isFieldValid('recipient_id')) {\n <mat-error>{{ getErrorMessage('recipient_id')\n }}</mat-error>\n }\n </mat-form-field>\n }\n\n <mat-form-field appearance='outline' class=\"w-100\">\n <mat-label>Particulars</mat-label>\n <textarea matInput placeholder=\"Particulars\" formControlName=\"particulars\"></textarea>\n </mat-form-field>\n </div>\n </div>\n\n <table class=\"table mt-3\">\n <thead>\n <tr>\n <th scope=\"col\">#</th>\n <th scope=\"col\">Product</th>\n @if (locationCount() > 0) {\n <th scope=\"col\">Location From</th>\n }\n <th scope=\"col\" width=\"45\">Quantity</th>\n <th scope=\"col\">Particulars</th>\n <th scope=\"col\" class=\"text-center\" width=\"50\"></th>\n </tr>\n </thead>\n <tbody formArrayName=\"stock_issue_products\">\n @for (row of stockIssueProducts.controls; track row; let i = $index) {\n <tr [formGroupName]=\"i\">\n <th scope=\"row\">{{ i + 1 }}</th>\n <td>\n <mat-form-field appearance='outline' class=\"w-100\">\n <mat-label>Product</mat-label>\n <app-searchable-selector apiUrl='api/products' formControlName=\"product_id\"\n titleField='name' [cache]=\"true\" required></app-searchable-selector>\n </mat-form-field>\n </td>\n @if (locationCount() > 0) {\n <td>\n <mat-form-field appearance='outline' class=\"w-100\">\n <mat-label>Location From</mat-label>\n <app-searchable-selector apiUrl='api/inventory-locations?status_ids=1'\n formControlName=\"location_from_id\" titleField='title'\n [selectedValue]=\"getSelectedLocation(i)\"></app-searchable-selector>\n <mat-hint>Which warehouse are we taking stock from?</mat-hint>\n </mat-form-field>\n </td>\n }\n <td>\n <mat-form-field appearance='outline' class=\"wpx-90\">\n <mat-label>Quantity</mat-label>\n <input matInput formControlName=\"quantity\" type=\"number\" min=\"0\">\n </mat-form-field>\n </td>\n <td>\n <mat-form-field appearance='outline' class='w-100'>\n <mat-label>Particulars</mat-label>\n <textarea matInput formControlName=\"particulars\" rows=\"2\"></textarea>\n </mat-form-field>\n </td>\n <td class=\"text-center align-middle\">\n <div class=\"d-flex gap-2 justify-content-center align-items-center text-secondary\">\n <app-techlify-icon role='button' name='delete' (click)=\"removeStockIssueProduct(i)\"\n matTooltip=\"Remove row\"></app-techlify-icon>\n </div>\n </td>\n </tr>\n }\n </tbody>\n <tfoot>\n <tr>\n <td colspan=\"6\" class=\"text-end\">\n <div class=\"d-flex flex-row gap-2 justify-content-end\">\n <button mat-button color=\"primary\" type=\"button\" (click)=\"clearProducts()\"\n [disabled]=\"stockIssueProducts.length === 0\">\n <mat-icon>block</mat-icon> CLEAR ALL\n </button>\n <button mat-raised-button color=\"primary\" type=\"button\"\n (click)=\"addStockIssueProduct()\">\n <mat-icon>add</mat-icon> ADD\n </button>\n </div>\n </td>\n </tr>\n </tfoot>\n </table>\n\n <div class=\"d-flex justify-content-end align-items-center gap-2 mt-2\">\n <button [disabled]=\"isWorking\" mat-flat-button type=\"button\" (click)=\"cancel()\">Cancel</button>\n <button [disabled]=\"isWorking || stockIssueProducts.length === 0\" mat-raised-button color=\"primary\"\n type=\"submit\">Save</button>\n </div>\n\n </form>\n\n </mat-card-content>\n</mat-card>"],"mappings":";;;;;;;;;;;;;;;;;;;AAwBA,IAAa,0BAAb,MAAa,gCAAgC,sBAAqB;CAYjC;CACrB;CACA;CACA;CACA;CACA;CACA;CAhBV,gBAAgB,OAAe,GAAE,GAAA,YAAA,CAAA,EAAA,WAAA,gBAAA,CAAA,+BAAA,CAAA,CAAA;CACjC,aAAa,OAAY,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,aAAA,CAAA,+BAAA,CAAA,CAAA;CAE9B,eAAe,OAGL,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,eAAA,CAAA,+BAAA,CAAA,CAAA;CAER;CAEP,YAA+B,sBACrB,IACA,mBACA,OACA,iBACA,UACA,mBAA+C;EAEvD,MAAM,oBAAoB;EARG,KAAA,uBAAA;EACrB,KAAA,KAAA;EACA,KAAA,oBAAA;EACA,KAAA,QAAA;EACA,KAAA,kBAAA;EACA,KAAA,WAAA;EACA,KAAA,oBAAA;EAIR,KAAK,kCAAkC,IAAI,gCAA+B;EAE1E,KAAK,gBAAgB;GACnB,MAAM,EACJ,UAAU,8BACX;GACD,cAAc,EACZ,UAAU,6BACX;EACF;EAED,KAAK,OAAO,KAAK,GAAG,MAAM;GACxB,MAAM,iBAAC,IAAI,KAAI,GAAI,WAAW,QAAQ,CAAC,WAAW,QAAQ,CAAC,CAAC;GAC5D,aAAa,CAAC,EAAE;GAChB,cAAc,CAAC,EAAE;GACjB,sBAAsB,KAAK,GAAG,MAAM,CAAA,CAAE;EACvC,CAAA;CACH;CAEA,WAAQ;EACN,KAAK,gBAAgB,MAAK,CAAE,CAAC,WAAW,UAAiB;GACvD,KAAK,cAAc,IAAI,KAAK;EAC9B,CAAC;EAED,KAAK,gCAAgC,WAAW,KAAK,mBAAmB,aAAa,CAA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