@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,10 +1,14 @@
|
|
|
1
|
-
import { MultiColumnFormStyles } from '@things-factory/form-ui'
|
|
2
1
|
import '@things-factory/grist-ui'
|
|
2
|
+
|
|
3
|
+
import gql from 'graphql-tag'
|
|
4
|
+
import { css, html, LitElement } from 'lit-element'
|
|
5
|
+
|
|
6
|
+
import { MultiColumnFormStyles } from '@things-factory/form-ui'
|
|
3
7
|
import { i18next, localize } from '@things-factory/i18n-base'
|
|
4
8
|
import { client, CustomAlert } from '@things-factory/shell'
|
|
5
9
|
import { isMobileDevice } from '@things-factory/utils'
|
|
6
|
-
|
|
7
|
-
import {
|
|
10
|
+
|
|
11
|
+
import { PLATFORM } from '../../constants'
|
|
8
12
|
|
|
9
13
|
class LazadaOrderInitBatchPopup extends localize(i18next)(LitElement) {
|
|
10
14
|
static get properties() {
|
|
@@ -64,6 +68,24 @@ class LazadaOrderInitBatchPopup extends localize(i18next)(LitElement) {
|
|
|
64
68
|
return html`
|
|
65
69
|
<search-form id="search-form" .fields=${this._searchFields} @submit=${e => this.grist.fetch()}></search-form>
|
|
66
70
|
|
|
71
|
+
<div name="batchUpdate" class="multi-column-form">
|
|
72
|
+
<label>${i18next.t('label.own_shipping_provider')}</label>
|
|
73
|
+
<select name="ownShippingProvider-select">
|
|
74
|
+
<option value="">${i18next.t('text.select_courier')}</option>
|
|
75
|
+
${(this.ownShippingProviders || []).map(
|
|
76
|
+
shippingProvider => html` <option value="${shippingProvider.name}">${shippingProvider.name}</option> `
|
|
77
|
+
)}
|
|
78
|
+
</select>
|
|
79
|
+
|
|
80
|
+
<div class="set-button-container">
|
|
81
|
+
<mwc-button
|
|
82
|
+
@click="${e => this.setShippingProvider()}"
|
|
83
|
+
raised
|
|
84
|
+
label="${i18next.t('button.set')}"
|
|
85
|
+
></mwc-button>
|
|
86
|
+
</div>
|
|
87
|
+
</div>
|
|
88
|
+
|
|
67
89
|
<div class="grist">
|
|
68
90
|
<data-grist
|
|
69
91
|
id="grist"
|
|
@@ -74,6 +96,11 @@ class LazadaOrderInitBatchPopup extends localize(i18next)(LitElement) {
|
|
|
74
96
|
></data-grist>
|
|
75
97
|
</div>
|
|
76
98
|
<div class="button-container">
|
|
99
|
+
<mwc-button
|
|
100
|
+
@click="${this.splitOrders.bind(this)}"
|
|
101
|
+
raised
|
|
102
|
+
label="${i18next.t('button.split_order')}"
|
|
103
|
+
></mwc-button>
|
|
77
104
|
<mwc-button
|
|
78
105
|
@click="${this.initLogistics.bind(this)}"
|
|
79
106
|
raised
|
|
@@ -99,10 +126,27 @@ class LazadaOrderInitBatchPopup extends localize(i18next)(LitElement) {
|
|
|
99
126
|
return this.shadowRoot.querySelector('select[name=pickupdate-select]')
|
|
100
127
|
}
|
|
101
128
|
|
|
129
|
+
get ownShippingProviderSelect() {
|
|
130
|
+
return this.shadowRoot.querySelector('select[name=ownShippingProvider-select]')
|
|
131
|
+
}
|
|
132
|
+
|
|
102
133
|
get gristConfig() {
|
|
134
|
+
const maxWeight = this.maxWeightSetting[0].value
|
|
103
135
|
return {
|
|
104
136
|
list: { fields: ['name', 'marketplaceStore', 'itemCount', 'totalAmount', 'status', 'updatedAt'] },
|
|
105
|
-
rows: {
|
|
137
|
+
rows: {
|
|
138
|
+
selectable: { multiple: true },
|
|
139
|
+
appendable: false,
|
|
140
|
+
classifier: function (record, rowIndex) {
|
|
141
|
+
const totalWeight = record['totalWeight']
|
|
142
|
+
var emphasized
|
|
143
|
+
if (totalWeight > maxWeight) {
|
|
144
|
+
emphasized = ['#F43838', 'yellow']
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
return { emphasized }
|
|
148
|
+
}
|
|
149
|
+
},
|
|
106
150
|
pagination: { infinite: true },
|
|
107
151
|
columns: [
|
|
108
152
|
{ type: 'gutter', gutterName: 'sequence' },
|
|
@@ -133,6 +177,13 @@ class LazadaOrderInitBatchPopup extends localize(i18next)(LitElement) {
|
|
|
133
177
|
sortable: true,
|
|
134
178
|
width: 130
|
|
135
179
|
},
|
|
180
|
+
{
|
|
181
|
+
type: 'string',
|
|
182
|
+
name: 'ownShippingProvider',
|
|
183
|
+
header: i18next.t('field.own_shipping_carrier'),
|
|
184
|
+
sortable: true,
|
|
185
|
+
width: 130
|
|
186
|
+
},
|
|
136
187
|
{
|
|
137
188
|
type: 'string',
|
|
138
189
|
name: 'itemCount',
|
|
@@ -147,6 +198,13 @@ class LazadaOrderInitBatchPopup extends localize(i18next)(LitElement) {
|
|
|
147
198
|
sortable: true,
|
|
148
199
|
width: 100
|
|
149
200
|
},
|
|
201
|
+
{
|
|
202
|
+
type: 'float',
|
|
203
|
+
name: 'totalWeight',
|
|
204
|
+
header: i18next.t('field.total_weight'),
|
|
205
|
+
sortable: true,
|
|
206
|
+
width: 100
|
|
207
|
+
},
|
|
150
208
|
{
|
|
151
209
|
type: 'string',
|
|
152
210
|
name: 'status',
|
|
@@ -266,6 +324,13 @@ class LazadaOrderInitBatchPopup extends localize(i18next)(LitElement) {
|
|
|
266
324
|
phone2
|
|
267
325
|
attentionTo
|
|
268
326
|
trackingNo
|
|
327
|
+
ownTrackingNo
|
|
328
|
+
transporter
|
|
329
|
+
ownTransporter
|
|
330
|
+
totalWeight
|
|
331
|
+
weightUnit
|
|
332
|
+
totalVolume
|
|
333
|
+
volumeUnit
|
|
269
334
|
}
|
|
270
335
|
marketplaceProductVariation {
|
|
271
336
|
name
|
|
@@ -279,10 +344,12 @@ class LazadaOrderInitBatchPopup extends localize(i18next)(LitElement) {
|
|
|
279
344
|
status
|
|
280
345
|
itemCount
|
|
281
346
|
shippingProvider
|
|
347
|
+
ownShippingProvider
|
|
282
348
|
totalAmount
|
|
283
349
|
orderCreatedAt
|
|
284
350
|
orderUpdatedAt
|
|
285
351
|
trackingNo
|
|
352
|
+
ownTrackingNo
|
|
286
353
|
updatedAt
|
|
287
354
|
fullLogisticsDetail {
|
|
288
355
|
pickup
|
|
@@ -327,7 +394,10 @@ class LazadaOrderInitBatchPopup extends localize(i18next)(LitElement) {
|
|
|
327
394
|
marketplaceOrders = marketplaceOrders.map(item => {
|
|
328
395
|
return {
|
|
329
396
|
...item,
|
|
330
|
-
trackingNo: this.
|
|
397
|
+
trackingNo: this.getOrderShippingInformation(item.marketplaceOrderItems, 'trackingNo'),
|
|
398
|
+
ownTrackingNo: this.getOrderShippingInformation(item.marketplaceOrderItems, 'ownTrackingNo'),
|
|
399
|
+
totalWeight: this.getOrderShippingInformation(item.marketplaceOrderItems, 'totalWeight'),
|
|
400
|
+
totalVolume: this.getOrderShippingInformation(item.marketplaceOrderItems, 'totalVolume')
|
|
331
401
|
}
|
|
332
402
|
})
|
|
333
403
|
|
|
@@ -341,8 +411,8 @@ class LazadaOrderInitBatchPopup extends localize(i18next)(LitElement) {
|
|
|
341
411
|
}
|
|
342
412
|
}
|
|
343
413
|
|
|
344
|
-
|
|
345
|
-
let
|
|
414
|
+
getOrderShippingInformation(marketplaceOrderItems, type) {
|
|
415
|
+
let item
|
|
346
416
|
let marketplaceOrderShippings = []
|
|
347
417
|
|
|
348
418
|
marketplaceOrderItems.map(item => {
|
|
@@ -357,28 +427,63 @@ class LazadaOrderInitBatchPopup extends localize(i18next)(LitElement) {
|
|
|
357
427
|
return marketplaceOrderShippings.find(a => a.id === id)
|
|
358
428
|
})
|
|
359
429
|
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
if (
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
430
|
+
switch (type) {
|
|
431
|
+
case 'trackingNo':
|
|
432
|
+
if (uniqueMarketplaceOrderShippings) {
|
|
433
|
+
uniqueMarketplaceOrderShippings.map(marketplaceOrderShipping => {
|
|
434
|
+
if (this.store?.platform === PLATFORM.LAZADA.value) {
|
|
435
|
+
var newTrackingNo = []
|
|
436
|
+
if (marketplaceOrderShipping?.trackingNo) {
|
|
437
|
+
const trackingNos = JSON.parse(marketplaceOrderShipping.trackingNo)
|
|
438
|
+
newTrackingNo = trackingNos.map(item => item.tracking_code)
|
|
439
|
+
}
|
|
440
|
+
let uniqueTrackingNos = [...new Set(newTrackingNo)]
|
|
441
|
+
item = uniqueTrackingNos.join(', ')
|
|
442
|
+
} else {
|
|
443
|
+
item = marketplaceOrderShipping.trackingNo
|
|
444
|
+
}
|
|
445
|
+
})
|
|
372
446
|
}
|
|
373
|
-
|
|
447
|
+
break
|
|
448
|
+
case 'ownTrackingNo':
|
|
449
|
+
if (uniqueMarketplaceOrderShippings) {
|
|
450
|
+
uniqueMarketplaceOrderShippings.map(marketplaceOrderShipping => {
|
|
451
|
+
item = marketplaceOrderShipping.ownTrackingNo
|
|
452
|
+
})
|
|
453
|
+
}
|
|
454
|
+
break
|
|
455
|
+
case 'totalVolume':
|
|
456
|
+
let totalVolume = 0
|
|
457
|
+
if (uniqueMarketplaceOrderShippings) {
|
|
458
|
+
uniqueMarketplaceOrderShippings.map(marketplaceOrderShipping => {
|
|
459
|
+
totalVolume += marketplaceOrderShipping?.totalVolume || 0
|
|
460
|
+
})
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
item = parseFloat(totalVolume) || 0
|
|
464
|
+
break
|
|
465
|
+
case 'totalWeight':
|
|
466
|
+
let totalWeight = 0
|
|
467
|
+
if (uniqueMarketplaceOrderShippings) {
|
|
468
|
+
uniqueMarketplaceOrderShippings.map(marketplaceOrderShipping => {
|
|
469
|
+
totalWeight += marketplaceOrderShipping?.totalWeight
|
|
470
|
+
})
|
|
471
|
+
}
|
|
472
|
+
item = parseFloat(totalWeight) || 0
|
|
473
|
+
break
|
|
374
474
|
}
|
|
375
475
|
|
|
376
|
-
return
|
|
476
|
+
return item
|
|
377
477
|
}
|
|
378
478
|
|
|
379
479
|
async _marketplaceLogisticsInitParam() {
|
|
380
480
|
this.shippingProviders = await this.fetchShippingProvider()
|
|
381
481
|
this.deliveryTypes = [{ name: 'dropship', description: 'dropship' }]
|
|
482
|
+
this.ownShippingProviders = [{ name: 'SeeBuu Logistics' }]
|
|
483
|
+
this.marketplaceSettings = await this.fetchMarketplaceSettings()
|
|
484
|
+
this.maxWeightSetting = this.marketplaceSettings.filter(
|
|
485
|
+
setting => setting.category === 'marketplace_order_max_weight'
|
|
486
|
+
)
|
|
382
487
|
}
|
|
383
488
|
|
|
384
489
|
async fetchShippingProvider() {
|
|
@@ -403,6 +508,73 @@ class LazadaOrderInitBatchPopup extends localize(i18next)(LitElement) {
|
|
|
403
508
|
}
|
|
404
509
|
}
|
|
405
510
|
|
|
511
|
+
async fetchMarketplaceSettings() {
|
|
512
|
+
const filters = []
|
|
513
|
+
const sortings = []
|
|
514
|
+
|
|
515
|
+
const response = await client.query({
|
|
516
|
+
query: gql`
|
|
517
|
+
query marketplaceSettings($filters: [Filter], $sortings: [Sorting]) {
|
|
518
|
+
marketplaceSettings(filters: $filters, sortings: $sortings) {
|
|
519
|
+
items {
|
|
520
|
+
id
|
|
521
|
+
name
|
|
522
|
+
marketplaceStore {
|
|
523
|
+
id
|
|
524
|
+
name
|
|
525
|
+
storeName
|
|
526
|
+
platform
|
|
527
|
+
description
|
|
528
|
+
}
|
|
529
|
+
category
|
|
530
|
+
value
|
|
531
|
+
updatedAt
|
|
532
|
+
}
|
|
533
|
+
total
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
`,
|
|
537
|
+
variables: { filters, sortings }
|
|
538
|
+
})
|
|
539
|
+
|
|
540
|
+
if (!response.error) {
|
|
541
|
+
return response.data.marketplaceSettings.items || []
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
async setShippingProvider() {
|
|
546
|
+
try {
|
|
547
|
+
let selectedData = this.grist.selected
|
|
548
|
+
if (!selectedData?.length) throw new Error('please select at least one order')
|
|
549
|
+
|
|
550
|
+
const ownShippingProviderValue = this.ownShippingProviderSelect?.value
|
|
551
|
+
if (!ownShippingProviderValue) throw new Error('Own Shipping provider selection is required')
|
|
552
|
+
|
|
553
|
+
const patches = selectedData.map(patch => {
|
|
554
|
+
return {
|
|
555
|
+
id: patch.id,
|
|
556
|
+
orderNo: patch.orderNo,
|
|
557
|
+
ownShippingProvider: ownShippingProviderValue
|
|
558
|
+
}
|
|
559
|
+
})
|
|
560
|
+
|
|
561
|
+
const response = await client.mutate({
|
|
562
|
+
mutation: gql`
|
|
563
|
+
mutation setOwnShippingProviderByOrders($patches: [LogisticsInfo]!) {
|
|
564
|
+
setOwnShippingProviderByOrders(patches: $patches)
|
|
565
|
+
}
|
|
566
|
+
`,
|
|
567
|
+
variables: { patches }
|
|
568
|
+
})
|
|
569
|
+
|
|
570
|
+
if (!response.errors) {
|
|
571
|
+
this.grist.fetch()
|
|
572
|
+
}
|
|
573
|
+
} catch (e) {
|
|
574
|
+
this._showToast(e)
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
|
|
406
578
|
async initLogistics() {
|
|
407
579
|
let result = await CustomAlert({
|
|
408
580
|
title: i18next.t('title.are_you_sure'),
|
|
@@ -480,6 +652,46 @@ class LazadaOrderInitBatchPopup extends localize(i18next)(LitElement) {
|
|
|
480
652
|
}
|
|
481
653
|
}
|
|
482
654
|
|
|
655
|
+
async splitOrders() {
|
|
656
|
+
try {
|
|
657
|
+
let selectedData = this.grist.selected
|
|
658
|
+
this._validateSplitting(selectedData)
|
|
659
|
+
|
|
660
|
+
const patches = selectedData.map(patch => {
|
|
661
|
+
return {
|
|
662
|
+
id: patch.id,
|
|
663
|
+
orderNo: patch.orderNo
|
|
664
|
+
}
|
|
665
|
+
})
|
|
666
|
+
|
|
667
|
+
const response = await client.mutate({
|
|
668
|
+
mutation: gql`
|
|
669
|
+
mutation splitOrdersByBatch($patches: [LogisticsInfo]!) {
|
|
670
|
+
splitOrdersByBatch(patches: $patches)
|
|
671
|
+
}
|
|
672
|
+
`,
|
|
673
|
+
variables: { patches }
|
|
674
|
+
})
|
|
675
|
+
|
|
676
|
+
if (!response.errors) {
|
|
677
|
+
this.dispatchEvent(new CustomEvent('order-updated'))
|
|
678
|
+
history.back()
|
|
679
|
+
}
|
|
680
|
+
} catch (e) {
|
|
681
|
+
this._showToast(e)
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
_validateSplitting(data) {
|
|
686
|
+
if (!data) {
|
|
687
|
+
throw new Error('No order to split')
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
if (data.some(item => item.trackingNo)) {
|
|
691
|
+
throw new Error('Order with tracking no not allowed to split')
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
|
|
483
695
|
_submit(e) {
|
|
484
696
|
this.searchForm.submit()
|
|
485
697
|
}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import '@things-factory/component-ui'
|
|
2
|
-
import { MultiColumnFormStyles } from '@things-factory/form-ui'
|
|
3
2
|
import '@things-factory/grist-ui'
|
|
4
|
-
|
|
3
|
+
|
|
5
4
|
import gql from 'graphql-tag'
|
|
5
|
+
import { css, html, LitElement } from 'lit-element'
|
|
6
|
+
|
|
7
|
+
import { MultiColumnFormStyles } from '@things-factory/form-ui'
|
|
6
8
|
import { i18next, localize } from '@things-factory/i18n-base'
|
|
9
|
+
import { client } from '@things-factory/shell'
|
|
7
10
|
import { isMobileDevice } from '@things-factory/utils'
|
|
8
|
-
|
|
11
|
+
|
|
9
12
|
import { PLATFORM } from '../../constants'
|
|
10
13
|
|
|
11
14
|
class OrderShippingItems extends localize(i18next)(LitElement) {
|
|
@@ -96,79 +99,103 @@ class OrderShippingItems extends localize(i18next)(LitElement) {
|
|
|
96
99
|
<div field>
|
|
97
100
|
<label
|
|
98
101
|
>${i18next.t('label.attention_to')}
|
|
99
|
-
<input type="text" name="attentionTo" />
|
|
102
|
+
<input type="text" name="attentionTo" readonly />
|
|
100
103
|
</label>
|
|
101
104
|
</div>
|
|
102
105
|
<div field>
|
|
103
106
|
<label
|
|
104
107
|
>${i18next.t('label.tracking_no')}
|
|
105
|
-
<input type="text" name="trackingNo" />
|
|
108
|
+
<input type="text" name="trackingNo" readonly />
|
|
109
|
+
</label>
|
|
110
|
+
</div>
|
|
111
|
+
<div field>
|
|
112
|
+
<label
|
|
113
|
+
>${i18next.t('label.own_tracking_no')}
|
|
114
|
+
<input type="text" name="ownTrackingNo" readonly />
|
|
106
115
|
</label>
|
|
107
116
|
</div>
|
|
108
117
|
<div field>
|
|
109
118
|
<label
|
|
110
119
|
>${i18next.t('label.phone')} 1
|
|
111
|
-
<input type="text" name="phone1" />
|
|
120
|
+
<input type="text" name="phone1" readonly />
|
|
112
121
|
</label>
|
|
113
122
|
</div>
|
|
114
123
|
<div field>
|
|
115
124
|
<label
|
|
116
125
|
>${i18next.t('label.phone')} 2
|
|
117
|
-
<input type="text" name="phone2" />
|
|
126
|
+
<input type="text" name="phone2" readonly />
|
|
118
127
|
</label>
|
|
119
128
|
</div>
|
|
120
129
|
<div field>
|
|
121
130
|
<label
|
|
122
131
|
>${i18next.t('label.address')} 1
|
|
123
|
-
<input type="text" name="address1" />
|
|
132
|
+
<input type="text" name="address1" readonly />
|
|
124
133
|
</label>
|
|
125
134
|
</div>
|
|
126
135
|
<div field>
|
|
127
136
|
<label
|
|
128
137
|
>${i18next.t('label.address')} 2
|
|
129
|
-
<input type="text" name="address2" />
|
|
138
|
+
<input type="text" name="address2" readonly />
|
|
130
139
|
</label>
|
|
131
140
|
</div>
|
|
132
141
|
<div field>
|
|
133
142
|
<label
|
|
134
143
|
>${i18next.t('label.address')} 3
|
|
135
|
-
<input type="text" name="address3" />
|
|
144
|
+
<input type="text" name="address3" readonly />
|
|
136
145
|
</label>
|
|
137
146
|
</div>
|
|
138
147
|
<div field>
|
|
139
148
|
<label
|
|
140
149
|
>${i18next.t('label.address')} 4
|
|
141
|
-
<input type="text" name="address4" />
|
|
150
|
+
<input type="text" name="address4" readonly />
|
|
142
151
|
</label>
|
|
143
152
|
</div>
|
|
144
153
|
<div field>
|
|
145
154
|
<label
|
|
146
155
|
>${i18next.t('label.address')} 5
|
|
147
|
-
<input type="text" name="address5" />
|
|
156
|
+
<input type="text" name="address5" readonly />
|
|
148
157
|
</label>
|
|
149
158
|
</div>
|
|
150
159
|
<div field>
|
|
151
160
|
<label
|
|
152
161
|
>${i18next.t('label.postcode')}
|
|
153
|
-
<input type="text" name="postCode" />
|
|
162
|
+
<input type="text" name="postCode" readonly />
|
|
154
163
|
</label>
|
|
155
164
|
</div>
|
|
156
165
|
<div field>
|
|
157
166
|
<label
|
|
158
167
|
>${i18next.t('label.city')}
|
|
159
|
-
<input type="text" name="city" />
|
|
168
|
+
<input type="text" name="city" readonly />
|
|
160
169
|
</label>
|
|
161
170
|
</div>
|
|
162
171
|
<div field>
|
|
163
172
|
<label
|
|
164
173
|
>${i18next.t('label.state')}
|
|
165
|
-
<input type="text" name="state" />
|
|
174
|
+
<input type="text" name="state" readonly />
|
|
166
175
|
</label>
|
|
167
176
|
</div>
|
|
168
177
|
<div field>
|
|
169
178
|
<label
|
|
170
179
|
>${i18next.t('label.country')}
|
|
171
|
-
<input type="text" name="country" />
|
|
180
|
+
<input type="text" name="country" readonly />
|
|
181
|
+
</label>
|
|
182
|
+
</div>
|
|
183
|
+
<div field>
|
|
184
|
+
<label
|
|
185
|
+
>${i18next.t('label.weight')}
|
|
186
|
+
<input type="text" name="totalWeight" readonly />
|
|
187
|
+
</label>
|
|
188
|
+
</div>
|
|
189
|
+
<div field>
|
|
190
|
+
<label
|
|
191
|
+
>${i18next.t('label.shipping_provider')}
|
|
192
|
+
<input type="text" name="transporter" readonly />
|
|
193
|
+
</label>
|
|
194
|
+
</div>
|
|
195
|
+
<div field>
|
|
196
|
+
<label
|
|
197
|
+
>${i18next.t('label.own_shipping_provider')}
|
|
198
|
+
<input type="text" name="ownTransporter" readonly />
|
|
172
199
|
</label>
|
|
173
200
|
</div>
|
|
174
201
|
</div>
|
|
@@ -248,6 +275,10 @@ class OrderShippingItems extends localize(i18next)(LitElement) {
|
|
|
248
275
|
marketplaceOrderShipping(name: $name) {
|
|
249
276
|
id
|
|
250
277
|
name
|
|
278
|
+
trackingNo
|
|
279
|
+
ownTrackingNo
|
|
280
|
+
transporter
|
|
281
|
+
ownTransporter
|
|
251
282
|
marketplaceOrderItems {
|
|
252
283
|
marketplaceProductVariation {
|
|
253
284
|
marketplaceProduct {
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import '@things-factory/component-ui'
|
|
2
|
-
import { MultiColumnFormStyles } from '@things-factory/form-ui'
|
|
3
2
|
import '@things-factory/grist-ui'
|
|
4
|
-
import
|
|
3
|
+
import './order-shipping-items'
|
|
4
|
+
|
|
5
5
|
import { css, html, LitElement } from 'lit-element'
|
|
6
6
|
|
|
7
|
-
import '
|
|
7
|
+
import { MultiColumnFormStyles } from '@things-factory/form-ui'
|
|
8
|
+
import { i18next, localize } from '@things-factory/i18n-base'
|
|
8
9
|
|
|
9
10
|
class OrderShipping extends localize(i18next)(LitElement) {
|
|
10
11
|
static get properties() {
|
|
@@ -64,7 +65,9 @@ class OrderShipping extends localize(i18next)(LitElement) {
|
|
|
64
65
|
.data="${infoSet}"
|
|
65
66
|
@tabChanged="${e => (this.currentTab = e.detail.currentTabKey)}"
|
|
66
67
|
.headerRenderer=${shipping => {
|
|
67
|
-
return html
|
|
68
|
+
return html`[Order No]: ${shipping?.subOrderNoRef ? shipping.subOrderNoRef : shipping.orderNoRef} [Attention
|
|
69
|
+
To]: ${shipping.attentionTo} [Address]: ${shipping.postCode}, ${shipping.city} [Weight]:
|
|
70
|
+
${shipping.totalWeight} ${shipping.weightUnit}`
|
|
68
71
|
}}
|
|
69
72
|
.contentRenderer="${shipping =>
|
|
70
73
|
html`<order-shipping-items
|