techlify-inventory-common 0.0.1

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 (418) hide show
  1. package/.editorconfig +13 -0
  2. package/README.md +27 -0
  3. package/angular.json +207 -0
  4. package/e2e/protractor.conf.js +28 -0
  5. package/e2e/src/app.e2e-spec.ts +14 -0
  6. package/e2e/src/app.po.ts +11 -0
  7. package/e2e/tsconfig.e2e.json +13 -0
  8. package/ng-package.json +6 -0
  9. package/package.json +92 -0
  10. package/projects/inventory-common/README.md +24 -0
  11. package/projects/inventory-common/ng-package.json +7 -0
  12. package/projects/inventory-common/package.json +12 -0
  13. package/projects/inventory-common/src/lib/inventory-common/category/category-form/category-form.component.html +41 -0
  14. package/projects/inventory-common/src/lib/inventory-common/category/category-form/category-form.component.scss +0 -0
  15. package/projects/inventory-common/src/lib/inventory-common/category/category-form/category-form.component.ts +75 -0
  16. package/projects/inventory-common/src/lib/inventory-common/category/category-form-button/category-form-button.component.html +32 -0
  17. package/projects/inventory-common/src/lib/inventory-common/category/category-form-button/category-form-button.component.scss +0 -0
  18. package/projects/inventory-common/src/lib/inventory-common/category/category-form-button/category-form-button.component.ts +29 -0
  19. package/projects/inventory-common/src/lib/inventory-common/category/category-list-page/category-list-page.component.html +79 -0
  20. package/projects/inventory-common/src/lib/inventory-common/category/category-list-page/category-list-page.component.scss +0 -0
  21. package/projects/inventory-common/src/lib/inventory-common/category/category-list-page/category-list-page.component.ts +61 -0
  22. package/projects/inventory-common/src/lib/inventory-common/category/category-routing.module.ts +16 -0
  23. package/projects/inventory-common/src/lib/inventory-common/category/category.module.ts +36 -0
  24. package/projects/inventory-common/src/lib/inventory-common/category/category.service.ts +11 -0
  25. package/projects/inventory-common/src/lib/inventory-common/inventory-common-routing.module.ts +65 -0
  26. package/projects/inventory-common/src/lib/inventory-common/inventory-common.module.ts +24 -0
  27. package/projects/inventory-common/src/lib/inventory-common/inventory-dashboard-page/inventory-dashboard-page.component.html +88 -0
  28. package/projects/inventory-common/src/lib/inventory-common/inventory-dashboard-page/inventory-dashboard-page.component.scss +0 -0
  29. package/projects/inventory-common/src/lib/inventory-common/inventory-dashboard-page/inventory-dashboard-page.component.ts +36 -0
  30. package/projects/inventory-common/src/lib/inventory-common/inventory-value-report.service.ts +19 -0
  31. package/projects/inventory-common/src/lib/inventory-common/low-stock-report.service.ts +19 -0
  32. package/projects/inventory-common/src/lib/inventory-common/material.module.ts +95 -0
  33. package/projects/inventory-common/src/lib/inventory-common/measure/measure-delete/measure-delete-button/measure-delete-button.component.html +37 -0
  34. package/projects/inventory-common/src/lib/inventory-common/measure/measure-delete/measure-delete-button/measure-delete-button.component.scss +0 -0
  35. package/projects/inventory-common/src/lib/inventory-common/measure/measure-delete/measure-delete-button/measure-delete-button.component.ts +44 -0
  36. package/projects/inventory-common/src/lib/inventory-common/measure/measure-delete/measure-delete.module.ts +11 -0
  37. package/projects/inventory-common/src/lib/inventory-common/measure/measure-form/measure-form/measure-form.component.html +66 -0
  38. package/projects/inventory-common/src/lib/inventory-common/measure/measure-form/measure-form/measure-form.component.scss +0 -0
  39. package/projects/inventory-common/src/lib/inventory-common/measure/measure-form/measure-form/measure-form.component.ts +78 -0
  40. package/projects/inventory-common/src/lib/inventory-common/measure/measure-form/measure-form-button/measure-form-button.component.html +16 -0
  41. package/projects/inventory-common/src/lib/inventory-common/measure/measure-form/measure-form-button/measure-form-button.component.scss +0 -0
  42. package/projects/inventory-common/src/lib/inventory-common/measure/measure-form/measure-form-button/measure-form-button.component.ts +29 -0
  43. package/projects/inventory-common/src/lib/inventory-common/measure/measure-form/measure-form.module.ts +13 -0
  44. package/projects/inventory-common/src/lib/inventory-common/measure/measure-routing.module.ts +16 -0
  45. package/projects/inventory-common/src/lib/inventory-common/measure/measure.module.ts +26 -0
  46. package/projects/inventory-common/src/lib/inventory-common/measure/measure.service.ts +11 -0
  47. package/projects/inventory-common/src/lib/inventory-common/measure/measures-list/measures-list.component.html +88 -0
  48. package/projects/inventory-common/src/lib/inventory-common/measure/measures-list/measures-list.component.scss +0 -0
  49. package/projects/inventory-common/src/lib/inventory-common/measure/measures-list/measures-list.component.ts +67 -0
  50. package/projects/inventory-common/src/lib/inventory-common/product/low-stock-products-widget/low-stock-products-widget.component.html +52 -0
  51. package/projects/inventory-common/src/lib/inventory-common/product/low-stock-products-widget/low-stock-products-widget.component.scss +0 -0
  52. package/projects/inventory-common/src/lib/inventory-common/product/low-stock-products-widget/low-stock-products-widget.component.ts +42 -0
  53. package/projects/inventory-common/src/lib/inventory-common/product/low-stock-products-widget/low-stock-products-widget.module.ts +20 -0
  54. package/projects/inventory-common/src/lib/inventory-common/product/product-basic-info/product-basic-info.component.html +114 -0
  55. package/projects/inventory-common/src/lib/inventory-common/product/product-basic-info/product-basic-info.component.scss +0 -0
  56. package/projects/inventory-common/src/lib/inventory-common/product/product-basic-info/product-basic-info.component.ts +43 -0
  57. package/projects/inventory-common/src/lib/inventory-common/product/product-delete-button/product-delete-button.component.html +33 -0
  58. package/projects/inventory-common/src/lib/inventory-common/product/product-delete-button/product-delete-button.component.scss +0 -0
  59. package/projects/inventory-common/src/lib/inventory-common/product/product-delete-button/product-delete-button.component.ts +53 -0
  60. package/projects/inventory-common/src/lib/inventory-common/product/product-form/product-form.component.html +209 -0
  61. package/projects/inventory-common/src/lib/inventory-common/product/product-form/product-form.component.spec.ts +24 -0
  62. package/projects/inventory-common/src/lib/inventory-common/product/product-form/product-form.component.ts +182 -0
  63. package/projects/inventory-common/src/lib/inventory-common/product/product-form-button/product-form-button.component.html +17 -0
  64. package/projects/inventory-common/src/lib/inventory-common/product/product-form-button/product-form-button.component.scss +0 -0
  65. package/projects/inventory-common/src/lib/inventory-common/product/product-form-button/product-form-button.component.ts +39 -0
  66. package/projects/inventory-common/src/lib/inventory-common/product/product-form.service.ts +11 -0
  67. package/projects/inventory-common/src/lib/inventory-common/product/product-import-page/product-import-page.component.html +1 -0
  68. package/projects/inventory-common/src/lib/inventory-common/product/product-import-page/product-import-page.component.scss +0 -0
  69. package/projects/inventory-common/src/lib/inventory-common/product/product-import-page/product-import-page.component.ts +66 -0
  70. package/projects/inventory-common/src/lib/inventory-common/product/product-list/product-list.component.html +254 -0
  71. package/projects/inventory-common/src/lib/inventory-common/product/product-list/product-list.component.spec.ts +24 -0
  72. package/projects/inventory-common/src/lib/inventory-common/product/product-list/product-list.component.ts +171 -0
  73. package/projects/inventory-common/src/lib/inventory-common/product/product-measure-form/product-measure-form.component.html +44 -0
  74. package/projects/inventory-common/src/lib/inventory-common/product/product-measure-form/product-measure-form.component.spec.ts +24 -0
  75. package/projects/inventory-common/src/lib/inventory-common/product/product-measure-form/product-measure-form.component.ts +93 -0
  76. package/projects/inventory-common/src/lib/inventory-common/product/product-measures-list/product-measures-list.component.html +90 -0
  77. package/projects/inventory-common/src/lib/inventory-common/product/product-measures-list/product-measures-list.component.spec.ts +24 -0
  78. package/projects/inventory-common/src/lib/inventory-common/product/product-measures-list/product-measures-list.component.ts +153 -0
  79. package/projects/inventory-common/src/lib/inventory-common/product/product-nav-bar/product-nav-bar.component.html +3 -0
  80. package/projects/inventory-common/src/lib/inventory-common/product/product-nav-bar/product-nav-bar.component.spec.ts +24 -0
  81. package/projects/inventory-common/src/lib/inventory-common/product/product-nav-bar/product-nav-bar.component.ts +7 -0
  82. package/projects/inventory-common/src/lib/inventory-common/product/product-quick-search/product-quick-search.component.html +110 -0
  83. package/projects/inventory-common/src/lib/inventory-common/product/product-quick-search/product-quick-search.component.scss +0 -0
  84. package/projects/inventory-common/src/lib/inventory-common/product/product-quick-search/product-quick-search.component.ts +102 -0
  85. package/projects/inventory-common/src/lib/inventory-common/product/product-routing.module.ts +49 -0
  86. package/projects/inventory-common/src/lib/inventory-common/product/product-search/product-search.component.html +78 -0
  87. package/projects/inventory-common/src/lib/inventory-common/product/product-search/product-search.component.scss +12 -0
  88. package/projects/inventory-common/src/lib/inventory-common/product/product-search/product-search.component.ts +153 -0
  89. package/projects/inventory-common/src/lib/inventory-common/product/product-search/product-search.module.ts +22 -0
  90. package/projects/inventory-common/src/lib/inventory-common/product/product-summary-chart/product-summary-chart.component.html +11 -0
  91. package/projects/inventory-common/src/lib/inventory-common/product/product-summary-chart/product-summary-chart.component.scss +0 -0
  92. package/projects/inventory-common/src/lib/inventory-common/product/product-summary-chart/product-summary-chart.component.ts +62 -0
  93. package/projects/inventory-common/src/lib/inventory-common/product/product-summary-chart/product-summary-chart.module.ts +15 -0
  94. package/projects/inventory-common/src/lib/inventory-common/product/product-summary-widget/product-summary-widget.component.html +9 -0
  95. package/projects/inventory-common/src/lib/inventory-common/product/product-summary-widget/product-summary-widget.component.scss +0 -0
  96. package/projects/inventory-common/src/lib/inventory-common/product/product-summary-widget/product-summary-widget.component.ts +39 -0
  97. package/projects/inventory-common/src/lib/inventory-common/product/product-tax/product-tax-delete-button/product-tax-delete-button.component.html +32 -0
  98. package/projects/inventory-common/src/lib/inventory-common/product/product-tax/product-tax-delete-button/product-tax-delete-button.component.scss +0 -0
  99. package/projects/inventory-common/src/lib/inventory-common/product/product-tax/product-tax-delete-button/product-tax-delete-button.component.ts +55 -0
  100. package/projects/inventory-common/src/lib/inventory-common/product/product-tax/product-tax-form-button/product-tax-form-button.component.html +49 -0
  101. package/projects/inventory-common/src/lib/inventory-common/product/product-tax/product-tax-form-button/product-tax-form-button.component.scss +0 -0
  102. package/projects/inventory-common/src/lib/inventory-common/product/product-tax/product-tax-form-button/product-tax-form-button.component.ts +87 -0
  103. package/projects/inventory-common/src/lib/inventory-common/product/product-tax/product-tax-list/product-tax-list.component.html +48 -0
  104. package/projects/inventory-common/src/lib/inventory-common/product/product-tax/product-tax-list/product-tax-list.component.scss +0 -0
  105. package/projects/inventory-common/src/lib/inventory-common/product/product-tax/product-tax-list/product-tax-list.component.ts +33 -0
  106. package/projects/inventory-common/src/lib/inventory-common/product/product-tax/product-tax.module.ts +23 -0
  107. package/projects/inventory-common/src/lib/inventory-common/product/product-tax/product-tax.service.ts +11 -0
  108. package/projects/inventory-common/src/lib/inventory-common/product/product-view-page/product-view-page.component.html +34 -0
  109. package/projects/inventory-common/src/lib/inventory-common/product/product-view-page/product-view-page.component.ts +63 -0
  110. package/projects/inventory-common/src/lib/inventory-common/product/product.module.ts +69 -0
  111. package/projects/inventory-common/src/lib/inventory-common/product/product.service.ts +54 -0
  112. package/projects/inventory-common/src/lib/inventory-common/product/widgets/product-category-badges/product-category-badges.component.html +8 -0
  113. package/projects/inventory-common/src/lib/inventory-common/product/widgets/product-category-badges/product-category-badges.component.scss +0 -0
  114. package/projects/inventory-common/src/lib/inventory-common/product/widgets/product-category-badges/product-category-badges.component.ts +16 -0
  115. package/projects/inventory-common/src/lib/inventory-common/reports/inventory-value-report/inventory-value-report.component.html +140 -0
  116. package/projects/inventory-common/src/lib/inventory-common/reports/inventory-value-report/inventory-value-report.component.scss +0 -0
  117. package/projects/inventory-common/src/lib/inventory-common/reports/inventory-value-report/inventory-value-report.component.ts +191 -0
  118. package/projects/inventory-common/src/lib/inventory-common/reports/low-stock-report/low-stock-report.component.html +158 -0
  119. package/projects/inventory-common/src/lib/inventory-common/reports/low-stock-report/low-stock-report.component.scss +0 -0
  120. package/projects/inventory-common/src/lib/inventory-common/reports/low-stock-report/low-stock-report.component.ts +191 -0
  121. package/projects/inventory-common/src/lib/inventory-common/services/techlify-form-service.ts +14 -0
  122. package/projects/inventory-common/src/lib/inventory-common/stock-issuances/stock-issuance-delete-button/stock-issuance-delete-button.component.html +32 -0
  123. package/projects/inventory-common/src/lib/inventory-common/stock-issuances/stock-issuance-delete-button/stock-issuance-delete-button.component.scss +0 -0
  124. package/projects/inventory-common/src/lib/inventory-common/stock-issuances/stock-issuance-delete-button/stock-issuance-delete-button.component.ts +49 -0
  125. package/projects/inventory-common/src/lib/inventory-common/stock-issuances/stock-issuance-delete-button/stock-issuance-delete-button.module.ts +11 -0
  126. package/projects/inventory-common/src/lib/inventory-common/stock-issuances/stock-issuance.service.ts +11 -0
  127. package/projects/inventory-common/src/lib/inventory-common/stock-issuances/stock-issuances-list/stock-issuances-list.component.html +165 -0
  128. package/projects/inventory-common/src/lib/inventory-common/stock-issuances/stock-issuances-list/stock-issuances-list.component.scss +0 -0
  129. package/projects/inventory-common/src/lib/inventory-common/stock-issuances/stock-issuances-list/stock-issuances-list.component.ts +113 -0
  130. package/projects/inventory-common/src/lib/inventory-common/stock-issuances/stock-issuances-list/stock-issuances-list.module.ts +26 -0
  131. package/projects/inventory-common/src/lib/inventory-common/stock-issuances/stock-issuances-routing.module.ts +16 -0
  132. package/projects/inventory-common/src/lib/inventory-common/stock-issuances/stock-issuances.module.ts +36 -0
  133. package/projects/inventory-common/src/lib/inventory-common/stock-issuances/stock-issue-form/stock-issue-form/stock-issue-form.component.html +64 -0
  134. package/projects/inventory-common/src/lib/inventory-common/stock-issuances/stock-issue-form/stock-issue-form/stock-issue-form.component.scss +0 -0
  135. package/projects/inventory-common/src/lib/inventory-common/stock-issuances/stock-issue-form/stock-issue-form/stock-issue-form.component.ts +115 -0
  136. package/projects/inventory-common/src/lib/inventory-common/stock-issuances/stock-issue-form/stock-issue-form-button/stock-issue-form-button.component.html +20 -0
  137. package/projects/inventory-common/src/lib/inventory-common/stock-issuances/stock-issue-form/stock-issue-form-button/stock-issue-form-button.component.scss +0 -0
  138. package/projects/inventory-common/src/lib/inventory-common/stock-issuances/stock-issue-form/stock-issue-form-button/stock-issue-form-button.component.ts +35 -0
  139. package/projects/inventory-common/src/lib/inventory-common/stock-issuances/stock-issue-form/stock-issue-form.module.ts +29 -0
  140. package/projects/inventory-common/src/lib/inventory-common/stock-receipts/stock-receipt-delete-button/stock-receipt-delete-button.component.html +32 -0
  141. package/projects/inventory-common/src/lib/inventory-common/stock-receipts/stock-receipt-delete-button/stock-receipt-delete-button.component.scss +0 -0
  142. package/projects/inventory-common/src/lib/inventory-common/stock-receipts/stock-receipt-delete-button/stock-receipt-delete-button.component.ts +49 -0
  143. package/projects/inventory-common/src/lib/inventory-common/stock-receipts/stock-receipt-form/stock-receipt-form/stock-receipt-form.component.html +74 -0
  144. package/projects/inventory-common/src/lib/inventory-common/stock-receipts/stock-receipt-form/stock-receipt-form/stock-receipt-form.component.scss +0 -0
  145. package/projects/inventory-common/src/lib/inventory-common/stock-receipts/stock-receipt-form/stock-receipt-form/stock-receipt-form.component.ts +122 -0
  146. package/projects/inventory-common/src/lib/inventory-common/stock-receipts/stock-receipt-form/stock-receipt-form-button/stock-receipt-form-button.component.html +18 -0
  147. package/projects/inventory-common/src/lib/inventory-common/stock-receipts/stock-receipt-form/stock-receipt-form-button/stock-receipt-form-button.component.scss +0 -0
  148. package/projects/inventory-common/src/lib/inventory-common/stock-receipts/stock-receipt-form/stock-receipt-form-button/stock-receipt-form-button.component.ts +33 -0
  149. package/projects/inventory-common/src/lib/inventory-common/stock-receipts/stock-receipt-form/stock-receipt-form.module.ts +29 -0
  150. package/projects/inventory-common/src/lib/inventory-common/stock-receipts/stock-receipt.service.ts +11 -0
  151. package/projects/inventory-common/src/lib/inventory-common/stock-receipts/stock-receipts-list-page/stock-receipts-list-page.component.html +139 -0
  152. package/projects/inventory-common/src/lib/inventory-common/stock-receipts/stock-receipts-list-page/stock-receipts-list-page.component.scss +0 -0
  153. package/projects/inventory-common/src/lib/inventory-common/stock-receipts/stock-receipts-list-page/stock-receipts-list-page.component.ts +109 -0
  154. package/projects/inventory-common/src/lib/inventory-common/stock-receipts/stock-receipts-routing.module.ts +16 -0
  155. package/projects/inventory-common/src/lib/inventory-common/stock-receipts/stock-receipts.module.ts +45 -0
  156. package/projects/inventory-common/src/lib/inventory-common/stock-summary.service.ts +18 -0
  157. package/projects/inventory-common/src/lib/inventory-common/supplier/payee-selector/payee-selector/payee-selector.component.html +22 -0
  158. package/projects/inventory-common/src/lib/inventory-common/supplier/payee-selector/payee-selector/payee-selector.component.scss +0 -0
  159. package/projects/inventory-common/src/lib/inventory-common/supplier/payee-selector/payee-selector/payee-selector.component.ts +44 -0
  160. package/projects/inventory-common/src/lib/inventory-common/supplier/payee-selector/payee-selector.module.ts +19 -0
  161. package/projects/inventory-common/src/lib/inventory-common/supplier/supplier-delete-button/supplier-delete-button.component.css +0 -0
  162. package/projects/inventory-common/src/lib/inventory-common/supplier/supplier-delete-button/supplier-delete-button.component.html +3 -0
  163. package/projects/inventory-common/src/lib/inventory-common/supplier/supplier-delete-button/supplier-delete-button.component.spec.ts +28 -0
  164. package/projects/inventory-common/src/lib/inventory-common/supplier/supplier-delete-button/supplier-delete-button.component.ts +56 -0
  165. package/projects/inventory-common/src/lib/inventory-common/supplier/supplier-form/supplier-form-button/supplier-form-button.component.css +0 -0
  166. package/projects/inventory-common/src/lib/inventory-common/supplier/supplier-form/supplier-form-button/supplier-form-button.component.html +3 -0
  167. package/projects/inventory-common/src/lib/inventory-common/supplier/supplier-form/supplier-form-button/supplier-form-button.component.spec.ts +28 -0
  168. package/projects/inventory-common/src/lib/inventory-common/supplier/supplier-form/supplier-form-button/supplier-form-button.component.ts +40 -0
  169. package/projects/inventory-common/src/lib/inventory-common/supplier/supplier-form/supplier-form.component.html +100 -0
  170. package/projects/inventory-common/src/lib/inventory-common/supplier/supplier-form/supplier-form.component.ts +116 -0
  171. package/projects/inventory-common/src/lib/inventory-common/supplier/supplier-form/supplier-form.service.ts +11 -0
  172. package/projects/inventory-common/src/lib/inventory-common/supplier/supplier-information/supplier-information.component.html +67 -0
  173. package/projects/inventory-common/src/lib/inventory-common/supplier/supplier-information/supplier-information.component.scss +0 -0
  174. package/projects/inventory-common/src/lib/inventory-common/supplier/supplier-information/supplier-information.component.ts +68 -0
  175. package/projects/inventory-common/src/lib/inventory-common/supplier/supplier-routing.module.ts +32 -0
  176. package/projects/inventory-common/src/lib/inventory-common/supplier/supplier-type.service.ts +17 -0
  177. package/projects/inventory-common/src/lib/inventory-common/supplier/supplier-view/supplier-view.component.html +60 -0
  178. package/projects/inventory-common/src/lib/inventory-common/supplier/supplier-view/supplier-view.component.ts +58 -0
  179. package/projects/inventory-common/src/lib/inventory-common/supplier/supplier.component.html +3 -0
  180. package/projects/inventory-common/src/lib/inventory-common/supplier/supplier.component.scss +0 -0
  181. package/projects/inventory-common/src/lib/inventory-common/supplier/supplier.component.ts +16 -0
  182. package/projects/inventory-common/src/lib/inventory-common/supplier/supplier.module.ts +46 -0
  183. package/projects/inventory-common/src/lib/inventory-common/supplier/supplier.service.ts +57 -0
  184. package/projects/inventory-common/src/lib/inventory-common/supplier/suppliers-list/suppliers-list.component.html +98 -0
  185. package/projects/inventory-common/src/lib/inventory-common/supplier/suppliers-list/suppliers-list.component.ts +126 -0
  186. package/projects/inventory-common/src/lib/inventory-common/techlify-filter/techlify-filter.component.html +442 -0
  187. package/projects/inventory-common/src/lib/inventory-common/techlify-filter/techlify-filter.component.scss +0 -0
  188. package/projects/inventory-common/src/lib/inventory-common/techlify-filter/techlify-filter.component.ts +109 -0
  189. package/projects/inventory-common/src/lib/inventory-common/techlify-filter/techlify-filter.module.ts +24 -0
  190. package/projects/inventory-common/src/public-api.ts +10 -0
  191. package/projects/inventory-common/tsconfig.lib.json +17 -0
  192. package/projects/inventory-common/tsconfig.lib.prod.json +13 -0
  193. package/projects/inventory-common/tsconfig.spec.json +17 -0
  194. package/public_api.ts +23 -0
  195. package/releases/techlify-ng-users-0.0.4.tgz +0 -0
  196. package/releases/techlify-ng-users-0.0.5.tgz +0 -0
  197. package/src/.htaccess +19 -0
  198. package/src/app/@modules/@shared/print-button/print-button/print-button.component.html +3 -0
  199. package/src/app/@modules/@shared/print-button/print-button/print-button.component.scss +0 -0
  200. package/src/app/@modules/@shared/print-button/print-button/print-button.component.ts +11 -0
  201. package/src/app/@modules/@shared/print-button/print-button.module.ts +11 -0
  202. package/src/app/@modules/@shared/print-button/print.service.ts +38 -0
  203. package/src/app/@modules/@shared/techlify-form-service.ts +14 -0
  204. package/src/app/@modules/@shared/user-menu/user-menu.component.html +26 -0
  205. package/src/app/@modules/@shared/user-menu/user-menu.component.spec.ts +23 -0
  206. package/src/app/@modules/@shared/user-menu/user-menu.component.ts +46 -0
  207. package/src/app/@modules/@shared/user-menu/user-menu.module.ts +20 -0
  208. package/src/app/@modules/administration/administration-routing.module.ts +44 -0
  209. package/src/app/@modules/administration/administration.component.html +3 -0
  210. package/src/app/@modules/administration/administration.component.ts +11 -0
  211. package/src/app/@modules/administration/administration.module.ts +18 -0
  212. package/src/app/@modules/administration/administration.service.ts +33 -0
  213. package/src/app/@modules/auth/auth-routing.module.ts +17 -0
  214. package/src/app/@modules/auth/auth.module.ts +12 -0
  215. package/src/app/@modules/auth/login/login.component.html +302 -0
  216. package/src/app/@modules/auth/login/login.component.scss +43 -0
  217. package/src/app/@modules/auth/login/login.component.ts +57 -0
  218. package/src/app/@modules/inventory-common/category/category-form/category-form.component.html +41 -0
  219. package/src/app/@modules/inventory-common/category/category-form/category-form.component.scss +0 -0
  220. package/src/app/@modules/inventory-common/category/category-form/category-form.component.ts +75 -0
  221. package/src/app/@modules/inventory-common/category/category-form-button/category-form-button.component.html +32 -0
  222. package/src/app/@modules/inventory-common/category/category-form-button/category-form-button.component.scss +0 -0
  223. package/src/app/@modules/inventory-common/category/category-form-button/category-form-button.component.ts +29 -0
  224. package/src/app/@modules/inventory-common/category/category-list-page/category-list-page.component.html +79 -0
  225. package/src/app/@modules/inventory-common/category/category-list-page/category-list-page.component.scss +0 -0
  226. package/src/app/@modules/inventory-common/category/category-list-page/category-list-page.component.ts +61 -0
  227. package/src/app/@modules/inventory-common/category/category-routing.module.ts +16 -0
  228. package/src/app/@modules/inventory-common/category/category.module.ts +36 -0
  229. package/src/app/@modules/inventory-common/category/category.service.ts +11 -0
  230. package/src/app/@modules/inventory-common/inventory-common-routing.module.ts +55 -0
  231. package/src/app/@modules/inventory-common/inventory-common.module.ts +20 -0
  232. package/src/app/@modules/inventory-common/inventory-dashboard-page/inventory-dashboard-page.component.html +88 -0
  233. package/src/app/@modules/inventory-common/inventory-dashboard-page/inventory-dashboard-page.component.scss +0 -0
  234. package/src/app/@modules/inventory-common/inventory-dashboard-page/inventory-dashboard-page.component.ts +35 -0
  235. package/src/app/@modules/inventory-common/measure/measure-delete/measure-delete-button/measure-delete-button.component.html +37 -0
  236. package/src/app/@modules/inventory-common/measure/measure-delete/measure-delete-button/measure-delete-button.component.scss +0 -0
  237. package/src/app/@modules/inventory-common/measure/measure-delete/measure-delete-button/measure-delete-button.component.ts +44 -0
  238. package/src/app/@modules/inventory-common/measure/measure-delete/measure-delete.module.ts +11 -0
  239. package/src/app/@modules/inventory-common/measure/measure-form/measure-form/measure-form.component.html +66 -0
  240. package/src/app/@modules/inventory-common/measure/measure-form/measure-form/measure-form.component.scss +0 -0
  241. package/src/app/@modules/inventory-common/measure/measure-form/measure-form/measure-form.component.ts +78 -0
  242. package/src/app/@modules/inventory-common/measure/measure-form/measure-form-button/measure-form-button.component.html +16 -0
  243. package/src/app/@modules/inventory-common/measure/measure-form/measure-form-button/measure-form-button.component.scss +0 -0
  244. package/src/app/@modules/inventory-common/measure/measure-form/measure-form-button/measure-form-button.component.ts +29 -0
  245. package/src/app/@modules/inventory-common/measure/measure-form/measure-form.module.ts +13 -0
  246. package/src/app/@modules/inventory-common/measure/measure-routing.module.ts +16 -0
  247. package/src/app/@modules/inventory-common/measure/measure.module.ts +26 -0
  248. package/src/app/@modules/inventory-common/measure/measure.service.ts +11 -0
  249. package/src/app/@modules/inventory-common/measure/measures-list/measures-list.component.html +88 -0
  250. package/src/app/@modules/inventory-common/measure/measures-list/measures-list.component.scss +0 -0
  251. package/src/app/@modules/inventory-common/measure/measures-list/measures-list.component.ts +67 -0
  252. package/src/app/@modules/inventory-common/product/low-stock-products-widget/low-stock-products-widget.component.html +52 -0
  253. package/src/app/@modules/inventory-common/product/low-stock-products-widget/low-stock-products-widget.component.scss +0 -0
  254. package/src/app/@modules/inventory-common/product/low-stock-products-widget/low-stock-products-widget.component.ts +42 -0
  255. package/src/app/@modules/inventory-common/product/low-stock-products-widget/low-stock-products-widget.module.ts +20 -0
  256. package/src/app/@modules/inventory-common/product/product-basic-info/product-basic-info.component.html +114 -0
  257. package/src/app/@modules/inventory-common/product/product-basic-info/product-basic-info.component.scss +0 -0
  258. package/src/app/@modules/inventory-common/product/product-basic-info/product-basic-info.component.ts +43 -0
  259. package/src/app/@modules/inventory-common/product/product-delete-button/product-delete-button.component.html +33 -0
  260. package/src/app/@modules/inventory-common/product/product-delete-button/product-delete-button.component.scss +0 -0
  261. package/src/app/@modules/inventory-common/product/product-delete-button/product-delete-button.component.ts +53 -0
  262. package/src/app/@modules/inventory-common/product/product-form/product-form.component.html +209 -0
  263. package/src/app/@modules/inventory-common/product/product-form/product-form.component.spec.ts +24 -0
  264. package/src/app/@modules/inventory-common/product/product-form/product-form.component.ts +182 -0
  265. package/src/app/@modules/inventory-common/product/product-form-button/product-form-button.component.html +17 -0
  266. package/src/app/@modules/inventory-common/product/product-form-button/product-form-button.component.scss +0 -0
  267. package/src/app/@modules/inventory-common/product/product-form-button/product-form-button.component.ts +39 -0
  268. package/src/app/@modules/inventory-common/product/product-form.service.ts +11 -0
  269. package/src/app/@modules/inventory-common/product/product-import-page/product-import-page.component.html +1 -0
  270. package/src/app/@modules/inventory-common/product/product-import-page/product-import-page.component.scss +0 -0
  271. package/src/app/@modules/inventory-common/product/product-import-page/product-import-page.component.ts +66 -0
  272. package/src/app/@modules/inventory-common/product/product-list/product-list.component.html +229 -0
  273. package/src/app/@modules/inventory-common/product/product-list/product-list.component.spec.ts +24 -0
  274. package/src/app/@modules/inventory-common/product/product-list/product-list.component.ts +176 -0
  275. package/src/app/@modules/inventory-common/product/product-measure-form/product-measure-form.component.html +44 -0
  276. package/src/app/@modules/inventory-common/product/product-measure-form/product-measure-form.component.spec.ts +24 -0
  277. package/src/app/@modules/inventory-common/product/product-measure-form/product-measure-form.component.ts +93 -0
  278. package/src/app/@modules/inventory-common/product/product-measures-list/product-measures-list.component.html +90 -0
  279. package/src/app/@modules/inventory-common/product/product-measures-list/product-measures-list.component.spec.ts +24 -0
  280. package/src/app/@modules/inventory-common/product/product-measures-list/product-measures-list.component.ts +153 -0
  281. package/src/app/@modules/inventory-common/product/product-nav-bar/product-nav-bar.component.html +3 -0
  282. package/src/app/@modules/inventory-common/product/product-nav-bar/product-nav-bar.component.spec.ts +24 -0
  283. package/src/app/@modules/inventory-common/product/product-nav-bar/product-nav-bar.component.ts +7 -0
  284. package/src/app/@modules/inventory-common/product/product-routing.module.ts +49 -0
  285. package/src/app/@modules/inventory-common/product/product-search/product-search.component.html +78 -0
  286. package/src/app/@modules/inventory-common/product/product-search/product-search.component.scss +12 -0
  287. package/src/app/@modules/inventory-common/product/product-search/product-search.component.ts +153 -0
  288. package/src/app/@modules/inventory-common/product/product-search/product-search.module.ts +22 -0
  289. package/src/app/@modules/inventory-common/product/product-summary-chart/product-summary-chart.component.html +17 -0
  290. package/src/app/@modules/inventory-common/product/product-summary-chart/product-summary-chart.component.scss +0 -0
  291. package/src/app/@modules/inventory-common/product/product-summary-chart/product-summary-chart.component.ts +45 -0
  292. package/src/app/@modules/inventory-common/product/product-summary-chart/product-summary-chart.module.ts +18 -0
  293. package/src/app/@modules/inventory-common/product/product-tax/product-tax-delete-button/product-tax-delete-button.component.html +32 -0
  294. package/src/app/@modules/inventory-common/product/product-tax/product-tax-delete-button/product-tax-delete-button.component.scss +0 -0
  295. package/src/app/@modules/inventory-common/product/product-tax/product-tax-delete-button/product-tax-delete-button.component.ts +55 -0
  296. package/src/app/@modules/inventory-common/product/product-tax/product-tax-form-button/product-tax-form-button.component.html +49 -0
  297. package/src/app/@modules/inventory-common/product/product-tax/product-tax-form-button/product-tax-form-button.component.scss +0 -0
  298. package/src/app/@modules/inventory-common/product/product-tax/product-tax-form-button/product-tax-form-button.component.ts +87 -0
  299. package/src/app/@modules/inventory-common/product/product-tax/product-tax-list/product-tax-list.component.html +48 -0
  300. package/src/app/@modules/inventory-common/product/product-tax/product-tax-list/product-tax-list.component.scss +0 -0
  301. package/src/app/@modules/inventory-common/product/product-tax/product-tax-list/product-tax-list.component.ts +33 -0
  302. package/src/app/@modules/inventory-common/product/product-tax/product-tax.module.ts +23 -0
  303. package/src/app/@modules/inventory-common/product/product-tax/product-tax.service.ts +11 -0
  304. package/src/app/@modules/inventory-common/product/product-view-page/product-view-page.component.html +34 -0
  305. package/src/app/@modules/inventory-common/product/product-view-page/product-view-page.component.ts +63 -0
  306. package/src/app/@modules/inventory-common/product/product.module.ts +67 -0
  307. package/src/app/@modules/inventory-common/product/product.service.ts +54 -0
  308. package/src/app/@modules/inventory-common/stock-issuances/stock-issuance-delete-button/stock-issuance-delete-button.component.html +32 -0
  309. package/src/app/@modules/inventory-common/stock-issuances/stock-issuance-delete-button/stock-issuance-delete-button.component.scss +0 -0
  310. package/src/app/@modules/inventory-common/stock-issuances/stock-issuance-delete-button/stock-issuance-delete-button.component.ts +49 -0
  311. package/src/app/@modules/inventory-common/stock-issuances/stock-issuance-delete-button/stock-issuance-delete-button.module.ts +11 -0
  312. package/src/app/@modules/inventory-common/stock-issuances/stock-issuance.service.ts +11 -0
  313. package/src/app/@modules/inventory-common/stock-issuances/stock-issuances-list/stock-issuances-list.component.html +165 -0
  314. package/src/app/@modules/inventory-common/stock-issuances/stock-issuances-list/stock-issuances-list.component.scss +0 -0
  315. package/src/app/@modules/inventory-common/stock-issuances/stock-issuances-list/stock-issuances-list.component.ts +113 -0
  316. package/src/app/@modules/inventory-common/stock-issuances/stock-issuances-list/stock-issuances-list.module.ts +26 -0
  317. package/src/app/@modules/inventory-common/stock-issuances/stock-issuances-routing.module.ts +16 -0
  318. package/src/app/@modules/inventory-common/stock-issuances/stock-issuances.module.ts +36 -0
  319. package/src/app/@modules/inventory-common/stock-issuances/stock-issue-form/stock-issue-form/stock-issue-form.component.html +64 -0
  320. package/src/app/@modules/inventory-common/stock-issuances/stock-issue-form/stock-issue-form/stock-issue-form.component.scss +0 -0
  321. package/src/app/@modules/inventory-common/stock-issuances/stock-issue-form/stock-issue-form/stock-issue-form.component.ts +115 -0
  322. package/src/app/@modules/inventory-common/stock-issuances/stock-issue-form/stock-issue-form-button/stock-issue-form-button.component.html +20 -0
  323. package/src/app/@modules/inventory-common/stock-issuances/stock-issue-form/stock-issue-form-button/stock-issue-form-button.component.scss +0 -0
  324. package/src/app/@modules/inventory-common/stock-issuances/stock-issue-form/stock-issue-form-button/stock-issue-form-button.component.ts +35 -0
  325. package/src/app/@modules/inventory-common/stock-issuances/stock-issue-form/stock-issue-form.module.ts +29 -0
  326. package/src/app/@modules/inventory-common/stock-receipts/stock-receipt-delete-button/stock-receipt-delete-button.component.html +32 -0
  327. package/src/app/@modules/inventory-common/stock-receipts/stock-receipt-delete-button/stock-receipt-delete-button.component.scss +0 -0
  328. package/src/app/@modules/inventory-common/stock-receipts/stock-receipt-delete-button/stock-receipt-delete-button.component.ts +49 -0
  329. package/src/app/@modules/inventory-common/stock-receipts/stock-receipt-form/stock-receipt-form/stock-receipt-form.component.html +74 -0
  330. package/src/app/@modules/inventory-common/stock-receipts/stock-receipt-form/stock-receipt-form/stock-receipt-form.component.scss +0 -0
  331. package/src/app/@modules/inventory-common/stock-receipts/stock-receipt-form/stock-receipt-form/stock-receipt-form.component.ts +122 -0
  332. package/src/app/@modules/inventory-common/stock-receipts/stock-receipt-form/stock-receipt-form-button/stock-receipt-form-button.component.html +18 -0
  333. package/src/app/@modules/inventory-common/stock-receipts/stock-receipt-form/stock-receipt-form-button/stock-receipt-form-button.component.scss +0 -0
  334. package/src/app/@modules/inventory-common/stock-receipts/stock-receipt-form/stock-receipt-form-button/stock-receipt-form-button.component.ts +33 -0
  335. package/src/app/@modules/inventory-common/stock-receipts/stock-receipt-form/stock-receipt-form.module.ts +29 -0
  336. package/src/app/@modules/inventory-common/stock-receipts/stock-receipt.service.ts +11 -0
  337. package/src/app/@modules/inventory-common/stock-receipts/stock-receipts-list-page/stock-receipts-list-page.component.html +139 -0
  338. package/src/app/@modules/inventory-common/stock-receipts/stock-receipts-list-page/stock-receipts-list-page.component.scss +0 -0
  339. package/src/app/@modules/inventory-common/stock-receipts/stock-receipts-list-page/stock-receipts-list-page.component.ts +109 -0
  340. package/src/app/@modules/inventory-common/stock-receipts/stock-receipts-routing.module.ts +16 -0
  341. package/src/app/@modules/inventory-common/stock-receipts/stock-receipts.module.ts +45 -0
  342. package/src/app/@modules/inventory-common/stock-summary.service.ts +18 -0
  343. package/src/app/@modules/inventory-common/supplier/payee-selector/payee-selector/payee-selector.component.html +22 -0
  344. package/src/app/@modules/inventory-common/supplier/payee-selector/payee-selector/payee-selector.component.scss +0 -0
  345. package/src/app/@modules/inventory-common/supplier/payee-selector/payee-selector/payee-selector.component.ts +44 -0
  346. package/src/app/@modules/inventory-common/supplier/payee-selector/payee-selector.module.ts +19 -0
  347. package/src/app/@modules/inventory-common/supplier/supplier-form/supplier-form.component.html +133 -0
  348. package/src/app/@modules/inventory-common/supplier/supplier-form/supplier-form.component.ts +116 -0
  349. package/src/app/@modules/inventory-common/supplier/supplier-form/supplier-form.service.ts +11 -0
  350. package/src/app/@modules/inventory-common/supplier/supplier-information/supplier-information.component.html +67 -0
  351. package/src/app/@modules/inventory-common/supplier/supplier-information/supplier-information.component.scss +0 -0
  352. package/src/app/@modules/inventory-common/supplier/supplier-information/supplier-information.component.ts +68 -0
  353. package/src/app/@modules/inventory-common/supplier/supplier-routing.module.ts +32 -0
  354. package/src/app/@modules/inventory-common/supplier/supplier-type.service.ts +17 -0
  355. package/src/app/@modules/inventory-common/supplier/supplier-view/supplier-view.component.html +60 -0
  356. package/src/app/@modules/inventory-common/supplier/supplier-view/supplier-view.component.ts +58 -0
  357. package/src/app/@modules/inventory-common/supplier/supplier.component.html +3 -0
  358. package/src/app/@modules/inventory-common/supplier/supplier.component.scss +0 -0
  359. package/src/app/@modules/inventory-common/supplier/supplier.component.ts +16 -0
  360. package/src/app/@modules/inventory-common/supplier/supplier.module.ts +42 -0
  361. package/src/app/@modules/inventory-common/supplier/supplier.service.ts +57 -0
  362. package/src/app/@modules/inventory-common/supplier/suppliers-list/suppliers-list.component.html +140 -0
  363. package/src/app/@modules/inventory-common/supplier/suppliers-list/suppliers-list.component.ts +240 -0
  364. package/src/app/@modules/sidebar-layout/expandable-menu/expandable-menu.component.html +10 -0
  365. package/src/app/@modules/sidebar-layout/expandable-menu/expandable-menu.component.scss +20 -0
  366. package/src/app/@modules/sidebar-layout/expandable-menu/expandable-menu.component.ts +24 -0
  367. package/src/app/@modules/sidebar-layout/menu-item.model.ts +12 -0
  368. package/src/app/@modules/sidebar-layout/sidebar-administration-menu/sidebar-administration-menu.component.html +26 -0
  369. package/src/app/@modules/sidebar-layout/sidebar-administration-menu/sidebar-administration-menu.component.ts +23 -0
  370. package/src/app/@modules/sidebar-layout/sidebar-layout/sidebar-layout.component.html +32 -0
  371. package/src/app/@modules/sidebar-layout/sidebar-layout/sidebar-layout.component.scss +48 -0
  372. package/src/app/@modules/sidebar-layout/sidebar-layout/sidebar-layout.component.ts +173 -0
  373. package/src/app/@modules/sidebar-layout/sidebar-layout-routing.module.ts +52 -0
  374. package/src/app/@modules/sidebar-layout/sidebar-layout.module.ts +52 -0
  375. package/src/app/@modules/sidebar-layout/top-menu/top-menu.component.html +85 -0
  376. package/src/app/@modules/sidebar-layout/top-menu/top-menu.component.scss +0 -0
  377. package/src/app/@modules/sidebar-layout/top-menu/top-menu.component.ts +46 -0
  378. package/src/app/@modules/sidebar-layout/top-menu/top-menu.service.ts +29 -0
  379. package/src/app/@modules/techlify-filter/techlify-filter.component.html +442 -0
  380. package/src/app/@modules/techlify-filter/techlify-filter.component.scss +0 -0
  381. package/src/app/@modules/techlify-filter/techlify-filter.component.ts +109 -0
  382. package/src/app/@modules/techlify-filter/techlify-filter.module.ts +24 -0
  383. package/src/app/@modules/user/user-layout/user-layout.component.html +15 -0
  384. package/src/app/@modules/user/user-layout/user-layout.component.scss +0 -0
  385. package/src/app/@modules/user/user-layout/user-layout.component.ts +12 -0
  386. package/src/app/@modules/user/user-routing.module.ts +23 -0
  387. package/src/app/@modules/user/user.module.ts +13 -0
  388. package/src/app/@modules/user-setting-button/user-setting-button/user-setting-button.component.html +15 -0
  389. package/src/app/@modules/user-setting-button/user-setting-button/user-setting-button.component.scss +0 -0
  390. package/src/app/@modules/user-setting-button/user-setting-button/user-setting-button.component.ts +12 -0
  391. package/src/app/@modules/user-setting-button/user-setting-button.module.ts +20 -0
  392. package/src/app/app-routing.module.ts +28 -0
  393. package/src/app/app.component.html +1 -0
  394. package/src/app/app.component.scss +43 -0
  395. package/src/app/app.component.spec.ts +18 -0
  396. package/src/app/app.component.ts +62 -0
  397. package/src/app/app.module.ts +73 -0
  398. package/src/app/material.module.ts +95 -0
  399. package/src/assets/.gitkeep +0 -0
  400. package/src/assets/images/techlify-logo-xs.png +0 -0
  401. package/src/assets/product/product-import-sample.csv +1 -0
  402. package/src/environments/common-environment.ts +36 -0
  403. package/src/environments/environment.prod.ts +10 -0
  404. package/src/environments/environment.staging.ts +19 -0
  405. package/src/environments/environment.ts +18 -0
  406. package/src/favicon.ico +0 -0
  407. package/src/index.html +34 -0
  408. package/src/main.ts +19 -0
  409. package/src/polyfills.ts +57 -0
  410. package/src/styles.scss +366 -0
  411. package/src/test.ts +12 -0
  412. package/src/theme/theme-variables.scss +132 -0
  413. package/src/theme/theme.scss +17 -0
  414. package/src/tsconfig.app.json +15 -0
  415. package/src/tsconfig.spec.json +14 -0
  416. package/tsconfig.app.json +17 -0
  417. package/tsconfig.json +69 -0
  418. package/tslint.json +130 -0
@@ -0,0 +1,109 @@
1
+ import { Component, EventEmitter, Input, OnInit, Output } from "@angular/core";
2
+ import {
3
+ RequestHelperService,
4
+ TechlifyListingControllerInterface,
5
+ Timeline,
6
+ } from "ngx-techlify-core";
7
+ import { StockReceiptService } from "../stock-receipt.service";
8
+ import { FormBuilder, FormGroup } from "@angular/forms";
9
+ import { UntilDestroy } from "@ngneat/until-destroy";
10
+ import { Sort } from "@angular/material/sort";
11
+ import { debounceTime } from "rxjs";
12
+
13
+ @UntilDestroy()
14
+ @Component({
15
+ selector: "app-stock-receipts-list-page",
16
+ templateUrl: "./stock-receipts-list-page.component.html",
17
+ styleUrls: ["./stock-receipts-list-page.component.scss"],
18
+ })
19
+ export class StockReceiptsListPageComponent
20
+ extends TechlifyListingControllerInterface
21
+ implements OnInit
22
+ {
23
+ @Input() product: any;
24
+ @Output() listUpdated: EventEmitter<any> = new EventEmitter<any>();
25
+
26
+ displayedColumns: string[] = [
27
+ "no",
28
+ "product",
29
+ "date",
30
+ "quantity",
31
+ "purchase_price",
32
+ "amount",
33
+ "particulars",
34
+ "supplier",
35
+ "creator",
36
+ "actions",
37
+ ];
38
+ filterConfig: any = {
39
+ duration: {
40
+ label: "Date",
41
+ },
42
+ };
43
+
44
+ constructor(
45
+ private stockReceiptService: StockReceiptService,
46
+ private formBuilder: FormBuilder,
47
+ private requestHelperService: RequestHelperService
48
+ ) {
49
+ super();
50
+ this.lastPage = 0;
51
+ this.filterForm = this.formBuilder.group({
52
+ product_ids: [""],
53
+ duration: [Timeline.THIS_MONTH],
54
+ date_from: [""],
55
+ date_to: [""],
56
+ supplier_ids: [""],
57
+ measure_ids: [""],
58
+ sort_by: ["date|desc"],
59
+ });
60
+ }
61
+
62
+ ngOnInit(): void {
63
+ (this.filterForm as FormGroup).valueChanges
64
+ .pipe(debounceTime(500))
65
+ .subscribe({
66
+ next: () => this.reload(),
67
+ });
68
+ if (this.product) {
69
+ this.filterForm.get("product_ids")?.setValue(this.product?.id);
70
+ const index = this.displayedColumns.indexOf("product");
71
+ if (index !== -1) {
72
+ this.displayedColumns.splice(index, 1);
73
+ }
74
+ }
75
+ }
76
+
77
+ loadData(): void {
78
+ const params: any = {
79
+ page: this.page,
80
+ perPage: this.perPage,
81
+ with: "creator,supplier,product.measure",
82
+ ...this.requestHelperService.convertToFormData(this.filterForm.value),
83
+ };
84
+ this.isWorking = true;
85
+ this.stockReceiptService.index(params).subscribe({
86
+ next: (response: any) => {
87
+ this.models = this.models.concat(response?.data);
88
+ this.lastPage = response?.last_page;
89
+ this.isWorking = false;
90
+ },
91
+ error: () => {
92
+ this.isWorking = false;
93
+ },
94
+ });
95
+ }
96
+
97
+ onSortChange(sort: Sort) {
98
+ console.log(sort);
99
+ let { active, direction } = sort;
100
+ if (!active) {
101
+ active = "date";
102
+ }
103
+ if (!direction) {
104
+ direction = "desc";
105
+ active = "date";
106
+ }
107
+ this.filterForm.get("sort_by").setValue(active + "|" + direction);
108
+ }
109
+ }
@@ -0,0 +1,16 @@
1
+ import { NgModule } from "@angular/core";
2
+ import { RouterModule, Routes } from "@angular/router";
3
+ import { StockReceiptsListPageComponent } from "./stock-receipts-list-page/stock-receipts-list-page.component";
4
+
5
+ const routes: Routes = [
6
+ {
7
+ path: "",
8
+ component: StockReceiptsListPageComponent,
9
+ },
10
+ ];
11
+
12
+ @NgModule({
13
+ imports: [RouterModule.forChild(routes)],
14
+ exports: [RouterModule],
15
+ })
16
+ export class StockReceiptsRoutingModule {}
@@ -0,0 +1,45 @@
1
+ import { NgModule } from "@angular/core";
2
+ import { CommonModule } from "@angular/common";
3
+
4
+ import { StockReceiptsRoutingModule } from "./stock-receipts-routing.module";
5
+ import { StockReceiptsListPageComponent } from "./stock-receipts-list-page/stock-receipts-list-page.component";
6
+ import { MatCardModule } from "@angular/material/card";
7
+ import { MatTableModule } from "@angular/material/table";
8
+ import { MatFormFieldModule } from "@angular/material/form-field";
9
+ import {
10
+ MaterialModule,
11
+ SearchableSelectorModule,
12
+ TimelineFilterModule,
13
+ } from "ngx-techlify-core";
14
+ import { ReactiveFormsModule } from "@angular/forms";
15
+ import { MatProgressBarModule } from "@angular/material/progress-bar";
16
+ import { InfiniteScrollModule } from "ngx-infinite-scroll";
17
+ import { StockReceiptFormModule } from "./stock-receipt-form/stock-receipt-form.module";
18
+ import { StockReceiptDeleteButtonComponent } from "./stock-receipt-delete-button/stock-receipt-delete-button.component";
19
+ import { PayeeSelectorModule } from "@modules/inventory-common/supplier/payee-selector/payee-selector.module";
20
+ import { TechlifyFilterModule } from "@modules/techlify-filter/techlify-filter.module";
21
+
22
+ @NgModule({
23
+ declarations: [
24
+ StockReceiptsListPageComponent,
25
+ StockReceiptDeleteButtonComponent,
26
+ ],
27
+ exports: [StockReceiptDeleteButtonComponent, StockReceiptsListPageComponent],
28
+ imports: [
29
+ CommonModule,
30
+ StockReceiptsRoutingModule,
31
+ MatCardModule,
32
+ TechlifyFilterModule,
33
+ MatTableModule,
34
+ MatFormFieldModule,
35
+ SearchableSelectorModule,
36
+ TimelineFilterModule,
37
+ ReactiveFormsModule,
38
+ PayeeSelectorModule,
39
+ MatProgressBarModule,
40
+ InfiniteScrollModule,
41
+ MaterialModule,
42
+ StockReceiptFormModule,
43
+ ],
44
+ })
45
+ export class StockReceiptsModule {}
@@ -0,0 +1,18 @@
1
+ import { Injectable } from "@angular/core";
2
+ import { HttpService } from "ngx-techlify-core";
3
+
4
+ @Injectable({
5
+ providedIn: "root",
6
+ })
7
+ export class StockSummaryService {
8
+ constructor(private httpService: HttpService) {}
9
+
10
+ /**
11
+ * Get the stocks summary.
12
+ *
13
+ * @param params
14
+ */
15
+ summary(params?: any) {
16
+ return this.httpService.get("api/stocks-summary", { params });
17
+ }
18
+ }
@@ -0,0 +1,22 @@
1
+ <mat-form-field [appearance]="appearance" class="w-100">
2
+ <mat-label>{{ label }}</mat-label>
3
+ <app-searchable-selector
4
+ apiUrl="api/suppliers"
5
+ titleField="company_name"
6
+ sortBy="company_name|asc"
7
+ [required]="required"
8
+ [(ngModel)]="value"
9
+ #payeeSelector="ngModel"
10
+ name="payeeSelector"
11
+ [add]="showAddButton"
12
+ [itemComponent]="SupplierFormComponent"
13
+ (ngModelChange)="onChange($event)"
14
+ [addConfig]="{ width: '600px' }"
15
+ [ngModelOptions]="{ standalone: true }"
16
+ [multiple]="multiple"
17
+ >
18
+ </app-searchable-selector>
19
+ <mat-error *ngIf="payeeSelector.invalid && payeeSelector.touched">
20
+ The payee field is required.
21
+ </mat-error>
22
+ </mat-form-field>
@@ -0,0 +1,44 @@
1
+ import { Component, forwardRef, Input, OnInit } from "@angular/core";
2
+ import { ControlValueAccessor, NG_VALUE_ACCESSOR } from "@angular/forms";
3
+ import { SupplierFormComponent } from "../../supplier-form/supplier-form.component";
4
+ import { MatFormFieldAppearance } from "@angular/material/form-field";
5
+
6
+ @Component({
7
+ selector: "app-payee-selector",
8
+ templateUrl: "./payee-selector.component.html",
9
+ styleUrls: ["./payee-selector.component.scss"],
10
+ providers: [
11
+ {
12
+ provide: NG_VALUE_ACCESSOR,
13
+ useExisting: forwardRef(() => PayeeSelectorComponent),
14
+ multi: true,
15
+ },
16
+ ],
17
+ })
18
+ export class PayeeSelectorComponent implements ControlValueAccessor {
19
+ @Input() label = "Payee";
20
+ @Input() appearance: MatFormFieldAppearance = "fill";
21
+ @Input() required: boolean = false;
22
+ @Input() showAddButton: boolean = false;
23
+ @Input() multiple: boolean = false;
24
+
25
+ value: any;
26
+ onChange: any = () => {};
27
+ onTouch: any = () => {};
28
+
29
+ writeValue(value: any): void {
30
+ this.value = value;
31
+ this.onChange(value);
32
+ this.onTouch(value);
33
+ }
34
+
35
+ registerOnChange(fn: any): void {
36
+ this.onChange = fn;
37
+ }
38
+
39
+ registerOnTouched(fn: any): void {
40
+ this.onTouch = fn;
41
+ }
42
+
43
+ protected readonly SupplierFormComponent = SupplierFormComponent;
44
+ }
@@ -0,0 +1,19 @@
1
+ import { NgModule } from "@angular/core";
2
+ import { CommonModule } from "@angular/common";
3
+ import { PayeeSelectorComponent } from "./payee-selector/payee-selector.component";
4
+ import { MatFormFieldModule } from "@angular/material/form-field";
5
+ import { FormsModule, ReactiveFormsModule } from "@angular/forms";
6
+ import { SearchableSelectorModule } from "ngx-techlify-core";
7
+
8
+ @NgModule({
9
+ declarations: [PayeeSelectorComponent],
10
+ exports: [PayeeSelectorComponent],
11
+ imports: [
12
+ CommonModule,
13
+ MatFormFieldModule,
14
+ ReactiveFormsModule,
15
+ SearchableSelectorModule,
16
+ FormsModule,
17
+ ],
18
+ })
19
+ export class PayeeSelectorModule {}
@@ -0,0 +1,133 @@
1
+ <form
2
+ [formGroup]="supplierForm"
3
+ (ngSubmit)="submit()"
4
+ class="mat-typography p-3"
5
+ >
6
+ <div fxLayout="column">
7
+ <div mat-dialog-title class="text-center">
8
+ <div>Supplier</div>
9
+ </div>
10
+
11
+ <div fxLayout="row" fxLayoutGap="10px">
12
+ <mat-form-field fxFlex="50%">
13
+ <input
14
+ matInput
15
+ formControlName="company_name"
16
+ placeholder="Company Name"
17
+ autocomplete="off"
18
+ required
19
+ />
20
+ <mat-error *ngIf="isFieldValid('company_name')">
21
+ {{ getErrorMessage("company_name") }}
22
+ </mat-error>
23
+ </mat-form-field>
24
+ <mat-form-field fxFlex="50%">
25
+ <input
26
+ matInput
27
+ formControlName="contact_name"
28
+ placeholder="Contact Name"
29
+ autocomplete="off"
30
+ required
31
+ />
32
+ <mat-error *ngIf="isFieldValid('contact_name')">
33
+ {{ getErrorMessage("contact_name") }}
34
+ </mat-error>
35
+ </mat-form-field>
36
+ </div>
37
+
38
+ <div fxLayout="row" fxLayoutGap="10px">
39
+ <mat-form-field fxFlex="50%">
40
+ <mat-label>Types</mat-label>
41
+ <app-searchable-selector
42
+ titleField="title"
43
+ apiUrl="api/supplier-types"
44
+ formControlName="supplier_type_id"
45
+ >
46
+ </app-searchable-selector>
47
+ <mat-error *ngIf="isFieldValid('supplier_type_id')">
48
+ {{ getErrorMessage("supplier_type_id") }}
49
+ </mat-error>
50
+ </mat-form-field>
51
+ <mat-form-field fxFlex="50%">
52
+ <input
53
+ matInput
54
+ formControlName="phone"
55
+ placeholder="Phone"
56
+ autocomplete="off"
57
+ required
58
+ />
59
+ <mat-error *ngIf="isFieldValid('phone')">
60
+ {{ getErrorMessage("phone") }}
61
+ </mat-error>
62
+ </mat-form-field>
63
+ </div>
64
+
65
+ <div fxLayout="row wrap">
66
+ <mat-form-field fxFlex="100%" class="mt-1">
67
+ <input
68
+ matInput
69
+ formControlName="email"
70
+ placeholder="Email"
71
+ autocomplete="off"
72
+ required
73
+ />
74
+ <mat-error *ngIf="isFieldValid('email')">
75
+ {{ getErrorMessage("email") }}
76
+ </mat-error>
77
+ </mat-form-field>
78
+
79
+ <mat-form-field fxFlex="100%" class="mt-1">
80
+ <input
81
+ matInput
82
+ formControlName="address"
83
+ placeholder="Address"
84
+ autocomplete="off"
85
+ required
86
+ />
87
+ <mat-error *ngIf="isFieldValid('address')">
88
+ {{ getErrorMessage("address") }}
89
+ </mat-error>
90
+ </mat-form-field>
91
+
92
+ <mat-form-field fxFlex="100%" class="mt-1">
93
+ <input
94
+ matInput
95
+ formControlName="details"
96
+ placeholder="Details"
97
+ autocomplete="off"
98
+ required
99
+ />
100
+ <mat-error *ngIf="isFieldValid('details')">
101
+ {{ getErrorMessage("details") }}
102
+ </mat-error>
103
+ </mat-form-field>
104
+ </div>
105
+
106
+ <div fxLayout="row">
107
+ <div
108
+ class="my-2"
109
+ fxLayout="row"
110
+ fxLayoutGap="30px"
111
+ fxLayoutAlign="end"
112
+ fxFlex="100%"
113
+ >
114
+ <button
115
+ [disabled]="isWorking"
116
+ mat-flat-button
117
+ type="button"
118
+ (click)="dialogRef.close()"
119
+ >
120
+ Cancel
121
+ </button>
122
+ <button
123
+ [disabled]="isWorking"
124
+ mat-raised-button
125
+ type="submit"
126
+ color="primary"
127
+ >
128
+ Save
129
+ </button>
130
+ </div>
131
+ </div>
132
+ </div>
133
+ </form>
@@ -0,0 +1,116 @@
1
+ import { SupplierService } from "./../supplier.service";
2
+ import { Component, Inject, OnInit } from "@angular/core";
3
+ import { FormBuilder, FormGroup, Validators } from "@angular/forms";
4
+ import { MatDialogRef, MAT_DIALOG_DATA } from "@angular/material/dialog";
5
+ import { NgxSpinnerService } from "ngx-spinner";
6
+ import {
7
+ AlertService,
8
+ ErrorHandlerService,
9
+ FormValidatorService,
10
+ TechlifyFormComponentInterface,
11
+ } from "ngx-techlify-core";
12
+ import { lastValueFrom } from "rxjs";
13
+
14
+ @Component({
15
+ selector: "app-supplier-form",
16
+ templateUrl: "./supplier-form.component.html",
17
+ })
18
+ export class SupplierFormComponent
19
+ extends TechlifyFormComponentInterface
20
+ implements OnInit
21
+ {
22
+ override errorMessages: any = {
23
+ contact_name: {
24
+ required: "Contact Name is required",
25
+ },
26
+ company_name: {
27
+ required: "Company Name is required",
28
+ },
29
+ address: {
30
+ required: "Address is required",
31
+ },
32
+ phone: {
33
+ required: "Phone is required",
34
+ },
35
+ details: {
36
+ required: "Details is required",
37
+ },
38
+ email: {
39
+ required: "Email is required",
40
+ },
41
+ supplier_type_id: {
42
+ required: "Supplier Type is required",
43
+ },
44
+ };
45
+
46
+ isWorking: boolean = false;
47
+ isUpdateMode: boolean = false;
48
+ supplierForm: FormGroup;
49
+
50
+ constructor(
51
+ private fb: FormBuilder,
52
+ formValidatorService: FormValidatorService,
53
+ private alertService: AlertService,
54
+ private spinnerService: NgxSpinnerService,
55
+ public dialogRef: MatDialogRef<SupplierFormComponent>,
56
+ private errorService: ErrorHandlerService,
57
+ @Inject(MAT_DIALOG_DATA) public data: any,
58
+ private supplierService: SupplierService
59
+ ) {
60
+ super(formValidatorService);
61
+ this.supplierForm = this.fb.group({
62
+ id: [""],
63
+ contact_name: ["", Validators.compose([Validators.required])],
64
+ company_name: ["", Validators.compose([Validators.required])],
65
+ details: ["", Validators.compose([Validators.required])],
66
+ address: ["", Validators.compose([Validators.required])],
67
+ phone: ["", Validators.compose([Validators.required])],
68
+ email: ["", Validators.compose([Validators.required])],
69
+ supplier_type_id: ["", Validators.compose([Validators.required])],
70
+ });
71
+ }
72
+
73
+ ngOnInit() {
74
+ if (this.data.details) {
75
+ this.isUpdateMode = true;
76
+ this.supplierForm.patchValue(this.data.details);
77
+ }
78
+ }
79
+
80
+ async submit() {
81
+ if (!this.supplierForm.valid) {
82
+ this.alertService.addAlert("Please Fill All Required Fields", "warn");
83
+ this.supplierForm.markAllAsTouched();
84
+ return;
85
+ }
86
+
87
+ var supplier = this.supplierForm.value;
88
+ try {
89
+ this.spinnerService.show();
90
+ this.isWorking = true;
91
+ let result = this.isUpdateMode
92
+ ? await lastValueFrom(this.supplierService.update(supplier))
93
+ : await lastValueFrom(this.supplierService.store(supplier));
94
+ this.dialogRef.close(result);
95
+ } catch (error) {
96
+ this.errorService.handleError(error);
97
+ } finally {
98
+ this.isWorking = false;
99
+ this.spinnerService.hide();
100
+ }
101
+ }
102
+
103
+ /**Method to evaluate form fields*/
104
+ override isFieldValid(field: string) {
105
+ return this.formValidatorService.isFieldValid(field, this.supplierForm);
106
+ }
107
+
108
+ /**Method to find error in form fields*/
109
+ override getErrorMessage(field: string) {
110
+ return this.formValidatorService.getErrorMessage(
111
+ field,
112
+ this.supplierForm,
113
+ this.errorMessages
114
+ );
115
+ }
116
+ }
@@ -0,0 +1,11 @@
1
+ import { Injectable } from "@angular/core";
2
+ import TechlifyFormService from "@modules/@shared/techlify-form-service";
3
+
4
+ @Injectable({
5
+ providedIn: "root",
6
+ })
7
+ export class SupplierFormService extends TechlifyFormService {
8
+ constructor() {
9
+ super();
10
+ }
11
+ }
@@ -0,0 +1,67 @@
1
+ <mat-card>
2
+ <mat-card-content>
3
+ <div class="d-flex justify-content-between align-items-center">
4
+ <h3 class="mb-0">Personal Information</h3>
5
+ <div class="d-flex justify-content-end align-items-center gap-1">
6
+ <app-audit-log-for-model
7
+ [modelId]="supplier?.id"
8
+ modelType="Supplier"
9
+ logView="all"
10
+ ></app-audit-log-for-model>
11
+ <mat-icon
12
+ class="material-icons cursor-pointer"
13
+ (click)="modifySupplier(supplier)"
14
+ >
15
+ edit
16
+ </mat-icon>
17
+ <mat-icon
18
+ class="material-icons cursor-pointer"
19
+ (click)="deleteSupplier(supplier)"
20
+ >
21
+ delete
22
+ </mat-icon>
23
+ </div>
24
+ </div>
25
+
26
+ <mat-divider></mat-divider>
27
+
28
+ <div class="mt-2">
29
+ <div class="d-flex justify-content-start gap-2">
30
+ <div>
31
+ <h3 class="mb-0">{{ supplier?.company_name }}</h3>
32
+ <span class="status-pill-sm status-light-orange">{{
33
+ supplier?.type?.title
34
+ }}</span>
35
+ </div>
36
+ </div>
37
+ </div>
38
+
39
+ <div class="row mt-3">
40
+ <div class="col-6">
41
+ <p class="text-muted mb-0">Contact Name</p>
42
+ <p class="text-wrap">{{ supplier?.contact_name }}</p>
43
+ </div>
44
+ <div class="col-6">
45
+ <p class="text-muted mb-0">Email</p>
46
+ <p class="text-wrap">{{ supplier?.email }}</p>
47
+ </div>
48
+ <div class="col-6">
49
+ <p class="text-muted mb-0">Phone</p>
50
+ <p class="text-wrap">{{ supplier?.phone }}</p>
51
+ </div>
52
+ <div class="col-6">
53
+ <p class="text-muted mb-0">Details</p>
54
+ <p class="text-wrap">{{ supplier?.details }}</p>
55
+ </div>
56
+ </div>
57
+
58
+ <div class="row mt-2 h-100">
59
+ <div class="d-flex">
60
+ <mat-icon class="material-icons text-primary my-auto"
61
+ >location_on</mat-icon
62
+ >
63
+ <p class="ms-2 my-auto">{{ supplier?.address }}</p>
64
+ </div>
65
+ </div>
66
+ </mat-card-content>
67
+ </mat-card>
@@ -0,0 +1,68 @@
1
+ import { Component, Input } from "@angular/core";
2
+ import {
3
+ ActionPopup,
4
+ ActionPopupComponent,
5
+ AlertService,
6
+ ErrorHandlerService,
7
+ } from "ngx-techlify-core";
8
+ import { SupplierFormComponent } from "../supplier-form/supplier-form.component";
9
+ import { MatDialog } from "@angular/material/dialog";
10
+ import { SupplierService } from "../supplier.service";
11
+ import { Router } from "@angular/router";
12
+
13
+ @Component({
14
+ selector: "app-supplier-information",
15
+ templateUrl: "./supplier-information.component.html",
16
+ })
17
+ export class SupplierInformationComponent {
18
+ @Input() supplier!: any;
19
+
20
+ constructor(
21
+ private dialog: MatDialog,
22
+ private supplierService: SupplierService,
23
+ private alertService: AlertService,
24
+ private router: Router,
25
+ private errorService: ErrorHandlerService
26
+ ) {}
27
+
28
+ modifySupplier(model?: any) {
29
+ const dialogRef = this.dialog.open(SupplierFormComponent, {
30
+ width: "600px",
31
+ data: {
32
+ details: model,
33
+ },
34
+ });
35
+ dialogRef.afterClosed().subscribe((result: any) => {
36
+ if (result) {
37
+ location.reload();
38
+ }
39
+ });
40
+ }
41
+
42
+ deleteSupplier(id: any) {
43
+ const dialogRef = this.dialog.open(ActionPopupComponent, {
44
+ width: "400px",
45
+ data: <ActionPopup>{
46
+ title: "Delete Supplier",
47
+ message: "Are you sure you want to delete this supplier?",
48
+ },
49
+ autoFocus: false,
50
+ });
51
+
52
+ dialogRef.afterClosed().subscribe(async (result: any) => {
53
+ if (result) {
54
+ try {
55
+ const result = await this.supplierService.destroy(id);
56
+ this.alertService.addAlert(
57
+ "Successfully Deleted Supplier",
58
+ "success"
59
+ );
60
+ } catch (error) {
61
+ this.errorService.handleError(error);
62
+ } finally {
63
+ this.router.navigateByUrl("/suppliers");
64
+ }
65
+ }
66
+ });
67
+ }
68
+ }