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.
- package/.editorconfig +13 -0
- package/README.md +27 -0
- package/angular.json +207 -0
- package/e2e/protractor.conf.js +28 -0
- package/e2e/src/app.e2e-spec.ts +14 -0
- package/e2e/src/app.po.ts +11 -0
- package/e2e/tsconfig.e2e.json +13 -0
- package/ng-package.json +6 -0
- package/package.json +92 -0
- package/projects/inventory-common/README.md +24 -0
- package/projects/inventory-common/ng-package.json +7 -0
- package/projects/inventory-common/package.json +12 -0
- package/projects/inventory-common/src/lib/inventory-common/category/category-form/category-form.component.html +41 -0
- package/projects/inventory-common/src/lib/inventory-common/category/category-form/category-form.component.scss +0 -0
- package/projects/inventory-common/src/lib/inventory-common/category/category-form/category-form.component.ts +75 -0
- package/projects/inventory-common/src/lib/inventory-common/category/category-form-button/category-form-button.component.html +32 -0
- package/projects/inventory-common/src/lib/inventory-common/category/category-form-button/category-form-button.component.scss +0 -0
- package/projects/inventory-common/src/lib/inventory-common/category/category-form-button/category-form-button.component.ts +29 -0
- package/projects/inventory-common/src/lib/inventory-common/category/category-list-page/category-list-page.component.html +79 -0
- package/projects/inventory-common/src/lib/inventory-common/category/category-list-page/category-list-page.component.scss +0 -0
- package/projects/inventory-common/src/lib/inventory-common/category/category-list-page/category-list-page.component.ts +61 -0
- package/projects/inventory-common/src/lib/inventory-common/category/category-routing.module.ts +16 -0
- package/projects/inventory-common/src/lib/inventory-common/category/category.module.ts +36 -0
- package/projects/inventory-common/src/lib/inventory-common/category/category.service.ts +11 -0
- package/projects/inventory-common/src/lib/inventory-common/inventory-common-routing.module.ts +65 -0
- package/projects/inventory-common/src/lib/inventory-common/inventory-common.module.ts +24 -0
- package/projects/inventory-common/src/lib/inventory-common/inventory-dashboard-page/inventory-dashboard-page.component.html +88 -0
- package/projects/inventory-common/src/lib/inventory-common/inventory-dashboard-page/inventory-dashboard-page.component.scss +0 -0
- package/projects/inventory-common/src/lib/inventory-common/inventory-dashboard-page/inventory-dashboard-page.component.ts +36 -0
- package/projects/inventory-common/src/lib/inventory-common/inventory-value-report.service.ts +19 -0
- package/projects/inventory-common/src/lib/inventory-common/low-stock-report.service.ts +19 -0
- package/projects/inventory-common/src/lib/inventory-common/material.module.ts +95 -0
- package/projects/inventory-common/src/lib/inventory-common/measure/measure-delete/measure-delete-button/measure-delete-button.component.html +37 -0
- package/projects/inventory-common/src/lib/inventory-common/measure/measure-delete/measure-delete-button/measure-delete-button.component.scss +0 -0
- package/projects/inventory-common/src/lib/inventory-common/measure/measure-delete/measure-delete-button/measure-delete-button.component.ts +44 -0
- package/projects/inventory-common/src/lib/inventory-common/measure/measure-delete/measure-delete.module.ts +11 -0
- package/projects/inventory-common/src/lib/inventory-common/measure/measure-form/measure-form/measure-form.component.html +66 -0
- package/projects/inventory-common/src/lib/inventory-common/measure/measure-form/measure-form/measure-form.component.scss +0 -0
- package/projects/inventory-common/src/lib/inventory-common/measure/measure-form/measure-form/measure-form.component.ts +78 -0
- package/projects/inventory-common/src/lib/inventory-common/measure/measure-form/measure-form-button/measure-form-button.component.html +16 -0
- package/projects/inventory-common/src/lib/inventory-common/measure/measure-form/measure-form-button/measure-form-button.component.scss +0 -0
- package/projects/inventory-common/src/lib/inventory-common/measure/measure-form/measure-form-button/measure-form-button.component.ts +29 -0
- package/projects/inventory-common/src/lib/inventory-common/measure/measure-form/measure-form.module.ts +13 -0
- package/projects/inventory-common/src/lib/inventory-common/measure/measure-routing.module.ts +16 -0
- package/projects/inventory-common/src/lib/inventory-common/measure/measure.module.ts +26 -0
- package/projects/inventory-common/src/lib/inventory-common/measure/measure.service.ts +11 -0
- package/projects/inventory-common/src/lib/inventory-common/measure/measures-list/measures-list.component.html +88 -0
- package/projects/inventory-common/src/lib/inventory-common/measure/measures-list/measures-list.component.scss +0 -0
- package/projects/inventory-common/src/lib/inventory-common/measure/measures-list/measures-list.component.ts +67 -0
- package/projects/inventory-common/src/lib/inventory-common/product/low-stock-products-widget/low-stock-products-widget.component.html +52 -0
- package/projects/inventory-common/src/lib/inventory-common/product/low-stock-products-widget/low-stock-products-widget.component.scss +0 -0
- package/projects/inventory-common/src/lib/inventory-common/product/low-stock-products-widget/low-stock-products-widget.component.ts +42 -0
- package/projects/inventory-common/src/lib/inventory-common/product/low-stock-products-widget/low-stock-products-widget.module.ts +20 -0
- package/projects/inventory-common/src/lib/inventory-common/product/product-basic-info/product-basic-info.component.html +114 -0
- package/projects/inventory-common/src/lib/inventory-common/product/product-basic-info/product-basic-info.component.scss +0 -0
- package/projects/inventory-common/src/lib/inventory-common/product/product-basic-info/product-basic-info.component.ts +43 -0
- package/projects/inventory-common/src/lib/inventory-common/product/product-delete-button/product-delete-button.component.html +33 -0
- package/projects/inventory-common/src/lib/inventory-common/product/product-delete-button/product-delete-button.component.scss +0 -0
- package/projects/inventory-common/src/lib/inventory-common/product/product-delete-button/product-delete-button.component.ts +53 -0
- package/projects/inventory-common/src/lib/inventory-common/product/product-form/product-form.component.html +209 -0
- package/projects/inventory-common/src/lib/inventory-common/product/product-form/product-form.component.spec.ts +24 -0
- package/projects/inventory-common/src/lib/inventory-common/product/product-form/product-form.component.ts +182 -0
- package/projects/inventory-common/src/lib/inventory-common/product/product-form-button/product-form-button.component.html +17 -0
- package/projects/inventory-common/src/lib/inventory-common/product/product-form-button/product-form-button.component.scss +0 -0
- package/projects/inventory-common/src/lib/inventory-common/product/product-form-button/product-form-button.component.ts +39 -0
- package/projects/inventory-common/src/lib/inventory-common/product/product-form.service.ts +11 -0
- package/projects/inventory-common/src/lib/inventory-common/product/product-import-page/product-import-page.component.html +1 -0
- package/projects/inventory-common/src/lib/inventory-common/product/product-import-page/product-import-page.component.scss +0 -0
- package/projects/inventory-common/src/lib/inventory-common/product/product-import-page/product-import-page.component.ts +66 -0
- package/projects/inventory-common/src/lib/inventory-common/product/product-list/product-list.component.html +254 -0
- package/projects/inventory-common/src/lib/inventory-common/product/product-list/product-list.component.spec.ts +24 -0
- package/projects/inventory-common/src/lib/inventory-common/product/product-list/product-list.component.ts +171 -0
- package/projects/inventory-common/src/lib/inventory-common/product/product-measure-form/product-measure-form.component.html +44 -0
- package/projects/inventory-common/src/lib/inventory-common/product/product-measure-form/product-measure-form.component.spec.ts +24 -0
- package/projects/inventory-common/src/lib/inventory-common/product/product-measure-form/product-measure-form.component.ts +93 -0
- package/projects/inventory-common/src/lib/inventory-common/product/product-measures-list/product-measures-list.component.html +90 -0
- package/projects/inventory-common/src/lib/inventory-common/product/product-measures-list/product-measures-list.component.spec.ts +24 -0
- package/projects/inventory-common/src/lib/inventory-common/product/product-measures-list/product-measures-list.component.ts +153 -0
- package/projects/inventory-common/src/lib/inventory-common/product/product-nav-bar/product-nav-bar.component.html +3 -0
- package/projects/inventory-common/src/lib/inventory-common/product/product-nav-bar/product-nav-bar.component.spec.ts +24 -0
- package/projects/inventory-common/src/lib/inventory-common/product/product-nav-bar/product-nav-bar.component.ts +7 -0
- package/projects/inventory-common/src/lib/inventory-common/product/product-quick-search/product-quick-search.component.html +110 -0
- package/projects/inventory-common/src/lib/inventory-common/product/product-quick-search/product-quick-search.component.scss +0 -0
- package/projects/inventory-common/src/lib/inventory-common/product/product-quick-search/product-quick-search.component.ts +102 -0
- package/projects/inventory-common/src/lib/inventory-common/product/product-routing.module.ts +49 -0
- package/projects/inventory-common/src/lib/inventory-common/product/product-search/product-search.component.html +78 -0
- package/projects/inventory-common/src/lib/inventory-common/product/product-search/product-search.component.scss +12 -0
- package/projects/inventory-common/src/lib/inventory-common/product/product-search/product-search.component.ts +153 -0
- package/projects/inventory-common/src/lib/inventory-common/product/product-search/product-search.module.ts +22 -0
- package/projects/inventory-common/src/lib/inventory-common/product/product-summary-chart/product-summary-chart.component.html +11 -0
- package/projects/inventory-common/src/lib/inventory-common/product/product-summary-chart/product-summary-chart.component.scss +0 -0
- package/projects/inventory-common/src/lib/inventory-common/product/product-summary-chart/product-summary-chart.component.ts +62 -0
- package/projects/inventory-common/src/lib/inventory-common/product/product-summary-chart/product-summary-chart.module.ts +15 -0
- package/projects/inventory-common/src/lib/inventory-common/product/product-summary-widget/product-summary-widget.component.html +9 -0
- package/projects/inventory-common/src/lib/inventory-common/product/product-summary-widget/product-summary-widget.component.scss +0 -0
- package/projects/inventory-common/src/lib/inventory-common/product/product-summary-widget/product-summary-widget.component.ts +39 -0
- package/projects/inventory-common/src/lib/inventory-common/product/product-tax/product-tax-delete-button/product-tax-delete-button.component.html +32 -0
- package/projects/inventory-common/src/lib/inventory-common/product/product-tax/product-tax-delete-button/product-tax-delete-button.component.scss +0 -0
- package/projects/inventory-common/src/lib/inventory-common/product/product-tax/product-tax-delete-button/product-tax-delete-button.component.ts +55 -0
- package/projects/inventory-common/src/lib/inventory-common/product/product-tax/product-tax-form-button/product-tax-form-button.component.html +49 -0
- package/projects/inventory-common/src/lib/inventory-common/product/product-tax/product-tax-form-button/product-tax-form-button.component.scss +0 -0
- package/projects/inventory-common/src/lib/inventory-common/product/product-tax/product-tax-form-button/product-tax-form-button.component.ts +87 -0
- package/projects/inventory-common/src/lib/inventory-common/product/product-tax/product-tax-list/product-tax-list.component.html +48 -0
- package/projects/inventory-common/src/lib/inventory-common/product/product-tax/product-tax-list/product-tax-list.component.scss +0 -0
- package/projects/inventory-common/src/lib/inventory-common/product/product-tax/product-tax-list/product-tax-list.component.ts +33 -0
- package/projects/inventory-common/src/lib/inventory-common/product/product-tax/product-tax.module.ts +23 -0
- package/projects/inventory-common/src/lib/inventory-common/product/product-tax/product-tax.service.ts +11 -0
- package/projects/inventory-common/src/lib/inventory-common/product/product-view-page/product-view-page.component.html +34 -0
- package/projects/inventory-common/src/lib/inventory-common/product/product-view-page/product-view-page.component.ts +63 -0
- package/projects/inventory-common/src/lib/inventory-common/product/product.module.ts +69 -0
- package/projects/inventory-common/src/lib/inventory-common/product/product.service.ts +54 -0
- package/projects/inventory-common/src/lib/inventory-common/product/widgets/product-category-badges/product-category-badges.component.html +8 -0
- package/projects/inventory-common/src/lib/inventory-common/product/widgets/product-category-badges/product-category-badges.component.scss +0 -0
- package/projects/inventory-common/src/lib/inventory-common/product/widgets/product-category-badges/product-category-badges.component.ts +16 -0
- package/projects/inventory-common/src/lib/inventory-common/reports/inventory-value-report/inventory-value-report.component.html +140 -0
- package/projects/inventory-common/src/lib/inventory-common/reports/inventory-value-report/inventory-value-report.component.scss +0 -0
- package/projects/inventory-common/src/lib/inventory-common/reports/inventory-value-report/inventory-value-report.component.ts +191 -0
- package/projects/inventory-common/src/lib/inventory-common/reports/low-stock-report/low-stock-report.component.html +158 -0
- package/projects/inventory-common/src/lib/inventory-common/reports/low-stock-report/low-stock-report.component.scss +0 -0
- package/projects/inventory-common/src/lib/inventory-common/reports/low-stock-report/low-stock-report.component.ts +191 -0
- package/projects/inventory-common/src/lib/inventory-common/services/techlify-form-service.ts +14 -0
- package/projects/inventory-common/src/lib/inventory-common/stock-issuances/stock-issuance-delete-button/stock-issuance-delete-button.component.html +32 -0
- package/projects/inventory-common/src/lib/inventory-common/stock-issuances/stock-issuance-delete-button/stock-issuance-delete-button.component.scss +0 -0
- package/projects/inventory-common/src/lib/inventory-common/stock-issuances/stock-issuance-delete-button/stock-issuance-delete-button.component.ts +49 -0
- package/projects/inventory-common/src/lib/inventory-common/stock-issuances/stock-issuance-delete-button/stock-issuance-delete-button.module.ts +11 -0
- package/projects/inventory-common/src/lib/inventory-common/stock-issuances/stock-issuance.service.ts +11 -0
- package/projects/inventory-common/src/lib/inventory-common/stock-issuances/stock-issuances-list/stock-issuances-list.component.html +165 -0
- package/projects/inventory-common/src/lib/inventory-common/stock-issuances/stock-issuances-list/stock-issuances-list.component.scss +0 -0
- package/projects/inventory-common/src/lib/inventory-common/stock-issuances/stock-issuances-list/stock-issuances-list.component.ts +113 -0
- package/projects/inventory-common/src/lib/inventory-common/stock-issuances/stock-issuances-list/stock-issuances-list.module.ts +26 -0
- package/projects/inventory-common/src/lib/inventory-common/stock-issuances/stock-issuances-routing.module.ts +16 -0
- package/projects/inventory-common/src/lib/inventory-common/stock-issuances/stock-issuances.module.ts +36 -0
- package/projects/inventory-common/src/lib/inventory-common/stock-issuances/stock-issue-form/stock-issue-form/stock-issue-form.component.html +64 -0
- package/projects/inventory-common/src/lib/inventory-common/stock-issuances/stock-issue-form/stock-issue-form/stock-issue-form.component.scss +0 -0
- package/projects/inventory-common/src/lib/inventory-common/stock-issuances/stock-issue-form/stock-issue-form/stock-issue-form.component.ts +115 -0
- 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
- 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
- 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
- package/projects/inventory-common/src/lib/inventory-common/stock-issuances/stock-issue-form/stock-issue-form.module.ts +29 -0
- package/projects/inventory-common/src/lib/inventory-common/stock-receipts/stock-receipt-delete-button/stock-receipt-delete-button.component.html +32 -0
- package/projects/inventory-common/src/lib/inventory-common/stock-receipts/stock-receipt-delete-button/stock-receipt-delete-button.component.scss +0 -0
- package/projects/inventory-common/src/lib/inventory-common/stock-receipts/stock-receipt-delete-button/stock-receipt-delete-button.component.ts +49 -0
- package/projects/inventory-common/src/lib/inventory-common/stock-receipts/stock-receipt-form/stock-receipt-form/stock-receipt-form.component.html +74 -0
- package/projects/inventory-common/src/lib/inventory-common/stock-receipts/stock-receipt-form/stock-receipt-form/stock-receipt-form.component.scss +0 -0
- package/projects/inventory-common/src/lib/inventory-common/stock-receipts/stock-receipt-form/stock-receipt-form/stock-receipt-form.component.ts +122 -0
- 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
- 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
- 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
- package/projects/inventory-common/src/lib/inventory-common/stock-receipts/stock-receipt-form/stock-receipt-form.module.ts +29 -0
- package/projects/inventory-common/src/lib/inventory-common/stock-receipts/stock-receipt.service.ts +11 -0
- package/projects/inventory-common/src/lib/inventory-common/stock-receipts/stock-receipts-list-page/stock-receipts-list-page.component.html +139 -0
- package/projects/inventory-common/src/lib/inventory-common/stock-receipts/stock-receipts-list-page/stock-receipts-list-page.component.scss +0 -0
- package/projects/inventory-common/src/lib/inventory-common/stock-receipts/stock-receipts-list-page/stock-receipts-list-page.component.ts +109 -0
- package/projects/inventory-common/src/lib/inventory-common/stock-receipts/stock-receipts-routing.module.ts +16 -0
- package/projects/inventory-common/src/lib/inventory-common/stock-receipts/stock-receipts.module.ts +45 -0
- package/projects/inventory-common/src/lib/inventory-common/stock-summary.service.ts +18 -0
- package/projects/inventory-common/src/lib/inventory-common/supplier/payee-selector/payee-selector/payee-selector.component.html +22 -0
- package/projects/inventory-common/src/lib/inventory-common/supplier/payee-selector/payee-selector/payee-selector.component.scss +0 -0
- package/projects/inventory-common/src/lib/inventory-common/supplier/payee-selector/payee-selector/payee-selector.component.ts +44 -0
- package/projects/inventory-common/src/lib/inventory-common/supplier/payee-selector/payee-selector.module.ts +19 -0
- package/projects/inventory-common/src/lib/inventory-common/supplier/supplier-delete-button/supplier-delete-button.component.css +0 -0
- package/projects/inventory-common/src/lib/inventory-common/supplier/supplier-delete-button/supplier-delete-button.component.html +3 -0
- package/projects/inventory-common/src/lib/inventory-common/supplier/supplier-delete-button/supplier-delete-button.component.spec.ts +28 -0
- package/projects/inventory-common/src/lib/inventory-common/supplier/supplier-delete-button/supplier-delete-button.component.ts +56 -0
- package/projects/inventory-common/src/lib/inventory-common/supplier/supplier-form/supplier-form-button/supplier-form-button.component.css +0 -0
- package/projects/inventory-common/src/lib/inventory-common/supplier/supplier-form/supplier-form-button/supplier-form-button.component.html +3 -0
- package/projects/inventory-common/src/lib/inventory-common/supplier/supplier-form/supplier-form-button/supplier-form-button.component.spec.ts +28 -0
- package/projects/inventory-common/src/lib/inventory-common/supplier/supplier-form/supplier-form-button/supplier-form-button.component.ts +40 -0
- package/projects/inventory-common/src/lib/inventory-common/supplier/supplier-form/supplier-form.component.html +100 -0
- package/projects/inventory-common/src/lib/inventory-common/supplier/supplier-form/supplier-form.component.ts +116 -0
- package/projects/inventory-common/src/lib/inventory-common/supplier/supplier-form/supplier-form.service.ts +11 -0
- package/projects/inventory-common/src/lib/inventory-common/supplier/supplier-information/supplier-information.component.html +67 -0
- package/projects/inventory-common/src/lib/inventory-common/supplier/supplier-information/supplier-information.component.scss +0 -0
- package/projects/inventory-common/src/lib/inventory-common/supplier/supplier-information/supplier-information.component.ts +68 -0
- package/projects/inventory-common/src/lib/inventory-common/supplier/supplier-routing.module.ts +32 -0
- package/projects/inventory-common/src/lib/inventory-common/supplier/supplier-type.service.ts +17 -0
- package/projects/inventory-common/src/lib/inventory-common/supplier/supplier-view/supplier-view.component.html +60 -0
- package/projects/inventory-common/src/lib/inventory-common/supplier/supplier-view/supplier-view.component.ts +58 -0
- package/projects/inventory-common/src/lib/inventory-common/supplier/supplier.component.html +3 -0
- package/projects/inventory-common/src/lib/inventory-common/supplier/supplier.component.scss +0 -0
- package/projects/inventory-common/src/lib/inventory-common/supplier/supplier.component.ts +16 -0
- package/projects/inventory-common/src/lib/inventory-common/supplier/supplier.module.ts +46 -0
- package/projects/inventory-common/src/lib/inventory-common/supplier/supplier.service.ts +57 -0
- package/projects/inventory-common/src/lib/inventory-common/supplier/suppliers-list/suppliers-list.component.html +98 -0
- package/projects/inventory-common/src/lib/inventory-common/supplier/suppliers-list/suppliers-list.component.ts +126 -0
- package/projects/inventory-common/src/lib/inventory-common/techlify-filter/techlify-filter.component.html +442 -0
- package/projects/inventory-common/src/lib/inventory-common/techlify-filter/techlify-filter.component.scss +0 -0
- package/projects/inventory-common/src/lib/inventory-common/techlify-filter/techlify-filter.component.ts +109 -0
- package/projects/inventory-common/src/lib/inventory-common/techlify-filter/techlify-filter.module.ts +24 -0
- package/projects/inventory-common/src/public-api.ts +10 -0
- package/projects/inventory-common/tsconfig.lib.json +17 -0
- package/projects/inventory-common/tsconfig.lib.prod.json +13 -0
- package/projects/inventory-common/tsconfig.spec.json +17 -0
- package/public_api.ts +23 -0
- package/releases/techlify-ng-users-0.0.4.tgz +0 -0
- package/releases/techlify-ng-users-0.0.5.tgz +0 -0
- package/src/.htaccess +19 -0
- package/src/app/@modules/@shared/print-button/print-button/print-button.component.html +3 -0
- package/src/app/@modules/@shared/print-button/print-button/print-button.component.scss +0 -0
- package/src/app/@modules/@shared/print-button/print-button/print-button.component.ts +11 -0
- package/src/app/@modules/@shared/print-button/print-button.module.ts +11 -0
- package/src/app/@modules/@shared/print-button/print.service.ts +38 -0
- package/src/app/@modules/@shared/techlify-form-service.ts +14 -0
- package/src/app/@modules/@shared/user-menu/user-menu.component.html +26 -0
- package/src/app/@modules/@shared/user-menu/user-menu.component.spec.ts +23 -0
- package/src/app/@modules/@shared/user-menu/user-menu.component.ts +46 -0
- package/src/app/@modules/@shared/user-menu/user-menu.module.ts +20 -0
- package/src/app/@modules/administration/administration-routing.module.ts +44 -0
- package/src/app/@modules/administration/administration.component.html +3 -0
- package/src/app/@modules/administration/administration.component.ts +11 -0
- package/src/app/@modules/administration/administration.module.ts +18 -0
- package/src/app/@modules/administration/administration.service.ts +33 -0
- package/src/app/@modules/auth/auth-routing.module.ts +17 -0
- package/src/app/@modules/auth/auth.module.ts +12 -0
- package/src/app/@modules/auth/login/login.component.html +302 -0
- package/src/app/@modules/auth/login/login.component.scss +43 -0
- package/src/app/@modules/auth/login/login.component.ts +57 -0
- package/src/app/@modules/inventory-common/category/category-form/category-form.component.html +41 -0
- package/src/app/@modules/inventory-common/category/category-form/category-form.component.scss +0 -0
- package/src/app/@modules/inventory-common/category/category-form/category-form.component.ts +75 -0
- package/src/app/@modules/inventory-common/category/category-form-button/category-form-button.component.html +32 -0
- package/src/app/@modules/inventory-common/category/category-form-button/category-form-button.component.scss +0 -0
- package/src/app/@modules/inventory-common/category/category-form-button/category-form-button.component.ts +29 -0
- package/src/app/@modules/inventory-common/category/category-list-page/category-list-page.component.html +79 -0
- package/src/app/@modules/inventory-common/category/category-list-page/category-list-page.component.scss +0 -0
- package/src/app/@modules/inventory-common/category/category-list-page/category-list-page.component.ts +61 -0
- package/src/app/@modules/inventory-common/category/category-routing.module.ts +16 -0
- package/src/app/@modules/inventory-common/category/category.module.ts +36 -0
- package/src/app/@modules/inventory-common/category/category.service.ts +11 -0
- package/src/app/@modules/inventory-common/inventory-common-routing.module.ts +55 -0
- package/src/app/@modules/inventory-common/inventory-common.module.ts +20 -0
- package/src/app/@modules/inventory-common/inventory-dashboard-page/inventory-dashboard-page.component.html +88 -0
- package/src/app/@modules/inventory-common/inventory-dashboard-page/inventory-dashboard-page.component.scss +0 -0
- package/src/app/@modules/inventory-common/inventory-dashboard-page/inventory-dashboard-page.component.ts +35 -0
- package/src/app/@modules/inventory-common/measure/measure-delete/measure-delete-button/measure-delete-button.component.html +37 -0
- package/src/app/@modules/inventory-common/measure/measure-delete/measure-delete-button/measure-delete-button.component.scss +0 -0
- package/src/app/@modules/inventory-common/measure/measure-delete/measure-delete-button/measure-delete-button.component.ts +44 -0
- package/src/app/@modules/inventory-common/measure/measure-delete/measure-delete.module.ts +11 -0
- package/src/app/@modules/inventory-common/measure/measure-form/measure-form/measure-form.component.html +66 -0
- package/src/app/@modules/inventory-common/measure/measure-form/measure-form/measure-form.component.scss +0 -0
- package/src/app/@modules/inventory-common/measure/measure-form/measure-form/measure-form.component.ts +78 -0
- package/src/app/@modules/inventory-common/measure/measure-form/measure-form-button/measure-form-button.component.html +16 -0
- package/src/app/@modules/inventory-common/measure/measure-form/measure-form-button/measure-form-button.component.scss +0 -0
- package/src/app/@modules/inventory-common/measure/measure-form/measure-form-button/measure-form-button.component.ts +29 -0
- package/src/app/@modules/inventory-common/measure/measure-form/measure-form.module.ts +13 -0
- package/src/app/@modules/inventory-common/measure/measure-routing.module.ts +16 -0
- package/src/app/@modules/inventory-common/measure/measure.module.ts +26 -0
- package/src/app/@modules/inventory-common/measure/measure.service.ts +11 -0
- package/src/app/@modules/inventory-common/measure/measures-list/measures-list.component.html +88 -0
- package/src/app/@modules/inventory-common/measure/measures-list/measures-list.component.scss +0 -0
- package/src/app/@modules/inventory-common/measure/measures-list/measures-list.component.ts +67 -0
- package/src/app/@modules/inventory-common/product/low-stock-products-widget/low-stock-products-widget.component.html +52 -0
- package/src/app/@modules/inventory-common/product/low-stock-products-widget/low-stock-products-widget.component.scss +0 -0
- package/src/app/@modules/inventory-common/product/low-stock-products-widget/low-stock-products-widget.component.ts +42 -0
- package/src/app/@modules/inventory-common/product/low-stock-products-widget/low-stock-products-widget.module.ts +20 -0
- package/src/app/@modules/inventory-common/product/product-basic-info/product-basic-info.component.html +114 -0
- package/src/app/@modules/inventory-common/product/product-basic-info/product-basic-info.component.scss +0 -0
- package/src/app/@modules/inventory-common/product/product-basic-info/product-basic-info.component.ts +43 -0
- package/src/app/@modules/inventory-common/product/product-delete-button/product-delete-button.component.html +33 -0
- package/src/app/@modules/inventory-common/product/product-delete-button/product-delete-button.component.scss +0 -0
- package/src/app/@modules/inventory-common/product/product-delete-button/product-delete-button.component.ts +53 -0
- package/src/app/@modules/inventory-common/product/product-form/product-form.component.html +209 -0
- package/src/app/@modules/inventory-common/product/product-form/product-form.component.spec.ts +24 -0
- package/src/app/@modules/inventory-common/product/product-form/product-form.component.ts +182 -0
- package/src/app/@modules/inventory-common/product/product-form-button/product-form-button.component.html +17 -0
- package/src/app/@modules/inventory-common/product/product-form-button/product-form-button.component.scss +0 -0
- package/src/app/@modules/inventory-common/product/product-form-button/product-form-button.component.ts +39 -0
- package/src/app/@modules/inventory-common/product/product-form.service.ts +11 -0
- package/src/app/@modules/inventory-common/product/product-import-page/product-import-page.component.html +1 -0
- package/src/app/@modules/inventory-common/product/product-import-page/product-import-page.component.scss +0 -0
- package/src/app/@modules/inventory-common/product/product-import-page/product-import-page.component.ts +66 -0
- package/src/app/@modules/inventory-common/product/product-list/product-list.component.html +229 -0
- package/src/app/@modules/inventory-common/product/product-list/product-list.component.spec.ts +24 -0
- package/src/app/@modules/inventory-common/product/product-list/product-list.component.ts +176 -0
- package/src/app/@modules/inventory-common/product/product-measure-form/product-measure-form.component.html +44 -0
- package/src/app/@modules/inventory-common/product/product-measure-form/product-measure-form.component.spec.ts +24 -0
- package/src/app/@modules/inventory-common/product/product-measure-form/product-measure-form.component.ts +93 -0
- package/src/app/@modules/inventory-common/product/product-measures-list/product-measures-list.component.html +90 -0
- package/src/app/@modules/inventory-common/product/product-measures-list/product-measures-list.component.spec.ts +24 -0
- package/src/app/@modules/inventory-common/product/product-measures-list/product-measures-list.component.ts +153 -0
- package/src/app/@modules/inventory-common/product/product-nav-bar/product-nav-bar.component.html +3 -0
- package/src/app/@modules/inventory-common/product/product-nav-bar/product-nav-bar.component.spec.ts +24 -0
- package/src/app/@modules/inventory-common/product/product-nav-bar/product-nav-bar.component.ts +7 -0
- package/src/app/@modules/inventory-common/product/product-routing.module.ts +49 -0
- package/src/app/@modules/inventory-common/product/product-search/product-search.component.html +78 -0
- package/src/app/@modules/inventory-common/product/product-search/product-search.component.scss +12 -0
- package/src/app/@modules/inventory-common/product/product-search/product-search.component.ts +153 -0
- package/src/app/@modules/inventory-common/product/product-search/product-search.module.ts +22 -0
- package/src/app/@modules/inventory-common/product/product-summary-chart/product-summary-chart.component.html +17 -0
- package/src/app/@modules/inventory-common/product/product-summary-chart/product-summary-chart.component.scss +0 -0
- package/src/app/@modules/inventory-common/product/product-summary-chart/product-summary-chart.component.ts +45 -0
- package/src/app/@modules/inventory-common/product/product-summary-chart/product-summary-chart.module.ts +18 -0
- package/src/app/@modules/inventory-common/product/product-tax/product-tax-delete-button/product-tax-delete-button.component.html +32 -0
- package/src/app/@modules/inventory-common/product/product-tax/product-tax-delete-button/product-tax-delete-button.component.scss +0 -0
- package/src/app/@modules/inventory-common/product/product-tax/product-tax-delete-button/product-tax-delete-button.component.ts +55 -0
- package/src/app/@modules/inventory-common/product/product-tax/product-tax-form-button/product-tax-form-button.component.html +49 -0
- package/src/app/@modules/inventory-common/product/product-tax/product-tax-form-button/product-tax-form-button.component.scss +0 -0
- package/src/app/@modules/inventory-common/product/product-tax/product-tax-form-button/product-tax-form-button.component.ts +87 -0
- package/src/app/@modules/inventory-common/product/product-tax/product-tax-list/product-tax-list.component.html +48 -0
- package/src/app/@modules/inventory-common/product/product-tax/product-tax-list/product-tax-list.component.scss +0 -0
- package/src/app/@modules/inventory-common/product/product-tax/product-tax-list/product-tax-list.component.ts +33 -0
- package/src/app/@modules/inventory-common/product/product-tax/product-tax.module.ts +23 -0
- package/src/app/@modules/inventory-common/product/product-tax/product-tax.service.ts +11 -0
- package/src/app/@modules/inventory-common/product/product-view-page/product-view-page.component.html +34 -0
- package/src/app/@modules/inventory-common/product/product-view-page/product-view-page.component.ts +63 -0
- package/src/app/@modules/inventory-common/product/product.module.ts +67 -0
- package/src/app/@modules/inventory-common/product/product.service.ts +54 -0
- package/src/app/@modules/inventory-common/stock-issuances/stock-issuance-delete-button/stock-issuance-delete-button.component.html +32 -0
- package/src/app/@modules/inventory-common/stock-issuances/stock-issuance-delete-button/stock-issuance-delete-button.component.scss +0 -0
- package/src/app/@modules/inventory-common/stock-issuances/stock-issuance-delete-button/stock-issuance-delete-button.component.ts +49 -0
- package/src/app/@modules/inventory-common/stock-issuances/stock-issuance-delete-button/stock-issuance-delete-button.module.ts +11 -0
- package/src/app/@modules/inventory-common/stock-issuances/stock-issuance.service.ts +11 -0
- package/src/app/@modules/inventory-common/stock-issuances/stock-issuances-list/stock-issuances-list.component.html +165 -0
- package/src/app/@modules/inventory-common/stock-issuances/stock-issuances-list/stock-issuances-list.component.scss +0 -0
- package/src/app/@modules/inventory-common/stock-issuances/stock-issuances-list/stock-issuances-list.component.ts +113 -0
- package/src/app/@modules/inventory-common/stock-issuances/stock-issuances-list/stock-issuances-list.module.ts +26 -0
- package/src/app/@modules/inventory-common/stock-issuances/stock-issuances-routing.module.ts +16 -0
- package/src/app/@modules/inventory-common/stock-issuances/stock-issuances.module.ts +36 -0
- package/src/app/@modules/inventory-common/stock-issuances/stock-issue-form/stock-issue-form/stock-issue-form.component.html +64 -0
- package/src/app/@modules/inventory-common/stock-issuances/stock-issue-form/stock-issue-form/stock-issue-form.component.scss +0 -0
- package/src/app/@modules/inventory-common/stock-issuances/stock-issue-form/stock-issue-form/stock-issue-form.component.ts +115 -0
- package/src/app/@modules/inventory-common/stock-issuances/stock-issue-form/stock-issue-form-button/stock-issue-form-button.component.html +20 -0
- package/src/app/@modules/inventory-common/stock-issuances/stock-issue-form/stock-issue-form-button/stock-issue-form-button.component.scss +0 -0
- package/src/app/@modules/inventory-common/stock-issuances/stock-issue-form/stock-issue-form-button/stock-issue-form-button.component.ts +35 -0
- package/src/app/@modules/inventory-common/stock-issuances/stock-issue-form/stock-issue-form.module.ts +29 -0
- package/src/app/@modules/inventory-common/stock-receipts/stock-receipt-delete-button/stock-receipt-delete-button.component.html +32 -0
- package/src/app/@modules/inventory-common/stock-receipts/stock-receipt-delete-button/stock-receipt-delete-button.component.scss +0 -0
- package/src/app/@modules/inventory-common/stock-receipts/stock-receipt-delete-button/stock-receipt-delete-button.component.ts +49 -0
- package/src/app/@modules/inventory-common/stock-receipts/stock-receipt-form/stock-receipt-form/stock-receipt-form.component.html +74 -0
- package/src/app/@modules/inventory-common/stock-receipts/stock-receipt-form/stock-receipt-form/stock-receipt-form.component.scss +0 -0
- package/src/app/@modules/inventory-common/stock-receipts/stock-receipt-form/stock-receipt-form/stock-receipt-form.component.ts +122 -0
- package/src/app/@modules/inventory-common/stock-receipts/stock-receipt-form/stock-receipt-form-button/stock-receipt-form-button.component.html +18 -0
- package/src/app/@modules/inventory-common/stock-receipts/stock-receipt-form/stock-receipt-form-button/stock-receipt-form-button.component.scss +0 -0
- package/src/app/@modules/inventory-common/stock-receipts/stock-receipt-form/stock-receipt-form-button/stock-receipt-form-button.component.ts +33 -0
- package/src/app/@modules/inventory-common/stock-receipts/stock-receipt-form/stock-receipt-form.module.ts +29 -0
- package/src/app/@modules/inventory-common/stock-receipts/stock-receipt.service.ts +11 -0
- package/src/app/@modules/inventory-common/stock-receipts/stock-receipts-list-page/stock-receipts-list-page.component.html +139 -0
- package/src/app/@modules/inventory-common/stock-receipts/stock-receipts-list-page/stock-receipts-list-page.component.scss +0 -0
- package/src/app/@modules/inventory-common/stock-receipts/stock-receipts-list-page/stock-receipts-list-page.component.ts +109 -0
- package/src/app/@modules/inventory-common/stock-receipts/stock-receipts-routing.module.ts +16 -0
- package/src/app/@modules/inventory-common/stock-receipts/stock-receipts.module.ts +45 -0
- package/src/app/@modules/inventory-common/stock-summary.service.ts +18 -0
- package/src/app/@modules/inventory-common/supplier/payee-selector/payee-selector/payee-selector.component.html +22 -0
- package/src/app/@modules/inventory-common/supplier/payee-selector/payee-selector/payee-selector.component.scss +0 -0
- package/src/app/@modules/inventory-common/supplier/payee-selector/payee-selector/payee-selector.component.ts +44 -0
- package/src/app/@modules/inventory-common/supplier/payee-selector/payee-selector.module.ts +19 -0
- package/src/app/@modules/inventory-common/supplier/supplier-form/supplier-form.component.html +133 -0
- package/src/app/@modules/inventory-common/supplier/supplier-form/supplier-form.component.ts +116 -0
- package/src/app/@modules/inventory-common/supplier/supplier-form/supplier-form.service.ts +11 -0
- package/src/app/@modules/inventory-common/supplier/supplier-information/supplier-information.component.html +67 -0
- package/src/app/@modules/inventory-common/supplier/supplier-information/supplier-information.component.scss +0 -0
- package/src/app/@modules/inventory-common/supplier/supplier-information/supplier-information.component.ts +68 -0
- package/src/app/@modules/inventory-common/supplier/supplier-routing.module.ts +32 -0
- package/src/app/@modules/inventory-common/supplier/supplier-type.service.ts +17 -0
- package/src/app/@modules/inventory-common/supplier/supplier-view/supplier-view.component.html +60 -0
- package/src/app/@modules/inventory-common/supplier/supplier-view/supplier-view.component.ts +58 -0
- package/src/app/@modules/inventory-common/supplier/supplier.component.html +3 -0
- package/src/app/@modules/inventory-common/supplier/supplier.component.scss +0 -0
- package/src/app/@modules/inventory-common/supplier/supplier.component.ts +16 -0
- package/src/app/@modules/inventory-common/supplier/supplier.module.ts +42 -0
- package/src/app/@modules/inventory-common/supplier/supplier.service.ts +57 -0
- package/src/app/@modules/inventory-common/supplier/suppliers-list/suppliers-list.component.html +140 -0
- package/src/app/@modules/inventory-common/supplier/suppliers-list/suppliers-list.component.ts +240 -0
- package/src/app/@modules/sidebar-layout/expandable-menu/expandable-menu.component.html +10 -0
- package/src/app/@modules/sidebar-layout/expandable-menu/expandable-menu.component.scss +20 -0
- package/src/app/@modules/sidebar-layout/expandable-menu/expandable-menu.component.ts +24 -0
- package/src/app/@modules/sidebar-layout/menu-item.model.ts +12 -0
- package/src/app/@modules/sidebar-layout/sidebar-administration-menu/sidebar-administration-menu.component.html +26 -0
- package/src/app/@modules/sidebar-layout/sidebar-administration-menu/sidebar-administration-menu.component.ts +23 -0
- package/src/app/@modules/sidebar-layout/sidebar-layout/sidebar-layout.component.html +32 -0
- package/src/app/@modules/sidebar-layout/sidebar-layout/sidebar-layout.component.scss +48 -0
- package/src/app/@modules/sidebar-layout/sidebar-layout/sidebar-layout.component.ts +173 -0
- package/src/app/@modules/sidebar-layout/sidebar-layout-routing.module.ts +52 -0
- package/src/app/@modules/sidebar-layout/sidebar-layout.module.ts +52 -0
- package/src/app/@modules/sidebar-layout/top-menu/top-menu.component.html +85 -0
- package/src/app/@modules/sidebar-layout/top-menu/top-menu.component.scss +0 -0
- package/src/app/@modules/sidebar-layout/top-menu/top-menu.component.ts +46 -0
- package/src/app/@modules/sidebar-layout/top-menu/top-menu.service.ts +29 -0
- package/src/app/@modules/techlify-filter/techlify-filter.component.html +442 -0
- package/src/app/@modules/techlify-filter/techlify-filter.component.scss +0 -0
- package/src/app/@modules/techlify-filter/techlify-filter.component.ts +109 -0
- package/src/app/@modules/techlify-filter/techlify-filter.module.ts +24 -0
- package/src/app/@modules/user/user-layout/user-layout.component.html +15 -0
- package/src/app/@modules/user/user-layout/user-layout.component.scss +0 -0
- package/src/app/@modules/user/user-layout/user-layout.component.ts +12 -0
- package/src/app/@modules/user/user-routing.module.ts +23 -0
- package/src/app/@modules/user/user.module.ts +13 -0
- package/src/app/@modules/user-setting-button/user-setting-button/user-setting-button.component.html +15 -0
- package/src/app/@modules/user-setting-button/user-setting-button/user-setting-button.component.scss +0 -0
- package/src/app/@modules/user-setting-button/user-setting-button/user-setting-button.component.ts +12 -0
- package/src/app/@modules/user-setting-button/user-setting-button.module.ts +20 -0
- package/src/app/app-routing.module.ts +28 -0
- package/src/app/app.component.html +1 -0
- package/src/app/app.component.scss +43 -0
- package/src/app/app.component.spec.ts +18 -0
- package/src/app/app.component.ts +62 -0
- package/src/app/app.module.ts +73 -0
- package/src/app/material.module.ts +95 -0
- package/src/assets/.gitkeep +0 -0
- package/src/assets/images/techlify-logo-xs.png +0 -0
- package/src/assets/product/product-import-sample.csv +1 -0
- package/src/environments/common-environment.ts +36 -0
- package/src/environments/environment.prod.ts +10 -0
- package/src/environments/environment.staging.ts +19 -0
- package/src/environments/environment.ts +18 -0
- package/src/favicon.ico +0 -0
- package/src/index.html +34 -0
- package/src/main.ts +19 -0
- package/src/polyfills.ts +57 -0
- package/src/styles.scss +366 -0
- package/src/test.ts +12 -0
- package/src/theme/theme-variables.scss +132 -0
- package/src/theme/theme.scss +17 -0
- package/src/tsconfig.app.json +15 -0
- package/src/tsconfig.spec.json +14 -0
- package/tsconfig.app.json +17 -0
- package/tsconfig.json +69 -0
- package/tslint.json +130 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { NgModule } from "@angular/core";
|
|
2
|
+
import { CommonModule } from "@angular/common";
|
|
3
|
+
import { ProductSearchComponent } from "./product-search.component";
|
|
4
|
+
import { InfiniteScrollModule } from "ngx-infinite-scroll";
|
|
5
|
+
import { FlexLayoutModule } from "@angular/flex-layout";
|
|
6
|
+
import { ReactiveFormsModule } from "@angular/forms";
|
|
7
|
+
import { MaterialModule } from "../../../../@shared/material.module";
|
|
8
|
+
import { ProductModule } from "../product.module";
|
|
9
|
+
|
|
10
|
+
@NgModule({
|
|
11
|
+
declarations: [ProductSearchComponent],
|
|
12
|
+
imports: [
|
|
13
|
+
CommonModule,
|
|
14
|
+
InfiniteScrollModule,
|
|
15
|
+
FlexLayoutModule,
|
|
16
|
+
ReactiveFormsModule,
|
|
17
|
+
MaterialModule,
|
|
18
|
+
ProductModule,
|
|
19
|
+
],
|
|
20
|
+
exports: [ProductSearchComponent],
|
|
21
|
+
})
|
|
22
|
+
export class ProductSearchModule {}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<!--<mat-card>-->
|
|
2
|
+
<!-- <mat-card-content>-->
|
|
3
|
+
<!-- <h3>{{ title }}</h3>-->
|
|
4
|
+
<!-- </mat-card-content>-->
|
|
5
|
+
<!-- <mat-progress-bar mode="indeterminate" *ngIf="isLoading"></mat-progress-bar>-->
|
|
6
|
+
<!-- <mat-card-content *ngIf="chart.data?.length > 0">-->
|
|
7
|
+
<!-- <google-chart-->
|
|
8
|
+
<!-- class="w-100"-->
|
|
9
|
+
<!-- [height]="height"-->
|
|
10
|
+
<!-- [type]="chart.type"-->
|
|
11
|
+
<!-- [data]="chart.data"-->
|
|
12
|
+
<!-- [columns]="chart.columns"-->
|
|
13
|
+
<!-- [options]="chart.options"-->
|
|
14
|
+
<!-- >-->
|
|
15
|
+
<!-- </google-chart>-->
|
|
16
|
+
<!-- </mat-card-content>-->
|
|
17
|
+
<!--</mat-card>-->
|
|
File without changes
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Component, Input, OnInit } from "@angular/core";
|
|
2
|
+
import { ProductService } from "../product.service";
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: "app-product-summary-chart",
|
|
6
|
+
templateUrl: "./product-summary-chart.component.html",
|
|
7
|
+
})
|
|
8
|
+
export class ProductSummaryChartComponent implements OnInit {
|
|
9
|
+
@Input() height: number = 400;
|
|
10
|
+
@Input() title = "Product Summary";
|
|
11
|
+
chart: any = {
|
|
12
|
+
title: "Pie Chart",
|
|
13
|
+
type: "PieChart",
|
|
14
|
+
data: [],
|
|
15
|
+
options: {
|
|
16
|
+
pieSliceText: "value",
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
isLoading: boolean = false;
|
|
20
|
+
|
|
21
|
+
constructor(private productService: ProductService) {}
|
|
22
|
+
|
|
23
|
+
ngOnInit() {
|
|
24
|
+
this.loadData();
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
loadData() {
|
|
28
|
+
const params: any = {
|
|
29
|
+
include: "products_aggregated",
|
|
30
|
+
group_by: "category_id",
|
|
31
|
+
};
|
|
32
|
+
this.isLoading = true;
|
|
33
|
+
this.productService.summary(params).subscribe({
|
|
34
|
+
next: (response: any) => {
|
|
35
|
+
let data: any[] = [];
|
|
36
|
+
response?.products_aggregated?.forEach((item: any) => {
|
|
37
|
+
data.push([item?.title, item?.product_count]);
|
|
38
|
+
});
|
|
39
|
+
this.chart.data = data;
|
|
40
|
+
this.isLoading = false;
|
|
41
|
+
},
|
|
42
|
+
error: () => (this.isLoading = false),
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { NgModule } from "@angular/core";
|
|
2
|
+
import { CommonModule } from "@angular/common";
|
|
3
|
+
import { MaterialModule } from "ngx-techlify-core";
|
|
4
|
+
import { MatProgressBarModule } from "@angular/material/progress-bar";
|
|
5
|
+
import { ProductSummaryChartComponent } from "@modules/inventory-common/product/product-summary-chart/product-summary-chart.component";
|
|
6
|
+
import { GoogleChartsModule } from "angular-google-charts";
|
|
7
|
+
|
|
8
|
+
@NgModule({
|
|
9
|
+
declarations: [ProductSummaryChartComponent],
|
|
10
|
+
imports: [
|
|
11
|
+
CommonModule,
|
|
12
|
+
MaterialModule,
|
|
13
|
+
MatProgressBarModule,
|
|
14
|
+
GoogleChartsModule,
|
|
15
|
+
],
|
|
16
|
+
exports: [ProductSummaryChartComponent],
|
|
17
|
+
})
|
|
18
|
+
export class ProductSummaryChartModule {}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<mat-icon
|
|
2
|
+
class="cursor-pointer text-secondary"
|
|
3
|
+
(click)="showDeleteDialog(deleteConfirmDialog)"
|
|
4
|
+
>
|
|
5
|
+
delete
|
|
6
|
+
</mat-icon>
|
|
7
|
+
|
|
8
|
+
<ng-template #deleteConfirmDialog>
|
|
9
|
+
<h3 mat-dialog-title>Delete Product Tax</h3>
|
|
10
|
+
<div mat-dialog-content>
|
|
11
|
+
Are you sure? You want to delete the product tax?
|
|
12
|
+
</div>
|
|
13
|
+
<div mat-dialog-actions class="d-flex justify-content-end gap-1 mb-2">
|
|
14
|
+
<button
|
|
15
|
+
[disabled]="isDeleting"
|
|
16
|
+
type="button"
|
|
17
|
+
mat-raised-button
|
|
18
|
+
color="warn"
|
|
19
|
+
(click)="delete()"
|
|
20
|
+
>
|
|
21
|
+
Delete
|
|
22
|
+
</button>
|
|
23
|
+
<button
|
|
24
|
+
[disabled]="isDeleting"
|
|
25
|
+
type="button"
|
|
26
|
+
mat-flat-button
|
|
27
|
+
mat-dialog-close
|
|
28
|
+
>
|
|
29
|
+
Cancel
|
|
30
|
+
</button>
|
|
31
|
+
</div>
|
|
32
|
+
</ng-template>
|
|
File without changes
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Component,
|
|
3
|
+
EventEmitter,
|
|
4
|
+
Input,
|
|
5
|
+
Output,
|
|
6
|
+
TemplateRef,
|
|
7
|
+
} from "@angular/core";
|
|
8
|
+
import { MatDialog } from "@angular/material/dialog";
|
|
9
|
+
import { AlertService } from "ngx-techlify-core";
|
|
10
|
+
import { ProductTaxService } from "../product-tax.service";
|
|
11
|
+
|
|
12
|
+
@Component({
|
|
13
|
+
selector: "app-product-tax-delete-button",
|
|
14
|
+
templateUrl: "./product-tax-delete-button.component.html",
|
|
15
|
+
})
|
|
16
|
+
export class ProductTaxDeleteButtonComponent {
|
|
17
|
+
@Input() productTax: any;
|
|
18
|
+
@Output() deleted = new EventEmitter();
|
|
19
|
+
|
|
20
|
+
isDeleting!: boolean;
|
|
21
|
+
|
|
22
|
+
constructor(
|
|
23
|
+
private matDialog: MatDialog,
|
|
24
|
+
private productTaxService: ProductTaxService,
|
|
25
|
+
private alertService: AlertService
|
|
26
|
+
) {}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Delete the product.
|
|
30
|
+
*/
|
|
31
|
+
delete() {
|
|
32
|
+
this.isDeleting = true;
|
|
33
|
+
this.productTaxService.delete(this.productTax).subscribe({
|
|
34
|
+
next: () => {
|
|
35
|
+
this.matDialog?.closeAll();
|
|
36
|
+
this.deleted.emit();
|
|
37
|
+
this.isDeleting = false;
|
|
38
|
+
this.alertService.addAlert(
|
|
39
|
+
"Product tax deleted successfully!",
|
|
40
|
+
"success"
|
|
41
|
+
);
|
|
42
|
+
},
|
|
43
|
+
error: () => (this.isDeleting = false),
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Show delete product dialog.
|
|
49
|
+
*
|
|
50
|
+
* @param templateRef
|
|
51
|
+
*/
|
|
52
|
+
showDeleteDialog(templateRef: TemplateRef<any>) {
|
|
53
|
+
this.matDialog.open(templateRef, { width: "500px" });
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<mat-icon
|
|
2
|
+
color="primary"
|
|
3
|
+
class="cursor-pointer"
|
|
4
|
+
(click)="showForm(formTemplate)"
|
|
5
|
+
>
|
|
6
|
+
add
|
|
7
|
+
</mat-icon>
|
|
8
|
+
|
|
9
|
+
<ng-template #formTemplate>
|
|
10
|
+
<form
|
|
11
|
+
[formGroup]="form"
|
|
12
|
+
(submit)="save()"
|
|
13
|
+
mat-dialog-content
|
|
14
|
+
class="d-flex flex-column gap-2"
|
|
15
|
+
>
|
|
16
|
+
<h3 class="text-dark">Add tax for {{ product?.name }}</h3>
|
|
17
|
+
<mat-form-field>
|
|
18
|
+
<mat-label>Tax</mat-label>
|
|
19
|
+
<app-searchable-selector
|
|
20
|
+
formControlName="tax_id"
|
|
21
|
+
required
|
|
22
|
+
apiUrl="api/taxes"
|
|
23
|
+
[enableSearch]="false"
|
|
24
|
+
></app-searchable-selector>
|
|
25
|
+
<mat-error *ngIf="isFieldValid('tax_id')">
|
|
26
|
+
{{ getErrorMessage("tax_id") }}
|
|
27
|
+
</mat-error>
|
|
28
|
+
</mat-form-field>
|
|
29
|
+
|
|
30
|
+
<div class="d-flex justify-content-end align-items-center gap-3">
|
|
31
|
+
<button
|
|
32
|
+
[disabled]="isSaving"
|
|
33
|
+
type="submit"
|
|
34
|
+
mat-raised-button
|
|
35
|
+
color="primary"
|
|
36
|
+
>
|
|
37
|
+
Save
|
|
38
|
+
</button>
|
|
39
|
+
<button
|
|
40
|
+
[disabled]="isSaving"
|
|
41
|
+
type="button"
|
|
42
|
+
mat-flat-button
|
|
43
|
+
mat-dialog-close
|
|
44
|
+
>
|
|
45
|
+
Cancel
|
|
46
|
+
</button>
|
|
47
|
+
</div>
|
|
48
|
+
</form>
|
|
49
|
+
</ng-template>
|
|
File without changes
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Component,
|
|
3
|
+
EventEmitter,
|
|
4
|
+
Input,
|
|
5
|
+
OnInit,
|
|
6
|
+
Output,
|
|
7
|
+
TemplateRef,
|
|
8
|
+
} from "@angular/core";
|
|
9
|
+
import { MatDialog } from "@angular/material/dialog";
|
|
10
|
+
import {
|
|
11
|
+
AlertService,
|
|
12
|
+
FormValidatorService,
|
|
13
|
+
TechlifyFormComponentInterface,
|
|
14
|
+
} from "ngx-techlify-core";
|
|
15
|
+
import { FormBuilder, Validators } from "@angular/forms";
|
|
16
|
+
import { ProductTaxService } from "../product-tax.service";
|
|
17
|
+
|
|
18
|
+
@Component({
|
|
19
|
+
selector: "app-product-tax-form-button",
|
|
20
|
+
templateUrl: "./product-tax-form-button.component.html",
|
|
21
|
+
})
|
|
22
|
+
export class ProductTaxFormButtonComponent
|
|
23
|
+
extends TechlifyFormComponentInterface
|
|
24
|
+
implements OnInit
|
|
25
|
+
{
|
|
26
|
+
@Input() product: any;
|
|
27
|
+
@Output() saved: EventEmitter<any> = new EventEmitter();
|
|
28
|
+
|
|
29
|
+
isSaving!: boolean;
|
|
30
|
+
|
|
31
|
+
constructor(
|
|
32
|
+
public matDialog: MatDialog,
|
|
33
|
+
private productTaxService: ProductTaxService,
|
|
34
|
+
formValidatorService: FormValidatorService,
|
|
35
|
+
private formBuilder: FormBuilder,
|
|
36
|
+
private alertService: AlertService
|
|
37
|
+
) {
|
|
38
|
+
super(formValidatorService);
|
|
39
|
+
this.errorMessages = {
|
|
40
|
+
tax_id: {
|
|
41
|
+
required: "The tax field is required.",
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
this.form = this.formBuilder.group({
|
|
46
|
+
product_id: [""],
|
|
47
|
+
tax_id: ["", Validators.required],
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
ngOnInit() {
|
|
52
|
+
if (this.product) {
|
|
53
|
+
this.form.get("product_id")?.setValue(this.product?.id);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
showForm(templateRef: TemplateRef<any>) {
|
|
58
|
+
this.matDialog.open(templateRef, { width: "400px" });
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
save() {
|
|
62
|
+
this.form.markAllAsTouched();
|
|
63
|
+
if (this.form.invalid) {
|
|
64
|
+
this.alertService.addAlert("Please check the form for errors.", "error");
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const data: any = { ...this.form.value };
|
|
69
|
+
const params: any = {
|
|
70
|
+
with: "tax.type",
|
|
71
|
+
};
|
|
72
|
+
this.isSaving = true;
|
|
73
|
+
|
|
74
|
+
this.productTaxService.store(data, params).subscribe({
|
|
75
|
+
next: (response: any) => {
|
|
76
|
+
this.isSaving = false;
|
|
77
|
+
this.matDialog.closeAll();
|
|
78
|
+
this.alertService.addAlert(
|
|
79
|
+
"Product tax saved successfully!",
|
|
80
|
+
"success"
|
|
81
|
+
);
|
|
82
|
+
this.saved.emit(response?.item);
|
|
83
|
+
},
|
|
84
|
+
error: () => (this.isSaving = false),
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
<mat-card>
|
|
2
|
+
<mat-card-content
|
|
3
|
+
class="pb-3 d-flex justify-content-between align-items-center gap-3"
|
|
4
|
+
>
|
|
5
|
+
<div class="d-flex justify-content-start gap-2">
|
|
6
|
+
<span class="material-symbols-outlined"> percent </span>
|
|
7
|
+
<strong class="mb-0 text-dark">Product Taxes</strong>
|
|
8
|
+
</div>
|
|
9
|
+
<app-product-tax-form-button
|
|
10
|
+
[product]="product"
|
|
11
|
+
(saved)="onCreated($event)"
|
|
12
|
+
></app-product-tax-form-button>
|
|
13
|
+
</mat-card-content>
|
|
14
|
+
<mat-divider></mat-divider>
|
|
15
|
+
<mat-card-content class="p-0">
|
|
16
|
+
<table mat-table [dataSource]="models" class="w-100">
|
|
17
|
+
<ng-container matColumnDef="#">
|
|
18
|
+
<th mat-header-cell *matHeaderCellDef>#</th>
|
|
19
|
+
<td mat-cell *matCellDef="let element; let i = index">{{ i + 1 }}</td>
|
|
20
|
+
</ng-container>
|
|
21
|
+
|
|
22
|
+
<ng-container matColumnDef="Tax">
|
|
23
|
+
<th mat-header-cell *matHeaderCellDef>Tax</th>
|
|
24
|
+
<td mat-cell *matCellDef="let element">
|
|
25
|
+
<p class="mb-0">
|
|
26
|
+
{{ element?.tax?.title }} ({{ element?.tax?.code }})
|
|
27
|
+
</p>
|
|
28
|
+
<small class="text-secondary"
|
|
29
|
+
>{{ element?.tax?.value }} - {{ element?.tax?.type?.title }}</small
|
|
30
|
+
>
|
|
31
|
+
</td>
|
|
32
|
+
</ng-container>
|
|
33
|
+
|
|
34
|
+
<ng-container matColumnDef="Actions">
|
|
35
|
+
<th mat-header-cell *matHeaderCellDef>Actions</th>
|
|
36
|
+
<td mat-cell *matCellDef="let element; let i = index">
|
|
37
|
+
<app-product-tax-delete-button
|
|
38
|
+
[productTax]="element"
|
|
39
|
+
(deleted)="onDeleted(i)"
|
|
40
|
+
></app-product-tax-delete-button>
|
|
41
|
+
</td>
|
|
42
|
+
</ng-container>
|
|
43
|
+
|
|
44
|
+
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
|
45
|
+
<tr mat-row *matRowDef="let row; columns: displayedColumns"></tr>
|
|
46
|
+
</table>
|
|
47
|
+
</mat-card-content>
|
|
48
|
+
</mat-card>
|
|
File without changes
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Component, Input, OnInit } from "@angular/core";
|
|
2
|
+
import { TechlifyListingControllerInterface } from "ngx-techlify-core";
|
|
3
|
+
|
|
4
|
+
@Component({
|
|
5
|
+
selector: "app-product-tax-list",
|
|
6
|
+
templateUrl: "./product-tax-list.component.html",
|
|
7
|
+
})
|
|
8
|
+
export class ProductTaxListComponent
|
|
9
|
+
extends TechlifyListingControllerInterface
|
|
10
|
+
implements OnInit
|
|
11
|
+
{
|
|
12
|
+
@Input() product!: any;
|
|
13
|
+
|
|
14
|
+
displayedColumns: string[] = ["#", "Tax", "Actions"];
|
|
15
|
+
|
|
16
|
+
ngOnInit() {
|
|
17
|
+
this.loadData();
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
loadData(): void {
|
|
21
|
+
this.models = this.product?.taxes ?? [];
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
onCreated(productTax: any) {
|
|
25
|
+
this.models.unshift(productTax);
|
|
26
|
+
this.models = [...this.models];
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
onDeleted(index: number) {
|
|
30
|
+
this.models.splice(index, 1);
|
|
31
|
+
this.models = [...this.models];
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { NgModule } from "@angular/core";
|
|
2
|
+
import { CommonModule } from "@angular/common";
|
|
3
|
+
import { ProductTaxListComponent } from "@modules/inventory-common/product/product-tax/product-tax-list/product-tax-list.component";
|
|
4
|
+
import { MaterialModule, SearchableSelectorModule } from "ngx-techlify-core";
|
|
5
|
+
import { ProductTaxFormButtonComponent } from "@modules/inventory-common/product/product-tax/product-tax-form-button/product-tax-form-button.component";
|
|
6
|
+
import { ProductTaxDeleteButtonComponent } from "@modules/inventory-common/product/product-tax/product-tax-delete-button/product-tax-delete-button.component";
|
|
7
|
+
import { ReactiveFormsModule } from "@angular/forms";
|
|
8
|
+
|
|
9
|
+
@NgModule({
|
|
10
|
+
declarations: [
|
|
11
|
+
ProductTaxListComponent,
|
|
12
|
+
ProductTaxFormButtonComponent,
|
|
13
|
+
ProductTaxDeleteButtonComponent,
|
|
14
|
+
],
|
|
15
|
+
imports: [
|
|
16
|
+
CommonModule,
|
|
17
|
+
MaterialModule,
|
|
18
|
+
ReactiveFormsModule,
|
|
19
|
+
SearchableSelectorModule,
|
|
20
|
+
],
|
|
21
|
+
exports: [ProductTaxListComponent],
|
|
22
|
+
})
|
|
23
|
+
export class ProductTaxModule {}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Injectable } from "@angular/core";
|
|
2
|
+
import { HttpService, TechlifyServiceBaseClass } from "ngx-techlify-core";
|
|
3
|
+
|
|
4
|
+
@Injectable({
|
|
5
|
+
providedIn: "root",
|
|
6
|
+
})
|
|
7
|
+
export class ProductTaxService extends TechlifyServiceBaseClass {
|
|
8
|
+
constructor(httpService: HttpService) {
|
|
9
|
+
super(httpService, "product-taxes");
|
|
10
|
+
}
|
|
11
|
+
}
|
package/src/app/@modules/inventory-common/product/product-view-page/product-view-page.component.html
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<mat-progress-bar mode="indeterminate" *ngIf="isLoading"></mat-progress-bar>
|
|
2
|
+
|
|
3
|
+
<div
|
|
4
|
+
*ngIf="product"
|
|
5
|
+
class="d-flex justify-content-start align-items-start gap-3"
|
|
6
|
+
>
|
|
7
|
+
<div style="width: calc(25% - 1rem)" class="d-flex flex-column gap-3">
|
|
8
|
+
<app-product-basic-info
|
|
9
|
+
[product]="product"
|
|
10
|
+
#productBasicInfoComponent
|
|
11
|
+
(deleted)="onProductDeleted()"
|
|
12
|
+
(saved)="onProductUpdated($event)"
|
|
13
|
+
></app-product-basic-info>
|
|
14
|
+
|
|
15
|
+
<app-product-tax-list [product]="product"></app-product-tax-list>
|
|
16
|
+
</div>
|
|
17
|
+
<div style="width: calc(75%)" class="d-flex flex-column gap-3">
|
|
18
|
+
<app-stock-receipts-list-page
|
|
19
|
+
[product]="product"
|
|
20
|
+
(listUpdated)="
|
|
21
|
+
getProduct(this.id);
|
|
22
|
+
productBasicInfoComponent.loadProductStocksSummary()
|
|
23
|
+
"
|
|
24
|
+
></app-stock-receipts-list-page>
|
|
25
|
+
|
|
26
|
+
<app-stock-issuances-list
|
|
27
|
+
[product]="product"
|
|
28
|
+
(listUpdated)="
|
|
29
|
+
getProduct(this.id);
|
|
30
|
+
productBasicInfoComponent.loadProductStocksSummary()
|
|
31
|
+
"
|
|
32
|
+
></app-stock-issuances-list>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
package/src/app/@modules/inventory-common/product/product-view-page/product-view-page.component.ts
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { Component, OnInit } from "@angular/core";
|
|
2
|
+
import { ProductService } from "../product.service";
|
|
3
|
+
import { ActivatedRoute } from "@angular/router";
|
|
4
|
+
import { Location } from "@angular/common";
|
|
5
|
+
|
|
6
|
+
@Component({
|
|
7
|
+
selector: "app-product-view-page",
|
|
8
|
+
templateUrl: "./product-view-page.component.html",
|
|
9
|
+
})
|
|
10
|
+
export class ProductViewPageComponent implements OnInit {
|
|
11
|
+
public product: any;
|
|
12
|
+
id: number;
|
|
13
|
+
isLoading!: boolean;
|
|
14
|
+
|
|
15
|
+
constructor(
|
|
16
|
+
private productService: ProductService,
|
|
17
|
+
private activatedRoute: ActivatedRoute,
|
|
18
|
+
private location: Location
|
|
19
|
+
) {
|
|
20
|
+
this.id = this.activatedRoute.snapshot.params?.["id"];
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
ngOnInit(): void {
|
|
24
|
+
if (this.id) {
|
|
25
|
+
this.getProduct(this.id);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Get the product details.
|
|
31
|
+
*
|
|
32
|
+
* @param productId
|
|
33
|
+
*/
|
|
34
|
+
getProduct(productId: any) {
|
|
35
|
+
this.isLoading = true;
|
|
36
|
+
const params: any = {
|
|
37
|
+
with: "type,measure,incomeAccount,expenseAccount,categories,lastStockReceipt,lastStockIssuance,taxes.tax.type",
|
|
38
|
+
};
|
|
39
|
+
this.productService.show(productId, params).subscribe({
|
|
40
|
+
next: (result: any) => {
|
|
41
|
+
this.isLoading = false;
|
|
42
|
+
this.product = result?.item;
|
|
43
|
+
},
|
|
44
|
+
error: () => (this.isLoading = false),
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Handle the on product update event.
|
|
50
|
+
*
|
|
51
|
+
* @param product
|
|
52
|
+
*/
|
|
53
|
+
onProductUpdated(product: any) {
|
|
54
|
+
this.getProduct(this.id);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Handle on product delete event.
|
|
59
|
+
*/
|
|
60
|
+
onProductDeleted() {
|
|
61
|
+
this.location.back();
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { NgModule } from "@angular/core";
|
|
2
|
+
import { CommonModule } from "@angular/common";
|
|
3
|
+
import { ProductRoutingModule } from "./product-routing.module";
|
|
4
|
+
import { ProductListComponent } from "./product-list/product-list.component";
|
|
5
|
+
import { ProductFormComponent } from "./product-form/product-form.component";
|
|
6
|
+
import {
|
|
7
|
+
ImportCsvModule,
|
|
8
|
+
MaterialModule,
|
|
9
|
+
SearchableSelectorModule,
|
|
10
|
+
TimelineFilterModule,
|
|
11
|
+
} from "ngx-techlify-core";
|
|
12
|
+
import { ProductNavBarComponent } from "./product-nav-bar/product-nav-bar.component";
|
|
13
|
+
import { ProductMeasuresListComponent } from "./product-measures-list/product-measures-list.component";
|
|
14
|
+
import { ProductMeasureFormComponent } from "./product-measure-form/product-measure-form.component";
|
|
15
|
+
import { ProductViewPageComponent } from "./product-view-page/product-view-page.component";
|
|
16
|
+
import { ProductFormButtonComponent } from "./product-form-button/product-form-button.component";
|
|
17
|
+
import { ProductDeleteButtonComponent } from "./product-delete-button/product-delete-button.component";
|
|
18
|
+
import { ProductBasicInfoComponent } from "./product-basic-info/product-basic-info.component";
|
|
19
|
+
import { StockReceiptFormModule } from "../stock-receipts/stock-receipt-form/stock-receipt-form.module";
|
|
20
|
+
import { StockIssueFormModule } from "../stock-issuances/stock-issue-form/stock-issue-form.module";
|
|
21
|
+
import { ProductImportPageComponent } from "./product-import-page/product-import-page.component";
|
|
22
|
+
import { StockReceiptsModule } from "../stock-receipts/stock-receipts.module";
|
|
23
|
+
import { StockIssuancesListModule } from "../stock-issuances/stock-issuances-list/stock-issuances-list.module";
|
|
24
|
+
import { MatProgressBarModule } from "@angular/material/progress-bar";
|
|
25
|
+
import { ProductTaxModule } from "@modules/inventory-common/product/product-tax/product-tax.module";
|
|
26
|
+
import { InfiniteScrollModule } from "ngx-infinite-scroll";
|
|
27
|
+
import { FlexModule } from "@angular/flex-layout";
|
|
28
|
+
import { FormsModule, ReactiveFormsModule } from "@angular/forms";
|
|
29
|
+
|
|
30
|
+
@NgModule({
|
|
31
|
+
declarations: [
|
|
32
|
+
ProductListComponent,
|
|
33
|
+
ProductFormComponent,
|
|
34
|
+
ProductNavBarComponent,
|
|
35
|
+
ProductMeasuresListComponent,
|
|
36
|
+
ProductMeasureFormComponent,
|
|
37
|
+
ProductViewPageComponent,
|
|
38
|
+
ProductFormButtonComponent,
|
|
39
|
+
ProductDeleteButtonComponent,
|
|
40
|
+
ProductBasicInfoComponent,
|
|
41
|
+
ProductImportPageComponent,
|
|
42
|
+
],
|
|
43
|
+
imports: [
|
|
44
|
+
CommonModule,
|
|
45
|
+
ProductRoutingModule,
|
|
46
|
+
SearchableSelectorModule,
|
|
47
|
+
TimelineFilterModule,
|
|
48
|
+
StockReceiptFormModule,
|
|
49
|
+
StockIssueFormModule,
|
|
50
|
+
ImportCsvModule,
|
|
51
|
+
StockReceiptsModule,
|
|
52
|
+
StockIssuancesListModule,
|
|
53
|
+
ProductTaxModule,
|
|
54
|
+
MaterialModule,
|
|
55
|
+
MatProgressBarModule,
|
|
56
|
+
InfiniteScrollModule,
|
|
57
|
+
FlexModule,
|
|
58
|
+
ReactiveFormsModule,
|
|
59
|
+
FormsModule,
|
|
60
|
+
],
|
|
61
|
+
exports: [
|
|
62
|
+
ProductFormComponent,
|
|
63
|
+
ProductBasicInfoComponent,
|
|
64
|
+
ProductFormButtonComponent,
|
|
65
|
+
],
|
|
66
|
+
})
|
|
67
|
+
export class ProductModule {}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { Injectable } from "@angular/core";
|
|
2
|
+
import {
|
|
3
|
+
DataManager,
|
|
4
|
+
HttpService,
|
|
5
|
+
TechlifyServiceBaseClass,
|
|
6
|
+
} from "ngx-techlify-core";
|
|
7
|
+
import { Observable } from "rxjs";
|
|
8
|
+
|
|
9
|
+
@Injectable({
|
|
10
|
+
providedIn: "root",
|
|
11
|
+
})
|
|
12
|
+
export class ProductService extends TechlifyServiceBaseClass {
|
|
13
|
+
constructor(
|
|
14
|
+
private dataManager: DataManager,
|
|
15
|
+
public httpService: HttpService
|
|
16
|
+
) {
|
|
17
|
+
super(httpService, "products");
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
getProducts(filters?: any) {
|
|
21
|
+
return this.dataManager.GET(`api/products`, filters);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
getProduct(id: any) {
|
|
25
|
+
return this.dataManager.GET(`api/products/${id}`);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
createProduct(model: any) {
|
|
29
|
+
return this.dataManager.POST(`api/products`, model);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
updateProducts(model: any) {
|
|
33
|
+
return this.dataManager.PUT(`api/products/${model.id}`, model);
|
|
34
|
+
}
|
|
35
|
+
deleteProduct(id: any) {
|
|
36
|
+
return this.dataManager.DELETE(`api/products/${id}`);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
getProductMeasures(filters?: any) {
|
|
40
|
+
return this.dataManager.GET(`api/product-measures`, filters);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
createProductMeasure(model: any) {
|
|
44
|
+
return this.dataManager.POST(`api/product-measures`, model);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
updateProductMeasure(model: any) {
|
|
48
|
+
return this.dataManager.PUT(`api/product-measures/${model.id}`, model);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
summary(params?: any): Observable<any> {
|
|
52
|
+
return this.httpService.get("api/products-summary", { params });
|
|
53
|
+
}
|
|
54
|
+
}
|