@things-factory/operato-mms 4.1.18 → 4.1.23

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.
@@ -451,11 +451,14 @@ class RequestROPopup extends LitElement {
451
451
  let marketplaceOrderShippings = []
452
452
 
453
453
  marketplaceOrderItems.map(item => {
454
- const marketplaceOrderShipping = item.marketplaceOrderShipping
454
+ const marketplaceOrderShippingItems = item.marketplaceOrderShippingItems
455
+ marketplaceOrderShippingItems.map(itm => {
456
+ const marketplaceOrderShipping = itm.marketplaceOrderShipping
455
457
 
456
- if (marketplaceOrderShipping) {
457
- marketplaceOrderShippings.push(marketplaceOrderShipping)
458
- }
458
+ if (marketplaceOrderShipping) {
459
+ marketplaceOrderShippings.push(marketplaceOrderShipping)
460
+ }
461
+ })
459
462
  })
460
463
 
461
464
  const uniqueMarketplaceOrderShippings = Array.from(new Set(marketplaceOrderShippings.map(a => a.id))).map(id => {
@@ -10,82 +10,120 @@ const shell_1 = require("@things-factory/shell");
10
10
  const warehouse_base_1 = require("@things-factory/warehouse-base");
11
11
  exports.autoUpdateAllMarketplaceProductVariationQuantityResolver = {
12
12
  async autoUpdateAllMarketplaceProductVariationQuantity(_, { companyDomainId, warehouseId }, context) {
13
- var _a, _b;
14
- try {
15
- const { tx } = context.state;
16
- const companyDomain = await (0, typeorm_1.getRepository)(shell_1.Domain).findOne(companyDomainId);
17
- const productVariations = await (0, typeorm_1.getRepository)(marketplace_base_1.MarketplaceProductVariation).find({
18
- where: { domain: companyDomain },
19
- relations: [
20
- 'marketplaceProduct',
21
- 'marketplaceProduct.marketplaceStore',
22
- 'marketplaceProduct.marketplaceStore.marketplaceDistributors',
23
- 'creator',
24
- 'updater'
25
- ]
13
+ const companyDomain = await (0, typeorm_1.getRepository)(shell_1.Domain).findOne(companyDomainId);
14
+ const marketplaceStores = await (0, typeorm_1.getRepository)(integration_marketplace_1.MarketplaceStore).find({
15
+ where: { domain: companyDomain, status: 'ACTIVE' },
16
+ relations: ['marketplaceDistributors']
17
+ });
18
+ const fulfilmentCenter = await integration_fulfillment_1.FulfillmentAPI.getFulfillmentCenter(warehouseId);
19
+ const centerId = fulfilmentCenter.centerId;
20
+ const warehouseDomain = await (0, typeorm_1.getRepository)(shell_1.Domain).findOne({ where: { subdomain: centerId } });
21
+ let products = await (0, typeorm_1.getRepository)(product_base_1.Product).find({
22
+ where: { domain: companyDomain },
23
+ relations: ['productDetails']
24
+ });
25
+ let inventoryProducts = await Promise.all(products.map(async (product) => {
26
+ const productDetails = product.productDetails;
27
+ const defaultProductDetail = productDetails.filter(productDetail => productDetail.isDefault)[0];
28
+ let qb = await (0, typeorm_1.getRepository)(warehouse_base_1.Inventory).createQueryBuilder('inv');
29
+ qb.leftJoinAndSelect('inv.location', 'loc')
30
+ .andWhere('"inv"."domain_id" = :domainId')
31
+ .andWhere('"inv"."product_id" = :productId')
32
+ .andWhere('"inv"."status" != :status')
33
+ .andWhere('"loc"."type" NOT IN (:...locationTypes)')
34
+ .setParameters({
35
+ domainId: warehouseDomain.id,
36
+ productId: product.id,
37
+ status: warehouse_base_1.INVENTORY_STATUS.TERMINATED,
38
+ locationTypes: [warehouse_base_1.LOCATION_TYPE.QUARANTINE, warehouse_base_1.LOCATION_TYPE.RESERVE]
26
39
  });
27
- for (var i = 0; i < productVariations.length; i++) {
28
- const productVariation = productVariations[i];
29
- const sku = productVariation.sku;
30
- let warehouseProductQty = 0;
31
- if (sku) {
32
- const fulfilmentCenter = await integration_fulfillment_1.FulfillmentAPI.getFulfillmentCenter(warehouseId);
33
- const centerId = fulfilmentCenter.centerId;
34
- const warehouseDomain = await (0, typeorm_1.getRepository)(shell_1.Domain).findOne({ where: { subdomain: centerId } });
35
- const product = await (0, typeorm_1.getRepository)(product_base_1.Product).findOne({ where: { domain: companyDomain, sku } });
36
- const qb = await (0, typeorm_1.getRepository)(warehouse_base_1.Inventory).createQueryBuilder('INV');
37
- qb.select('SUM(INV.qty - INV.locked_qty)', 'remainQty')
38
- .where('"INV"."domain_id" = :domainId', { domainId: warehouseDomain.id })
39
- .andWhere('"INV"."product_id" = :productId', { productId: product.id })
40
- .andWhere('"INV"."status" = :invStatus', { invStatus: 'STORED' })
41
- .groupBy('"INV".product_id');
42
- const item = await qb.getRawOne();
43
- if (item)
44
- warehouseProductQty += parseFloat(item.remainQty) || 0;
45
- }
46
- const marketplaceStore = (_a = productVariation === null || productVariation === void 0 ? void 0 : productVariation.marketplaceProduct) === null || _a === void 0 ? void 0 : _a.marketplaceStore;
47
- const hasVariation = (_b = productVariation === null || productVariation === void 0 ? void 0 : productVariation.marketplaceProduct) === null || _b === void 0 ? void 0 : _b.hasVariation;
48
- if (marketplaceStore) {
49
- //Lazada Product quantity data update -> {sku, qty}
50
- //Shopee Product quantity data update -> variation = false: {itemId, qty} | variation = true: {itemId, variationId, qty}
51
- const productVariationQty = productVariation.qty || 0;
52
- const productVariationReserveQty = productVariation.reserveQty || 0;
53
- let adjustQty = productVariationQty == warehouseProductQty
54
- ? productVariationQty - productVariationReserveQty
55
- : warehouseProductQty - productVariationReserveQty;
56
- let productVariationLocationId = productVariation.locationId;
57
- if (marketplaceStore.platform === 'SHOPIFY') {
58
- adjustQty = productVariationReserveQty;
59
- let locationIds = JSON.parse(productVariationLocationId);
60
- productVariationLocationId = locationIds[0].location_id;
61
- }
62
- if (hasVariation) {
63
- await integration_marketplace_1.StoreAPI.updateStoreProductVariationStock(marketplaceStore, [
64
- {
65
- itemId: productVariation.marketplaceProduct.itemId,
66
- variationId: productVariation.variationId,
67
- qty: adjustQty,
68
- locationId: productVariationLocationId,
69
- inventoryItemId: productVariation.inventoryItemId
70
- }
71
- ]);
72
- }
73
- else {
74
- await integration_marketplace_1.StoreAPI.updateStoreProductStock(marketplaceStore, [
75
- {
76
- itemId: productVariation.marketplaceProduct.itemId,
77
- variationId: productVariation.variationId,
78
- variationSku: productVariation.variationSku,
79
- qty: adjustQty,
80
- distributors: marketplaceStore.marketplaceDistributors
40
+ let inventories = await qb.getMany();
41
+ const inventoryQty = inventories.reduce((total, currentValue) => {
42
+ total += currentValue.qty;
43
+ return total;
44
+ }, 0);
45
+ const inventoryLockedQty = inventories.reduce((total, currentValue) => {
46
+ total += currentValue.lockedQty;
47
+ return total;
48
+ }, 0);
49
+ return {
50
+ product,
51
+ sku: product.sku,
52
+ name: product.name,
53
+ packingType: defaultProductDetail.packingType,
54
+ packingSize: defaultProductDetail.packingSize,
55
+ uom: defaultProductDetail.uom,
56
+ qty: inventoryQty - inventoryLockedQty
57
+ };
58
+ }));
59
+ await (0, typeorm_1.getConnection)().transaction(async (tx) => {
60
+ let bundleProductInventories = await (0, warehouse_base_1.getProductBundleInventory)(warehouseDomain, companyDomain, inventoryProducts, tx);
61
+ bundleProductInventories.map(bundleProductInventory => {
62
+ inventoryProducts.push(bundleProductInventory);
63
+ });
64
+ });
65
+ for (let i = 0; i < marketplaceStores.length; i++) {
66
+ try {
67
+ const marketplaceStore = marketplaceStores[i];
68
+ const marketplaceSetting = await (0, typeorm_1.getRepository)(integration_marketplace_1.MarketplaceSetting).findOne({
69
+ where: { marketplaceStore, category: 'stock_allocation' }
70
+ });
71
+ for (let j = 0; j < inventoryProducts.length; j++) {
72
+ await (0, typeorm_1.getConnection)().transaction(async (tx) => {
73
+ var _a;
74
+ const inventoryProduct = inventoryProducts[j];
75
+ const marketplaceProductVariations = await tx
76
+ .getRepository(marketplace_base_1.MarketplaceProductVariation)
77
+ .find({
78
+ where: { domain: companyDomain, sku: inventoryProduct.sku },
79
+ relations: ['marketplaceProduct', 'marketplaceProduct.marketplaceStore']
80
+ });
81
+ let storeProductVariations = marketplaceProductVariations.filter(productVariation => productVariation.marketplaceProduct.marketplaceStore.id === marketplaceStore.id);
82
+ let percentageValue = 100;
83
+ if (storeProductVariations) {
84
+ for (let k = 0; k < storeProductVariations.length; k++) {
85
+ let storeProductVariation = storeProductVariations[k];
86
+ if (marketplaceSetting) {
87
+ percentageValue = parseInt(marketplaceSetting.value);
88
+ }
89
+ let remainQty = Math.floor((inventoryProduct.qty - storeProductVariation.reserveQty) * (percentageValue / 100));
90
+ if (remainQty < 0)
91
+ remainQty = 0;
92
+ let productVariationLocationId = storeProductVariation === null || storeProductVariation === void 0 ? void 0 : storeProductVariation.locationId;
93
+ let adjustQty = remainQty;
94
+ if (marketplaceStore.platform === 'shopify') {
95
+ let locationIds = JSON.parse(productVariationLocationId);
96
+ adjustQty = adjustQty - storeProductVariation.qty;
97
+ if ((_a = locationIds[0]) === null || _a === void 0 ? void 0 : _a.location_id)
98
+ productVariationLocationId = locationIds[0].location_id;
99
+ }
100
+ let validMarketplaceDistributors = [];
101
+ if (marketplaceStore.marketplaceDistributors) {
102
+ validMarketplaceDistributors = marketplaceStore.marketplaceDistributors.filter(distributor => distributor.status === 'ACTIVE');
103
+ }
104
+ await integration_marketplace_1.StoreAPI.updateStoreProductVariationStock(marketplaceStore, [
105
+ {
106
+ itemId: storeProductVariation.marketplaceProduct.itemId,
107
+ variationId: storeProductVariation.variationId,
108
+ variationSku: storeProductVariation.variationSku,
109
+ qty: adjustQty,
110
+ locationId: productVariationLocationId,
111
+ inventoryItemId: storeProductVariation.inventoryItemId,
112
+ distributors: validMarketplaceDistributors
113
+ }
114
+ ]);
115
+ storeProductVariation.qty = remainQty;
116
+ await tx.getRepository(marketplace_base_1.MarketplaceProductVariation).save(storeProductVariation);
81
117
  }
82
- ]);
83
- }
118
+ }
119
+ });
84
120
  }
85
121
  }
86
- return true;
122
+ catch (e) {
123
+ console.log(e);
124
+ }
87
125
  }
88
- catch (ex) { }
126
+ return true;
89
127
  }
90
128
  };
91
129
  //# sourceMappingURL=auto-update-all-marketplace-product-variation-quantity.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"auto-update-all-marketplace-product-variation-quantity.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/interface-with-hub/auto-update-all-marketplace-product-variation-quantity.ts"],"names":[],"mappings":";;;AAAA,qCAA0E;AAE1E,qFAAwE;AACxE,qFAAkE;AACl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AA;oBACtD,IAAI,0BAA0B,GAAG,gBAAgB,CAAC,UAAU,CAAA;oBAC5D,IAAI,gBAAgB,CAAC,QAAQ,KAAK,SAAS,EAAE;wBAC3C,SAAS,GAAG,0BAA0B,CAAA;wBAEtC,IAAI,WAAW,GAAU,IAAI,CAAC,KAAK,CAAC,0BAA0B,CAAC,CAAA;wBAC/D,0BAA0B,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC,WAAW,CAAA;qBACxD;oBAED,IAAI,YAAY,EAAE;wBAChB,MAAM,kCAAQ,CAAC,gCAAgC,CAAC,gBAAgB,EAAE;4BAChE;gCACE,MAAM,EAAE,gBAAgB,CAAC,kBAAkB,CAAC,MAAM;gCAClD,WAAW,EAAE,gBAAgB,CAAC,WAAW;gCACzC,GAAG,EAAE,SAAS;gCACd,UAAU,EAAE,0BAA0B;gCACtC,eAAe,EAAE,gBAAgB,CAAC,eAAe;6BAClD;yBACF,CAAC,CAAA;qBACH;yBAAM;wBACL,MAAM,kCAAQ,CAAC,uBAAuB,CAAC,gBAAgB,EAAE;4BACvD;gCACE,MAAM,EAAE,gBAAgB,CAAC,kBAAkB,CAAC,MAAM;gCAClD,WAAW,EAAE,gBAAgB,CAAC,WAAW;gCACzC,YAAY,EAAE,gBAAgB,CAAC,YAAY;gCAC3C,GAAG,EAAE,SAAS;gCACd,YAAY,EAAE,gBAAgB,CAAC,uBAAuB;6BACvD;yBACF,CAAC,CAAA;qBACH;iBACF;aACF;YAED,OAAO,IAAI,CAAA;SACZ;QAAC,OAAO,EAAE,EAAE,GAAE;IACjB,CAAC;CACF,CAAA"}
1
+ {"version":3,"file":"auto-update-all-marketplace-product-variation-quantity.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/interface-with-hub/auto-update-all-marketplace-product-variation-quantity.ts"],"names":[],"mappings":";;;AAAA,qCAAsD;AAEtD,qFAAwE;AACxE,qFAAwG;AACxG,uEAA8E;AAC9E,+DAAqE;AACrE,iDAA8C;AAC9C,mEAAsH;AAEz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M,CAC5E,WAAW,CAAC,EAAE,CAAC,WAAW,CAAC,MAAM,KAAK,QAAQ,CAC/C,CAAA;iCACF;gCAED,MAAM,kCAAQ,CAAC,gCAAgC,CAAC,gBAAgB,EAAE;oCAChE;wCACE,MAAM,EAAE,qBAAqB,CAAC,kBAAkB,CAAC,MAAM;wCACvD,WAAW,EAAE,qBAAqB,CAAC,WAAW;wCAC9C,YAAY,EAAE,qBAAqB,CAAC,YAAY;wCAChD,GAAG,EAAE,SAAS;wCACd,UAAU,EAAE,0BAA0B;wCACtC,eAAe,EAAE,qBAAqB,CAAC,eAAe;wCACtD,YAAY,EAAE,4BAA4B;qCAC3C;iCACF,CAAC,CAAA;gCAEF,qBAAqB,CAAC,GAAG,GAAG,SAAS,CAAA;gCACrC,MAAM,EAAE,CAAC,aAAa,CAAC,8CAA2B,CAAC,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAA;6BAChF;yBACF;oBACH,CAAC,CAAC,CAAA;iBACH;aACF;YAAC,OAAO,CAAC,EAAE;gBACV,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;aACf;SACF;QAED,OAAO,IAAI,CAAA;IACb,CAAC;CACF,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"warehouse-marketplace-products.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/interface-with-hub/warehouse-marketplace-products.ts"],"names":[],"mappings":";;;AAGA,uDAAsF;AAIzE,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;AA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CAAC,SAAS,CAAC,oBAAoB,CAAC,CAAC,CAAC,SAAS,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC;yBAClG,CAAA;oBACH,CAAC,CAAC;oBACF,CAAC,CAAC,IAAI;aACT,CAAA;QACH,CAAC,CAAC;QACF,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK;KACtB,CAAA;AACH,CAAC;AAnND,kEAmNC"}
1
+ {"version":3,"file":"warehouse-marketplace-products.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/interface-with-hub/warehouse-marketplace-products.ts"],"names":[],"mappings":";;;AAGA,uDAAsF;AAGzE,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,IAAA,6BAAkB,EAAC,MAAM,EAAE,IAAI,CAAC,CAAA;IACxE,MAAM,UAAU,GAAa,MAAM,IAAA,wBAAa,EAAC,MAAM,EAAE,IAAI,CAA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S,CAAC,EAAE;gCACtE,OAAO;oCACL,EAAE,EAAE,SAAS,CAAC,gCAAgC;oCAC9C,IAAI,EAAE,SAAS,CAAC,IAAI;oCACpB,GAAG,EAAE,SAAS,CAAC,GAAG;oCAClB,UAAU,EAAE,SAAS,CAAC,WAAW;iCAClC,CAAA;4BACH,CAAC,CAAC;yBACH,CAAA;oBACH,CAAC,CAAC;oBACJ,CAAC,CAAC,IAAI;gBACR,kBAAkB,EAAE,GAAG,CAAC,uBAAuB;oBAC7C,CAAC,CAAC,GAAG,CAAC,uBAAuB,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE;wBAC1C,OAAO;4BACL,QAAQ,EAAE,EAAE,EAAE,EAAE,SAAS,CAAC,cAAc,EAAE,IAAI,EAAE,SAAS,CAAC,gBAAgB,EAAE;4BAC5E,OAAO,EAAE,EAAE,EAAE,EAAE,SAAS,CAAC,UAAU,EAAE;4BACrC,GAAG,EAAE,SAAS,CAAC,aAAa;4BAC5B,SAAS,EAAE,SAAS,CAAC,oBAAoB,CAAC,CAAC,CAAC,SAAS,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC;4BAC9E,SAAS,EACP,SAAS,CAAC,aAAa,GAAG,CAAC,SAAS,CAAC,oBAAoB,CAAC,CAAC,CAAC,SAAS,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC;yBAClG,CAAA;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;AAzND,kEAyNC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/operato-mms",
3
- "version": "4.1.18",
3
+ "version": "4.1.23",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -60,50 +60,50 @@
60
60
  "@operato/scene-table": "^0.1.5",
61
61
  "@operato/scene-timer": "^0.1.5",
62
62
  "@operato/scene-wheel-sorter": "^0.1.5",
63
- "@things-factory/apptool-ui": "^4.1.18",
64
- "@things-factory/attachment-base": "^4.1.18",
65
- "@things-factory/auth-ui": "^4.1.18",
66
- "@things-factory/biz-base": "^4.1.18",
67
- "@things-factory/board-service": "^4.1.18",
68
- "@things-factory/board-ui": "^4.1.18",
69
- "@things-factory/code-ui": "^4.1.18",
70
- "@things-factory/context-ui": "^4.1.18",
71
- "@things-factory/dashboard": "^4.1.18",
72
- "@things-factory/export-ui": "^4.1.18",
73
- "@things-factory/export-ui-csv": "^4.1.18",
74
- "@things-factory/export-ui-excel": "^4.1.18",
75
- "@things-factory/geography": "^4.1.18",
76
- "@things-factory/grist-ui": "^4.1.18",
77
- "@things-factory/help": "^4.1.18",
78
- "@things-factory/i18n-base": "^4.1.18",
79
- "@things-factory/integration-fulfillment": "^4.1.18",
80
- "@things-factory/integration-lmd": "^4.1.18",
81
- "@things-factory/lite-menu": "^4.1.18",
82
- "@things-factory/marketplace-base": "^4.1.18",
83
- "@things-factory/more-ui": "^4.1.18",
84
- "@things-factory/notification": "^4.1.18",
85
- "@things-factory/oauth2-client": "^4.1.18",
86
- "@things-factory/pdf": "^4.1.18",
87
- "@things-factory/product-base": "^4.1.18",
88
- "@things-factory/resource-ui": "^4.1.18",
89
- "@things-factory/scene-data-transform": "^4.1.18",
90
- "@things-factory/scene-excel": "^4.1.18",
91
- "@things-factory/scene-firebase": "^4.1.18",
92
- "@things-factory/scene-form": "^4.1.18",
93
- "@things-factory/scene-google-map": "^4.1.18",
94
- "@things-factory/scene-graphql": "^4.1.18",
95
- "@things-factory/scene-label": "^4.1.18",
96
- "@things-factory/scene-marker": "^4.1.18",
97
- "@things-factory/scene-mqtt": "^4.1.18",
98
- "@things-factory/scene-restful": "^4.1.18",
99
- "@things-factory/scene-visualizer": "^4.1.18",
100
- "@things-factory/setting-ui": "^4.1.18",
101
- "@things-factory/system-ui": "^4.1.18",
102
- "@things-factory/warehouse-base": "^4.1.18"
63
+ "@things-factory/apptool-ui": "^4.1.22",
64
+ "@things-factory/attachment-base": "^4.1.22",
65
+ "@things-factory/auth-ui": "^4.1.22",
66
+ "@things-factory/biz-base": "^4.1.22",
67
+ "@things-factory/board-service": "^4.1.22",
68
+ "@things-factory/board-ui": "^4.1.22",
69
+ "@things-factory/code-ui": "^4.1.22",
70
+ "@things-factory/context-ui": "^4.1.22",
71
+ "@things-factory/dashboard": "^4.1.22",
72
+ "@things-factory/export-ui": "^4.1.22",
73
+ "@things-factory/export-ui-csv": "^4.1.22",
74
+ "@things-factory/export-ui-excel": "^4.1.22",
75
+ "@things-factory/geography": "^4.1.22",
76
+ "@things-factory/grist-ui": "^4.1.22",
77
+ "@things-factory/help": "^4.1.22",
78
+ "@things-factory/i18n-base": "^4.1.22",
79
+ "@things-factory/integration-fulfillment": "^4.1.22",
80
+ "@things-factory/integration-lmd": "^4.1.22",
81
+ "@things-factory/lite-menu": "^4.1.22",
82
+ "@things-factory/marketplace-base": "^4.1.22",
83
+ "@things-factory/more-ui": "^4.1.22",
84
+ "@things-factory/notification": "^4.1.22",
85
+ "@things-factory/oauth2-client": "^4.1.22",
86
+ "@things-factory/pdf": "^4.1.19",
87
+ "@things-factory/product-base": "^4.1.22",
88
+ "@things-factory/resource-ui": "^4.1.22",
89
+ "@things-factory/scene-data-transform": "^4.1.19",
90
+ "@things-factory/scene-excel": "^4.1.19",
91
+ "@things-factory/scene-firebase": "^4.1.19",
92
+ "@things-factory/scene-form": "^4.1.19",
93
+ "@things-factory/scene-google-map": "^4.1.19",
94
+ "@things-factory/scene-graphql": "^4.1.19",
95
+ "@things-factory/scene-label": "^4.1.22",
96
+ "@things-factory/scene-marker": "^4.1.19",
97
+ "@things-factory/scene-mqtt": "^4.1.19",
98
+ "@things-factory/scene-restful": "^4.1.19",
99
+ "@things-factory/scene-visualizer": "^4.1.19",
100
+ "@things-factory/setting-ui": "^4.1.22",
101
+ "@things-factory/system-ui": "^4.1.22",
102
+ "@things-factory/warehouse-base": "^4.1.22"
103
103
  },
104
104
  "devDependencies": {
105
- "@things-factory/builder": "^4.1.18",
105
+ "@things-factory/builder": "^4.1.19",
106
106
  "@types/node-fetch": "^2.5.7"
107
107
  },
108
- "gitHead": "64b0a3a1ddc1556e2c7bb93e195f6aca610ae823"
108
+ "gitHead": "f13228576595836d2a4c2e5412adf412c0f82f33"
109
109
  }
@@ -1,99 +1,159 @@
1
- import { EntityManager, getRepository, SelectQueryBuilder } from 'typeorm'
1
+ import { getConnection, getRepository } from 'typeorm'
2
2
 
3
3
  import { FulfillmentAPI } from '@things-factory/integration-fulfillment'
4
- import { StoreAPI } from '@things-factory/integration-marketplace'
4
+ import { MarketplaceSetting, MarketplaceStore, StoreAPI } from '@things-factory/integration-marketplace'
5
5
  import { MarketplaceProductVariation } from '@things-factory/marketplace-base'
6
- import { Product } from '@things-factory/product-base'
6
+ import { Product, ProductDetail } from '@things-factory/product-base'
7
7
  import { Domain } from '@things-factory/shell'
8
- import { Inventory } from '@things-factory/warehouse-base'
8
+ import { getProductBundleInventory, Inventory, INVENTORY_STATUS, LOCATION_TYPE } from '@things-factory/warehouse-base'
9
9
 
10
10
  export const autoUpdateAllMarketplaceProductVariationQuantityResolver = {
11
11
  async autoUpdateAllMarketplaceProductVariationQuantity(_: any, { companyDomainId, warehouseId }, context: any) {
12
- try {
13
- const { tx }: { tx: EntityManager } = context.state
14
-
15
- const companyDomain: Domain = await getRepository(Domain).findOne(companyDomainId)
16
-
17
- const productVariations: MarketplaceProductVariation[] = await getRepository(MarketplaceProductVariation).find({
18
- where: { domain: companyDomain },
19
- relations: [
20
- 'marketplaceProduct',
21
- 'marketplaceProduct.marketplaceStore',
22
- 'marketplaceProduct.marketplaceStore.marketplaceDistributors',
23
- 'creator',
24
- 'updater'
25
- ]
26
- })
12
+ const companyDomain: Domain = await getRepository(Domain).findOne(companyDomainId)
13
+
14
+ const marketplaceStores: MarketplaceStore[] = await getRepository(MarketplaceStore).find({
15
+ where: { domain: companyDomain, status: 'ACTIVE' },
16
+ relations: ['marketplaceDistributors']
17
+ })
18
+
19
+ const fulfilmentCenter = await FulfillmentAPI.getFulfillmentCenter(warehouseId)
20
+ const centerId: string = fulfilmentCenter.centerId
21
+ const warehouseDomain: Domain = await getRepository(Domain).findOne({ where: { subdomain: centerId } })
22
+
23
+ let products: Product[] = await getRepository(Product).find({
24
+ where: { domain: companyDomain },
25
+ relations: ['productDetails']
26
+ })
27
+
28
+ let inventoryProducts: any[] = await Promise.all(
29
+ products.map(async product => {
30
+ const productDetails: ProductDetail[] = product.productDetails
31
+ const defaultProductDetail: ProductDetail = productDetails.filter(productDetail => productDetail.isDefault)[0]
32
+
33
+ let qb = await getRepository(Inventory).createQueryBuilder('inv')
34
+ qb.leftJoinAndSelect('inv.location', 'loc')
35
+ .andWhere('"inv"."domain_id" = :domainId')
36
+ .andWhere('"inv"."product_id" = :productId')
37
+ .andWhere('"inv"."status" != :status')
38
+ .andWhere('"loc"."type" NOT IN (:...locationTypes)')
39
+ .setParameters({
40
+ domainId: warehouseDomain.id,
41
+ productId: product.id,
42
+ status: INVENTORY_STATUS.TERMINATED,
43
+ locationTypes: [LOCATION_TYPE.QUARANTINE, LOCATION_TYPE.RESERVE]
44
+ })
27
45
 
28
- for (var i = 0; i < productVariations.length; i++) {
29
- const productVariation: MarketplaceProductVariation = productVariations[i]
30
-
31
- const sku: string = productVariation.sku
32
-
33
- let warehouseProductQty: number = 0
34
- if (sku) {
35
- const fulfilmentCenter = await FulfillmentAPI.getFulfillmentCenter(warehouseId)
36
- const centerId: string = fulfilmentCenter.centerId
37
- const warehouseDomain: Domain = await getRepository(Domain).findOne({ where: { subdomain: centerId } })
38
- const product: Product = await getRepository(Product).findOne({ where: { domain: companyDomain, sku } })
39
- const qb: SelectQueryBuilder<Inventory> = await getRepository(Inventory).createQueryBuilder('INV')
40
- qb.select('SUM(INV.qty - INV.locked_qty)', 'remainQty')
41
- .where('"INV"."domain_id" = :domainId', { domainId: warehouseDomain.id })
42
- .andWhere('"INV"."product_id" = :productId', { productId: product.id })
43
- .andWhere('"INV"."status" = :invStatus', { invStatus: 'STORED' })
44
- .groupBy('"INV".product_id')
45
-
46
- const item: any = await qb.getRawOne()
47
- if (item) warehouseProductQty += parseFloat(item.remainQty) || 0
46
+ let inventories: Inventory[] = await qb.getMany()
47
+
48
+ const inventoryQty: number = inventories.reduce((total, currentValue) => {
49
+ total += currentValue.qty
50
+ return total
51
+ }, 0)
52
+
53
+ const inventoryLockedQty: number = inventories.reduce((total, currentValue) => {
54
+ total += currentValue.lockedQty
55
+ return total
56
+ }, 0)
57
+
58
+ return {
59
+ product,
60
+ sku: product.sku,
61
+ name: product.name,
62
+ packingType: defaultProductDetail.packingType,
63
+ packingSize: defaultProductDetail.packingSize,
64
+ uom: defaultProductDetail.uom,
65
+ qty: inventoryQty - inventoryLockedQty
48
66
  }
67
+ })
68
+ )
49
69
 
50
- const marketplaceStore = productVariation?.marketplaceProduct?.marketplaceStore
51
- const hasVariation = productVariation?.marketplaceProduct?.hasVariation
52
-
53
- if (marketplaceStore) {
54
- //Lazada Product quantity data update -> {sku, qty}
55
- //Shopee Product quantity data update -> variation = false: {itemId, qty} | variation = true: {itemId, variationId, qty}
56
-
57
- const productVariationQty: number = productVariation.qty || 0
58
- const productVariationReserveQty: number = productVariation.reserveQty || 0
59
-
60
- let adjustQty =
61
- productVariationQty == warehouseProductQty
62
- ? productVariationQty - productVariationReserveQty
63
- : warehouseProductQty - productVariationReserveQty
64
- let productVariationLocationId = productVariation.locationId
65
- if (marketplaceStore.platform === 'SHOPIFY') {
66
- adjustQty = productVariationReserveQty
67
-
68
- let locationIds: any[] = JSON.parse(productVariationLocationId)
69
- productVariationLocationId = locationIds[0].location_id
70
- }
71
-
72
- if (hasVariation) {
73
- await StoreAPI.updateStoreProductVariationStock(marketplaceStore, [
74
- {
75
- itemId: productVariation.marketplaceProduct.itemId,
76
- variationId: productVariation.variationId,
77
- qty: adjustQty,
78
- locationId: productVariationLocationId,
79
- inventoryItemId: productVariation.inventoryItemId
80
- }
81
- ])
82
- } else {
83
- await StoreAPI.updateStoreProductStock(marketplaceStore, [
84
- {
85
- itemId: productVariation.marketplaceProduct.itemId,
86
- variationId: productVariation.variationId,
87
- variationSku: productVariation.variationSku,
88
- qty: adjustQty,
89
- distributors: marketplaceStore.marketplaceDistributors
70
+ await getConnection().transaction(async tx => {
71
+ let bundleProductInventories: any[] = await getProductBundleInventory(
72
+ warehouseDomain,
73
+ companyDomain,
74
+ inventoryProducts,
75
+ tx
76
+ )
77
+
78
+ bundleProductInventories.map(bundleProductInventory => {
79
+ inventoryProducts.push(bundleProductInventory)
80
+ })
81
+ })
82
+
83
+ for (let i = 0; i < marketplaceStores.length; i++) {
84
+ try {
85
+ const marketplaceStore: MarketplaceStore = marketplaceStores[i]
86
+
87
+ const marketplaceSetting: MarketplaceSetting = await getRepository(MarketplaceSetting).findOne({
88
+ where: { marketplaceStore, category: 'stock_allocation' }
89
+ })
90
+
91
+ for (let j = 0; j < inventoryProducts.length; j++) {
92
+ await getConnection().transaction(async tx => {
93
+ const inventoryProduct = inventoryProducts[j]
94
+ const marketplaceProductVariations: MarketplaceProductVariation[] = await tx
95
+ .getRepository(MarketplaceProductVariation)
96
+ .find({
97
+ where: { domain: companyDomain, sku: inventoryProduct.sku },
98
+ relations: ['marketplaceProduct', 'marketplaceProduct.marketplaceStore']
99
+ })
100
+
101
+ let storeProductVariations: MarketplaceProductVariation[] = marketplaceProductVariations.filter(
102
+ productVariation => productVariation.marketplaceProduct.marketplaceStore.id === marketplaceStore.id
103
+ )
104
+
105
+ let percentageValue: number = 100
106
+ if (storeProductVariations) {
107
+ for (let k = 0; k < storeProductVariations.length; k++) {
108
+ let storeProductVariation: MarketplaceProductVariation = storeProductVariations[k]
109
+ if (marketplaceSetting) {
110
+ percentageValue = parseInt(marketplaceSetting.value)
111
+ }
112
+
113
+ let remainQty: number = Math.floor(
114
+ (inventoryProduct.qty - storeProductVariation.reserveQty) * (percentageValue / 100)
115
+ )
116
+ if (remainQty < 0) remainQty = 0
117
+
118
+ let productVariationLocationId = storeProductVariation?.locationId
119
+ let adjustQty: number = remainQty
120
+
121
+ if (marketplaceStore.platform === 'shopify') {
122
+ let locationIds: any[] = JSON.parse(productVariationLocationId)
123
+ adjustQty = adjustQty - storeProductVariation.qty
124
+ if (locationIds[0]?.location_id) productVariationLocationId = locationIds[0].location_id
125
+ }
126
+
127
+ let validMarketplaceDistributors: any[] = []
128
+ if (marketplaceStore.marketplaceDistributors) {
129
+ validMarketplaceDistributors = marketplaceStore.marketplaceDistributors.filter(
130
+ distributor => distributor.status === 'ACTIVE'
131
+ )
132
+ }
133
+
134
+ await StoreAPI.updateStoreProductVariationStock(marketplaceStore, [
135
+ {
136
+ itemId: storeProductVariation.marketplaceProduct.itemId,
137
+ variationId: storeProductVariation.variationId,
138
+ variationSku: storeProductVariation.variationSku,
139
+ qty: adjustQty,
140
+ locationId: productVariationLocationId,
141
+ inventoryItemId: storeProductVariation.inventoryItemId,
142
+ distributors: validMarketplaceDistributors
143
+ }
144
+ ])
145
+
146
+ storeProductVariation.qty = remainQty
147
+ await tx.getRepository(MarketplaceProductVariation).save(storeProductVariation)
90
148
  }
91
- ])
92
- }
149
+ }
150
+ })
93
151
  }
152
+ } catch (e) {
153
+ console.log(e)
94
154
  }
155
+ }
95
156
 
96
- return true
97
- } catch (ex) {}
157
+ return true
98
158
  }
99
159
  }
@@ -2,7 +2,6 @@ import { EntityManager } from 'typeorm'
2
2
 
3
3
  import { User } from '@things-factory/auth-base'
4
4
  import { Bizplace, getCompanyBizplace, getMyBizplace } from '@things-factory/biz-base'
5
- import { Product } from '@things-factory/product-base'
6
5
  import { Domain, ListParam } from '@things-factory/shell'
7
6
 
8
7
  export const warehouseMarketplaceProductsResolver = {
@@ -66,7 +65,8 @@ export async function warehouseMarketplaceProduct(params: ListParam, domain: Dom
66
65
  )
67
66
  `)
68
67
 
69
- await tx.query(`
68
+ await tx.query(
69
+ `
70
70
  CREATE TEMP TABLE "temp_inventory" ON COMMIT DROP AS (
71
71
  select "fc"."id" as "fulfillment_id", "fc"."name" as "fulfillment_name",
72
72
  "i2"."product_id", SUM(greatest(coalesce("locked_qty",0),0) + greatest(coalesce(oi.release_qty,0),0)) as "inventory_locked_qty", sum(coalesce("qty",0)) as "inventory_qty",
@@ -108,7 +108,9 @@ export async function warehouseMarketplaceProduct(params: ListParam, domain: Dom
108
108
  and "i2"."status" = 'STORED'
109
109
  group by "i2"."domain_id", "fc"."id", "fc"."name", "i2"."product_id"
110
110
  )
111
- `, [domain.id])
111
+ `,
112
+ [domain.id]
113
+ )
112
114
 
113
115
  await tx.query(`
114
116
  CREATE TEMP TABLE "temp_json_warehouse_marketplace_products" ON COMMIT DROP AS (
@@ -127,7 +129,8 @@ export async function warehouseMarketplaceProduct(params: ListParam, domain: Dom
127
129
  )
128
130
  `)
129
131
 
130
- await tx.query(`
132
+ await tx.query(
133
+ `
131
134
  CREATE TEMP TABLE temp_json_warehouse_inventory ON COMMIT DROP AS (
132
135
  select "product_id", array_to_json(array_agg((row_to_json("dt")))) AS "Json_warehouseInventory" from(
133
136
  select "domain_id", "fulfillment_id", "fulfillment_name",
@@ -152,7 +155,9 @@ export async function warehouseMarketplaceProduct(params: ListParam, domain: Dom
152
155
  group by "domain_id","fulfillment_id","fulfillment_name","product_id"
153
156
  ) "dt" group by "dt"."product_id"
154
157
  )
155
- `, [domain.id])
158
+ `,
159
+ [domain.id]
160
+ )
156
161
 
157
162
  await tx.query(`
158
163
  CREATE TEMP TABLE temp_warehouse_marketplace_products ON COMMIT DROP as (
@@ -198,30 +203,30 @@ export async function warehouseMarketplaceProduct(params: ListParam, domain: Dom
198
203
  description: itm.Product_description,
199
204
  marketplaceProduct: itm.Json_marketplaceProducts
200
205
  ? itm.Json_marketplaceProducts.map(product => {
201
- return {
202
- marketplaceStore: { id: product.marketplace_store_id },
203
- marketplaceProductVariations: product.product_variation.map(variation => {
204
- return {
205
- id: variation.marketplace_product_variation_id,
206
- name: variation.name,
207
- qty: variation.qty,
208
- reserveQty: variation.reserve_qty
209
- }
210
- })
211
- }
212
- })
206
+ return {
207
+ marketplaceStore: { id: product.marketplace_store_id },
208
+ marketplaceProductVariations: product.product_variation.map(variation => {
209
+ return {
210
+ id: variation.marketplace_product_variation_id,
211
+ name: variation.name,
212
+ qty: variation.qty,
213
+ reserveQty: variation.reserve_qty
214
+ }
215
+ })
216
+ }
217
+ })
213
218
  : null,
214
219
  warehouseInventory: itm.Json_warehouseInventory
215
220
  ? itm.Json_warehouseInventory.map(inventory => {
216
- return {
217
- bizplace: { id: inventory.fulfillment_id, name: inventory.fulfillment_name },
218
- product: { id: inventory.product_id },
219
- qty: inventory.inventory_qty,
220
- lockedQty: inventory.inventory_locked_qty ? inventory.inventory_locked_qty : 0,
221
- remainQty:
222
- inventory.inventory_qty - (inventory.inventory_locked_qty ? inventory.inventory_locked_qty : 0)
223
- }
224
- })
221
+ return {
222
+ bizplace: { id: inventory.fulfillment_id, name: inventory.fulfillment_name },
223
+ product: { id: inventory.product_id },
224
+ qty: inventory.inventory_qty,
225
+ lockedQty: inventory.inventory_locked_qty ? inventory.inventory_locked_qty : 0,
226
+ remainQty:
227
+ inventory.inventory_qty - (inventory.inventory_locked_qty ? inventory.inventory_locked_qty : 0)
228
+ }
229
+ })
225
230
  : null
226
231
  }
227
232
  }),
@@ -1,88 +0,0 @@
1
- module.exports = {
2
- domainType: 'company',
3
- ormconfig: {
4
- name: 'default',
5
- type: 'sqlite',
6
- database: 'db.sqlite',
7
- synchronize: false,
8
- logging: true,
9
- logger: 'debug'
10
- // name: 'default',
11
- // type: 'postgres',
12
- // database: 'postgres',
13
- // username: 'postgres',
14
- // password: 'abcd1234',
15
- // host: 'localhost',
16
- // port: 15432,
17
- // synchronize: true,
18
- // logging: true
19
- },
20
- oauth2: {
21
- platforms: [
22
- {
23
- name: 'Operato Hub',
24
- apiURL: 'http://operato-m.localhost:3000/api'
25
- }
26
- ]
27
- },
28
- useVirtualHostBasedDomain: false,
29
- port: 5000,
30
- uploads: 'uploads',
31
- attachmentsPath: 'attachments',
32
- SECRET: '0xD58F835B69D207A76CC5F84a70a1D0d4C79dfC95',
33
- logger: {
34
- file: {
35
- filename: 'logs/application-%DATE%.log',
36
- datePattern: 'YYYY-MM-DD-HH',
37
- zippedArchive: true,
38
- maxSize: '200m',
39
- maxFiles: '1m',
40
- level: 'info'
41
- }
42
- },
43
- fulfillmentIntegrationOperato: {
44
- host: 'operatohub.com',
45
- platform: 'operato',
46
- application: 'Operato MMS',
47
- appKey: '480d19cbfb0655357878119559d47333',
48
- appSecret: 'dc5078bc17d50a18ef6fc3188934bbbd',
49
- callback: 'https://www.myoperato.com/callback-operato'
50
- },
51
- marketplaceIntegrationShopee: {
52
- platform: 'shopee',
53
- isUAT: false,
54
- application: 'Operato MMS',
55
- partnerId: 846025,
56
- partnerKey: 'd34cfd85a603f196a0d74ebe08043280c1a27788bb36bdffd61e7e0bb1c90b64'
57
- },
58
- marketplaceIntegrationLazada: {
59
- platform: 'lazada',
60
- application: 'operato-mms',
61
- appKey: '120961',
62
- appSecret: 'HB3RTNEXHlVSlBr9SmWF8AjbSUT7a825',
63
- callback: 'https://myoperato.com/lazada-callback'
64
- },
65
- notification: {
66
- fcm: {
67
- serviceAccount: {
68
- project_id: 'operato',
69
- private_key:
70
- '-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDYNOfyNjPMSeG9\nzU1qs0cpVK5cVfadcUaw5g+hkQZMOMlAA7uqW2eX4vkayj7MzbYUayH+sei8044Q\nJIyl6f26dNX1VT3UgTmSmCS0v48EBEZHCgusrUGFjduLRN6OS6uvrXW1xKA18k9q\nai1C2EHCXF2AE4PTvf239RC1UIOnVePcMtT7rMTdHRO4s8OKVuSDbzIt8k1cV3Zt\nES0YsJlkELqBisYpV//2/ZSILTt39J9JzrVef03X9kkoo9p+YnNyy6tWsfQP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Gq+fM3KXJVv2R6J62mXQOfg4xyDLpWlwcBK4aSBBMoiBcsjouqSlZQlqMpdf\nZBgixqHe6U8BsFJg/6ZxC0y+e3AIss4Bo4/lb+1lAoGAFOexvaBh21K6W3inmRW4\nLlkVYJaBJ20OwokXg5aXjBiHxqmk7VLAuFbkpb5LOKH2xPILRQ0OEkn51yVymS3T\n9lLpHOFTQXt5tF2/F7NW7kaQJNlLr/h5jPi3O9XHeFmuaN2z150ZB6zzgjeGKzr8\ni+1fgTsRfDtNw8xkSH9qL1Y=\n-----END PRIVATE KEY-----\n',
71
- client_email: 'firebase-adminsdk-xmm2e@operato.iam.gserviceaccount.com'
72
- },
73
- appConfig: {
74
- apiKey: 'AIzaSyDdTM2BTLHSt2LNS0G5QB8G0i4KBXFiG7U',
75
- projectId: 'operato',
76
- messagingSenderId: 79537064975,
77
- appId: '1:79537064975:web:32f53119e9c8c6ee2a277a'
78
- },
79
- serverKey:
80
- 'AAAAEoTHTA8:APA91bGwt-4HT82Dfwf_VwbQaKT0_qHd0Y3tuW41udjWz5Lz0Ko0mEMD6WbHHSILvQpa6yuoGGKCMsrU7VW2qWRrUm3CYpyG9oSwshNm1tIhljAnOuUfwHCoawbVLwf9qlWpHt4dwCoc'
81
- },
82
- vapidKey: {
83
- subject: 'mailto:heartyoh@hatiolab.com',
84
- publicKey: 'BAkVkITsCXBIsYL1yeaBmx5_dn57we-ZXMjirPPHzC2dan82cdEnAio_53PQ-1_w3ykWCBPrrFAWQ_d9N4cFF0o',
85
- privateKey: '4pmlt3Wk019u7nqU3Q_oGZE6LbUDjjf8DpmAcn9-iss'
86
- }
87
- }
88
- }