@things-factory/operato-wms 4.3.562 → 4.3.566

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.
@@ -5,13 +5,24 @@ import './validate-ro-popup'
5
5
  import './validate-b2c-ro-popup'
6
6
 
7
7
  import gql from 'graphql-tag'
8
- import { css, html } from 'lit-element'
8
+ import {
9
+ css,
10
+ html
11
+ } from 'lit-element'
9
12
  import XLSX from 'xlsx'
10
13
 
11
14
  import { MultiColumnFormStyles } from '@things-factory/form-ui'
12
- import { i18next, localize } from '@things-factory/i18n-base'
15
+ import {
16
+ i18next,
17
+ localize
18
+ } from '@things-factory/i18n-base'
13
19
  import { openPopup } from '@things-factory/layout-base'
14
- import { client, CustomAlert, navigate, PageView } from '@things-factory/shell'
20
+ import {
21
+ client,
22
+ CustomAlert,
23
+ navigate,
24
+ PageView
25
+ } from '@things-factory/shell'
15
26
  import { sleep } from '@things-factory/utils'
16
27
 
17
28
  import { fetchSettingRule } from '../../fetch-setting-value'
@@ -210,6 +221,7 @@ class BulkOperation extends localize(i18next)(PageView) {
210
221
  deliveryAddress2: '',
211
222
  deliveryAddress3: '',
212
223
  deliveryAddress4: '',
224
+ deliveryAddress5: '',
213
225
  postalCode: '',
214
226
  city: '',
215
227
  state: '',
@@ -221,6 +233,10 @@ class BulkOperation extends localize(i18next)(PageView) {
221
233
  uom: '',
222
234
  releaseQty: 0,
223
235
  billingAddress: '',
236
+ billingAddress2: '',
237
+ billingAddress3: '',
238
+ billingAddress4: '',
239
+ billingAddress5: '',
224
240
  billingPostalCode: '',
225
241
  billingCountry: '',
226
242
  billingState: '',
@@ -251,12 +267,17 @@ class BulkOperation extends localize(i18next)(PageView) {
251
267
  deliveryAddress2: '',
252
268
  deliveryAddress3: '',
253
269
  deliveryAddress4: '',
270
+ deliveryAddress5: '',
254
271
  postalCode: '',
255
272
  city: '',
256
273
  state: '',
257
274
  country: '',
258
275
  phone1: '',
259
276
  billingAddress: '',
277
+ billingAddress2: '',
278
+ billingAddress3: '',
279
+ billingAddress4: '',
280
+ billingAddress5: '',
260
281
  billingPostalCode: '',
261
282
  billingCity: '',
262
283
  billingState: '',
@@ -561,6 +582,7 @@ class BulkOperation extends localize(i18next)(PageView) {
561
582
  deliveryAddress2: String(record.deliveryAddress2 || ''),
562
583
  deliveryAddress3: String(record.deliveryAddress3 || ''),
563
584
  deliveryAddress4: String(record.deliveryAddress4 || ''),
585
+ deliveryAddress5: String(record.deliveryAddress5 || ''),
564
586
  attentionTo: String(record.attentionTo || ''),
565
587
  attentionCompany: String(record.attentionCompany || ''),
566
588
  city: String(record.city || ''),
@@ -577,6 +599,10 @@ class BulkOperation extends localize(i18next)(PageView) {
577
599
  phone1: String(record.phone1 || ''),
578
600
  exportOption: false,
579
601
  billingAddress: String(record.billingAddress || ''),
602
+ billingAddress2: String(record.billingAddress2 || ''),
603
+ billingAddress3: String(record.billingAddress3 || ''),
604
+ billingAddress4: String(record.billingAddress4 || ''),
605
+ billingAddress5: String(record.billingAddress5 || ''),
580
606
  billingPostalCode: String(record.billingPostalCode || ''),
581
607
  billingCountry: String(record.billingCountry || ''),
582
608
  billingState: String(record.billingState || ''),
@@ -619,12 +645,17 @@ class BulkOperation extends localize(i18next)(PageView) {
619
645
  deliveryAddress2: String(record.deliveryAddress2 || ''),
620
646
  deliveryAddress3: String(record.deliveryAddress3 || ''),
621
647
  deliveryAddress4: String(record.deliveryAddress4 || ''),
648
+ deliveryAddress5: String(record.deliveryAddress5 || ''),
622
649
  postalCode: String(record.postalCode || ''),
623
650
  city: String(record.city || ''),
624
651
  state: String(record.state || ''),
625
652
  country: String(record.country || ''),
626
653
  phone1: String(record.phone1 || ''),
627
654
  billingAddress: String(record.billingAddress || ''),
655
+ billingAddress2: String(record.billingAddress2 || ''),
656
+ billingAddress3: String(record.billingAddress3 || ''),
657
+ billingAddress4: String(record.billingAddress4 || ''),
658
+ billingAddress5: String(record.billingAddress5 || ''),
628
659
  billingPostalCode: String(record.billingPostalCode || ''),
629
660
  billingCountry: String(record.billingCountry || ''),
630
661
  billingState: String(record.billingState || ''),
@@ -2,10 +2,20 @@ import '@material/mwc-button/mwc-button'
2
2
  import '@things-factory/grist-ui'
3
3
 
4
4
  import gql from 'graphql-tag'
5
- import { css, html, LitElement } from 'lit-element'
5
+ import {
6
+ css,
7
+ html,
8
+ LitElement
9
+ } from 'lit-element'
6
10
 
7
- import { i18next, localize } from '@things-factory/i18n-base'
8
- import { client, CustomAlert } from '@things-factory/shell'
11
+ import {
12
+ i18next,
13
+ localize
14
+ } from '@things-factory/i18n-base'
15
+ import {
16
+ client,
17
+ CustomAlert
18
+ } from '@things-factory/shell'
9
19
  import { ScrollbarStyles } from '@things-factory/styles'
10
20
  import { isMobileDevice } from '@things-factory/utils'
11
21
 
@@ -172,6 +182,12 @@ class ValidateB2cRoPopup extends localize(i18next)(LitElement) {
172
182
  header: i18next.t('field.delivery_address_4'),
173
183
  width: 150
174
184
  },
185
+ {
186
+ type: 'string',
187
+ name: 'deliveryAddress5',
188
+ header: i18next.t('field.delivery_address_5'),
189
+ width: 150
190
+ },
175
191
  {
176
192
  type: 'string',
177
193
  name: 'postalCode',
@@ -205,7 +221,31 @@ class ValidateB2cRoPopup extends localize(i18next)(LitElement) {
205
221
  {
206
222
  type: 'string',
207
223
  name: 'billingAddress',
208
- header: i18next.t('field.billing_address'),
224
+ header: i18next.t('field.billing_address_1'),
225
+ width: 150
226
+ },
227
+ {
228
+ type: 'string',
229
+ name: 'billingAddress2',
230
+ header: i18next.t('field.billing_address_2'),
231
+ width: 150
232
+ },
233
+ {
234
+ type: 'string',
235
+ name: 'billingAddress3',
236
+ header: i18next.t('field.billing_address_3'),
237
+ width: 150
238
+ },
239
+ {
240
+ type: 'string',
241
+ name: 'billingAddress4',
242
+ header: i18next.t('field.billing_address_4'),
243
+ width: 150
244
+ },
245
+ {
246
+ type: 'string',
247
+ name: 'billingAddress5',
248
+ header: i18next.t('field.billing_address_5'),
209
249
  width: 150
210
250
  },
211
251
  {
@@ -349,12 +389,17 @@ class ValidateB2cRoPopup extends localize(i18next)(LitElement) {
349
389
  deliveryAddress2
350
390
  deliveryAddress3
351
391
  deliveryAddress4
392
+ deliveryAddress5
393
+ billingAddress
394
+ billingAddress2
395
+ billingAddress3
396
+ billingAddress4
397
+ billingAddress5
352
398
  postalCode
353
399
  city
354
400
  state
355
401
  country
356
402
  phone1
357
- billingAddress
358
403
  billingCity
359
404
  billingPostalCode
360
405
  billingState
@@ -421,6 +466,12 @@ class ValidateB2cRoPopup extends localize(i18next)(LitElement) {
421
466
  deliveryAddress2: x?.deliveryAddress2,
422
467
  deliveryAddress3: x?.deliveryAddress3,
423
468
  deliveryAddress4: x?.deliveryAddress4,
469
+ deliveryAddress5: x.deliveryAddress5,
470
+ billingAddress: x.billingAddress,
471
+ billingAddress2: x.billingAddress2,
472
+ billingAddress3: x.billingAddress3,
473
+ billingAddress4: x.billingAddress4,
474
+ billingAddress5: x.billingAddress5,
424
475
  postalCode: String(x.postalCode),
425
476
  city: x.city,
426
477
  state: x.state,
@@ -154,10 +154,40 @@ class ValidateRoPopup extends localize(i18next)(LitElement) {
154
154
  header: i18next.t('field.delivery_address_4'),
155
155
  width: 150
156
156
  },
157
+ {
158
+ type: 'string',
159
+ name: 'deliveryAddress5',
160
+ header: i18next.t('field.delivery_address_5'),
161
+ width: 150
162
+ },
157
163
  {
158
164
  type: 'string',
159
165
  name: 'billingAddress',
160
- header: i18next.t('field.billing_address'),
166
+ header: i18next.t('field.billing_address_1'),
167
+ width: 150
168
+ },
169
+ {
170
+ type: 'string',
171
+ name: 'billingAddress2',
172
+ header: i18next.t('field.billing_address_2'),
173
+ width: 150
174
+ },
175
+ {
176
+ type: 'string',
177
+ name: 'billingAddress3',
178
+ header: i18next.t('field.billing_address_3'),
179
+ width: 150
180
+ },
181
+ {
182
+ type: 'string',
183
+ name: 'billingAddress4',
184
+ header: i18next.t('field.billing_address_4'),
185
+ width: 150
186
+ },
187
+ {
188
+ type: 'string',
189
+ name: 'billingAddress5',
190
+ header: i18next.t('field.billing_address_5'),
161
191
  width: 150
162
192
  },
163
193
  {
@@ -326,7 +356,12 @@ class ValidateRoPopup extends localize(i18next)(LitElement) {
326
356
  deliveryAddress2
327
357
  deliveryAddress3
328
358
  deliveryAddress4
359
+ deliveryAddress5
329
360
  billingAddress
361
+ billingAddress2
362
+ billingAddress3
363
+ billingAddress4
364
+ billingAddress5
330
365
  billingCity
331
366
  billingPostalCode
332
367
  billingState
@@ -387,7 +422,12 @@ class ValidateRoPopup extends localize(i18next)(LitElement) {
387
422
  deliveryAddress2: x.deliveryAddress2,
388
423
  deliveryAddress3: x.deliveryAddress3,
389
424
  deliveryAddress4: x.deliveryAddress4,
425
+ deliveryAddress5: x.deliveryAddress5,
390
426
  billingAddress: x.billingAddress,
427
+ billingAddress2: x.billingAddress2,
428
+ billingAddress3: x.billingAddress3,
429
+ billingAddress4: x.billingAddress4,
430
+ billingAddress5: x.billingAddress5,
391
431
  billingCity: x.billingCity,
392
432
  billingState: x.billingState,
393
433
  billingPostalCode: x.billingPostalCode,
@@ -1786,7 +1786,7 @@ class InventoryAdjustment extends connect(store)(localize(i18next)(PageView)) {
1786
1786
  throw new Error(i18next.t('text.total_uom_value_is_required_kindly_fill_in_the_total_uom_value_to_continue'))
1787
1787
  }
1788
1788
 
1789
- if (!row?.location || !row?.location?.id) {
1789
+ if (!row?.location) {
1790
1790
  throw new Error(i18next.t('text.location_is_required_kindly_fill_in_the_location_to_continue'))
1791
1791
  }
1792
1792
 
@@ -488,7 +488,6 @@ class B2bOrderList extends localize(i18next)(PageView) {
488
488
  let toDt = new Date(filter.value)
489
489
  toDt.setHours(23, 59, 59)
490
490
  filter.value = toDt.toISOString()
491
- filter.name = 'createdAt'
492
491
  break
493
492
  default:
494
493
  break
@@ -249,6 +249,48 @@ class B2CReleaseOrderDetail extends connect(store)(localize(i18next)(PageView))
249
249
  margin: 0;
250
250
  }
251
251
  }
252
+
253
+ .header-with-checkbox {
254
+ display: flex;
255
+ align-self: flex-end;
256
+ align-items: center;
257
+ grid-column: span 36 / auto !important;
258
+ text-align: left !important;
259
+ margin-top: 10px !important;
260
+ font-weight: 600 !important;
261
+ margin-right: 2px; /* Spacing between header and checkbox */
262
+ }
263
+
264
+ .checkbox-container label {
265
+ margin-left: 1px;
266
+ }
267
+
268
+ .checkbox-wrapper{
269
+ margin-top: 10px;
270
+ }
271
+
272
+ .checkbox-wrapper::before {
273
+ content: "("; /* Left bracket */
274
+ margin-left: 2em;
275
+ font-size: 0.9em; /* Adjust size as needed */
276
+ font-weight: 100 !important;
277
+ }
278
+
279
+ .checkbox-wrapper::after {
280
+ content: ")"; /* Right bracket */
281
+ margin-left: 1em; /* Space between bracket and checkbox */
282
+ font-size: 0.9em; /* Adjust size as needed */
283
+ font-weight: 100 !important;
284
+ }
285
+
286
+ .checkbox-wrapper input[type='checkbox'] {
287
+ width: 10px;
288
+ height: 10px;
289
+ }
290
+
291
+ #matchDeliveryAddress {
292
+ margin-top: 5px !important;
293
+ }
252
294
  `
253
295
  ]
254
296
  }
@@ -381,11 +423,45 @@ class B2CReleaseOrderDetail extends connect(store)(localize(i18next)(PageView))
381
423
  <legend>${i18next.t('title.shipping_information')} (${this._releaseOrderNo})</legend>
382
424
 
383
425
  <label>${i18next.t('label.attention_to')}</label>
384
- <input name="attentionTo" required .value="${this._attentionTo}" />
426
+ <input name="attentionTo" .value="${this._releaseOrder.attentionTo}" ?readonly="${!this?._editable}" />
427
+
428
+ <label>${i18next.t('label.contact')}</label>
429
+ <input name="phone1" value="${this._releaseOrder.phone1}" />
385
430
 
386
431
  <!-- delivery -->
387
432
 
388
- <label class="section-header">${i18next.t('label.delivery_address')}</label>
433
+ <div class="header-with-checkbox">
434
+ <label class="section-header">${i18next.t('label.delivery_address')}</label>
435
+ <div class="checkbox-wrapper">
436
+ <input
437
+ type="checkbox"
438
+ id="matchDeliveryAddress"
439
+ name="matchDeliveryAddressInput"
440
+ ?checked="${this._disableBillingAddress}"
441
+ @change=${e => {
442
+ this._disableBillingAddress = e.currentTarget.checked;
443
+ }}
444
+ />
445
+
446
+ <label for="matchDeliveryAddress">${i18next.t('label.use_as_billing_address')}</label>
447
+ </div>
448
+ </div>
449
+
450
+ <label>${i18next.t('label.delivery_address_1')}</label>
451
+ <textarea name="deliveryAddress1" .value="${this._releaseOrder.deliveryAddress1}"></textarea>
452
+
453
+ <label>${i18next.t('label.delivery_address_2')}</label>
454
+ <textarea name="deliveryAddress2" .value="${this._releaseOrder.deliveryAddress2}"></textarea>
455
+
456
+ <label>${i18next.t('label.delivery_address_3')}</label>
457
+ <textarea name="deliveryAddress3" .value="${this._releaseOrder.deliveryAddress3}"></textarea>
458
+
459
+ <label>${i18next.t('label.delivery_address_4')}</label>
460
+ <textarea name="deliveryAddress4" .value="${this._releaseOrder.deliveryAddress4}"></textarea>
461
+
462
+ <label>${i18next.t('label.delivery_address_5')}</label>
463
+ <textarea name="deliveryAddress5" .value="${this._releaseOrder.deliveryAddress5}"></textarea>
464
+
389
465
  <label>${i18next.t('label.country')}</label>
390
466
  <select
391
467
  name="country"
@@ -431,17 +507,27 @@ class B2CReleaseOrderDetail extends connect(store)(localize(i18next)(PageView))
431
507
  <label>${i18next.t('label.city')}</label>
432
508
  <input name="city" .value="${this._releaseOrder.city}" />
433
509
 
434
- <label>${i18next.t('label.delivery_address')}</label>
435
- <textarea name="deliveryAddress1" .value="${this._releaseOrder.deliveryAddress1}"></textarea>
510
+ <!-- billing -->
436
511
 
437
- <label>${i18next.t('label.contact')}</label>
438
- <input name="phone1" value="${this._releaseOrder.phone1}" />
512
+ <label ?hidden=${this._disableBillingAddress} class="section-header">${i18next.t('label.billing_address')}</label>
439
513
 
440
- <!-- billing -->
441
- <label class="section-header">${i18next.t('label.billing_address')}</label>
442
- <label>${i18next.t('label.country')}</label>
514
+ <label ?hidden=${this._disableBillingAddress}>${i18next.t('label.billing_address_1')}</label>
515
+ <textarea ?hidden=${this._disableBillingAddress} name="billingAddress" .value="${this._releaseOrder.billingAddress}"></textarea>
516
+
517
+ <label ?hidden=${this._disableBillingAddress}>${i18next.t('label.billing_address_2')}</label>
518
+ <textarea ?hidden=${this._disableBillingAddress} name="billingAddress2" .value="${this._releaseOrder.billingAddress2}"></textarea>
443
519
 
444
- <select
520
+ <label ?hidden=${this._disableBillingAddress}>${i18next.t('label.billing_address_3')}</label>
521
+ <textarea ?hidden=${this._disableBillingAddress} name="billingAddress3" .value="${this._releaseOrder.billingAddress3}"></textarea>
522
+
523
+ <label ?hidden=${this._disableBillingAddress}>${i18next.t('label.billing_address_4')}</label>
524
+ <textarea ?hidden=${this._disableBillingAddress} name="billingAddress4" .value="${this._releaseOrder.billingAddress4}"></textarea>
525
+
526
+ <label ?hidden=${this._disableBillingAddress}>${i18next.t('label.billing_address_5')}</label>
527
+ <textarea ?hidden=${this._disableBillingAddress} name="billingAddress5" .value="${this._releaseOrder.billingAddress5}"></textarea>
528
+
529
+ <label ?hidden=${this._disableBillingAddress}>${i18next.t('label.country')}</label>
530
+ <select ?hidden=${this._disableBillingAddress}
445
531
  name="billingCountry"
446
532
  ?disabled="${this._disableBillingAddress}"
447
533
  @change=${e => {
@@ -459,18 +545,18 @@ class B2CReleaseOrderDetail extends connect(store)(localize(i18next)(PageView))
459
545
  )}
460
546
  </select>
461
547
 
462
- <label>${i18next.t('label.zip_postal_code')}</label>
548
+ <label ?hidden=${this._disableBillingAddress}>${i18next.t('label.zip_postal_code')}</label>
463
549
 
464
550
  ${this._selectedBillingCountry !== 'MY'
465
551
  ? html`
466
552
  <input
467
- ?disabled=${this._disableBillingAddress}
553
+ ?hidden=${this._disableBillingAddress}
468
554
  name="billingPostalCode"
469
555
  .value=${this._releaseOrder.billingPostalCode || this._releaseOrder.postalCode}
470
556
  />
471
557
  `
472
558
  : html`<select
473
- ?disabled="${this._disableBillingAddress}"
559
+ ?hidden="${this._disableBillingAddress}"
474
560
  name="billingPostalCode"
475
561
  @change=${e => {
476
562
  this._getStateAndCityByPostCode(e.target.value, e.target.name)
@@ -491,39 +577,18 @@ class B2CReleaseOrderDetail extends connect(store)(localize(i18next)(PageView))
491
577
  )}
492
578
  </select>`}
493
579
 
494
- <label>${i18next.t('label.state')}</label>
580
+ <label ?hidden=${this._disableBillingAddress}>${i18next.t('label.state')}</label>
495
581
  <input
496
- ?disabled=${this._disableBillingAddress}
582
+ ?hidden=${this._disableBillingAddress}
497
583
  name="billingState"
498
584
  .value="${this._releaseOrder.billingState}"
499
585
  />
500
586
 
501
- <label>${i18next.t('label.city')}</label>
502
- <input ?disabled=${this._disableBillingAddress} name="billingCity" .value="${this._releaseOrder.billingCity}" />
503
-
504
- <label>${i18next.t('label.billing_address')}</label>
505
- <textarea
506
- ?disabled=${this._disableBillingAddress}
507
- name="billingAddress"
508
- .value="${this._releaseOrder.billingAddress || ''}"
509
- ></textarea>
510
-
511
- <input
512
- type="checkbox"
513
- id="matchDeliveryAddress"
514
- name="matchDeliveryAddressInput"
515
- ?checked=${this._releaseOrder.postalCode == this._releaseOrder.billingPostalCode &&
516
- this._releaseOrder.billingAddress == this._releaseOrder.deliveryAddress1}
517
- @click=${e => {
518
- e.currentTarget.checked ? (this._disableBillingAddress = true) : (this._disableBillingAddress = false)
519
- e.currentTarget.checked ? this.matchDeliveryAddress() : ''
520
- this.matchDeliveryAddressInput.value = this.matchDeliveryAddressInput.value === 'on' ? 'off' : 'on'
521
- }}
522
- />
523
- <label for="matchDeliveryAddress">${i18next.t('label.match_delivery_address')}</label>
587
+ <label ?hidden=${this._disableBillingAddress}>${i18next.t('label.city')}</label>
588
+ <input ?hidden=${this._disableBillingAddress} name="billingCity" .value="${this._releaseOrder.billingCity}" />
524
589
  </form>
525
590
 
526
- <div class="container">
591
+ <div class="container" ?hidden=${!this._showShippingInfo}>
527
592
  <div class="grist">
528
593
  <!-- release product list-->
529
594
  <h2><mwc-icon>list_alt</mwc-icon>${i18next.t('title.release_product_list')}</h2>
@@ -563,6 +628,7 @@ class B2CReleaseOrderDetail extends connect(store)(localize(i18next)(PageView))
563
628
  this._billingContact = ''
564
629
  this._selectedPostCode = ''
565
630
  this._selectedBillingPostCode = ''
631
+ this._disableBillingAddress = true
566
632
  this.currentTab = {
567
633
  selected: 'order'
568
634
  }
@@ -603,7 +669,7 @@ class B2CReleaseOrderDetail extends connect(store)(localize(i18next)(PageView))
603
669
  }
604
670
 
605
671
  if (this.isUserBelongsDomain) {
606
- if (this._status === ORDER_STATUS.PENDING_RECEIVE.value && !this._crossDocking) {
672
+ if (this._status === ORDER_STATUS.PENDING_RECEIVE.value && !this._crossDocking ) {
607
673
  actions.push(
608
674
  {
609
675
  title: i18next.t('button.reject'),
@@ -780,6 +846,22 @@ class B2CReleaseOrderDetail extends connect(store)(localize(i18next)(PageView))
780
846
  return this.shadowRoot?.querySelector('input[name=matchDeliveryAddressInput]')
781
847
  }
782
848
 
849
+ get _cityInput() {
850
+ return this.shadowRoot.querySelector('input[name=city]')
851
+ }
852
+
853
+ get _stateInput() {
854
+ return this.shadowRoot.querySelector('input[name=state]')
855
+ }
856
+
857
+ get _cityBillingInput() {
858
+ return this.shadowRoot.querySelector('input[name=billingCity]')
859
+ }
860
+
861
+ get _stateBillingInput() {
862
+ return this.shadowRoot.querySelector('input[name=billingState]')
863
+ }
864
+
783
865
  get deliveryCountryInput() {
784
866
  return this.shadowRoot?.querySelector('select[name=country]')
785
867
  }
@@ -863,6 +945,7 @@ class B2CReleaseOrderDetail extends connect(store)(localize(i18next)(PageView))
863
945
  let [enableTransportationServiceSetting] = await Promise.all([fetchSettingRule('enable-transportation-service')])
864
946
 
865
947
  this._enableTransportationServiceSetting = enableTransportationServiceSetting
948
+
866
949
 
867
950
  this._clearPage()
868
951
 
@@ -962,7 +1045,15 @@ class B2CReleaseOrderDetail extends connect(store)(localize(i18next)(PageView))
962
1045
  attentionCompany
963
1046
  phone1
964
1047
  deliveryAddress1
1048
+ deliveryAddress2
1049
+ deliveryAddress3
1050
+ deliveryAddress4
1051
+ deliveryAddress5
965
1052
  billingAddress
1053
+ billingAddress2
1054
+ billingAddress3
1055
+ billingAddress4
1056
+ billingAddress5
966
1057
  billingCity
967
1058
  billingCountry
968
1059
  billingPostalCode
@@ -1180,7 +1271,11 @@ class B2CReleaseOrderDetail extends connect(store)(localize(i18next)(PageView))
1180
1271
 
1181
1272
  if (
1182
1273
  releaseOrder?.postalCode === releaseOrder?.billingPostalCode &&
1183
- releaseOrder?.billingAddress === releaseOrder.deliveryAddress1
1274
+ releaseOrder?.billingAddress === releaseOrder.deliveryAddress1 &&
1275
+ releaseOrder?.billingAddress2 === releaseOrder.deliveryAddress2 &&
1276
+ releaseOrder?.billingAddress3 === releaseOrder.deliveryAddress3 &&
1277
+ releaseOrder?.billingAddress4 === releaseOrder.deliveryAddress4 &&
1278
+ releaseOrder?.billingAddress5 === releaseOrder.deliveryAddress5
1184
1279
  ) {
1185
1280
  this._disableBillingAddress = true
1186
1281
  } else {
@@ -1683,6 +1778,10 @@ class B2CReleaseOrderDetail extends connect(store)(localize(i18next)(PageView))
1683
1778
  // If match delivery address is ticked, all the billing address info will be the same with delivery address info
1684
1779
  if (this._disableBillingAddress) {
1685
1780
  shippingOrderInfo.billingAddress = contactPointInfo.deliveryAddress1
1781
+ shippingOrderInfo.billingAddress2 = contactPointInfo.deliveryAddress2
1782
+ shippingOrderInfo.billingAddress3 = contactPointInfo.deliveryAddress3
1783
+ shippingOrderInfo.billingAddress4 = contactPointInfo.deliveryAddress4
1784
+ shippingOrderInfo.billingAddress5 = contactPointInfo.deliveryAddress5
1686
1785
  shippingOrderInfo.billingPostalCode = contactPointInfo.postalCode
1687
1786
  shippingOrderInfo.billingCity = contactPointInfo.city
1688
1787
  shippingOrderInfo.billingState = contactPointInfo.state
@@ -1896,13 +1995,14 @@ class B2CReleaseOrderDetail extends connect(store)(localize(i18next)(PageView))
1896
1995
 
1897
1996
  switch (name) {
1898
1997
  case 'postalCode':
1899
- this._cityInput.value = stateName
1998
+ this._cityInput.value = stateName
1900
1999
  this._stateInput.value = cityName.toUpperCase()
1901
- if (this.matchDeliveryAddressInput.value === 'on') {
1902
- this._cityBillingInput.value = stateName
1903
- this._stateBillingInput.value = cityName.toUpperCase()
1904
- this._billingPostCode.value = postcode
1905
- }
2000
+ // may be deleted as the new field is hidden (previously only disable)
2001
+ // if (this.matchDeliveryAddressInput.value === 'on') {
2002
+ // this._cityBillingInput.value = stateName
2003
+ // this._stateBillingInput.value = cityName.toUpperCase()
2004
+ // this._billingPostCode.value = postcode
2005
+ // }
1906
2006
  this._releaseOrder = { ...this._releaseOrder, city: cityName.toUpperCase(), state: stateName }
1907
2007
  break
1908
2008
 
@@ -1913,7 +2013,7 @@ class B2CReleaseOrderDetail extends connect(store)(localize(i18next)(PageView))
1913
2013
  break
1914
2014
  }
1915
2015
  }
1916
- } catch (error) {
2016
+ } catch (e) {
1917
2017
  this._showToast(e)
1918
2018
  }
1919
2019
  }
@@ -2020,6 +2120,7 @@ class B2CReleaseOrderDetail extends connect(store)(localize(i18next)(PageView))
2020
2120
 
2021
2121
  if (this.deliveryCountryInput.value == 'MY') {
2022
2122
  checkShipmentFields(
2123
+ this.attentionToInput,
2023
2124
  this.deliveryPostalCodeSelectInput,
2024
2125
  this.deliveryStateInput,
2025
2126
  this.deliveryCityInput,
@@ -2028,6 +2129,7 @@ class B2CReleaseOrderDetail extends connect(store)(localize(i18next)(PageView))
2028
2129
  )
2029
2130
  } else {
2030
2131
  checkShipmentFields(
2132
+ this.attentionToInput,
2031
2133
  this.deliveryPostalCodeInput,
2032
2134
  this.deliveryStateInput,
2033
2135
  this.deliveryCityInput,
@@ -2084,6 +2186,7 @@ class B2CReleaseOrderDetail extends connect(store)(localize(i18next)(PageView))
2084
2186
  this._showReleasedOrderInfo = true
2085
2187
  this._showShippingInfo = false
2086
2188
  }
2189
+ this.updateContext()
2087
2190
  }
2088
2191
 
2089
2192
  _fillUpDeliveryInfo(data) {
@@ -2138,4 +2241,4 @@ class B2CReleaseOrderDetail extends connect(store)(localize(i18next)(PageView))
2138
2241
  }
2139
2242
  }
2140
2243
 
2141
- window.customElements.define('b2c-release-order-detail', B2CReleaseOrderDetail)
2244
+ window.customElements.define('b2c-release-order-detail', B2CReleaseOrderDetail)