@things-factory/integration-sellercraft 4.3.32 → 4.3.33

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/integration-sellercraft",
3
- "version": "4.3.32",
3
+ "version": "4.3.33",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -31,7 +31,7 @@
31
31
  "@things-factory/context-ui": "^4.3.32",
32
32
  "@things-factory/grist-ui": "^4.3.32",
33
33
  "@things-factory/i18n-base": "^4.3.32",
34
- "@things-factory/integration-marketplace": "^4.3.32",
34
+ "@things-factory/integration-marketplace": "^4.3.33",
35
35
  "@things-factory/integration-ui": "^4.3.32",
36
36
  "@things-factory/more-ui": "^4.3.32",
37
37
  "@things-factory/resource-ui": "^4.3.32",
@@ -51,5 +51,5 @@
51
51
  "nock": "^13.0.2",
52
52
  "should": "^13.2.3"
53
53
  },
54
- "gitHead": "0c5bd74405efd1db48838320c9afa68811c3e37a"
54
+ "gitHead": "e4f9100eef61d010cca0a9692f413f60be2e462c"
55
55
  }
@@ -85,7 +85,8 @@ export class MarketplaceChannelOrderMutation {
85
85
  orderUpdatedAt: updatedAt,
86
86
  status,
87
87
  sellercraftStatus,
88
- isSOF
88
+ isSOF,
89
+ orderLineList
89
90
  } = order
90
91
 
91
92
  let {
@@ -288,9 +289,14 @@ export class MarketplaceChannelOrderMutation {
288
289
  let mappedOrderItems = []
289
290
  orderItems.map(oi => {
290
291
  for (let i = 0; i < oi.qty; i++) {
292
+ let orderLine
293
+ if (orderLineList) {
294
+ orderLine = orderLineList?.find(ol => ol.sku_id == oi.variationId) || null
295
+ orderLineList = orderLineList.filter(ol => ol.order_line_id != orderLine.order_line_id)
296
+ }
291
297
  mappedOrderItems.push({
292
298
  ...oi,
293
- id: `${oi.id}-${i + 1}`
299
+ id: orderLine ? orderLine.order_line_id : `${oi.id}-${i + 1}`
294
300
  })
295
301
  }
296
302
  })