@things-factory/product-ui 4.3.770 → 4.3.776
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.
|
@@ -417,6 +417,188 @@ export class ProductDetailsPopup extends localize(i18next)(LitElement) {
|
|
|
417
417
|
record: { editable: true },
|
|
418
418
|
header: `${i18next.t('field.aux_value')} 5`,
|
|
419
419
|
width: 90
|
|
420
|
+
},
|
|
421
|
+
{
|
|
422
|
+
type: 'string',
|
|
423
|
+
name: 'auxUnit6',
|
|
424
|
+
record: { editable: true },
|
|
425
|
+
header: `${i18next.t('field.aux_unit')} 6`,
|
|
426
|
+
width: 90
|
|
427
|
+
},
|
|
428
|
+
{
|
|
429
|
+
type: 'string',
|
|
430
|
+
name: 'auxValue6',
|
|
431
|
+
record: { editable: true },
|
|
432
|
+
header: `${i18next.t('field.aux_value')} 6`,
|
|
433
|
+
width: 90
|
|
434
|
+
},
|
|
435
|
+
{
|
|
436
|
+
type: 'string',
|
|
437
|
+
name: 'auxUnit7',
|
|
438
|
+
record: { editable: true },
|
|
439
|
+
header: `${i18next.t('field.aux_unit')} 7`,
|
|
440
|
+
width: 90
|
|
441
|
+
},
|
|
442
|
+
{
|
|
443
|
+
type: 'string',
|
|
444
|
+
name: 'auxValue7',
|
|
445
|
+
record: { editable: true },
|
|
446
|
+
header: `${i18next.t('field.aux_value')} 7`,
|
|
447
|
+
width: 90
|
|
448
|
+
},
|
|
449
|
+
{
|
|
450
|
+
type: 'string',
|
|
451
|
+
name: 'auxUnit8',
|
|
452
|
+
record: { editable: true },
|
|
453
|
+
header: `${i18next.t('field.aux_unit')} 8`,
|
|
454
|
+
width: 90
|
|
455
|
+
},
|
|
456
|
+
{
|
|
457
|
+
type: 'string',
|
|
458
|
+
name: 'auxValue8',
|
|
459
|
+
record: { editable: true },
|
|
460
|
+
header: `${i18next.t('field.aux_value')} 8`,
|
|
461
|
+
width: 90
|
|
462
|
+
},
|
|
463
|
+
{
|
|
464
|
+
type: 'string',
|
|
465
|
+
name: 'auxUnit9',
|
|
466
|
+
record: { editable: true },
|
|
467
|
+
header: `${i18next.t('field.aux_unit')} 9`,
|
|
468
|
+
width: 90
|
|
469
|
+
},
|
|
470
|
+
{
|
|
471
|
+
type: 'string',
|
|
472
|
+
name: 'auxValue9',
|
|
473
|
+
record: { editable: true },
|
|
474
|
+
header: `${i18next.t('field.aux_value')} 9`,
|
|
475
|
+
width: 90
|
|
476
|
+
},
|
|
477
|
+
{
|
|
478
|
+
type: 'string',
|
|
479
|
+
name: 'auxUnit10',
|
|
480
|
+
record: { editable: true },
|
|
481
|
+
header: `${i18next.t('field.aux_unit')} 10`,
|
|
482
|
+
width: 90
|
|
483
|
+
},
|
|
484
|
+
{
|
|
485
|
+
type: 'string',
|
|
486
|
+
name: 'auxValue10',
|
|
487
|
+
record: { editable: true },
|
|
488
|
+
header: `${i18next.t('field.aux_value')} 10`,
|
|
489
|
+
width: 90
|
|
490
|
+
},
|
|
491
|
+
{
|
|
492
|
+
type: 'string',
|
|
493
|
+
name: 'auxUnit11',
|
|
494
|
+
record: { editable: true },
|
|
495
|
+
header: `${i18next.t('field.aux_unit')} 11`,
|
|
496
|
+
width: 90
|
|
497
|
+
},
|
|
498
|
+
{
|
|
499
|
+
type: 'string',
|
|
500
|
+
name: 'auxValue11',
|
|
501
|
+
record: { editable: true },
|
|
502
|
+
header: `${i18next.t('field.aux_value')} 11`,
|
|
503
|
+
width: 90
|
|
504
|
+
},
|
|
505
|
+
{
|
|
506
|
+
type: 'string',
|
|
507
|
+
name: 'auxUnit12',
|
|
508
|
+
record: { editable: true },
|
|
509
|
+
header: `${i18next.t('field.aux_unit')} 12`,
|
|
510
|
+
width: 90
|
|
511
|
+
},
|
|
512
|
+
{
|
|
513
|
+
type: 'string',
|
|
514
|
+
name: 'auxValue12',
|
|
515
|
+
record: { editable: true },
|
|
516
|
+
header: `${i18next.t('field.aux_value')} 12`,
|
|
517
|
+
width: 90
|
|
518
|
+
},
|
|
519
|
+
{
|
|
520
|
+
type: 'string',
|
|
521
|
+
name: 'auxUnit13',
|
|
522
|
+
record: { editable: true },
|
|
523
|
+
header: `${i18next.t('field.aux_unit')} 13`,
|
|
524
|
+
width: 90
|
|
525
|
+
},
|
|
526
|
+
{
|
|
527
|
+
type: 'string',
|
|
528
|
+
name: 'auxValue13',
|
|
529
|
+
record: { editable: true },
|
|
530
|
+
header: `${i18next.t('field.aux_value')} 13`,
|
|
531
|
+
width: 90
|
|
532
|
+
},
|
|
533
|
+
{
|
|
534
|
+
type: 'string',
|
|
535
|
+
name: 'auxUnit14',
|
|
536
|
+
record: { editable: true },
|
|
537
|
+
header: `${i18next.t('field.aux_unit')} 14`,
|
|
538
|
+
width: 90
|
|
539
|
+
},
|
|
540
|
+
{
|
|
541
|
+
type: 'string',
|
|
542
|
+
name: 'auxValue14',
|
|
543
|
+
record: { editable: true },
|
|
544
|
+
header: `${i18next.t('field.aux_value')} 14`,
|
|
545
|
+
width: 90
|
|
546
|
+
},
|
|
547
|
+
{
|
|
548
|
+
type: 'string',
|
|
549
|
+
name: 'auxUnit15',
|
|
550
|
+
record: { editable: true },
|
|
551
|
+
header: `${i18next.t('field.aux_unit')} 15`,
|
|
552
|
+
width: 90
|
|
553
|
+
},
|
|
554
|
+
{
|
|
555
|
+
type: 'string',
|
|
556
|
+
name: 'auxValue15',
|
|
557
|
+
record: { editable: true },
|
|
558
|
+
header: `${i18next.t('field.aux_value')} 15`,
|
|
559
|
+
width: 90
|
|
560
|
+
},
|
|
561
|
+
{
|
|
562
|
+
type: 'string',
|
|
563
|
+
name: 'auxUnit16',
|
|
564
|
+
record: { editable: true },
|
|
565
|
+
header: `${i18next.t('field.aux_unit')} 16`,
|
|
566
|
+
width: 90
|
|
567
|
+
},
|
|
568
|
+
{
|
|
569
|
+
type: 'string',
|
|
570
|
+
name: 'auxValue16',
|
|
571
|
+
record: { editable: true },
|
|
572
|
+
header: `${i18next.t('field.aux_value')} 16`,
|
|
573
|
+
width: 90
|
|
574
|
+
},
|
|
575
|
+
{
|
|
576
|
+
type: 'string',
|
|
577
|
+
name: 'auxUnit17',
|
|
578
|
+
record: { editable: true },
|
|
579
|
+
header: `${i18next.t('field.aux_unit')} 17`,
|
|
580
|
+
width: 90
|
|
581
|
+
},
|
|
582
|
+
{
|
|
583
|
+
type: 'string',
|
|
584
|
+
name: 'auxValue17',
|
|
585
|
+
record: { editable: true },
|
|
586
|
+
header: `${i18next.t('field.aux_value')} 17`,
|
|
587
|
+
width: 90
|
|
588
|
+
},
|
|
589
|
+
{
|
|
590
|
+
type: 'string',
|
|
591
|
+
name: 'auxUnit18',
|
|
592
|
+
record: { editable: true },
|
|
593
|
+
header: `${i18next.t('field.aux_unit')} 18`,
|
|
594
|
+
width: 90
|
|
595
|
+
},
|
|
596
|
+
{
|
|
597
|
+
type: 'string',
|
|
598
|
+
name: 'auxValue18',
|
|
599
|
+
record: { editable: true },
|
|
600
|
+
header: `${i18next.t('field.aux_value')} 18`,
|
|
601
|
+
width: 90
|
|
420
602
|
}
|
|
421
603
|
]
|
|
422
604
|
}
|
|
@@ -520,6 +702,32 @@ export class ProductDetailsPopup extends localize(i18next)(LitElement) {
|
|
|
520
702
|
auxValue4
|
|
521
703
|
auxUnit5
|
|
522
704
|
auxValue5
|
|
705
|
+
auxUnit6
|
|
706
|
+
auxValue6
|
|
707
|
+
auxUnit7
|
|
708
|
+
auxValue7
|
|
709
|
+
auxUnit8
|
|
710
|
+
auxValue8
|
|
711
|
+
auxUnit9
|
|
712
|
+
auxValue9
|
|
713
|
+
auxUnit10
|
|
714
|
+
auxValue10
|
|
715
|
+
auxUnit11
|
|
716
|
+
auxValue11
|
|
717
|
+
auxUnit12
|
|
718
|
+
auxValue12
|
|
719
|
+
auxUnit13
|
|
720
|
+
auxValue13
|
|
721
|
+
auxUnit14
|
|
722
|
+
auxValue14
|
|
723
|
+
auxUnit15
|
|
724
|
+
auxValue15
|
|
725
|
+
auxUnit16
|
|
726
|
+
auxValue16
|
|
727
|
+
auxUnit17
|
|
728
|
+
auxValue17
|
|
729
|
+
auxUnit18
|
|
730
|
+
auxValue18
|
|
523
731
|
isTrackedAsInventory
|
|
524
732
|
discountId
|
|
525
733
|
costPrice
|
|
@@ -602,6 +810,32 @@ export class ProductDetailsPopup extends localize(i18next)(LitElement) {
|
|
|
602
810
|
auxValue4: itm.auxValue4,
|
|
603
811
|
auxUnit5: itm.auxUnit5,
|
|
604
812
|
auxValue5: itm.auxValue5,
|
|
813
|
+
auxUnit6: itm.auxUnit6,
|
|
814
|
+
auxValue6: itm.auxValue6,
|
|
815
|
+
auxUnit7: itm.auxUnit7,
|
|
816
|
+
auxValue7: itm.auxValue7,
|
|
817
|
+
auxUnit8: itm.auxUnit8,
|
|
818
|
+
auxValue8: itm.auxValue8,
|
|
819
|
+
auxUnit9: itm.auxUnit9,
|
|
820
|
+
auxValue9: itm.auxValue9,
|
|
821
|
+
auxUnit10: itm.auxUnit10,
|
|
822
|
+
auxValue10: itm.auxValue10,
|
|
823
|
+
auxUnit11: itm.auxUnit11,
|
|
824
|
+
auxValue11: itm.auxValue11,
|
|
825
|
+
auxUnit12: itm.auxUnit12,
|
|
826
|
+
auxValue12: itm.auxValue12,
|
|
827
|
+
auxUnit13: itm.auxUnit13,
|
|
828
|
+
auxValue13: itm.auxValue13,
|
|
829
|
+
auxUnit14: itm.auxUnit14,
|
|
830
|
+
auxValue14: itm.auxValue14,
|
|
831
|
+
auxUnit15: itm.auxUnit15,
|
|
832
|
+
auxValue15: itm.auxValue15,
|
|
833
|
+
auxUnit16: itm.auxUnit16,
|
|
834
|
+
auxValue16: itm.auxValue16,
|
|
835
|
+
auxUnit17: itm.auxUnit17,
|
|
836
|
+
auxValue17: itm.auxValue17,
|
|
837
|
+
auxUnit18: itm.auxUnit18,
|
|
838
|
+
auxValue18: itm.auxValue18,
|
|
605
839
|
isTrackedAsInventory: itm.isTrackedAsInventory,
|
|
606
840
|
discountId: itm.discountId,
|
|
607
841
|
costPrice: parseFloat(itm.costPrice),
|
|
@@ -86,6 +86,63 @@ class ProductList extends localize(i18next)(PageView) {
|
|
|
86
86
|
},
|
|
87
87
|
importable: {
|
|
88
88
|
handler: records => {
|
|
89
|
+
|
|
90
|
+
// Map Excel headers to imex keys
|
|
91
|
+
const imexColumns = this.productGristConfig.columns.filter(column => column.imex !== undefined)
|
|
92
|
+
const headerToKeyMap = {}
|
|
93
|
+
imexColumns.forEach(column => {
|
|
94
|
+
if (column.imex && column.imex.header && column.imex.key) {
|
|
95
|
+
headerToKeyMap[column.imex.header] = column.imex.key
|
|
96
|
+
}
|
|
97
|
+
})
|
|
98
|
+
// Also support "Default" column (product detail default flag) from export/import
|
|
99
|
+
const defaultHeader = i18next.t('field.default')
|
|
100
|
+
if (defaultHeader) {
|
|
101
|
+
headerToKeyMap[defaultHeader] = 'isDefault'
|
|
102
|
+
headerToKeyMap[defaultHeader.toLowerCase()] = 'isDefault'
|
|
103
|
+
}
|
|
104
|
+
headerToKeyMap['default'] = 'isDefault'
|
|
105
|
+
|
|
106
|
+
// Remap records to use imex keys instead of Excel headers
|
|
107
|
+
records = records.map(record => {
|
|
108
|
+
const mappedRecord = {}
|
|
109
|
+
for (const [excelHeader, value] of Object.entries(record)) {
|
|
110
|
+
// Check if this Excel header matches an imex header
|
|
111
|
+
const imexKey = headerToKeyMap[excelHeader]
|
|
112
|
+
if (imexKey) {
|
|
113
|
+
mappedRecord[imexKey] = value
|
|
114
|
+
} else {
|
|
115
|
+
// Keep original key if no mapping found (for backwards compatibility)
|
|
116
|
+
mappedRecord[excelHeader] = value
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
return mappedRecord
|
|
120
|
+
})
|
|
121
|
+
|
|
122
|
+
// Normalize boolean fields so preview checkboxes reflect true/false (not truthy strings like "false")
|
|
123
|
+
const booleanKeys = new Set(
|
|
124
|
+
this.productGristConfig.columns.filter(c => c.type === 'boolean').map(c => c.name).concat(['isDefault'])
|
|
125
|
+
)
|
|
126
|
+
records = records.map(record => {
|
|
127
|
+
booleanKeys.forEach(key => {
|
|
128
|
+
const raw = record[key]
|
|
129
|
+
if (raw === undefined) return
|
|
130
|
+
if (raw === null || raw === '') {
|
|
131
|
+
record[key] = false
|
|
132
|
+
return
|
|
133
|
+
}
|
|
134
|
+
if (typeof raw === 'boolean') return
|
|
135
|
+
if (typeof raw === 'string') {
|
|
136
|
+
const v = raw.trim().toLowerCase()
|
|
137
|
+
record[key] = v === 'true' || v === '1' || v === 'yes' || v === 'y'
|
|
138
|
+
return
|
|
139
|
+
}
|
|
140
|
+
// Fallback: force boolean
|
|
141
|
+
record[key] = Boolean(raw)
|
|
142
|
+
})
|
|
143
|
+
return record
|
|
144
|
+
})
|
|
145
|
+
|
|
89
146
|
records.map(record => {
|
|
90
147
|
record.costPrice = record.costPrice == null ? '0.00' : parseFloat(record.costPrice).toFixed(2)
|
|
91
148
|
record.commissionFee = record.commissionFee == null ? '0.00' : parseFloat(record.commissionFee).toFixed(2)
|
|
@@ -123,6 +180,13 @@ class ProductList extends localize(i18next)(PageView) {
|
|
|
123
180
|
header: i18next.t('field.packing_size'),
|
|
124
181
|
width: 80
|
|
125
182
|
},
|
|
183
|
+
{
|
|
184
|
+
type: 'boolean',
|
|
185
|
+
name: 'isDefault',
|
|
186
|
+
header: i18next.t('field.default'),
|
|
187
|
+
record: { editable: true, align: 'center' },
|
|
188
|
+
width: 80
|
|
189
|
+
},
|
|
126
190
|
{
|
|
127
191
|
type: 'float',
|
|
128
192
|
name: 'commissionFee',
|
|
@@ -789,6 +853,214 @@ class ProductList extends localize(i18next)(PageView) {
|
|
|
789
853
|
header: `${i18next.t('field.aux_value')} 5`,
|
|
790
854
|
width: 100
|
|
791
855
|
},
|
|
856
|
+
{
|
|
857
|
+
type: 'string',
|
|
858
|
+
name: 'auxUnit6',
|
|
859
|
+
record: { editable: true },
|
|
860
|
+
imex: { header: `${i18next.t('field.aux_unit')} 6`, key: 'auxUnit6', width: 20, type: 'string' },
|
|
861
|
+
header: `${i18next.t('field.aux_unit')} 6`,
|
|
862
|
+
width: 100
|
|
863
|
+
},
|
|
864
|
+
{
|
|
865
|
+
type: 'string',
|
|
866
|
+
name: 'auxValue6',
|
|
867
|
+
record: { editable: true },
|
|
868
|
+
imex: { header: `${i18next.t('field.aux_value')} 6`, key: 'auxValue6', width: 20, type: 'string' },
|
|
869
|
+
header: `${i18next.t('field.aux_value')} 6`,
|
|
870
|
+
width: 100
|
|
871
|
+
},
|
|
872
|
+
{
|
|
873
|
+
type: 'string',
|
|
874
|
+
name: 'auxUnit7',
|
|
875
|
+
record: { editable: true },
|
|
876
|
+
imex: { header: `${i18next.t('field.aux_unit')} 7`, key: 'auxUnit7', width: 20, type: 'string' },
|
|
877
|
+
header: `${i18next.t('field.aux_unit')} 7`,
|
|
878
|
+
width: 100
|
|
879
|
+
},
|
|
880
|
+
{
|
|
881
|
+
type: 'string',
|
|
882
|
+
name: 'auxValue7',
|
|
883
|
+
record: { editable: true },
|
|
884
|
+
imex: { header: `${i18next.t('field.aux_value')} 7`, key: 'auxValue7', width: 20, type: 'string' },
|
|
885
|
+
header: `${i18next.t('field.aux_value')} 7`,
|
|
886
|
+
width: 100
|
|
887
|
+
},
|
|
888
|
+
{
|
|
889
|
+
type: 'string',
|
|
890
|
+
name: 'auxUnit8',
|
|
891
|
+
record: { editable: true },
|
|
892
|
+
imex: { header: `${i18next.t('field.aux_unit')} 8`, key: 'auxUnit8', width: 20, type: 'string' },
|
|
893
|
+
header: `${i18next.t('field.aux_unit')} 8`,
|
|
894
|
+
width: 100
|
|
895
|
+
},
|
|
896
|
+
{
|
|
897
|
+
type: 'string',
|
|
898
|
+
name: 'auxValue8',
|
|
899
|
+
record: { editable: true },
|
|
900
|
+
imex: { header: `${i18next.t('field.aux_value')} 8`, key: 'auxValue8', width: 20, type: 'string' },
|
|
901
|
+
header: `${i18next.t('field.aux_value')} 8`,
|
|
902
|
+
width: 100
|
|
903
|
+
},
|
|
904
|
+
{
|
|
905
|
+
type: 'string',
|
|
906
|
+
name: 'auxUnit9',
|
|
907
|
+
record: { editable: true },
|
|
908
|
+
imex: { header: `${i18next.t('field.aux_unit')} 9`, key: 'auxUnit9', width: 20, type: 'string' },
|
|
909
|
+
header: `${i18next.t('field.aux_unit')} 9`,
|
|
910
|
+
width: 100
|
|
911
|
+
},
|
|
912
|
+
{
|
|
913
|
+
type: 'string',
|
|
914
|
+
name: 'auxValue9',
|
|
915
|
+
record: { editable: true },
|
|
916
|
+
imex: { header: `${i18next.t('field.aux_value')} 9`, key: 'auxValue9', width: 20, type: 'string' },
|
|
917
|
+
header: `${i18next.t('field.aux_value')} 9`,
|
|
918
|
+
width: 100
|
|
919
|
+
},
|
|
920
|
+
{
|
|
921
|
+
type: 'string',
|
|
922
|
+
name: 'auxUnit10',
|
|
923
|
+
record: { editable: true },
|
|
924
|
+
imex: { header: `${i18next.t('field.aux_unit')} 10`, key: 'auxUnit10', width: 20, type: 'string' },
|
|
925
|
+
header: `${i18next.t('field.aux_unit')} 10`,
|
|
926
|
+
width: 100
|
|
927
|
+
},
|
|
928
|
+
{
|
|
929
|
+
type: 'string',
|
|
930
|
+
name: 'auxValue10',
|
|
931
|
+
record: { editable: true },
|
|
932
|
+
imex: { header: `${i18next.t('field.aux_value')} 10`, key: 'auxValue10', width: 20, type: 'string' },
|
|
933
|
+
header: `${i18next.t('field.aux_value')} 10`,
|
|
934
|
+
width: 100
|
|
935
|
+
},
|
|
936
|
+
{
|
|
937
|
+
type: 'string',
|
|
938
|
+
name: 'auxUnit11',
|
|
939
|
+
record: { editable: true },
|
|
940
|
+
imex: { header: `${i18next.t('field.aux_unit')} 11`, key: 'auxUnit11', width: 20, type: 'string' },
|
|
941
|
+
header: `${i18next.t('field.aux_unit')} 11`,
|
|
942
|
+
width: 100
|
|
943
|
+
},
|
|
944
|
+
{
|
|
945
|
+
type: 'string',
|
|
946
|
+
name: 'auxValue11',
|
|
947
|
+
record: { editable: true },
|
|
948
|
+
imex: { header: `${i18next.t('field.aux_value')} 11`, key: 'auxValue11', width: 20, type: 'string' },
|
|
949
|
+
header: `${i18next.t('field.aux_value')} 11`,
|
|
950
|
+
width: 100
|
|
951
|
+
},
|
|
952
|
+
{
|
|
953
|
+
type: 'string',
|
|
954
|
+
name: 'auxUnit12',
|
|
955
|
+
record: { editable: true },
|
|
956
|
+
imex: { header: `${i18next.t('field.aux_unit')} 12`, key: 'auxUnit12', width: 20, type: 'string' },
|
|
957
|
+
header: `${i18next.t('field.aux_unit')} 12`,
|
|
958
|
+
width: 100
|
|
959
|
+
},
|
|
960
|
+
{
|
|
961
|
+
type: 'string',
|
|
962
|
+
name: 'auxValue12',
|
|
963
|
+
record: { editable: true },
|
|
964
|
+
imex: { header: `${i18next.t('field.aux_value')} 12`, key: 'auxValue12', width: 20, type: 'string' },
|
|
965
|
+
header: `${i18next.t('field.aux_value')} 12`,
|
|
966
|
+
width: 100
|
|
967
|
+
},
|
|
968
|
+
{
|
|
969
|
+
type: 'string',
|
|
970
|
+
name: 'auxUnit13',
|
|
971
|
+
record: { editable: true },
|
|
972
|
+
imex: { header: `${i18next.t('field.aux_unit')} 13`, key: 'auxUnit13', width: 20, type: 'string' },
|
|
973
|
+
header: `${i18next.t('field.aux_unit')} 13`,
|
|
974
|
+
width: 100
|
|
975
|
+
},
|
|
976
|
+
{
|
|
977
|
+
type: 'string',
|
|
978
|
+
name: 'auxValue13',
|
|
979
|
+
record: { editable: true },
|
|
980
|
+
imex: { header: `${i18next.t('field.aux_value')} 13`, key: 'auxValue13', width: 20, type: 'string' },
|
|
981
|
+
header: `${i18next.t('field.aux_value')} 13`,
|
|
982
|
+
width: 100
|
|
983
|
+
},
|
|
984
|
+
{
|
|
985
|
+
type: 'string',
|
|
986
|
+
name: 'auxUnit14',
|
|
987
|
+
record: { editable: true },
|
|
988
|
+
imex: { header: `${i18next.t('field.aux_unit')} 14`, key: 'auxUnit14', width: 20, type: 'string' },
|
|
989
|
+
header: `${i18next.t('field.aux_unit')} 14`,
|
|
990
|
+
width: 100
|
|
991
|
+
},
|
|
992
|
+
{
|
|
993
|
+
type: 'string',
|
|
994
|
+
name: 'auxValue14',
|
|
995
|
+
record: { editable: true },
|
|
996
|
+
imex: { header: `${i18next.t('field.aux_value')} 14`, key: 'auxValue14', width: 20, type: 'string' },
|
|
997
|
+
header: `${i18next.t('field.aux_value')} 14`,
|
|
998
|
+
width: 100
|
|
999
|
+
},
|
|
1000
|
+
{
|
|
1001
|
+
type: 'string',
|
|
1002
|
+
name: 'auxUnit15',
|
|
1003
|
+
record: { editable: true },
|
|
1004
|
+
imex: { header: `${i18next.t('field.aux_unit')} 15`, key: 'auxUnit15', width: 20, type: 'string' },
|
|
1005
|
+
header: `${i18next.t('field.aux_unit')} 15`,
|
|
1006
|
+
width: 100
|
|
1007
|
+
},
|
|
1008
|
+
{
|
|
1009
|
+
type: 'string',
|
|
1010
|
+
name: 'auxValue15',
|
|
1011
|
+
record: { editable: true },
|
|
1012
|
+
imex: { header: `${i18next.t('field.aux_value')} 15`, key: 'auxValue15', width: 20, type: 'string' },
|
|
1013
|
+
header: `${i18next.t('field.aux_value')} 15`,
|
|
1014
|
+
width: 100
|
|
1015
|
+
},
|
|
1016
|
+
{
|
|
1017
|
+
type: 'string',
|
|
1018
|
+
name: 'auxUnit16',
|
|
1019
|
+
record: { editable: true },
|
|
1020
|
+
imex: { header: `${i18next.t('field.aux_unit')} 16`, key: 'auxUnit16', width: 20, type: 'string' },
|
|
1021
|
+
header: `${i18next.t('field.aux_unit')} 16`,
|
|
1022
|
+
width: 100
|
|
1023
|
+
},
|
|
1024
|
+
{
|
|
1025
|
+
type: 'string',
|
|
1026
|
+
name: 'auxValue16',
|
|
1027
|
+
record: { editable: true },
|
|
1028
|
+
imex: { header: `${i18next.t('field.aux_value')} 16`, key: 'auxValue16', width: 20, type: 'string' },
|
|
1029
|
+
header: `${i18next.t('field.aux_value')} 16`,
|
|
1030
|
+
width: 100
|
|
1031
|
+
},
|
|
1032
|
+
{
|
|
1033
|
+
type: 'string',
|
|
1034
|
+
name: 'auxUnit17',
|
|
1035
|
+
record: { editable: true },
|
|
1036
|
+
imex: { header: `${i18next.t('field.aux_unit')} 17`, key: 'auxUnit17', width: 20, type: 'string' },
|
|
1037
|
+
header: `${i18next.t('field.aux_unit')} 17`,
|
|
1038
|
+
width: 100
|
|
1039
|
+
},
|
|
1040
|
+
{
|
|
1041
|
+
type: 'string',
|
|
1042
|
+
name: 'auxValue17',
|
|
1043
|
+
record: { editable: true },
|
|
1044
|
+
imex: { header: `${i18next.t('field.aux_value')} 17`, key: 'auxValue17', width: 20, type: 'string' },
|
|
1045
|
+
header: `${i18next.t('field.aux_value')} 17`,
|
|
1046
|
+
width: 100
|
|
1047
|
+
},
|
|
1048
|
+
{
|
|
1049
|
+
type: 'string',
|
|
1050
|
+
name: 'auxUnit18',
|
|
1051
|
+
record: { editable: true },
|
|
1052
|
+
imex: { header: `${i18next.t('field.aux_unit')} 18`, key: 'auxUnit18', width: 20, type: 'string' },
|
|
1053
|
+
header: `${i18next.t('field.aux_unit')} 18`,
|
|
1054
|
+
width: 100
|
|
1055
|
+
},
|
|
1056
|
+
{
|
|
1057
|
+
type: 'string',
|
|
1058
|
+
name: 'auxValue18',
|
|
1059
|
+
record: { editable: true },
|
|
1060
|
+
imex: { header: `${i18next.t('field.aux_value')} 18`, key: 'auxValue18', width: 20, type: 'string' },
|
|
1061
|
+
header: `${i18next.t('field.aux_value')} 18`,
|
|
1062
|
+
width: 100
|
|
1063
|
+
},
|
|
792
1064
|
{
|
|
793
1065
|
type: 'select',
|
|
794
1066
|
name: 'pickingStrategy',
|
|
@@ -928,6 +1200,32 @@ class ProductList extends localize(i18next)(PageView) {
|
|
|
928
1200
|
auxValue4
|
|
929
1201
|
auxUnit5
|
|
930
1202
|
auxValue5
|
|
1203
|
+
auxUnit6
|
|
1204
|
+
auxValue6
|
|
1205
|
+
auxUnit7
|
|
1206
|
+
auxValue7
|
|
1207
|
+
auxUnit8
|
|
1208
|
+
auxValue8
|
|
1209
|
+
auxUnit9
|
|
1210
|
+
auxValue9
|
|
1211
|
+
auxUnit10
|
|
1212
|
+
auxValue10
|
|
1213
|
+
auxUnit11
|
|
1214
|
+
auxValue11
|
|
1215
|
+
auxUnit12
|
|
1216
|
+
auxValue12
|
|
1217
|
+
auxUnit13
|
|
1218
|
+
auxValue13
|
|
1219
|
+
auxUnit14
|
|
1220
|
+
auxValue14
|
|
1221
|
+
auxUnit15
|
|
1222
|
+
auxValue15
|
|
1223
|
+
auxUnit16
|
|
1224
|
+
auxValue16
|
|
1225
|
+
auxUnit17
|
|
1226
|
+
auxValue17
|
|
1227
|
+
auxUnit18
|
|
1228
|
+
auxValue18
|
|
931
1229
|
brandSku
|
|
932
1230
|
brand
|
|
933
1231
|
subBrand
|
|
@@ -1101,6 +1399,7 @@ class ProductList extends localize(i18next)(PageView) {
|
|
|
1101
1399
|
patch.isRequireSerialNumberScanningOutbound?.toString().toLowerCase() === 'true'
|
|
1102
1400
|
patch.isInventoryDecimal = patch.isInventoryDecimal?.toString().toLowerCase() === 'true'
|
|
1103
1401
|
patch.allowStackingOption = patch.allowStackingOption?.toString().toLowerCase() === 'true'
|
|
1402
|
+
patch.isDefault = patch.isDefault?.toString().toLowerCase() === 'true'
|
|
1104
1403
|
|
|
1105
1404
|
// Helper function to safely parse integers, handling empty strings
|
|
1106
1405
|
const safeParseInt = val => {
|
|
@@ -1146,7 +1445,8 @@ class ProductList extends localize(i18next)(PageView) {
|
|
|
1146
1445
|
isRequireSerialNumberScanningInbound: patch?.isRequireSerialNumberScanningInbound || false,
|
|
1147
1446
|
isRequireSerialNumberScanningOutbound: patch?.isRequireSerialNumberScanningOutbound || false,
|
|
1148
1447
|
isInventoryDecimal: patch?.isInventoryDecimal || false,
|
|
1149
|
-
allowStackingOption: patch?.allowStackingOption || false
|
|
1448
|
+
allowStackingOption: patch?.allowStackingOption || false,
|
|
1449
|
+
isDefault: patch?.isDefault || false
|
|
1150
1450
|
}
|
|
1151
1451
|
|
|
1152
1452
|
// Remove any remaining empty strings from numeric fields to prevent GraphQL errors
|
|
@@ -1340,6 +1640,7 @@ class ProductList extends localize(i18next)(PageView) {
|
|
|
1340
1640
|
|
|
1341
1641
|
headerSetting.push({ header: `${i18next.t('field.child_gtin')}`, key: 'childGtin', width: 20, type: 'string' })
|
|
1342
1642
|
headerSetting.push({ header: `${i18next.t('field.packing_size')}`, key: 'packingSize', width: 20, type: 'float' })
|
|
1643
|
+
headerSetting.push({ header: `${i18next.t('field.default')}`, key: 'isDefault', width: 20, type: 'boolean' })
|
|
1343
1644
|
headerSetting.push({
|
|
1344
1645
|
header: `${i18next.t('field.commission_fee')}`,
|
|
1345
1646
|
key: 'commissionFee',
|
|
@@ -1395,6 +1696,7 @@ class ProductList extends localize(i18next)(PageView) {
|
|
|
1395
1696
|
packingSize
|
|
1396
1697
|
uom
|
|
1397
1698
|
uomValue
|
|
1699
|
+
isDefault
|
|
1398
1700
|
productBarcodes {
|
|
1399
1701
|
gtin
|
|
1400
1702
|
}
|
|
@@ -1445,6 +1747,32 @@ class ProductList extends localize(i18next)(PageView) {
|
|
|
1445
1747
|
auxValue4
|
|
1446
1748
|
auxUnit5
|
|
1447
1749
|
auxValue5
|
|
1750
|
+
auxUnit6
|
|
1751
|
+
auxValue6
|
|
1752
|
+
auxUnit7
|
|
1753
|
+
auxValue7
|
|
1754
|
+
auxUnit8
|
|
1755
|
+
auxValue8
|
|
1756
|
+
auxUnit9
|
|
1757
|
+
auxValue9
|
|
1758
|
+
auxUnit10
|
|
1759
|
+
auxValue10
|
|
1760
|
+
auxUnit11
|
|
1761
|
+
auxValue11
|
|
1762
|
+
auxUnit12
|
|
1763
|
+
auxValue12
|
|
1764
|
+
auxUnit13
|
|
1765
|
+
auxValue13
|
|
1766
|
+
auxUnit14
|
|
1767
|
+
auxValue14
|
|
1768
|
+
auxUnit15
|
|
1769
|
+
auxValue15
|
|
1770
|
+
auxUnit16
|
|
1771
|
+
auxValue16
|
|
1772
|
+
auxUnit17
|
|
1773
|
+
auxValue17
|
|
1774
|
+
auxUnit18
|
|
1775
|
+
auxValue18
|
|
1448
1776
|
brandSku
|
|
1449
1777
|
brand
|
|
1450
1778
|
subBrand
|
|
@@ -1500,7 +1828,8 @@ class ProductList extends localize(i18next)(PageView) {
|
|
|
1500
1828
|
packingSize: pd.packingSize,
|
|
1501
1829
|
uom: pd.uom,
|
|
1502
1830
|
uomValue: pd.uomValue,
|
|
1503
|
-
gtin: gtin
|
|
1831
|
+
gtin: gtin,
|
|
1832
|
+
isDefault: pd.isDefault
|
|
1504
1833
|
}
|
|
1505
1834
|
})
|
|
1506
1835
|
flattenedList.push(...pds)
|
|
@@ -1515,6 +1844,7 @@ class ProductList extends localize(i18next)(PageView) {
|
|
|
1515
1844
|
transactionFee: item.transactionFee,
|
|
1516
1845
|
packingSize: item.packingSize,
|
|
1517
1846
|
gtin: item.gtin,
|
|
1847
|
+
isDefault: item.isDefault,
|
|
1518
1848
|
...this.productGristConfig.columns
|
|
1519
1849
|
.filter(column => column.type !== 'gutter' && column.record !== undefined && column.imex !== undefined)
|
|
1520
1850
|
.reduce((record, column) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/product-ui",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.776",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"@things-factory/i18n-base": "^4.3.767",
|
|
29
29
|
"@things-factory/import-ui": "^4.3.770",
|
|
30
30
|
"@things-factory/layout-base": "^4.3.767",
|
|
31
|
-
"@things-factory/product-base": "^4.3.
|
|
31
|
+
"@things-factory/product-base": "^4.3.776",
|
|
32
32
|
"@things-factory/shell": "^4.3.767"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "a2ad3248858837746d6c4f477bce580c604d1991"
|
|
35
35
|
}
|