@things-factory/operato-mms 3.8.11 → 3.8.12
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/client/pages/inventory/inventory-by-product.js +17 -4
- package/dist-server/graphql/resolvers/interface-with-hub/warehouse-marketplace-products.js +3 -2
- package/dist-server/graphql/resolvers/interface-with-hub/warehouse-marketplace-products.js.map +1 -1
- package/package.json +4 -4
- package/server/graphql/resolvers/interface-with-hub/warehouse-marketplace-products.ts +5 -3
- package/translations/en.json +1 -0
- package/translations/ko.json +1 -0
- package/translations/ms.json +1 -0
- package/translations/zh.json +1 -0
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import '@things-factory/form-ui'
|
|
2
2
|
import '@things-factory/grist-ui'
|
|
3
|
-
|
|
4
|
-
import { client, PageView, gqlContext } from '@things-factory/shell'
|
|
5
|
-
import { ScrollbarStyles, CommonButtonStyles } from '@things-factory/styles'
|
|
6
|
-
import { gqlBuilder, isMobileDevice } from '@things-factory/utils'
|
|
3
|
+
|
|
7
4
|
import gql from 'graphql-tag'
|
|
8
5
|
import { css, html } from 'lit-element'
|
|
9
6
|
|
|
7
|
+
import { i18next, localize } from '@things-factory/i18n-base'
|
|
8
|
+
import { client, gqlContext, PageView } from '@things-factory/shell'
|
|
9
|
+
import { CommonButtonStyles, ScrollbarStyles } from '@things-factory/styles'
|
|
10
|
+
import { gqlBuilder, isMobileDevice } from '@things-factory/utils'
|
|
11
|
+
|
|
10
12
|
class InventoryByProduct extends localize(i18next)(PageView) {
|
|
11
13
|
static get styles() {
|
|
12
14
|
return [
|
|
@@ -170,6 +172,7 @@ class InventoryByProduct extends localize(i18next)(PageView) {
|
|
|
170
172
|
id
|
|
171
173
|
name
|
|
172
174
|
qty
|
|
175
|
+
reserveQty
|
|
173
176
|
}
|
|
174
177
|
}
|
|
175
178
|
warehouseInventory{
|
|
@@ -214,6 +217,7 @@ class InventoryByProduct extends localize(i18next)(PageView) {
|
|
|
214
217
|
if (existingGroup) {
|
|
215
218
|
existingGroup[mp.marketplaceStore.id + '_store'] = mpv.name
|
|
216
219
|
existingGroup[mp.marketplaceStore.id + '_qty'] = mpv.qty
|
|
220
|
+
existingGroup[mp.marketplaceStore.id + '_reserveQty'] = mpv.reserveQty
|
|
217
221
|
existingGroup[mp.marketplaceStore.id + '_variationId'] = mpv.id
|
|
218
222
|
} else {
|
|
219
223
|
data.push({
|
|
@@ -223,6 +227,7 @@ class InventoryByProduct extends localize(i18next)(PageView) {
|
|
|
223
227
|
name: item.name,
|
|
224
228
|
[mp.marketplaceStore.id + '_store']: mpv.name,
|
|
225
229
|
[mp.marketplaceStore.id + '_qty']: mpv.qty,
|
|
230
|
+
[mp.marketplaceStore.id + '_reserveQty']: mpv.reserveQty,
|
|
226
231
|
[mp.marketplaceStore.id + '_variationId']: mpv.id
|
|
227
232
|
})
|
|
228
233
|
}
|
|
@@ -348,6 +353,14 @@ class InventoryByProduct extends localize(i18next)(PageView) {
|
|
|
348
353
|
record: { editable: true, align: 'left' },
|
|
349
354
|
width: 60
|
|
350
355
|
})
|
|
356
|
+
stores.push({
|
|
357
|
+
type: 'number',
|
|
358
|
+
name: store.id.toString() + '_reserveQty',
|
|
359
|
+
header: i18next.t('field.reserve_qty'),
|
|
360
|
+
sortable: false,
|
|
361
|
+
record: { align: 'left' },
|
|
362
|
+
width: 60
|
|
363
|
+
})
|
|
351
364
|
})
|
|
352
365
|
|
|
353
366
|
this.config = {
|
|
@@ -64,7 +64,7 @@ async function warehouseMarketplaceProduct(params, domain, user, tx) {
|
|
|
64
64
|
select "dt"."marketplace_store_id", "dt"."product_id", "dt"."sku", array_agg(row_to_json(dt)) as product_variation
|
|
65
65
|
from (
|
|
66
66
|
select "mp"."marketplace_store_id" as "marketplace_store_id", "mpv"."sku", "mpv"."id" as "marketplace_product_variation_id",
|
|
67
|
-
concat("mpv"."variation_sku", ' (', "mpv"."name", ')') as "name", "mpv"."qty" as "qty",
|
|
67
|
+
concat("mpv"."variation_sku", ' (', "mpv"."name", ')') as "name", "mpv"."qty" as "qty", "mpv"."reserve_qty" as "reserve_qty",
|
|
68
68
|
"Product"."product_id" AS "product_id"
|
|
69
69
|
from marketplace_product_variations "mpv"
|
|
70
70
|
inner join marketplace_products "mp" on "mp"."id" = "mpv"."marketplace_product_id"
|
|
@@ -146,7 +146,8 @@ async function warehouseMarketplaceProduct(params, domain, user, tx) {
|
|
|
146
146
|
return {
|
|
147
147
|
id: variation.marketplace_product_variation_id,
|
|
148
148
|
name: variation.name,
|
|
149
|
-
qty: variation.qty
|
|
149
|
+
qty: variation.qty,
|
|
150
|
+
reserveQty: variation.reserve_qty
|
|
150
151
|
};
|
|
151
152
|
})
|
|
152
153
|
};
|
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":";;;
|
|
1
|
+
{"version":3,"file":"warehouse-marketplace-products.js","sourceRoot":"","sources":["../../../../server/graphql/resolvers/interface-with-hub/warehouse-marketplace-products.ts"],"names":[],"mappings":";;;AAGA,uDAAsF;AACtF,+DAAsD;AAGzC,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,MAA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AK,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK;KACtB,CAAA;AACH,CAAC;AA5KD,kEA4KC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/operato-mms",
|
|
3
|
-
"version": "3.8.
|
|
3
|
+
"version": "3.8.12",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"@things-factory/integration-fulfillment": "^3.8.3",
|
|
62
62
|
"@things-factory/integration-lmd": "^3.8.0",
|
|
63
63
|
"@things-factory/lite-menu": "^3.8.0",
|
|
64
|
-
"@things-factory/marketplace-base": "^3.8.
|
|
64
|
+
"@things-factory/marketplace-base": "^3.8.12",
|
|
65
65
|
"@things-factory/more-ui": "^3.8.0",
|
|
66
66
|
"@things-factory/notification": "^3.8.0",
|
|
67
67
|
"@things-factory/oauth2-client": "^3.8.0",
|
|
@@ -99,11 +99,11 @@
|
|
|
99
99
|
"@things-factory/scene-wheel-sorter": "^3.7.5",
|
|
100
100
|
"@things-factory/setting-ui": "^3.8.0",
|
|
101
101
|
"@things-factory/system-ui": "^3.8.0",
|
|
102
|
-
"@things-factory/warehouse-base": "^3.8.
|
|
102
|
+
"@things-factory/warehouse-base": "^3.8.12"
|
|
103
103
|
},
|
|
104
104
|
"devDependencies": {
|
|
105
105
|
"@things-factory/builder": "^3.7.5",
|
|
106
106
|
"@types/node-fetch": "^2.5.7"
|
|
107
107
|
},
|
|
108
|
-
"gitHead": "
|
|
108
|
+
"gitHead": "8c183f820cce8f335d326ddbc8c7922fb6cf4bde"
|
|
109
109
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { EntityManager } from 'typeorm'
|
|
2
|
+
|
|
1
3
|
import { User } from '@things-factory/auth-base'
|
|
2
4
|
import { Bizplace, getCompanyBizplace, getMyBizplace } from '@things-factory/biz-base'
|
|
3
5
|
import { Product } from '@things-factory/product-base'
|
|
4
6
|
import { Domain, ListParam } from '@things-factory/shell'
|
|
5
|
-
import { EntityManager } from 'typeorm'
|
|
6
7
|
|
|
7
8
|
export const warehouseMarketplaceProductsResolver = {
|
|
8
9
|
async warehouseMarketplaceProducts(_: any, params: ListParam, context: any): Promise<any> {
|
|
@@ -71,7 +72,7 @@ export async function warehouseMarketplaceProduct(params: ListParam, domain: Dom
|
|
|
71
72
|
select "dt"."marketplace_store_id", "dt"."product_id", "dt"."sku", array_agg(row_to_json(dt)) as product_variation
|
|
72
73
|
from (
|
|
73
74
|
select "mp"."marketplace_store_id" as "marketplace_store_id", "mpv"."sku", "mpv"."id" as "marketplace_product_variation_id",
|
|
74
|
-
concat("mpv"."variation_sku", ' (', "mpv"."name", ')') as "name", "mpv"."qty" as "qty",
|
|
75
|
+
concat("mpv"."variation_sku", ' (', "mpv"."name", ')') as "name", "mpv"."qty" as "qty", "mpv"."reserve_qty" as "reserve_qty",
|
|
75
76
|
"Product"."product_id" AS "product_id"
|
|
76
77
|
from marketplace_product_variations "mpv"
|
|
77
78
|
inner join marketplace_products "mp" on "mp"."id" = "mpv"."marketplace_product_id"
|
|
@@ -164,7 +165,8 @@ export async function warehouseMarketplaceProduct(params: ListParam, domain: Dom
|
|
|
164
165
|
return {
|
|
165
166
|
id: variation.marketplace_product_variation_id,
|
|
166
167
|
name: variation.name,
|
|
167
|
-
qty: variation.qty
|
|
168
|
+
qty: variation.qty,
|
|
169
|
+
reserveQty: variation.reserve_qty
|
|
168
170
|
}
|
|
169
171
|
})
|
|
170
172
|
}
|
package/translations/en.json
CHANGED
|
@@ -114,6 +114,7 @@
|
|
|
114
114
|
"field.required_branch": "required branch",
|
|
115
115
|
"field.required_sender": "required sender",
|
|
116
116
|
"field.required_tracking": "required tracking",
|
|
117
|
+
"field.reserve_qty": "reserve qty",
|
|
117
118
|
"field.ro_created": "ro created",
|
|
118
119
|
"field.save": "save",
|
|
119
120
|
"field.seller_shipping_fee_voucher": "seller shipping fee voucher",
|
package/translations/ko.json
CHANGED
|
@@ -114,6 +114,7 @@
|
|
|
114
114
|
"field.required_branch": "[ko] required branch",
|
|
115
115
|
"field.required_sender": "[ko] required sender",
|
|
116
116
|
"field.required_tracking": "[ko] required tracking",
|
|
117
|
+
"field.reserve_qty": "[ko] reserve qty",
|
|
117
118
|
"field.ro_created": "[ko] ro created",
|
|
118
119
|
"field.save": "[ko] save",
|
|
119
120
|
"field.seller_shipping_fee_voucher": "[ko] seller shipping fee voucher",
|
package/translations/ms.json
CHANGED
|
@@ -114,6 +114,7 @@
|
|
|
114
114
|
"field.required_branch": "[ms] required branch",
|
|
115
115
|
"field.required_sender": "[ms] required sender",
|
|
116
116
|
"field.required_tracking": "[ms] required tracking",
|
|
117
|
+
"field.reserve_qty": "[ms] reserve qty",
|
|
117
118
|
"field.ro_created": "[ms] ro created",
|
|
118
119
|
"field.save": "[ms] save",
|
|
119
120
|
"field.seller_shipping_fee_voucher": "[ms] seller shipping fee voucher",
|
package/translations/zh.json
CHANGED
|
@@ -114,6 +114,7 @@
|
|
|
114
114
|
"field.required_branch": "[zh] required branch",
|
|
115
115
|
"field.required_sender": "[zh] required sender",
|
|
116
116
|
"field.required_tracking": "[zh] required tracking",
|
|
117
|
+
"field.reserve_qty": "[zh] reserve qty",
|
|
117
118
|
"field.ro_created": "[zh] ro created",
|
|
118
119
|
"field.save": "[zh] save",
|
|
119
120
|
"field.seller_shipping_fee_voucher": "[zh] seller shipping fee voucher",
|