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,20 @@
1
+ .main-nav-items {
2
+ list-style: none;
3
+ padding-inline-start: 0;
4
+ margin-top: 5px;
5
+ margin-left: 24px;
6
+ border-left: 1px solid #d9d9d9;
7
+ font-size: 14px;
8
+
9
+ .material-symbols-outlined {
10
+ font-size: 20px;
11
+ }
12
+ }
13
+ a:hover,
14
+ .active {
15
+ color: white !important;
16
+ }
17
+ a {
18
+ text-decoration: none;
19
+ color: #787486;
20
+ }
@@ -0,0 +1,24 @@
1
+ import { Component, Input, OnInit } from "@angular/core";
2
+ import { MenuItem } from "../menu-item.model";
3
+ import { TopMenuService } from "../top-menu/top-menu.service";
4
+
5
+ @Component({
6
+ selector: "app-expandable-menu",
7
+ templateUrl: "./expandable-menu.component.html",
8
+ styleUrls: ["./expandable-menu.component.scss"],
9
+ })
10
+ export class ExpandableMenuComponent implements OnInit {
11
+ @Input() item!: MenuItem;
12
+ @Input() isActive: boolean = false;
13
+ selectedItem!: MenuItem;
14
+
15
+ constructor(public topMenuService: TopMenuService) {}
16
+
17
+ ngOnInit(): void {
18
+ this.topMenuService.getSelectedMenuItem().subscribe({
19
+ next: (item: MenuItem) => {
20
+ this.selectedItem = item;
21
+ },
22
+ });
23
+ }
24
+ }
@@ -0,0 +1,12 @@
1
+ import { Params } from "@angular/router";
2
+
3
+ export interface MenuItem {
4
+ title: string;
5
+ icon: string;
6
+ link: string;
7
+ permissions: string[];
8
+ children?: MenuItem[];
9
+ display?: "icon" | "button";
10
+ action?: () => void;
11
+ queryParams?: Params;
12
+ }
@@ -0,0 +1,26 @@
1
+ <div class="sidebar-section-header">
2
+ <div fxLayout fxLayoutAlign="space-between center">
3
+ <div fxLayout fxLayoutAlign="start center" fxLayoutGap="5px">
4
+ <span>Administration</span>
5
+ </div>
6
+ <div fxLayout fxLayoutAlign="start center" fxLayoutGap="5px">
7
+ <mat-icon class="cursor-pointer" (click)="expandMore = !expandMore">
8
+ {{ !expandMore ? "expand_more" : "expand_less" }}
9
+ </mat-icon>
10
+ </div>
11
+ </div>
12
+ </div>
13
+ <div class="sidebar-section-content" *ngIf="expandMore">
14
+ <ul class="projects-list">
15
+ <li class="project-item" routerLinkActive="active">
16
+ <div fxLayout fxLayoutAlign="space-between center">
17
+ <a [routerLink]="['/techlify-rbac']"> Users </a>
18
+ </div>
19
+ </li>
20
+ <li class="project-item" routerLinkActive="active">
21
+ <div fxLayout fxLayoutAlign="space-between center">
22
+ <a class="cursor-pointer" (click)="logout()"> Logout </a>
23
+ </div>
24
+ </li>
25
+ </ul>
26
+ </div>
@@ -0,0 +1,23 @@
1
+ import { Component } from "@angular/core";
2
+ import { CurrentUserService } from "ngx-techlify-core";
3
+ import { AuthenticationService, CredentialsService } from "ngx-techlify-core";
4
+ import { Router } from "@angular/router";
5
+
6
+ @Component({
7
+ selector: "app-sidebar-administration-menu",
8
+ templateUrl: "./sidebar-administration-menu.component.html",
9
+ })
10
+ export class SidebarAdministrationMenuComponent {
11
+ expandMore: boolean = false;
12
+
13
+ constructor(
14
+ private authenticationService: AuthenticationService,
15
+ private router: Router
16
+ ) {}
17
+
18
+ logout(): void {
19
+ this.authenticationService
20
+ .logout()
21
+ .subscribe(() => this.router.navigate(["/login"], { replaceUrl: true }));
22
+ }
23
+ }
@@ -0,0 +1,32 @@
1
+ <app-top-menu [selectedProduct]="selectedProduct"></app-top-menu>
2
+
3
+ <div class="sidenav d-print-none" *ngIf="!isPrinting">
4
+ <div
5
+ fxLayout="column"
6
+ fxLayoutAlign="space-between"
7
+ style="margin-bottom: 50px; margin-top: 50px"
8
+ >
9
+ <ul class="main-nav-items">
10
+ <li
11
+ *ngFor="let item of mainMenuItems"
12
+ [class.active]="selectedItem && isMenuItemActive(item)"
13
+ (click)="topMenuService.updateSelectedMenuItem(item)"
14
+ >
15
+ <ng-container
16
+ *ngxPermissionsOnly="
17
+ item?.permissions ? item.permissions : ['client_admin', 'app_admin']
18
+ "
19
+ >
20
+ <app-expandable-menu
21
+ [item]="item"
22
+ [isActive]="selectedItem && isMenuItemActive(item)"
23
+ ></app-expandable-menu>
24
+ </ng-container>
25
+ </li>
26
+ </ul>
27
+ </div>
28
+ </div>
29
+
30
+ <div [class.main]="!isPrinting">
31
+ <router-outlet></router-outlet>
32
+ </div>
@@ -0,0 +1,48 @@
1
+ $sidebar-width: 70px;
2
+ .sidenav {
3
+ height: 100%;
4
+ width: $sidebar-width;
5
+ position: fixed;
6
+ z-index: 1;
7
+ top: 0;
8
+ left: 0;
9
+ overflow-x: hidden;
10
+ background: white;
11
+ border-right: 1px solid #d9d9d9;
12
+ }
13
+ /* Hide the scrollbar but keep scrolling functionality */
14
+ .sidenav::-webkit-scrollbar {
15
+ width: 0; /* for Chrome, Safari, and Opera */
16
+ }
17
+ .sidenav {
18
+ -ms-overflow-style: none; /* for Internet Explorer and Edge */
19
+ scrollbar-width: none; /* for Firefox */
20
+ }
21
+
22
+ /* Optional: Add custom styles for the scrollbar track and thumb */
23
+ .sidenav::-webkit-scrollbar-track {
24
+ background: transparent;
25
+ }
26
+ .sidenav::-webkit-scrollbar-thumb {
27
+ background: transparent;
28
+ }
29
+
30
+ .main {
31
+ margin-left: $sidebar-width;
32
+ padding: 1rem;
33
+ margin-top: 40px;
34
+ }
35
+ .main-nav-items {
36
+ list-style: none;
37
+ padding-inline-start: 0;
38
+
39
+ li:hover,
40
+ .active {
41
+ background: rgba(0, 159, 221);
42
+ color: white !important;
43
+ }
44
+ }
45
+ .user-profile-container {
46
+ border-right: 1px solid #d9d9d9;
47
+ width: inherit;
48
+ }
@@ -0,0 +1,173 @@
1
+ import { Component, OnInit } from "@angular/core";
2
+ import { MenuItem } from "../menu-item.model";
3
+ import { TopMenuService } from "../top-menu/top-menu.service";
4
+ import { Router } from "@angular/router";
5
+ import { MatDialog } from "@angular/material/dialog";
6
+ import { PrintService } from "@modules/@shared/print-button/print.service";
7
+
8
+ @Component({
9
+ selector: "app-sidebar-layout",
10
+ templateUrl: "./sidebar-layout.component.html",
11
+ styleUrls: ["./sidebar-layout.component.scss"],
12
+ })
13
+ export class SidebarLayoutComponent implements OnInit {
14
+ isPrinting: boolean = false;
15
+ selectedItem!: MenuItem;
16
+ selectedProduct!: string;
17
+ mainMenuItems: MenuItem[] = [
18
+ {
19
+ title: "Dashboard",
20
+ icon: "grid_view",
21
+ link: "/inventory/dashboard",
22
+ permissions: [],
23
+ children: [
24
+ {
25
+ title: "Dashboard",
26
+ icon: "grid_view",
27
+ link: "/inventory/dashboard",
28
+ permissions: [],
29
+ },
30
+ ],
31
+ },
32
+ {
33
+ title: "Product",
34
+ icon: "inventory",
35
+ link: "/inventory/products",
36
+ permissions: [],
37
+ children: [
38
+ {
39
+ title: "Products",
40
+ icon: "inventory",
41
+ link: "/inventory/products",
42
+ permissions: [],
43
+ },
44
+ {
45
+ title: "Stock Receipts",
46
+ icon: "inventory",
47
+ link: "/inventory/stock-receipts",
48
+ permissions: [],
49
+ },
50
+ {
51
+ title: "Stock Issuances",
52
+ icon: "inventory",
53
+ link: "/inventory/stock-issuances",
54
+ permissions: [],
55
+ },
56
+ {
57
+ title: "Settings",
58
+ icon: "settings",
59
+ link: "",
60
+ permissions: [],
61
+ children: [
62
+ {
63
+ title: "Category",
64
+ icon: "inventory",
65
+ link: "/inventory/categories",
66
+ permissions: [],
67
+ },
68
+ {
69
+ title: "Measure",
70
+ icon: "inventory",
71
+ link: "/inventory/measures",
72
+ permissions: [],
73
+ },
74
+ ],
75
+ },
76
+ ],
77
+ },
78
+ {
79
+ title: "Supplier",
80
+ icon: "manage_accounts",
81
+ link: "/inventory/suppliers",
82
+ permissions: [],
83
+ },
84
+ {
85
+ title: "Admin",
86
+ icon: "shield_person",
87
+ link: "/administration",
88
+ permissions: [],
89
+ children: [
90
+ {
91
+ title: "Users",
92
+ icon: "assignment_ind",
93
+ link: "/administration/techlify-rbac",
94
+ permissions: ["user_read"],
95
+ },
96
+ {
97
+ title: "Audit Logs",
98
+ icon: "sync_alt",
99
+ link: "/administration/audit-logs",
100
+ permissions: [],
101
+ },
102
+ {
103
+ title: "Features",
104
+ icon: "feature_search",
105
+ link: "/administration/features",
106
+ permissions: [],
107
+ },
108
+ ],
109
+ },
110
+ ];
111
+
112
+ constructor(
113
+ public printService: PrintService,
114
+ public topMenuService: TopMenuService,
115
+ private router: Router,
116
+ public dialog: MatDialog
117
+ ) {
118
+ // Listen for print action
119
+ this.printService
120
+ .getIsPrinting()
121
+ .subscribe((val: boolean) => (this.isPrinting = val));
122
+ }
123
+
124
+ ngOnInit(): void {
125
+ this.getInitialRoute();
126
+ // get the selected menu item.
127
+ this.topMenuService.getSelectedMenuItem().subscribe({
128
+ next: (item: MenuItem) => {
129
+ this.selectedItem = item;
130
+ },
131
+ });
132
+ }
133
+
134
+ findMainParentByPath(path: string, menu: MenuItem[]): MenuItem | null {
135
+ for (const item of menu) {
136
+ // Check if the current path starts with the item's link
137
+ if (path.startsWith(item.link)) {
138
+ // If this item matches, return it as the topmost parent without going deeper
139
+ return item;
140
+ }
141
+ // No need to traverse children since we want the topmost parent
142
+ }
143
+ return null; // No match found
144
+ }
145
+
146
+ isMenuItemActive(item: MenuItem): boolean {
147
+ // Check if the item itself matches the selected item
148
+ if (this.selectedItem && this.selectedItem.link === item.link) {
149
+ return true;
150
+ }
151
+
152
+ // Recursively check if any of the children match the selected item
153
+ if (item.children && item.children.length > 0) {
154
+ return item.children.some((child) => this.isMenuItemActive(child));
155
+ }
156
+
157
+ return false;
158
+ }
159
+
160
+ /**
161
+ * On page refresh get the menu item from route url and set initial menu item.
162
+ *
163
+ * @private
164
+ */
165
+ private getInitialRoute() {
166
+ // Get the main url path only, exclude query params
167
+ const url: string = this.router.url.split("?")[0];
168
+ const selectedItem = this.findMainParentByPath(url, this.mainMenuItems);
169
+ if (selectedItem) {
170
+ this.topMenuService.updateSelectedMenuItem(selectedItem);
171
+ }
172
+ }
173
+ }
@@ -0,0 +1,52 @@
1
+ import { NgModule } from "@angular/core";
2
+ import { RouterModule, Routes } from "@angular/router";
3
+ import { AuthenticationGuard } from "ngx-techlify-core";
4
+ import { SidebarLayoutComponent } from "@modules/sidebar-layout/sidebar-layout/sidebar-layout.component";
5
+
6
+ const routes: Routes = [
7
+ {
8
+ path: "",
9
+ component: SidebarLayoutComponent,
10
+ children: [
11
+ {
12
+ path: "inventory",
13
+ loadChildren: () =>
14
+ import("@modules/inventory-common/inventory-common.module").then(
15
+ (m) => m.InventoryCommonModule
16
+ ),
17
+ canActivate: [AuthenticationGuard],
18
+ },
19
+ {
20
+ path: "techlify-rbac",
21
+ loadChildren: () =>
22
+ import("@modules/user/user.module").then((mod) => mod.UserModule),
23
+ canLoad: [AuthenticationGuard],
24
+ },
25
+ {
26
+ path: "administration",
27
+ loadChildren: () =>
28
+ import("../../@modules/administration/administration.module").then(
29
+ (m) => m.AdministrationModule
30
+ ),
31
+ },
32
+ {
33
+ path: "change-password",
34
+ loadChildren: () =>
35
+ import("ngx-techlify-core").then((mod) => mod.ChangePasswordModule),
36
+ },
37
+ { path: "", redirectTo: "inventory/dashboard", pathMatch: "full" },
38
+ {
39
+ path: "**",
40
+ redirectTo: "inventory/dashboard",
41
+ pathMatch: "full",
42
+ canLoad: [AuthenticationGuard],
43
+ },
44
+ ],
45
+ },
46
+ ];
47
+
48
+ @NgModule({
49
+ imports: [RouterModule.forChild(routes)],
50
+ exports: [RouterModule],
51
+ })
52
+ export class SidebarLayoutRoutingModule {}
@@ -0,0 +1,52 @@
1
+ import { NgModule } from "@angular/core";
2
+ import { CommonModule, NgOptimizedImage } from "@angular/common";
3
+
4
+ import { SidebarLayoutRoutingModule } from "./sidebar-layout-routing.module";
5
+ import { SidebarLayoutComponent } from "./sidebar-layout/sidebar-layout.component";
6
+ import { MatSidenavModule } from "@angular/material/sidenav";
7
+ import { FlexModule } from "@angular/flex-layout";
8
+ import { MatIconModule } from "@angular/material/icon";
9
+ import { MatExpansionModule } from "@angular/material/expansion";
10
+ import { MatTreeModule } from "@angular/material/tree";
11
+ import { MatButtonModule } from "@angular/material/button";
12
+ import { MatFormFieldModule } from "@angular/material/form-field";
13
+ import { MatInputModule } from "@angular/material/input";
14
+ import { ReactiveFormsModule } from "@angular/forms";
15
+ import { SidebarAdministrationMenuComponent } from "./sidebar-administration-menu/sidebar-administration-menu.component";
16
+ import { MatDialogModule } from "@angular/material/dialog";
17
+ import { ExpandableMenuComponent } from "./expandable-menu/expandable-menu.component";
18
+ import { TopMenuComponent } from "./top-menu/top-menu.component";
19
+ import { MatTooltipModule } from "@angular/material/tooltip";
20
+ import { MatMenuModule } from "@angular/material/menu";
21
+ import { NgxPermissionsModule } from "ngx-permissions";
22
+ import { UserMenuModule } from "@modules/@shared/user-menu/user-menu.module";
23
+
24
+ @NgModule({
25
+ declarations: [
26
+ SidebarLayoutComponent,
27
+ SidebarAdministrationMenuComponent,
28
+ ExpandableMenuComponent,
29
+ TopMenuComponent,
30
+ ],
31
+ exports: [TopMenuComponent],
32
+ imports: [
33
+ CommonModule,
34
+ SidebarLayoutRoutingModule,
35
+ MatSidenavModule,
36
+ FlexModule,
37
+ MatIconModule,
38
+ MatExpansionModule,
39
+ MatTreeModule,
40
+ MatButtonModule,
41
+ MatFormFieldModule,
42
+ MatInputModule,
43
+ ReactiveFormsModule,
44
+ MatDialogModule,
45
+ NgOptimizedImage,
46
+ MatTooltipModule,
47
+ MatMenuModule,
48
+ NgxPermissionsModule.forChild(),
49
+ UserMenuModule,
50
+ ],
51
+ })
52
+ export class SidebarLayoutModule {}
@@ -0,0 +1,85 @@
1
+ <div
2
+ class="fixed-top top-menu-container d-flex justify-content-start align-items-center gap-2"
3
+ *ngIf="!isPrinting"
4
+ >
5
+ <a
6
+ class="text-decoration-none d-flex align-items-center"
7
+ routerLink="/dashboard"
8
+ >
9
+ <img
10
+ src="assets/images/techlify-logo-xs.png"
11
+ style="height: 20px"
12
+ alt="Logo"
13
+ />
14
+ <h3 class="mb-0 text-primary">{{ selectedProduct }}</h3>
15
+ </a>
16
+ <ng-container *ngFor="let child of menuItem?.children">
17
+ <ng-container *ngIf="child?.display === 'icon'">
18
+ <mat-icon
19
+ [matTooltip]="child.title"
20
+ color="primary"
21
+ class="cursor-pointer"
22
+ (click)="redirectToAction(child)"
23
+ *ngxPermissionsOnly="child.permissions"
24
+ >
25
+ {{ child.icon }}
26
+ </mat-icon>
27
+ </ng-container>
28
+
29
+ <ng-container *ngIf="child.display !== 'icon'">
30
+ <ng-container
31
+ *ngTemplateOutlet="
32
+ child?.children ? menuItemWithChild : menuItemWithoutChild;
33
+ context: { item: child }
34
+ "
35
+ ></ng-container>
36
+ </ng-container>
37
+ </ng-container>
38
+ <span fxFlex="1 1 auto"></span>
39
+ <app-user-menu></app-user-menu>
40
+ </div>
41
+
42
+ <ng-template #menuItemWithChild let-item="item">
43
+ <a
44
+ class="d-flex align-items-center gap-2 text-decoration-none text-secondary btn-xs cursor-pointer"
45
+ [matMenuTriggerFor]="menuWithChildren"
46
+ *ngxPermissionsOnly="item.permissions"
47
+ >
48
+ <span *ngIf="item.icon" class="material-symbols-outlined top-menu-icon">
49
+ {{ item.icon }}
50
+ </span>
51
+ <div class="d-flex justify-content-start align-items-center gap-0">
52
+ <p class="m-0">{{ item.title }}</p>
53
+ <span
54
+ *ngIf="item.children?.length > 0"
55
+ class="material-symbols-outlined top-menu-icon mt-1"
56
+ >
57
+ arrow_drop_down
58
+ </span>
59
+ </div>
60
+ </a>
61
+ <mat-menu #menuWithChildren="matMenu">
62
+ <ng-container *ngFor="let child of item?.children">
63
+ <button
64
+ *ngxPermissionsOnly="child.permissions"
65
+ mat-menu-item
66
+ (click)="redirectToAction(child)"
67
+ >
68
+ {{ child.title }}
69
+ </button>
70
+ </ng-container>
71
+ </mat-menu>
72
+ </ng-template>
73
+
74
+ <ng-template #menuItemWithoutChild let-item="item">
75
+ <a
76
+ class="d-flex align-items-center gap-1 text-decoration-none text-secondary btn-xs cursor-pointer"
77
+ (click)="redirectToAction(item)"
78
+ *ngxPermissionsOnly="item.permissions"
79
+ >
80
+ <span *ngIf="item.icon" class="material-symbols-outlined top-menu-icon">
81
+ {{ item.icon }}
82
+ </span>
83
+ <p class="m-0">{{ item.title }}</p>
84
+ </a>
85
+ </ng-template>
@@ -0,0 +1,46 @@
1
+ import { Component, Input, OnInit } from "@angular/core";
2
+ import { TopMenuService } from "./top-menu.service";
3
+ import { MenuItem } from "../menu-item.model";
4
+ import { Router } from "@angular/router";
5
+ import { PrintService } from "@modules/@shared/print-button/print.service";
6
+
7
+ @Component({
8
+ selector: "app-top-menu",
9
+ templateUrl: "./top-menu.component.html",
10
+ styleUrls: ["./top-menu.component.scss"],
11
+ })
12
+ export class TopMenuComponent implements OnInit {
13
+ @Input() selectedProduct!: string;
14
+ menuItem!: MenuItem;
15
+ isPrinting = false;
16
+
17
+ constructor(
18
+ private topMenuService: TopMenuService,
19
+ private router: Router,
20
+ private printService: PrintService
21
+ ) {}
22
+
23
+ ngOnInit(): void {
24
+ this.topMenuService.getSelectedMenuItem().subscribe({
25
+ next: (item: MenuItem) => {
26
+ this.menuItem = item;
27
+ },
28
+ });
29
+ this.printService
30
+ .getIsPrinting()
31
+ .subscribe((val: boolean) => (this.isPrinting = val));
32
+ }
33
+
34
+ /**
35
+ * Handle the click action on icon.
36
+ *
37
+ * @param child
38
+ */
39
+ redirectToAction(child: MenuItem) {
40
+ if (child.action) {
41
+ child.action();
42
+ } else {
43
+ this.router.navigate([child.link], { queryParams: child?.queryParams });
44
+ }
45
+ }
46
+ }
@@ -0,0 +1,29 @@
1
+ import { Injectable } from "@angular/core";
2
+ import { BehaviorSubject, Observable } from "rxjs";
3
+ import { MenuItem } from "../menu-item.model";
4
+
5
+ @Injectable({
6
+ providedIn: "root",
7
+ })
8
+ export class TopMenuService {
9
+ constructor() {}
10
+
11
+ private initialSelectedItem: MenuItem = {
12
+ title: "Dashboard",
13
+ icon: "grid_view",
14
+ link: "/dashboard",
15
+ permissions: [],
16
+ };
17
+
18
+ private selectedMenuItem: BehaviorSubject<MenuItem> = new BehaviorSubject(
19
+ this.initialSelectedItem
20
+ );
21
+
22
+ getSelectedMenuItem(): Observable<MenuItem> {
23
+ return this.selectedMenuItem.asObservable();
24
+ }
25
+
26
+ updateSelectedMenuItem(menuItem: MenuItem) {
27
+ this.selectedMenuItem.next(menuItem);
28
+ }
29
+ }