@nyris/nyris-webapp 0.3.31 → 0.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/build/asset-manifest.json +9 -10
- package/build/index.html +1 -1
- package/build/{precache-manifest.f764cb62c8d24f8090a273fa02dd1a7a.js → precache-manifest.4cff5b8aafe3d00d59bc2c9725eb6ade.js} +9 -13
- package/build/service-worker.js +1 -1
- package/build/static/js/2.69ce0823.chunk.js +3 -0
- package/build/static/js/2.69ce0823.chunk.js.map +1 -0
- package/build/static/js/{main.1edd044c.chunk.js → main.6122377b.chunk.js} +3 -3
- package/build/static/js/main.6122377b.chunk.js.map +1 -0
- package/package.json +4 -4
- package/src/components/DetailItem.tsx +37 -31
- package/src/components/ProductList/index.tsx +9 -4
- package/src/components/results/ItemResult.tsx +54 -66
- package/build/static/js/2.5ae21a8b.chunk.js +0 -3
- package/build/static/js/2.5ae21a8b.chunk.js.map +0 -1
- package/build/static/js/main.1edd044c.chunk.js.map +0 -1
- package/build/static/media/expand.06cebf40.svg +0 -27
- /package/build/static/js/{2.5ae21a8b.chunk.js.LICENSE.txt → 2.69ce0823.chunk.js.LICENSE.txt} +0 -0
- /package/build/static/js/{main.1edd044c.chunk.js.LICENSE.txt → main.6122377b.chunk.js.LICENSE.txt} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nyris/nyris-webapp",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.33",
|
|
4
4
|
"homepage": "./",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@algolia/autocomplete-js": "^1.7.1",
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
"@material-ui/data-grid": "^4.0.0-alpha.37",
|
|
13
13
|
"@material-ui/icons": "^4.4.1",
|
|
14
14
|
"@material-ui/lab": "^4.0.0-alpha.60",
|
|
15
|
-
"@nyris/nyris-api": "^0.3.
|
|
16
|
-
"@nyris/nyris-react-components": "^0.3.
|
|
15
|
+
"@nyris/nyris-api": "^0.3.33",
|
|
16
|
+
"@nyris/nyris-react-components": "^0.3.33",
|
|
17
17
|
"@reduxjs/toolkit": "^1.6.1",
|
|
18
18
|
"@splidejs/react-splide": "^0.7.12",
|
|
19
19
|
"@types/blueimp-load-image": "^2.23.4",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"qs": "^6.10.3",
|
|
41
41
|
"react": "^17.0.0",
|
|
42
42
|
"react-dom": "^16.13.1",
|
|
43
|
-
"react-dropzone": "^
|
|
43
|
+
"react-dropzone": "^14.2.3",
|
|
44
44
|
"react-hook-form": "^7.27.1",
|
|
45
45
|
"react-hot-toast": "^2.4.0",
|
|
46
46
|
"react-i18next": "^12.2.0",
|
|
@@ -114,7 +114,7 @@ function DetailItem(props: Props) {
|
|
|
114
114
|
style={{ width: '300px', height: '300px', padding: '8px' }}
|
|
115
115
|
/>
|
|
116
116
|
)}
|
|
117
|
-
{
|
|
117
|
+
{dataImageCarousel.length > 0 && (
|
|
118
118
|
<Button
|
|
119
119
|
className="icon-style"
|
|
120
120
|
onClick={() => {
|
|
@@ -314,36 +314,42 @@ function DetailItem(props: Props) {
|
|
|
314
314
|
style={{ color: '#2B2C46', marginTop: 12 }}
|
|
315
315
|
gridGap={20}
|
|
316
316
|
>
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
{
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
{
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
{
|
|
345
|
-
|
|
346
|
-
|
|
317
|
+
{settings.field.warehouseNumber && (
|
|
318
|
+
<Box
|
|
319
|
+
style={{
|
|
320
|
+
backgroundColor: `${settings.theme?.secondaryColor}26`,
|
|
321
|
+
padding: '5px 10px',
|
|
322
|
+
borderRadius: 4,
|
|
323
|
+
width: '100%',
|
|
324
|
+
}}
|
|
325
|
+
>
|
|
326
|
+
<div style={{ fontSize: 15, fontWeight: 500 }}>
|
|
327
|
+
{dataItem[settings.field.warehouseNumber]}
|
|
328
|
+
</div>
|
|
329
|
+
<div style={{ fontSize: 17, fontWeight: 700 }}>
|
|
330
|
+
{dataItem[settings.field.warehouseNumberValue] || 'N/A'}
|
|
331
|
+
</div>
|
|
332
|
+
</Box>
|
|
333
|
+
)}
|
|
334
|
+
|
|
335
|
+
{settings.field.warehouseShelfNumber && (
|
|
336
|
+
<Box
|
|
337
|
+
style={{
|
|
338
|
+
backgroundColor: `${settings.theme?.secondaryColor}26`,
|
|
339
|
+
padding: '5px 10px',
|
|
340
|
+
borderRadius: 4,
|
|
341
|
+
width: '100%',
|
|
342
|
+
}}
|
|
343
|
+
>
|
|
344
|
+
<div style={{ fontSize: 15, fontWeight: 500 }}>
|
|
345
|
+
{dataItem[settings.field.warehouseShelfNumber]}
|
|
346
|
+
</div>
|
|
347
|
+
<div style={{ fontSize: 17, fontWeight: 700 }}>
|
|
348
|
+
{dataItem[settings.field.warehouseShelfNumberValue] ||
|
|
349
|
+
'N/A'}
|
|
350
|
+
</div>
|
|
351
|
+
</Box>
|
|
352
|
+
)}
|
|
347
353
|
</Box>
|
|
348
354
|
)}
|
|
349
355
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Box } from '@material-ui/core';
|
|
2
2
|
import ItemResult from 'components/results/ItemResult';
|
|
3
|
-
import { groupBy } from 'lodash';
|
|
3
|
+
import { groupBy, uniqueId } from 'lodash';
|
|
4
4
|
import React, { memo, useEffect, useMemo, useState } from 'react';
|
|
5
5
|
import { connectStateResults } from 'react-instantsearch-dom';
|
|
6
6
|
import { useAppSelector } from 'Store/Store';
|
|
@@ -52,9 +52,13 @@ function ProductListComponent({
|
|
|
52
52
|
let newArrayShowGroup: any = [];
|
|
53
53
|
let newArrayShowItem: any = [];
|
|
54
54
|
|
|
55
|
-
const groupHits = hits.
|
|
56
|
-
(hit
|
|
57
|
-
|
|
55
|
+
const groupHits = hits.map((hit: { group_id: string }) => {
|
|
56
|
+
if (!hit.group_id) {
|
|
57
|
+
return { ...hit, group_id: uniqueId('random-group-id') };
|
|
58
|
+
}
|
|
59
|
+
return hit;
|
|
60
|
+
});
|
|
61
|
+
|
|
58
62
|
const groups = groupBy(groupHits, 'group_id');
|
|
59
63
|
setHitGroups(groups);
|
|
60
64
|
newArrayShowGroup = Object.values(groups);
|
|
@@ -79,6 +83,7 @@ function ProductListComponent({
|
|
|
79
83
|
newArrayShowItem.push(payload);
|
|
80
84
|
}
|
|
81
85
|
});
|
|
86
|
+
|
|
82
87
|
return newArrayShowItem;
|
|
83
88
|
};
|
|
84
89
|
|
|
@@ -2,9 +2,9 @@ import { Box, Button, Grid, Tooltip, Typography } from '@material-ui/core';
|
|
|
2
2
|
import ChevronRightOutlinedIcon from '@material-ui/icons/ChevronRightOutlined';
|
|
3
3
|
import IconOpenLink from 'common/assets/icons/Union.svg';
|
|
4
4
|
import { ReactComponent as IconShare } from 'common/assets/icons/Fill.svg';
|
|
5
|
-
import { ReactComponent as Expand } from 'common/assets/icons/expand.svg';
|
|
6
5
|
import { ReactComponent as IconDisLike } from 'common/assets/icons/icon_dislike.svg';
|
|
7
6
|
import { ReactComponent as IconLike } from 'common/assets/icons/icon_like.svg';
|
|
7
|
+
import { ReactComponent as IconSearchImage } from 'common/assets/icons/icon_search_image2.svg';
|
|
8
8
|
import React, { memo, useEffect, useState } from 'react';
|
|
9
9
|
import NoImage from 'common/assets/images/unnamed.png';
|
|
10
10
|
import { AppState } from 'types';
|
|
@@ -143,13 +143,17 @@ function ItemResult(props: Props) {
|
|
|
143
143
|
</Button>
|
|
144
144
|
</Box>
|
|
145
145
|
)}
|
|
146
|
-
{!isHover && (
|
|
146
|
+
{!isHover && main_image_link && (
|
|
147
147
|
<Box className="box-icon-modal">
|
|
148
148
|
<Button
|
|
149
149
|
style={{ width: '100%', height: '100%', padding: 0, zIndex: 9 }}
|
|
150
|
-
onClick={() =>
|
|
150
|
+
onClick={() => {
|
|
151
|
+
if (urlImage.length > 1) {
|
|
152
|
+
onSearchImage(main_image_link);
|
|
153
|
+
}
|
|
154
|
+
}}
|
|
151
155
|
>
|
|
152
|
-
<
|
|
156
|
+
<IconSearchImage color={settings.theme?.secondaryColor} />
|
|
153
157
|
</Button>
|
|
154
158
|
</Box>
|
|
155
159
|
)}
|
|
@@ -158,9 +162,7 @@ function ItemResult(props: Props) {
|
|
|
158
162
|
style={{ width: '100%', height: '100%' }}
|
|
159
163
|
onClick={(e: any) => {
|
|
160
164
|
e.preventDefault();
|
|
161
|
-
|
|
162
|
-
onSearchImage(main_image_link);
|
|
163
|
-
}
|
|
165
|
+
handlerToggleModal(dataItem);
|
|
164
166
|
}}
|
|
165
167
|
>
|
|
166
168
|
{main_image_link ? (
|
|
@@ -367,53 +369,58 @@ function ItemResult(props: Props) {
|
|
|
367
369
|
style={{ color: '#2B2C46', marginTop: '12px' }}
|
|
368
370
|
gridGap={10}
|
|
369
371
|
>
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
backgroundColor: `${settings.theme?.secondaryColor}26`,
|
|
373
|
-
padding: '5px 10px',
|
|
374
|
-
borderRadius: 4,
|
|
375
|
-
width: '100%',
|
|
376
|
-
}}
|
|
377
|
-
>
|
|
378
|
-
<div style={{ fontSize: 10, fontWeight: 500 }}>
|
|
379
|
-
{dataItem.custom_id_key_2}
|
|
380
|
-
</div>
|
|
381
|
-
<div
|
|
372
|
+
{settings.field.warehouseNumber && (
|
|
373
|
+
<Box
|
|
382
374
|
style={{
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
textOverflow: 'ellipsis',
|
|
375
|
+
backgroundColor: `${settings.theme?.secondaryColor}26`,
|
|
376
|
+
padding: '5px 10px',
|
|
377
|
+
borderRadius: 4,
|
|
378
|
+
width: '100%',
|
|
388
379
|
}}
|
|
389
380
|
>
|
|
390
|
-
{
|
|
391
|
-
|
|
392
|
-
|
|
381
|
+
<div style={{ fontSize: 10, fontWeight: 500 }}>
|
|
382
|
+
{dataItem[settings.field.warehouseNumber]}
|
|
383
|
+
</div>
|
|
384
|
+
<div
|
|
385
|
+
style={{
|
|
386
|
+
fontSize: 13,
|
|
387
|
+
fontWeight: 700,
|
|
388
|
+
whiteSpace: 'nowrap',
|
|
389
|
+
overflow: 'hidden',
|
|
390
|
+
textOverflow: 'ellipsis',
|
|
391
|
+
}}
|
|
392
|
+
>
|
|
393
|
+
{dataItem[settings.field.warehouseNumberValue] || 'N/A'}
|
|
394
|
+
</div>
|
|
395
|
+
</Box>
|
|
396
|
+
)}
|
|
393
397
|
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
backgroundColor: `${settings.theme?.secondaryColor}26`,
|
|
397
|
-
padding: '5px 10px',
|
|
398
|
-
borderRadius: 4,
|
|
399
|
-
width: '100%',
|
|
400
|
-
}}
|
|
401
|
-
>
|
|
402
|
-
<div style={{ fontSize: 10, fontWeight: 500 }}>
|
|
403
|
-
{dataItem.custom_id_key_1}
|
|
404
|
-
</div>
|
|
405
|
-
<div
|
|
398
|
+
{settings.field.warehouseShelfNumber && (
|
|
399
|
+
<Box
|
|
406
400
|
style={{
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
textOverflow: 'ellipsis',
|
|
401
|
+
backgroundColor: `${settings.theme?.secondaryColor}26`,
|
|
402
|
+
padding: '5px 10px',
|
|
403
|
+
borderRadius: 4,
|
|
404
|
+
width: '100%',
|
|
412
405
|
}}
|
|
413
406
|
>
|
|
414
|
-
{
|
|
415
|
-
|
|
416
|
-
|
|
407
|
+
<div style={{ fontSize: 10, fontWeight: 500 }}>
|
|
408
|
+
{dataItem[settings.field.warehouseShelfNumber]}
|
|
409
|
+
</div>
|
|
410
|
+
<div
|
|
411
|
+
style={{
|
|
412
|
+
fontSize: 13,
|
|
413
|
+
fontWeight: 700,
|
|
414
|
+
whiteSpace: 'nowrap',
|
|
415
|
+
overflow: 'hidden',
|
|
416
|
+
textOverflow: 'ellipsis',
|
|
417
|
+
}}
|
|
418
|
+
>
|
|
419
|
+
{dataItem[settings.field.warehouseShelfNumberValue] ||
|
|
420
|
+
'N/A'}
|
|
421
|
+
</div>
|
|
422
|
+
</Box>
|
|
423
|
+
)}
|
|
417
424
|
</Box>
|
|
418
425
|
)}
|
|
419
426
|
|
|
@@ -478,25 +485,6 @@ function ItemResult(props: Props) {
|
|
|
478
485
|
</Box>
|
|
479
486
|
</Grid>
|
|
480
487
|
)}
|
|
481
|
-
{/* <Grid item>
|
|
482
|
-
<Box display={'flex'} alignItems={'center'}>
|
|
483
|
-
<Button className="btn-item">
|
|
484
|
-
<Box
|
|
485
|
-
className=""
|
|
486
|
-
display={'flex'}
|
|
487
|
-
justifyContent={'center'}
|
|
488
|
-
alignItems={'center'}
|
|
489
|
-
>
|
|
490
|
-
<img
|
|
491
|
-
src={IconShare}
|
|
492
|
-
alt="image_item"
|
|
493
|
-
className="icon_support"
|
|
494
|
-
style={{ width: '1rem' }}
|
|
495
|
-
/>
|
|
496
|
-
</Box>
|
|
497
|
-
</Button>
|
|
498
|
-
</Box>
|
|
499
|
-
</Grid> */}
|
|
500
488
|
</Grid>
|
|
501
489
|
</Box>
|
|
502
490
|
)}
|