@things-factory/sales-base 5.0.7 → 5.0.11
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/dist-server/constants/attachment-type.js.map +1 -1
- package/dist-server/constants/index.js +8 -21
- package/dist-server/constants/index.js.map +1 -1
- package/dist-server/constants/load-type.js.map +1 -1
- package/dist-server/constants/order.js.map +1 -1
- package/dist-server/constants/product-group-type.js.map +1 -1
- package/dist-server/constants/release-good.js.map +1 -1
- package/dist-server/constants/transfer-order-type.js.map +1 -1
- package/dist-server/constants/validation-error-code.js.map +1 -1
- package/dist-server/constants/vas-target-type.js.map +1 -1
- package/dist-server/controllers/ecommerce/ecommerce-controller.js.map +1 -1
- package/dist-server/controllers/ecommerce/index.js +3 -16
- package/dist-server/controllers/ecommerce/index.js.map +1 -1
- package/dist-server/controllers/ecommerce/sellercraft-controller.js.map +1 -1
- package/dist-server/controllers/index.js +3 -16
- package/dist-server/controllers/index.js.map +1 -1
- package/dist-server/controllers/order-controller.js.map +1 -1
- package/dist-server/errors/index.js +2 -15
- package/dist-server/errors/index.js.map +1 -1
- package/dist-server/errors/validation-error.js +2 -24
- package/dist-server/errors/validation-error.js.map +1 -1
- package/dist-server/index.js +6 -19
- package/dist-server/index.js.map +1 -1
- package/dist-server/migrations/index.js.map +1 -1
- package/dist-server/service/arrival-notice/arrival-notice-mutation.js +69 -83
- package/dist-server/service/arrival-notice/arrival-notice-mutation.js.map +1 -1
- package/dist-server/service/arrival-notice/arrival-notice-query.js +43 -54
- package/dist-server/service/arrival-notice/arrival-notice-query.js.map +1 -1
- package/dist-server/service/arrival-notice/arrival-notice-types.js +193 -201
- package/dist-server/service/arrival-notice/arrival-notice-types.js.map +1 -1
- package/dist-server/service/arrival-notice/arrival-notice.js +88 -96
- package/dist-server/service/arrival-notice/arrival-notice.js.map +1 -1
- package/dist-server/service/arrival-notice/index.js +3 -16
- package/dist-server/service/arrival-notice/index.js.map +1 -1
- package/dist-server/service/claim/claim-mutation.js +33 -44
- package/dist-server/service/claim/claim-mutation.js.map +1 -1
- package/dist-server/service/claim/claim-query.js +43 -54
- package/dist-server/service/claim/claim-query.js.map +1 -1
- package/dist-server/service/claim/claim-types.js +82 -90
- package/dist-server/service/claim/claim-types.js.map +1 -1
- package/dist-server/service/claim/claim.js +62 -70
- package/dist-server/service/claim/claim.js.map +1 -1
- package/dist-server/service/claim/index.js +3 -16
- package/dist-server/service/claim/index.js.map +1 -1
- package/dist-server/service/claim-detail/claim-detail-mutation.js +33 -44
- package/dist-server/service/claim-detail/claim-detail-mutation.js.map +1 -1
- package/dist-server/service/claim-detail/claim-detail-query.js +30 -41
- package/dist-server/service/claim-detail/claim-detail-query.js.map +1 -1
- package/dist-server/service/claim-detail/claim-detail-types.js +28 -36
- package/dist-server/service/claim-detail/claim-detail-types.js.map +1 -1
- package/dist-server/service/claim-detail/claim-detail.js +34 -42
- package/dist-server/service/claim-detail/claim-detail.js.map +1 -1
- package/dist-server/service/claim-detail/index.js +3 -16
- package/dist-server/service/claim-detail/index.js.map +1 -1
- package/dist-server/service/claim-order/claim-order-mutation.js +33 -44
- package/dist-server/service/claim-order/claim-order-mutation.js.map +1 -1
- package/dist-server/service/claim-order/claim-order-query.js +30 -41
- package/dist-server/service/claim-order/claim-order-query.js.map +1 -1
- package/dist-server/service/claim-order/claim-order-types.js +20 -28
- package/dist-server/service/claim-order/claim-order-types.js.map +1 -1
- package/dist-server/service/claim-order/claim-order.js +34 -42
- package/dist-server/service/claim-order/claim-order.js.map +1 -1
- package/dist-server/service/claim-order/index.js +3 -16
- package/dist-server/service/claim-order/index.js.map +1 -1
- package/dist-server/service/collection-order/collection-order-mutation.js +55 -69
- package/dist-server/service/collection-order/collection-order-mutation.js.map +1 -1
- package/dist-server/service/collection-order/collection-order-query.js +39 -50
- package/dist-server/service/collection-order/collection-order-query.js.map +1 -1
- package/dist-server/service/collection-order/collection-order-types.js +105 -113
- package/dist-server/service/collection-order/collection-order-types.js.map +1 -1
- package/dist-server/service/collection-order/collection-order.js +64 -72
- package/dist-server/service/collection-order/collection-order.js.map +1 -1
- package/dist-server/service/collection-order/index.js +3 -16
- package/dist-server/service/collection-order/index.js.map +1 -1
- package/dist-server/service/delivery-order/delivery-order-mutation.js +88 -102
- package/dist-server/service/delivery-order/delivery-order-mutation.js.map +1 -1
- package/dist-server/service/delivery-order/delivery-order-query.js +61 -72
- package/dist-server/service/delivery-order/delivery-order-query.js.map +1 -1
- package/dist-server/service/delivery-order/delivery-order-types.js +167 -175
- package/dist-server/service/delivery-order/delivery-order-types.js.map +1 -1
- package/dist-server/service/delivery-order/delivery-order.js +92 -100
- package/dist-server/service/delivery-order/delivery-order.js.map +1 -1
- package/dist-server/service/delivery-order/index.js +3 -16
- package/dist-server/service/delivery-order/index.js.map +1 -1
- package/dist-server/service/draft-release-good/draft-release-good-mutation.js +49 -63
- package/dist-server/service/draft-release-good/draft-release-good-mutation.js.map +1 -1
- package/dist-server/service/draft-release-good/draft-release-good-query.js +20 -31
- package/dist-server/service/draft-release-good/draft-release-good-query.js.map +1 -1
- package/dist-server/service/draft-release-good/draft-release-good-type.js +168 -176
- package/dist-server/service/draft-release-good/draft-release-good-type.js.map +1 -1
- package/dist-server/service/draft-release-good/draft-release-good.js +114 -122
- package/dist-server/service/draft-release-good/draft-release-good.js.map +1 -1
- package/dist-server/service/draft-release-good/index.js +3 -16
- package/dist-server/service/draft-release-good/index.js.map +1 -1
- package/dist-server/service/goods-receival-note/goods-receival-note-mutation.js +32 -43
- package/dist-server/service/goods-receival-note/goods-receival-note-mutation.js.map +1 -1
- package/dist-server/service/goods-receival-note/goods-receival-note-query.js +29 -40
- package/dist-server/service/goods-receival-note/goods-receival-note-query.js.map +1 -1
- package/dist-server/service/goods-receival-note/goods-receival-note-types.js +34 -42
- package/dist-server/service/goods-receival-note/goods-receival-note-types.js.map +1 -1
- package/dist-server/service/goods-receival-note/goods-receival-note.js +38 -46
- package/dist-server/service/goods-receival-note/goods-receival-note.js.map +1 -1
- package/dist-server/service/goods-receival-note/index.js +3 -16
- package/dist-server/service/goods-receival-note/index.js.map +1 -1
- package/dist-server/service/index.js +114 -127
- package/dist-server/service/index.js.map +1 -1
- package/dist-server/service/inventory-check/index.js +3 -16
- package/dist-server/service/inventory-check/index.js.map +1 -1
- package/dist-server/service/inventory-check/inventory-check-mutation.js +40 -51
- package/dist-server/service/inventory-check/inventory-check-mutation.js.map +1 -1
- package/dist-server/service/inventory-check/inventory-check-query.js +31 -42
- package/dist-server/service/inventory-check/inventory-check-query.js.map +1 -1
- package/dist-server/service/inventory-check/inventory-check-types.js +28 -36
- package/dist-server/service/inventory-check/inventory-check-types.js.map +1 -1
- package/dist-server/service/inventory-check/inventory-check.js +38 -46
- package/dist-server/service/inventory-check/inventory-check.js.map +1 -1
- package/dist-server/service/invoice/index.js +3 -16
- package/dist-server/service/invoice/index.js.map +1 -1
- package/dist-server/service/invoice/invoice-mutation.js +21 -32
- package/dist-server/service/invoice/invoice-mutation.js.map +1 -1
- package/dist-server/service/invoice/invoice-query.js +31 -42
- package/dist-server/service/invoice/invoice-query.js.map +1 -1
- package/dist-server/service/invoice/invoice-types.js +180 -188
- package/dist-server/service/invoice/invoice-types.js.map +1 -1
- package/dist-server/service/invoice/invoice.js +106 -114
- package/dist-server/service/invoice/invoice.js.map +1 -1
- package/dist-server/service/invoice-product/index.js +3 -16
- package/dist-server/service/invoice-product/index.js.map +1 -1
- package/dist-server/service/invoice-product/invoice-product-mutation.js +21 -32
- package/dist-server/service/invoice-product/invoice-product-mutation.js.map +1 -1
- package/dist-server/service/invoice-product/invoice-product-query.js +31 -42
- package/dist-server/service/invoice-product/invoice-product-query.js.map +1 -1
- package/dist-server/service/invoice-product/invoice-product-types.js +51 -59
- package/dist-server/service/invoice-product/invoice-product-types.js.map +1 -1
- package/dist-server/service/invoice-product/invoice-product.js +42 -50
- package/dist-server/service/invoice-product/invoice-product.js.map +1 -1
- package/dist-server/service/job-sheet/index.js +3 -16
- package/dist-server/service/job-sheet/index.js.map +1 -1
- package/dist-server/service/job-sheet/job-sheet-mutation.js +15 -26
- package/dist-server/service/job-sheet/job-sheet-mutation.js.map +1 -1
- package/dist-server/service/job-sheet/job-sheet-query.js +31 -42
- package/dist-server/service/job-sheet/job-sheet-query.js.map +1 -1
- package/dist-server/service/job-sheet/job-sheet-types.js +44 -52
- package/dist-server/service/job-sheet/job-sheet-types.js.map +1 -1
- package/dist-server/service/job-sheet/job-sheet.js +46 -54
- package/dist-server/service/job-sheet/job-sheet.js.map +1 -1
- package/dist-server/service/manifest/index.js.map +1 -1
- package/dist-server/service/manifest/manifest-mutation.js +21 -32
- package/dist-server/service/manifest/manifest-mutation.js.map +1 -1
- package/dist-server/service/manifest/manifest-query.js +29 -40
- package/dist-server/service/manifest/manifest-query.js.map +1 -1
- package/dist-server/service/manifest/manifest-type.js +46 -54
- package/dist-server/service/manifest/manifest-type.js.map +1 -1
- package/dist-server/service/manifest/manifest.js +34 -42
- package/dist-server/service/manifest/manifest.js.map +1 -1
- package/dist-server/service/order-inventory/index.js +3 -16
- package/dist-server/service/order-inventory/index.js.map +1 -1
- package/dist-server/service/order-inventory/order-inventory-mutation.js +20 -31
- package/dist-server/service/order-inventory/order-inventory-mutation.js.map +1 -1
- package/dist-server/service/order-inventory/order-inventory-query.js +80 -91
- package/dist-server/service/order-inventory/order-inventory-query.js.map +1 -1
- package/dist-server/service/order-inventory/order-inventory-types.js +150 -158
- package/dist-server/service/order-inventory/order-inventory-types.js.map +1 -1
- package/dist-server/service/order-inventory/order-inventory.js +186 -194
- package/dist-server/service/order-inventory/order-inventory.js.map +1 -1
- package/dist-server/service/order-product/index.js +3 -16
- package/dist-server/service/order-product/index.js.map +1 -1
- package/dist-server/service/order-product/order-product-mutation.js +21 -32
- package/dist-server/service/order-product/order-product-mutation.js.map +1 -1
- package/dist-server/service/order-product/order-product-query.js +31 -42
- package/dist-server/service/order-product/order-product-query.js.map +1 -1
- package/dist-server/service/order-product/order-product-types.js +213 -221
- package/dist-server/service/order-product/order-product-types.js.map +1 -1
- package/dist-server/service/order-product/order-product.js +158 -166
- package/dist-server/service/order-product/order-product.js.map +1 -1
- package/dist-server/service/order-tote/index.js +3 -16
- package/dist-server/service/order-tote/index.js.map +1 -1
- package/dist-server/service/order-tote/order-tote-mutation.js +14 -25
- package/dist-server/service/order-tote/order-tote-mutation.js.map +1 -1
- package/dist-server/service/order-tote/order-tote-query.js +23 -34
- package/dist-server/service/order-tote/order-tote-query.js.map +1 -1
- package/dist-server/service/order-tote/order-tote-types.js +26 -34
- package/dist-server/service/order-tote/order-tote-types.js.map +1 -1
- package/dist-server/service/order-tote/order-tote.js +28 -36
- package/dist-server/service/order-tote/order-tote.js.map +1 -1
- package/dist-server/service/order-tote-item/index.js +3 -16
- package/dist-server/service/order-tote-item/index.js.map +1 -1
- package/dist-server/service/order-tote-item/order-tote-item-mutation.js +14 -25
- package/dist-server/service/order-tote-item/order-tote-item-mutation.js.map +1 -1
- package/dist-server/service/order-tote-item/order-tote-item-query.js +16 -27
- package/dist-server/service/order-tote-item/order-tote-item-query.js.map +1 -1
- package/dist-server/service/order-tote-item/order-tote-item-types.js +32 -40
- package/dist-server/service/order-tote-item/order-tote-item-types.js.map +1 -1
- package/dist-server/service/order-tote-item/order-tote-item.js +34 -42
- package/dist-server/service/order-tote-item/order-tote-item.js.map +1 -1
- package/dist-server/service/order-tote-seal/index.js +3 -16
- package/dist-server/service/order-tote-seal/index.js.map +1 -1
- package/dist-server/service/order-tote-seal/order-tote-seal-mutation.js +14 -25
- package/dist-server/service/order-tote-seal/order-tote-seal-mutation.js.map +1 -1
- package/dist-server/service/order-tote-seal/order-tote-seal-query.js +31 -42
- package/dist-server/service/order-tote-seal/order-tote-seal-query.js.map +1 -1
- package/dist-server/service/order-tote-seal/order-tote-seal-types.js +22 -30
- package/dist-server/service/order-tote-seal/order-tote-seal-types.js.map +1 -1
- package/dist-server/service/order-tote-seal/order-tote-seal.js +20 -28
- package/dist-server/service/order-tote-seal/order-tote-seal.js.map +1 -1
- package/dist-server/service/order-vas/index.js +3 -16
- package/dist-server/service/order-vas/index.js.map +1 -1
- package/dist-server/service/order-vas/order-vas-mutation.js +9 -20
- package/dist-server/service/order-vas/order-vas-mutation.js.map +1 -1
- package/dist-server/service/order-vas/order-vas-query.js +30 -41
- package/dist-server/service/order-vas/order-vas-query.js.map +1 -1
- package/dist-server/service/order-vas/order-vas-types.js +102 -110
- package/dist-server/service/order-vas/order-vas-types.js.map +1 -1
- package/dist-server/service/order-vas/order-vas.js +102 -110
- package/dist-server/service/order-vas/order-vas.js.map +1 -1
- package/dist-server/service/others/index.js +2 -15
- package/dist-server/service/others/index.js.map +1 -1
- package/dist-server/service/others/other-query.js +42 -56
- package/dist-server/service/others/other-query.js.map +1 -1
- package/dist-server/service/others/other-types.js +67 -75
- package/dist-server/service/others/other-types.js.map +1 -1
- package/dist-server/service/purchase-order/index.js +3 -16
- package/dist-server/service/purchase-order/index.js.map +1 -1
- package/dist-server/service/purchase-order/purchase-order-mutation.js +43 -64
- package/dist-server/service/purchase-order/purchase-order-mutation.js.map +1 -1
- package/dist-server/service/purchase-order/purchase-order-query.js +31 -42
- package/dist-server/service/purchase-order/purchase-order-query.js.map +1 -1
- package/dist-server/service/purchase-order/purchase-order-types.js +98 -106
- package/dist-server/service/purchase-order/purchase-order-types.js.map +1 -1
- package/dist-server/service/purchase-order/purchase-order.js +78 -86
- package/dist-server/service/purchase-order/purchase-order.js.map +1 -1
- package/dist-server/service/purchase-order-other-charge/index.js +3 -16
- package/dist-server/service/purchase-order-other-charge/index.js.map +1 -1
- package/dist-server/service/purchase-order-other-charge/purchase-order-other-charge-mutation.js +14 -25
- package/dist-server/service/purchase-order-other-charge/purchase-order-other-charge-mutation.js.map +1 -1
- package/dist-server/service/purchase-order-other-charge/purchase-order-other-charge-query.js +30 -41
- package/dist-server/service/purchase-order-other-charge/purchase-order-other-charge-query.js.map +1 -1
- package/dist-server/service/purchase-order-other-charge/purchase-order-other-charge-types.js +26 -34
- package/dist-server/service/purchase-order-other-charge/purchase-order-other-charge-types.js.map +1 -1
- package/dist-server/service/purchase-order-other-charge/purchase-order-other-charge.js +32 -40
- package/dist-server/service/purchase-order-other-charge/purchase-order-other-charge.js.map +1 -1
- package/dist-server/service/release-good/index.js +3 -16
- package/dist-server/service/release-good/index.js.map +1 -1
- package/dist-server/service/release-good/release-good-mutation.js +70 -84
- package/dist-server/service/release-good/release-good-mutation.js.map +1 -1
- package/dist-server/service/release-good/release-good-query.js +58 -72
- package/dist-server/service/release-good/release-good-query.js.map +1 -1
- package/dist-server/service/release-good/release-good-types.js +340 -348
- package/dist-server/service/release-good/release-good-types.js.map +1 -1
- package/dist-server/service/release-good/release-good.js +194 -202
- package/dist-server/service/release-good/release-good.js.map +1 -1
- package/dist-server/service/retail-replenishment-order/index.js +3 -16
- package/dist-server/service/retail-replenishment-order/index.js.map +1 -1
- package/dist-server/service/retail-replenishment-order/retail-replenishment-order-mutation.js +52 -63
- package/dist-server/service/retail-replenishment-order/retail-replenishment-order-mutation.js.map +1 -1
- package/dist-server/service/retail-replenishment-order/retail-replenishment-order-query.js +30 -41
- package/dist-server/service/retail-replenishment-order/retail-replenishment-order-query.js.map +1 -1
- package/dist-server/service/retail-replenishment-order/retail-replenishment-order-types.js +60 -68
- package/dist-server/service/retail-replenishment-order/retail-replenishment-order-types.js.map +1 -1
- package/dist-server/service/retail-replenishment-order/retail-replenishment-order.js +48 -56
- package/dist-server/service/retail-replenishment-order/retail-replenishment-order.js.map +1 -1
- package/dist-server/service/return-order/index.js +3 -16
- package/dist-server/service/return-order/index.js.map +1 -1
- package/dist-server/service/return-order/return-order-mutation.js +47 -61
- package/dist-server/service/return-order/return-order-mutation.js.map +1 -1
- package/dist-server/service/return-order/return-order-query.js +45 -56
- package/dist-server/service/return-order/return-order-query.js.map +1 -1
- package/dist-server/service/return-order/return-order-types.js +117 -125
- package/dist-server/service/return-order/return-order-types.js.map +1 -1
- package/dist-server/service/return-order/return-order.js +56 -64
- package/dist-server/service/return-order/return-order.js.map +1 -1
- package/dist-server/service/reverse-kitting-order/index.js +3 -16
- package/dist-server/service/reverse-kitting-order/index.js.map +1 -1
- package/dist-server/service/reverse-kitting-order/reverse-kitting-order-mutation.js +58 -69
- package/dist-server/service/reverse-kitting-order/reverse-kitting-order-mutation.js.map +1 -1
- package/dist-server/service/reverse-kitting-order/reverse-kitting-order-query.js +43 -54
- package/dist-server/service/reverse-kitting-order/reverse-kitting-order-query.js.map +1 -1
- package/dist-server/service/reverse-kitting-order/reverse-kitting-order-type.js +94 -102
- package/dist-server/service/reverse-kitting-order/reverse-kitting-order-type.js.map +1 -1
- package/dist-server/service/reverse-kitting-order/reverse-kitting-order.js +54 -62
- package/dist-server/service/reverse-kitting-order/reverse-kitting-order.js.map +1 -1
- package/dist-server/service/reverse-kitting-order-inventory/index.js +3 -16
- package/dist-server/service/reverse-kitting-order-inventory/index.js.map +1 -1
- package/dist-server/service/reverse-kitting-order-inventory/reverse-kitting-order-inventory-mutation.js +33 -44
- package/dist-server/service/reverse-kitting-order-inventory/reverse-kitting-order-inventory-mutation.js.map +1 -1
- package/dist-server/service/reverse-kitting-order-inventory/reverse-kitting-order-inventory-query.js +29 -40
- package/dist-server/service/reverse-kitting-order-inventory/reverse-kitting-order-inventory-query.js.map +1 -1
- package/dist-server/service/reverse-kitting-order-inventory/reverse-kitting-order-inventory-type.js +58 -66
- package/dist-server/service/reverse-kitting-order-inventory/reverse-kitting-order-inventory-type.js.map +1 -1
- package/dist-server/service/reverse-kitting-order-inventory/reverse-kitting-order-inventory.js +62 -70
- package/dist-server/service/reverse-kitting-order-inventory/reverse-kitting-order-inventory.js.map +1 -1
- package/dist-server/service/shipping-order/index.js +3 -16
- package/dist-server/service/shipping-order/index.js.map +1 -1
- package/dist-server/service/shipping-order/shipping-order-mutation.js +21 -32
- package/dist-server/service/shipping-order/shipping-order-mutation.js.map +1 -1
- package/dist-server/service/shipping-order/shipping-order-query.js +31 -42
- package/dist-server/service/shipping-order/shipping-order-query.js.map +1 -1
- package/dist-server/service/shipping-order/shipping-order-types.js +46 -54
- package/dist-server/service/shipping-order/shipping-order-types.js.map +1 -1
- package/dist-server/service/shipping-order/shipping-order.js +50 -58
- package/dist-server/service/shipping-order/shipping-order.js.map +1 -1
- package/dist-server/service/transfer-order/index.js +3 -16
- package/dist-server/service/transfer-order/index.js.map +1 -1
- package/dist-server/service/transfer-order/transfer-order-mutation.js +45 -56
- package/dist-server/service/transfer-order/transfer-order-mutation.js.map +1 -1
- package/dist-server/service/transfer-order/transfer-order-query.js +31 -42
- package/dist-server/service/transfer-order/transfer-order-query.js.map +1 -1
- package/dist-server/service/transfer-order/transfer-order-types.js +60 -68
- package/dist-server/service/transfer-order/transfer-order-types.js.map +1 -1
- package/dist-server/service/transfer-order/transfer-order.js +50 -58
- package/dist-server/service/transfer-order/transfer-order.js.map +1 -1
- package/dist-server/service/vas/index.js +3 -16
- package/dist-server/service/vas/index.js.map +1 -1
- package/dist-server/service/vas/vas-mutation.js +33 -44
- package/dist-server/service/vas/vas-mutation.js.map +1 -1
- package/dist-server/service/vas/vas-query.js +31 -42
- package/dist-server/service/vas/vas-query.js.map +1 -1
- package/dist-server/service/vas/vas-types.js +44 -52
- package/dist-server/service/vas/vas-types.js.map +1 -1
- package/dist-server/service/vas/vas.js +38 -46
- package/dist-server/service/vas/vas.js.map +1 -1
- package/dist-server/service/vas-order/index.js +3 -16
- package/dist-server/service/vas-order/index.js.map +1 -1
- package/dist-server/service/vas-order/vas-order-mutation.js +33 -44
- package/dist-server/service/vas-order/vas-order-mutation.js.map +1 -1
- package/dist-server/service/vas-order/vas-order-query.js +39 -50
- package/dist-server/service/vas-order/vas-order-query.js.map +1 -1
- package/dist-server/service/vas-order/vas-order-types.js +28 -36
- package/dist-server/service/vas-order/vas-order-types.js.map +1 -1
- package/dist-server/service/vas-order/vas-order.js +34 -42
- package/dist-server/service/vas-order/vas-order.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -0
- package/dist-server/utils/index.js +3 -16
- package/dist-server/utils/index.js.map +1 -1
- package/dist-server/utils/inventory-util.js.map +1 -1
- package/dist-server/utils/order-no-generator.js.map +1 -1
- package/package.json +13 -13
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"other-query.js","sourceRoot":"","sources":["../../../server/service/others/other-query.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAAA,6DAAoC;AACpC,+CAAyE;AAIzE,uDAA0E;AAC1E,+DAAqE;AACrE,+DAAsE;AACtE,iDAAyD;AAEzD,2BAOY;AACZ,uCAA2C;AAG3C,IAAa,UAAU,GAAvB,MAAa,UAAU;IAIrB,KAAK,CAAC,2BAA2B,CACxB,OAAY,EACX,MAAiB;;QAEzB,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE,GAClC,OAAO,CAAC,KAAK,CAAA;QAEf,IAAI,kBAAkB,GAAe,MAAM,IAAA,gCAAqB,EAAC,MAAM,EAAE,IAAI,CAAC,CAAA;QAE9E,IAAI,UAAU,GAAQ,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,KAAK,aAAa,CAAC,CAAC,KAAK,CAAA;QACxF,IAAI,sBAAgC,CAAA;QACpC,IAAI,eAAyB,CAAA;QAE7B,IAAI,UAAU,EAAE;YACd,sBAAsB,GAAG,kBAAkB,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,IAAI,UAAU,CAAC,CAAA;YAE7E,IAAI,sBAAsB,EAAE;gBAC1B,IAAI,CAAC,CAAA,MAAA,sBAAsB,CAAC,OAAO,0CAAE,EAAE,CAAA,EAAE;oBACvC,sBAAsB,GAAG,MAAM,EAAE,CAAC,aAAa,CAAC,mBAAQ,CAAC,CAAC,OAAO,CAAC,sBAAsB,CAAC,EAAE,EAAE;wBAC3F,SAAS,EAAE,CAAC,SAAS,EAAE,gBAAgB,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GAAE,CAAA;IACL,mBAAA,IAAA,kBAAG,EAAC,mBAAmB,CAAC,CAAA;IACxB,mBAAA,IAAA,kBAAG,EAAC,kBAAkB,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,qBAAiB,CAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAA;;;;qFA0I1E;AAKD;IAHC,IAAA,wBAAS,EAAC,4DAA4D,CAAC;IACvE,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,oBAAK,EAAC,OAAO,CAAC,EAAE,CAAC,CAAC,yBAAqB,CAAC,CAAC;IAEvC,mBAAA,IAAA,kBAAG,GAAE,CAAA;IACL,mBAAA,IAAA,kBAAG,EAAC,mBAAmB,CAAC,CAAA;IACxB,mBAAA,IAAA,kBAAG,EAAC,eAAe,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,mBAAe,CAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAA;;;;iEA2HrE;AAID;IAHC,IAAA,wBAAS,EAAC,4DAA4D,CAAC;IACvE,IAAA,wBAAS,EAAC,cAAc,CAAC;IACzB,IAAA,oBAAK,EAAC,OAAO,CAAC,EAAE,CAAC,CAAC,yBAAqB,CAAC,CAAC;IAEvC,mBAAA,IAAA,kBAAG,GAAE,CAAA;IACL,mBAAA,IAAA,kBAAG,EAAC,mBAAmB,CAAC,CAAA;IACxB,mBAAA,IAAA,kBAAG,EAAC,eAAe,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,mBAAe,CAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAA;;;;mEA2HrE;AApgBU,UAAU;IADtB,IAAA,uBAAQ,GAAE;GACE,UAAU,CAqgBtB;AArgBY,gCAAU","sourcesContent":["import orderBy from 'lodash/orderBy'\nimport { Arg, Args, Ctx, Directive, Query, Resolver } from 'type-graphql'\nimport { EntityManager } from 'typeorm'\n\nimport { User } from '@things-factory/auth-base'\nimport { Bizplace, getPermittedBizplaces } from '@things-factory/biz-base'\nimport { Product, ProductDetail } from '@things-factory/product-base'\nimport { PartnerSetting, Setting } from '@things-factory/setting-base'\nimport { Domain, ListParam } from '@things-factory/shell'\n\nimport {\n InventoryProductGroup,\n InventoryProductGroupList,\n NewOrderInventory,\n NewOrderProduct,\n OrderInventory,\n OrderProduct\n} from '../'\nimport { InventoryUtil } from '../../utils'\n\n@Resolver()\nexport class OtherQuery {\n @Directive('@privilege(category: \"inventory\", privilege: \"query\")')\n @Directive('@transaction')\n @Query(returns => InventoryProductGroupList)\n async allBizplaceProductInventory(\n @Ctx() context: any,\n @Args() params: ListParam\n ): Promise<InventoryProductGroupList> {\n const { domain, user, tx, bizplace }: { domain: Domain; user: User; tx: EntityManager; bizplace: Bizplace } =\n context.state\n\n let permittedBizplaces: Bizplace[] = await getPermittedBizplaces(domain, user)\n\n let bizplaceId: any = params.filters.find(filter => filter.name === 'bizplace_id').value\n let foundPermittedBizplace: Bizplace\n let companyBizplace: Bizplace\n\n if (bizplaceId) {\n foundPermittedBizplace = permittedBizplaces.find(biz => biz.id == bizplaceId)\n\n if (foundPermittedBizplace) {\n if (!foundPermittedBizplace.company?.id) {\n foundPermittedBizplace = await tx.getRepository(Bizplace).findOne(foundPermittedBizplace.id, {\n relations: ['company', 'company.domain']\n })\n }\n const companyDomain: Domain = foundPermittedBizplace.company.domain\n companyBizplace = await tx.getRepository(Bizplace).findOne({ where: { domain: companyDomain } })\n }\n }\n\n const bizplaces: Bizplace[] = [foundPermittedBizplace, companyBizplace]\n if (bizplace) bizplaces.push(bizplace)\n\n const { items, total } = await InventoryUtil.bizplaceProductInventory(bizplaces, params, context, tx)\n\n return { items, total }\n }\n\n @Directive('@privilege(category: \"inventory\", privilege: \"query\")')\n @Directive('@transaction')\n @Query(returns => InventoryProductGroupList)\n async inventoryProductGroup(@Ctx() context: any, @Args() params: ListParam): Promise<InventoryProductGroupList> {\n const { domain, user, tx, bizplace }: { domain: Domain; user: User; tx: EntityManager; bizplace: Bizplace } =\n context.state\n\n let permittedBizplaces: Bizplace[] = await getPermittedBizplaces(domain, user)\n\n let bizplaceId: any = params.filters.find(filter => filter.name === 'bizplace_id').value\n let foundPermittedBizplace: Bizplace\n let companyBizplace: Bizplace\n\n if (bizplaceId) {\n foundPermittedBizplace = permittedBizplaces.find(biz => biz.id == bizplaceId)\n\n if (foundPermittedBizplace) {\n if (!foundPermittedBizplace.company?.id) {\n foundPermittedBizplace = await tx.getRepository(Bizplace).findOne(foundPermittedBizplace.id, {\n relations: ['company', 'company.domain']\n })\n }\n const companyDomain: Domain = foundPermittedBizplace.company.domain\n companyBizplace = await tx.getRepository(Bizplace).findOne({ where: { domain: companyDomain } })\n }\n }\n\n const bizplaces: Bizplace[] = [foundPermittedBizplace, companyBizplace]\n if (bizplace) bizplaces.push(bizplace)\n\n const { items, total } = await InventoryUtil.bizplaceInventoryProductGroup(bizplaces, params, context, tx)\n\n return { items, total }\n }\n\n @Directive('@transaction')\n @Query(returns => InventoryProductGroupList)\n async inventoryProductGroupOpenAPI(\n @Ctx() context: any,\n @Args() params: ListParam\n ): Promise<InventoryProductGroupList> {\n const { domain, user, tx, bizplace }: { domain: Domain; user: User; tx: EntityManager; bizplace: Bizplace } =\n context.state\n\n let permittedBizplaces: Bizplace[] = await getPermittedBizplaces(domain, user)\n\n let bizplaceId: any = params.filters.find(filter => filter.name === 'bizplace_id').value\n let foundPermittedBizplace: Bizplace\n let companyBizplace: Bizplace\n\n if (bizplaceId) {\n foundPermittedBizplace = permittedBizplaces.find(biz => biz.id == bizplaceId)\n\n if (foundPermittedBizplace) {\n if (!foundPermittedBizplace.company?.id) {\n foundPermittedBizplace = await tx.getRepository(Bizplace).findOne(foundPermittedBizplace.id, {\n relations: ['company', 'company.domain']\n })\n }\n const companyDomain: Domain = foundPermittedBizplace.company.domain\n companyBizplace = await tx.getRepository(Bizplace).findOne({ where: { domain: companyDomain } })\n }\n }\n\n const bizplaces: Bizplace[] = [foundPermittedBizplace, companyBizplace]\n if (bizplace) bizplaces.push(bizplace)\n\n const { items, total } = await InventoryUtil.inventoryProductGroupOpenAPI(bizplaces, params, context, tx)\n\n return { items, total }\n }\n\n @Directive('@privilege(category: \"order_customer\", privilege: \"query\")')\n @Directive('@transaction')\n @Query(returns => [OrderInventory])\n async bulkUploadValidateWarehousePartnersProductsQuantity(\n @Ctx() context: any,\n @Arg('partnerBizplaceId') partnerBizplaceId: string,\n @Arg('orderInventories', type => [NewOrderInventory], { nullable: true }) orderInventories?: NewOrderInventory[]\n ): Promise<OrderInventory[]> {\n const { domain, user, tx, bizplace } = context.state\n\n let permittedBizplaces: Bizplace[] = await getPermittedBizplaces(domain, user)\n let foundPermittedBizplace: Bizplace\n let companyBizplace: Bizplace\n\n const partnerBizplace: Bizplace = await tx.getRepository(Bizplace).findOne({\n where: {\n id: partnerBizplaceId\n },\n relations: ['company', 'company.domain']\n })\n\n if (partnerBizplaceId) {\n foundPermittedBizplace = permittedBizplaces.find(biz => biz.id == partnerBizplaceId)\n\n if (foundPermittedBizplace) {\n if (!foundPermittedBizplace.company?.id) {\n foundPermittedBizplace = await tx.getRepository(Bizplace).findOne(foundPermittedBizplace.id, {\n relations: ['company', 'company.domain']\n })\n }\n const companyDomain: Domain = foundPermittedBizplace.company.domain\n companyBizplace = await tx.getRepository(Bizplace).findOne({ where: { domain: companyDomain } })\n }\n }\n\n const bizplaces: Bizplace[] = [foundPermittedBizplace, companyBizplace]\n if (bizplace) bizplaces.push(bizplace)\n\n let newOrderInventories: any[] = []\n\n for (var i = 0; i < orderInventories.length; i++) {\n const orderInventory: any = orderInventories[i]\n\n let filters: any[] = [\n {\n name: 'productName',\n operator: 'eq',\n value: orderInventory.productSKU\n }\n ]\n\n if (orderInventory?.packingType != null) {\n filters.push({\n name: 'packingType',\n operator: 'eq',\n value: orderInventory.packingType\n })\n }\n\n const params: any = {\n filters: [...filters]\n }\n\n const { items, total } = await InventoryUtil.bizplaceInventoryProductGroup(bizplaces, params, context, tx)\n\n let packageUomValue = total > 0 ? items[0].remainUomValue / items[0].remainQty : null\n\n const newOrderInventory: any = {\n product:\n total > 0 ? { id: items[0].productId, sku: items[0].productSKU, name: items[0].productName } : { id: null },\n inventory:\n total > 0\n ? {\n ...items[0],\n remainQty: total > 0 ? items[0].remainQty : null,\n remainUomValue: total > 0 ? items[0].remainUomValue : null,\n remainUomValueWithUom: total > 0 ? items[0].remainUomValueWithUom : ''\n }\n : null,\n productId: total > 0 ? items[0].productId : null,\n productSKU: total > 0 ? items[0].productSKU : orderInventory.productSKU,\n productName: total > 0 ? items[0].productName : null,\n uom: total > 0 ? items[0].uom : null,\n remainQty: total > 0 ? items[0].remainQty : null,\n remainUomValue: total > 0 ? items[0].remainUomValue : null,\n remainUomValueWithUom: total > 0 ? items[0].remainUomValueWithUom : '',\n batchId: total > 0 ? items[0].batchId : null,\n batchIdRef: total > 0 ? items[0].batchIdRef : null,\n packingType: total > 0 ? items[0].packingType : orderInventory.packingType,\n packingSize: total > 0 ? items[0].packingSize : 1,\n releaseQty: orderInventory.releaseQty\n ? Number.isInteger(orderInventory.releaseQty)\n ? orderInventory.releaseQty\n : null\n : null,\n releaseUomValue:\n total > 0\n ? Number.isInteger(orderInventory.releaseQty)\n ? parseFloat((orderInventory.releaseQty * packageUomValue).toFixed(2))\n : null\n : null,\n groupType: total > 0 ? items[0].groupType : null,\n isError: total <= 0 ? true : false\n }\n\n newOrderInventories.push(newOrderInventory)\n }\n\n try {\n await InventoryUtil.validateWarehousePartnersProductsQuantity(\n domain,\n partnerBizplace,\n newOrderInventories,\n context,\n tx\n )\n } catch (e) {\n const errorData = JSON.parse(e.detail.data)\n\n errorData.forEach(dt => {\n let idx = newOrderInventories.findIndex(\n x =>\n x.product?.id && x.product.id == dt.productId && x.batchId == dt.batchId && x.packingType == dt.packingType\n )\n\n if (idx >= 0) {\n newOrderInventories[idx].remainQty = dt.availableQty\n newOrderInventories[idx].remainUomValue = dt.availableUomValue\n newOrderInventories[idx].isError =\n dt.availableQty == null\n ? newOrderInventories[idx].releaseQty > 0\n : newOrderInventories[idx].releaseQty > dt.availableQty\n newOrderInventories[idx].remainUomValueWithUom =\n dt.availableUomValue == null ? '' : `${dt.availableUomValue} ${dt.uom}`\n if (newOrderInventories[idx].inventory != null) {\n newOrderInventories[idx].inventory.remainQty = dt.availableQty\n newOrderInventories[idx].inventory.remainUomValue = dt.availableUomValue\n newOrderInventories[idx].inventory.remainUomValueWithUom = `${dt.availableUomValue} ${dt.uom}` || ''\n }\n }\n })\n }\n\n return orderBy(newOrderInventories, ['isError'], ['desc'])\n }\n\n @Directive('@privilege(category: \"order_customer\", privilege: \"query\")')\n @Directive('@transaction')\n @Query(returns => [InventoryProductGroup])\n async bulkUploadValidateOrderProducts(\n @Ctx() context: any,\n @Arg('partnerBizplaceId') partnerBizplaceId: string,\n @Arg('orderProducts', type => [NewOrderProduct], { nullable: true }) orderProducts: NewOrderProduct[]\n ): Promise<OrderProduct[]> {\n const { domain, user, tx, bizplace }: { domain: Domain; user: User; tx: EntityManager; bizplace: Bizplace } =\n context.state\n\n const productDetailRepo = tx.getRepository(ProductDetail)\n\n let permittedBizplaces: Bizplace[] = await getPermittedBizplaces(domain, user)\n let foundPermittedBizplace: Bizplace\n let companyBizplace: Bizplace\n\n if (partnerBizplaceId) {\n foundPermittedBizplace = permittedBizplaces.find(biz => biz.id == partnerBizplaceId)\n\n if (foundPermittedBizplace) {\n if (!foundPermittedBizplace.company?.id) {\n foundPermittedBizplace = await tx.getRepository(Bizplace).findOne(foundPermittedBizplace.id, {\n relations: ['domain', 'company', 'company.domain']\n })\n }\n const companyDomain: Domain = foundPermittedBizplace.company.domain\n companyBizplace = await tx.getRepository(Bizplace).findOne({ where: { domain: companyDomain } })\n }\n }\n\n const bizplaces: Bizplace[] = [foundPermittedBizplace, companyBizplace]\n if (bizplace) bizplaces.push(bizplace)\n\n let strictProduct: boolean = false\n\n const strictProductSelectionSetting: Setting = await tx.getRepository(Setting).findOne({\n where: { domain, category: 'id-rule', name: 'strict-product-selection' }\n })\n\n if (strictProductSelectionSetting) strictProduct = strictProductSelectionSetting.value\n\n const partnerStrictProductSelectionSetting: PartnerSetting = await tx.getRepository(PartnerSetting).findOne({\n where: { setting: strictProductSelectionSetting, domain, partnerDomain: foundPermittedBizplace?.domain }\n })\n\n if (partnerStrictProductSelectionSetting) strictProduct = partnerStrictProductSelectionSetting.value\n\n let newOrderProducts: any[] = []\n\n for (var i = 0; i < orderProducts.length; i++) {\n const orderProduct = orderProducts[i]\n const productSKU: string = orderProduct.productSKU\n const foundProduct: Product = await tx.getRepository(Product).findOne({\n where: {\n sku: productSKU,\n bizplace: companyBizplace\n }\n })\n\n let newOrderProduct: any\n\n if (foundProduct) {\n let productDetail: ProductDetail\n const hasConditions: boolean = Boolean(\n (orderProduct?.packingType && orderProduct?.packingType.trim() != '') ||\n (orderProduct?.uom && orderProduct?.uom.trim() != '')\n )\n let productDetailCondition: any = { product: foundProduct }\n\n if (hasConditions) {\n if (orderProduct?.packingType && orderProduct.packingType.trim() != '')\n productDetailCondition.packingType = orderProduct.packingType.trim()\n\n if (orderProduct?.uom && orderProduct.uom.trim() != '') productDetailCondition.uom = orderProduct.uom.trim()\n } else {\n productDetailCondition.isDefault = true\n }\n\n productDetail = await productDetailRepo.findOne({\n where: productDetailCondition\n })\n\n const uomValue: number =\n strictProduct == true\n ? productDetail?.uomValue\n ? productDetail.uomValue\n : null\n : orderProduct?.uomValue\n ? orderProduct.uomValue\n : productDetail.uomValue\n\n newOrderProduct = {\n ...orderProduct,\n packingType: orderProduct?.packingType ? orderProduct.packingType : productDetail.packingType,\n packingSize: productDetail?.packingSize ? productDetail.packingSize : null,\n uom: productDetail?.uom ? productDetail.uom : null,\n uomValue: uomValue,\n productName: `${foundProduct.name}(${foundProduct.description}(${foundProduct.sku}))`,\n productBrand: foundProduct?.brand ? foundProduct.brand : null,\n isError: productDetail ? false : true,\n product: {\n id: foundProduct.id,\n name: foundProduct.name,\n sku: foundProduct.sku,\n type: foundProduct.type,\n brand: foundProduct.brand,\n primaryUnit: productDetail?.uom ? productDetail.uom : null,\n primaryValue: productDetail?.uomValue ? productDetail.uomValue : null\n },\n totalUomValue:\n orderProduct.packQty > 0\n ? uomValue\n ? `${(orderProduct.packQty * uomValue).toFixed(2)} ${productDetail.uom}`\n : null\n : null\n }\n } else {\n newOrderProduct = {\n ...orderProduct,\n productName: orderProduct.productSKU,\n isError: true\n }\n }\n\n newOrderProducts.push(newOrderProduct)\n }\n\n return newOrderProducts\n }\n @Directive('@privilege(category: \"order_customer\", privilege: \"query\")')\n @Directive('@transaction')\n @Query(returns => [InventoryProductGroup])\n async bulkUploadValidatePoOrderProducts(\n @Ctx() context: any,\n @Arg('partnerBizplaceId') partnerBizplaceId: string,\n @Arg('orderProducts', type => [NewOrderProduct], { nullable: true }) orderProducts: NewOrderProduct[]\n ): Promise<OrderProduct[]> {\n const { domain, user, tx, bizplace }: { domain: Domain; user: User; tx: EntityManager; bizplace: Bizplace } =\n context.state\n\n const productDetailRepo = tx.getRepository(ProductDetail)\n\n let permittedBizplaces: Bizplace[] = await getPermittedBizplaces(domain, user)\n let foundPermittedBizplace: Bizplace\n let companyBizplace: Bizplace\n\n if (partnerBizplaceId) {\n foundPermittedBizplace = permittedBizplaces.find(biz => biz.id == partnerBizplaceId)\n\n if (foundPermittedBizplace) {\n if (!foundPermittedBizplace.company?.id) {\n foundPermittedBizplace = await tx.getRepository(Bizplace).findOne(foundPermittedBizplace.id, {\n relations: ['domain', 'company', 'company.domain']\n })\n }\n const companyDomain: Domain = foundPermittedBizplace.company.domain\n companyBizplace = await tx.getRepository(Bizplace).findOne({ where: { domain: companyDomain } })\n }\n }\n\n const bizplaces: Bizplace[] = [foundPermittedBizplace, companyBizplace]\n if (bizplace) bizplaces.push(bizplace)\n\n let strictProduct: boolean = false\n\n const strictProductSelectionSetting: Setting = await tx.getRepository(Setting).findOne({\n where: { domain, category: 'id-rule', name: 'strict-product-selection' }\n })\n\n if (strictProductSelectionSetting) strictProduct = strictProductSelectionSetting.value\n\n const partnerStrictProductSelectionSetting: PartnerSetting = await tx.getRepository(PartnerSetting).findOne({\n where: { setting: strictProductSelectionSetting, domain, partnerDomain: foundPermittedBizplace?.domain }\n })\n\n if (partnerStrictProductSelectionSetting) strictProduct = partnerStrictProductSelectionSetting.value\n\n let newOrderProducts: any[] = []\n\n for (var i = 0; i < orderProducts.length; i++) {\n const orderProduct = orderProducts[i]\n const productSKU: string = orderProduct.productSKU\n const foundProduct: Product = await tx.getRepository(Product).findOne({\n where: {\n sku: productSKU,\n bizplace: companyBizplace\n }\n })\n\n let newOrderProduct: any\n\n if (foundProduct) {\n let productDetail: ProductDetail\n const hasConditions: boolean = Boolean(\n (orderProduct?.packingType && orderProduct?.packingType.trim() != '') ||\n (orderProduct?.uom && orderProduct?.uom.trim() != '')\n )\n let productDetailCondition: any = { product: foundProduct }\n\n if (hasConditions) {\n if (orderProduct?.packingType && orderProduct.packingType.trim() != '')\n productDetailCondition.packingType = orderProduct.packingType.trim()\n\n if (orderProduct?.uom && orderProduct.uom.trim() != '') productDetailCondition.uom = orderProduct.uom.trim()\n } else {\n productDetailCondition.isDefault = true\n }\n\n productDetail = await productDetailRepo.findOne({\n where: productDetailCondition\n })\n\n const uomValue: number =\n strictProduct == true\n ? productDetail?.uomValue\n ? productDetail.uomValue\n : null\n : orderProduct?.uomValue\n ? orderProduct.uomValue\n : productDetail.uomValue\n\n newOrderProduct = {\n ...orderProduct,\n packingType: orderProduct?.packingType ? orderProduct.packingType : productDetail.packingType,\n packingSize: productDetail?.packingSize ? productDetail.packingSize : null,\n uom: productDetail?.uom ? productDetail.uom : null,\n uomValue: uomValue,\n productName: `${foundProduct.name}(${foundProduct.description}(${foundProduct.sku}))`,\n productBrand: foundProduct?.brand ? foundProduct.brand : null,\n isError: productDetail ? false : true,\n product: {\n id: foundProduct.id,\n name: foundProduct.name,\n sku: foundProduct.sku,\n type: foundProduct.type,\n brand: foundProduct.brand,\n primaryUnit: productDetail?.uom ? productDetail.uom : null,\n primaryValue: productDetail?.uomValue ? productDetail.uomValue : null\n },\n totalUomValue:\n orderProduct.packQty > 0\n ? uomValue\n ? `${(orderProduct.packQty * uomValue).toFixed(2)} ${productDetail.uom}`\n : null\n : null\n }\n } else {\n newOrderProduct = {\n ...orderProduct,\n productName: orderProduct.productSKU,\n isError: true\n }\n }\n\n newOrderProducts.push(newOrderProduct)\n }\n\n return newOrderProducts\n }\n}\n"]}
|
|
@@ -1,156 +1,148 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
2
|
var _a;
|
|
12
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
4
|
exports.InventoryProductGroup = exports.InventoryProductGroupList = void 0;
|
|
5
|
+
const tslib_1 = require("tslib");
|
|
14
6
|
const type_graphql_1 = require("type-graphql");
|
|
15
7
|
const product_base_1 = require("@things-factory/product-base");
|
|
16
8
|
const shell_1 = require("@things-factory/shell");
|
|
17
9
|
let InventoryProductGroupList = class InventoryProductGroupList {
|
|
18
10
|
};
|
|
19
|
-
__decorate([
|
|
11
|
+
tslib_1.__decorate([
|
|
20
12
|
(0, type_graphql_1.Field)(type => [InventoryProductGroup], { nullable: true }),
|
|
21
|
-
__metadata("design:type", Array)
|
|
13
|
+
tslib_1.__metadata("design:type", Array)
|
|
22
14
|
], InventoryProductGroupList.prototype, "items", void 0);
|
|
23
|
-
__decorate([
|
|
15
|
+
tslib_1.__decorate([
|
|
24
16
|
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true }),
|
|
25
|
-
__metadata("design:type", Number)
|
|
17
|
+
tslib_1.__metadata("design:type", Number)
|
|
26
18
|
], InventoryProductGroupList.prototype, "total", void 0);
|
|
27
|
-
InventoryProductGroupList = __decorate([
|
|
19
|
+
InventoryProductGroupList = tslib_1.__decorate([
|
|
28
20
|
(0, type_graphql_1.ObjectType)()
|
|
29
21
|
], InventoryProductGroupList);
|
|
30
22
|
exports.InventoryProductGroupList = InventoryProductGroupList;
|
|
31
23
|
let InventoryProductGroup = class InventoryProductGroup {
|
|
32
24
|
};
|
|
33
|
-
__decorate([
|
|
25
|
+
tslib_1.__decorate([
|
|
34
26
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
35
|
-
__metadata("design:type", String)
|
|
27
|
+
tslib_1.__metadata("design:type", String)
|
|
36
28
|
], InventoryProductGroup.prototype, "id", void 0);
|
|
37
|
-
__decorate([
|
|
29
|
+
tslib_1.__decorate([
|
|
38
30
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
39
|
-
__metadata("design:type", String)
|
|
31
|
+
tslib_1.__metadata("design:type", String)
|
|
40
32
|
], InventoryProductGroup.prototype, "productId", void 0);
|
|
41
|
-
__decorate([
|
|
33
|
+
tslib_1.__decorate([
|
|
42
34
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
43
|
-
__metadata("design:type", String)
|
|
35
|
+
tslib_1.__metadata("design:type", String)
|
|
44
36
|
], InventoryProductGroup.prototype, "batchId", void 0);
|
|
45
|
-
__decorate([
|
|
37
|
+
tslib_1.__decorate([
|
|
46
38
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
47
|
-
__metadata("design:type", String)
|
|
39
|
+
tslib_1.__metadata("design:type", String)
|
|
48
40
|
], InventoryProductGroup.prototype, "batchIdRef", void 0);
|
|
49
|
-
__decorate([
|
|
41
|
+
tslib_1.__decorate([
|
|
50
42
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
51
|
-
__metadata("design:type", String)
|
|
43
|
+
tslib_1.__metadata("design:type", String)
|
|
52
44
|
], InventoryProductGroup.prototype, "productSKU", void 0);
|
|
53
|
-
__decorate([
|
|
45
|
+
tslib_1.__decorate([
|
|
54
46
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
55
|
-
__metadata("design:type", String)
|
|
47
|
+
tslib_1.__metadata("design:type", String)
|
|
56
48
|
], InventoryProductGroup.prototype, "productName", void 0);
|
|
57
|
-
__decorate([
|
|
49
|
+
tslib_1.__decorate([
|
|
58
50
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
59
|
-
__metadata("design:type", String)
|
|
51
|
+
tslib_1.__metadata("design:type", String)
|
|
60
52
|
], InventoryProductGroup.prototype, "productBrand", void 0);
|
|
61
|
-
__decorate([
|
|
53
|
+
tslib_1.__decorate([
|
|
62
54
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
63
|
-
__metadata("design:type", String)
|
|
55
|
+
tslib_1.__metadata("design:type", String)
|
|
64
56
|
], InventoryProductGroup.prototype, "packingType", void 0);
|
|
65
|
-
__decorate([
|
|
57
|
+
tslib_1.__decorate([
|
|
66
58
|
(0, type_graphql_1.Field)(type => type_graphql_1.Float, { nullable: true }),
|
|
67
|
-
__metadata("design:type", Number)
|
|
59
|
+
tslib_1.__metadata("design:type", Number)
|
|
68
60
|
], InventoryProductGroup.prototype, "packingSize", void 0);
|
|
69
|
-
__decorate([
|
|
61
|
+
tslib_1.__decorate([
|
|
70
62
|
(0, type_graphql_1.Field)(type => type_graphql_1.Float, { nullable: true }),
|
|
71
|
-
__metadata("design:type", Number)
|
|
63
|
+
tslib_1.__metadata("design:type", Number)
|
|
72
64
|
], InventoryProductGroup.prototype, "packQty", void 0);
|
|
73
|
-
__decorate([
|
|
65
|
+
tslib_1.__decorate([
|
|
74
66
|
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true }),
|
|
75
|
-
__metadata("design:type", Number)
|
|
67
|
+
tslib_1.__metadata("design:type", Number)
|
|
76
68
|
], InventoryProductGroup.prototype, "totalQty", void 0);
|
|
77
|
-
__decorate([
|
|
69
|
+
tslib_1.__decorate([
|
|
78
70
|
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true }),
|
|
79
|
-
__metadata("design:type", Number)
|
|
71
|
+
tslib_1.__metadata("design:type", Number)
|
|
80
72
|
], InventoryProductGroup.prototype, "totalLockedQty", void 0);
|
|
81
|
-
__decorate([
|
|
73
|
+
tslib_1.__decorate([
|
|
82
74
|
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true }),
|
|
83
|
-
__metadata("design:type", Number)
|
|
75
|
+
tslib_1.__metadata("design:type", Number)
|
|
84
76
|
], InventoryProductGroup.prototype, "totalLockedUomValue", void 0);
|
|
85
|
-
__decorate([
|
|
77
|
+
tslib_1.__decorate([
|
|
86
78
|
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true }),
|
|
87
|
-
__metadata("design:type", Number)
|
|
79
|
+
tslib_1.__metadata("design:type", Number)
|
|
88
80
|
], InventoryProductGroup.prototype, "palletQty", void 0);
|
|
89
|
-
__decorate([
|
|
81
|
+
tslib_1.__decorate([
|
|
90
82
|
(0, type_graphql_1.Field)(type => type_graphql_1.Float, { nullable: true }),
|
|
91
|
-
__metadata("design:type", Number)
|
|
83
|
+
tslib_1.__metadata("design:type", Number)
|
|
92
84
|
], InventoryProductGroup.prototype, "remainQty", void 0);
|
|
93
|
-
__decorate([
|
|
85
|
+
tslib_1.__decorate([
|
|
94
86
|
(0, type_graphql_1.Field)(type => type_graphql_1.Float, { nullable: true }),
|
|
95
|
-
__metadata("design:type", Number)
|
|
87
|
+
tslib_1.__metadata("design:type", Number)
|
|
96
88
|
], InventoryProductGroup.prototype, "remainWeight", void 0);
|
|
97
|
-
__decorate([
|
|
89
|
+
tslib_1.__decorate([
|
|
98
90
|
(0, type_graphql_1.Field)(type => type_graphql_1.Float, { nullable: true }),
|
|
99
|
-
__metadata("design:type", Number)
|
|
91
|
+
tslib_1.__metadata("design:type", Number)
|
|
100
92
|
], InventoryProductGroup.prototype, "remainUomValue", void 0);
|
|
101
|
-
__decorate([
|
|
93
|
+
tslib_1.__decorate([
|
|
102
94
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
103
|
-
__metadata("design:type", String)
|
|
95
|
+
tslib_1.__metadata("design:type", String)
|
|
104
96
|
], InventoryProductGroup.prototype, "remainUomValueWithUom", void 0);
|
|
105
|
-
__decorate([
|
|
97
|
+
tslib_1.__decorate([
|
|
106
98
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
107
|
-
__metadata("design:type", String)
|
|
99
|
+
tslib_1.__metadata("design:type", String)
|
|
108
100
|
], InventoryProductGroup.prototype, "uom", void 0);
|
|
109
|
-
__decorate([
|
|
101
|
+
tslib_1.__decorate([
|
|
110
102
|
(0, type_graphql_1.Field)(type => type_graphql_1.Float, { nullable: true }),
|
|
111
|
-
__metadata("design:type", Number)
|
|
103
|
+
tslib_1.__metadata("design:type", Number)
|
|
112
104
|
], InventoryProductGroup.prototype, "uomValue", void 0);
|
|
113
|
-
__decorate([
|
|
105
|
+
tslib_1.__decorate([
|
|
114
106
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
115
|
-
__metadata("design:type", String)
|
|
107
|
+
tslib_1.__metadata("design:type", String)
|
|
116
108
|
], InventoryProductGroup.prototype, "totalUomValue", void 0);
|
|
117
|
-
__decorate([
|
|
109
|
+
tslib_1.__decorate([
|
|
118
110
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
119
|
-
__metadata("design:type", String)
|
|
111
|
+
tslib_1.__metadata("design:type", String)
|
|
120
112
|
], InventoryProductGroup.prototype, "groupType", void 0);
|
|
121
|
-
__decorate([
|
|
113
|
+
tslib_1.__decorate([
|
|
122
114
|
(0, type_graphql_1.Field)(type => shell_1.ScalarDate, { nullable: true }),
|
|
123
|
-
__metadata("design:type", Date)
|
|
115
|
+
tslib_1.__metadata("design:type", Date)
|
|
124
116
|
], InventoryProductGroup.prototype, "manufactureDate", void 0);
|
|
125
|
-
__decorate([
|
|
117
|
+
tslib_1.__decorate([
|
|
126
118
|
(0, type_graphql_1.Field)(type => type_graphql_1.Float, { nullable: true }),
|
|
127
|
-
__metadata("design:type", Number)
|
|
119
|
+
tslib_1.__metadata("design:type", Number)
|
|
128
120
|
], InventoryProductGroup.prototype, "unitPrice", void 0);
|
|
129
|
-
__decorate([
|
|
121
|
+
tslib_1.__decorate([
|
|
130
122
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
131
|
-
__metadata("design:type", String)
|
|
123
|
+
tslib_1.__metadata("design:type", String)
|
|
132
124
|
], InventoryProductGroup.prototype, "remark", void 0);
|
|
133
|
-
__decorate([
|
|
125
|
+
tslib_1.__decorate([
|
|
134
126
|
(0, type_graphql_1.Field)(type => type_graphql_1.Float, { nullable: true }),
|
|
135
|
-
__metadata("design:type", Number)
|
|
127
|
+
tslib_1.__metadata("design:type", Number)
|
|
136
128
|
], InventoryProductGroup.prototype, "discountAmt", void 0);
|
|
137
|
-
__decorate([
|
|
129
|
+
tslib_1.__decorate([
|
|
138
130
|
(0, type_graphql_1.Field)(type => type_graphql_1.Float, { nullable: true }),
|
|
139
|
-
__metadata("design:type", Number)
|
|
131
|
+
tslib_1.__metadata("design:type", Number)
|
|
140
132
|
], InventoryProductGroup.prototype, "miscAmt", void 0);
|
|
141
|
-
__decorate([
|
|
133
|
+
tslib_1.__decorate([
|
|
142
134
|
(0, type_graphql_1.Field)(type => type_graphql_1.Float, { nullable: true }),
|
|
143
|
-
__metadata("design:type", Number)
|
|
135
|
+
tslib_1.__metadata("design:type", Number)
|
|
144
136
|
], InventoryProductGroup.prototype, "taxRate", void 0);
|
|
145
|
-
__decorate([
|
|
137
|
+
tslib_1.__decorate([
|
|
146
138
|
(0, type_graphql_1.Field)(type => type_graphql_1.Float, { nullable: true }),
|
|
147
|
-
__metadata("design:type", Boolean)
|
|
139
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
148
140
|
], InventoryProductGroup.prototype, "isError", void 0);
|
|
149
|
-
__decorate([
|
|
141
|
+
tslib_1.__decorate([
|
|
150
142
|
(0, type_graphql_1.Field)(type => product_base_1.Product, { nullable: true }),
|
|
151
|
-
__metadata("design:type", typeof (_a = typeof product_base_1.Product !== "undefined" && product_base_1.Product) === "function" ? _a : Object)
|
|
143
|
+
tslib_1.__metadata("design:type", typeof (_a = typeof product_base_1.Product !== "undefined" && product_base_1.Product) === "function" ? _a : Object)
|
|
152
144
|
], InventoryProductGroup.prototype, "product", void 0);
|
|
153
|
-
InventoryProductGroup = __decorate([
|
|
145
|
+
InventoryProductGroup = tslib_1.__decorate([
|
|
154
146
|
(0, type_graphql_1.ObjectType)()
|
|
155
147
|
], InventoryProductGroup);
|
|
156
148
|
exports.InventoryProductGroup = InventoryProductGroup;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"other-types.js","sourceRoot":"","sources":["../../../server/service/others/other-types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"other-types.js","sourceRoot":"","sources":["../../../server/service/others/other-types.ts"],"names":[],"mappings":";;;;;AAAA,+CAKqB;AAErB,+DAAsD;AACtD,iDAAkD;AAGlD,IAAa,yBAAyB,GAAtC,MAAa,yBAAyB;CAMrC,CAAA;AAJC;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,qBAAqB,CAAC,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wDAC7B;AAG9B;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wDAC1B;AALF,yBAAyB;IADrC,IAAA,yBAAU,GA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C;;qDACZ;AAGd;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,oBAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0DACtB;AAGnB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,oBAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sDAC1B;AAGf;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,oBAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sDAC1B;AAGf;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,oBAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCAChC,OAAO;sDAAA;AAGhB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,sBAAO,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;0DAClC,sBAAO,oBAAP,sBAAO;sDAAA;AAzFL,qBAAqB;IADjC,IAAA,yBAAU,GAAE;GACA,qBAAqB,CA0FjC;AA1FY,sDAAqB","sourcesContent":["import {\n Field,\n Float,\n Int,\n ObjectType\n} from 'type-graphql'\n\nimport { Product } from '@things-factory/product-base'\nimport { ScalarDate } from '@things-factory/shell'\n\n@ObjectType()\nexport class InventoryProductGroupList {\n @Field(type => [InventoryProductGroup], { nullable: true })\n items: InventoryProductGroup[]\n\n @Field(type => Int, { nullable: true })\n total: number\n}\n\n@ObjectType()\nexport class InventoryProductGroup {\n @Field({ nullable: true })\n id: string\n\n @Field({ nullable: true })\n productId: string\n\n @Field({ nullable: true })\n batchId: string\n\n @Field({ nullable: true })\n batchIdRef: string\n\n @Field({ nullable: true })\n productSKU: string\n\n @Field({ nullable: true })\n productName: string\n\n @Field({ nullable: true })\n productBrand: string\n\n @Field({ nullable: true })\n packingType: string\n\n @Field(type => Float, { nullable: true })\n packingSize: number\n\n @Field(type => Float, { nullable: true })\n packQty: number\n\n @Field(type => Int, { nullable: true })\n totalQty: number\n\n @Field(type => Int, { nullable: true })\n totalLockedQty: number\n\n @Field(type => Int, { nullable: true })\n totalLockedUomValue: number\n\n @Field(type => Int, { nullable: true })\n palletQty: number\n\n @Field(type => Float, { nullable: true })\n remainQty: number\n\n @Field(type => Float, { nullable: true })\n remainWeight: number\n\n @Field(type => Float, { nullable: true })\n remainUomValue: number\n\n @Field({ nullable: true })\n remainUomValueWithUom: string\n\n @Field({ nullable: true })\n uom: string\n\n @Field(type => Float, { nullable: true })\n uomValue: number\n\n @Field({ nullable: true })\n totalUomValue: String\n\n @Field({ nullable: true })\n groupType: string\n\n @Field(type => ScalarDate, { nullable: true })\n manufactureDate: Date\n\n @Field(type => Float, { nullable: true })\n unitPrice: number\n\n @Field({ nullable: true })\n remark: string\n\n @Field(type => Float, { nullable: true })\n discountAmt: number\n\n @Field(type => Float, { nullable: true })\n miscAmt: number\n\n @Field(type => Float, { nullable: true })\n taxRate: number\n\n @Field(type => Float, { nullable: true })\n isError: Boolean\n\n @Field(type => Product, { nullable: true })\n product: Product\n}\n"]}
|
|
@@ -1,25 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
3
|
exports.resolvers = exports.entities = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
18
5
|
const purchase_order_1 = require("./purchase-order");
|
|
19
6
|
const purchase_order_mutation_1 = require("./purchase-order-mutation");
|
|
20
7
|
const purchase_order_query_1 = require("./purchase-order-query");
|
|
21
8
|
exports.entities = [purchase_order_1.PurchaseOrder];
|
|
22
9
|
exports.resolvers = [purchase_order_query_1.PurchaseOrderQuery, purchase_order_mutation_1.PurchaseOrderMutation];
|
|
23
|
-
__exportStar(require("./purchase-order-mutation"), exports);
|
|
24
|
-
__exportStar(require("./purchase-order-query"), exports);
|
|
10
|
+
tslib_1.__exportStar(require("./purchase-order-mutation"), exports);
|
|
11
|
+
tslib_1.__exportStar(require("./purchase-order-query"), exports);
|
|
25
12
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/purchase-order/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/purchase-order/index.ts"],"names":[],"mappings":";;;;AAAA,qDAAgD;AAChD,uEAAiE;AACjE,iEAA2D;AAE9C,QAAA,QAAQ,GAAG,CAAC,8BAAa,CAAC,CAAA;AAC1B,QAAA,SAAS,GAAG,CAAC,yCAAkB,EAAE,+CAAqB,CAAC,CAAA;AAEpE,oEAAyC;AACzC,iEAAsC","sourcesContent":["import { PurchaseOrder } from './purchase-order'\nimport { PurchaseOrderMutation } from './purchase-order-mutation'\nimport { PurchaseOrderQuery } from './purchase-order-query'\n\nexport const entities = [PurchaseOrder]\nexport const resolvers = [PurchaseOrderQuery, PurchaseOrderMutation]\n\nexport * from './purchase-order-mutation'\nexport * from './purchase-order-query'\n"]}
|
|
@@ -1,29 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
-
};
|
|
14
|
-
var __asyncValues = (this && this.__asyncValues) || function (o) {
|
|
15
|
-
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
16
|
-
var m = o[Symbol.asyncIterator], i;
|
|
17
|
-
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
18
|
-
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
19
|
-
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
|
|
20
|
-
};
|
|
21
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
22
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
23
|
-
};
|
|
24
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
3
|
exports.upsertPurchaseOrderProducts = exports.updatePurchaseOrderFunction = exports.createPurchaseOrderFunction = exports.upsertPurchaseOrderFunction = exports.PurchaseOrderMutation = void 0;
|
|
26
|
-
const
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const GraphQLUpload_js_1 = tslib_1.__importDefault(require("graphql-upload/GraphQLUpload.js"));
|
|
27
6
|
const type_graphql_1 = require("type-graphql");
|
|
28
7
|
const typeorm_1 = require("typeorm");
|
|
29
8
|
const attachment_base_1 = require("@things-factory/attachment-base");
|
|
@@ -104,66 +83,66 @@ let PurchaseOrderMutation = class PurchaseOrderMutation {
|
|
|
104
83
|
return true;
|
|
105
84
|
}
|
|
106
85
|
};
|
|
107
|
-
__decorate([
|
|
86
|
+
tslib_1.__decorate([
|
|
108
87
|
(0, type_graphql_1.Directive)('@privilege(category: "order_customer", privilege: "mutation")'),
|
|
109
88
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
110
89
|
(0, type_graphql_1.Mutation)(returns => __1.PurchaseOrder),
|
|
111
|
-
__param(0, (0, type_graphql_1.Ctx)()),
|
|
112
|
-
__param(1, (0, type_graphql_1.Arg)('purchaseOrder', type => __1.PurchaseOrderPatch)),
|
|
113
|
-
__param(2, (0, type_graphql_1.Arg)('files', type => [GraphQLUpload_js_1.default], { nullable: true })),
|
|
114
|
-
__metadata("design:type", Function),
|
|
115
|
-
__metadata("design:paramtypes", [Object, __1.PurchaseOrderPatch, Object]),
|
|
116
|
-
__metadata("design:returntype", Promise)
|
|
90
|
+
tslib_1.__param(0, (0, type_graphql_1.Ctx)()),
|
|
91
|
+
tslib_1.__param(1, (0, type_graphql_1.Arg)('purchaseOrder', type => __1.PurchaseOrderPatch)),
|
|
92
|
+
tslib_1.__param(2, (0, type_graphql_1.Arg)('files', type => [GraphQLUpload_js_1.default], { nullable: true })),
|
|
93
|
+
tslib_1.__metadata("design:type", Function),
|
|
94
|
+
tslib_1.__metadata("design:paramtypes", [Object, __1.PurchaseOrderPatch, Object]),
|
|
95
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
117
96
|
], PurchaseOrderMutation.prototype, "upsertPurchaseOrder", null);
|
|
118
|
-
__decorate([
|
|
97
|
+
tslib_1.__decorate([
|
|
119
98
|
(0, type_graphql_1.Directive)('@privilege(category: "order_customer", privilege: "mutation")'),
|
|
120
99
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
121
100
|
(0, type_graphql_1.Mutation)(returns => __1.PurchaseOrder),
|
|
122
|
-
__param(0, (0, type_graphql_1.Arg)('id')),
|
|
123
|
-
__param(1, (0, type_graphql_1.Ctx)()),
|
|
124
|
-
__metadata("design:type", Function),
|
|
125
|
-
__metadata("design:paramtypes", [String, Object]),
|
|
126
|
-
__metadata("design:returntype", Promise)
|
|
101
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
|
|
102
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
103
|
+
tslib_1.__metadata("design:type", Function),
|
|
104
|
+
tslib_1.__metadata("design:paramtypes", [String, Object]),
|
|
105
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
127
106
|
], PurchaseOrderMutation.prototype, "approvePurchaseOrder", null);
|
|
128
|
-
__decorate([
|
|
107
|
+
tslib_1.__decorate([
|
|
129
108
|
(0, type_graphql_1.Directive)('@privilege(category: "order_customer", privilege: "mutation")'),
|
|
130
109
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
131
110
|
(0, type_graphql_1.Mutation)(returns => __1.PurchaseOrder),
|
|
132
|
-
__param(0, (0, type_graphql_1.Arg)('id')),
|
|
133
|
-
__param(1, (0, type_graphql_1.Ctx)()),
|
|
134
|
-
__metadata("design:type", Function),
|
|
135
|
-
__metadata("design:paramtypes", [String, Object]),
|
|
136
|
-
__metadata("design:returntype", Promise)
|
|
111
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
|
|
112
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
113
|
+
tslib_1.__metadata("design:type", Function),
|
|
114
|
+
tslib_1.__metadata("design:paramtypes", [String, Object]),
|
|
115
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
137
116
|
], PurchaseOrderMutation.prototype, "rejectPurchaseOrder", null);
|
|
138
|
-
__decorate([
|
|
117
|
+
tslib_1.__decorate([
|
|
139
118
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
140
119
|
(0, type_graphql_1.Mutation)(returns => __1.PurchaseOrder),
|
|
141
|
-
__param(0, (0, type_graphql_1.Arg)('purchaseOrder', type => __1.NewPurchaseOrder)),
|
|
142
|
-
__param(1, (0, type_graphql_1.Ctx)()),
|
|
143
|
-
__metadata("design:type", Function),
|
|
144
|
-
__metadata("design:paramtypes", [__1.NewPurchaseOrder, Object]),
|
|
145
|
-
__metadata("design:returntype", Promise)
|
|
120
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('purchaseOrder', type => __1.NewPurchaseOrder)),
|
|
121
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
122
|
+
tslib_1.__metadata("design:type", Function),
|
|
123
|
+
tslib_1.__metadata("design:paramtypes", [__1.NewPurchaseOrder, Object]),
|
|
124
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
146
125
|
], PurchaseOrderMutation.prototype, "createPurchaseOrder", null);
|
|
147
|
-
__decorate([
|
|
126
|
+
tslib_1.__decorate([
|
|
148
127
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
149
128
|
(0, type_graphql_1.Mutation)(returns => __1.PurchaseOrder),
|
|
150
|
-
__param(0, (0, type_graphql_1.Arg)('name')),
|
|
151
|
-
__param(1, (0, type_graphql_1.Arg)('patch', type => __1.PurchaseOrderPatch)),
|
|
152
|
-
__param(2, (0, type_graphql_1.Ctx)()),
|
|
153
|
-
__metadata("design:type", Function),
|
|
154
|
-
__metadata("design:paramtypes", [String, __1.PurchaseOrderPatch, Object]),
|
|
155
|
-
__metadata("design:returntype", Promise)
|
|
129
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('name')),
|
|
130
|
+
tslib_1.__param(1, (0, type_graphql_1.Arg)('patch', type => __1.PurchaseOrderPatch)),
|
|
131
|
+
tslib_1.__param(2, (0, type_graphql_1.Ctx)()),
|
|
132
|
+
tslib_1.__metadata("design:type", Function),
|
|
133
|
+
tslib_1.__metadata("design:paramtypes", [String, __1.PurchaseOrderPatch, Object]),
|
|
134
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
156
135
|
], PurchaseOrderMutation.prototype, "updatePurchaseOrder", null);
|
|
157
|
-
__decorate([
|
|
136
|
+
tslib_1.__decorate([
|
|
158
137
|
(0, type_graphql_1.Directive)('@transaction'),
|
|
159
138
|
(0, type_graphql_1.Mutation)(returns => Boolean),
|
|
160
|
-
__param(0, (0, type_graphql_1.Arg)('name')),
|
|
161
|
-
__param(1, (0, type_graphql_1.Ctx)()),
|
|
162
|
-
__metadata("design:type", Function),
|
|
163
|
-
__metadata("design:paramtypes", [String, Object]),
|
|
164
|
-
__metadata("design:returntype", Promise)
|
|
139
|
+
tslib_1.__param(0, (0, type_graphql_1.Arg)('name')),
|
|
140
|
+
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
141
|
+
tslib_1.__metadata("design:type", Function),
|
|
142
|
+
tslib_1.__metadata("design:paramtypes", [String, Object]),
|
|
143
|
+
tslib_1.__metadata("design:returntype", Promise)
|
|
165
144
|
], PurchaseOrderMutation.prototype, "deletePurchaseOrder", null);
|
|
166
|
-
PurchaseOrderMutation = __decorate([
|
|
145
|
+
PurchaseOrderMutation = tslib_1.__decorate([
|
|
167
146
|
(0, type_graphql_1.Resolver)(__1.PurchaseOrder)
|
|
168
147
|
], PurchaseOrderMutation);
|
|
169
148
|
exports.PurchaseOrderMutation = PurchaseOrderMutation;
|
|
@@ -231,7 +210,7 @@ async function createPurchaseOrderFunction(_, purchaseOrder, files, context, tx)
|
|
|
231
210
|
await upsertPurchaseOrderProducts(domain, purchaseOrder.bizplace, createdPurchaseOrder, orderProducts, user, tx);
|
|
232
211
|
try {
|
|
233
212
|
// // 3. Create purchase order misc charges
|
|
234
|
-
for (var otherCharges_1 = __asyncValues(otherCharges), otherCharges_1_1; otherCharges_1_1 = await otherCharges_1.next(), !otherCharges_1_1.done;) {
|
|
213
|
+
for (var otherCharges_1 = tslib_1.__asyncValues(otherCharges), otherCharges_1_1; otherCharges_1_1 = await otherCharges_1.next(), !otherCharges_1_1.done;) {
|
|
235
214
|
let oc = otherCharges_1_1.value;
|
|
236
215
|
delete oc.id;
|
|
237
216
|
await tx.getRepository(__1.PurchaseOrderOtherCharge).save(Object.assign(Object.assign({}, oc), { domain, purchaseOrder: createdPurchaseOrder, creator: user, updater: user }));
|
|
@@ -291,7 +270,7 @@ async function updatePurchaseOrderFunction(_, purchaseOrder, files, context, tx)
|
|
|
291
270
|
});
|
|
292
271
|
try {
|
|
293
272
|
// // 4. Process Purchase Other Other Charges Data and Insert/ Update data
|
|
294
|
-
for (var otherCharges_2 = __asyncValues(otherCharges), otherCharges_2_1; otherCharges_2_1 = await otherCharges_2.next(), !otherCharges_2_1.done;) {
|
|
273
|
+
for (var otherCharges_2 = tslib_1.__asyncValues(otherCharges), otherCharges_2_1; otherCharges_2_1 = await otherCharges_2.next(), !otherCharges_2_1.done;) {
|
|
295
274
|
let oc = otherCharges_2_1.value;
|
|
296
275
|
if (!(oc === null || oc === void 0 ? void 0 : oc.id))
|
|
297
276
|
delete oc.id;
|