techlify-inventory-common 18.50.0 → 22.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/techlify-inventory-common-category.module-Dtn1604q.mjs +842 -0
- package/fesm2022/techlify-inventory-common-category.module-Dtn1604q.mjs.map +1 -0
- package/fesm2022/techlify-inventory-common-location.service-C99J8Lje.mjs +50 -0
- package/fesm2022/techlify-inventory-common-location.service-C99J8Lje.mjs.map +1 -0
- package/fesm2022/techlify-inventory-common-material.module-ClupVm7-.mjs +190 -0
- package/fesm2022/techlify-inventory-common-material.module-ClupVm7-.mjs.map +1 -0
- package/fesm2022/techlify-inventory-common-measure.service-DvJUGa0i.mjs +38 -0
- package/fesm2022/techlify-inventory-common-measure.service-DvJUGa0i.mjs.map +1 -0
- package/fesm2022/techlify-inventory-common-product-category-badges.component-VnfnNhtV.mjs +133 -0
- package/fesm2022/techlify-inventory-common-product-category-badges.component-VnfnNhtV.mjs.map +1 -0
- package/fesm2022/techlify-inventory-common-product.module-MZoVK3bN.mjs +4278 -0
- package/fesm2022/techlify-inventory-common-product.module-MZoVK3bN.mjs.map +1 -0
- package/fesm2022/techlify-inventory-common-purchase-order-view.component-CjED8n4_.mjs +852 -0
- package/fesm2022/techlify-inventory-common-purchase-order-view.component-CjED8n4_.mjs.map +1 -0
- package/fesm2022/techlify-inventory-common-purchase-order.service-ztJ5RRH5.mjs +40 -0
- package/fesm2022/techlify-inventory-common-purchase-order.service-ztJ5RRH5.mjs.map +1 -0
- package/fesm2022/techlify-inventory-common-recipient.module-gxR77BIj.mjs +647 -0
- package/fesm2022/techlify-inventory-common-recipient.module-gxR77BIj.mjs.map +1 -0
- package/fesm2022/techlify-inventory-common-shared.module-DP-FVqea.mjs +102 -0
- package/fesm2022/techlify-inventory-common-shared.module-DP-FVqea.mjs.map +1 -0
- package/fesm2022/techlify-inventory-common-stock-allocation-list.component-Du-VCtbs.mjs +382 -0
- package/fesm2022/techlify-inventory-common-stock-allocation-list.component-Du-VCtbs.mjs.map +1 -0
- package/fesm2022/techlify-inventory-common-stock-issue-form.component-DfgbqIKn.mjs +486 -0
- package/fesm2022/techlify-inventory-common-stock-issue-form.component-DfgbqIKn.mjs.map +1 -0
- package/fesm2022/techlify-inventory-common-stock-issue-page.module-DX9n3X1T.mjs +2509 -0
- package/fesm2022/techlify-inventory-common-stock-issue-page.module-DX9n3X1T.mjs.map +1 -0
- package/fesm2022/techlify-inventory-common-stock-issue-product-view.component-D8aIc5Oh.mjs +208 -0
- package/fesm2022/techlify-inventory-common-stock-issue-product-view.component-D8aIc5Oh.mjs.map +1 -0
- package/fesm2022/techlify-inventory-common-stock-issue-product.service-BRbfc5KP.mjs +38 -0
- package/fesm2022/techlify-inventory-common-stock-issue-product.service-BRbfc5KP.mjs.map +1 -0
- package/fesm2022/techlify-inventory-common-stock-issue-view.component-Cp_0YkKh.mjs +239 -0
- package/fesm2022/techlify-inventory-common-stock-issue-view.component-Cp_0YkKh.mjs.map +1 -0
- package/fesm2022/techlify-inventory-common-stock-issue.service-CLHasWVp.mjs +38 -0
- package/fesm2022/techlify-inventory-common-stock-issue.service-CLHasWVp.mjs.map +1 -0
- package/fesm2022/techlify-inventory-common-stock-receipts.module-BPxUGNbD.mjs +4195 -0
- package/fesm2022/techlify-inventory-common-stock-receipts.module-BPxUGNbD.mjs.map +1 -0
- package/fesm2022/techlify-inventory-common-techlify-filter.module-BdRNWNHi.mjs +464 -0
- package/fesm2022/techlify-inventory-common-techlify-filter.module-BdRNWNHi.mjs.map +1 -0
- package/fesm2022/techlify-inventory-common-techlify-form-service-D9K3W2jt.mjs +13 -0
- package/fesm2022/techlify-inventory-common-techlify-form-service-D9K3W2jt.mjs.map +1 -0
- package/fesm2022/techlify-inventory-common.mjs +10803 -2
- package/fesm2022/techlify-inventory-common.mjs.map +1 -1
- package/package.json +9 -11
- package/types/techlify-inventory-common.d.ts +1792 -0
- package/esm2022/lib/inventory-common/category/category-form/category-form.component.mjs +0 -75
- package/esm2022/lib/inventory-common/category/category-form-button/category-form-button.component.mjs +0 -32
- package/esm2022/lib/inventory-common/category/category-list-page/category-list-page.component.mjs +0 -64
- package/esm2022/lib/inventory-common/category/category-routing.module.mjs +0 -29
- package/esm2022/lib/inventory-common/category/category-view/category-view.component.mjs +0 -46
- package/esm2022/lib/inventory-common/category/category.module.mjs +0 -62
- package/esm2022/lib/inventory-common/category/category.service.mjs +0 -18
- package/esm2022/lib/inventory-common/incident/incident-form/incident-form.component.mjs +0 -113
- package/esm2022/lib/inventory-common/incident/incident-form-button/incident-form-button.component.mjs +0 -45
- package/esm2022/lib/inventory-common/incident/incident-list/incident-list.component.mjs +0 -140
- package/esm2022/lib/inventory-common/incident/incident-routing.module.mjs +0 -24
- package/esm2022/lib/inventory-common/incident/incident.module.mjs +0 -22
- package/esm2022/lib/inventory-common/incident/incident.service.mjs +0 -18
- package/esm2022/lib/inventory-common/inventory-common-routing.module.mjs +0 -81
- package/esm2022/lib/inventory-common/inventory-common.module.mjs +0 -43
- package/esm2022/lib/inventory-common/inventory-dashboard-page/inventory-dashboard-page.component.mjs +0 -44
- package/esm2022/lib/inventory-common/inventory-value-report.service.mjs +0 -21
- package/esm2022/lib/inventory-common/location/location-form/location-form.component.mjs +0 -63
- package/esm2022/lib/inventory-common/location/location-form-button/location-form-button.component.mjs +0 -47
- package/esm2022/lib/inventory-common/location/location-information/location-information.component.mjs +0 -36
- package/esm2022/lib/inventory-common/location/location-list/location-list.component.mjs +0 -81
- package/esm2022/lib/inventory-common/location/location-product-statistics/location-product-statistics.component.mjs +0 -80
- package/esm2022/lib/inventory-common/location/location-routing.module.mjs +0 -38
- package/esm2022/lib/inventory-common/location/location-status-changer/location-status-changer.component.mjs +0 -64
- package/esm2022/lib/inventory-common/location/location-view/location-view.component.mjs +0 -52
- package/esm2022/lib/inventory-common/location/location.module.mjs +0 -22
- package/esm2022/lib/inventory-common/location/location.service.mjs +0 -33
- package/esm2022/lib/inventory-common/location/shelf/shelf-form/shelf-form.component.mjs +0 -86
- package/esm2022/lib/inventory-common/location/shelf/shelf-form-button/shelf-form-button.component.mjs +0 -39
- package/esm2022/lib/inventory-common/location/shelf/shelf-list/shelf-list.component.mjs +0 -103
- package/esm2022/lib/inventory-common/location/shelf/shelf-routing.module.mjs +0 -24
- package/esm2022/lib/inventory-common/location/shelf/shelf.module.mjs +0 -22
- package/esm2022/lib/inventory-common/location/shelf/shelf.service.mjs +0 -20
- package/esm2022/lib/inventory-common/low-stock-report.service.mjs +0 -23
- package/esm2022/lib/inventory-common/material.module.mjs +0 -172
- package/esm2022/lib/inventory-common/measure/measure-form/measure-form.component.mjs +0 -63
- package/esm2022/lib/inventory-common/measure/measure-list/measure-list.component.mjs +0 -75
- package/esm2022/lib/inventory-common/measure/measure-routing.module.mjs +0 -24
- package/esm2022/lib/inventory-common/measure/measure.module.mjs +0 -43
- package/esm2022/lib/inventory-common/measure/measure.service.mjs +0 -18
- package/esm2022/lib/inventory-common/product/low-stock-products-widget/low-stock-products-widget.component.mjs +0 -47
- package/esm2022/lib/inventory-common/product/low-stock-products-widget/low-stock-products-widget.module.mjs +0 -22
- package/esm2022/lib/inventory-common/product/product-basic-info/product-basic-info.component.mjs +0 -58
- package/esm2022/lib/inventory-common/product/product-batch-update-form/product-batch-update-form.component.mjs +0 -54
- package/esm2022/lib/inventory-common/product/product-delete-button/product-delete-button.component.mjs +0 -54
- package/esm2022/lib/inventory-common/product/product-form/product-form.component.mjs +0 -258
- package/esm2022/lib/inventory-common/product/product-form-button/product-form-button.component.mjs +0 -15
- package/esm2022/lib/inventory-common/product/product-form.service.mjs +0 -17
- package/esm2022/lib/inventory-common/product/product-import-page/product-import-page.component.mjs +0 -66
- package/esm2022/lib/inventory-common/product/product-list/product-list.component.mjs +0 -177
- package/esm2022/lib/inventory-common/product/product-location/product-location-list/product-location-list.component.mjs +0 -61
- package/esm2022/lib/inventory-common/product/product-measure-form/product-measure-form.component.mjs +0 -101
- package/esm2022/lib/inventory-common/product/product-measures-list/product-measures-list.component.mjs +0 -145
- package/esm2022/lib/inventory-common/product/product-nav-bar/product-nav-bar.component.mjs +0 -12
- package/esm2022/lib/inventory-common/product/product-quick-search/product-quick-search.component.mjs +0 -69
- package/esm2022/lib/inventory-common/product/product-routing.module.mjs +0 -68
- package/esm2022/lib/inventory-common/product/product-search/product-search.component.mjs +0 -151
- package/esm2022/lib/inventory-common/product/product-search/product-search.module.mjs +0 -39
- package/esm2022/lib/inventory-common/product/product-statistics.service.mjs +0 -23
- package/esm2022/lib/inventory-common/product/product-summary-chart/product-summary-chart.component.mjs +0 -57
- package/esm2022/lib/inventory-common/product/product-summary-chart/product-summary-chart.module.mjs +0 -18
- package/esm2022/lib/inventory-common/product/product-summary.service.mjs +0 -20
- package/esm2022/lib/inventory-common/product/product-view-page/product-view-page.component.mjs +0 -98
- package/esm2022/lib/inventory-common/product/product.module.mjs +0 -145
- package/esm2022/lib/inventory-common/product/product.service.mjs +0 -20
- package/esm2022/lib/inventory-common/product/widgets/product-category-badges/product-category-badges.component.mjs +0 -15
- package/esm2022/lib/inventory-common/product-batch.service.mjs +0 -20
- package/esm2022/lib/inventory-common/rating/rating-form/rating-form.component.mjs +0 -112
- package/esm2022/lib/inventory-common/rating/rating-form-button/rating-form-button.component.mjs +0 -45
- package/esm2022/lib/inventory-common/rating/rating-list/rating-list.component.mjs +0 -135
- package/esm2022/lib/inventory-common/rating/rating-routing.module.mjs +0 -23
- package/esm2022/lib/inventory-common/rating/rating.module.mjs +0 -22
- package/esm2022/lib/inventory-common/rating/rating.service.mjs +0 -18
- package/esm2022/lib/inventory-common/recipient/recipient-form/recipient-form.component.mjs +0 -59
- package/esm2022/lib/inventory-common/recipient/recipient-list/recipient-list.component.mjs +0 -49
- package/esm2022/lib/inventory-common/recipient/recipient-routing.module.mjs +0 -24
- package/esm2022/lib/inventory-common/recipient/recipient.module.mjs +0 -18
- package/esm2022/lib/inventory-common/recipient/recipient.service.mjs +0 -18
- package/esm2022/lib/inventory-common/reports/inventory-value-report/inventory-value-report.component.mjs +0 -152
- package/esm2022/lib/inventory-common/reports/low-stock-report/low-stock-report.component.mjs +0 -161
- package/esm2022/lib/inventory-common/reports/stock-issue-summary-report/stock-issue-product-data.service.mjs +0 -20
- package/esm2022/lib/inventory-common/reports/stock-issue-summary-report/stock-issue-summary-report.component.mjs +0 -98
- package/esm2022/lib/inventory-common/services/techlify-form-service.mjs +0 -11
- package/esm2022/lib/inventory-common/shared/export-to-excel-button/export-to-excel-button.component.mjs +0 -58
- package/esm2022/lib/inventory-common/shared.module.mjs +0 -67
- package/esm2022/lib/inventory-common/stock-allocation/stock-allocation-list/stock-allocation-list.component.mjs +0 -81
- package/esm2022/lib/inventory-common/stock-allocation/stock-allocation.service.mjs +0 -16
- package/esm2022/lib/inventory-common/stock-issue/stock-issue-form/stock-issue-form.component.mjs +0 -198
- package/esm2022/lib/inventory-common/stock-issue/stock-issue-import-page/stock-issue-import-page.component.mjs +0 -59
- package/esm2022/lib/inventory-common/stock-issue/stock-issue-list/stock-issue-list.component.mjs +0 -149
- package/esm2022/lib/inventory-common/stock-issue/stock-issue-page/stock-issue-page.component.mjs +0 -91
- package/esm2022/lib/inventory-common/stock-issue/stock-issue-page/stock-issue-page.module.mjs +0 -82
- package/esm2022/lib/inventory-common/stock-issue/stock-issue-product-form/stock-issue-product-form-button/stock-issue-product-form-button.component.mjs +0 -35
- package/esm2022/lib/inventory-common/stock-issue/stock-issue-product-form/stock-issue-product-form.component.mjs +0 -102
- package/esm2022/lib/inventory-common/stock-issue/stock-issue-product-view/stock-issue-product-view.component.mjs +0 -59
- package/esm2022/lib/inventory-common/stock-issue/stock-issue-product.service.mjs +0 -16
- package/esm2022/lib/inventory-common/stock-issue/stock-issue-products-list/stock-issue-products-list.component.mjs +0 -163
- package/esm2022/lib/inventory-common/stock-issue/stock-issue-routing.module.mjs +0 -51
- package/esm2022/lib/inventory-common/stock-issue/stock-issue-single-product-form/stock-issue-single-product-form.component.mjs +0 -201
- package/esm2022/lib/inventory-common/stock-issue/stock-issue-view/stock-issue-view.component.mjs +0 -64
- package/esm2022/lib/inventory-common/stock-issue/stock-issue.module.mjs +0 -47
- package/esm2022/lib/inventory-common/stock-issue/stock-issue.service.mjs +0 -18
- package/esm2022/lib/inventory-common/stock-receipts/stock-receipt-form/stock-receipt-form.component.mjs +0 -226
- package/esm2022/lib/inventory-common/stock-receipts/stock-receipt-import-page/stock-receipt-import-page.component.mjs +0 -74
- package/esm2022/lib/inventory-common/stock-receipts/stock-receipt-list/stock-receipt-list.component.mjs +0 -152
- package/esm2022/lib/inventory-common/stock-receipts/stock-receipt-product-form/stock-receipt-product-form-button/stock-receipt-product-form-button.component.mjs +0 -37
- package/esm2022/lib/inventory-common/stock-receipts/stock-receipt-product-form/stock-receipt-product-form.component.mjs +0 -80
- package/esm2022/lib/inventory-common/stock-receipts/stock-receipt-product-list/stock-receipt-product-list.component.mjs +0 -149
- package/esm2022/lib/inventory-common/stock-receipts/stock-receipt-product-view/stock-receipt-product-view.component.mjs +0 -59
- package/esm2022/lib/inventory-common/stock-receipts/stock-receipt-product.service.mjs +0 -18
- package/esm2022/lib/inventory-common/stock-receipts/stock-receipt-single-product-form/stock-receipt-simple-form/stock-receipt-single-product-form.component.mjs +0 -181
- package/esm2022/lib/inventory-common/stock-receipts/stock-receipt-view/stock-receipt-view.component.mjs +0 -54
- package/esm2022/lib/inventory-common/stock-receipts/stock-receipt.service.mjs +0 -18
- package/esm2022/lib/inventory-common/stock-receipts/stock-receipts-page/stock-receipts-page.component.mjs +0 -70
- package/esm2022/lib/inventory-common/stock-receipts/stock-receipts-routing.module.mjs +0 -52
- package/esm2022/lib/inventory-common/stock-receipts/stock-receipts.module.mjs +0 -104
- package/esm2022/lib/inventory-common/stock-summary.service.mjs +0 -26
- package/esm2022/lib/inventory-common/stock-transfer/stock-transfer-form/stock-transfer-form.component.mjs +0 -98
- package/esm2022/lib/inventory-common/stock-transfer/stock-transfer-list/stock-transfer-list.component.mjs +0 -139
- package/esm2022/lib/inventory-common/stock-transfer/stock-transfer.service.mjs +0 -18
- package/esm2022/lib/inventory-common/supplier/payee-selector/payee-selector/payee-selector.component.mjs +0 -59
- package/esm2022/lib/inventory-common/supplier/payee-selector/payee-selector.module.mjs +0 -21
- package/esm2022/lib/inventory-common/supplier/purchase-order/purchase-order-form/purchase-order-form.component.mjs +0 -156
- package/esm2022/lib/inventory-common/supplier/purchase-order/purchase-order-listing/purchase-order-listing.component.mjs +0 -67
- package/esm2022/lib/inventory-common/supplier/purchase-order/purchase-order-product-list/purchase-order-product-form/purchase-order-product-form.component.mjs +0 -74
- package/esm2022/lib/inventory-common/supplier/purchase-order/purchase-order-product-list/purchase-order-product-form-button/purchase-order-product-form-button.component.mjs +0 -38
- package/esm2022/lib/inventory-common/supplier/purchase-order/purchase-order-product-list/purchase-order-product-list.component.mjs +0 -61
- package/esm2022/lib/inventory-common/supplier/purchase-order/purchase-order-product-list/purchase-order-product.service.mjs +0 -20
- package/esm2022/lib/inventory-common/supplier/purchase-order/purchase-order-view/purchase-order-view.component.mjs +0 -64
- package/esm2022/lib/inventory-common/supplier/purchase-order/purchase-order.service.mjs +0 -20
- package/esm2022/lib/inventory-common/supplier/supplier-branch-delete-button/supplier-branch-delete-button.component.mjs +0 -63
- package/esm2022/lib/inventory-common/supplier/supplier-branch-form/supplier-branch-form-button/supplier-branch-form-button.component.mjs +0 -47
- package/esm2022/lib/inventory-common/supplier/supplier-branch-form/supplier-branch-form.component.mjs +0 -79
- package/esm2022/lib/inventory-common/supplier/supplier-branch.service.mjs +0 -18
- package/esm2022/lib/inventory-common/supplier/supplier-branches-list/supplier-branches-list.component.mjs +0 -79
- package/esm2022/lib/inventory-common/supplier/supplier-form/supplier-form.component.mjs +0 -94
- package/esm2022/lib/inventory-common/supplier/supplier-form/supplier-form.service.mjs +0 -17
- package/esm2022/lib/inventory-common/supplier/supplier-information/supplier-information.component.mjs +0 -73
- package/esm2022/lib/inventory-common/supplier/supplier-list/supplier-list.component.mjs +0 -68
- package/esm2022/lib/inventory-common/supplier/supplier-routing.module.mjs +0 -51
- package/esm2022/lib/inventory-common/supplier/supplier-type.service.mjs +0 -25
- package/esm2022/lib/inventory-common/supplier/supplier-view/supplier-view.component.mjs +0 -70
- package/esm2022/lib/inventory-common/supplier/supplier.component.mjs +0 -20
- package/esm2022/lib/inventory-common/supplier/supplier.module.mjs +0 -64
- package/esm2022/lib/inventory-common/supplier/supplier.service.mjs +0 -20
- package/esm2022/lib/inventory-common/techlify-filter/techlify-filter.component.mjs +0 -116
- package/esm2022/lib/inventory-common/techlify-filter/techlify-filter.module.mjs +0 -42
- package/esm2022/public-api.mjs +0 -71
- package/esm2022/techlify-inventory-common.mjs +0 -5
- package/fesm2022/techlify-inventory-common-category.module-CGzFP2S_.mjs +0 -288
- package/fesm2022/techlify-inventory-common-category.module-CGzFP2S_.mjs.map +0 -1
- package/fesm2022/techlify-inventory-common-purchase-order-view.component-5mLg0IvH.mjs +0 -227
- package/fesm2022/techlify-inventory-common-purchase-order-view.component-5mLg0IvH.mjs.map +0 -1
- package/fesm2022/techlify-inventory-common-recipient.module-DLoP6xI3.mjs +0 -147
- package/fesm2022/techlify-inventory-common-recipient.module-DLoP6xI3.mjs.map +0 -1
- package/fesm2022/techlify-inventory-common-stock-issue-form.component-MYEKRteU.mjs +0 -199
- package/fesm2022/techlify-inventory-common-stock-issue-form.component-MYEKRteU.mjs.map +0 -1
- package/fesm2022/techlify-inventory-common-stock-issue-product-view.component-C-c83FEn.mjs +0 -60
- package/fesm2022/techlify-inventory-common-stock-issue-product-view.component-C-c83FEn.mjs.map +0 -1
- package/fesm2022/techlify-inventory-common-stock-issue-view.component-Co7hXpDq.mjs +0 -66
- package/fesm2022/techlify-inventory-common-stock-issue-view.component-Co7hXpDq.mjs.map +0 -1
- package/fesm2022/techlify-inventory-common-techlify-inventory-common-CWxzlvVi.mjs +0 -7214
- package/fesm2022/techlify-inventory-common-techlify-inventory-common-CWxzlvVi.mjs.map +0 -1
- package/index.d.ts +0 -5
- package/lib/inventory-common/category/category-form/category-form.component.d.ts +0 -18
- package/lib/inventory-common/category/category-form-button/category-form-button.component.d.ts +0 -13
- package/lib/inventory-common/category/category-list-page/category-list-page.component.d.ts +0 -20
- package/lib/inventory-common/category/category-routing.module.d.ts +0 -7
- package/lib/inventory-common/category/category-view/category-view.component.d.ts +0 -16
- package/lib/inventory-common/category/category.module.d.ts +0 -20
- package/lib/inventory-common/category/category.service.d.ts +0 -7
- package/lib/inventory-common/incident/incident-form/incident-form.component.d.ts +0 -19
- package/lib/inventory-common/incident/incident-form-button/incident-form-button.component.d.ts +0 -15
- package/lib/inventory-common/incident/incident-list/incident-list.component.d.ts +0 -22
- package/lib/inventory-common/incident/incident-routing.module.d.ts +0 -7
- package/lib/inventory-common/incident/incident.module.d.ts +0 -8
- package/lib/inventory-common/incident/incident.service.d.ts +0 -7
- package/lib/inventory-common/inventory-common-routing.module.d.ts +0 -7
- package/lib/inventory-common/inventory-common.module.d.ts +0 -14
- package/lib/inventory-common/inventory-dashboard-page/inventory-dashboard-page.component.d.ts +0 -14
- package/lib/inventory-common/inventory-value-report.service.d.ts +0 -9
- package/lib/inventory-common/location/location-form/location-form.component.d.ts +0 -18
- package/lib/inventory-common/location/location-form-button/location-form-button.component.d.ts +0 -13
- package/lib/inventory-common/location/location-information/location-information.component.d.ts +0 -12
- package/lib/inventory-common/location/location-list/location-list.component.d.ts +0 -18
- package/lib/inventory-common/location/location-product-statistics/location-product-statistics.component.d.ts +0 -18
- package/lib/inventory-common/location/location-routing.module.d.ts +0 -7
- package/lib/inventory-common/location/location-status-changer/location-status-changer.component.d.ts +0 -17
- package/lib/inventory-common/location/location-view/location-view.component.d.ts +0 -16
- package/lib/inventory-common/location/location.module.d.ts +0 -8
- package/lib/inventory-common/location/location.service.d.ts +0 -15
- package/lib/inventory-common/location/shelf/shelf-form/shelf-form.component.d.ts +0 -18
- package/lib/inventory-common/location/shelf/shelf-form-button/shelf-form-button.component.d.ts +0 -13
- package/lib/inventory-common/location/shelf/shelf-list/shelf-list.component.d.ts +0 -19
- package/lib/inventory-common/location/shelf/shelf-routing.module.d.ts +0 -7
- package/lib/inventory-common/location/shelf/shelf.module.d.ts +0 -8
- package/lib/inventory-common/location/shelf/shelf.service.d.ts +0 -8
- package/lib/inventory-common/low-stock-report.service.d.ts +0 -10
- package/lib/inventory-common/material.module.d.ts +0 -40
- package/lib/inventory-common/measure/measure-form/measure-form.component.d.ts +0 -21
- package/lib/inventory-common/measure/measure-list/measure-list.component.d.ts +0 -19
- package/lib/inventory-common/measure/measure-routing.module.d.ts +0 -7
- package/lib/inventory-common/measure/measure.module.d.ts +0 -14
- package/lib/inventory-common/measure/measure.service.d.ts +0 -7
- package/lib/inventory-common/product/low-stock-products-widget/low-stock-products-widget.component.d.ts +0 -13
- package/lib/inventory-common/product/low-stock-products-widget/low-stock-products-widget.module.d.ts +0 -12
- package/lib/inventory-common/product/product-basic-info/product-basic-info.component.d.ts +0 -21
- package/lib/inventory-common/product/product-batch-update-form/product-batch-update-form.component.d.ts +0 -17
- package/lib/inventory-common/product/product-delete-button/product-delete-button.component.d.ts +0 -26
- package/lib/inventory-common/product/product-form/product-form.component.d.ts +0 -46
- package/lib/inventory-common/product/product-form-button/product-form-button.component.d.ts +0 -7
- package/lib/inventory-common/product/product-form.service.d.ts +0 -7
- package/lib/inventory-common/product/product-import-page/product-import-page.component.d.ts +0 -10
- package/lib/inventory-common/product/product-list/product-list.component.d.ts +0 -34
- package/lib/inventory-common/product/product-location/product-location-list/product-location-list.component.d.ts +0 -18
- package/lib/inventory-common/product/product-measure-form/product-measure-form.component.d.ts +0 -33
- package/lib/inventory-common/product/product-measures-list/product-measures-list.component.d.ts +0 -43
- package/lib/inventory-common/product/product-nav-bar/product-nav-bar.component.d.ts +0 -5
- package/lib/inventory-common/product/product-quick-search/product-quick-search.component.d.ts +0 -15
- package/lib/inventory-common/product/product-routing.module.d.ts +0 -7
- package/lib/inventory-common/product/product-search/product-search.component.d.ts +0 -48
- package/lib/inventory-common/product/product-search/product-search.module.d.ts +0 -13
- package/lib/inventory-common/product/product-statistics.service.d.ts +0 -9
- package/lib/inventory-common/product/product-summary-chart/product-summary-chart.component.d.ts +0 -15
- package/lib/inventory-common/product/product-summary-chart/product-summary-chart.module.d.ts +0 -10
- package/lib/inventory-common/product/product-summary.service.d.ts +0 -8
- package/lib/inventory-common/product/product-view-page/product-view-page.component.d.ts +0 -44
- package/lib/inventory-common/product/product.module.d.ts +0 -31
- package/lib/inventory-common/product/product.service.d.ts +0 -8
- package/lib/inventory-common/product/widgets/product-category-badges/product-category-badges.component.d.ts +0 -6
- package/lib/inventory-common/product-batch.service.d.ts +0 -8
- package/lib/inventory-common/rating/rating-form/rating-form.component.d.ts +0 -19
- package/lib/inventory-common/rating/rating-form-button/rating-form-button.component.d.ts +0 -15
- package/lib/inventory-common/rating/rating-list/rating-list.component.d.ts +0 -22
- package/lib/inventory-common/rating/rating-routing.module.d.ts +0 -7
- package/lib/inventory-common/rating/rating.module.d.ts +0 -8
- package/lib/inventory-common/rating/rating.service.d.ts +0 -7
- package/lib/inventory-common/recipient/recipient-form/recipient-form.component.d.ts +0 -21
- package/lib/inventory-common/recipient/recipient-list/recipient-list.component.d.ts +0 -16
- package/lib/inventory-common/recipient/recipient-routing.module.d.ts +0 -7
- package/lib/inventory-common/recipient/recipient.module.d.ts +0 -9
- package/lib/inventory-common/recipient/recipient.service.d.ts +0 -7
- package/lib/inventory-common/reports/inventory-value-report/inventory-value-report.component.d.ts +0 -27
- package/lib/inventory-common/reports/low-stock-report/low-stock-report.component.d.ts +0 -25
- package/lib/inventory-common/reports/stock-issue-summary-report/stock-issue-product-data.service.d.ts +0 -8
- package/lib/inventory-common/reports/stock-issue-summary-report/stock-issue-summary-report.component.d.ts +0 -25
- package/lib/inventory-common/services/techlify-form-service.d.ts +0 -5
- package/lib/inventory-common/shared/export-to-excel-button/export-to-excel-button.component.d.ts +0 -12
- package/lib/inventory-common/shared.module.d.ts +0 -13
- package/lib/inventory-common/stock-allocation/stock-allocation-list/stock-allocation-list.component.d.ts +0 -19
- package/lib/inventory-common/stock-allocation/stock-allocation.service.d.ts +0 -7
- package/lib/inventory-common/stock-issue/stock-issue-form/stock-issue-form.component.d.ts +0 -45
- package/lib/inventory-common/stock-issue/stock-issue-import-page/stock-issue-import-page.component.d.ts +0 -10
- package/lib/inventory-common/stock-issue/stock-issue-list/stock-issue-list.component.d.ts +0 -33
- package/lib/inventory-common/stock-issue/stock-issue-page/stock-issue-page.component.d.ts +0 -30
- package/lib/inventory-common/stock-issue/stock-issue-page/stock-issue-page.module.d.ts +0 -18
- package/lib/inventory-common/stock-issue/stock-issue-product-form/stock-issue-product-form-button/stock-issue-product-form-button.component.d.ts +0 -12
- package/lib/inventory-common/stock-issue/stock-issue-product-form/stock-issue-product-form.component.d.ts +0 -21
- package/lib/inventory-common/stock-issue/stock-issue-product-view/stock-issue-product-view.component.d.ts +0 -19
- package/lib/inventory-common/stock-issue/stock-issue-product.service.d.ts +0 -7
- package/lib/inventory-common/stock-issue/stock-issue-products-list/stock-issue-products-list.component.d.ts +0 -40
- package/lib/inventory-common/stock-issue/stock-issue-routing.module.d.ts +0 -7
- package/lib/inventory-common/stock-issue/stock-issue-single-product-form/stock-issue-single-product-form.component.d.ts +0 -42
- package/lib/inventory-common/stock-issue/stock-issue-view/stock-issue-view.component.d.ts +0 -19
- package/lib/inventory-common/stock-issue/stock-issue.module.d.ts +0 -14
- package/lib/inventory-common/stock-issue/stock-issue.service.d.ts +0 -7
- package/lib/inventory-common/stock-receipts/stock-receipt-form/stock-receipt-form.component.d.ts +0 -48
- package/lib/inventory-common/stock-receipts/stock-receipt-import-page/stock-receipt-import-page.component.d.ts +0 -10
- package/lib/inventory-common/stock-receipts/stock-receipt-list/stock-receipt-list.component.d.ts +0 -30
- package/lib/inventory-common/stock-receipts/stock-receipt-product-form/stock-receipt-product-form-button/stock-receipt-product-form-button.component.d.ts +0 -12
- package/lib/inventory-common/stock-receipts/stock-receipt-product-form/stock-receipt-product-form.component.d.ts +0 -17
- package/lib/inventory-common/stock-receipts/stock-receipt-product-list/stock-receipt-product-list.component.d.ts +0 -31
- package/lib/inventory-common/stock-receipts/stock-receipt-product-view/stock-receipt-product-view.component.d.ts +0 -19
- package/lib/inventory-common/stock-receipts/stock-receipt-product.service.d.ts +0 -7
- package/lib/inventory-common/stock-receipts/stock-receipt-single-product-form/stock-receipt-simple-form/stock-receipt-single-product-form.component.d.ts +0 -33
- package/lib/inventory-common/stock-receipts/stock-receipt-view/stock-receipt-view.component.d.ts +0 -19
- package/lib/inventory-common/stock-receipts/stock-receipt.service.d.ts +0 -7
- package/lib/inventory-common/stock-receipts/stock-receipts-page/stock-receipts-page.component.d.ts +0 -21
- package/lib/inventory-common/stock-receipts/stock-receipts-routing.module.d.ts +0 -7
- package/lib/inventory-common/stock-receipts/stock-receipts.module.d.ts +0 -22
- package/lib/inventory-common/stock-summary.service.d.ts +0 -14
- package/lib/inventory-common/stock-transfer/stock-transfer-form/stock-transfer-form.component.d.ts +0 -19
- package/lib/inventory-common/stock-transfer/stock-transfer-list/stock-transfer-list.component.d.ts +0 -28
- package/lib/inventory-common/stock-transfer/stock-transfer.service.d.ts +0 -7
- package/lib/inventory-common/supplier/payee-selector/payee-selector/payee-selector.component.d.ts +0 -20
- package/lib/inventory-common/supplier/payee-selector/payee-selector.module.d.ts +0 -11
- package/lib/inventory-common/supplier/purchase-order/purchase-order-form/purchase-order-form.component.d.ts +0 -30
- package/lib/inventory-common/supplier/purchase-order/purchase-order-listing/purchase-order-listing.component.d.ts +0 -16
- package/lib/inventory-common/supplier/purchase-order/purchase-order-product-list/purchase-order-product-form/purchase-order-product-form.component.d.ts +0 -16
- package/lib/inventory-common/supplier/purchase-order/purchase-order-product-list/purchase-order-product-form-button/purchase-order-product-form-button.component.d.ts +0 -12
- package/lib/inventory-common/supplier/purchase-order/purchase-order-product-list/purchase-order-product-list.component.d.ts +0 -15
- package/lib/inventory-common/supplier/purchase-order/purchase-order-product-list/purchase-order-product.service.d.ts +0 -8
- package/lib/inventory-common/supplier/purchase-order/purchase-order-view/purchase-order-view.component.d.ts +0 -19
- package/lib/inventory-common/supplier/purchase-order/purchase-order.service.d.ts +0 -8
- package/lib/inventory-common/supplier/supplier-branch-delete-button/supplier-branch-delete-button.component.d.ts +0 -18
- package/lib/inventory-common/supplier/supplier-branch-form/supplier-branch-form-button/supplier-branch-form-button.component.d.ts +0 -13
- package/lib/inventory-common/supplier/supplier-branch-form/supplier-branch-form.component.d.ts +0 -22
- package/lib/inventory-common/supplier/supplier-branch.service.d.ts +0 -7
- package/lib/inventory-common/supplier/supplier-branches-list/supplier-branches-list.component.d.ts +0 -18
- package/lib/inventory-common/supplier/supplier-form/supplier-form.component.d.ts +0 -25
- package/lib/inventory-common/supplier/supplier-form/supplier-form.service.d.ts +0 -7
- package/lib/inventory-common/supplier/supplier-information/supplier-information.component.d.ts +0 -18
- package/lib/inventory-common/supplier/supplier-list/supplier-list.component.d.ts +0 -20
- package/lib/inventory-common/supplier/supplier-routing.module.d.ts +0 -7
- package/lib/inventory-common/supplier/supplier-type.service.d.ts +0 -13
- package/lib/inventory-common/supplier/supplier-view/supplier-view.component.d.ts +0 -20
- package/lib/inventory-common/supplier/supplier.component.d.ts +0 -10
- package/lib/inventory-common/supplier/supplier.module.d.ts +0 -20
- package/lib/inventory-common/supplier/supplier.service.d.ts +0 -8
- package/lib/inventory-common/techlify-filter/techlify-filter.component.d.ts +0 -31
- package/lib/inventory-common/techlify-filter/techlify-filter.module.d.ts +0 -12
- package/public-api.d.ts +0 -67
|
@@ -0,0 +1,2509 @@
|
|
|
1
|
+
import { t as StockIssueService } from "./techlify-inventory-common-stock-issue.service-CLHasWVp.mjs";
|
|
2
|
+
import { n as ExportToExcelButtonComponent, t as ProductCategoryBadgesComponent } from "./techlify-inventory-common-product-category-badges.component-VnfnNhtV.mjs";
|
|
3
|
+
import { t as MaterialModule$1 } from "./techlify-inventory-common-material.module-ClupVm7-.mjs";
|
|
4
|
+
import { t as StockIssueProductService } from "./techlify-inventory-common-stock-issue-product.service-BRbfc5KP.mjs";
|
|
5
|
+
import { t as LocationService } from "./techlify-inventory-common-location.service-C99J8Lje.mjs";
|
|
6
|
+
import { t as TechlifyFilterModule } from "./techlify-inventory-common-techlify-filter.module-BdRNWNHi.mjs";
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
import { ChangeDetectionStrategy, Component, EventEmitter, Inject, Input, NgModule, Optional, Output, ViewChild, effect, input, model, output, signal } from "@angular/core";
|
|
9
|
+
import * as i11 from "@angular/router";
|
|
10
|
+
import { RouterModule } from "@angular/router";
|
|
11
|
+
import * as i1 from "ngx-techlify-core";
|
|
12
|
+
import { ColumnSelectorModule, FormConfigurationForFormModule, FormConfigurationUtilityService, MaterialModule, SearchableSelectorModule, TechlifyDeleteButtonComponent, TechlifyFeatureModule, TechlifyFormButtonComponent, TechlifyFormComponent, TechlifyIconModule, TechlifyListComponent, TimelineFilterModule } from "ngx-techlify-core";
|
|
13
|
+
import * as i7 from "@angular/material/card";
|
|
14
|
+
import * as i6$1 from "@angular/material/table";
|
|
15
|
+
import * as i9 from "@angular/material/progress-bar";
|
|
16
|
+
import { MatProgressBarModule } from "@angular/material/progress-bar";
|
|
17
|
+
import * as i10 from "ngx-infinite-scroll";
|
|
18
|
+
import { InfiniteScrollDirective } from "ngx-infinite-scroll";
|
|
19
|
+
import * as i2 from "@angular/forms";
|
|
20
|
+
import { ReactiveFormsModule, Validators } from "@angular/forms";
|
|
21
|
+
import { debounceTime, distinctUntilChanged, startWith } from "rxjs";
|
|
22
|
+
import { __decorate } from "tslib";
|
|
23
|
+
import * as i4$1 from "@angular/material/dialog";
|
|
24
|
+
import { MAT_DIALOG_DATA, MatDialogContent, MatDialogModule, MatDialogTitle } from "@angular/material/dialog";
|
|
25
|
+
import * as i5$1 from "@angular/material/button";
|
|
26
|
+
import * as i6$2 from "@angular/material/form-field";
|
|
27
|
+
import * as i7$1 from "@angular/material/input";
|
|
28
|
+
import { UntilDestroy } from "@ngneat/until-destroy";
|
|
29
|
+
import * as i5 from "@angular/material/sort";
|
|
30
|
+
import * as i8 from "@angular/material/tooltip";
|
|
31
|
+
import * as i6 from "@angular/material/button-toggle";
|
|
32
|
+
import * as i8$1 from "@angular/material/datepicker";
|
|
33
|
+
import * as i4 from "@angular/common";
|
|
34
|
+
import { CommonModule, DatePipe } from "@angular/common";
|
|
35
|
+
import { toSignal } from "@angular/core/rxjs-interop";
|
|
36
|
+
var StockIssueProductFormComponent = class StockIssueProductFormComponent extends TechlifyFormComponent {
|
|
37
|
+
fb;
|
|
38
|
+
service;
|
|
39
|
+
data;
|
|
40
|
+
batchSelector;
|
|
41
|
+
batchesApiUrl = "";
|
|
42
|
+
isBatchPatched = false;
|
|
43
|
+
constructor(formValidatorService, fb, service, dialogRef, data) {
|
|
44
|
+
super(formValidatorService);
|
|
45
|
+
this.fb = fb;
|
|
46
|
+
this.service = service;
|
|
47
|
+
this.data = data;
|
|
48
|
+
this.dialogRef = dialogRef;
|
|
49
|
+
this.errorMessages = {
|
|
50
|
+
product_id: { required: "Product is required." },
|
|
51
|
+
quantity: {
|
|
52
|
+
required: "Quantity is required.",
|
|
53
|
+
min: "Quantity must be greater than or equal to 0."
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
this.form = this.fb.group({
|
|
57
|
+
id: [""],
|
|
58
|
+
stock_issue_id: ["", Validators.required],
|
|
59
|
+
product_id: ["", Validators.required],
|
|
60
|
+
quantity: [0, [Validators.required, Validators.min(0)]],
|
|
61
|
+
location_from_id: [""],
|
|
62
|
+
batch_id: [""],
|
|
63
|
+
particulars: [""]
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
ngOnInit() {
|
|
67
|
+
this.form.patchValue({ stock_issue_id: this.data.stockIssueId });
|
|
68
|
+
this.form.get("location_from_id")?.valueChanges.pipe(debounceTime(50), distinctUntilChanged()).subscribe((val) => {
|
|
69
|
+
this.resetBatchSelector(val);
|
|
70
|
+
});
|
|
71
|
+
const product = this.data.model;
|
|
72
|
+
if (product) {
|
|
73
|
+
this.isUpdate = true;
|
|
74
|
+
this.form.patchValue(product, { emitEvent: false });
|
|
75
|
+
this.resetBatchSelector(product.location_from_id, false);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
onBatchItemsChange() {
|
|
79
|
+
if (this.data.model && !this.isBatchPatched && this.batchSelector) {
|
|
80
|
+
this.form.get("batch_id")?.setValue(this.data.model.batch_id);
|
|
81
|
+
this.batchSelector.selectedValue = this.data.model.batch;
|
|
82
|
+
this.isBatchPatched = true;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
resetBatchSelector(locationId, reset = true) {
|
|
86
|
+
if (reset) this.form.get("batch_id")?.setValue(null, { emitEvent: false });
|
|
87
|
+
this.batchesApiUrl = locationId ? `api/stock-receipt-batches?location_ids=${locationId}` : "";
|
|
88
|
+
Promise.resolve().then(() => {
|
|
89
|
+
if (this.batchSelector) {
|
|
90
|
+
if (reset) this.batchSelector.selectedValue = null;
|
|
91
|
+
this.batchSelector.apiUrl = this.batchesApiUrl;
|
|
92
|
+
this.batchSelector.reloadData();
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
cancel() {
|
|
97
|
+
this.dialogRef.close();
|
|
98
|
+
}
|
|
99
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
100
|
+
minVersion: "12.0.0",
|
|
101
|
+
version: "22.2.5",
|
|
102
|
+
ngImport: i0,
|
|
103
|
+
type: StockIssueProductFormComponent,
|
|
104
|
+
deps: [
|
|
105
|
+
{ token: i1.FormValidatorService },
|
|
106
|
+
{ token: i2.FormBuilder },
|
|
107
|
+
{ token: StockIssueProductService },
|
|
108
|
+
{ token: i4$1.MatDialogRef },
|
|
109
|
+
{ token: MAT_DIALOG_DATA }
|
|
110
|
+
],
|
|
111
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
112
|
+
});
|
|
113
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
114
|
+
minVersion: "17.0.0",
|
|
115
|
+
version: "22.2.5",
|
|
116
|
+
type: StockIssueProductFormComponent,
|
|
117
|
+
isStandalone: true,
|
|
118
|
+
selector: "app-stock-issue-product-form",
|
|
119
|
+
viewQueries: [{
|
|
120
|
+
propertyName: "batchSelector",
|
|
121
|
+
first: true,
|
|
122
|
+
predicate: ["batchSelector"],
|
|
123
|
+
descendants: true
|
|
124
|
+
}],
|
|
125
|
+
usesInheritance: true,
|
|
126
|
+
ngImport: i0,
|
|
127
|
+
template: "<h3 mat-dialog-title class='text-center'>Stock Issue Product Form</h3>\n\n<mat-dialog-content>\n <form [formGroup]=\"form\" (submit)=\"submit(form.getRawValue())\" class=\"d-flex flex-column gap-3 mt-2\">\n\n <mat-form-field class=\"w-100\">\n <mat-label>Product</mat-label>\n <app-searchable-selector formControlName=\"product_id\" apiUrl=\"api/products\" titleField=\"name\"\n [selectedValue]=\"$safeNavigationMigration(data?.product)\" [cache]=\"true\"></app-searchable-selector>\n @if (isFieldValid('product_id')) {\n <mat-error>{{ getErrorMessage('product_id') }}</mat-error>\n }\n </mat-form-field>\n\n <mat-form-field class=\"w-100\">\n <mat-label>Quantity</mat-label>\n <input matInput type=\"number\" formControlName=\"quantity\" min=\"0\" step=\"any\">\n @if (isFieldValid('quantity')) {\n <mat-error>{{ getErrorMessage('quantity') }}</mat-error>\n }\n </mat-form-field>\n\n <mat-form-field class=\"w-100\">\n <mat-label>Location From</mat-label>\n <app-searchable-selector formControlName=\"location_from_id\" apiUrl=\"api/inventory-locations?status_ids=1\"\n [selectedValue]=\"$safeNavigationMigration(data.stockIssueProduct?.location)\" titleField=\"title\"></app-searchable-selector>\n </mat-form-field>\n\n @if (form.value?.location_from_id && batchesApiUrl) {\n <mat-form-field class=\"w-100\" techlifyFeatureEnabled=\"product-batch-numbers\">\n <mat-label>Batch</mat-label>\n <app-searchable-selector #batchSelector formControlName=\"batch_id\"\n [apiUrl]=\"batchesApiUrl\" [enableSearch]=\"false\"\n (itemsChange)=\"onBatchItemsChange()\">\n </app-searchable-selector>\n </mat-form-field>\n }\n\n <mat-form-field class=\"w-100\">\n <mat-label>Particulars</mat-label>\n <textarea matInput formControlName=\"particulars\" rows=\"3\"></textarea>\n </mat-form-field>\n\n <div class=\"d-flex justify-content-end gap-2\">\n <button mat-flat-button type=\"button\" [disabled]=\"isWorking\" (click)=\"cancel()\">Cancel</button>\n <button mat-raised-button color=\"primary\" type=\"submit\" [disabled]=\"isWorking\">Save</button>\n </div>\n\n </form>\n</mat-dialog-content>\n",
|
|
128
|
+
dependencies: [
|
|
129
|
+
{
|
|
130
|
+
kind: "ngmodule",
|
|
131
|
+
type: ReactiveFormsModule
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
kind: "directive",
|
|
135
|
+
type: i2.ɵNgNoValidate,
|
|
136
|
+
selector: "form:not([ngNoForm]):not([ngNativeValidate])"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
kind: "directive",
|
|
140
|
+
type: i2.DefaultValueAccessor,
|
|
141
|
+
selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]"
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
kind: "directive",
|
|
145
|
+
type: i2.NumberValueAccessor,
|
|
146
|
+
selector: "input[type=number]:not([ngNoCva])[formControlName],input[type=number]:not([ngNoCva])[formControl],input[type=number]:not([ngNoCva])[ngModel]"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
kind: "directive",
|
|
150
|
+
type: i2.NgControlStatus,
|
|
151
|
+
selector: "[formControlName],[ngModel],[formControl]"
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
kind: "directive",
|
|
155
|
+
type: i2.NgControlStatusGroup,
|
|
156
|
+
selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]"
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
kind: "directive",
|
|
160
|
+
type: i2.MinValidator,
|
|
161
|
+
selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]",
|
|
162
|
+
inputs: ["min"]
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
kind: "directive",
|
|
166
|
+
type: i2.FormGroupDirective,
|
|
167
|
+
selector: "[formGroup]",
|
|
168
|
+
inputs: ["formGroup"],
|
|
169
|
+
outputs: ["ngSubmit"],
|
|
170
|
+
exportAs: ["ngForm"]
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
kind: "directive",
|
|
174
|
+
type: i2.FormControlName,
|
|
175
|
+
selector: "[formControlName]",
|
|
176
|
+
inputs: [
|
|
177
|
+
"formControlName",
|
|
178
|
+
"disabled",
|
|
179
|
+
"ngModel"
|
|
180
|
+
],
|
|
181
|
+
outputs: ["ngModelChange"]
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
kind: "ngmodule",
|
|
185
|
+
type: MaterialModule$1
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
kind: "component",
|
|
189
|
+
type: i5$1.MatButton,
|
|
190
|
+
selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ",
|
|
191
|
+
inputs: ["matButton"],
|
|
192
|
+
exportAs: ["matButton", "matAnchor"]
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
kind: "directive",
|
|
196
|
+
type: i4$1.MatDialogTitle,
|
|
197
|
+
selector: "[mat-dialog-title], [matDialogTitle]",
|
|
198
|
+
inputs: ["id"],
|
|
199
|
+
exportAs: ["matDialogTitle"]
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
kind: "directive",
|
|
203
|
+
type: i4$1.MatDialogContent,
|
|
204
|
+
selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]"
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
kind: "component",
|
|
208
|
+
type: i6$2.MatFormField,
|
|
209
|
+
selector: "mat-form-field",
|
|
210
|
+
inputs: [
|
|
211
|
+
"hideRequiredMarker",
|
|
212
|
+
"color",
|
|
213
|
+
"floatLabel",
|
|
214
|
+
"appearance",
|
|
215
|
+
"subscriptSizing",
|
|
216
|
+
"hintLabel"
|
|
217
|
+
],
|
|
218
|
+
exportAs: ["matFormField"]
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
kind: "directive",
|
|
222
|
+
type: i6$2.MatLabel,
|
|
223
|
+
selector: "mat-label"
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
kind: "directive",
|
|
227
|
+
type: i6$2.MatError,
|
|
228
|
+
selector: "mat-error, [matError]",
|
|
229
|
+
inputs: ["id"]
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
kind: "directive",
|
|
233
|
+
type: i7$1.MatInput,
|
|
234
|
+
selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]",
|
|
235
|
+
inputs: [
|
|
236
|
+
"disabled",
|
|
237
|
+
"id",
|
|
238
|
+
"placeholder",
|
|
239
|
+
"name",
|
|
240
|
+
"required",
|
|
241
|
+
"type",
|
|
242
|
+
"errorStateMatcher",
|
|
243
|
+
"aria-describedby",
|
|
244
|
+
"value",
|
|
245
|
+
"readonly",
|
|
246
|
+
"disabledInteractive"
|
|
247
|
+
],
|
|
248
|
+
exportAs: ["matInput"]
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
kind: "ngmodule",
|
|
252
|
+
type: SearchableSelectorModule
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
kind: "component",
|
|
256
|
+
type: i1.SearchableSelectorComponent,
|
|
257
|
+
selector: "app-searchable-selector",
|
|
258
|
+
inputs: [
|
|
259
|
+
"valueField",
|
|
260
|
+
"titleField",
|
|
261
|
+
"subtitleField",
|
|
262
|
+
"apiUrl",
|
|
263
|
+
"multiple",
|
|
264
|
+
"selectedValue",
|
|
265
|
+
"enableSearch",
|
|
266
|
+
"add",
|
|
267
|
+
"addConfig",
|
|
268
|
+
"edit",
|
|
269
|
+
"editConfig",
|
|
270
|
+
"sort",
|
|
271
|
+
"sortBy",
|
|
272
|
+
"searchField",
|
|
273
|
+
"itemComponent",
|
|
274
|
+
"items",
|
|
275
|
+
"apiDataProperty",
|
|
276
|
+
"cache",
|
|
277
|
+
"perPage",
|
|
278
|
+
"inDataSearch",
|
|
279
|
+
"panelWidth",
|
|
280
|
+
"focusSearchOnOpen",
|
|
281
|
+
"isEmitInitialEvent",
|
|
282
|
+
"required",
|
|
283
|
+
"disabled",
|
|
284
|
+
"value"
|
|
285
|
+
],
|
|
286
|
+
outputs: [
|
|
287
|
+
"selectedValueChange",
|
|
288
|
+
"selectionChange",
|
|
289
|
+
"itemsChange",
|
|
290
|
+
"isItemsEmpty"
|
|
291
|
+
]
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
kind: "ngmodule",
|
|
295
|
+
type: TechlifyFeatureModule
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
kind: "directive",
|
|
299
|
+
type: i1.TechlifyFeatureEnabledDirective,
|
|
300
|
+
selector: "[techlifyFeatureEnabled]",
|
|
301
|
+
inputs: ["techlifyFeatureEnabled"]
|
|
302
|
+
}
|
|
303
|
+
],
|
|
304
|
+
changeDetection: i0.ChangeDetectionStrategy.Eager,
|
|
305
|
+
preserveWhitespaces: true
|
|
306
|
+
});
|
|
307
|
+
};
|
|
308
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
309
|
+
minVersion: "12.0.0",
|
|
310
|
+
version: "22.2.5",
|
|
311
|
+
ngImport: i0,
|
|
312
|
+
type: StockIssueProductFormComponent,
|
|
313
|
+
decorators: [{
|
|
314
|
+
type: Component,
|
|
315
|
+
args: [{
|
|
316
|
+
selector: "app-stock-issue-product-form",
|
|
317
|
+
changeDetection: ChangeDetectionStrategy.Eager,
|
|
318
|
+
imports: [
|
|
319
|
+
ReactiveFormsModule,
|
|
320
|
+
MaterialModule$1,
|
|
321
|
+
SearchableSelectorModule,
|
|
322
|
+
TechlifyFeatureModule,
|
|
323
|
+
MatDialogTitle,
|
|
324
|
+
MatDialogContent
|
|
325
|
+
],
|
|
326
|
+
template: "<h3 mat-dialog-title class='text-center'>Stock Issue Product Form</h3>\n\n<mat-dialog-content>\n <form [formGroup]=\"form\" (submit)=\"submit(form.getRawValue())\" class=\"d-flex flex-column gap-3 mt-2\">\n\n <mat-form-field class=\"w-100\">\n <mat-label>Product</mat-label>\n <app-searchable-selector formControlName=\"product_id\" apiUrl=\"api/products\" titleField=\"name\"\n [selectedValue]=\"$safeNavigationMigration(data?.product)\" [cache]=\"true\"></app-searchable-selector>\n @if (isFieldValid('product_id')) {\n <mat-error>{{ getErrorMessage('product_id') }}</mat-error>\n }\n </mat-form-field>\n\n <mat-form-field class=\"w-100\">\n <mat-label>Quantity</mat-label>\n <input matInput type=\"number\" formControlName=\"quantity\" min=\"0\" step=\"any\">\n @if (isFieldValid('quantity')) {\n <mat-error>{{ getErrorMessage('quantity') }}</mat-error>\n }\n </mat-form-field>\n\n <mat-form-field class=\"w-100\">\n <mat-label>Location From</mat-label>\n <app-searchable-selector formControlName=\"location_from_id\" apiUrl=\"api/inventory-locations?status_ids=1\"\n [selectedValue]=\"$safeNavigationMigration(data.stockIssueProduct?.location)\" titleField=\"title\"></app-searchable-selector>\n </mat-form-field>\n\n @if (form.value?.location_from_id && batchesApiUrl) {\n <mat-form-field class=\"w-100\" techlifyFeatureEnabled=\"product-batch-numbers\">\n <mat-label>Batch</mat-label>\n <app-searchable-selector #batchSelector formControlName=\"batch_id\"\n [apiUrl]=\"batchesApiUrl\" [enableSearch]=\"false\"\n (itemsChange)=\"onBatchItemsChange()\">\n </app-searchable-selector>\n </mat-form-field>\n }\n\n <mat-form-field class=\"w-100\">\n <mat-label>Particulars</mat-label>\n <textarea matInput formControlName=\"particulars\" rows=\"3\"></textarea>\n </mat-form-field>\n\n <div class=\"d-flex justify-content-end gap-2\">\n <button mat-flat-button type=\"button\" [disabled]=\"isWorking\" (click)=\"cancel()\">Cancel</button>\n <button mat-raised-button color=\"primary\" type=\"submit\" [disabled]=\"isWorking\">Save</button>\n </div>\n\n </form>\n</mat-dialog-content>\n"
|
|
327
|
+
}]
|
|
328
|
+
}],
|
|
329
|
+
ctorParameters: () => [
|
|
330
|
+
{ type: i1.FormValidatorService },
|
|
331
|
+
{ type: i2.FormBuilder },
|
|
332
|
+
{ type: StockIssueProductService },
|
|
333
|
+
{ type: i4$1.MatDialogRef },
|
|
334
|
+
{
|
|
335
|
+
type: void 0,
|
|
336
|
+
decorators: [{
|
|
337
|
+
type: Inject,
|
|
338
|
+
args: [MAT_DIALOG_DATA]
|
|
339
|
+
}]
|
|
340
|
+
}
|
|
341
|
+
],
|
|
342
|
+
propDecorators: { batchSelector: [{
|
|
343
|
+
type: ViewChild,
|
|
344
|
+
args: ["batchSelector"]
|
|
345
|
+
}] }
|
|
346
|
+
});
|
|
347
|
+
var StockIssueSingleProductFormComponent = class StockIssueSingleProductFormComponent extends TechlifyFormComponent {
|
|
348
|
+
formValidatorService;
|
|
349
|
+
service;
|
|
350
|
+
formBuilder;
|
|
351
|
+
dateUtils;
|
|
352
|
+
locationService;
|
|
353
|
+
formConfigService;
|
|
354
|
+
dialogRef;
|
|
355
|
+
data;
|
|
356
|
+
batchSearchableSelector;
|
|
357
|
+
product;
|
|
358
|
+
stockIssue;
|
|
359
|
+
locationsCountValue = 0;
|
|
360
|
+
batchesApiUrl = "";
|
|
361
|
+
isBatchPatched = false;
|
|
362
|
+
formConfigurationUtilityService;
|
|
363
|
+
constructor(formValidatorService, service, formBuilder, dateUtils, locationService, formConfigService, dialogRef, data) {
|
|
364
|
+
super(formValidatorService);
|
|
365
|
+
this.formValidatorService = formValidatorService;
|
|
366
|
+
this.service = service;
|
|
367
|
+
this.formBuilder = formBuilder;
|
|
368
|
+
this.dateUtils = dateUtils;
|
|
369
|
+
this.locationService = locationService;
|
|
370
|
+
this.formConfigService = formConfigService;
|
|
371
|
+
this.dialogRef = dialogRef;
|
|
372
|
+
this.data = data;
|
|
373
|
+
this.formConfigurationUtilityService = new FormConfigurationUtilityService();
|
|
374
|
+
this.errorMessages = {
|
|
375
|
+
date: { required: "The date field is required." },
|
|
376
|
+
quantity: { required: "The quantity field is required." },
|
|
377
|
+
product_id: { required: "The product field is required." },
|
|
378
|
+
location_from_id: { required: "The location from field is required." },
|
|
379
|
+
recipient_id: { required: "Please select a recipient." }
|
|
380
|
+
};
|
|
381
|
+
this.form = this.formBuilder.group({
|
|
382
|
+
id: [""],
|
|
383
|
+
product_id: ["", Validators.required],
|
|
384
|
+
location_from_id: [""],
|
|
385
|
+
batch_id: [""],
|
|
386
|
+
date: [/* @__PURE__ */ new Date(), Validators.required],
|
|
387
|
+
recipient_id: [""],
|
|
388
|
+
quantity: [1, Validators.required],
|
|
389
|
+
particulars: [""]
|
|
390
|
+
});
|
|
391
|
+
}
|
|
392
|
+
ngOnInit() {
|
|
393
|
+
this.product = this.data?.product;
|
|
394
|
+
this.stockIssue = this.data?.model;
|
|
395
|
+
this.form.get("location_from_id")?.valueChanges?.pipe(debounceTime(50), distinctUntilChanged()).subscribe((val) => {
|
|
396
|
+
this.resetBatchSelector(val);
|
|
397
|
+
});
|
|
398
|
+
this.locationService.index({ status_ids: "1" }).subscribe((response) => {
|
|
399
|
+
const locations = response?.data || [];
|
|
400
|
+
this.locationsCountValue = locations.length;
|
|
401
|
+
this.form.get("location_from_id")?.setValidators(locations.length > 0 ? Validators.required : null);
|
|
402
|
+
this.form.get("location_from_id")?.updateValueAndValidity();
|
|
403
|
+
if (!this.stockIssue && !this.form.get("location_from_id")?.value && locations.length > 0) this.form.get("location_from_id")?.setValue(locations[0].id);
|
|
404
|
+
});
|
|
405
|
+
this.formConfigurationUtilityService.initialize(this.formConfigService, "stock-issue").subscribe({ next: () => {
|
|
406
|
+
this.form.get("recipient_id")?.setValidators(this.formConfigurationUtilityService.getFieldRequired("recipient_id") ? Validators.required : null);
|
|
407
|
+
this.form.get("recipient_id")?.updateValueAndValidity();
|
|
408
|
+
} });
|
|
409
|
+
if (this.product) this.form.patchValue({ product_id: this.product.id });
|
|
410
|
+
this.patchFormData();
|
|
411
|
+
}
|
|
412
|
+
patchFormData() {
|
|
413
|
+
if (this.stockIssue) {
|
|
414
|
+
const data = { ...this.stockIssue };
|
|
415
|
+
if (data.date) data.date = new Date(data.date);
|
|
416
|
+
this.isUpdate = true;
|
|
417
|
+
this.form.patchValue(data, { emitEvent: false });
|
|
418
|
+
this.resetBatchSelector(data.location_from_id, false);
|
|
419
|
+
this.patchFormProducts(this.stockIssue);
|
|
420
|
+
} else if (this.product?.last_stock_issue) {
|
|
421
|
+
const { quantity, location_from_id } = this.product.last_stock_issue;
|
|
422
|
+
this.form.patchValue({
|
|
423
|
+
quantity,
|
|
424
|
+
location_from_id
|
|
425
|
+
});
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
patchFormProducts(stockIssue) {
|
|
429
|
+
if (stockIssue.stock_issue_products?.length > 0) {
|
|
430
|
+
this.updateFormWithProductArray(stockIssue.stock_issue_products[0]);
|
|
431
|
+
this.product = stockIssue.stock_issue_products[0].product;
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
updateFormWithProductArray(stockIssueProduct) {
|
|
435
|
+
this.form.patchValue({
|
|
436
|
+
product_id: stockIssueProduct.product_id,
|
|
437
|
+
quantity: stockIssueProduct.quantity,
|
|
438
|
+
location_from_id: stockIssueProduct.location_from_id,
|
|
439
|
+
batch_id: stockIssueProduct.batch_id,
|
|
440
|
+
particulars: stockIssueProduct.particulars
|
|
441
|
+
});
|
|
442
|
+
}
|
|
443
|
+
get locationsCount() {
|
|
444
|
+
return this.locationsCountValue;
|
|
445
|
+
}
|
|
446
|
+
save() {
|
|
447
|
+
if (this.form.invalid) {
|
|
448
|
+
this.form.markAllAsTouched();
|
|
449
|
+
this.alertService.addAlert("Please check the form for errors", "error");
|
|
450
|
+
return;
|
|
451
|
+
}
|
|
452
|
+
const data = {
|
|
453
|
+
...this.form.value,
|
|
454
|
+
products: [{
|
|
455
|
+
...this.form.value,
|
|
456
|
+
id: this.form.value.product_id
|
|
457
|
+
}]
|
|
458
|
+
};
|
|
459
|
+
if (data.date) data.date = this.dateUtils.getYYYYMMDDString(data.date);
|
|
460
|
+
this.isWorking = true;
|
|
461
|
+
(this.isUpdate ? this.service.update(data) : this.service.store(data)).subscribe({
|
|
462
|
+
next: (response) => {
|
|
463
|
+
this.isWorking = false;
|
|
464
|
+
this.dialogRef.close(response?.item.stock_issue_products);
|
|
465
|
+
this.alertService.addAlert("Stock Issue Saved Successfully!", "success");
|
|
466
|
+
},
|
|
467
|
+
error: () => this.isWorking = false
|
|
468
|
+
});
|
|
469
|
+
}
|
|
470
|
+
onProductChange(product) {
|
|
471
|
+
this.product = product;
|
|
472
|
+
}
|
|
473
|
+
onBatchItemsChange() {
|
|
474
|
+
if (this.stockIssue && !this.isBatchPatched) {
|
|
475
|
+
this.form.get("batch_id")?.setValue(this.stockIssue?.stock_issue_products[0]?.batch_id);
|
|
476
|
+
this.batchSearchableSelector.selectedValue = this.stockIssue?.stock_issue_products[0]?.batch;
|
|
477
|
+
this.isBatchPatched = true;
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
resetBatchSelector(val, reset = true) {
|
|
481
|
+
if (reset) this.form.get("batch_id")?.setValue(null, { emitEvent: false });
|
|
482
|
+
this.batchesApiUrl = val ? `api/stock-receipt-batches?location_ids=${val}` : "";
|
|
483
|
+
Promise.resolve().then(() => {
|
|
484
|
+
if (this.batchSearchableSelector) {
|
|
485
|
+
if (reset) this.batchSearchableSelector.selectedValue = null;
|
|
486
|
+
this.batchSearchableSelector.apiUrl = this.batchesApiUrl;
|
|
487
|
+
this.batchSearchableSelector?.reloadData();
|
|
488
|
+
}
|
|
489
|
+
});
|
|
490
|
+
}
|
|
491
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
492
|
+
minVersion: "12.0.0",
|
|
493
|
+
version: "22.2.5",
|
|
494
|
+
ngImport: i0,
|
|
495
|
+
type: StockIssueSingleProductFormComponent,
|
|
496
|
+
deps: [
|
|
497
|
+
{ token: i1.FormValidatorService },
|
|
498
|
+
{ token: StockIssueService },
|
|
499
|
+
{ token: i2.FormBuilder },
|
|
500
|
+
{ token: i1.DateUtils },
|
|
501
|
+
{ token: LocationService },
|
|
502
|
+
{ token: i1.FormConfigurationFormService },
|
|
503
|
+
{
|
|
504
|
+
token: i4$1.MatDialogRef,
|
|
505
|
+
optional: true
|
|
506
|
+
},
|
|
507
|
+
{
|
|
508
|
+
token: MAT_DIALOG_DATA,
|
|
509
|
+
optional: true
|
|
510
|
+
}
|
|
511
|
+
],
|
|
512
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
513
|
+
});
|
|
514
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
515
|
+
minVersion: "17.0.0",
|
|
516
|
+
version: "22.2.5",
|
|
517
|
+
type: StockIssueSingleProductFormComponent,
|
|
518
|
+
isStandalone: true,
|
|
519
|
+
selector: "app-stock-issue-single-product-form",
|
|
520
|
+
viewQueries: [{
|
|
521
|
+
propertyName: "batchSearchableSelector",
|
|
522
|
+
first: true,
|
|
523
|
+
predicate: ["batchSearchableSelector"],
|
|
524
|
+
descendants: true
|
|
525
|
+
}],
|
|
526
|
+
usesInheritance: true,
|
|
527
|
+
ngImport: i0,
|
|
528
|
+
template: "<mat-card-content>\n <div class=\"d-flex flex-row justify-content-between align-items-center gap-1\">\n <h5 class=\"text-center mb-0\">\n Stock Issue form\n\n @if (data.product) {\n for {{ data.product?.name }}\n }\n </h5>\n <app-form-configuration-for-form formCode=\"stock-issue\"\n (click)=\"dialogRef.close()\"></app-form-configuration-for-form>\n </div>\n <form [formGroup]=\"form\" class=\"d-flex flex-column gap-1 justify-content-start\" (submit)=\"save()\">\n @if (!product) {\n <mat-form-field>\n <mat-label>Product</mat-label>\n <app-searchable-selector formControlName=\"product_id\" apiUrl=\"api/products\" titleField=\"name\"\n required (selectedValueChange)=\"onProductChange($event)\"></app-searchable-selector>\n @if (isFieldValid('product_id')) {\n <mat-error>\n {{ getErrorMessage('product_id') }}\n </mat-error>\n }\n </mat-form-field>\n } @if (locationsCount > 1) {\n <mat-form-field>\n <mat-label>Location From</mat-label>\n <app-searchable-selector formControlName=\"location_from_id\" apiUrl=\"api/inventory-locations?status_ids=1\"\n required [selectedValue]=\"$safeNavigationMigration(stockIssue?.stock_issue_products[0]?.location)\"></app-searchable-selector>\n <mat-hint>Which warehouse are we taking stock from?</mat-hint>\n @if (isFieldValid('location_from_id')) {\n <mat-error>\n {{ getErrorMessage('location_from_id') }}\n </mat-error>\n }\n </mat-form-field>\n } @if (locationsCount > 1 && form.value?.location_from_id && batchesApiUrl)\n {\n <mat-form-field techlifyFeatureEnabled=\"product-batch-numbers\">\n <mat-label>Batch</mat-label>\n <app-searchable-selector #batchSearchableSelector formControlName=\"batch_id\" [apiUrl]=\"batchesApiUrl\"\n [enableSearch]=\"false\" (itemsChange)=\"onBatchItemsChange()\">\n </app-searchable-selector>\n </mat-form-field>\n }\n\n <mat-form-field>\n <mat-label>Date</mat-label>\n <input matInput [matDatepicker]=\"datePicker\" formControlName=\"date\" (focus)=\"datePicker.open()\" />\n <mat-datepicker #datePicker></mat-datepicker>\n @if (isFieldValid('date')) {\n <mat-error>\n {{ getErrorMessage('date') }}\n </mat-error>\n }\n </mat-form-field>\n\n @if (formConfigurationUtilityService.getFieldEnabled('recipient_id')) {\n <mat-form-field>\n <mat-label>Recipient @if\n (formConfigurationUtilityService.getFieldRequired('recipient_id')) {\n <sup>*</sup>\n }\n </mat-label>\n <app-searchable-selector formControlName=\"recipient_id\" apiUrl=\"api/recipients\"\n titleField=\"name\"></app-searchable-selector>\n @if (isFieldValid('recipient_id')) {\n <mat-error>\n {{ getErrorMessage('recipient_id') }}\n </mat-error>\n }\n </mat-form-field>\n }\n\n <mat-form-field>\n <mat-label>Quantity</mat-label>\n <input matInput formControlName=\"quantity\" type=\"number\" min=\"0\" />\n @if (isFieldValid('quantity')) {\n <mat-error>\n {{ getErrorMessage('quantity') }}\n </mat-error>\n }\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Particulars</mat-label>\n <textarea matInput formControlName=\"particulars\" rows=\"3\"></textarea>\n </mat-form-field>\n\n <div class=\"d-flex justify-content-end align-items-center gap-2\">\n <button [disabled]=\"isWorking\" mat-raised-button color=\"primary\" type=\"submit\">Save</button>\n <button [disabled]=\"isWorking\" (click)=\"dialogRef.close()\" mat-flat-button type=\"button\">Cancel</button>\n </div>\n </form>\n</mat-card-content>",
|
|
529
|
+
styles: [""],
|
|
530
|
+
dependencies: [
|
|
531
|
+
{
|
|
532
|
+
kind: "ngmodule",
|
|
533
|
+
type: ReactiveFormsModule
|
|
534
|
+
},
|
|
535
|
+
{
|
|
536
|
+
kind: "directive",
|
|
537
|
+
type: i2.ɵNgNoValidate,
|
|
538
|
+
selector: "form:not([ngNoForm]):not([ngNativeValidate])"
|
|
539
|
+
},
|
|
540
|
+
{
|
|
541
|
+
kind: "directive",
|
|
542
|
+
type: i2.DefaultValueAccessor,
|
|
543
|
+
selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]"
|
|
544
|
+
},
|
|
545
|
+
{
|
|
546
|
+
kind: "directive",
|
|
547
|
+
type: i2.NumberValueAccessor,
|
|
548
|
+
selector: "input[type=number]:not([ngNoCva])[formControlName],input[type=number]:not([ngNoCva])[formControl],input[type=number]:not([ngNoCva])[ngModel]"
|
|
549
|
+
},
|
|
550
|
+
{
|
|
551
|
+
kind: "directive",
|
|
552
|
+
type: i2.NgControlStatus,
|
|
553
|
+
selector: "[formControlName],[ngModel],[formControl]"
|
|
554
|
+
},
|
|
555
|
+
{
|
|
556
|
+
kind: "directive",
|
|
557
|
+
type: i2.NgControlStatusGroup,
|
|
558
|
+
selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]"
|
|
559
|
+
},
|
|
560
|
+
{
|
|
561
|
+
kind: "directive",
|
|
562
|
+
type: i2.RequiredValidator,
|
|
563
|
+
selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]",
|
|
564
|
+
inputs: ["required"]
|
|
565
|
+
},
|
|
566
|
+
{
|
|
567
|
+
kind: "directive",
|
|
568
|
+
type: i2.MinValidator,
|
|
569
|
+
selector: "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]",
|
|
570
|
+
inputs: ["min"]
|
|
571
|
+
},
|
|
572
|
+
{
|
|
573
|
+
kind: "directive",
|
|
574
|
+
type: i2.FormGroupDirective,
|
|
575
|
+
selector: "[formGroup]",
|
|
576
|
+
inputs: ["formGroup"],
|
|
577
|
+
outputs: ["ngSubmit"],
|
|
578
|
+
exportAs: ["ngForm"]
|
|
579
|
+
},
|
|
580
|
+
{
|
|
581
|
+
kind: "directive",
|
|
582
|
+
type: i2.FormControlName,
|
|
583
|
+
selector: "[formControlName]",
|
|
584
|
+
inputs: [
|
|
585
|
+
"formControlName",
|
|
586
|
+
"disabled",
|
|
587
|
+
"ngModel"
|
|
588
|
+
],
|
|
589
|
+
outputs: ["ngModelChange"]
|
|
590
|
+
},
|
|
591
|
+
{
|
|
592
|
+
kind: "ngmodule",
|
|
593
|
+
type: MaterialModule$1
|
|
594
|
+
},
|
|
595
|
+
{
|
|
596
|
+
kind: "component",
|
|
597
|
+
type: i5$1.MatButton,
|
|
598
|
+
selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ",
|
|
599
|
+
inputs: ["matButton"],
|
|
600
|
+
exportAs: ["matButton", "matAnchor"]
|
|
601
|
+
},
|
|
602
|
+
{
|
|
603
|
+
kind: "directive",
|
|
604
|
+
type: i7.MatCardContent,
|
|
605
|
+
selector: "mat-card-content"
|
|
606
|
+
},
|
|
607
|
+
{
|
|
608
|
+
kind: "component",
|
|
609
|
+
type: i8$1.MatDatepicker,
|
|
610
|
+
selector: "mat-datepicker",
|
|
611
|
+
exportAs: ["matDatepicker"]
|
|
612
|
+
},
|
|
613
|
+
{
|
|
614
|
+
kind: "directive",
|
|
615
|
+
type: i8$1.MatDatepickerInput,
|
|
616
|
+
selector: "input[matDatepicker]",
|
|
617
|
+
inputs: [
|
|
618
|
+
"matDatepicker",
|
|
619
|
+
"min",
|
|
620
|
+
"max",
|
|
621
|
+
"matDatepickerFilter"
|
|
622
|
+
],
|
|
623
|
+
exportAs: ["matDatepickerInput"]
|
|
624
|
+
},
|
|
625
|
+
{
|
|
626
|
+
kind: "component",
|
|
627
|
+
type: i6$2.MatFormField,
|
|
628
|
+
selector: "mat-form-field",
|
|
629
|
+
inputs: [
|
|
630
|
+
"hideRequiredMarker",
|
|
631
|
+
"color",
|
|
632
|
+
"floatLabel",
|
|
633
|
+
"appearance",
|
|
634
|
+
"subscriptSizing",
|
|
635
|
+
"hintLabel"
|
|
636
|
+
],
|
|
637
|
+
exportAs: ["matFormField"]
|
|
638
|
+
},
|
|
639
|
+
{
|
|
640
|
+
kind: "directive",
|
|
641
|
+
type: i6$2.MatLabel,
|
|
642
|
+
selector: "mat-label"
|
|
643
|
+
},
|
|
644
|
+
{
|
|
645
|
+
kind: "directive",
|
|
646
|
+
type: i6$2.MatHint,
|
|
647
|
+
selector: "mat-hint",
|
|
648
|
+
inputs: ["align", "id"]
|
|
649
|
+
},
|
|
650
|
+
{
|
|
651
|
+
kind: "directive",
|
|
652
|
+
type: i6$2.MatError,
|
|
653
|
+
selector: "mat-error, [matError]",
|
|
654
|
+
inputs: ["id"]
|
|
655
|
+
},
|
|
656
|
+
{
|
|
657
|
+
kind: "directive",
|
|
658
|
+
type: i7$1.MatInput,
|
|
659
|
+
selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]",
|
|
660
|
+
inputs: [
|
|
661
|
+
"disabled",
|
|
662
|
+
"id",
|
|
663
|
+
"placeholder",
|
|
664
|
+
"name",
|
|
665
|
+
"required",
|
|
666
|
+
"type",
|
|
667
|
+
"errorStateMatcher",
|
|
668
|
+
"aria-describedby",
|
|
669
|
+
"value",
|
|
670
|
+
"readonly",
|
|
671
|
+
"disabledInteractive"
|
|
672
|
+
],
|
|
673
|
+
exportAs: ["matInput"]
|
|
674
|
+
},
|
|
675
|
+
{
|
|
676
|
+
kind: "ngmodule",
|
|
677
|
+
type: MatDialogModule
|
|
678
|
+
},
|
|
679
|
+
{
|
|
680
|
+
kind: "ngmodule",
|
|
681
|
+
type: SearchableSelectorModule
|
|
682
|
+
},
|
|
683
|
+
{
|
|
684
|
+
kind: "component",
|
|
685
|
+
type: i1.SearchableSelectorComponent,
|
|
686
|
+
selector: "app-searchable-selector",
|
|
687
|
+
inputs: [
|
|
688
|
+
"valueField",
|
|
689
|
+
"titleField",
|
|
690
|
+
"subtitleField",
|
|
691
|
+
"apiUrl",
|
|
692
|
+
"multiple",
|
|
693
|
+
"selectedValue",
|
|
694
|
+
"enableSearch",
|
|
695
|
+
"add",
|
|
696
|
+
"addConfig",
|
|
697
|
+
"edit",
|
|
698
|
+
"editConfig",
|
|
699
|
+
"sort",
|
|
700
|
+
"sortBy",
|
|
701
|
+
"searchField",
|
|
702
|
+
"itemComponent",
|
|
703
|
+
"items",
|
|
704
|
+
"apiDataProperty",
|
|
705
|
+
"cache",
|
|
706
|
+
"perPage",
|
|
707
|
+
"inDataSearch",
|
|
708
|
+
"panelWidth",
|
|
709
|
+
"focusSearchOnOpen",
|
|
710
|
+
"isEmitInitialEvent",
|
|
711
|
+
"required",
|
|
712
|
+
"disabled",
|
|
713
|
+
"value"
|
|
714
|
+
],
|
|
715
|
+
outputs: [
|
|
716
|
+
"selectedValueChange",
|
|
717
|
+
"selectionChange",
|
|
718
|
+
"itemsChange",
|
|
719
|
+
"isItemsEmpty"
|
|
720
|
+
]
|
|
721
|
+
},
|
|
722
|
+
{
|
|
723
|
+
kind: "ngmodule",
|
|
724
|
+
type: TechlifyFeatureModule
|
|
725
|
+
},
|
|
726
|
+
{
|
|
727
|
+
kind: "directive",
|
|
728
|
+
type: i1.TechlifyFeatureEnabledDirective,
|
|
729
|
+
selector: "[techlifyFeatureEnabled]",
|
|
730
|
+
inputs: ["techlifyFeatureEnabled"]
|
|
731
|
+
},
|
|
732
|
+
{
|
|
733
|
+
kind: "ngmodule",
|
|
734
|
+
type: FormConfigurationForFormModule
|
|
735
|
+
},
|
|
736
|
+
{
|
|
737
|
+
kind: "component",
|
|
738
|
+
type: i1.FormConfigurationForFormComponent,
|
|
739
|
+
selector: "app-form-configuration-for-form",
|
|
740
|
+
inputs: ["formCode"]
|
|
741
|
+
}
|
|
742
|
+
],
|
|
743
|
+
changeDetection: i0.ChangeDetectionStrategy.Eager,
|
|
744
|
+
preserveWhitespaces: true
|
|
745
|
+
});
|
|
746
|
+
};
|
|
747
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
748
|
+
minVersion: "12.0.0",
|
|
749
|
+
version: "22.2.5",
|
|
750
|
+
ngImport: i0,
|
|
751
|
+
type: StockIssueSingleProductFormComponent,
|
|
752
|
+
decorators: [{
|
|
753
|
+
type: Component,
|
|
754
|
+
args: [{
|
|
755
|
+
selector: "app-stock-issue-single-product-form",
|
|
756
|
+
imports: [
|
|
757
|
+
ReactiveFormsModule,
|
|
758
|
+
MaterialModule$1,
|
|
759
|
+
MatDialogModule,
|
|
760
|
+
SearchableSelectorModule,
|
|
761
|
+
TechlifyFeatureModule,
|
|
762
|
+
FormConfigurationForFormModule
|
|
763
|
+
],
|
|
764
|
+
changeDetection: ChangeDetectionStrategy.Eager,
|
|
765
|
+
template: "<mat-card-content>\n <div class=\"d-flex flex-row justify-content-between align-items-center gap-1\">\n <h5 class=\"text-center mb-0\">\n Stock Issue form\n\n @if (data.product) {\n for {{ data.product?.name }}\n }\n </h5>\n <app-form-configuration-for-form formCode=\"stock-issue\"\n (click)=\"dialogRef.close()\"></app-form-configuration-for-form>\n </div>\n <form [formGroup]=\"form\" class=\"d-flex flex-column gap-1 justify-content-start\" (submit)=\"save()\">\n @if (!product) {\n <mat-form-field>\n <mat-label>Product</mat-label>\n <app-searchable-selector formControlName=\"product_id\" apiUrl=\"api/products\" titleField=\"name\"\n required (selectedValueChange)=\"onProductChange($event)\"></app-searchable-selector>\n @if (isFieldValid('product_id')) {\n <mat-error>\n {{ getErrorMessage('product_id') }}\n </mat-error>\n }\n </mat-form-field>\n } @if (locationsCount > 1) {\n <mat-form-field>\n <mat-label>Location From</mat-label>\n <app-searchable-selector formControlName=\"location_from_id\" apiUrl=\"api/inventory-locations?status_ids=1\"\n required [selectedValue]=\"$safeNavigationMigration(stockIssue?.stock_issue_products[0]?.location)\"></app-searchable-selector>\n <mat-hint>Which warehouse are we taking stock from?</mat-hint>\n @if (isFieldValid('location_from_id')) {\n <mat-error>\n {{ getErrorMessage('location_from_id') }}\n </mat-error>\n }\n </mat-form-field>\n } @if (locationsCount > 1 && form.value?.location_from_id && batchesApiUrl)\n {\n <mat-form-field techlifyFeatureEnabled=\"product-batch-numbers\">\n <mat-label>Batch</mat-label>\n <app-searchable-selector #batchSearchableSelector formControlName=\"batch_id\" [apiUrl]=\"batchesApiUrl\"\n [enableSearch]=\"false\" (itemsChange)=\"onBatchItemsChange()\">\n </app-searchable-selector>\n </mat-form-field>\n }\n\n <mat-form-field>\n <mat-label>Date</mat-label>\n <input matInput [matDatepicker]=\"datePicker\" formControlName=\"date\" (focus)=\"datePicker.open()\" />\n <mat-datepicker #datePicker></mat-datepicker>\n @if (isFieldValid('date')) {\n <mat-error>\n {{ getErrorMessage('date') }}\n </mat-error>\n }\n </mat-form-field>\n\n @if (formConfigurationUtilityService.getFieldEnabled('recipient_id')) {\n <mat-form-field>\n <mat-label>Recipient @if\n (formConfigurationUtilityService.getFieldRequired('recipient_id')) {\n <sup>*</sup>\n }\n </mat-label>\n <app-searchable-selector formControlName=\"recipient_id\" apiUrl=\"api/recipients\"\n titleField=\"name\"></app-searchable-selector>\n @if (isFieldValid('recipient_id')) {\n <mat-error>\n {{ getErrorMessage('recipient_id') }}\n </mat-error>\n }\n </mat-form-field>\n }\n\n <mat-form-field>\n <mat-label>Quantity</mat-label>\n <input matInput formControlName=\"quantity\" type=\"number\" min=\"0\" />\n @if (isFieldValid('quantity')) {\n <mat-error>\n {{ getErrorMessage('quantity') }}\n </mat-error>\n }\n </mat-form-field>\n\n <mat-form-field>\n <mat-label>Particulars</mat-label>\n <textarea matInput formControlName=\"particulars\" rows=\"3\"></textarea>\n </mat-form-field>\n\n <div class=\"d-flex justify-content-end align-items-center gap-2\">\n <button [disabled]=\"isWorking\" mat-raised-button color=\"primary\" type=\"submit\">Save</button>\n <button [disabled]=\"isWorking\" (click)=\"dialogRef.close()\" mat-flat-button type=\"button\">Cancel</button>\n </div>\n </form>\n</mat-card-content>"
|
|
766
|
+
}]
|
|
767
|
+
}],
|
|
768
|
+
ctorParameters: () => [
|
|
769
|
+
{ type: i1.FormValidatorService },
|
|
770
|
+
{ type: StockIssueService },
|
|
771
|
+
{ type: i2.FormBuilder },
|
|
772
|
+
{ type: i1.DateUtils },
|
|
773
|
+
{ type: LocationService },
|
|
774
|
+
{ type: i1.FormConfigurationFormService },
|
|
775
|
+
{
|
|
776
|
+
type: i4$1.MatDialogRef,
|
|
777
|
+
decorators: [{ type: Optional }]
|
|
778
|
+
},
|
|
779
|
+
{
|
|
780
|
+
type: void 0,
|
|
781
|
+
decorators: [{
|
|
782
|
+
type: Inject,
|
|
783
|
+
args: [MAT_DIALOG_DATA]
|
|
784
|
+
}, { type: Optional }]
|
|
785
|
+
}
|
|
786
|
+
],
|
|
787
|
+
propDecorators: { batchSearchableSelector: [{
|
|
788
|
+
type: ViewChild,
|
|
789
|
+
args: ["batchSearchableSelector"]
|
|
790
|
+
}] }
|
|
791
|
+
});
|
|
792
|
+
let StockIssueProductListComponent = class StockIssueProductListComponent extends TechlifyListComponent {
|
|
793
|
+
service;
|
|
794
|
+
formBuilder;
|
|
795
|
+
featureService;
|
|
796
|
+
datePipe;
|
|
797
|
+
filtersInput = input({}, {
|
|
798
|
+
...ngDevMode ? { debugName: "filtersInput" } : /* istanbul ignore next */ {},
|
|
799
|
+
alias: "filters"
|
|
800
|
+
});
|
|
801
|
+
isProductView = input(false, ...ngDevMode ? [{ debugName: "isProductView" }] : /* istanbul ignore next */ []);
|
|
802
|
+
product = input(null, ...ngDevMode ? [{ debugName: "product" }] : /* istanbul ignore next */ []);
|
|
803
|
+
stockIssueSingleProductForm = signal(StockIssueSingleProductFormComponent, ...ngDevMode ? [{ debugName: "stockIssueSingleProductForm" }] : /* istanbul ignore next */ []);
|
|
804
|
+
selectedColumns = model([], ...ngDevMode ? [{ debugName: "selectedColumns" }] : /* istanbul ignore next */ []);
|
|
805
|
+
exportInProgress = input(false, ...ngDevMode ? [{ debugName: "exportInProgress" }] : /* istanbul ignore next */ []);
|
|
806
|
+
listUpdated = output();
|
|
807
|
+
columnConfigReady = output();
|
|
808
|
+
issuableData = input(null, ...ngDevMode ? [{ debugName: "issuableData" }] : /* istanbul ignore next */ []);
|
|
809
|
+
stockIssueProductForm = signal(StockIssueProductFormComponent, ...ngDevMode ? [{ debugName: "stockIssueProductForm" }] : /* istanbul ignore next */ []);
|
|
810
|
+
productViewHiddenColumns = [
|
|
811
|
+
"product",
|
|
812
|
+
"sku",
|
|
813
|
+
"measure"
|
|
814
|
+
];
|
|
815
|
+
_defaultSelectedColumns = [];
|
|
816
|
+
columnConfig = [
|
|
817
|
+
{
|
|
818
|
+
label: "#",
|
|
819
|
+
def: "no",
|
|
820
|
+
isSelected: true,
|
|
821
|
+
isEditable: false
|
|
822
|
+
},
|
|
823
|
+
{
|
|
824
|
+
label: "Issue #",
|
|
825
|
+
def: "issue_number",
|
|
826
|
+
isSelected: true,
|
|
827
|
+
isEditable: false
|
|
828
|
+
},
|
|
829
|
+
{
|
|
830
|
+
label: "Product",
|
|
831
|
+
def: "product",
|
|
832
|
+
isSelected: true,
|
|
833
|
+
isEditable: false
|
|
834
|
+
},
|
|
835
|
+
{
|
|
836
|
+
label: "Average Cost",
|
|
837
|
+
def: "average_cost",
|
|
838
|
+
isSelected: false,
|
|
839
|
+
isEditable: true
|
|
840
|
+
},
|
|
841
|
+
{
|
|
842
|
+
label: "Product Categories",
|
|
843
|
+
def: "product_categories",
|
|
844
|
+
isSelected: false,
|
|
845
|
+
isEditable: true,
|
|
846
|
+
isExportable: false
|
|
847
|
+
},
|
|
848
|
+
{
|
|
849
|
+
label: "Categories",
|
|
850
|
+
def: "categories",
|
|
851
|
+
isSelected: false,
|
|
852
|
+
isEditable: false,
|
|
853
|
+
isExportable: true
|
|
854
|
+
},
|
|
855
|
+
{
|
|
856
|
+
label: "SKU",
|
|
857
|
+
def: "sku",
|
|
858
|
+
isSelected: true,
|
|
859
|
+
isEditable: false
|
|
860
|
+
},
|
|
861
|
+
{
|
|
862
|
+
label: "Date",
|
|
863
|
+
def: "date",
|
|
864
|
+
isSelected: true,
|
|
865
|
+
isEditable: false
|
|
866
|
+
},
|
|
867
|
+
{
|
|
868
|
+
label: "Quantity",
|
|
869
|
+
def: "quantity",
|
|
870
|
+
isSelected: true,
|
|
871
|
+
isEditable: false
|
|
872
|
+
},
|
|
873
|
+
{
|
|
874
|
+
label: "Total Cost (AVCO)",
|
|
875
|
+
def: "total_avco",
|
|
876
|
+
isSelected: true,
|
|
877
|
+
isEditable: true
|
|
878
|
+
},
|
|
879
|
+
{
|
|
880
|
+
label: "Total Cost (FIFO)",
|
|
881
|
+
def: "total_fifo_value",
|
|
882
|
+
isSelected: true,
|
|
883
|
+
isEditable: true
|
|
884
|
+
},
|
|
885
|
+
{
|
|
886
|
+
label: "Measure",
|
|
887
|
+
def: "measure",
|
|
888
|
+
isSelected: true,
|
|
889
|
+
isEditable: true
|
|
890
|
+
},
|
|
891
|
+
{
|
|
892
|
+
label: "Location From",
|
|
893
|
+
def: "location",
|
|
894
|
+
isSelected: true,
|
|
895
|
+
isEditable: false
|
|
896
|
+
},
|
|
897
|
+
{
|
|
898
|
+
label: "Related",
|
|
899
|
+
def: "related",
|
|
900
|
+
isSelected: true,
|
|
901
|
+
isEditable: false
|
|
902
|
+
},
|
|
903
|
+
{
|
|
904
|
+
label: "Particulars",
|
|
905
|
+
def: "particulars",
|
|
906
|
+
isSelected: true,
|
|
907
|
+
isEditable: false
|
|
908
|
+
},
|
|
909
|
+
{
|
|
910
|
+
label: "Creator",
|
|
911
|
+
def: "creator",
|
|
912
|
+
isSelected: false,
|
|
913
|
+
isEditable: true
|
|
914
|
+
},
|
|
915
|
+
{
|
|
916
|
+
label: "Actions",
|
|
917
|
+
def: "actions",
|
|
918
|
+
isSelected: true,
|
|
919
|
+
isEditable: false,
|
|
920
|
+
isExportable: false
|
|
921
|
+
}
|
|
922
|
+
];
|
|
923
|
+
get displayedColumns() {
|
|
924
|
+
const cols = this.selectedColumns().length > 0 ? this.selectedColumns() : this._defaultSelectedColumns;
|
|
925
|
+
const selectedDefs = new Set(cols.map((col) => col.def));
|
|
926
|
+
return this.columnConfig.filter((col) => {
|
|
927
|
+
if (this.isProductView() && this.productViewHiddenColumns.includes(col.def)) return false;
|
|
928
|
+
if (this.exportInProgress()) {
|
|
929
|
+
if (col.isExportable === true) return true;
|
|
930
|
+
if (col.isExportable === false) return false;
|
|
931
|
+
}
|
|
932
|
+
return selectedDefs.has(col.def);
|
|
933
|
+
}).map((col) => col.def);
|
|
934
|
+
}
|
|
935
|
+
get totalQuantity() {
|
|
936
|
+
return this.models.reduce((sum, model) => sum + Number(model?.quantity ?? 0), 0);
|
|
937
|
+
}
|
|
938
|
+
get grandTotalAvco() {
|
|
939
|
+
return this.models.reduce((sum, model) => sum + Number(model?.total_avco ?? 0), 0);
|
|
940
|
+
}
|
|
941
|
+
get grandTotalFifoValue() {
|
|
942
|
+
return this.models.reduce((sum, model) => sum + Number(model?.total_fifo_value ?? 0), 0);
|
|
943
|
+
}
|
|
944
|
+
get footerColumns() {
|
|
945
|
+
return this.displayedColumns.map((col) => `footer-${col}`);
|
|
946
|
+
}
|
|
947
|
+
constructor(service, formBuilder, featureService, datePipe) {
|
|
948
|
+
super();
|
|
949
|
+
this.service = service;
|
|
950
|
+
this.formBuilder = formBuilder;
|
|
951
|
+
this.featureService = featureService;
|
|
952
|
+
this.datePipe = datePipe;
|
|
953
|
+
this.filterFormConfiguration = {
|
|
954
|
+
date_from: { date: true },
|
|
955
|
+
date_to: { date: true },
|
|
956
|
+
category_ids: { multiple: true },
|
|
957
|
+
location_ids: { multiple: true },
|
|
958
|
+
measure_ids: { multiple: true },
|
|
959
|
+
product_ids: { multiple: true }
|
|
960
|
+
};
|
|
961
|
+
this.filterForm = this.formBuilder.group({
|
|
962
|
+
category_ids: [""],
|
|
963
|
+
date_from: [""],
|
|
964
|
+
date_to: [""],
|
|
965
|
+
duration: [""],
|
|
966
|
+
location_ids: [""],
|
|
967
|
+
measure_ids: [""],
|
|
968
|
+
product_ids: [""],
|
|
969
|
+
search: [""],
|
|
970
|
+
sort_by: ["date|desc"],
|
|
971
|
+
page: this.page,
|
|
972
|
+
perPage: this.perPage
|
|
973
|
+
});
|
|
974
|
+
let initialized = false;
|
|
975
|
+
effect(() => {
|
|
976
|
+
const filters = this.filtersInput();
|
|
977
|
+
if (!initialized) {
|
|
978
|
+
initialized = true;
|
|
979
|
+
return;
|
|
980
|
+
}
|
|
981
|
+
this.filterForm.patchValue(filters, { emitEvent: true });
|
|
982
|
+
});
|
|
983
|
+
}
|
|
984
|
+
ngOnInit() {
|
|
985
|
+
this.loadFeatures();
|
|
986
|
+
this._defaultSelectedColumns = this.columnConfig.filter((col) => col.isSelected);
|
|
987
|
+
queueMicrotask(() => this.columnConfigReady.emit(this.columnConfig));
|
|
988
|
+
const initialFilters = this.filtersInput();
|
|
989
|
+
if (initialFilters) this.filterForm.patchValue(initialFilters, { emitEvent: false });
|
|
990
|
+
this.patchFiltersFromRoute();
|
|
991
|
+
this.listenFilterChanges();
|
|
992
|
+
this.loadData();
|
|
993
|
+
}
|
|
994
|
+
loadData() {
|
|
995
|
+
let filters = this.filterForm.value;
|
|
996
|
+
filters.date_from = this.datePipe.transform(filters.date_from, "yyyy-mm-dd") ?? "";
|
|
997
|
+
filters.date_to = this.datePipe.transform(filters.date_to, "yyyy-mm-dd") ?? "";
|
|
998
|
+
filters.page = this.page;
|
|
999
|
+
filters.perPage = this.perPage;
|
|
1000
|
+
if (this.issuableData()) {
|
|
1001
|
+
filters.issuable_ids = this.issuableData()?.issuable_id;
|
|
1002
|
+
filters.issuable_type = this.issuableData()?.issuable_type;
|
|
1003
|
+
}
|
|
1004
|
+
super.loadData(filters);
|
|
1005
|
+
}
|
|
1006
|
+
loadFeatures() {
|
|
1007
|
+
if (this.featureService.isFeatureExists("product-batch-numbers")) {
|
|
1008
|
+
const qtyIndex = this.columnConfig.findIndex((c) => c.def === "quantity");
|
|
1009
|
+
if (qtyIndex >= 0) this.columnConfig.splice(qtyIndex + 1, 0, {
|
|
1010
|
+
label: "Batch",
|
|
1011
|
+
def: "batch",
|
|
1012
|
+
isSelected: true,
|
|
1013
|
+
isEditable: false
|
|
1014
|
+
});
|
|
1015
|
+
}
|
|
1016
|
+
}
|
|
1017
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1018
|
+
minVersion: "12.0.0",
|
|
1019
|
+
version: "22.2.5",
|
|
1020
|
+
ngImport: i0,
|
|
1021
|
+
type: StockIssueProductListComponent,
|
|
1022
|
+
deps: [
|
|
1023
|
+
{ token: StockIssueProductService },
|
|
1024
|
+
{ token: i2.FormBuilder },
|
|
1025
|
+
{ token: i1.TechlifyFeatureService },
|
|
1026
|
+
{ token: i4.DatePipe }
|
|
1027
|
+
],
|
|
1028
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
1029
|
+
});
|
|
1030
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
1031
|
+
minVersion: "17.0.0",
|
|
1032
|
+
version: "22.2.5",
|
|
1033
|
+
type: StockIssueProductListComponent,
|
|
1034
|
+
isStandalone: false,
|
|
1035
|
+
selector: "app-stock-issue-products-list",
|
|
1036
|
+
inputs: {
|
|
1037
|
+
filtersInput: {
|
|
1038
|
+
classPropertyName: "filtersInput",
|
|
1039
|
+
publicName: "filters",
|
|
1040
|
+
isSignal: true,
|
|
1041
|
+
isRequired: false,
|
|
1042
|
+
transformFunction: null
|
|
1043
|
+
},
|
|
1044
|
+
isProductView: {
|
|
1045
|
+
classPropertyName: "isProductView",
|
|
1046
|
+
publicName: "isProductView",
|
|
1047
|
+
isSignal: true,
|
|
1048
|
+
isRequired: false,
|
|
1049
|
+
transformFunction: null
|
|
1050
|
+
},
|
|
1051
|
+
product: {
|
|
1052
|
+
classPropertyName: "product",
|
|
1053
|
+
publicName: "product",
|
|
1054
|
+
isSignal: true,
|
|
1055
|
+
isRequired: false,
|
|
1056
|
+
transformFunction: null
|
|
1057
|
+
},
|
|
1058
|
+
selectedColumns: {
|
|
1059
|
+
classPropertyName: "selectedColumns",
|
|
1060
|
+
publicName: "selectedColumns",
|
|
1061
|
+
isSignal: true,
|
|
1062
|
+
isRequired: false,
|
|
1063
|
+
transformFunction: null
|
|
1064
|
+
},
|
|
1065
|
+
exportInProgress: {
|
|
1066
|
+
classPropertyName: "exportInProgress",
|
|
1067
|
+
publicName: "exportInProgress",
|
|
1068
|
+
isSignal: true,
|
|
1069
|
+
isRequired: false,
|
|
1070
|
+
transformFunction: null
|
|
1071
|
+
},
|
|
1072
|
+
issuableData: {
|
|
1073
|
+
classPropertyName: "issuableData",
|
|
1074
|
+
publicName: "issuableData",
|
|
1075
|
+
isSignal: true,
|
|
1076
|
+
isRequired: false,
|
|
1077
|
+
transformFunction: null
|
|
1078
|
+
}
|
|
1079
|
+
},
|
|
1080
|
+
outputs: {
|
|
1081
|
+
selectedColumns: "selectedColumnsChange",
|
|
1082
|
+
listUpdated: "listUpdated",
|
|
1083
|
+
columnConfigReady: "columnConfigReady"
|
|
1084
|
+
},
|
|
1085
|
+
providers: [DatePipe],
|
|
1086
|
+
usesInheritance: true,
|
|
1087
|
+
ngImport: i0,
|
|
1088
|
+
template: "<mat-card>\n @if (isProductView()) {\n <mat-card-header class=\"d-flex align-items-center gap-2\">\n <mat-card-title>Stock Issues</mat-card-title>\n <app-techlify-form-button [component]=\"stockIssueSingleProductForm()\" [data]=\"{ product: product() }\" width=\"500px\"\n (saved)=\"modelCreated($event);listUpdated.emit(true)\"></app-techlify-form-button>\n @if (columnConfig.length > 0) {\n <app-column-selector mode=\"icon\" [columnConfigs]=\"columnConfig\"\n [(selectedColumns)]=\"selectedColumns\"></app-column-selector>\n }\n </mat-card-header>\n }\n\n <mat-card-content class=\"p-0\">\n <table mat-table [dataSource]=\"models\" class=\"w-100\" aria-describedby=\"Stock Issue Products\" infiniteScroll\n id=\"stockIssueTable\" [infiniteScrollDistance]=\"2\" [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" matSort\n (matSortChange)=\"sortColumn($event)\">\n\n <!-- # Column -->\n <ng-container matColumnDef=\"no\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"issue_number\">\n <th mat-header-cell *matHeaderCellDef matTooltip=\"Stock Issue ID\">Issue #</th>\n <td mat-cell *matCellDef=\"let element\">\n <a class=\"text-decoration-none text-dark\"\n [routerLink]=\"['/inventory/stock-issues', $safeNavigationMigration(element?.stock_issue_id), 'view']\">\n {{ element?.stock_issue_id }} <i class=\"fa-solid fa-up-right-from-square\"></i>\n </a>\n </td>\n </ng-container>\n\n <!-- Product Column -->\n <ng-container matColumnDef=\"product\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Product</th>\n <td mat-cell *matCellDef=\"let element\">\n <a class=\"text-decoration-none text-dark\"\n [routerLink]=\"['/inventory/products', $safeNavigationMigration(element?.product?.id), 'view']\">\n {{ element?.product?.name }}\n </a>\n </td>\n </ng-container>\n\n <!-- Average Price Column -->\n <ng-container matColumnDef=\"average_cost\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Average Cost</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ $safeNavigationMigration(element?.average_cost) | currency : 'USD' }}\n </td>\n </ng-container>\n\n <!-- Product Categories Column -->\n <ng-container matColumnDef=\"product_categories\">\n <th mat-header-cell *matHeaderCellDef>Product Categories</th>\n <td mat-cell *matCellDef=\"let element\">\n <app-product-category-badges [product]=\"$safeNavigationMigration(element?.product)\"></app-product-category-badges>\n </td>\n </ng-container>\n\n <!-- Categories Column (export only) -->\n <ng-container matColumnDef=\"categories\">\n <th mat-header-cell *matHeaderCellDef>Categories</th>\n <td mat-cell *matCellDef=\"let element\">\n @for (category of element?.product?.categories; track category; let\n last = $last) {\n <span> {{ category?.title }}@if (!last) { , } </span>\n }\n </td>\n </ng-container>\n\n <!-- SKU Column -->\n <ng-container matColumnDef=\"sku\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>SKU</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.product?.sku }}</td>\n </ng-container>\n\n <!-- Date Column -->\n <ng-container matColumnDef=\"date\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Date</th>\n <td mat-cell *matCellDef=\"let element\">{{ $safeNavigationMigration(element?.stock_issue?.date) | date }}</td>\n </ng-container>\n\n <!-- Quantity Column -->\n <ng-container matColumnDef=\"quantity\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Quantity</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.quantity }} {{ element?.product?.measure?.title }}\n </td>\n </ng-container>\n\n <!-- Total Cost (AVCO) Column -->\n <ng-container matColumnDef=\"total_avco\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Total Cost (AVCO)</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ $safeNavigationMigration(element?.total_avco) | currency }}\n </td>\n </ng-container>\n\n <!-- Total Cost (FIFO) Column -->\n <ng-container matColumnDef=\"total_fifo_value\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Total Cost (FIFO)</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ $safeNavigationMigration(element?.total_fifo_value) | currency }}\n </td>\n </ng-container>\n\n <!-- Batch Column -->\n <ng-container matColumnDef=\"batch\">\n <th mat-header-cell *matHeaderCellDef>Batch</th>\n <td mat-cell *matCellDef=\"let element\">\n @if (element?.batch?.batch_number) {\n <p class=\"mb-0\">{{ element?.batch?.batch_number }}</p>\n } @if (element?.batch?.expires_on) {\n <small class=\"text-secondary\">\n Expires\n {{ $safeNavigationMigration(element?.batch?.expires_on) | date }}\n </small>\n }\n </td>\n </ng-container>\n\n <!-- Measure Column -->\n <ng-container matColumnDef=\"measure\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Measure</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.product?.measure?.title }}</td>\n </ng-container>\n\n <!-- Location Column -->\n <ng-container matColumnDef=\"location\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Location From</th>\n <td mat-cell *matCellDef=\"let element\">\n <a class=\"text-decoration-none text-dark\"\n [routerLink]=\"['/inventory/locations', $safeNavigationMigration(element?.location_from_id), 'view']\">\n {{ element?.location?.title }}\n </a>\n <br>\n @if (element?.stock_issue?.recipient) {\n <span>\n <small class=\"text-secondary\"> received by {{ element?.stock_issue?.recipient?.name }} </small>\n </span>\n }\n </td>\n </ng-container>\n\n <!-- Related Column -->\n <ng-container matColumnDef=\"related\">\n <th mat-header-cell *matHeaderCellDef>Related</th>\n <td mat-cell *matCellDef=\"let element\">\n @if (element?.stock_issue?.issuable) {\n <a class=\"text-dark\"\n [routerLink]=\"['/maintenances', $safeNavigationMigration(element?.stock_issue?.issuable_id), 'view']\">\n Maintenance for {{ element?.stock_issue?.issuable?.fixed_asset?.name }}\n </a>\n }\n </td>\n </ng-container>\n\n <!-- Particulars Column -->\n <ng-container matColumnDef=\"particulars\">\n <th mat-header-cell *matHeaderCellDef>Particulars</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.particulars }}</td>\n </ng-container>\n\n <!-- Creator Column -->\n <ng-container matColumnDef=\"creator\">\n <th mat-header-cell *matHeaderCellDef>Creator</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-1\">{{ element?.stock_issue?.creator?.name }}</p>\n <small class=\"text-secondary\">{{ $safeNavigationMigration(element?.stock_issue?.created_at) | date }}</small>\n </td>\n </ng-container>\n\n <!-- Actions Column -->\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element\">\n\n @if (element.stock_issue?.stock_transfer) {\n <span class=\"badge rounded-pill text-bg-secondary\">Stock Transfer</span>\n } @else {\n <div class=\"d-flex gap-1 text-secondary\">\n <app-techlify-icon name=\"view\" size=\"md\"\n [routerLink]=\"['/inventory', 'stock-issues', 'products', $safeNavigationMigration(element?.id), 'view']\"></app-techlify-icon>\n <app-techlify-form-button [component]=\"stockIssueProductForm()\" [model]=\"element\"\n [data]=\"{ stockIssueId: $safeNavigationMigration(element?.stock_issue_id), product: $safeNavigationMigration(element?.product) }\" width=\"500px\"\n (saved)=\"modelsUpdatedById($event);listUpdated.emit(true)\">\n </app-techlify-form-button>\n <app-techlify-delete-button [service]=\"service\" [model]=\"element\"\n [data]=\"{ title: $safeNavigationMigration(element?.product?.name), type: 'Stock Issue Product' }\"\n (deleted)=\"reload();listUpdated.emit(true)\"></app-techlify-delete-button>\n </div>\n }\n\n </td>\n </ng-container>\n\n <!-- Footer Cells for Total Row -->\n <ng-container matColumnDef=\"footer-no\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-issue_number\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-product\">\n <td mat-footer-cell *matFooterCellDef><strong>Total</strong></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-average_cost\">\n <td mat-footer-cell *matFooterCellDef><strong>Total</strong></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-product_categories\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-sku\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-categories\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-date\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-quantity\">\n <td mat-footer-cell *matFooterCellDef><strong>{{ totalQuantity }}</strong></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-total_avco\">\n <td mat-footer-cell *matFooterCellDef><strong>{{ grandTotalAvco | currency }}</strong></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-total_fifo_value\">\n <td mat-footer-cell *matFooterCellDef><strong>{{ grandTotalFifoValue | currency }}</strong></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-batch\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-measure\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-location\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-related\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-particulars\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-creator\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-actions\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n <tr mat-footer-row *matFooterRowDef=\"footerColumns\"></tr>\n </table>\n\n @if (isWorking) {\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\n }\n </mat-card-content>\n</mat-card>",
|
|
1089
|
+
styles: [""],
|
|
1090
|
+
dependencies: [
|
|
1091
|
+
{
|
|
1092
|
+
kind: "directive",
|
|
1093
|
+
type: i5.MatSort,
|
|
1094
|
+
selector: "[matSort]",
|
|
1095
|
+
inputs: [
|
|
1096
|
+
"matSortActive",
|
|
1097
|
+
"matSortStart",
|
|
1098
|
+
"matSortDirection",
|
|
1099
|
+
"matSortDisableClear",
|
|
1100
|
+
"matSortDisabled"
|
|
1101
|
+
],
|
|
1102
|
+
outputs: ["matSortChange"],
|
|
1103
|
+
exportAs: ["matSort"]
|
|
1104
|
+
},
|
|
1105
|
+
{
|
|
1106
|
+
kind: "component",
|
|
1107
|
+
type: i5.MatSortHeader,
|
|
1108
|
+
selector: "[mat-sort-header]",
|
|
1109
|
+
inputs: [
|
|
1110
|
+
"mat-sort-header",
|
|
1111
|
+
"arrowPosition",
|
|
1112
|
+
"start",
|
|
1113
|
+
"disabled",
|
|
1114
|
+
"sortActionDescription",
|
|
1115
|
+
"disableClear"
|
|
1116
|
+
],
|
|
1117
|
+
exportAs: ["matSortHeader"]
|
|
1118
|
+
},
|
|
1119
|
+
{
|
|
1120
|
+
kind: "component",
|
|
1121
|
+
type: i6$1.MatTable,
|
|
1122
|
+
selector: "mat-table, table[mat-table]",
|
|
1123
|
+
exportAs: ["matTable"]
|
|
1124
|
+
},
|
|
1125
|
+
{
|
|
1126
|
+
kind: "directive",
|
|
1127
|
+
type: i6$1.MatHeaderCellDef,
|
|
1128
|
+
selector: "[matHeaderCellDef]"
|
|
1129
|
+
},
|
|
1130
|
+
{
|
|
1131
|
+
kind: "directive",
|
|
1132
|
+
type: i6$1.MatHeaderRowDef,
|
|
1133
|
+
selector: "[matHeaderRowDef]",
|
|
1134
|
+
inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"]
|
|
1135
|
+
},
|
|
1136
|
+
{
|
|
1137
|
+
kind: "directive",
|
|
1138
|
+
type: i6$1.MatColumnDef,
|
|
1139
|
+
selector: "[matColumnDef]",
|
|
1140
|
+
inputs: ["matColumnDef"]
|
|
1141
|
+
},
|
|
1142
|
+
{
|
|
1143
|
+
kind: "directive",
|
|
1144
|
+
type: i6$1.MatCellDef,
|
|
1145
|
+
selector: "[matCellDef]"
|
|
1146
|
+
},
|
|
1147
|
+
{
|
|
1148
|
+
kind: "directive",
|
|
1149
|
+
type: i6$1.MatRowDef,
|
|
1150
|
+
selector: "[matRowDef]",
|
|
1151
|
+
inputs: ["matRowDefColumns", "matRowDefWhen"]
|
|
1152
|
+
},
|
|
1153
|
+
{
|
|
1154
|
+
kind: "directive",
|
|
1155
|
+
type: i6$1.MatFooterCellDef,
|
|
1156
|
+
selector: "[matFooterCellDef]"
|
|
1157
|
+
},
|
|
1158
|
+
{
|
|
1159
|
+
kind: "directive",
|
|
1160
|
+
type: i6$1.MatFooterRowDef,
|
|
1161
|
+
selector: "[matFooterRowDef]",
|
|
1162
|
+
inputs: ["matFooterRowDef", "matFooterRowDefSticky"]
|
|
1163
|
+
},
|
|
1164
|
+
{
|
|
1165
|
+
kind: "directive",
|
|
1166
|
+
type: i6$1.MatHeaderCell,
|
|
1167
|
+
selector: "mat-header-cell, th[mat-header-cell]"
|
|
1168
|
+
},
|
|
1169
|
+
{
|
|
1170
|
+
kind: "directive",
|
|
1171
|
+
type: i6$1.MatCell,
|
|
1172
|
+
selector: "mat-cell, td[mat-cell]"
|
|
1173
|
+
},
|
|
1174
|
+
{
|
|
1175
|
+
kind: "directive",
|
|
1176
|
+
type: i6$1.MatFooterCell,
|
|
1177
|
+
selector: "mat-footer-cell, td[mat-footer-cell]"
|
|
1178
|
+
},
|
|
1179
|
+
{
|
|
1180
|
+
kind: "component",
|
|
1181
|
+
type: i6$1.MatHeaderRow,
|
|
1182
|
+
selector: "mat-header-row, tr[mat-header-row]",
|
|
1183
|
+
exportAs: ["matHeaderRow"]
|
|
1184
|
+
},
|
|
1185
|
+
{
|
|
1186
|
+
kind: "component",
|
|
1187
|
+
type: i6$1.MatRow,
|
|
1188
|
+
selector: "mat-row, tr[mat-row]",
|
|
1189
|
+
exportAs: ["matRow"]
|
|
1190
|
+
},
|
|
1191
|
+
{
|
|
1192
|
+
kind: "component",
|
|
1193
|
+
type: i6$1.MatFooterRow,
|
|
1194
|
+
selector: "mat-footer-row, tr[mat-footer-row]",
|
|
1195
|
+
exportAs: ["matFooterRow"]
|
|
1196
|
+
},
|
|
1197
|
+
{
|
|
1198
|
+
kind: "component",
|
|
1199
|
+
type: i7.MatCard,
|
|
1200
|
+
selector: "mat-card",
|
|
1201
|
+
inputs: ["appearance"],
|
|
1202
|
+
exportAs: ["matCard"]
|
|
1203
|
+
},
|
|
1204
|
+
{
|
|
1205
|
+
kind: "directive",
|
|
1206
|
+
type: i7.MatCardContent,
|
|
1207
|
+
selector: "mat-card-content"
|
|
1208
|
+
},
|
|
1209
|
+
{
|
|
1210
|
+
kind: "component",
|
|
1211
|
+
type: i7.MatCardHeader,
|
|
1212
|
+
selector: "mat-card-header"
|
|
1213
|
+
},
|
|
1214
|
+
{
|
|
1215
|
+
kind: "directive",
|
|
1216
|
+
type: i7.MatCardTitle,
|
|
1217
|
+
selector: "mat-card-title, [mat-card-title], [matCardTitle]"
|
|
1218
|
+
},
|
|
1219
|
+
{
|
|
1220
|
+
kind: "directive",
|
|
1221
|
+
type: i8.MatTooltip,
|
|
1222
|
+
selector: "[matTooltip]",
|
|
1223
|
+
inputs: [
|
|
1224
|
+
"matTooltipPosition",
|
|
1225
|
+
"matTooltipPositionAtOrigin",
|
|
1226
|
+
"matTooltipDisabled",
|
|
1227
|
+
"matTooltipShowDelay",
|
|
1228
|
+
"matTooltipHideDelay",
|
|
1229
|
+
"matTooltipTouchGestures",
|
|
1230
|
+
"matTooltip",
|
|
1231
|
+
"matTooltipClass"
|
|
1232
|
+
],
|
|
1233
|
+
exportAs: ["matTooltip"]
|
|
1234
|
+
},
|
|
1235
|
+
{
|
|
1236
|
+
kind: "component",
|
|
1237
|
+
type: i9.MatProgressBar,
|
|
1238
|
+
selector: "mat-progress-bar",
|
|
1239
|
+
inputs: [
|
|
1240
|
+
"color",
|
|
1241
|
+
"value",
|
|
1242
|
+
"bufferValue",
|
|
1243
|
+
"mode"
|
|
1244
|
+
],
|
|
1245
|
+
outputs: ["animationEnd"],
|
|
1246
|
+
exportAs: ["matProgressBar"]
|
|
1247
|
+
},
|
|
1248
|
+
{
|
|
1249
|
+
kind: "directive",
|
|
1250
|
+
type: i10.InfiniteScrollDirective,
|
|
1251
|
+
selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]",
|
|
1252
|
+
inputs: [
|
|
1253
|
+
"infiniteScrollDistance",
|
|
1254
|
+
"infiniteScrollUpDistance",
|
|
1255
|
+
"infiniteScrollThrottle",
|
|
1256
|
+
"infiniteScrollDisabled",
|
|
1257
|
+
"infiniteScrollContainer",
|
|
1258
|
+
"scrollWindow",
|
|
1259
|
+
"immediateCheck",
|
|
1260
|
+
"horizontal",
|
|
1261
|
+
"alwaysCallback",
|
|
1262
|
+
"fromRoot"
|
|
1263
|
+
],
|
|
1264
|
+
outputs: ["scrolled", "scrolledUp"]
|
|
1265
|
+
},
|
|
1266
|
+
{
|
|
1267
|
+
kind: "directive",
|
|
1268
|
+
type: i11.RouterLink,
|
|
1269
|
+
selector: "[routerLink]",
|
|
1270
|
+
inputs: [
|
|
1271
|
+
"target",
|
|
1272
|
+
"queryParams",
|
|
1273
|
+
"fragment",
|
|
1274
|
+
"queryParamsHandling",
|
|
1275
|
+
"state",
|
|
1276
|
+
"info",
|
|
1277
|
+
"relativeTo",
|
|
1278
|
+
"preserveFragment",
|
|
1279
|
+
"skipLocationChange",
|
|
1280
|
+
"replaceUrl",
|
|
1281
|
+
"browserUrl",
|
|
1282
|
+
"routerLink"
|
|
1283
|
+
]
|
|
1284
|
+
},
|
|
1285
|
+
{
|
|
1286
|
+
kind: "component",
|
|
1287
|
+
type: ProductCategoryBadgesComponent,
|
|
1288
|
+
selector: "app-product-category-badges",
|
|
1289
|
+
inputs: ["product"]
|
|
1290
|
+
},
|
|
1291
|
+
{
|
|
1292
|
+
kind: "component",
|
|
1293
|
+
type: i1.ColumnSelectorComponent,
|
|
1294
|
+
selector: "app-column-selector",
|
|
1295
|
+
inputs: [
|
|
1296
|
+
"label",
|
|
1297
|
+
"mode",
|
|
1298
|
+
"columnConfigs",
|
|
1299
|
+
"selectedColumns",
|
|
1300
|
+
"isExportWorking"
|
|
1301
|
+
],
|
|
1302
|
+
outputs: ["selectedColumnsChange", "displayedColumnsChange"]
|
|
1303
|
+
},
|
|
1304
|
+
{
|
|
1305
|
+
kind: "component",
|
|
1306
|
+
type: i1.TechlifyIconComponent,
|
|
1307
|
+
selector: "app-techlify-icon",
|
|
1308
|
+
inputs: ["name", "size"]
|
|
1309
|
+
},
|
|
1310
|
+
{
|
|
1311
|
+
kind: "component",
|
|
1312
|
+
type: i1.TechlifyFormButtonComponent,
|
|
1313
|
+
selector: "app-techlify-form-button",
|
|
1314
|
+
inputs: [
|
|
1315
|
+
"component",
|
|
1316
|
+
"model",
|
|
1317
|
+
"data",
|
|
1318
|
+
"width",
|
|
1319
|
+
"tooltip",
|
|
1320
|
+
"multiAddComponent",
|
|
1321
|
+
"multiAddData",
|
|
1322
|
+
"multiAddWidth",
|
|
1323
|
+
"multiAddTooltip"
|
|
1324
|
+
],
|
|
1325
|
+
outputs: ["saved"]
|
|
1326
|
+
},
|
|
1327
|
+
{
|
|
1328
|
+
kind: "component",
|
|
1329
|
+
type: i1.TechlifyDeleteButtonComponent,
|
|
1330
|
+
selector: "app-techlify-delete-button",
|
|
1331
|
+
inputs: [
|
|
1332
|
+
"data",
|
|
1333
|
+
"model",
|
|
1334
|
+
"message",
|
|
1335
|
+
"service"
|
|
1336
|
+
],
|
|
1337
|
+
outputs: ["deleted", "loading"]
|
|
1338
|
+
},
|
|
1339
|
+
{
|
|
1340
|
+
kind: "pipe",
|
|
1341
|
+
type: i4.CurrencyPipe,
|
|
1342
|
+
name: "currency"
|
|
1343
|
+
},
|
|
1344
|
+
{
|
|
1345
|
+
kind: "pipe",
|
|
1346
|
+
type: i4.DatePipe,
|
|
1347
|
+
name: "date"
|
|
1348
|
+
}
|
|
1349
|
+
],
|
|
1350
|
+
changeDetection: i0.ChangeDetectionStrategy.Eager,
|
|
1351
|
+
preserveWhitespaces: true
|
|
1352
|
+
});
|
|
1353
|
+
};
|
|
1354
|
+
StockIssueProductListComponent = __decorate([UntilDestroy()], StockIssueProductListComponent);
|
|
1355
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1356
|
+
minVersion: "12.0.0",
|
|
1357
|
+
version: "22.2.5",
|
|
1358
|
+
ngImport: i0,
|
|
1359
|
+
type: StockIssueProductListComponent,
|
|
1360
|
+
decorators: [{
|
|
1361
|
+
type: Component,
|
|
1362
|
+
args: [{
|
|
1363
|
+
selector: "app-stock-issue-products-list",
|
|
1364
|
+
providers: [DatePipe],
|
|
1365
|
+
changeDetection: ChangeDetectionStrategy.Eager,
|
|
1366
|
+
standalone: false,
|
|
1367
|
+
template: "<mat-card>\n @if (isProductView()) {\n <mat-card-header class=\"d-flex align-items-center gap-2\">\n <mat-card-title>Stock Issues</mat-card-title>\n <app-techlify-form-button [component]=\"stockIssueSingleProductForm()\" [data]=\"{ product: product() }\" width=\"500px\"\n (saved)=\"modelCreated($event);listUpdated.emit(true)\"></app-techlify-form-button>\n @if (columnConfig.length > 0) {\n <app-column-selector mode=\"icon\" [columnConfigs]=\"columnConfig\"\n [(selectedColumns)]=\"selectedColumns\"></app-column-selector>\n }\n </mat-card-header>\n }\n\n <mat-card-content class=\"p-0\">\n <table mat-table [dataSource]=\"models\" class=\"w-100\" aria-describedby=\"Stock Issue Products\" infiniteScroll\n id=\"stockIssueTable\" [infiniteScrollDistance]=\"2\" [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" matSort\n (matSortChange)=\"sortColumn($event)\">\n\n <!-- # Column -->\n <ng-container matColumnDef=\"no\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"issue_number\">\n <th mat-header-cell *matHeaderCellDef matTooltip=\"Stock Issue ID\">Issue #</th>\n <td mat-cell *matCellDef=\"let element\">\n <a class=\"text-decoration-none text-dark\"\n [routerLink]=\"['/inventory/stock-issues', $safeNavigationMigration(element?.stock_issue_id), 'view']\">\n {{ element?.stock_issue_id }} <i class=\"fa-solid fa-up-right-from-square\"></i>\n </a>\n </td>\n </ng-container>\n\n <!-- Product Column -->\n <ng-container matColumnDef=\"product\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Product</th>\n <td mat-cell *matCellDef=\"let element\">\n <a class=\"text-decoration-none text-dark\"\n [routerLink]=\"['/inventory/products', $safeNavigationMigration(element?.product?.id), 'view']\">\n {{ element?.product?.name }}\n </a>\n </td>\n </ng-container>\n\n <!-- Average Price Column -->\n <ng-container matColumnDef=\"average_cost\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Average Cost</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ $safeNavigationMigration(element?.average_cost) | currency : 'USD' }}\n </td>\n </ng-container>\n\n <!-- Product Categories Column -->\n <ng-container matColumnDef=\"product_categories\">\n <th mat-header-cell *matHeaderCellDef>Product Categories</th>\n <td mat-cell *matCellDef=\"let element\">\n <app-product-category-badges [product]=\"$safeNavigationMigration(element?.product)\"></app-product-category-badges>\n </td>\n </ng-container>\n\n <!-- Categories Column (export only) -->\n <ng-container matColumnDef=\"categories\">\n <th mat-header-cell *matHeaderCellDef>Categories</th>\n <td mat-cell *matCellDef=\"let element\">\n @for (category of element?.product?.categories; track category; let\n last = $last) {\n <span> {{ category?.title }}@if (!last) { , } </span>\n }\n </td>\n </ng-container>\n\n <!-- SKU Column -->\n <ng-container matColumnDef=\"sku\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>SKU</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.product?.sku }}</td>\n </ng-container>\n\n <!-- Date Column -->\n <ng-container matColumnDef=\"date\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Date</th>\n <td mat-cell *matCellDef=\"let element\">{{ $safeNavigationMigration(element?.stock_issue?.date) | date }}</td>\n </ng-container>\n\n <!-- Quantity Column -->\n <ng-container matColumnDef=\"quantity\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Quantity</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.quantity }} {{ element?.product?.measure?.title }}\n </td>\n </ng-container>\n\n <!-- Total Cost (AVCO) Column -->\n <ng-container matColumnDef=\"total_avco\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Total Cost (AVCO)</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ $safeNavigationMigration(element?.total_avco) | currency }}\n </td>\n </ng-container>\n\n <!-- Total Cost (FIFO) Column -->\n <ng-container matColumnDef=\"total_fifo_value\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Total Cost (FIFO)</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ $safeNavigationMigration(element?.total_fifo_value) | currency }}\n </td>\n </ng-container>\n\n <!-- Batch Column -->\n <ng-container matColumnDef=\"batch\">\n <th mat-header-cell *matHeaderCellDef>Batch</th>\n <td mat-cell *matCellDef=\"let element\">\n @if (element?.batch?.batch_number) {\n <p class=\"mb-0\">{{ element?.batch?.batch_number }}</p>\n } @if (element?.batch?.expires_on) {\n <small class=\"text-secondary\">\n Expires\n {{ $safeNavigationMigration(element?.batch?.expires_on) | date }}\n </small>\n }\n </td>\n </ng-container>\n\n <!-- Measure Column -->\n <ng-container matColumnDef=\"measure\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Measure</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.product?.measure?.title }}</td>\n </ng-container>\n\n <!-- Location Column -->\n <ng-container matColumnDef=\"location\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Location From</th>\n <td mat-cell *matCellDef=\"let element\">\n <a class=\"text-decoration-none text-dark\"\n [routerLink]=\"['/inventory/locations', $safeNavigationMigration(element?.location_from_id), 'view']\">\n {{ element?.location?.title }}\n </a>\n <br>\n @if (element?.stock_issue?.recipient) {\n <span>\n <small class=\"text-secondary\"> received by {{ element?.stock_issue?.recipient?.name }} </small>\n </span>\n }\n </td>\n </ng-container>\n\n <!-- Related Column -->\n <ng-container matColumnDef=\"related\">\n <th mat-header-cell *matHeaderCellDef>Related</th>\n <td mat-cell *matCellDef=\"let element\">\n @if (element?.stock_issue?.issuable) {\n <a class=\"text-dark\"\n [routerLink]=\"['/maintenances', $safeNavigationMigration(element?.stock_issue?.issuable_id), 'view']\">\n Maintenance for {{ element?.stock_issue?.issuable?.fixed_asset?.name }}\n </a>\n }\n </td>\n </ng-container>\n\n <!-- Particulars Column -->\n <ng-container matColumnDef=\"particulars\">\n <th mat-header-cell *matHeaderCellDef>Particulars</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.particulars }}</td>\n </ng-container>\n\n <!-- Creator Column -->\n <ng-container matColumnDef=\"creator\">\n <th mat-header-cell *matHeaderCellDef>Creator</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-1\">{{ element?.stock_issue?.creator?.name }}</p>\n <small class=\"text-secondary\">{{ $safeNavigationMigration(element?.stock_issue?.created_at) | date }}</small>\n </td>\n </ng-container>\n\n <!-- Actions Column -->\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element\">\n\n @if (element.stock_issue?.stock_transfer) {\n <span class=\"badge rounded-pill text-bg-secondary\">Stock Transfer</span>\n } @else {\n <div class=\"d-flex gap-1 text-secondary\">\n <app-techlify-icon name=\"view\" size=\"md\"\n [routerLink]=\"['/inventory', 'stock-issues', 'products', $safeNavigationMigration(element?.id), 'view']\"></app-techlify-icon>\n <app-techlify-form-button [component]=\"stockIssueProductForm()\" [model]=\"element\"\n [data]=\"{ stockIssueId: $safeNavigationMigration(element?.stock_issue_id), product: $safeNavigationMigration(element?.product) }\" width=\"500px\"\n (saved)=\"modelsUpdatedById($event);listUpdated.emit(true)\">\n </app-techlify-form-button>\n <app-techlify-delete-button [service]=\"service\" [model]=\"element\"\n [data]=\"{ title: $safeNavigationMigration(element?.product?.name), type: 'Stock Issue Product' }\"\n (deleted)=\"reload();listUpdated.emit(true)\"></app-techlify-delete-button>\n </div>\n }\n\n </td>\n </ng-container>\n\n <!-- Footer Cells for Total Row -->\n <ng-container matColumnDef=\"footer-no\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-issue_number\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-product\">\n <td mat-footer-cell *matFooterCellDef><strong>Total</strong></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-average_cost\">\n <td mat-footer-cell *matFooterCellDef><strong>Total</strong></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-product_categories\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-sku\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-categories\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-date\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-quantity\">\n <td mat-footer-cell *matFooterCellDef><strong>{{ totalQuantity }}</strong></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-total_avco\">\n <td mat-footer-cell *matFooterCellDef><strong>{{ grandTotalAvco | currency }}</strong></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-total_fifo_value\">\n <td mat-footer-cell *matFooterCellDef><strong>{{ grandTotalFifoValue | currency }}</strong></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-batch\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-measure\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-location\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-related\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-particulars\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-creator\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-actions\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n <tr mat-footer-row *matFooterRowDef=\"footerColumns\"></tr>\n </table>\n\n @if (isWorking) {\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\n }\n </mat-card-content>\n</mat-card>"
|
|
1368
|
+
}]
|
|
1369
|
+
}],
|
|
1370
|
+
ctorParameters: () => [
|
|
1371
|
+
{ type: StockIssueProductService },
|
|
1372
|
+
{ type: i2.FormBuilder },
|
|
1373
|
+
{ type: i1.TechlifyFeatureService },
|
|
1374
|
+
{ type: i4.DatePipe }
|
|
1375
|
+
],
|
|
1376
|
+
propDecorators: {
|
|
1377
|
+
filtersInput: [{
|
|
1378
|
+
type: i0.Input,
|
|
1379
|
+
args: [{
|
|
1380
|
+
isSignal: true,
|
|
1381
|
+
alias: "filters",
|
|
1382
|
+
required: false
|
|
1383
|
+
}]
|
|
1384
|
+
}],
|
|
1385
|
+
isProductView: [{
|
|
1386
|
+
type: i0.Input,
|
|
1387
|
+
args: [{
|
|
1388
|
+
isSignal: true,
|
|
1389
|
+
alias: "isProductView",
|
|
1390
|
+
required: false
|
|
1391
|
+
}]
|
|
1392
|
+
}],
|
|
1393
|
+
product: [{
|
|
1394
|
+
type: i0.Input,
|
|
1395
|
+
args: [{
|
|
1396
|
+
isSignal: true,
|
|
1397
|
+
alias: "product",
|
|
1398
|
+
required: false
|
|
1399
|
+
}]
|
|
1400
|
+
}],
|
|
1401
|
+
selectedColumns: [{
|
|
1402
|
+
type: i0.Input,
|
|
1403
|
+
args: [{
|
|
1404
|
+
isSignal: true,
|
|
1405
|
+
alias: "selectedColumns",
|
|
1406
|
+
required: false
|
|
1407
|
+
}]
|
|
1408
|
+
}, {
|
|
1409
|
+
type: i0.Output,
|
|
1410
|
+
args: ["selectedColumnsChange"]
|
|
1411
|
+
}],
|
|
1412
|
+
exportInProgress: [{
|
|
1413
|
+
type: i0.Input,
|
|
1414
|
+
args: [{
|
|
1415
|
+
isSignal: true,
|
|
1416
|
+
alias: "exportInProgress",
|
|
1417
|
+
required: false
|
|
1418
|
+
}]
|
|
1419
|
+
}],
|
|
1420
|
+
listUpdated: [{
|
|
1421
|
+
type: i0.Output,
|
|
1422
|
+
args: ["listUpdated"]
|
|
1423
|
+
}],
|
|
1424
|
+
columnConfigReady: [{
|
|
1425
|
+
type: i0.Output,
|
|
1426
|
+
args: ["columnConfigReady"]
|
|
1427
|
+
}],
|
|
1428
|
+
issuableData: [{
|
|
1429
|
+
type: i0.Input,
|
|
1430
|
+
args: [{
|
|
1431
|
+
isSignal: true,
|
|
1432
|
+
alias: "issuableData",
|
|
1433
|
+
required: false
|
|
1434
|
+
}]
|
|
1435
|
+
}]
|
|
1436
|
+
}
|
|
1437
|
+
});
|
|
1438
|
+
let StockIssueListComponent = class StockIssueListComponent extends TechlifyListComponent {
|
|
1439
|
+
service;
|
|
1440
|
+
formBuilder;
|
|
1441
|
+
router;
|
|
1442
|
+
featureService;
|
|
1443
|
+
filtersInput = input({}, {
|
|
1444
|
+
...ngDevMode ? { debugName: "filtersInput" } : /* istanbul ignore next */ {},
|
|
1445
|
+
alias: "filters"
|
|
1446
|
+
});
|
|
1447
|
+
selectedColumns = input([], ...ngDevMode ? [{ debugName: "selectedColumns" }] : /* istanbul ignore next */ []);
|
|
1448
|
+
exportInProgress = input(false, ...ngDevMode ? [{ debugName: "exportInProgress" }] : /* istanbul ignore next */ []);
|
|
1449
|
+
listUpdated = output();
|
|
1450
|
+
columnConfigReady = output();
|
|
1451
|
+
issuableData = input(null, ...ngDevMode ? [{ debugName: "issuableData" }] : /* istanbul ignore next */ []);
|
|
1452
|
+
_defaultSelectedColumns = [];
|
|
1453
|
+
columnConfig = [
|
|
1454
|
+
{
|
|
1455
|
+
label: "#",
|
|
1456
|
+
def: "no",
|
|
1457
|
+
isSelected: true,
|
|
1458
|
+
isEditable: false
|
|
1459
|
+
},
|
|
1460
|
+
{
|
|
1461
|
+
label: "Issue #",
|
|
1462
|
+
def: "issue_number",
|
|
1463
|
+
isSelected: true,
|
|
1464
|
+
isEditable: false
|
|
1465
|
+
},
|
|
1466
|
+
{
|
|
1467
|
+
label: "Product",
|
|
1468
|
+
def: "product",
|
|
1469
|
+
isSelected: true,
|
|
1470
|
+
isEditable: false
|
|
1471
|
+
},
|
|
1472
|
+
{
|
|
1473
|
+
label: "Product Categories",
|
|
1474
|
+
def: "product_categories",
|
|
1475
|
+
isSelected: false,
|
|
1476
|
+
isEditable: true,
|
|
1477
|
+
isExportable: false
|
|
1478
|
+
},
|
|
1479
|
+
{
|
|
1480
|
+
label: "Categories",
|
|
1481
|
+
def: "categories",
|
|
1482
|
+
isSelected: false,
|
|
1483
|
+
isEditable: false,
|
|
1484
|
+
isExportable: true
|
|
1485
|
+
},
|
|
1486
|
+
{
|
|
1487
|
+
label: "SKU",
|
|
1488
|
+
def: "sku",
|
|
1489
|
+
isSelected: true,
|
|
1490
|
+
isEditable: false
|
|
1491
|
+
},
|
|
1492
|
+
{
|
|
1493
|
+
label: "Date",
|
|
1494
|
+
def: "date",
|
|
1495
|
+
isSelected: true,
|
|
1496
|
+
isEditable: false
|
|
1497
|
+
},
|
|
1498
|
+
{
|
|
1499
|
+
label: "Quantity",
|
|
1500
|
+
def: "quantity",
|
|
1501
|
+
isSelected: true,
|
|
1502
|
+
isEditable: false
|
|
1503
|
+
},
|
|
1504
|
+
{
|
|
1505
|
+
label: "Measure",
|
|
1506
|
+
def: "measure",
|
|
1507
|
+
isSelected: true,
|
|
1508
|
+
isEditable: true
|
|
1509
|
+
},
|
|
1510
|
+
{
|
|
1511
|
+
label: "Location From",
|
|
1512
|
+
def: "location",
|
|
1513
|
+
isSelected: true,
|
|
1514
|
+
isEditable: false
|
|
1515
|
+
},
|
|
1516
|
+
{
|
|
1517
|
+
label: "Related",
|
|
1518
|
+
def: "related",
|
|
1519
|
+
isSelected: true,
|
|
1520
|
+
isEditable: false
|
|
1521
|
+
},
|
|
1522
|
+
{
|
|
1523
|
+
label: "Particulars",
|
|
1524
|
+
def: "particulars",
|
|
1525
|
+
isSelected: true,
|
|
1526
|
+
isEditable: false
|
|
1527
|
+
},
|
|
1528
|
+
{
|
|
1529
|
+
label: "Creator",
|
|
1530
|
+
def: "creator",
|
|
1531
|
+
isSelected: false,
|
|
1532
|
+
isEditable: true
|
|
1533
|
+
},
|
|
1534
|
+
{
|
|
1535
|
+
label: "Actions",
|
|
1536
|
+
def: "actions",
|
|
1537
|
+
isSelected: true,
|
|
1538
|
+
isEditable: false,
|
|
1539
|
+
isExportable: false
|
|
1540
|
+
}
|
|
1541
|
+
];
|
|
1542
|
+
get displayedColumns() {
|
|
1543
|
+
const cols = this.selectedColumns().length > 0 ? this.selectedColumns() : this._defaultSelectedColumns;
|
|
1544
|
+
const selectedDefs = new Set(cols.map((col) => col.def));
|
|
1545
|
+
return this.columnConfig.filter((col) => {
|
|
1546
|
+
if (this.exportInProgress()) {
|
|
1547
|
+
if (col.isExportable === true) return true;
|
|
1548
|
+
if (col.isExportable === false) return false;
|
|
1549
|
+
}
|
|
1550
|
+
return selectedDefs.has(col.def);
|
|
1551
|
+
}).map((col) => col.def);
|
|
1552
|
+
}
|
|
1553
|
+
get totalQuantity() {
|
|
1554
|
+
return this.models.reduce((sum, model) => {
|
|
1555
|
+
return sum + (model?.stock_issue_products ?? []).reduce((productSum, product) => productSum + Number(product?.quantity ?? 0), 0);
|
|
1556
|
+
}, 0);
|
|
1557
|
+
}
|
|
1558
|
+
get footerColumns() {
|
|
1559
|
+
return this.displayedColumns.map((col) => `footer-${col}`);
|
|
1560
|
+
}
|
|
1561
|
+
constructor(service, formBuilder, router, featureService) {
|
|
1562
|
+
super();
|
|
1563
|
+
this.service = service;
|
|
1564
|
+
this.formBuilder = formBuilder;
|
|
1565
|
+
this.router = router;
|
|
1566
|
+
this.featureService = featureService;
|
|
1567
|
+
this.lastPage = 0;
|
|
1568
|
+
this.filterFormConfiguration = {
|
|
1569
|
+
date_from: { date: true },
|
|
1570
|
+
date_to: { date: true },
|
|
1571
|
+
category_ids: { multiple: true },
|
|
1572
|
+
location_ids: { multiple: true },
|
|
1573
|
+
measure_ids: { multiple: true },
|
|
1574
|
+
product_ids: { multiple: true }
|
|
1575
|
+
};
|
|
1576
|
+
this.filterForm = this.formBuilder.group({
|
|
1577
|
+
category_ids: [""],
|
|
1578
|
+
date_from: [""],
|
|
1579
|
+
date_to: [""],
|
|
1580
|
+
duration: [""],
|
|
1581
|
+
import_id: [""],
|
|
1582
|
+
location_ids: [""],
|
|
1583
|
+
measure_ids: [""],
|
|
1584
|
+
product_ids: [""],
|
|
1585
|
+
search: [""],
|
|
1586
|
+
sort_by: ["date|desc"],
|
|
1587
|
+
page: this.page,
|
|
1588
|
+
perPage: this.perPage
|
|
1589
|
+
});
|
|
1590
|
+
let initialized = false;
|
|
1591
|
+
effect(() => {
|
|
1592
|
+
const filters = this.filtersInput();
|
|
1593
|
+
if (!initialized) {
|
|
1594
|
+
initialized = true;
|
|
1595
|
+
return;
|
|
1596
|
+
}
|
|
1597
|
+
this.filterForm.patchValue(filters, { emitEvent: true });
|
|
1598
|
+
});
|
|
1599
|
+
}
|
|
1600
|
+
ngOnInit() {
|
|
1601
|
+
this.loadFeatures();
|
|
1602
|
+
this._defaultSelectedColumns = this.columnConfig.filter((col) => col.isSelected);
|
|
1603
|
+
queueMicrotask(() => this.columnConfigReady.emit(this.columnConfig));
|
|
1604
|
+
this.patchFiltersFromRoute();
|
|
1605
|
+
this.listenFilterChanges();
|
|
1606
|
+
this.loadData();
|
|
1607
|
+
}
|
|
1608
|
+
loadData() {
|
|
1609
|
+
let filters = this.filterForm.value;
|
|
1610
|
+
filters.page = this.page;
|
|
1611
|
+
filters.perPage = this.perPage;
|
|
1612
|
+
if (this.issuableData()) {
|
|
1613
|
+
filters.issuable_ids = this.issuableData()?.issuable_id;
|
|
1614
|
+
filters.issuable_type = this.issuableData()?.issuable_type;
|
|
1615
|
+
}
|
|
1616
|
+
super.loadData(filters);
|
|
1617
|
+
}
|
|
1618
|
+
loadFeatures() {
|
|
1619
|
+
if (this.featureService.isFeatureExists("product-batch-numbers")) {
|
|
1620
|
+
const qtyIndex = this.columnConfig.findIndex((c) => c.def === "quantity");
|
|
1621
|
+
if (qtyIndex >= 0) this.columnConfig.splice(qtyIndex + 1, 0, {
|
|
1622
|
+
label: "Batch",
|
|
1623
|
+
def: "batch",
|
|
1624
|
+
isSelected: true,
|
|
1625
|
+
isEditable: false
|
|
1626
|
+
});
|
|
1627
|
+
}
|
|
1628
|
+
}
|
|
1629
|
+
redirectToView(model) {
|
|
1630
|
+
this.router.navigate([
|
|
1631
|
+
"/inventory/stock-issues",
|
|
1632
|
+
model?.id,
|
|
1633
|
+
"view"
|
|
1634
|
+
]);
|
|
1635
|
+
}
|
|
1636
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
1637
|
+
minVersion: "12.0.0",
|
|
1638
|
+
version: "22.2.5",
|
|
1639
|
+
ngImport: i0,
|
|
1640
|
+
type: StockIssueListComponent,
|
|
1641
|
+
deps: [
|
|
1642
|
+
{ token: StockIssueService },
|
|
1643
|
+
{ token: i2.FormBuilder },
|
|
1644
|
+
{ token: i11.Router },
|
|
1645
|
+
{ token: i1.TechlifyFeatureService }
|
|
1646
|
+
],
|
|
1647
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
1648
|
+
});
|
|
1649
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
1650
|
+
minVersion: "17.0.0",
|
|
1651
|
+
version: "22.2.5",
|
|
1652
|
+
type: StockIssueListComponent,
|
|
1653
|
+
isStandalone: false,
|
|
1654
|
+
selector: "app-stock-issue-list",
|
|
1655
|
+
inputs: {
|
|
1656
|
+
filtersInput: {
|
|
1657
|
+
classPropertyName: "filtersInput",
|
|
1658
|
+
publicName: "filters",
|
|
1659
|
+
isSignal: true,
|
|
1660
|
+
isRequired: false,
|
|
1661
|
+
transformFunction: null
|
|
1662
|
+
},
|
|
1663
|
+
selectedColumns: {
|
|
1664
|
+
classPropertyName: "selectedColumns",
|
|
1665
|
+
publicName: "selectedColumns",
|
|
1666
|
+
isSignal: true,
|
|
1667
|
+
isRequired: false,
|
|
1668
|
+
transformFunction: null
|
|
1669
|
+
},
|
|
1670
|
+
exportInProgress: {
|
|
1671
|
+
classPropertyName: "exportInProgress",
|
|
1672
|
+
publicName: "exportInProgress",
|
|
1673
|
+
isSignal: true,
|
|
1674
|
+
isRequired: false,
|
|
1675
|
+
transformFunction: null
|
|
1676
|
+
},
|
|
1677
|
+
issuableData: {
|
|
1678
|
+
classPropertyName: "issuableData",
|
|
1679
|
+
publicName: "issuableData",
|
|
1680
|
+
isSignal: true,
|
|
1681
|
+
isRequired: false,
|
|
1682
|
+
transformFunction: null
|
|
1683
|
+
}
|
|
1684
|
+
},
|
|
1685
|
+
outputs: {
|
|
1686
|
+
listUpdated: "listUpdated",
|
|
1687
|
+
columnConfigReady: "columnConfigReady"
|
|
1688
|
+
},
|
|
1689
|
+
usesInheritance: true,
|
|
1690
|
+
ngImport: i0,
|
|
1691
|
+
template: "<mat-card>\n <mat-card-content class=\"p-0\">\n <table mat-table [dataSource]=\"models\" class=\"w-100\" aria-describedby=\"Stock Issues\" infiniteScroll\n id=\"stockIssueTable\" [infiniteScrollDistance]=\"2\" [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" matSort\n (matSortChange)=\"sortColumn($event)\">\n\n <!-- # Column -->\n <ng-container matColumnDef=\"no\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"issue_number\">\n <th mat-header-cell *matHeaderCellDef matTooltip=\"Stock Issue ID\">Issue #</th>\n <td mat-cell *matCellDef=\"let element\">\n <a class=\"text-decoration-none text-dark\" [routerLink]=\"['/inventory/stock-issues', $safeNavigationMigration(element?.id), 'view']\">\n {{ element?.id }} <i class=\"fa-solid fa-up-right-from-square\"></i>\n </a>\n </td>\n </ng-container>\n\n <!-- Product Column -->\n <ng-container matColumnDef=\"product\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Product</th>\n <td mat-cell *matCellDef=\"let element\">\n <ul class=\"mb-0 ps-3\">\n @for (sip of element?.stock_issue_products; track sip) {\n <li>\n {{ sip?.quantity }} {{ sip?.product?.measure?.title }} <em>of</em>\n <a class=\"text-decoration-none text-dark\"\n [routerLink]=\"['/inventory/products', $safeNavigationMigration(sip?.product?.id), 'view']\">\n {{ sip?.product?.name }}\n </a>\n </li>\n }\n </ul>\n </td>\n </ng-container>\n\n <!-- Product Categories Column -->\n <ng-container matColumnDef=\"product_categories\">\n <th mat-header-cell *matHeaderCellDef>Product Categories</th>\n <td mat-cell *matCellDef=\"let element\">\n <app-product-category-badges\n [product]=\"$safeNavigationMigration(element?.stock_issue_products[0]?.product)\"></app-product-category-badges>\n </td>\n </ng-container>\n\n <!-- SKU Column -->\n <ng-container matColumnDef=\"sku\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>SKU</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.stock_issue_products[0]?.product?.sku }}</td>\n </ng-container>\n\n <!-- Categories Column (export only) -->\n <ng-container matColumnDef=\"categories\">\n <th mat-header-cell *matHeaderCellDef>Categories</th>\n <td mat-cell *matCellDef=\"let element\">\n @for (category of\n element?.stock_issue_products[0]?.product?.categories; track category;\n let last = $last) {\n <span> {{ category?.title }}@if (!last) { , } </span>\n }\n </td>\n </ng-container>\n\n <!-- Date Column -->\n <ng-container matColumnDef=\"date\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Date</th>\n <td mat-cell *matCellDef=\"let element\">{{ $safeNavigationMigration(element?.date) | date }}</td>\n </ng-container>\n\n <!-- Quantity Column -->\n <ng-container matColumnDef=\"quantity\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Quantity</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.stock_issue_products[0]?.quantity }}\n {{ element?.stock_issue_products[0]?.product?.measure?.title }}\n </td>\n </ng-container>\n\n <!-- Batch Column -->\n <ng-container matColumnDef=\"batch\">\n <th mat-header-cell *matHeaderCellDef>Batch</th>\n <td mat-cell *matCellDef=\"let element\">\n @if (element?.stock_issue_products[0]?.batch?.batch_number) {\n <p class=\"mb-0\">\n {{ element?.stock_issue_products[0]?.batch?.batch_number }}\n </p>\n } @if (element?.stock_issue_products[0]?.batch?.expires_on) {\n <small class=\"text-secondary\">\n Expires\n {{ $safeNavigationMigration(element?.stock_issue_products[0]?.batch?.expires_on) | date }}\n </small>\n }\n </td>\n </ng-container>\n\n <!-- Measure Column -->\n <ng-container matColumnDef=\"measure\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Measure</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.stock_issue_products[0]?.product?.measure?.title }}</td>\n </ng-container>\n\n <!-- Location Column -->\n <ng-container matColumnDef=\"location\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Location From</th>\n <td mat-cell *matCellDef=\"let element\">\n <a class=\"text-decoration-none text-dark\"\n [routerLink]=\"['/inventory/locations', $safeNavigationMigration(element?.stock_issue_products[0]?.location_from_id), 'view']\">\n {{ element?.stock_issue_products[0]?.location?.title }}\n </a>\n <br>\n @if (element?.recipient) {\n <span>\n <small class=\"text-secondary\">received by {{element?.recipient?.name}}</small>\n </span>\n }\n </td>\n </ng-container>\n\n <!-- Related Column -->\n <ng-container matColumnDef=\"related\">\n <th mat-header-cell *matHeaderCellDef>Related</th>\n <td mat-cell *matCellDef=\"let element\">\n @if (element?.issuable) {\n <a class=\"text-dark\" [routerLink]=\"['/maintenances', $safeNavigationMigration(element?.issuable_id), 'view']\">\n Maintenance for {{ element?.issuable?.fixed_asset?.name }}\n </a>\n }\n </td>\n </ng-container>\n\n <!-- Particulars Column -->\n <ng-container matColumnDef=\"particulars\">\n <th mat-header-cell *matHeaderCellDef>Particulars</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.stock_issue_products[0]?.particulars }}</td>\n </ng-container>\n\n <!-- Creator Column -->\n <ng-container matColumnDef=\"creator\">\n <th mat-header-cell *matHeaderCellDef>Creator</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-1\">{{ element?.creator?.name }}</p>\n <small class=\"text-secondary\">{{ $safeNavigationMigration(element?.created_at) | date }}</small>\n </td>\n </ng-container>\n\n <!-- Actions Column -->\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element\">\n @if (!element.stock_transfer) {\n <div class=\"d-flex gap-1 text-secondary\">\n <app-techlify-icon name=\"view\" size=\"md\"\n [routerLink]=\"['/inventory', 'stock-issues', $safeNavigationMigration(element?.id), 'view']\"></app-techlify-icon>\n <app-techlify-icon name=\"edit\" role=\"button\"\n [routerLink]=\"['/inventory/stock-issues/form', $safeNavigationMigration(element?.id)]\"></app-techlify-icon>\n <app-techlify-delete-button [model]=\"element\" [service]=\"service\"\n [data]=\"{ title: $safeNavigationMigration(element?.id), type: 'Stock Issue' }\"\n (deleted)=\"reload()\"\n >\n </app-techlify-delete-button>\n </div>\n } @if (element.stock_transfer) {\n <span class=\"badge rounded-pill text-bg-secondary\">Stock Transfer</span>\n }\n </td>\n </ng-container>\n\n <!-- Footer Cells for Total Row -->\n <ng-container matColumnDef=\"footer-no\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-issue_number\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-product\">\n <td mat-footer-cell *matFooterCellDef><strong>Total</strong></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-product_categories\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-sku\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-categories\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-date\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-quantity\">\n <td mat-footer-cell *matFooterCellDef><strong>{{ totalQuantity }}</strong></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-batch\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-measure\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-location\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-related\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-particulars\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-creator\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-actions\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n <tr mat-footer-row *matFooterRowDef=\"footerColumns\"></tr>\n </table>\n\n @if (isWorking) {\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\n }\n </mat-card-content>\n</mat-card>",
|
|
1692
|
+
styles: [""],
|
|
1693
|
+
dependencies: [
|
|
1694
|
+
{
|
|
1695
|
+
kind: "directive",
|
|
1696
|
+
type: i5.MatSort,
|
|
1697
|
+
selector: "[matSort]",
|
|
1698
|
+
inputs: [
|
|
1699
|
+
"matSortActive",
|
|
1700
|
+
"matSortStart",
|
|
1701
|
+
"matSortDirection",
|
|
1702
|
+
"matSortDisableClear",
|
|
1703
|
+
"matSortDisabled"
|
|
1704
|
+
],
|
|
1705
|
+
outputs: ["matSortChange"],
|
|
1706
|
+
exportAs: ["matSort"]
|
|
1707
|
+
},
|
|
1708
|
+
{
|
|
1709
|
+
kind: "component",
|
|
1710
|
+
type: i5.MatSortHeader,
|
|
1711
|
+
selector: "[mat-sort-header]",
|
|
1712
|
+
inputs: [
|
|
1713
|
+
"mat-sort-header",
|
|
1714
|
+
"arrowPosition",
|
|
1715
|
+
"start",
|
|
1716
|
+
"disabled",
|
|
1717
|
+
"sortActionDescription",
|
|
1718
|
+
"disableClear"
|
|
1719
|
+
],
|
|
1720
|
+
exportAs: ["matSortHeader"]
|
|
1721
|
+
},
|
|
1722
|
+
{
|
|
1723
|
+
kind: "component",
|
|
1724
|
+
type: i6$1.MatTable,
|
|
1725
|
+
selector: "mat-table, table[mat-table]",
|
|
1726
|
+
exportAs: ["matTable"]
|
|
1727
|
+
},
|
|
1728
|
+
{
|
|
1729
|
+
kind: "directive",
|
|
1730
|
+
type: i6$1.MatHeaderCellDef,
|
|
1731
|
+
selector: "[matHeaderCellDef]"
|
|
1732
|
+
},
|
|
1733
|
+
{
|
|
1734
|
+
kind: "directive",
|
|
1735
|
+
type: i6$1.MatHeaderRowDef,
|
|
1736
|
+
selector: "[matHeaderRowDef]",
|
|
1737
|
+
inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"]
|
|
1738
|
+
},
|
|
1739
|
+
{
|
|
1740
|
+
kind: "directive",
|
|
1741
|
+
type: i6$1.MatColumnDef,
|
|
1742
|
+
selector: "[matColumnDef]",
|
|
1743
|
+
inputs: ["matColumnDef"]
|
|
1744
|
+
},
|
|
1745
|
+
{
|
|
1746
|
+
kind: "directive",
|
|
1747
|
+
type: i6$1.MatCellDef,
|
|
1748
|
+
selector: "[matCellDef]"
|
|
1749
|
+
},
|
|
1750
|
+
{
|
|
1751
|
+
kind: "directive",
|
|
1752
|
+
type: i6$1.MatRowDef,
|
|
1753
|
+
selector: "[matRowDef]",
|
|
1754
|
+
inputs: ["matRowDefColumns", "matRowDefWhen"]
|
|
1755
|
+
},
|
|
1756
|
+
{
|
|
1757
|
+
kind: "directive",
|
|
1758
|
+
type: i6$1.MatFooterCellDef,
|
|
1759
|
+
selector: "[matFooterCellDef]"
|
|
1760
|
+
},
|
|
1761
|
+
{
|
|
1762
|
+
kind: "directive",
|
|
1763
|
+
type: i6$1.MatFooterRowDef,
|
|
1764
|
+
selector: "[matFooterRowDef]",
|
|
1765
|
+
inputs: ["matFooterRowDef", "matFooterRowDefSticky"]
|
|
1766
|
+
},
|
|
1767
|
+
{
|
|
1768
|
+
kind: "directive",
|
|
1769
|
+
type: i6$1.MatHeaderCell,
|
|
1770
|
+
selector: "mat-header-cell, th[mat-header-cell]"
|
|
1771
|
+
},
|
|
1772
|
+
{
|
|
1773
|
+
kind: "directive",
|
|
1774
|
+
type: i6$1.MatCell,
|
|
1775
|
+
selector: "mat-cell, td[mat-cell]"
|
|
1776
|
+
},
|
|
1777
|
+
{
|
|
1778
|
+
kind: "directive",
|
|
1779
|
+
type: i6$1.MatFooterCell,
|
|
1780
|
+
selector: "mat-footer-cell, td[mat-footer-cell]"
|
|
1781
|
+
},
|
|
1782
|
+
{
|
|
1783
|
+
kind: "component",
|
|
1784
|
+
type: i6$1.MatHeaderRow,
|
|
1785
|
+
selector: "mat-header-row, tr[mat-header-row]",
|
|
1786
|
+
exportAs: ["matHeaderRow"]
|
|
1787
|
+
},
|
|
1788
|
+
{
|
|
1789
|
+
kind: "component",
|
|
1790
|
+
type: i6$1.MatRow,
|
|
1791
|
+
selector: "mat-row, tr[mat-row]",
|
|
1792
|
+
exportAs: ["matRow"]
|
|
1793
|
+
},
|
|
1794
|
+
{
|
|
1795
|
+
kind: "component",
|
|
1796
|
+
type: i6$1.MatFooterRow,
|
|
1797
|
+
selector: "mat-footer-row, tr[mat-footer-row]",
|
|
1798
|
+
exportAs: ["matFooterRow"]
|
|
1799
|
+
},
|
|
1800
|
+
{
|
|
1801
|
+
kind: "component",
|
|
1802
|
+
type: i7.MatCard,
|
|
1803
|
+
selector: "mat-card",
|
|
1804
|
+
inputs: ["appearance"],
|
|
1805
|
+
exportAs: ["matCard"]
|
|
1806
|
+
},
|
|
1807
|
+
{
|
|
1808
|
+
kind: "directive",
|
|
1809
|
+
type: i7.MatCardContent,
|
|
1810
|
+
selector: "mat-card-content"
|
|
1811
|
+
},
|
|
1812
|
+
{
|
|
1813
|
+
kind: "directive",
|
|
1814
|
+
type: i8.MatTooltip,
|
|
1815
|
+
selector: "[matTooltip]",
|
|
1816
|
+
inputs: [
|
|
1817
|
+
"matTooltipPosition",
|
|
1818
|
+
"matTooltipPositionAtOrigin",
|
|
1819
|
+
"matTooltipDisabled",
|
|
1820
|
+
"matTooltipShowDelay",
|
|
1821
|
+
"matTooltipHideDelay",
|
|
1822
|
+
"matTooltipTouchGestures",
|
|
1823
|
+
"matTooltip",
|
|
1824
|
+
"matTooltipClass"
|
|
1825
|
+
],
|
|
1826
|
+
exportAs: ["matTooltip"]
|
|
1827
|
+
},
|
|
1828
|
+
{
|
|
1829
|
+
kind: "component",
|
|
1830
|
+
type: i9.MatProgressBar,
|
|
1831
|
+
selector: "mat-progress-bar",
|
|
1832
|
+
inputs: [
|
|
1833
|
+
"color",
|
|
1834
|
+
"value",
|
|
1835
|
+
"bufferValue",
|
|
1836
|
+
"mode"
|
|
1837
|
+
],
|
|
1838
|
+
outputs: ["animationEnd"],
|
|
1839
|
+
exportAs: ["matProgressBar"]
|
|
1840
|
+
},
|
|
1841
|
+
{
|
|
1842
|
+
kind: "directive",
|
|
1843
|
+
type: i10.InfiniteScrollDirective,
|
|
1844
|
+
selector: "[infiniteScroll], [infinite-scroll], [data-infinite-scroll]",
|
|
1845
|
+
inputs: [
|
|
1846
|
+
"infiniteScrollDistance",
|
|
1847
|
+
"infiniteScrollUpDistance",
|
|
1848
|
+
"infiniteScrollThrottle",
|
|
1849
|
+
"infiniteScrollDisabled",
|
|
1850
|
+
"infiniteScrollContainer",
|
|
1851
|
+
"scrollWindow",
|
|
1852
|
+
"immediateCheck",
|
|
1853
|
+
"horizontal",
|
|
1854
|
+
"alwaysCallback",
|
|
1855
|
+
"fromRoot"
|
|
1856
|
+
],
|
|
1857
|
+
outputs: ["scrolled", "scrolledUp"]
|
|
1858
|
+
},
|
|
1859
|
+
{
|
|
1860
|
+
kind: "directive",
|
|
1861
|
+
type: i11.RouterLink,
|
|
1862
|
+
selector: "[routerLink]",
|
|
1863
|
+
inputs: [
|
|
1864
|
+
"target",
|
|
1865
|
+
"queryParams",
|
|
1866
|
+
"fragment",
|
|
1867
|
+
"queryParamsHandling",
|
|
1868
|
+
"state",
|
|
1869
|
+
"info",
|
|
1870
|
+
"relativeTo",
|
|
1871
|
+
"preserveFragment",
|
|
1872
|
+
"skipLocationChange",
|
|
1873
|
+
"replaceUrl",
|
|
1874
|
+
"browserUrl",
|
|
1875
|
+
"routerLink"
|
|
1876
|
+
]
|
|
1877
|
+
},
|
|
1878
|
+
{
|
|
1879
|
+
kind: "component",
|
|
1880
|
+
type: ProductCategoryBadgesComponent,
|
|
1881
|
+
selector: "app-product-category-badges",
|
|
1882
|
+
inputs: ["product"]
|
|
1883
|
+
},
|
|
1884
|
+
{
|
|
1885
|
+
kind: "component",
|
|
1886
|
+
type: i1.TechlifyIconComponent,
|
|
1887
|
+
selector: "app-techlify-icon",
|
|
1888
|
+
inputs: ["name", "size"]
|
|
1889
|
+
},
|
|
1890
|
+
{
|
|
1891
|
+
kind: "component",
|
|
1892
|
+
type: i1.TechlifyDeleteButtonComponent,
|
|
1893
|
+
selector: "app-techlify-delete-button",
|
|
1894
|
+
inputs: [
|
|
1895
|
+
"data",
|
|
1896
|
+
"model",
|
|
1897
|
+
"message",
|
|
1898
|
+
"service"
|
|
1899
|
+
],
|
|
1900
|
+
outputs: ["deleted", "loading"]
|
|
1901
|
+
},
|
|
1902
|
+
{
|
|
1903
|
+
kind: "pipe",
|
|
1904
|
+
type: i4.DatePipe,
|
|
1905
|
+
name: "date"
|
|
1906
|
+
}
|
|
1907
|
+
],
|
|
1908
|
+
changeDetection: i0.ChangeDetectionStrategy.Eager,
|
|
1909
|
+
preserveWhitespaces: true
|
|
1910
|
+
});
|
|
1911
|
+
};
|
|
1912
|
+
StockIssueListComponent = __decorate([UntilDestroy()], StockIssueListComponent);
|
|
1913
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1914
|
+
minVersion: "12.0.0",
|
|
1915
|
+
version: "22.2.5",
|
|
1916
|
+
ngImport: i0,
|
|
1917
|
+
type: StockIssueListComponent,
|
|
1918
|
+
decorators: [{
|
|
1919
|
+
type: Component,
|
|
1920
|
+
args: [{
|
|
1921
|
+
selector: "app-stock-issue-list",
|
|
1922
|
+
changeDetection: ChangeDetectionStrategy.Eager,
|
|
1923
|
+
standalone: false,
|
|
1924
|
+
template: "<mat-card>\n <mat-card-content class=\"p-0\">\n <table mat-table [dataSource]=\"models\" class=\"w-100\" aria-describedby=\"Stock Issues\" infiniteScroll\n id=\"stockIssueTable\" [infiniteScrollDistance]=\"2\" [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\" matSort\n (matSortChange)=\"sortColumn($event)\">\n\n <!-- # Column -->\n <ng-container matColumnDef=\"no\">\n <th mat-header-cell *matHeaderCellDef>#</th>\n <td mat-cell *matCellDef=\"let element; let i = index\">{{ i + 1 }}</td>\n </ng-container>\n\n <ng-container matColumnDef=\"issue_number\">\n <th mat-header-cell *matHeaderCellDef matTooltip=\"Stock Issue ID\">Issue #</th>\n <td mat-cell *matCellDef=\"let element\">\n <a class=\"text-decoration-none text-dark\" [routerLink]=\"['/inventory/stock-issues', $safeNavigationMigration(element?.id), 'view']\">\n {{ element?.id }} <i class=\"fa-solid fa-up-right-from-square\"></i>\n </a>\n </td>\n </ng-container>\n\n <!-- Product Column -->\n <ng-container matColumnDef=\"product\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Product</th>\n <td mat-cell *matCellDef=\"let element\">\n <ul class=\"mb-0 ps-3\">\n @for (sip of element?.stock_issue_products; track sip) {\n <li>\n {{ sip?.quantity }} {{ sip?.product?.measure?.title }} <em>of</em>\n <a class=\"text-decoration-none text-dark\"\n [routerLink]=\"['/inventory/products', $safeNavigationMigration(sip?.product?.id), 'view']\">\n {{ sip?.product?.name }}\n </a>\n </li>\n }\n </ul>\n </td>\n </ng-container>\n\n <!-- Product Categories Column -->\n <ng-container matColumnDef=\"product_categories\">\n <th mat-header-cell *matHeaderCellDef>Product Categories</th>\n <td mat-cell *matCellDef=\"let element\">\n <app-product-category-badges\n [product]=\"$safeNavigationMigration(element?.stock_issue_products[0]?.product)\"></app-product-category-badges>\n </td>\n </ng-container>\n\n <!-- SKU Column -->\n <ng-container matColumnDef=\"sku\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>SKU</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.stock_issue_products[0]?.product?.sku }}</td>\n </ng-container>\n\n <!-- Categories Column (export only) -->\n <ng-container matColumnDef=\"categories\">\n <th mat-header-cell *matHeaderCellDef>Categories</th>\n <td mat-cell *matCellDef=\"let element\">\n @for (category of\n element?.stock_issue_products[0]?.product?.categories; track category;\n let last = $last) {\n <span> {{ category?.title }}@if (!last) { , } </span>\n }\n </td>\n </ng-container>\n\n <!-- Date Column -->\n <ng-container matColumnDef=\"date\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Date</th>\n <td mat-cell *matCellDef=\"let element\">{{ $safeNavigationMigration(element?.date) | date }}</td>\n </ng-container>\n\n <!-- Quantity Column -->\n <ng-container matColumnDef=\"quantity\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Quantity</th>\n <td mat-cell *matCellDef=\"let element\">\n {{ element?.stock_issue_products[0]?.quantity }}\n {{ element?.stock_issue_products[0]?.product?.measure?.title }}\n </td>\n </ng-container>\n\n <!-- Batch Column -->\n <ng-container matColumnDef=\"batch\">\n <th mat-header-cell *matHeaderCellDef>Batch</th>\n <td mat-cell *matCellDef=\"let element\">\n @if (element?.stock_issue_products[0]?.batch?.batch_number) {\n <p class=\"mb-0\">\n {{ element?.stock_issue_products[0]?.batch?.batch_number }}\n </p>\n } @if (element?.stock_issue_products[0]?.batch?.expires_on) {\n <small class=\"text-secondary\">\n Expires\n {{ $safeNavigationMigration(element?.stock_issue_products[0]?.batch?.expires_on) | date }}\n </small>\n }\n </td>\n </ng-container>\n\n <!-- Measure Column -->\n <ng-container matColumnDef=\"measure\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Measure</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.stock_issue_products[0]?.product?.measure?.title }}</td>\n </ng-container>\n\n <!-- Location Column -->\n <ng-container matColumnDef=\"location\">\n <th mat-header-cell *matHeaderCellDef mat-sort-header>Location From</th>\n <td mat-cell *matCellDef=\"let element\">\n <a class=\"text-decoration-none text-dark\"\n [routerLink]=\"['/inventory/locations', $safeNavigationMigration(element?.stock_issue_products[0]?.location_from_id), 'view']\">\n {{ element?.stock_issue_products[0]?.location?.title }}\n </a>\n <br>\n @if (element?.recipient) {\n <span>\n <small class=\"text-secondary\">received by {{element?.recipient?.name}}</small>\n </span>\n }\n </td>\n </ng-container>\n\n <!-- Related Column -->\n <ng-container matColumnDef=\"related\">\n <th mat-header-cell *matHeaderCellDef>Related</th>\n <td mat-cell *matCellDef=\"let element\">\n @if (element?.issuable) {\n <a class=\"text-dark\" [routerLink]=\"['/maintenances', $safeNavigationMigration(element?.issuable_id), 'view']\">\n Maintenance for {{ element?.issuable?.fixed_asset?.name }}\n </a>\n }\n </td>\n </ng-container>\n\n <!-- Particulars Column -->\n <ng-container matColumnDef=\"particulars\">\n <th mat-header-cell *matHeaderCellDef>Particulars</th>\n <td mat-cell *matCellDef=\"let element\">{{ element?.stock_issue_products[0]?.particulars }}</td>\n </ng-container>\n\n <!-- Creator Column -->\n <ng-container matColumnDef=\"creator\">\n <th mat-header-cell *matHeaderCellDef>Creator</th>\n <td mat-cell *matCellDef=\"let element\">\n <p class=\"mb-1\">{{ element?.creator?.name }}</p>\n <small class=\"text-secondary\">{{ $safeNavigationMigration(element?.created_at) | date }}</small>\n </td>\n </ng-container>\n\n <!-- Actions Column -->\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef>Actions</th>\n <td mat-cell *matCellDef=\"let element\">\n @if (!element.stock_transfer) {\n <div class=\"d-flex gap-1 text-secondary\">\n <app-techlify-icon name=\"view\" size=\"md\"\n [routerLink]=\"['/inventory', 'stock-issues', $safeNavigationMigration(element?.id), 'view']\"></app-techlify-icon>\n <app-techlify-icon name=\"edit\" role=\"button\"\n [routerLink]=\"['/inventory/stock-issues/form', $safeNavigationMigration(element?.id)]\"></app-techlify-icon>\n <app-techlify-delete-button [model]=\"element\" [service]=\"service\"\n [data]=\"{ title: $safeNavigationMigration(element?.id), type: 'Stock Issue' }\"\n (deleted)=\"reload()\"\n >\n </app-techlify-delete-button>\n </div>\n } @if (element.stock_transfer) {\n <span class=\"badge rounded-pill text-bg-secondary\">Stock Transfer</span>\n }\n </td>\n </ng-container>\n\n <!-- Footer Cells for Total Row -->\n <ng-container matColumnDef=\"footer-no\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-issue_number\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-product\">\n <td mat-footer-cell *matFooterCellDef><strong>Total</strong></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-product_categories\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-sku\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-categories\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-date\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-quantity\">\n <td mat-footer-cell *matFooterCellDef><strong>{{ totalQuantity }}</strong></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-batch\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-measure\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-location\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-related\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-particulars\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-creator\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <ng-container matColumnDef=\"footer-actions\">\n <td mat-footer-cell *matFooterCellDef></td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns\"></tr>\n <tr mat-footer-row *matFooterRowDef=\"footerColumns\"></tr>\n </table>\n\n @if (isWorking) {\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\n }\n </mat-card-content>\n</mat-card>"
|
|
1925
|
+
}]
|
|
1926
|
+
}],
|
|
1927
|
+
ctorParameters: () => [
|
|
1928
|
+
{ type: StockIssueService },
|
|
1929
|
+
{ type: i2.FormBuilder },
|
|
1930
|
+
{ type: i11.Router },
|
|
1931
|
+
{ type: i1.TechlifyFeatureService }
|
|
1932
|
+
],
|
|
1933
|
+
propDecorators: {
|
|
1934
|
+
filtersInput: [{
|
|
1935
|
+
type: i0.Input,
|
|
1936
|
+
args: [{
|
|
1937
|
+
isSignal: true,
|
|
1938
|
+
alias: "filters",
|
|
1939
|
+
required: false
|
|
1940
|
+
}]
|
|
1941
|
+
}],
|
|
1942
|
+
selectedColumns: [{
|
|
1943
|
+
type: i0.Input,
|
|
1944
|
+
args: [{
|
|
1945
|
+
isSignal: true,
|
|
1946
|
+
alias: "selectedColumns",
|
|
1947
|
+
required: false
|
|
1948
|
+
}]
|
|
1949
|
+
}],
|
|
1950
|
+
exportInProgress: [{
|
|
1951
|
+
type: i0.Input,
|
|
1952
|
+
args: [{
|
|
1953
|
+
isSignal: true,
|
|
1954
|
+
alias: "exportInProgress",
|
|
1955
|
+
required: false
|
|
1956
|
+
}]
|
|
1957
|
+
}],
|
|
1958
|
+
listUpdated: [{
|
|
1959
|
+
type: i0.Output,
|
|
1960
|
+
args: ["listUpdated"]
|
|
1961
|
+
}],
|
|
1962
|
+
columnConfigReady: [{
|
|
1963
|
+
type: i0.Output,
|
|
1964
|
+
args: ["columnConfigReady"]
|
|
1965
|
+
}],
|
|
1966
|
+
issuableData: [{
|
|
1967
|
+
type: i0.Input,
|
|
1968
|
+
args: [{
|
|
1969
|
+
isSignal: true,
|
|
1970
|
+
alias: "issuableData",
|
|
1971
|
+
required: false
|
|
1972
|
+
}]
|
|
1973
|
+
}]
|
|
1974
|
+
}
|
|
1975
|
+
});
|
|
1976
|
+
let StockIssuePageComponent = class StockIssuePageComponent {
|
|
1977
|
+
formBuilder;
|
|
1978
|
+
product;
|
|
1979
|
+
label = "Stock Issues";
|
|
1980
|
+
showActions = true;
|
|
1981
|
+
showFilters = true;
|
|
1982
|
+
listUpdated = new EventEmitter();
|
|
1983
|
+
itemizedList;
|
|
1984
|
+
groupedList;
|
|
1985
|
+
selectedView = signal("itemized", ...ngDevMode ? [{ debugName: "selectedView" }] : /* istanbul ignore next */ []);
|
|
1986
|
+
exportInProgress = signal(false, ...ngDevMode ? [{ debugName: "exportInProgress" }] : /* istanbul ignore next */ []);
|
|
1987
|
+
issuableData = input(null, ...ngDevMode ? [{ debugName: "issuableData" }] : /* istanbul ignore next */ []);
|
|
1988
|
+
columnConfig = [];
|
|
1989
|
+
selectedColumns = [];
|
|
1990
|
+
filterForm;
|
|
1991
|
+
filtersValue;
|
|
1992
|
+
constructor(formBuilder) {
|
|
1993
|
+
this.formBuilder = formBuilder;
|
|
1994
|
+
this.filterForm = this.formBuilder.group({
|
|
1995
|
+
category_ids: [""],
|
|
1996
|
+
date_from: [""],
|
|
1997
|
+
date_to: [""],
|
|
1998
|
+
duration: [""],
|
|
1999
|
+
location_ids: [""],
|
|
2000
|
+
measure_ids: [""],
|
|
2001
|
+
product_ids: [""],
|
|
2002
|
+
search: [""]
|
|
2003
|
+
});
|
|
2004
|
+
this.filtersValue = toSignal(this.filterForm.valueChanges.pipe(startWith(this.filterForm.value)));
|
|
2005
|
+
}
|
|
2006
|
+
ngOnInit() {
|
|
2007
|
+
if (this.product) this.filterForm.get("product_ids")?.setValue(this.product?.id);
|
|
2008
|
+
}
|
|
2009
|
+
reload() {
|
|
2010
|
+
this.itemizedList?.reload();
|
|
2011
|
+
this.groupedList?.reload();
|
|
2012
|
+
}
|
|
2013
|
+
onColumnConfigReady(config) {
|
|
2014
|
+
this.columnConfig = config;
|
|
2015
|
+
this.selectedColumns = config.filter((col) => col.isSelected);
|
|
2016
|
+
}
|
|
2017
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
2018
|
+
minVersion: "12.0.0",
|
|
2019
|
+
version: "22.2.5",
|
|
2020
|
+
ngImport: i0,
|
|
2021
|
+
type: StockIssuePageComponent,
|
|
2022
|
+
deps: [{ token: i2.FormBuilder }],
|
|
2023
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
2024
|
+
});
|
|
2025
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
2026
|
+
minVersion: "17.0.0",
|
|
2027
|
+
version: "22.2.5",
|
|
2028
|
+
type: StockIssuePageComponent,
|
|
2029
|
+
isStandalone: false,
|
|
2030
|
+
selector: "app-stock-issue-page",
|
|
2031
|
+
inputs: {
|
|
2032
|
+
product: {
|
|
2033
|
+
classPropertyName: "product",
|
|
2034
|
+
publicName: "product",
|
|
2035
|
+
isSignal: false,
|
|
2036
|
+
isRequired: false,
|
|
2037
|
+
transformFunction: null
|
|
2038
|
+
},
|
|
2039
|
+
label: {
|
|
2040
|
+
classPropertyName: "label",
|
|
2041
|
+
publicName: "label",
|
|
2042
|
+
isSignal: false,
|
|
2043
|
+
isRequired: false,
|
|
2044
|
+
transformFunction: null
|
|
2045
|
+
},
|
|
2046
|
+
showActions: {
|
|
2047
|
+
classPropertyName: "showActions",
|
|
2048
|
+
publicName: "showActions",
|
|
2049
|
+
isSignal: false,
|
|
2050
|
+
isRequired: false,
|
|
2051
|
+
transformFunction: null
|
|
2052
|
+
},
|
|
2053
|
+
showFilters: {
|
|
2054
|
+
classPropertyName: "showFilters",
|
|
2055
|
+
publicName: "showFilters",
|
|
2056
|
+
isSignal: false,
|
|
2057
|
+
isRequired: false,
|
|
2058
|
+
transformFunction: null
|
|
2059
|
+
},
|
|
2060
|
+
issuableData: {
|
|
2061
|
+
classPropertyName: "issuableData",
|
|
2062
|
+
publicName: "issuableData",
|
|
2063
|
+
isSignal: true,
|
|
2064
|
+
isRequired: false,
|
|
2065
|
+
transformFunction: null
|
|
2066
|
+
}
|
|
2067
|
+
},
|
|
2068
|
+
outputs: { listUpdated: "listUpdated" },
|
|
2069
|
+
viewQueries: [{
|
|
2070
|
+
propertyName: "itemizedList",
|
|
2071
|
+
first: true,
|
|
2072
|
+
predicate: StockIssueProductListComponent,
|
|
2073
|
+
descendants: true
|
|
2074
|
+
}, {
|
|
2075
|
+
propertyName: "groupedList",
|
|
2076
|
+
first: true,
|
|
2077
|
+
predicate: StockIssueListComponent,
|
|
2078
|
+
descendants: true
|
|
2079
|
+
}],
|
|
2080
|
+
ngImport: i0,
|
|
2081
|
+
template: "@if (!product) {\n<mat-card class=\"mb-2\">\n <mat-card-content class=\"d-flex justify-content-between align-items-center gap-3\">\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <h3 class=\"mb-0\">{{ label }}</h3>\n\n <div class=\"d-flex gap-2 align-items-center ms-2 d-print-none\">\n <app-techlify-icon role='button' name='add'\n [routerLink]=\"['/inventory/stock-issues/form']\" [queryParams]=\"issuableData()\"></app-techlify-icon>\n @if (showActions) {\n <span matTooltip=\"Import\" routerLink=\"import\"\n class=\"cursor-pointer material-symbols-outlined\">\n file_upload\n </span>\n }\n <app-export-to-excel-button tableId=\"stockIssueTable\" fileName=\"Stock Issues\"\n (onExportStart)=\"exportInProgress.set(true)\" (onExportEnd)=\"exportInProgress.set(false)\">\n </app-export-to-excel-button>\n @if (showActions && columnConfig.length > 0) {\n <app-column-selector mode=\"icon\" [columnConfigs]=\"columnConfig\"\n [(selectedColumns)]=\"selectedColumns\"></app-column-selector>\n }\n <mat-button-toggle-group class=\"view-toggle\" [value]=\"selectedView()\" (change)=\"selectedView.set($event.value)\">\n <mat-button-toggle value=\"itemized\">Itemized</mat-button-toggle>\n <mat-button-toggle value=\"grouped\">Grouped</mat-button-toggle>\n </mat-button-toggle-group>\n </div>\n </div>\n @if (showFilters) {\n <form [formGroup]=\"filterForm\" class=\"d-flex align-items-center gap-2 flex-wrap\">\n <mat-form-field class='fl-md'>\n <mat-label>Search</mat-label>\n <input matInput placeholder=\"Search products\" formControlName=\"search\" />\n </mat-form-field>\n\n <app-timeline-filter appearance=\"fill\" labelText=\"Date\" formControlName=\"duration\" [form]=\"filterForm\"\n [showClearButton]=\"true\"></app-timeline-filter>\n\n <mat-form-field class='fl-sm'>\n <mat-label>Category</mat-label>\n <app-searchable-selector apiUrl=\"api/product-categories\" formControlName=\"category_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field class='fl-sm'>\n <mat-label>Measure</mat-label>\n <app-searchable-selector apiUrl=\"api/product-measures\" formControlName=\"measure_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field class='fl-sm'>\n <mat-label>Location From</mat-label>\n <app-searchable-selector apiUrl=\"api/inventory-locations\" formControlName=\"location_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n </form>\n }\n </mat-card-content>\n</mat-card>\n} @if (selectedView() === 'itemized') {\n<app-stock-issue-products-list [filters]=\"filtersValue()\"\n [isProductView]=\"!!product\" [selectedColumns]=\"selectedColumns\" [exportInProgress]=\"exportInProgress()\"\n (columnConfigReady)=\"onColumnConfigReady($event)\" (listUpdated)=\"listUpdated.emit($event)\" [issuableData]=\"issuableData()\">\n</app-stock-issue-products-list>\n} @if (selectedView() === 'grouped') {\n<app-stock-issue-list [filters]=\"filtersValue()\"\n [selectedColumns]=\"selectedColumns\" [exportInProgress]=\"exportInProgress()\"\n (columnConfigReady)=\"onColumnConfigReady($event)\" (listUpdated)=\"listUpdated.emit($event)\" [issuableData]=\"issuableData()\">\n</app-stock-issue-list>\n}",
|
|
2082
|
+
styles: [":host ::ng-deep .view-toggle{--mat-button-toggle-height: 28px;font-size:12px}:host ::ng-deep .mat-mdc-footer-row{position:sticky;bottom:0;background-color:#fff;z-index:10;box-shadow:0 -2px 4px #0000001a}\n"],
|
|
2083
|
+
dependencies: [
|
|
2084
|
+
{
|
|
2085
|
+
kind: "component",
|
|
2086
|
+
type: i6$2.MatFormField,
|
|
2087
|
+
selector: "mat-form-field",
|
|
2088
|
+
inputs: [
|
|
2089
|
+
"hideRequiredMarker",
|
|
2090
|
+
"color",
|
|
2091
|
+
"floatLabel",
|
|
2092
|
+
"appearance",
|
|
2093
|
+
"subscriptSizing",
|
|
2094
|
+
"hintLabel"
|
|
2095
|
+
],
|
|
2096
|
+
exportAs: ["matFormField"]
|
|
2097
|
+
},
|
|
2098
|
+
{
|
|
2099
|
+
kind: "directive",
|
|
2100
|
+
type: i6$2.MatLabel,
|
|
2101
|
+
selector: "mat-label"
|
|
2102
|
+
},
|
|
2103
|
+
{
|
|
2104
|
+
kind: "directive",
|
|
2105
|
+
type: i7$1.MatInput,
|
|
2106
|
+
selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]",
|
|
2107
|
+
inputs: [
|
|
2108
|
+
"disabled",
|
|
2109
|
+
"id",
|
|
2110
|
+
"placeholder",
|
|
2111
|
+
"name",
|
|
2112
|
+
"required",
|
|
2113
|
+
"type",
|
|
2114
|
+
"errorStateMatcher",
|
|
2115
|
+
"aria-describedby",
|
|
2116
|
+
"value",
|
|
2117
|
+
"readonly",
|
|
2118
|
+
"disabledInteractive"
|
|
2119
|
+
],
|
|
2120
|
+
exportAs: ["matInput"]
|
|
2121
|
+
},
|
|
2122
|
+
{
|
|
2123
|
+
kind: "component",
|
|
2124
|
+
type: i7.MatCard,
|
|
2125
|
+
selector: "mat-card",
|
|
2126
|
+
inputs: ["appearance"],
|
|
2127
|
+
exportAs: ["matCard"]
|
|
2128
|
+
},
|
|
2129
|
+
{
|
|
2130
|
+
kind: "directive",
|
|
2131
|
+
type: i7.MatCardContent,
|
|
2132
|
+
selector: "mat-card-content"
|
|
2133
|
+
},
|
|
2134
|
+
{
|
|
2135
|
+
kind: "directive",
|
|
2136
|
+
type: i8.MatTooltip,
|
|
2137
|
+
selector: "[matTooltip]",
|
|
2138
|
+
inputs: [
|
|
2139
|
+
"matTooltipPosition",
|
|
2140
|
+
"matTooltipPositionAtOrigin",
|
|
2141
|
+
"matTooltipDisabled",
|
|
2142
|
+
"matTooltipShowDelay",
|
|
2143
|
+
"matTooltipHideDelay",
|
|
2144
|
+
"matTooltipTouchGestures",
|
|
2145
|
+
"matTooltip",
|
|
2146
|
+
"matTooltipClass"
|
|
2147
|
+
],
|
|
2148
|
+
exportAs: ["matTooltip"]
|
|
2149
|
+
},
|
|
2150
|
+
{
|
|
2151
|
+
kind: "directive",
|
|
2152
|
+
type: i6.MatButtonToggleGroup,
|
|
2153
|
+
selector: "mat-button-toggle-group",
|
|
2154
|
+
inputs: [
|
|
2155
|
+
"appearance",
|
|
2156
|
+
"name",
|
|
2157
|
+
"vertical",
|
|
2158
|
+
"value",
|
|
2159
|
+
"multiple",
|
|
2160
|
+
"disabled",
|
|
2161
|
+
"disabledInteractive",
|
|
2162
|
+
"hideSingleSelectionIndicator",
|
|
2163
|
+
"hideMultipleSelectionIndicator"
|
|
2164
|
+
],
|
|
2165
|
+
outputs: ["valueChange", "change"],
|
|
2166
|
+
exportAs: ["matButtonToggleGroup"]
|
|
2167
|
+
},
|
|
2168
|
+
{
|
|
2169
|
+
kind: "component",
|
|
2170
|
+
type: i6.MatButtonToggle,
|
|
2171
|
+
selector: "mat-button-toggle",
|
|
2172
|
+
inputs: [
|
|
2173
|
+
"aria-label",
|
|
2174
|
+
"aria-labelledby",
|
|
2175
|
+
"id",
|
|
2176
|
+
"name",
|
|
2177
|
+
"value",
|
|
2178
|
+
"tabIndex",
|
|
2179
|
+
"disableRipple",
|
|
2180
|
+
"appearance",
|
|
2181
|
+
"checked",
|
|
2182
|
+
"disabled",
|
|
2183
|
+
"disabledInteractive"
|
|
2184
|
+
],
|
|
2185
|
+
outputs: ["change"],
|
|
2186
|
+
exportAs: ["matButtonToggle"]
|
|
2187
|
+
},
|
|
2188
|
+
{
|
|
2189
|
+
kind: "directive",
|
|
2190
|
+
type: i11.RouterLink,
|
|
2191
|
+
selector: "[routerLink]",
|
|
2192
|
+
inputs: [
|
|
2193
|
+
"target",
|
|
2194
|
+
"queryParams",
|
|
2195
|
+
"fragment",
|
|
2196
|
+
"queryParamsHandling",
|
|
2197
|
+
"state",
|
|
2198
|
+
"info",
|
|
2199
|
+
"relativeTo",
|
|
2200
|
+
"preserveFragment",
|
|
2201
|
+
"skipLocationChange",
|
|
2202
|
+
"replaceUrl",
|
|
2203
|
+
"browserUrl",
|
|
2204
|
+
"routerLink"
|
|
2205
|
+
]
|
|
2206
|
+
},
|
|
2207
|
+
{
|
|
2208
|
+
kind: "component",
|
|
2209
|
+
type: i1.SearchableSelectorComponent,
|
|
2210
|
+
selector: "app-searchable-selector",
|
|
2211
|
+
inputs: [
|
|
2212
|
+
"valueField",
|
|
2213
|
+
"titleField",
|
|
2214
|
+
"subtitleField",
|
|
2215
|
+
"apiUrl",
|
|
2216
|
+
"multiple",
|
|
2217
|
+
"selectedValue",
|
|
2218
|
+
"enableSearch",
|
|
2219
|
+
"add",
|
|
2220
|
+
"addConfig",
|
|
2221
|
+
"edit",
|
|
2222
|
+
"editConfig",
|
|
2223
|
+
"sort",
|
|
2224
|
+
"sortBy",
|
|
2225
|
+
"searchField",
|
|
2226
|
+
"itemComponent",
|
|
2227
|
+
"items",
|
|
2228
|
+
"apiDataProperty",
|
|
2229
|
+
"cache",
|
|
2230
|
+
"perPage",
|
|
2231
|
+
"inDataSearch",
|
|
2232
|
+
"panelWidth",
|
|
2233
|
+
"focusSearchOnOpen",
|
|
2234
|
+
"isEmitInitialEvent",
|
|
2235
|
+
"required",
|
|
2236
|
+
"disabled",
|
|
2237
|
+
"value"
|
|
2238
|
+
],
|
|
2239
|
+
outputs: [
|
|
2240
|
+
"selectedValueChange",
|
|
2241
|
+
"selectionChange",
|
|
2242
|
+
"itemsChange",
|
|
2243
|
+
"isItemsEmpty"
|
|
2244
|
+
]
|
|
2245
|
+
},
|
|
2246
|
+
{
|
|
2247
|
+
kind: "component",
|
|
2248
|
+
type: i1.TimelineFilterComponent,
|
|
2249
|
+
selector: "app-timeline-filter",
|
|
2250
|
+
inputs: [
|
|
2251
|
+
"defaultValue",
|
|
2252
|
+
"required",
|
|
2253
|
+
"disabled",
|
|
2254
|
+
"value",
|
|
2255
|
+
"timelines",
|
|
2256
|
+
"dateFrom",
|
|
2257
|
+
"dateTo",
|
|
2258
|
+
"appearance",
|
|
2259
|
+
"showClearButton",
|
|
2260
|
+
"form",
|
|
2261
|
+
"labelText"
|
|
2262
|
+
],
|
|
2263
|
+
outputs: ["selectionChange"]
|
|
2264
|
+
},
|
|
2265
|
+
{
|
|
2266
|
+
kind: "directive",
|
|
2267
|
+
type: i2.ɵNgNoValidate,
|
|
2268
|
+
selector: "form:not([ngNoForm]):not([ngNativeValidate])"
|
|
2269
|
+
},
|
|
2270
|
+
{
|
|
2271
|
+
kind: "directive",
|
|
2272
|
+
type: i2.DefaultValueAccessor,
|
|
2273
|
+
selector: "input:not([type=checkbox]):not([ngNoCva])[formControlName],textarea:not([ngNoCva])[formControlName],input:not([type=checkbox]):not([ngNoCva])[formControl],textarea:not([ngNoCva])[formControl],input:not([type=checkbox]):not([ngNoCva])[ngModel],textarea:not([ngNoCva])[ngModel],[ngDefaultControl]"
|
|
2274
|
+
},
|
|
2275
|
+
{
|
|
2276
|
+
kind: "directive",
|
|
2277
|
+
type: i2.NgControlStatus,
|
|
2278
|
+
selector: "[formControlName],[ngModel],[formControl]"
|
|
2279
|
+
},
|
|
2280
|
+
{
|
|
2281
|
+
kind: "directive",
|
|
2282
|
+
type: i2.NgControlStatusGroup,
|
|
2283
|
+
selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]"
|
|
2284
|
+
},
|
|
2285
|
+
{
|
|
2286
|
+
kind: "directive",
|
|
2287
|
+
type: i2.FormGroupDirective,
|
|
2288
|
+
selector: "[formGroup]",
|
|
2289
|
+
inputs: ["formGroup"],
|
|
2290
|
+
outputs: ["ngSubmit"],
|
|
2291
|
+
exportAs: ["ngForm"]
|
|
2292
|
+
},
|
|
2293
|
+
{
|
|
2294
|
+
kind: "directive",
|
|
2295
|
+
type: i2.FormControlName,
|
|
2296
|
+
selector: "[formControlName]",
|
|
2297
|
+
inputs: [
|
|
2298
|
+
"formControlName",
|
|
2299
|
+
"disabled",
|
|
2300
|
+
"ngModel"
|
|
2301
|
+
],
|
|
2302
|
+
outputs: ["ngModelChange"]
|
|
2303
|
+
},
|
|
2304
|
+
{
|
|
2305
|
+
kind: "component",
|
|
2306
|
+
type: i1.ColumnSelectorComponent,
|
|
2307
|
+
selector: "app-column-selector",
|
|
2308
|
+
inputs: [
|
|
2309
|
+
"label",
|
|
2310
|
+
"mode",
|
|
2311
|
+
"columnConfigs",
|
|
2312
|
+
"selectedColumns",
|
|
2313
|
+
"isExportWorking"
|
|
2314
|
+
],
|
|
2315
|
+
outputs: ["selectedColumnsChange", "displayedColumnsChange"]
|
|
2316
|
+
},
|
|
2317
|
+
{
|
|
2318
|
+
kind: "component",
|
|
2319
|
+
type: i1.TechlifyIconComponent,
|
|
2320
|
+
selector: "app-techlify-icon",
|
|
2321
|
+
inputs: ["name", "size"]
|
|
2322
|
+
},
|
|
2323
|
+
{
|
|
2324
|
+
kind: "component",
|
|
2325
|
+
type: ExportToExcelButtonComponent,
|
|
2326
|
+
selector: "app-export-to-excel-button",
|
|
2327
|
+
inputs: ["tableId", "fileName"],
|
|
2328
|
+
outputs: ["onExportStart", "onExportEnd"]
|
|
2329
|
+
},
|
|
2330
|
+
{
|
|
2331
|
+
kind: "component",
|
|
2332
|
+
type: StockIssueListComponent,
|
|
2333
|
+
selector: "app-stock-issue-list",
|
|
2334
|
+
inputs: [
|
|
2335
|
+
"filters",
|
|
2336
|
+
"selectedColumns",
|
|
2337
|
+
"exportInProgress",
|
|
2338
|
+
"issuableData"
|
|
2339
|
+
],
|
|
2340
|
+
outputs: ["listUpdated", "columnConfigReady"]
|
|
2341
|
+
},
|
|
2342
|
+
{
|
|
2343
|
+
kind: "component",
|
|
2344
|
+
type: StockIssueProductListComponent,
|
|
2345
|
+
selector: "app-stock-issue-products-list",
|
|
2346
|
+
inputs: [
|
|
2347
|
+
"filters",
|
|
2348
|
+
"isProductView",
|
|
2349
|
+
"product",
|
|
2350
|
+
"selectedColumns",
|
|
2351
|
+
"exportInProgress",
|
|
2352
|
+
"issuableData"
|
|
2353
|
+
],
|
|
2354
|
+
outputs: [
|
|
2355
|
+
"selectedColumnsChange",
|
|
2356
|
+
"listUpdated",
|
|
2357
|
+
"columnConfigReady"
|
|
2358
|
+
]
|
|
2359
|
+
}
|
|
2360
|
+
],
|
|
2361
|
+
changeDetection: i0.ChangeDetectionStrategy.Eager,
|
|
2362
|
+
preserveWhitespaces: true
|
|
2363
|
+
});
|
|
2364
|
+
};
|
|
2365
|
+
StockIssuePageComponent = __decorate([UntilDestroy()], StockIssuePageComponent);
|
|
2366
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
2367
|
+
minVersion: "12.0.0",
|
|
2368
|
+
version: "22.2.5",
|
|
2369
|
+
ngImport: i0,
|
|
2370
|
+
type: StockIssuePageComponent,
|
|
2371
|
+
decorators: [{
|
|
2372
|
+
type: Component,
|
|
2373
|
+
args: [{
|
|
2374
|
+
selector: "app-stock-issue-page",
|
|
2375
|
+
changeDetection: ChangeDetectionStrategy.Eager,
|
|
2376
|
+
standalone: false,
|
|
2377
|
+
template: "@if (!product) {\n<mat-card class=\"mb-2\">\n <mat-card-content class=\"d-flex justify-content-between align-items-center gap-3\">\n <div class=\"d-flex justify-content-start align-items-center gap-2\">\n <h3 class=\"mb-0\">{{ label }}</h3>\n\n <div class=\"d-flex gap-2 align-items-center ms-2 d-print-none\">\n <app-techlify-icon role='button' name='add'\n [routerLink]=\"['/inventory/stock-issues/form']\" [queryParams]=\"issuableData()\"></app-techlify-icon>\n @if (showActions) {\n <span matTooltip=\"Import\" routerLink=\"import\"\n class=\"cursor-pointer material-symbols-outlined\">\n file_upload\n </span>\n }\n <app-export-to-excel-button tableId=\"stockIssueTable\" fileName=\"Stock Issues\"\n (onExportStart)=\"exportInProgress.set(true)\" (onExportEnd)=\"exportInProgress.set(false)\">\n </app-export-to-excel-button>\n @if (showActions && columnConfig.length > 0) {\n <app-column-selector mode=\"icon\" [columnConfigs]=\"columnConfig\"\n [(selectedColumns)]=\"selectedColumns\"></app-column-selector>\n }\n <mat-button-toggle-group class=\"view-toggle\" [value]=\"selectedView()\" (change)=\"selectedView.set($event.value)\">\n <mat-button-toggle value=\"itemized\">Itemized</mat-button-toggle>\n <mat-button-toggle value=\"grouped\">Grouped</mat-button-toggle>\n </mat-button-toggle-group>\n </div>\n </div>\n @if (showFilters) {\n <form [formGroup]=\"filterForm\" class=\"d-flex align-items-center gap-2 flex-wrap\">\n <mat-form-field class='fl-md'>\n <mat-label>Search</mat-label>\n <input matInput placeholder=\"Search products\" formControlName=\"search\" />\n </mat-form-field>\n\n <app-timeline-filter appearance=\"fill\" labelText=\"Date\" formControlName=\"duration\" [form]=\"filterForm\"\n [showClearButton]=\"true\"></app-timeline-filter>\n\n <mat-form-field class='fl-sm'>\n <mat-label>Category</mat-label>\n <app-searchable-selector apiUrl=\"api/product-categories\" formControlName=\"category_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field class='fl-sm'>\n <mat-label>Measure</mat-label>\n <app-searchable-selector apiUrl=\"api/product-measures\" formControlName=\"measure_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n\n <mat-form-field class='fl-sm'>\n <mat-label>Location From</mat-label>\n <app-searchable-selector apiUrl=\"api/inventory-locations\" formControlName=\"location_ids\" [multiple]=\"true\">\n </app-searchable-selector>\n </mat-form-field>\n </form>\n }\n </mat-card-content>\n</mat-card>\n} @if (selectedView() === 'itemized') {\n<app-stock-issue-products-list [filters]=\"filtersValue()\"\n [isProductView]=\"!!product\" [selectedColumns]=\"selectedColumns\" [exportInProgress]=\"exportInProgress()\"\n (columnConfigReady)=\"onColumnConfigReady($event)\" (listUpdated)=\"listUpdated.emit($event)\" [issuableData]=\"issuableData()\">\n</app-stock-issue-products-list>\n} @if (selectedView() === 'grouped') {\n<app-stock-issue-list [filters]=\"filtersValue()\"\n [selectedColumns]=\"selectedColumns\" [exportInProgress]=\"exportInProgress()\"\n (columnConfigReady)=\"onColumnConfigReady($event)\" (listUpdated)=\"listUpdated.emit($event)\" [issuableData]=\"issuableData()\">\n</app-stock-issue-list>\n}",
|
|
2378
|
+
styles: [":host ::ng-deep .view-toggle{--mat-button-toggle-height: 28px;font-size:12px}:host ::ng-deep .mat-mdc-footer-row{position:sticky;bottom:0;background-color:#fff;z-index:10;box-shadow:0 -2px 4px #0000001a}\n"]
|
|
2379
|
+
}]
|
|
2380
|
+
}],
|
|
2381
|
+
ctorParameters: () => [{ type: i2.FormBuilder }],
|
|
2382
|
+
propDecorators: {
|
|
2383
|
+
product: [{ type: Input }],
|
|
2384
|
+
label: [{ type: Input }],
|
|
2385
|
+
showActions: [{ type: Input }],
|
|
2386
|
+
showFilters: [{ type: Input }],
|
|
2387
|
+
listUpdated: [{ type: Output }],
|
|
2388
|
+
itemizedList: [{
|
|
2389
|
+
type: ViewChild,
|
|
2390
|
+
args: [StockIssueProductListComponent]
|
|
2391
|
+
}],
|
|
2392
|
+
groupedList: [{
|
|
2393
|
+
type: ViewChild,
|
|
2394
|
+
args: [StockIssueListComponent]
|
|
2395
|
+
}],
|
|
2396
|
+
issuableData: [{
|
|
2397
|
+
type: i0.Input,
|
|
2398
|
+
args: [{
|
|
2399
|
+
isSignal: true,
|
|
2400
|
+
alias: "issuableData",
|
|
2401
|
+
required: false
|
|
2402
|
+
}]
|
|
2403
|
+
}]
|
|
2404
|
+
}
|
|
2405
|
+
});
|
|
2406
|
+
var StockIssuePageModule = class StockIssuePageModule {
|
|
2407
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
2408
|
+
minVersion: "12.0.0",
|
|
2409
|
+
version: "22.2.5",
|
|
2410
|
+
ngImport: i0,
|
|
2411
|
+
type: StockIssuePageModule,
|
|
2412
|
+
deps: [],
|
|
2413
|
+
target: i0.ɵɵFactoryTarget.NgModule
|
|
2414
|
+
});
|
|
2415
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({
|
|
2416
|
+
minVersion: "14.0.0",
|
|
2417
|
+
version: "22.2.5",
|
|
2418
|
+
ngImport: i0,
|
|
2419
|
+
type: StockIssuePageModule,
|
|
2420
|
+
declarations: [
|
|
2421
|
+
StockIssuePageComponent,
|
|
2422
|
+
StockIssueListComponent,
|
|
2423
|
+
StockIssueProductListComponent
|
|
2424
|
+
],
|
|
2425
|
+
imports: [
|
|
2426
|
+
CommonModule,
|
|
2427
|
+
MaterialModule,
|
|
2428
|
+
TechlifyFilterModule,
|
|
2429
|
+
InfiniteScrollDirective,
|
|
2430
|
+
MatProgressBarModule,
|
|
2431
|
+
RouterModule,
|
|
2432
|
+
SearchableSelectorModule,
|
|
2433
|
+
TimelineFilterModule,
|
|
2434
|
+
ReactiveFormsModule,
|
|
2435
|
+
ProductCategoryBadgesComponent,
|
|
2436
|
+
ColumnSelectorModule,
|
|
2437
|
+
TechlifyIconModule,
|
|
2438
|
+
ExportToExcelButtonComponent,
|
|
2439
|
+
TechlifyFormButtonComponent,
|
|
2440
|
+
TechlifyDeleteButtonComponent
|
|
2441
|
+
],
|
|
2442
|
+
exports: [
|
|
2443
|
+
StockIssuePageComponent,
|
|
2444
|
+
StockIssueListComponent,
|
|
2445
|
+
StockIssueProductListComponent
|
|
2446
|
+
]
|
|
2447
|
+
});
|
|
2448
|
+
static ɵinj = i0.ɵɵngDeclareInjector({
|
|
2449
|
+
minVersion: "12.0.0",
|
|
2450
|
+
version: "22.2.5",
|
|
2451
|
+
ngImport: i0,
|
|
2452
|
+
type: StockIssuePageModule,
|
|
2453
|
+
imports: [
|
|
2454
|
+
CommonModule,
|
|
2455
|
+
MaterialModule,
|
|
2456
|
+
TechlifyFilterModule,
|
|
2457
|
+
MatProgressBarModule,
|
|
2458
|
+
RouterModule,
|
|
2459
|
+
SearchableSelectorModule,
|
|
2460
|
+
TimelineFilterModule,
|
|
2461
|
+
ReactiveFormsModule,
|
|
2462
|
+
ColumnSelectorModule,
|
|
2463
|
+
TechlifyIconModule,
|
|
2464
|
+
TechlifyFormButtonComponent,
|
|
2465
|
+
TechlifyDeleteButtonComponent
|
|
2466
|
+
]
|
|
2467
|
+
});
|
|
2468
|
+
};
|
|
2469
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
2470
|
+
minVersion: "12.0.0",
|
|
2471
|
+
version: "22.2.5",
|
|
2472
|
+
ngImport: i0,
|
|
2473
|
+
type: StockIssuePageModule,
|
|
2474
|
+
decorators: [{
|
|
2475
|
+
type: NgModule,
|
|
2476
|
+
args: [{
|
|
2477
|
+
declarations: [
|
|
2478
|
+
StockIssuePageComponent,
|
|
2479
|
+
StockIssueListComponent,
|
|
2480
|
+
StockIssueProductListComponent
|
|
2481
|
+
],
|
|
2482
|
+
imports: [
|
|
2483
|
+
CommonModule,
|
|
2484
|
+
MaterialModule,
|
|
2485
|
+
TechlifyFilterModule,
|
|
2486
|
+
InfiniteScrollDirective,
|
|
2487
|
+
MatProgressBarModule,
|
|
2488
|
+
RouterModule,
|
|
2489
|
+
SearchableSelectorModule,
|
|
2490
|
+
TimelineFilterModule,
|
|
2491
|
+
ReactiveFormsModule,
|
|
2492
|
+
ProductCategoryBadgesComponent,
|
|
2493
|
+
ColumnSelectorModule,
|
|
2494
|
+
TechlifyIconModule,
|
|
2495
|
+
ExportToExcelButtonComponent,
|
|
2496
|
+
TechlifyFormButtonComponent,
|
|
2497
|
+
TechlifyDeleteButtonComponent
|
|
2498
|
+
],
|
|
2499
|
+
exports: [
|
|
2500
|
+
StockIssuePageComponent,
|
|
2501
|
+
StockIssueListComponent,
|
|
2502
|
+
StockIssueProductListComponent
|
|
2503
|
+
]
|
|
2504
|
+
}]
|
|
2505
|
+
}]
|
|
2506
|
+
});
|
|
2507
|
+
export { StockIssueSingleProductFormComponent as a, StockIssueProductListComponent as i, StockIssuePageComponent as n, StockIssueProductFormComponent as o, StockIssueListComponent as r, StockIssuePageModule as t };
|
|
2508
|
+
|
|
2509
|
+
//# sourceMappingURL=techlify-inventory-common-stock-issue-page.module-DX9n3X1T.mjs.map
|