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,79 @@
|
|
|
1
|
+
<mat-card>
|
|
2
|
+
<mat-card-content
|
|
3
|
+
class="d-flex justify-content-start align-items-center gap-3"
|
|
4
|
+
>
|
|
5
|
+
<div class="d-flex justify-content-start align-items-center gap-2">
|
|
6
|
+
<h3 class="mb-0">Product Categories</h3>
|
|
7
|
+
<app-category-form-button
|
|
8
|
+
class="mt-1"
|
|
9
|
+
(saved)="reload()"
|
|
10
|
+
></app-category-form-button>
|
|
11
|
+
</div>
|
|
12
|
+
<app-techlify-filter
|
|
13
|
+
[filterForm]="filterForm"
|
|
14
|
+
(filterUpdated)="reload()"
|
|
15
|
+
[filterConfig]="filterConfig"
|
|
16
|
+
></app-techlify-filter>
|
|
17
|
+
</mat-card-content>
|
|
18
|
+
</mat-card>
|
|
19
|
+
|
|
20
|
+
<mat-card class="mt-2 p-0">
|
|
21
|
+
<mat-card-content>
|
|
22
|
+
<table
|
|
23
|
+
mat-table
|
|
24
|
+
[dataSource]="models"
|
|
25
|
+
class="w-100"
|
|
26
|
+
aria-describedby="Product Categories"
|
|
27
|
+
infiniteScroll
|
|
28
|
+
[infiniteScrollDistance]="2"
|
|
29
|
+
[infiniteScrollThrottle]="50"
|
|
30
|
+
(scrolled)="onScroll()"
|
|
31
|
+
matSort
|
|
32
|
+
(matSortChange)="onSortChange($event)"
|
|
33
|
+
>
|
|
34
|
+
<!-- # Column -->
|
|
35
|
+
<ng-container matColumnDef="no">
|
|
36
|
+
<th mat-header-cell *matHeaderCellDef>#</th>
|
|
37
|
+
<td mat-cell *matCellDef="let element; let i = index">{{ i + 1 }}</td>
|
|
38
|
+
</ng-container>
|
|
39
|
+
|
|
40
|
+
<!-- Title Column -->
|
|
41
|
+
<ng-container matColumnDef="title">
|
|
42
|
+
<th mat-header-cell *matHeaderCellDef mat-sort-header>Title</th>
|
|
43
|
+
<td mat-cell *matCellDef="let element">{{ element?.title }}</td>
|
|
44
|
+
</ng-container>
|
|
45
|
+
|
|
46
|
+
<!-- Description Column -->
|
|
47
|
+
<ng-container matColumnDef="description">
|
|
48
|
+
<th mat-header-cell *matHeaderCellDef>Description</th>
|
|
49
|
+
<td mat-cell *matCellDef="let element">{{ element?.description }}</td>
|
|
50
|
+
</ng-container>
|
|
51
|
+
|
|
52
|
+
<!-- Products Column -->
|
|
53
|
+
<ng-container matColumnDef="products">
|
|
54
|
+
<th mat-header-cell *matHeaderCellDef mat-sort-header="products_count">
|
|
55
|
+
Products
|
|
56
|
+
</th>
|
|
57
|
+
<td mat-cell *matCellDef="let element">
|
|
58
|
+
{{ element?.products_count }}
|
|
59
|
+
</td>
|
|
60
|
+
</ng-container>
|
|
61
|
+
|
|
62
|
+
<!-- Actions Column -->
|
|
63
|
+
<ng-container matColumnDef="actions">
|
|
64
|
+
<th mat-header-cell *matHeaderCellDef>Actions</th>
|
|
65
|
+
<td mat-cell *matCellDef="let element">
|
|
66
|
+
<app-category-form-button
|
|
67
|
+
[category]="element"
|
|
68
|
+
(saved)="reload()"
|
|
69
|
+
></app-category-form-button>
|
|
70
|
+
</td>
|
|
71
|
+
</ng-container>
|
|
72
|
+
|
|
73
|
+
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
|
74
|
+
<tr mat-row *matRowDef="let row; columns: displayedColumns"></tr>
|
|
75
|
+
</table>
|
|
76
|
+
|
|
77
|
+
<mat-progress-bar *ngIf="isWorking" mode="indeterminate"></mat-progress-bar>
|
|
78
|
+
</mat-card-content>
|
|
79
|
+
</mat-card>
|
|
File without changes
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { Component } from "@angular/core";
|
|
2
|
+
import { TechlifyListingControllerInterface } from "ngx-techlify-core";
|
|
3
|
+
import { FormBuilder } from "@angular/forms";
|
|
4
|
+
import { CategoryService } from "../category.service";
|
|
5
|
+
import { Sort } from "@angular/material/sort";
|
|
6
|
+
|
|
7
|
+
@Component({
|
|
8
|
+
selector: "app-category-list-page",
|
|
9
|
+
templateUrl: "./category-list-page.component.html",
|
|
10
|
+
styleUrls: ["./category-list-page.component.scss"],
|
|
11
|
+
})
|
|
12
|
+
export class CategoryListPageComponent extends TechlifyListingControllerInterface {
|
|
13
|
+
filterConfig = {
|
|
14
|
+
search: {
|
|
15
|
+
placeholder: "Search category title, description",
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
displayedColumns: string[] = [
|
|
19
|
+
"no",
|
|
20
|
+
"title",
|
|
21
|
+
"description",
|
|
22
|
+
"products",
|
|
23
|
+
"actions",
|
|
24
|
+
];
|
|
25
|
+
|
|
26
|
+
constructor(
|
|
27
|
+
private formBuilder: FormBuilder,
|
|
28
|
+
private categoryService: CategoryService
|
|
29
|
+
) {
|
|
30
|
+
super();
|
|
31
|
+
this.filterForm = this.formBuilder.group({
|
|
32
|
+
search: [""],
|
|
33
|
+
sort_by: ["created_at|desc"],
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
override loadData() {
|
|
38
|
+
this.isWorking = true;
|
|
39
|
+
const params: any = { ...this.filterForm.value };
|
|
40
|
+
params.perPage = this.perPage;
|
|
41
|
+
params.page = this.page;
|
|
42
|
+
params.withCount = "products";
|
|
43
|
+
|
|
44
|
+
this.categoryService.index(params).subscribe({
|
|
45
|
+
next: (response: any) => {
|
|
46
|
+
this.models = this.models.concat(response?.data);
|
|
47
|
+
this.lastPage = response?.last_page;
|
|
48
|
+
this.isWorking = false;
|
|
49
|
+
},
|
|
50
|
+
error: () => (this.isWorking = false),
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
onSortChange(sort: Sort) {
|
|
55
|
+
let { active, direction } = sort;
|
|
56
|
+
if (!active) active = "created_at";
|
|
57
|
+
if (!direction) direction = "desc";
|
|
58
|
+
|
|
59
|
+
this.filterForm.get("sort_by").setValue(active + "|" + direction);
|
|
60
|
+
}
|
|
61
|
+
}
|
package/projects/inventory-common/src/lib/inventory-common/category/category-routing.module.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { NgModule } from "@angular/core";
|
|
2
|
+
import { RouterModule, Routes } from "@angular/router";
|
|
3
|
+
import { CategoryListPageComponent } from "./category-list-page/category-list-page.component";
|
|
4
|
+
|
|
5
|
+
const routes: Routes = [
|
|
6
|
+
{
|
|
7
|
+
path: "",
|
|
8
|
+
component: CategoryListPageComponent,
|
|
9
|
+
},
|
|
10
|
+
];
|
|
11
|
+
|
|
12
|
+
@NgModule({
|
|
13
|
+
imports: [RouterModule.forChild(routes)],
|
|
14
|
+
exports: [RouterModule],
|
|
15
|
+
})
|
|
16
|
+
export class CategoryRoutingModule {}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { NgModule } from "@angular/core";
|
|
2
|
+
import { CommonModule } from "@angular/common";
|
|
3
|
+
|
|
4
|
+
import { CategoryRoutingModule } from "./category-routing.module";
|
|
5
|
+
import { CategoryListPageComponent } from "./category-list-page/category-list-page.component";
|
|
6
|
+
import { MatCardModule } from "@angular/material/card";
|
|
7
|
+
import { CategoryFormButtonComponent } from "./category-form-button/category-form-button.component";
|
|
8
|
+
import { MatIconModule } from "@angular/material/icon";
|
|
9
|
+
import { CategoryFormComponent } from "./category-form/category-form.component";
|
|
10
|
+
import { MatDialogModule } from "@angular/material/dialog";
|
|
11
|
+
import { ReactiveFormsModule } from "@angular/forms";
|
|
12
|
+
import { InfiniteScrollModule } from "ngx-infinite-scroll";
|
|
13
|
+
import { MaterialModule } from "ngx-techlify-core";
|
|
14
|
+
import { MatProgressBarModule } from "@angular/material/progress-bar";
|
|
15
|
+
import { TechlifyFilterModule } from '../techlify-filter/techlify-filter.module';
|
|
16
|
+
|
|
17
|
+
@NgModule({
|
|
18
|
+
declarations: [
|
|
19
|
+
CategoryListPageComponent,
|
|
20
|
+
CategoryFormButtonComponent,
|
|
21
|
+
CategoryFormComponent,
|
|
22
|
+
],
|
|
23
|
+
imports: [
|
|
24
|
+
CommonModule,
|
|
25
|
+
CategoryRoutingModule,
|
|
26
|
+
MatCardModule,
|
|
27
|
+
MatIconModule,
|
|
28
|
+
MatDialogModule,
|
|
29
|
+
ReactiveFormsModule,
|
|
30
|
+
MaterialModule,
|
|
31
|
+
TechlifyFilterModule,
|
|
32
|
+
InfiniteScrollModule,
|
|
33
|
+
MatProgressBarModule,
|
|
34
|
+
],
|
|
35
|
+
})
|
|
36
|
+
export class CategoryModule {}
|
|
@@ -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 CategoryService extends TechlifyServiceBaseClass {
|
|
8
|
+
constructor(httpService: HttpService) {
|
|
9
|
+
super(httpService, "product-categories");
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { NgModule } from "@angular/core";
|
|
2
|
+
import { RouterModule, Routes } from "@angular/router";
|
|
3
|
+
import { InventoryDashboardPageComponent } from "./inventory-dashboard-page/inventory-dashboard-page.component";
|
|
4
|
+
import { LowStockReportComponent } from "./reports/low-stock-report/low-stock-report.component";
|
|
5
|
+
import { InventoryValueReportComponent } from "./reports/inventory-value-report/inventory-value-report.component";
|
|
6
|
+
|
|
7
|
+
const routes: Routes = [
|
|
8
|
+
{
|
|
9
|
+
path: 'reports/low-stock-report',
|
|
10
|
+
component: LowStockReportComponent,
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
path: 'reports/inventory-value-report',
|
|
14
|
+
component: InventoryValueReportComponent,
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
path: "suppliers",
|
|
18
|
+
loadChildren: () =>
|
|
19
|
+
import("./supplier/supplier.module").then((m) => m.SupplierModule),
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
path: "measures",
|
|
23
|
+
loadChildren: () =>
|
|
24
|
+
import("./measure/measure.module").then((mod) => mod.MeasureModule),
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
path: "stock-issuances",
|
|
28
|
+
loadChildren: () =>
|
|
29
|
+
import("./stock-issuances/stock-issuances.module").then(
|
|
30
|
+
(mod) => mod.StockIssuancesModule
|
|
31
|
+
),
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
path: "stock-receipts",
|
|
35
|
+
loadChildren: () =>
|
|
36
|
+
import("./stock-receipts/stock-receipts.module").then(
|
|
37
|
+
(mod) => mod.StockReceiptsModule
|
|
38
|
+
),
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
path: "categories",
|
|
42
|
+
loadChildren: () =>
|
|
43
|
+
import("./category/category.module").then((mod) => mod.CategoryModule),
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
path: "products",
|
|
47
|
+
loadChildren: () =>
|
|
48
|
+
import("./product/product.module").then((mod) => mod.ProductModule),
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
path: "dashboard",
|
|
52
|
+
component: InventoryDashboardPageComponent,
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
path: "**",
|
|
56
|
+
redirectTo: "dashboard",
|
|
57
|
+
pathMatch: "full",
|
|
58
|
+
},
|
|
59
|
+
];
|
|
60
|
+
|
|
61
|
+
@NgModule({
|
|
62
|
+
imports: [RouterModule.forChild(routes)],
|
|
63
|
+
exports: [RouterModule],
|
|
64
|
+
})
|
|
65
|
+
export class InventoryCommonRoutingModule {}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { NgModule } from "@angular/core";
|
|
2
|
+
import { CommonModule } from "@angular/common";
|
|
3
|
+
|
|
4
|
+
import { InventoryCommonRoutingModule } from "./inventory-common-routing.module";
|
|
5
|
+
import { InventoryDashboardPageComponent } from "./inventory-dashboard-page/inventory-dashboard-page.component";
|
|
6
|
+
import { MaterialModule } from "ngx-techlify-core";
|
|
7
|
+
import { LowStockProductsWidgetModule } from './product/low-stock-products-widget/low-stock-products-widget.module';
|
|
8
|
+
import { ProductSummaryChartModule } from './product/product-summary-chart/product-summary-chart.module';
|
|
9
|
+
import { ProductSummaryChartComponent } from './product/product-summary-chart/product-summary-chart.component';
|
|
10
|
+
import {ProductQuickSearchComponent} from "./product/product-quick-search/product-quick-search.component";
|
|
11
|
+
|
|
12
|
+
@NgModule({
|
|
13
|
+
declarations: [InventoryDashboardPageComponent],
|
|
14
|
+
imports: [
|
|
15
|
+
CommonModule,
|
|
16
|
+
InventoryCommonRoutingModule,
|
|
17
|
+
MaterialModule,
|
|
18
|
+
LowStockProductsWidgetModule,
|
|
19
|
+
ProductSummaryChartModule,
|
|
20
|
+
ProductSummaryChartComponent,
|
|
21
|
+
ProductQuickSearchComponent,
|
|
22
|
+
],
|
|
23
|
+
})
|
|
24
|
+
export class InventoryCommonModule {}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
<div class="d-flex justify-content-start align-items-start gap-3 vh-100">
|
|
2
|
+
<div class="row" style="width: calc(100% - 300px)">
|
|
3
|
+
<div class="col-lg-4 mb-3">
|
|
4
|
+
<mat-card>
|
|
5
|
+
<mat-card-content class="d-flex justify-content-center align-items-center gap-3">
|
|
6
|
+
<span class="material-symbols-outlined fs-1 fw-bold" style="color: #F5222D !important;">
|
|
7
|
+
inventory_2
|
|
8
|
+
</span>
|
|
9
|
+
<div class="d-flex flex-column gap-0">
|
|
10
|
+
<small class="text-secondary">Low Stock Products</small>
|
|
11
|
+
<h1 class="mb-0 fw-bold">{{ lowStockProductsCount | number }}</h1>
|
|
12
|
+
</div>
|
|
13
|
+
</mat-card-content>
|
|
14
|
+
</mat-card>
|
|
15
|
+
</div>
|
|
16
|
+
<div class="col-lg-4 mb-3">
|
|
17
|
+
<mat-card>
|
|
18
|
+
<mat-card-content class="d-flex justify-content-center align-items-center gap-3">
|
|
19
|
+
<span class="material-symbols-outlined fs-1 fw-bold">
|
|
20
|
+
arrow_circle_down
|
|
21
|
+
</span>
|
|
22
|
+
<div class="d-flex flex-column gap-0">
|
|
23
|
+
<small class="text-secondary">Products Received This Month</small>
|
|
24
|
+
<h1 class="mb-0 fw-bold">{{ stockReceiptsQtySum | number }}</h1>
|
|
25
|
+
</div>
|
|
26
|
+
</mat-card-content>
|
|
27
|
+
</mat-card>
|
|
28
|
+
</div>
|
|
29
|
+
<div class="col-lg-4 mb-3">
|
|
30
|
+
<mat-card>
|
|
31
|
+
<mat-card-content class="d-flex justify-content-center align-items-center gap-3">
|
|
32
|
+
<span class="material-symbols-outlined fs-1 fw-bold">
|
|
33
|
+
arrow_circle_up
|
|
34
|
+
</span>
|
|
35
|
+
<div class="d-flex flex-column gap-0">
|
|
36
|
+
<small class="text-secondary">Products Issued This Month</small>
|
|
37
|
+
<h1 class="mb-0 fw-bold">{{ stockIssuanceQtySum | number }}</h1>
|
|
38
|
+
</div>
|
|
39
|
+
</mat-card-content>
|
|
40
|
+
</mat-card>
|
|
41
|
+
</div>
|
|
42
|
+
<div class="col-lg-6 mb-3">
|
|
43
|
+
<app-product-quick-search></app-product-quick-search>
|
|
44
|
+
</div>
|
|
45
|
+
<div class="col-lg-6 mb-3">
|
|
46
|
+
<app-low-stock-products-widget></app-low-stock-products-widget>
|
|
47
|
+
</div>
|
|
48
|
+
<div class="col-lg-6 mb-3">
|
|
49
|
+
<app-product-summary-chart title="Product By Category"></app-product-summary-chart>
|
|
50
|
+
</div>
|
|
51
|
+
</div>
|
|
52
|
+
<div style="width: 300px" class="d-flex flex-column gap-3 h-100">
|
|
53
|
+
<mat-card class="h-100">
|
|
54
|
+
<mat-card-content>
|
|
55
|
+
<div class="d-flex justify-content-start align-items-center gap-2">
|
|
56
|
+
<mat-icon>flag</mat-icon>
|
|
57
|
+
<h3 class="mb-0 fw-bold">Reports</h3>
|
|
58
|
+
</div>
|
|
59
|
+
</mat-card-content>
|
|
60
|
+
<mat-card-content class="mt-3 d-flex flex-column justify-content-start gap-3">
|
|
61
|
+
<a
|
|
62
|
+
class="d-flex justify-content-start align-items-center gap-2 text-decoration-none text-dark"
|
|
63
|
+
routerLink="/inventory/reports/low-stock-report"
|
|
64
|
+
>
|
|
65
|
+
<span class="material-symbols-outlined fs-3">
|
|
66
|
+
description
|
|
67
|
+
</span>
|
|
68
|
+
<h3 class="mb-0">Low Stock Report</h3>
|
|
69
|
+
<span class="material-symbols-outlined">
|
|
70
|
+
chevron_forward
|
|
71
|
+
</span>
|
|
72
|
+
</a>
|
|
73
|
+
<a
|
|
74
|
+
class="d-flex justify-content-start align-items-center gap-2 text-decoration-none text-dark cursor-pointer"
|
|
75
|
+
routerLink="/inventory/reports/inventory-value-report"
|
|
76
|
+
>
|
|
77
|
+
<span class="material-symbols-outlined fs-3">
|
|
78
|
+
description
|
|
79
|
+
</span>
|
|
80
|
+
<h3 class="mb-0">Inventory Value Report</h3>
|
|
81
|
+
<span class="material-symbols-outlined">
|
|
82
|
+
chevron_forward
|
|
83
|
+
</span>
|
|
84
|
+
</a>
|
|
85
|
+
</mat-card-content>
|
|
86
|
+
</mat-card>
|
|
87
|
+
</div>
|
|
88
|
+
</div>
|
|
File without changes
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Component, OnInit } from '@angular/core';
|
|
2
|
+
import { ProductService } from "../product/product.service";
|
|
3
|
+
import moment from "moment";
|
|
4
|
+
|
|
5
|
+
@Component({
|
|
6
|
+
selector: 'app-inventory-dashboard-page',
|
|
7
|
+
templateUrl: './inventory-dashboard-page.component.html',
|
|
8
|
+
styleUrls: ['./inventory-dashboard-page.component.scss']
|
|
9
|
+
})
|
|
10
|
+
export class InventoryDashboardPageComponent implements OnInit {
|
|
11
|
+
lowStockProductsCount!: number;
|
|
12
|
+
stockReceiptsQtySum!: number;
|
|
13
|
+
stockIssuanceQtySum!: number;
|
|
14
|
+
constructor(
|
|
15
|
+
private productService: ProductService,
|
|
16
|
+
) { }
|
|
17
|
+
|
|
18
|
+
ngOnInit(): void {
|
|
19
|
+
this.loadProductSummary();
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
private loadProductSummary() {
|
|
23
|
+
const params: any = {
|
|
24
|
+
include: 'low_stock_products_count,stock_receipts_quantity_sum,stock_issuances_quantity_sum',
|
|
25
|
+
date_from: moment().startOf('month').format('YYYY-MM-DD'),
|
|
26
|
+
date_to: moment().endOf('month').format('YYYY-MM-DD'),
|
|
27
|
+
}
|
|
28
|
+
this.productService.summary(params).subscribe({
|
|
29
|
+
next: (response: any) => {
|
|
30
|
+
this.lowStockProductsCount = response?.low_stock_products_count;
|
|
31
|
+
this.stockReceiptsQtySum = response?.stock_receipts_quantity_sum;
|
|
32
|
+
this.stockIssuanceQtySum = response?.stock_issuances_quantity_sum;
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import {Injectable} from '@angular/core';
|
|
2
|
+
import {HttpService, TechlifyServiceBaseClass} from 'ngx-techlify-core';
|
|
3
|
+
import {Observable} from 'rxjs';
|
|
4
|
+
|
|
5
|
+
@Injectable({
|
|
6
|
+
providedIn: 'root'
|
|
7
|
+
})
|
|
8
|
+
export class InventoryValueReportService extends TechlifyServiceBaseClass {
|
|
9
|
+
|
|
10
|
+
constructor(
|
|
11
|
+
httpService: HttpService,
|
|
12
|
+
) {
|
|
13
|
+
super(httpService, 'reports/inventory-value-report');
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export(params?: any): Observable<any> {
|
|
17
|
+
return this.http.get('api/reports/inventory-value-report/export', { params });
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
import {HttpService, TechlifyServiceBaseClass} from 'ngx-techlify-core';
|
|
3
|
+
import {Observable} from 'rxjs';
|
|
4
|
+
|
|
5
|
+
@Injectable({
|
|
6
|
+
providedIn: 'root'
|
|
7
|
+
})
|
|
8
|
+
export class LowStockReportService extends TechlifyServiceBaseClass {
|
|
9
|
+
|
|
10
|
+
constructor(
|
|
11
|
+
protected httpService: HttpService,
|
|
12
|
+
) {
|
|
13
|
+
super(httpService, 'reports/low-stock-report');
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export(params?: any): Observable<any> {
|
|
17
|
+
return this.http.get('api/reports/low-stock-report/export', { params });
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* This module imports and re-exports all Angular Material modules for convenience,
|
|
3
|
+
* so only 1 module import is needed in your feature modules.
|
|
4
|
+
* See https://material.angular.io/guide/getting-started#step-3-import-the-component-modules.
|
|
5
|
+
*
|
|
6
|
+
* To optimize your production builds, you should only import the components used in your app.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { NgModule } from "@angular/core";
|
|
10
|
+
import {
|
|
11
|
+
MatCommonModule,
|
|
12
|
+
MatLineModule,
|
|
13
|
+
MatNativeDateModule,
|
|
14
|
+
MatPseudoCheckboxModule,
|
|
15
|
+
MatRippleModule,
|
|
16
|
+
} from "@angular/material/core";
|
|
17
|
+
import { MatOptionModule } from "@angular/material/core";
|
|
18
|
+
import { MatAutocompleteModule } from "@angular/material/autocomplete";
|
|
19
|
+
import { MatBadgeModule } from "@angular/material/badge";
|
|
20
|
+
import { MatButtonModule } from "@angular/material/button";
|
|
21
|
+
import { MatButtonToggleModule } from "@angular/material/button-toggle";
|
|
22
|
+
import { MatCardModule } from "@angular/material/card";
|
|
23
|
+
import { MatCheckboxModule } from "@angular/material/checkbox";
|
|
24
|
+
import { MatChipsModule } from "@angular/material/chips";
|
|
25
|
+
import { MatDatepickerModule } from "@angular/material/datepicker";
|
|
26
|
+
import { MatDialogModule } from "@angular/material/dialog";
|
|
27
|
+
import { MatDividerModule } from "@angular/material/divider";
|
|
28
|
+
import { MatExpansionModule } from "@angular/material/expansion";
|
|
29
|
+
import { MatFormFieldModule } from "@angular/material/form-field";
|
|
30
|
+
import { MatGridListModule } from "@angular/material/grid-list";
|
|
31
|
+
import { MatIconModule } from "@angular/material/icon";
|
|
32
|
+
import { MatInputModule } from "@angular/material/input";
|
|
33
|
+
import { MatListModule } from "@angular/material/list";
|
|
34
|
+
import { MatMenuModule } from "@angular/material/menu";
|
|
35
|
+
import { MatPaginatorModule } from "@angular/material/paginator";
|
|
36
|
+
import { MatProgressBarModule } from "@angular/material/progress-bar";
|
|
37
|
+
import { MatProgressSpinnerModule } from "@angular/material/progress-spinner";
|
|
38
|
+
import { MatRadioModule } from "@angular/material/radio";
|
|
39
|
+
import { MatSelectModule } from "@angular/material/select";
|
|
40
|
+
import { MatSidenavModule } from "@angular/material/sidenav";
|
|
41
|
+
import { MatSlideToggleModule } from "@angular/material/slide-toggle";
|
|
42
|
+
import { MatSliderModule } from "@angular/material/slider";
|
|
43
|
+
import { MatSnackBarModule } from "@angular/material/snack-bar";
|
|
44
|
+
import { MatSortModule } from "@angular/material/sort";
|
|
45
|
+
import { MatStepperModule } from "@angular/material/stepper";
|
|
46
|
+
import { MatTableModule } from "@angular/material/table";
|
|
47
|
+
import { MatTabsModule } from "@angular/material/tabs";
|
|
48
|
+
import { MatToolbarModule } from "@angular/material/toolbar";
|
|
49
|
+
import { MatTooltipModule } from "@angular/material/tooltip";
|
|
50
|
+
import { MatTreeModule } from "@angular/material/tree";
|
|
51
|
+
|
|
52
|
+
@NgModule({
|
|
53
|
+
exports: [
|
|
54
|
+
MatAutocompleteModule,
|
|
55
|
+
MatBadgeModule,
|
|
56
|
+
MatButtonModule,
|
|
57
|
+
MatButtonToggleModule,
|
|
58
|
+
MatCardModule,
|
|
59
|
+
MatCheckboxModule,
|
|
60
|
+
MatChipsModule,
|
|
61
|
+
MatCommonModule,
|
|
62
|
+
MatDatepickerModule,
|
|
63
|
+
MatDialogModule,
|
|
64
|
+
MatDividerModule,
|
|
65
|
+
MatExpansionModule,
|
|
66
|
+
MatFormFieldModule,
|
|
67
|
+
MatGridListModule,
|
|
68
|
+
MatIconModule,
|
|
69
|
+
MatInputModule,
|
|
70
|
+
MatLineModule,
|
|
71
|
+
MatListModule,
|
|
72
|
+
MatMenuModule,
|
|
73
|
+
MatNativeDateModule,
|
|
74
|
+
MatOptionModule,
|
|
75
|
+
MatPaginatorModule,
|
|
76
|
+
MatProgressBarModule,
|
|
77
|
+
MatProgressSpinnerModule,
|
|
78
|
+
MatPseudoCheckboxModule,
|
|
79
|
+
MatRadioModule,
|
|
80
|
+
MatRippleModule,
|
|
81
|
+
MatSelectModule,
|
|
82
|
+
MatSidenavModule,
|
|
83
|
+
MatSlideToggleModule,
|
|
84
|
+
MatSliderModule,
|
|
85
|
+
MatSnackBarModule,
|
|
86
|
+
MatSortModule,
|
|
87
|
+
MatStepperModule,
|
|
88
|
+
MatTableModule,
|
|
89
|
+
MatTabsModule,
|
|
90
|
+
MatToolbarModule,
|
|
91
|
+
MatTooltipModule,
|
|
92
|
+
MatTreeModule,
|
|
93
|
+
],
|
|
94
|
+
})
|
|
95
|
+
export class MaterialModule {}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<span
|
|
2
|
+
(click)="showConfirmDialog(deleteMeasureTemplate)"
|
|
3
|
+
class="material-symbols-outlined cursor-pointer text-secondary"
|
|
4
|
+
>
|
|
5
|
+
delete
|
|
6
|
+
</span>
|
|
7
|
+
|
|
8
|
+
<ng-template #deleteMeasureTemplate>
|
|
9
|
+
<h3 mat-dialog-title>Delete Measure</h3>
|
|
10
|
+
<div mat-dialog-content>
|
|
11
|
+
<p>
|
|
12
|
+
Deleting this measure cannot be undone, are you sure you want to proceed?
|
|
13
|
+
</p>
|
|
14
|
+
</div>
|
|
15
|
+
<div
|
|
16
|
+
mat-dialog-actions
|
|
17
|
+
class="d-flex justify-content-end align-items-center gap-2"
|
|
18
|
+
>
|
|
19
|
+
<button
|
|
20
|
+
[disabled]="isDeleting"
|
|
21
|
+
mat-flat-button
|
|
22
|
+
type="button"
|
|
23
|
+
mat-dialog-close
|
|
24
|
+
>
|
|
25
|
+
Cancel
|
|
26
|
+
</button>
|
|
27
|
+
<button
|
|
28
|
+
[disabled]="isDeleting"
|
|
29
|
+
mat-raised-button
|
|
30
|
+
color="warn"
|
|
31
|
+
type="button"
|
|
32
|
+
(click)="deleteMeasure()"
|
|
33
|
+
>
|
|
34
|
+
Delete
|
|
35
|
+
</button>
|
|
36
|
+
</div>
|
|
37
|
+
</ng-template>
|
|
File without changes
|
|
@@ -0,0 +1,44 @@
|
|
|
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 { MeasureService } from "../../measure.service";
|
|
10
|
+
|
|
11
|
+
@Component({
|
|
12
|
+
selector: "app-measure-delete-button",
|
|
13
|
+
templateUrl: "./measure-delete-button.component.html",
|
|
14
|
+
styleUrls: ["./measure-delete-button.component.scss"],
|
|
15
|
+
})
|
|
16
|
+
export class MeasureDeleteButtonComponent {
|
|
17
|
+
@Input() measure: any;
|
|
18
|
+
@Output() deleted: EventEmitter<any> = new EventEmitter<any>();
|
|
19
|
+
isDeleting: boolean = false;
|
|
20
|
+
|
|
21
|
+
constructor(
|
|
22
|
+
private measureService: MeasureService,
|
|
23
|
+
private matDialog: MatDialog
|
|
24
|
+
) {}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Delete the expense record.
|
|
28
|
+
*/
|
|
29
|
+
deleteMeasure() {
|
|
30
|
+
this.isDeleting = true;
|
|
31
|
+
this.measureService.delete(this.measure).subscribe({
|
|
32
|
+
next: () => {
|
|
33
|
+
this.matDialog.closeAll();
|
|
34
|
+
this.isDeleting = false;
|
|
35
|
+
this.deleted.emit();
|
|
36
|
+
},
|
|
37
|
+
error: () => (this.isDeleting = false),
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
showConfirmDialog(templateRef: TemplateRef<any>) {
|
|
42
|
+
this.matDialog.open(templateRef);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { NgModule } from "@angular/core";
|
|
2
|
+
import { CommonModule } from "@angular/common";
|
|
3
|
+
import { MeasureDeleteButtonComponent } from "./measure-delete-button/measure-delete-button.component";
|
|
4
|
+
import { MaterialModule } from 'ngx-techlify-core';
|
|
5
|
+
|
|
6
|
+
@NgModule({
|
|
7
|
+
declarations: [MeasureDeleteButtonComponent],
|
|
8
|
+
imports: [CommonModule, MaterialModule],
|
|
9
|
+
exports: [MeasureDeleteButtonComponent],
|
|
10
|
+
})
|
|
11
|
+
export class MeasureDeleteModule {}
|