@things-factory/operato-mms 4.0.0-alpha.7 → 4.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Dockerfile +2 -1
- package/client/bootstrap.js +32 -16
- package/client/components/marketplace-order-max-weight.js +158 -0
- package/client/components/mms-home-cards.js +1 -1
- package/client/components/stock-allocation-ratio.js +17 -23
- package/client/pages/catalogue/products.js +2 -1
- package/client/pages/catalogue/warehouse-products.js +2 -1
- package/client/pages/catalogue-variation/product-variations.js +72 -15
- package/client/pages/inventory/inventory-by-product.js +3 -2
- package/client/pages/order/logistics/batch-init-popup.js +566 -0
- package/client/pages/order/logistics/lazada-order-init-batch-popup.js +233 -21
- package/client/pages/order/logistics/order-shipping-items.js +47 -16
- package/client/pages/order/logistics/order-shipping.js +7 -4
- package/client/pages/order/logistics/request-ro-popup.js +104 -17
- package/client/pages/order/logistics/shopee-order-init-batch-popup.js +431 -129
- package/client/pages/order/order-by-store.js +176 -149
- package/client/pages/setting/marketplace-setting.js +12 -0
- package/dist-server/graphql/index.js +1 -1
- package/dist-server/graphql/resolvers/index.js +1 -1
- package/dist-server/graphql/resolvers/interface-with-hub/add-release-order.js +74 -13
- package/dist-server/graphql/resolvers/interface-with-hub/add-release-order.js.map +1 -1
- package/dist-server/graphql/resolvers/interface-with-hub/auto-add-release-order.js +74 -13
- package/dist-server/graphql/resolvers/interface-with-hub/auto-add-release-order.js.map +1 -1
- package/dist-server/graphql/resolvers/interface-with-hub/generate-replenishment-order.js +1 -1
- package/dist-server/graphql/resolvers/interface-with-hub/generate-replenishment-order.js.map +1 -1
- package/dist-server/graphql/resolvers/interface-with-hub/warehouse-marketplace-products.js +53 -36
- package/dist-server/graphql/resolvers/interface-with-hub/warehouse-marketplace-products.js.map +1 -1
- package/dist-server/graphql/resolvers/warehouse-product/auto-link-warehouse-marketplace-product-variations.js +5 -5
- package/dist-server/graphql/resolvers/warehouse-product/auto-link-warehouse-marketplace-product-variations.js.map +1 -1
- package/dist-server/graphql/types/index.js +1 -1
- package/dist-server/graphql/types/interface-with-hub/new-stock-replenishment.js +1 -1
- package/dist-server/graphql/types/interface-with-hub/new-stock-replenishment.js.map +1 -1
- package/dist-server/graphql/types/interface-with-hub/replenishment-order-product.js +1 -1
- package/dist-server/graphql/types/interface-with-hub/replenishment-order-product.js.map +1 -1
- package/dist-server/graphql/types/interface-with-hub/stock-replenishment-list.js +1 -1
- package/dist-server/graphql/types/interface-with-hub/stock-replenishment-list.js.map +1 -1
- package/dist-server/graphql/types/interface-with-hub/stock-replenishment.js +1 -1
- package/dist-server/graphql/types/interface-with-hub/stock-replenishment.js.map +1 -1
- package/dist-server/graphql/types/interface-with-hub/warehouse-inventory.js +1 -1
- package/dist-server/graphql/types/interface-with-hub/warehouse-inventory.js.map +1 -1
- package/dist-server/graphql/types/interface-with-hub/warehouse-marketplace-product-list.js +1 -1
- package/dist-server/graphql/types/interface-with-hub/warehouse-marketplace-product-list.js.map +1 -1
- package/dist-server/graphql/types/interface-with-hub/warehouse-marketplace-product.js +1 -1
- package/dist-server/graphql/types/interface-with-hub/warehouse-marketplace-product.js.map +1 -1
- package/dist-server/graphql/types/warehouse-product/warehouse-product.js +1 -1
- package/dist-server/graphql/types/warehouse-product/warehouse-product.js.map +1 -1
- package/dist-server/index.js +1 -1
- package/dist-server/migrations/1599732967233-SeedCommonCode.js +5 -5
- package/dist-server/migrations/1599732967233-SeedCommonCode.js.map +1 -1
- package/dist-server/migrations/1608009991075-SeedUser.js +4 -4
- package/dist-server/migrations/1608009991075-SeedUser.js.map +1 -1
- package/dist-server/routers/etrax-router.js +7 -6
- package/dist-server/routers/etrax-router.js.map +1 -1
- package/dist-server/routers/shopify-pos-public-router.js +10 -10
- package/dist-server/routers/shopify-pos-public-router.js.map +1 -1
- package/dist-server/util/interface-helper.js +2 -2
- package/dist-server/util/interface-helper.js.map +1 -1
- package/dist-server/util/no-generator.js +2 -2
- package/dist-server/util/no-generator.js.map +1 -1
- package/package.json +65 -63
- package/server/graphql/resolvers/interface-with-hub/add-release-order.ts +83 -14
- package/server/graphql/resolvers/interface-with-hub/auto-add-release-order.ts +79 -11
- package/server/graphql/resolvers/interface-with-hub/warehouse-marketplace-products.ts +50 -33
- package/server/routers/etrax-router.ts +6 -4
- package/translations/en.json +16 -0
- package/translations/ko.json +14 -0
- package/translations/ms.json +14 -0
- package/translations/zh.json +14 -0
- package/views/auth-page.html +1 -1
- package/views/public/home.html +1 -1
- package/config.development.js +0 -54
|
@@ -1,29 +1,90 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.addReleaseOrderResolver = void 0;
|
|
4
|
+
const biz_base_1 = require("@things-factory/biz-base");
|
|
4
5
|
const integration_fulfillment_1 = require("@things-factory/integration-fulfillment");
|
|
5
|
-
const shell_1 = require("@things-factory/shell");
|
|
6
6
|
const marketplace_base_1 = require("@things-factory/marketplace-base");
|
|
7
|
-
const
|
|
7
|
+
const shell_1 = require("@things-factory/shell");
|
|
8
8
|
exports.addReleaseOrderResolver = {
|
|
9
9
|
async addReleaseOrder(_, { marketplaceOrderIds, warehouseId }, context) {
|
|
10
|
-
const { tx } = context.state;
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
const { tx, domain } = context.state;
|
|
11
|
+
const fulfilmentCenter = await integration_fulfillment_1.FulfillmentAPI.getFulfillmentCenter(warehouseId);
|
|
12
|
+
const centerId = fulfilmentCenter.centerId;
|
|
13
13
|
var warehouseDomain = await tx.getRepository(shell_1.Domain).findOne({ where: { subdomain: centerId } });
|
|
14
|
-
var customerBizplaces = await biz_base_1.getCustomerBizplaces(warehouseDomain);
|
|
15
|
-
|
|
14
|
+
var customerBizplaces = await (0, biz_base_1.getCustomerBizplaces)(warehouseDomain);
|
|
15
|
+
const customerBizplaceId = customerBizplaces.find(customerBizplace => customerBizplace.company.domain.id === domain.id).id;
|
|
16
16
|
for (var i = 0; i < marketplaceOrderIds.length; i++) {
|
|
17
17
|
const marketplaceOrderId = marketplaceOrderIds[i];
|
|
18
18
|
const marketplaceOrder = await tx.getRepository(marketplace_base_1.MarketplaceOrder).findOne(marketplaceOrderId, {
|
|
19
|
-
relations: [
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
marketplaceOrder
|
|
19
|
+
relations: [
|
|
20
|
+
'marketplaceOrderItems',
|
|
21
|
+
'marketplaceOrderItems.marketplaceProductVariation',
|
|
22
|
+
'marketplaceOrderItems.marketplaceOrderShipping'
|
|
23
|
+
]
|
|
25
24
|
});
|
|
25
|
+
const marketplaceOrderShippings = await tx
|
|
26
|
+
.getRepository(marketplace_base_1.MarketplaceOrderShipping)
|
|
27
|
+
.find({ where: { orderNoRef: marketplaceOrder.orderNo, domain } });
|
|
28
|
+
for (var j = 0; j < marketplaceOrderShippings.length; j++) {
|
|
29
|
+
const marketplaceOrderShipping = marketplaceOrderShippings[j];
|
|
30
|
+
const date = new Date();
|
|
31
|
+
const releaseDate = `${date.getFullYear()}-${(date.getMonth() + 1)
|
|
32
|
+
.toString()
|
|
33
|
+
.padStart(2, '0')}-${date.getDate().toString().padStart(2, '0')}`;
|
|
34
|
+
const newMarketplaceOrder = {
|
|
35
|
+
releaseDate,
|
|
36
|
+
type: 'b2c',
|
|
37
|
+
transporter: marketplaceOrder.shippingProvider,
|
|
38
|
+
trackingNo: (marketplaceOrderShipping === null || marketplaceOrderShipping === void 0 ? void 0 : marketplaceOrderShipping.ownTrackingNo)
|
|
39
|
+
? marketplaceOrderShipping.ownTrackingNo
|
|
40
|
+
: marketplaceOrderShipping.trackingNo,
|
|
41
|
+
packingOption: true,
|
|
42
|
+
exportOption: false,
|
|
43
|
+
ownTransport: true,
|
|
44
|
+
courierOption: true,
|
|
45
|
+
collectionOrderNo: marketplaceOrder.orderNo,
|
|
46
|
+
refNo: marketplaceOrder.orderNo,
|
|
47
|
+
refNo2: marketplaceOrder.orderNo + ' - ' + (j + 1) + '/' + marketplaceOrderShippings.length,
|
|
48
|
+
deliverTo: {
|
|
49
|
+
deliveryAddress1: marketplaceOrderShipping.address1,
|
|
50
|
+
deliveryAddress2: marketplaceOrderShipping.address2,
|
|
51
|
+
deliveryAddress3: marketplaceOrderShipping.address3,
|
|
52
|
+
deliveryAddress4: marketplaceOrderShipping.address4,
|
|
53
|
+
deliveryAddress5: marketplaceOrderShipping.address5,
|
|
54
|
+
attentionTo: marketplaceOrderShipping.attentionTo,
|
|
55
|
+
city: marketplaceOrderShipping.city,
|
|
56
|
+
postalCode: marketplaceOrderShipping.postCode,
|
|
57
|
+
country: marketplaceOrderShipping.country,
|
|
58
|
+
state: marketplaceOrderShipping.state,
|
|
59
|
+
phone1: marketplaceOrderShipping.phone1,
|
|
60
|
+
phone2: (marketplaceOrderShipping === null || marketplaceOrderShipping === void 0 ? void 0 : marketplaceOrderShipping.phone2) ? marketplaceOrderShipping.phone2 : null
|
|
61
|
+
},
|
|
62
|
+
marketplaceOrderStatus: marketplaceOrder.status,
|
|
63
|
+
airwayBill: (marketplaceOrderShipping === null || marketplaceOrderShipping === void 0 ? void 0 : marketplaceOrderShipping.airwayBill) ? marketplaceOrderShipping.airwayBill : null,
|
|
64
|
+
invoice: (marketplaceOrderShipping === null || marketplaceOrderShipping === void 0 ? void 0 : marketplaceOrderShipping.invoice) ? marketplaceOrderShipping.invoice : null,
|
|
65
|
+
orderInventories: marketplaceOrder.marketplaceOrderItems
|
|
66
|
+
.filter(item => {
|
|
67
|
+
if (item.marketplaceOrderShipping.id === marketplaceOrderShipping.id) {
|
|
68
|
+
return item;
|
|
69
|
+
}
|
|
70
|
+
})
|
|
71
|
+
.map((orderItem) => {
|
|
72
|
+
const { marketplaceProductVariation: productVariation } = orderItem;
|
|
73
|
+
return {
|
|
74
|
+
product: {
|
|
75
|
+
sku: productVariation.sku
|
|
76
|
+
},
|
|
77
|
+
releaseQty: orderItem.qty
|
|
78
|
+
};
|
|
79
|
+
})
|
|
80
|
+
};
|
|
81
|
+
var releaseOrder = await integration_fulfillment_1.FulfillmentAPI.createOutboundOrder(fulfilmentCenter, {
|
|
82
|
+
customerBizplaceId,
|
|
83
|
+
releaseOrder: newMarketplaceOrder
|
|
84
|
+
});
|
|
85
|
+
}
|
|
26
86
|
marketplaceOrder.releaseOrderId = releaseOrder.id;
|
|
87
|
+
marketplaceOrder.fulfillmentCenter = fulfilmentCenter;
|
|
27
88
|
await tx.getRepository(marketplace_base_1.MarketplaceOrder).save(marketplaceOrder);
|
|
28
89
|
}
|
|
29
90
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-release-order.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/interface-with-hub/add-release-order.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"add-release-order.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/interface-with-hub/add-release-order.ts"],"names":[],"mappings":";;;AAEA,uDAAyE;AACzE,qFAA2F;AAC3F,uEAA6F;AAC7F,iDAA8C;AAEjC,QAAA,uBAAuB,GAAG;IACrC,KAAK,CAAC,eAAe,CACnB,CAAO,EACP,EAAE,mBAAmB,EAAE,WAAW,EAAqD,EACvF,OAAY;QAEZ,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,GAA0C,OAAO,CAAC,KAAK,CAAA;QAE3E,MAAM,gBAAgB,GAAsB,MAAM,wCAAc,CAAC,oBAAoB,CAAC,WAAW,CAAC,CAAA;QAClG,MAAM,QAAQ,GAAW,gBAAgB,CAAC,QAAQ,CAAA;QAElD,IAAI,eAAe,GAAW,MAAM,EAAE,CAAC,aAAa,CAAC,cAAM,CAAC,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAA;QACxG,IAAI,iBAAiB,GAAe,MAAM,IAAA,+BAAoB,EAAC,eAAe,CAAC,CAAA;QAE/E,MAAM,kBAAkB,GAAW,iBAAiB,CAAC,IAAI,C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AAwB,CAAE,UAAU,EAAC,CAAC,CAAC,wBAAwB,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI;oBAC7F,OAAO,EAAE,CAAA,wBAAwB,aAAxB,wBAAwB,uBAAxB,wBAAwB,CAAE,OAAO,EAAC,CAAC,CAAC,wBAAwB,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI;oBACpF,gBAAgB,EAAE,gBAAgB,CAAC,qBAAqB;yBACrD,MAAM,CAAC,IAAI,CAAC,EAAE;wBACb,IAAI,IAAI,CAAC,wBAAwB,CAAC,EAAE,KAAK,wBAAwB,CAAC,EAAE,EAAE;4BACpE,OAAO,IAAI,CAAA;yBACZ;oBACH,CAAC,CAAC;yBACD,GAAG,CAAC,CAAC,SAAc,EAAE,EAAE;wBACtB,MAAM,EAAE,2BAA2B,EAAE,gBAAgB,EAAE,GAAQ,SAAS,CAAA;wBACxE,OAAO;4BACL,OAAO,EAAE;gCACP,GAAG,EAAE,gBAAgB,CAAC,GAAG;6BAC1B;4BACD,UAAU,EAAE,SAAS,CAAC,GAAG;yBAC1B,CAAA;oBACH,CAAC,CAAC;iBACL,CAAA;gBAED,IAAI,YAAY,GAAQ,MAAM,wCAAc,CAAC,mBAAmB,CAAC,gBAAgB,EAAE;oBACjF,kBAAkB;oBAClB,YAAY,EAAE,mBAAmB;iBAClC,CAAC,CAAA;aACH;YAED,gBAAgB,CAAC,cAAc,GAAG,YAAY,CAAC,EAAE,CAAA;YACjD,gBAAgB,CAAC,iBAAiB,GAAG,gBAAgB,CAAA;YACrD,MAAM,EAAE,CAAC,aAAa,CAAC,mCAAgB,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAA;SAChE;IACH,CAAC;CACF,CAAA"}
|
|
@@ -1,35 +1,96 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.autoAddReleaseOrderResolver = void 0;
|
|
4
|
+
const typeorm_1 = require("typeorm");
|
|
5
|
+
const biz_base_1 = require("@things-factory/biz-base");
|
|
4
6
|
const integration_fulfillment_1 = require("@things-factory/integration-fulfillment");
|
|
5
|
-
const shell_1 = require("@things-factory/shell");
|
|
6
7
|
const marketplace_base_1 = require("@things-factory/marketplace-base");
|
|
7
|
-
const
|
|
8
|
-
const typeorm_1 = require("typeorm");
|
|
8
|
+
const shell_1 = require("@things-factory/shell");
|
|
9
9
|
exports.autoAddReleaseOrderResolver = {
|
|
10
10
|
async autoAddReleaseOrder(_, { warehouseId }, context) {
|
|
11
|
-
const {
|
|
12
|
-
const qb = typeorm_1.createQueryBuilder(marketplace_base_1.MarketplaceOrder, 'MO');
|
|
11
|
+
const { domain } = context.state;
|
|
12
|
+
const qb = (0, typeorm_1.createQueryBuilder)(marketplace_base_1.MarketplaceOrder, 'MO');
|
|
13
13
|
const marketplaceOrders = await qb
|
|
14
14
|
.leftJoinAndSelect('MO.marketplaceOrderItems', 'MOI')
|
|
15
|
+
.leftJoinAndSelect('MOI.marketplaceOrderShipping', 'MOS')
|
|
15
16
|
.leftJoinAndSelect('MOI.marketplaceProductVariation', 'MPV')
|
|
17
|
+
.leftJoinAndSelect('MO.marketplaceStore', 'MPS')
|
|
16
18
|
.where('MO.domain = :domainId', { domainId: domain.id })
|
|
17
19
|
.andWhere('MO.releaseOrderId IS NULL')
|
|
18
|
-
.andWhere('MO.status IN (:...status)', { status: ['ready_to_ship', 'unfulfilled'] })
|
|
20
|
+
.andWhere('MO.status IN (:...status)', { status: ['ready_to_ship', 'unfulfilled', 'packed'] })
|
|
21
|
+
.andWhere('MPS.status = :marketplaceStatus', { marketplaceStatus: 'ACTIVE' })
|
|
19
22
|
.getMany();
|
|
20
23
|
var fulfilmentCenter = await integration_fulfillment_1.FulfillmentAPI.getFulfillmentCenter(warehouseId);
|
|
21
24
|
var centerId = fulfilmentCenter.centerId;
|
|
22
|
-
var warehouseDomain = await
|
|
23
|
-
var customerBizplaces = await biz_base_1.getCustomerBizplaces(warehouseDomain);
|
|
24
|
-
|
|
25
|
+
var warehouseDomain = await (0, typeorm_1.getRepository)(shell_1.Domain).findOne({ where: { subdomain: centerId } });
|
|
26
|
+
var customerBizplaces = await (0, biz_base_1.getCustomerBizplaces)(warehouseDomain);
|
|
27
|
+
const customerBizplaceId = customerBizplaces.find(customerBizplace => customerBizplace.company.domain.id === domain.id).id;
|
|
25
28
|
for (var i = 0; i < marketplaceOrders.length; i++) {
|
|
26
29
|
const marketplaceOrder = marketplaceOrders[i];
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
marketplaceOrder
|
|
30
|
+
const marketplaceOrderShippings = await (0, typeorm_1.getRepository)(marketplace_base_1.MarketplaceOrderShipping).find({
|
|
31
|
+
where: { orderNoRef: marketplaceOrder.orderNo, domain }
|
|
30
32
|
});
|
|
33
|
+
for (var j = 0; j < marketplaceOrderShippings.length; j++) {
|
|
34
|
+
const marketplaceOrderShipping = marketplaceOrderShippings[j];
|
|
35
|
+
const date = new Date();
|
|
36
|
+
const releaseDate = `${date.getFullYear()}-${(date.getMonth() + 1)
|
|
37
|
+
.toString()
|
|
38
|
+
.padStart(2, '0')}-${date.getDate().toString().padStart(2, '0')}`;
|
|
39
|
+
const newMarketplaceOrder = {
|
|
40
|
+
releaseDate,
|
|
41
|
+
type: 'b2c',
|
|
42
|
+
transporter: marketplaceOrder.shippingProvider,
|
|
43
|
+
trackingNo: (marketplaceOrderShipping === null || marketplaceOrderShipping === void 0 ? void 0 : marketplaceOrderShipping.ownTrackingNo)
|
|
44
|
+
? marketplaceOrderShipping.ownTrackingNo
|
|
45
|
+
: marketplaceOrderShipping.trackingNo,
|
|
46
|
+
packingOption: true,
|
|
47
|
+
exportOption: false,
|
|
48
|
+
ownTransport: true,
|
|
49
|
+
courierOption: true,
|
|
50
|
+
collectionOrderNo: marketplaceOrder.orderNo,
|
|
51
|
+
refNo: marketplaceOrder.orderNo,
|
|
52
|
+
refNo2: marketplaceOrder.orderNo + ' - ' + (j + 1) + '/' + marketplaceOrderShippings.length,
|
|
53
|
+
deliverTo: {
|
|
54
|
+
deliveryAddress1: marketplaceOrderShipping.address1,
|
|
55
|
+
deliveryAddress2: marketplaceOrderShipping.address2,
|
|
56
|
+
deliveryAddress3: marketplaceOrderShipping.address3,
|
|
57
|
+
deliveryAddress4: marketplaceOrderShipping.address4,
|
|
58
|
+
deliveryAddress5: marketplaceOrderShipping.address5,
|
|
59
|
+
attentionTo: marketplaceOrderShipping.attentionTo,
|
|
60
|
+
city: marketplaceOrderShipping.city,
|
|
61
|
+
postalCode: marketplaceOrderShipping.postCode,
|
|
62
|
+
country: marketplaceOrderShipping.country,
|
|
63
|
+
state: marketplaceOrderShipping.state,
|
|
64
|
+
phone1: marketplaceOrderShipping.phone1,
|
|
65
|
+
phone2: (marketplaceOrderShipping === null || marketplaceOrderShipping === void 0 ? void 0 : marketplaceOrderShipping.phone2) ? marketplaceOrderShipping.phone2 : null
|
|
66
|
+
},
|
|
67
|
+
marketplaceOrderStatus: marketplaceOrder.status,
|
|
68
|
+
airwayBill: (marketplaceOrderShipping === null || marketplaceOrderShipping === void 0 ? void 0 : marketplaceOrderShipping.airwayBill) ? marketplaceOrderShipping.airwayBill : null,
|
|
69
|
+
invoice: (marketplaceOrderShipping === null || marketplaceOrderShipping === void 0 ? void 0 : marketplaceOrderShipping.invoice) ? marketplaceOrderShipping.invoice : null,
|
|
70
|
+
orderInventories: marketplaceOrder.marketplaceOrderItems
|
|
71
|
+
.filter(item => {
|
|
72
|
+
if (item.marketplaceOrderShipping.id === marketplaceOrderShipping.id) {
|
|
73
|
+
return item;
|
|
74
|
+
}
|
|
75
|
+
})
|
|
76
|
+
.map((orderItem) => {
|
|
77
|
+
const { marketplaceProductVariation: productVariation } = orderItem;
|
|
78
|
+
return {
|
|
79
|
+
product: {
|
|
80
|
+
sku: productVariation.sku
|
|
81
|
+
},
|
|
82
|
+
releaseQty: orderItem.qty
|
|
83
|
+
};
|
|
84
|
+
})
|
|
85
|
+
};
|
|
86
|
+
var releaseOrder = await integration_fulfillment_1.FulfillmentAPI.createOutboundOrder(fulfilmentCenter, {
|
|
87
|
+
customerBizplaceId,
|
|
88
|
+
releaseOrder: newMarketplaceOrder
|
|
89
|
+
});
|
|
90
|
+
}
|
|
31
91
|
marketplaceOrder.releaseOrderId = releaseOrder.id;
|
|
32
|
-
|
|
92
|
+
marketplaceOrder.fulfillmentCenter = fulfilmentCenter;
|
|
93
|
+
await (0, typeorm_1.getRepository)(marketplace_base_1.MarketplaceOrder).save(marketplaceOrder);
|
|
33
94
|
}
|
|
34
95
|
}
|
|
35
96
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auto-add-release-order.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/interface-with-hub/auto-add-release-order.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"auto-add-release-order.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/interface-with-hub/auto-add-release-order.ts"],"names":[],"mappings":";;;AAAA,qCAA+E;AAE/E,uDAAyE;AACzE,qFAAwE;AACxE,uEAA6F;AAC7F,iDAA8C;AAEjC,QAAA,2BAA2B,GAAG;IACzC,KAAK,CAAC,mBAAmB,CAAC,CAAO,EAAE,EAAE,WAAW,EAA2B,EAAE,OAAY;QACvF,MAAM,EAAE,MAAM,EAAE,GAAuB,OAAO,CAAC,KAAK,CAAA;QAEpD,MAAM,EAAE,GAAyC,IAAA,4BAAkB,EAAC,mCAAgB,EAAE,IAAI,CAAC,CAAA;QAC3F,MAAM,iBAAiB,GAAuB,MAAM,EAAE;aACnD,iBAAiB,CAAC,0BAA0B,EAAE,KAAK,CAAC;aACpD,iBAAiB,CAAC,8BAA8B,EAAE,KAAK,CAAC;aACxD,iBAAiB,CAAC,iCAAiC,EAAE,KAAK,CAAC;aAC3D,iBAAiB,CAAC,qBAAqB,EAAE,KAAK,CAAC;aAC/C,KAAK,CAAC,uBAAuB,EAAE,EAAE,QAAQ,EAAE,MAAM,CAAC,EAAE,EAAE,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AkB;oBAClB,YAAY,EAAE,mBAAmB;iBAClC,CAAC,CAAA;aACH;YAED,gBAAgB,CAAC,cAAc,GAAG,YAAY,CAAC,EAAE,CAAA;YACjD,gBAAgB,CAAC,iBAAiB,GAAG,gBAAgB,CAAA;YACrD,MAAM,IAAA,uBAAa,EAAC,mCAAgB,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAA;SAC7D;IACH,CAAC;CACF,CAAA"}
|
|
@@ -14,7 +14,7 @@ exports.generateReplenishmentOrderResolver = {
|
|
|
14
14
|
});
|
|
15
15
|
var fulfillmentCenter = await integration_fulfillment_1.FulfillmentAPI.getFulfillmentCenter(warehouseId);
|
|
16
16
|
var centerId = fulfillmentCenter.centerId;
|
|
17
|
-
var subdominBizplace = await biz_base_1.getSubdomainBizplace(centerId);
|
|
17
|
+
var subdominBizplace = await (0, biz_base_1.getSubdomainBizplace)(centerId);
|
|
18
18
|
var warehouseBizplaceId = subdominBizplace === null || subdominBizplace === void 0 ? void 0 : subdominBizplace.id;
|
|
19
19
|
var arrivalNotice = await integration_fulfillment_1.FulfillmentAPI.createInboundOrder(fulfillmentCenter, {
|
|
20
20
|
warehouseBizplaceId,
|
package/dist-server/graphql/resolvers/interface-with-hub/generate-replenishment-order.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-replenishment-order.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/interface-with-hub/generate-replenishment-order.ts"],"names":[],"mappings":";;;AAAA,qFAAwE;AACxE,uEAAqE;AACrE,uDAAyE;AAG5D,QAAA,kCAAkC,GAAG;IAChD,KAAK,CAAC,0BAA0B,CAC9B,CAAO,EACP,EAAE,oBAAoB,EAAE,WAAW,EAAyD,EAC5F,OAAY;QAEZ,MAAM,EAAE,EAAE,EAAE,GAA0B,OAAO,CAAC,KAAK,CAAA;QAEnD,IAAI,kBAAkB,GAAuB,MAAM,EAAE;aAClD,aAAa,CAAC,qCAAkB,CAAC;aACjC,OAAO,CAAC,oBAAoB,EAAE;YAC7B,SAAS,EAAE,CAAC,yBAAyB,CAAC;SACvC,CAAC,CAAA;QAEJ,IAAI,iBAAiB,GAAG,MAAM,wCAAc,CAAC,oBAAoB,CAAC,WAAW,CAAC,CAAA;QAC9E,IAAI,QAAQ,GAAW,iBAAiB,CAAC,QAAQ,CAAA;QAEjD,IAAI,gBAAgB,GAAa,MAAM,+BAAoB,
|
|
1
|
+
{"version":3,"file":"generate-replenishment-order.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/interface-with-hub/generate-replenishment-order.ts"],"names":[],"mappings":";;;AAAA,qFAAwE;AACxE,uEAAqE;AACrE,uDAAyE;AAG5D,QAAA,kCAAkC,GAAG;IAChD,KAAK,CAAC,0BAA0B,CAC9B,CAAO,EACP,EAAE,oBAAoB,EAAE,WAAW,EAAyD,EAC5F,OAAY;QAEZ,MAAM,EAAE,EAAE,EAAE,GAA0B,OAAO,CAAC,KAAK,CAAA;QAEnD,IAAI,kBAAkB,GAAuB,MAAM,EAAE;aAClD,aAAa,CAAC,qCAAkB,CAAC;aACjC,OAAO,CAAC,oBAAoB,EAAE;YAC7B,SAAS,EAAE,CAAC,yBAAyB,CAAC;SACvC,CAAC,CAAA;QAEJ,IAAI,iBAAiB,GAAG,MAAM,wCAAc,CAAC,oBAAoB,CAAC,WAAW,CAAC,CAAA;QAC9E,IAAI,QAAQ,GAAW,iBAAiB,CAAC,QAAQ,CAAA;QAEjD,IAAI,gBAAgB,GAAa,MAAM,IAAA,+BAAoB,EAAC,QAAQ,CAAC,CAAA;QACrE,IAAI,mBAAmB,GAAW,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,EAAE,CAAA;QAEtD,IAAI,aAAa,GAAG,MAAM,wCAAc,CAAC,kBAAkB,CAAC,iBAAiB,EAAE;YAC7E,mBAAmB;YACnB,kBAAkB;SACnB,CAAC,CAAA;QAEF,kBAAkB,CAAC,eAAe,GAAG,aAAa,CAAC,EAAE,CAAA;QACrD,MAAM,EAAE,CAAC,aAAa,CAAC,qCAAkB,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAA;IACrE,CAAC;CACF,CAAA"}
|
|
@@ -17,8 +17,8 @@ exports.warehouseMarketplaceProductsResolver = {
|
|
|
17
17
|
async function warehouseMarketplaceProduct(params, domain, user, tx) {
|
|
18
18
|
const productFilters = params.filters.filter(x => x.name == 'product_info');
|
|
19
19
|
const filters = params.filters.filter(x => x.name != 'product_info');
|
|
20
|
-
const companyBizplace = await biz_base_1.getCompanyBizplace(domain, user);
|
|
21
|
-
const myBizplace = await biz_base_1.getMyBizplace(domain, user);
|
|
20
|
+
const companyBizplace = await (0, biz_base_1.getCompanyBizplace)(domain, user);
|
|
21
|
+
const myBizplace = await (0, biz_base_1.getMyBizplace)(domain, user);
|
|
22
22
|
params.filters = [...filters, { name: 'bizplace_id', operator: 'in', value: [companyBizplace.id, myBizplace.id] }];
|
|
23
23
|
const bizplaceIds = params.filters
|
|
24
24
|
.find((filter) => filter.name === 'bizplace_id')
|
|
@@ -32,6 +32,32 @@ async function warehouseMarketplaceProduct(params, domain, user, tx) {
|
|
|
32
32
|
OR Lower("Product"."name") LIKE '${productInfo.value.toLowerCase()}'
|
|
33
33
|
OR Lower("Product"."description") LIKE '${productInfo.value.toLowerCase()}')`;
|
|
34
34
|
}
|
|
35
|
+
await tx.query(`
|
|
36
|
+
CREATE TEMP TABLE "temp_products" AS (
|
|
37
|
+
SELECT * FROM (
|
|
38
|
+
SELECT "Product"."id" AS "product_id", "Product"."sku" AS "product_sku", "Product"."name" AS "product_name",
|
|
39
|
+
"Product"."description" AS "product_description", "Product"."creator_id", "Product"."updater_id",
|
|
40
|
+
"Product"."bizplace_id" AS "product_bizplace_id", 'PRODUCT' AS "type"
|
|
41
|
+
FROM products "Product"
|
|
42
|
+
WHERE 1=1
|
|
43
|
+
AND "Product"."deleted_at" IS NULL
|
|
44
|
+
AND "Product"."bizplace_id" IN (${bizplaceIds})
|
|
45
|
+
${productQuery}
|
|
46
|
+
) d1
|
|
47
|
+
UNION ALL
|
|
48
|
+
SELECT * FROM
|
|
49
|
+
(
|
|
50
|
+
SELECT "Product"."id" AS "product_id", "Product"."sku" AS "product_sku", "Product"."name" AS "product_name",
|
|
51
|
+
"Product"."description" AS "product_description", "Product"."creator_id", "Product"."updater_id",
|
|
52
|
+
"Product"."bizplace_id" AS "product_bizplace_id", 'BUNDLE' AS "type"
|
|
53
|
+
FROM product_bundles "Product"
|
|
54
|
+
WHERE 1 = 1
|
|
55
|
+
AND "Product"."status" = 'ACTIVATED'
|
|
56
|
+
AND "Product"."bizplace_id" IN (${bizplaceIds})
|
|
57
|
+
${productQuery}
|
|
58
|
+
) d2
|
|
59
|
+
)
|
|
60
|
+
`);
|
|
35
61
|
await tx.query(`
|
|
36
62
|
CREATE TEMP TABLE "temp_json_warehouse_marketplace_products" AS (
|
|
37
63
|
select "product_id", array_to_json(array_agg(row_to_json(dt))) AS "Json_marketplaceProducts" FROM (
|
|
@@ -39,13 +65,10 @@ async function warehouseMarketplaceProduct(params, domain, user, tx) {
|
|
|
39
65
|
from (
|
|
40
66
|
select "mp"."marketplace_store_id" as "marketplace_store_id", "mpv"."sku", "mpv"."id" as "marketplace_product_variation_id",
|
|
41
67
|
concat("mpv"."variation_sku", ' (', "mpv"."name", ')') as "name", "mpv"."qty" as "qty",
|
|
42
|
-
"Product"."
|
|
68
|
+
"Product"."product_id" AS "product_id"
|
|
43
69
|
from marketplace_product_variations "mpv"
|
|
44
70
|
inner join marketplace_products "mp" on "mp"."id" = "mpv"."marketplace_product_id"
|
|
45
|
-
inner join
|
|
46
|
-
where "Product"."bizplace_id" IN (${bizplaceIds})
|
|
47
|
-
and "mpv"."sku" is not null
|
|
48
|
-
${productQuery}
|
|
71
|
+
inner join temp_products "Product" on "mpv"."sku" = "Product"."product_sku"
|
|
49
72
|
) as "dt"
|
|
50
73
|
group by "dt"."marketplace_store_id", "dt"."sku", "dt"."product_id"
|
|
51
74
|
) "dt" group by "dt"."product_id"
|
|
@@ -60,33 +83,28 @@ async function warehouseMarketplaceProduct(params, domain, user, tx) {
|
|
|
60
83
|
inner join warehouses "w" on "w"."id" = "i2"."warehouse_id"
|
|
61
84
|
inner join domains "d2" on "d2"."id" = "w"."domain_id" and "d2"."ext_type" ='warehouse'
|
|
62
85
|
inner join fulfillment_centers "fc" ON "fc"."center_id" = "d2"."subdomain"
|
|
63
|
-
inner join
|
|
64
|
-
|
|
65
|
-
|
|
86
|
+
inner join temp_products "Product" on "Product"."product_id" = "i2"."product_id" AND "Product"."type" = 'PRODUCT'
|
|
87
|
+
group by "fc"."id", "fc"."name", "i2"."product_id"
|
|
88
|
+
UNION
|
|
89
|
+
select "fc"."id" as "fulfillment_id", "fc"."name" as "fulfillment_name",
|
|
90
|
+
"i2"."product_id", max(CEILING(COALESCE(i2.locked_qty,0))) AS "locked_qty", min(floor(i2.qty/pbs.bundle_qty)) AS "inventory_qty"
|
|
91
|
+
from temp_products "Product"
|
|
92
|
+
inner join product_bundle_settings pbs ON pbs.product_bundle_id = "Product"."product_id"
|
|
93
|
+
inner join inventories i2 ON i2.product_id = pbs.product_id
|
|
94
|
+
inner join warehouses "w" on "w"."id" = "i2"."warehouse_id"
|
|
95
|
+
inner join domains "d2" on "d2"."id" = "w"."domain_id" and "d2"."ext_type" ='warehouse'
|
|
96
|
+
inner join fulfillment_centers "fc" ON "fc"."center_id" = "d2"."subdomain"
|
|
97
|
+
where "Product"."type" = 'BUNDLE'
|
|
66
98
|
group by "fc"."id", "fc"."name", "i2"."product_id"
|
|
67
99
|
) "dt" group by "dt"."product_id"
|
|
68
100
|
)
|
|
69
101
|
`);
|
|
70
102
|
await tx.getRepository(product_base_1.Product).query(`
|
|
71
103
|
create temp table temp_warehouse_marketplace_products as (
|
|
72
|
-
SELECT "Product"."
|
|
73
|
-
"Product"."
|
|
74
|
-
"Product"."
|
|
75
|
-
"Product"."
|
|
76
|
-
"Product"."expiration_period" AS "Product_expiration_period", "Product"."weight_unit" AS "Product_weight_unit", "Product"."weight" AS "Product_weight",
|
|
77
|
-
"Product"."gross_weight" AS "Product_gross_weight", "Product"."case_weight" AS "Product_case_weight", "Product"."case_gross_weight" AS "Product_case_gross_weight",
|
|
78
|
-
"Product"."density" AS "Product_density", "Product"."length_unit" AS "Product_length_unit", "Product"."cost_price" AS "Product_cost_price",
|
|
79
|
-
"Product"."mrp_price" AS "Product_mrp_price", "Product"."sell_price" AS "Product_sell_price", "Product"."after_tax_cost_price" AS "Product_after_tax_cost_price",
|
|
80
|
-
"Product"."after_tax_sales_price" AS "Product_after_tax_sales_price", "Product"."width" AS "Product_width", "Product"."depth" AS "Product_depth",
|
|
81
|
-
"Product"."height" AS "Product_height", "Product"."volume" AS "Product_volume", "Product"."case_width" AS "Product_case_width", "Product"."case_depth" AS "Product_case_depth",
|
|
82
|
-
"Product"."case_height" AS "Product_case_height", "Product"."case_volume" AS "Product_case_volume", "Product"."volume_size" AS "Product_volume_size",
|
|
83
|
-
"Product"."primary_unit" AS "Product_primary_unit", "Product"."primary_value" AS "Product_primary_value", "Product"."aux_unit_1" AS "Product_aux_unit_1",
|
|
84
|
-
"Product"."aux_value_1" AS "Product_aux_value_1", "Product"."aux_unit_2" AS "Product_aux_unit_2", "Product"."aux_value_2" AS "Product_aux_value_2", "Product"."aux_unit_3" AS "Product_aux_unit_3",
|
|
85
|
-
"Product"."aux_value_3" AS "Product_aux_value_3", "Product"."inventory_account_code" AS "Product_inventory_account_code", "Product"."cogs_account_code" AS "Product_cogs_account_code",
|
|
86
|
-
"Product"."movement" AS "Product_movement", "Product"."buffer_qty" AS "Product_buffer_qty", "Product"."min_qty" AS "Product_min_qty", "Product"."max_qty" AS "Product_max_qty", "Product"."discount_id" AS "Product_discount_id",
|
|
87
|
-
"Product"."status" AS "Product_status", "Product"."is_tracked_as_inventory" AS "Product_is_tracked_as_inventory", "Product"."created_at" AS "Product_created_at",
|
|
88
|
-
"Product"."updated_at" AS "Product_updated_at", "Product"."domain_id" AS "Product_domain_id", "Product"."bizplace_id" AS "Product_bizplace_id",
|
|
89
|
-
"Product"."product_set_id" AS "Product_product_set_id", "Product"."creator_id" AS "Product_creator_id", "Product"."updater_id" AS "Product_updater_id",
|
|
104
|
+
SELECT "Product"."product_id" AS "Product_id", "Product"."product_sku" AS "Product_sku",
|
|
105
|
+
"Product"."product_name" AS "Product_name", "Product"."product_description" AS "Product_description",
|
|
106
|
+
"Product"."product_bizplace_id" AS "Product_bizplace_id",
|
|
107
|
+
"Product"."creator_id" AS "Product_creator_id", "Product"."updater_id" AS "Product_updater_id",
|
|
90
108
|
"Bizplace"."name" AS "Bizplace_name", "Bizplace"."description" AS "Bizplace_description", "Bizplace"."address" AS "Bizplace_address", "Bizplace"."postal_code" AS "Bizplace_postal_code",
|
|
91
109
|
"Bizplace"."latlng" AS "Bizplace_latlng", "Bizplace"."status" AS "Bizplace_status", "Bizplace"."created_at" AS "Bizplace_created_at", "Bizplace"."updated_at" AS "Bizplace_updated_at",
|
|
92
110
|
"Bizplace"."domain_id" AS "Bizplace_domain_id", "Bizplace"."company_id" AS "Bizplace_company_id", "Bizplace"."creator_id" AS "Bizplace_creator_id", "Bizplace"."updater_id" AS "Bizplace_updater_id",
|
|
@@ -94,24 +112,23 @@ async function warehouseMarketplaceProduct(params, domain, user, tx) {
|
|
|
94
112
|
"Updater"."id" AS "Updater_id", "Updater"."name" AS "Updater_name", "Updater"."description" AS "Updater_description", "Updater"."email" AS "Updater_email"
|
|
95
113
|
,COALESCE("whInv"."Json_warehouseInventory", null) AS "Json_warehouseInventory"
|
|
96
114
|
,COALESCE("mktPrd"."Json_marketplaceProducts", null) AS "Json_marketplaceProducts"
|
|
97
|
-
FROM "
|
|
98
|
-
LEFT JOIN "bizplaces" "Bizplace" ON "Bizplace"."id"="Product"."
|
|
115
|
+
FROM "temp_products" "Product"
|
|
116
|
+
LEFT JOIN "bizplaces" "Bizplace" ON "Bizplace"."id" = "Product"."product_bizplace_id"
|
|
99
117
|
LEFT JOIN "users" "Creator" ON "Creator"."id"="Product"."creator_id"
|
|
100
118
|
LEFT JOIN "users" "Updater" ON "Updater"."id"="Product"."updater_id"
|
|
101
|
-
LEFT JOIN "temp_json_warehouse_inventory" "whInv" ON "whInv"."product_id" = "Product"."
|
|
102
|
-
LEFT JOIN "temp_json_warehouse_marketplace_products" "mktPrd" ON "mktPrd"."product_id" = "Product"."
|
|
103
|
-
WHERE "Product"."bizplace_id" IN (${bizplaceIds})
|
|
104
|
-
${productQuery}
|
|
119
|
+
LEFT JOIN "temp_json_warehouse_inventory" "whInv" ON "whInv"."product_id" = "Product"."product_id"
|
|
120
|
+
LEFT JOIN "temp_json_warehouse_marketplace_products" "mktPrd" ON "mktPrd"."product_id" = "Product"."product_id"
|
|
105
121
|
)
|
|
106
122
|
`);
|
|
107
|
-
const offsetQuery = (params === null || params === void 0 ? void 0 : params.pagination)
|
|
123
|
+
const offsetQuery = (params === null || params === void 0 ? void 0 : params.pagination)
|
|
124
|
+
? `OFFSET ${(params.pagination.page - 1) * params.pagination.limit} LIMIT ${params.pagination.limit}`
|
|
108
125
|
: '';
|
|
109
126
|
const total = await tx.query(`select count(*) from temp_warehouse_marketplace_products`);
|
|
110
127
|
const items = await tx.query(`
|
|
111
128
|
select * from temp_warehouse_marketplace_products ${offsetQuery}
|
|
112
129
|
`);
|
|
113
130
|
tx.query(`
|
|
114
|
-
drop table temp_json_warehouse_marketplace_products, temp_json_warehouse_inventory, temp_warehouse_marketplace_products
|
|
131
|
+
drop table temp_products, temp_json_warehouse_marketplace_products, temp_json_warehouse_inventory, temp_warehouse_marketplace_products
|
|
115
132
|
`);
|
|
116
133
|
return {
|
|
117
134
|
items: items.map((itm, index) => {
|
package/dist-server/graphql/resolvers/interface-with-hub/warehouse-marketplace-products.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"warehouse-marketplace-products.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/interface-with-hub/warehouse-marketplace-products.ts"],"names":[],"mappings":";;;AACA,uDAAsF;AACtF,+DAAsD;AAIzC,QAAA,oCAAoC,GAAG;IAClD,KAAK,CAAC,4BAA4B,CAAC,CAAM,EAAE,MAAiB,EAAE,OAAY;QACxE,IAAI;YACF,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAsD,OAAO,CAAC,KAAK,CAAA;YAC7F,OAAO,2BAA2B,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,CAAC,CAAA;SAC7D;QAAC,OAAO,KAAK,EAAE;YACd,MAAM,KAAK,CAAA;SACZ;IACH,CAAC;CACF,CAAA;AAEM,KAAK,UAAU,2BAA2B,CAAC,MAAiB,EAAE,MAAc,EAAE,IAAU,EAAE,EAAkB;IACjH,MAAM,cAAc,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,IAAI,cAAc,CAAC,CAAA;IAC3E,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,IAAI,cAAc,CAAC,CAAA;IAEpE,MAAM,eAAe,GAAa,MAAM,6BAAkB,
|
|
1
|
+
{"version":3,"file":"warehouse-marketplace-products.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/interface-with-hub/warehouse-marketplace-products.ts"],"names":[],"mappings":";;;AACA,uDAAsF;AACtF,+DAAsD;AAIzC,QAAA,oCAAoC,GAAG;IAClD,KAAK,CAAC,4BAA4B,CAAC,CAAM,EAAE,MAAiB,EAAE,OAAY;QACxE,IAAI;YACF,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAsD,OAAO,CAAC,KAAK,CAAA;YAC7F,OAAO,2BAA2B,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,CAAC,CAAA;SAC7D;QAAC,OAAO,KAAK,EAAE;YACd,MAAM,KAAK,CA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A;oBACH,CAAC,CAAC;oBACJ,CAAC,CAAC,IAAI;aACT,CAAA;QACH,CAAC,CAAC;QACF,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK;KACtB,CAAA;AACH,CAAC;AA3KD,kEA2KC"}
|
|
@@ -23,14 +23,14 @@ exports.autoLinkWarehouseMarketplaceProductVariationsResolver = {
|
|
|
23
23
|
async function linkMarketplaceProductVariations({ domain, user, tag, marketplaceStoreIds, isCheckedSku, tx }) {
|
|
24
24
|
try {
|
|
25
25
|
const params = { filters: [], sortings: [] };
|
|
26
|
-
const warehouseMarketplaceProducts = await warehouse_marketplace_products_1.warehouseMarketplaceProduct(params, domain, user, tx);
|
|
26
|
+
const warehouseMarketplaceProducts = await (0, warehouse_marketplace_products_1.warehouseMarketplaceProduct)(params, domain, user, tx);
|
|
27
27
|
const marketplaceProducts = await tx.getRepository(marketplace_base_1.MarketplaceProduct).find({
|
|
28
|
-
where: { domain, marketplaceStore: typeorm_1.In(marketplaceStoreIds) }
|
|
28
|
+
where: { domain, marketplaceStore: (0, typeorm_1.In)(marketplaceStoreIds) }
|
|
29
29
|
});
|
|
30
30
|
let marketplaceProductVariations = await tx
|
|
31
31
|
.getRepository(marketplace_base_1.MarketplaceProductVariation)
|
|
32
32
|
.find({
|
|
33
|
-
where: { domain, marketplaceProduct: typeorm_1.In(marketplaceProducts.map(product => product.id)), sku: typeorm_1.IsNull() }
|
|
33
|
+
where: { domain, marketplaceProduct: (0, typeorm_1.In)(marketplaceProducts.map(product => product.id)), sku: (0, typeorm_1.IsNull)() }
|
|
34
34
|
});
|
|
35
35
|
let total = marketplaceProductVariations === null || marketplaceProductVariations === void 0 ? void 0 : marketplaceProductVariations.length;
|
|
36
36
|
const linkedProductVariations = await Promise.all(marketplaceProductVariations.map((productVariation, idx) => {
|
|
@@ -40,7 +40,7 @@ async function linkMarketplaceProductVariations({ domain, user, tag, marketplace
|
|
|
40
40
|
}
|
|
41
41
|
productVariation.sku = (foundSku === null || foundSku === void 0 ? void 0 : foundSku.sku) ? foundSku.sku : null;
|
|
42
42
|
productVariation.updater = user;
|
|
43
|
-
shell_1.publishProgress({
|
|
43
|
+
(0, shell_1.publishProgress)({
|
|
44
44
|
domain,
|
|
45
45
|
tag,
|
|
46
46
|
progress: Math.floor((idx / total) * 100),
|
|
@@ -51,7 +51,7 @@ async function linkMarketplaceProductVariations({ domain, user, tag, marketplace
|
|
|
51
51
|
await tx.getRepository(marketplace_base_1.MarketplaceProductVariation).save(linkedProductVariations);
|
|
52
52
|
}
|
|
53
53
|
catch (ex) {
|
|
54
|
-
shell_1.publishProgress({
|
|
54
|
+
(0, shell_1.publishProgress)({
|
|
55
55
|
domain,
|
|
56
56
|
tag,
|
|
57
57
|
progress: -1,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auto-link-warehouse-marketplace-product-variations.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/warehouse-product/auto-link-warehouse-marketplace-product-variations.ts"],"names":[],"mappings":";;;AAAA,iDAA+D;AAE/D,qCAAmD;AACnD,yGAAkG;AAClG,uEAAkG;AAErF,QAAA,qDAAqD,GAAG;IACnE,KAAK,CAAC,6CAA6C,CACjD,CAAM,EACN,EAAE,mBAAmB,EAAE,YAAY,EAAE,EACrC,OAAY;QAEZ,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAsD,OAAO,CAAC,KAAK,CAAA;QAE7F,MAAM,GAAG,GAAG,uBAAuB,CAAA;QAEnC,MAAM,gCAAgC,CAAC;YACrC,MAAM;YACN,IAAI;YACJ,GAAG;YACH,mBAAmB;YACnB,YAAY;YACZ,EAAE;SACH,CAAC,CAAA;QAEF,OAAO,IAAI,CAAA;IACb,CAAC;CACF,CAAA;AAED,KAAK,UAAU,gCAAgC,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,mBAAmB,EAAE,YAAY,EAAE,EAAE,EAAE;IAC1G,IAAI;QACF,MAAM,MAAM,GAAQ,EAAE,OAAO,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAA;QACjD,MAAM,4BAA4B,GAAG,MAAM,4DAA2B,
|
|
1
|
+
{"version":3,"file":"auto-link-warehouse-marketplace-product-variations.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/warehouse-product/auto-link-warehouse-marketplace-product-variations.ts"],"names":[],"mappings":";;;AAAA,iDAA+D;AAE/D,qCAAmD;AACnD,yGAAkG;AAClG,uEAAkG;AAErF,QAAA,qDAAqD,GAAG;IACnE,KAAK,CAAC,6CAA6C,CACjD,CAAM,EACN,EAAE,mBAAmB,EAAE,YAAY,EAAE,EACrC,OAAY;QAEZ,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,GAAsD,OAAO,CAAC,KAAK,CAAA;QAE7F,MAAM,GAAG,GAAG,uBAAuB,CAAA;QAEnC,MAAM,gCAAgC,CAAC;YACrC,MAAM;YACN,IAAI;YACJ,GAAG;YACH,mBAAmB;YACnB,YAAY;YACZ,EAAE;SACH,CAAC,CAAA;QAEF,OAAO,IAAI,CAAA;IACb,CAAC;CACF,CAAA;AAED,KAAK,UAAU,gCAAgC,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,mBAAmB,EAAE,YAAY,EAAE,EAAE,EAAE;IAC1G,IAAI;QACF,MAAM,MAAM,GAAQ,EAAE,OAAO,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAA;QACjD,MAAM,4BAA4B,GAAG,MAAM,IAAA,4DAA2B,EAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,CAAC,CAAA;QAEhG,MAAM,mBAAmB,GAAyB,MAAM,EAAE,CAAC,aAAa,CAAC,qCAAkB,CAAC,CAAC,IAAI,CAAC;YAChG,KAAK,EAAE,EAAE,MAAM,EAAE,gBAAgB,EAAE,IAAA,YAAE,EAAC,mBAAmB,CAAC,EAAE;SAC7D,CAAC,CAAA;QAEF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AAuB,CAAC,CAAA;KAClF;IAAC,OAAO,EAAE,EAAE;QACX,IAAA,uBAAe,EAAC;YACd,MAAM;YACN,GAAG;YACH,QAAQ,EAAE,CAAC,CAAC;YACZ,OAAO,EAAE,QAAQ;SAClB,CAAC,CAAA;QAEF,MAAM,EAAE,CAAA;KACT;AACH,CAAC"}
|
|
@@ -14,7 +14,7 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
14
14
|
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
15
|
if (mod && mod.__esModule) return mod;
|
|
16
16
|
var result = {};
|
|
17
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
18
|
__setModuleDefault(result, mod);
|
|
19
19
|
return result;
|
|
20
20
|
};
|
|
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.NewStockReplenishment = void 0;
|
|
7
7
|
const graphql_tag_1 = __importDefault(require("graphql-tag"));
|
|
8
|
-
exports.NewStockReplenishment = graphql_tag_1.default `
|
|
8
|
+
exports.NewStockReplenishment = (0, graphql_tag_1.default) `
|
|
9
9
|
input NewStockReplenishment {
|
|
10
10
|
name: String
|
|
11
11
|
description: String
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"new-stock-replenishment.js","sourceRoot":"","sources":["../../../../server/graphql/types/interface-with-hub/new-stock-replenishment.ts"],"names":[],"mappings":";;;;;;AAAA,8DAA6B;AAEhB,QAAA,qBAAqB,GAAG,qBAAG,
|
|
1
|
+
{"version":3,"file":"new-stock-replenishment.js","sourceRoot":"","sources":["../../../../server/graphql/types/interface-with-hub/new-stock-replenishment.ts"],"names":[],"mappings":";;;;;;AAAA,8DAA6B;AAEhB,QAAA,qBAAqB,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;CAyBvC,CAAA"}
|
|
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.ReplenishmentOrderProduct = void 0;
|
|
7
7
|
const graphql_tag_1 = __importDefault(require("graphql-tag"));
|
|
8
|
-
exports.ReplenishmentOrderProduct = graphql_tag_1.default `
|
|
8
|
+
exports.ReplenishmentOrderProduct = (0, graphql_tag_1.default) `
|
|
9
9
|
type ReplenishmentOrderProduct {
|
|
10
10
|
id: String
|
|
11
11
|
domain: Domain
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"replenishment-order-product.js","sourceRoot":"","sources":["../../../../server/graphql/types/interface-with-hub/replenishment-order-product.ts"],"names":[],"mappings":";;;;;;AAAA,8DAA6B;AAEhB,QAAA,yBAAyB,GAAG,qBAAG,
|
|
1
|
+
{"version":3,"file":"replenishment-order-product.js","sourceRoot":"","sources":["../../../../server/graphql/types/interface-with-hub/replenishment-order-product.ts"],"names":[],"mappings":";;;;;;AAAA,8DAA6B;AAEhB,QAAA,yBAAyB,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyC3C,CAAA"}
|
|
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.StockReplenishmentList = void 0;
|
|
7
7
|
const graphql_tag_1 = __importDefault(require("graphql-tag"));
|
|
8
|
-
exports.StockReplenishmentList = graphql_tag_1.default `
|
|
8
|
+
exports.StockReplenishmentList = (0, graphql_tag_1.default) `
|
|
9
9
|
type StockReplenishmentList {
|
|
10
10
|
items: [StockReplenishment]
|
|
11
11
|
total: Int
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stock-replenishment-list.js","sourceRoot":"","sources":["../../../../server/graphql/types/interface-with-hub/stock-replenishment-list.ts"],"names":[],"mappings":";;;;;;AAAA,8DAA6B;AAEhB,QAAA,sBAAsB,GAAG,qBAAG,
|
|
1
|
+
{"version":3,"file":"stock-replenishment-list.js","sourceRoot":"","sources":["../../../../server/graphql/types/interface-with-hub/stock-replenishment-list.ts"],"names":[],"mappings":";;;;;;AAAA,8DAA6B;AAEhB,QAAA,sBAAsB,GAAG,IAAA,qBAAG,EAAA;;;;;;;CAOxC,CAAA"}
|
|
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.StockReplenishment = void 0;
|
|
7
7
|
const graphql_tag_1 = __importDefault(require("graphql-tag"));
|
|
8
|
-
exports.StockReplenishment = graphql_tag_1.default `
|
|
8
|
+
exports.StockReplenishment = (0, graphql_tag_1.default) `
|
|
9
9
|
type StockReplenishment {
|
|
10
10
|
id: String
|
|
11
11
|
name: String
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stock-replenishment.js","sourceRoot":"","sources":["../../../../server/graphql/types/interface-with-hub/stock-replenishment.ts"],"names":[],"mappings":";;;;;;AAAA,8DAA6B;AAEhB,QAAA,kBAAkB,GAAG,qBAAG,
|
|
1
|
+
{"version":3,"file":"stock-replenishment.js","sourceRoot":"","sources":["../../../../server/graphql/types/interface-with-hub/stock-replenishment.ts"],"names":[],"mappings":";;;;;;AAAA,8DAA6B;AAEhB,QAAA,kBAAkB,GAAG,IAAA,qBAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsCpC,CAAA"}
|
|
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.WarehouseInventory = void 0;
|
|
7
7
|
const graphql_tag_1 = __importDefault(require("graphql-tag"));
|
|
8
|
-
exports.WarehouseInventory = graphql_tag_1.default `
|
|
8
|
+
exports.WarehouseInventory = (0, graphql_tag_1.default) `
|
|
9
9
|
type WarehouseInventory {
|
|
10
10
|
product: Product
|
|
11
11
|
qty: Int
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"warehouse-inventory.js","sourceRoot":"","sources":["../../../../server/graphql/types/interface-with-hub/warehouse-inventory.ts"],"names":[],"mappings":";;;;;;AAAA,8DAA6B;AAEhB,QAAA,kBAAkB,GAAG,qBAAG,
|
|
1
|
+
{"version":3,"file":"warehouse-inventory.js","sourceRoot":"","sources":["../../../../server/graphql/types/interface-with-hub/warehouse-inventory.ts"],"names":[],"mappings":";;;;;;AAAA,8DAA6B;AAEhB,QAAA,kBAAkB,GAAG,IAAA,qBAAG,EAAA;;;;;;;;CAQpC,CAAA"}
|
|
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.WarehouseMarketplaceProductList = void 0;
|
|
7
7
|
const graphql_tag_1 = __importDefault(require("graphql-tag"));
|
|
8
|
-
exports.WarehouseMarketplaceProductList = graphql_tag_1.default `
|
|
8
|
+
exports.WarehouseMarketplaceProductList = (0, graphql_tag_1.default) `
|
|
9
9
|
type WarehouseMarketplaceProductList {
|
|
10
10
|
items: [WarehouseMarketplaceProduct]
|
|
11
11
|
total: Int
|
package/dist-server/graphql/types/interface-with-hub/warehouse-marketplace-product-list.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"warehouse-marketplace-product-list.js","sourceRoot":"","sources":["../../../../server/graphql/types/interface-with-hub/warehouse-marketplace-product-list.ts"],"names":[],"mappings":";;;;;;AAAA,8DAA6B;AAEhB,QAAA,+BAA+B,GAAG,qBAAG,
|
|
1
|
+
{"version":3,"file":"warehouse-marketplace-product-list.js","sourceRoot":"","sources":["../../../../server/graphql/types/interface-with-hub/warehouse-marketplace-product-list.ts"],"names":[],"mappings":";;;;;;AAAA,8DAA6B;AAEhB,QAAA,+BAA+B,GAAG,IAAA,qBAAG,EAAA;;;;;CAKjD,CAAA"}
|
|
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.WarehouseMarketplaceProduct = void 0;
|
|
7
7
|
const graphql_tag_1 = __importDefault(require("graphql-tag"));
|
|
8
|
-
exports.WarehouseMarketplaceProduct = graphql_tag_1.default `
|
|
8
|
+
exports.WarehouseMarketplaceProduct = (0, graphql_tag_1.default) `
|
|
9
9
|
type WarehouseMarketplaceProduct {
|
|
10
10
|
seq: Int
|
|
11
11
|
id: String
|