contentoh-components-library 21.3.55 → 21.3.56
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/dist/components/atoms/ButtonV2/styles.js +1 -1
- package/dist/components/atoms/Status/styles.js +1 -1
- package/dist/components/atoms/VerticalSideMenuMainPage/index.js +18 -23
- package/dist/components/atoms/VerticalSideMenuMainPage/styles.js +4 -4
- package/dist/components/organisms/DashboardMetric/dashboardMetricUtils.js +27 -0
- package/dist/components/organisms/GlobalModal/styles.js +1 -1
- package/dist/components/organisms/OrderDetail/styles.js +1 -1
- package/dist/components/organisms/OrderDetail/utils/Table/styles.js +1 -1
- package/dist/components/pages/Dashboard/Dashboard.stories.js +35 -47
- package/dist/components/pages/Dashboard/index.js +2 -2
- package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +98 -26
- package/dist/components/pages/ProviderProductEdition/index.js +623 -386
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +103 -153
- package/dist/components/pages/RetailerProductEdition/index.js +34 -36
- package/dist/index.js +13 -0
- package/package.json +7 -6
- package/src/components/atoms/ButtonV2/styles.js +1 -1
- package/src/components/atoms/Status/styles.js +4 -0
- package/src/components/atoms/VerticalSideMenuMainPage/index.js +18 -22
- package/src/components/atoms/VerticalSideMenuMainPage/styles.js +3 -4
- package/src/components/organisms/DashboardMetric/dashboardMetricUtils.js +18 -1
- package/src/components/organisms/GlobalModal/styles.js +10 -0
- package/src/components/organisms/OrderDetail/styles.js +1 -1
- package/src/components/organisms/OrderDetail/utils/Table/styles.js +0 -1
- package/src/components/organisms/TableResizable/TableResizable.stories.js +17 -0
- package/src/components/organisms/TableResizable/index.js +119 -0
- package/src/components/organisms/TableResizable/styles.js +133 -0
- package/src/components/organisms/TableResizable/utils.js +46 -0
- package/src/components/pages/Dashboard/Dashboard.stories.js +35 -50
- package/src/components/pages/Dashboard/index.js +2 -2
- package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +110 -31
- package/src/components/pages/ProviderProductEdition/index.js +244 -131
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +93 -145
- package/src/components/pages/RetailerProductEdition/index.js +25 -23
- package/src/index.js +1 -0
- package/dist/assets/fonts/roboto/LICENSE.txt +0 -202
|
@@ -27,6 +27,16 @@ export const MessageContainer = styled.div`
|
|
|
27
27
|
min-height: ${(props) => (props.height ? "300px" : "190px")};
|
|
28
28
|
background: #281f33;
|
|
29
29
|
border-radius: 39px;
|
|
30
|
+
& > .generic-text {
|
|
31
|
+
width: 100%;
|
|
32
|
+
font-family: Raleway;
|
|
33
|
+
font-style: normal;
|
|
34
|
+
font-weight: normal;
|
|
35
|
+
font-size: 16px;
|
|
36
|
+
text-align: center;
|
|
37
|
+
color: #f7f7f7;
|
|
38
|
+
margin: 20px 0px;
|
|
39
|
+
}
|
|
30
40
|
`;
|
|
31
41
|
export const TextArea = styled.textarea`
|
|
32
42
|
display: block;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { TableResizable } from ".";
|
|
2
|
+
import { data } from "./utils.js";
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: "Components/organisms/TableResizable",
|
|
6
|
+
component: TableResizable,
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
const Template = (args) => <TableResizable {...args} />;
|
|
10
|
+
|
|
11
|
+
export const DefaultTableResizable = Template.bind({});
|
|
12
|
+
DefaultTableResizable.args = {
|
|
13
|
+
headers: ["Col 1", "Col 2", "Col 3", "Col 4", "Col 5"],
|
|
14
|
+
tableContent: data,
|
|
15
|
+
minCellWidth: 120,
|
|
16
|
+
withResetSizeButton: true,
|
|
17
|
+
};
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import React, { useState, useCallback, useEffect, useRef } from "react";
|
|
2
|
+
import { RestartAlt } from "@mui/icons-material";
|
|
3
|
+
import { Container } from "./styles.js";
|
|
4
|
+
|
|
5
|
+
const createHeaders = (headers) => {
|
|
6
|
+
return headers.map((item) => ({
|
|
7
|
+
text: item,
|
|
8
|
+
ref: useRef(),
|
|
9
|
+
}));
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
/*
|
|
13
|
+
* Read the blog post here:
|
|
14
|
+
* https://letsbuildui.dev/articles/resizable-tables-with-react-and-css-grid
|
|
15
|
+
*/
|
|
16
|
+
export const TableResizable = (props) => {
|
|
17
|
+
const {
|
|
18
|
+
gridTemplateColumns,
|
|
19
|
+
headers,
|
|
20
|
+
minCellWidth,
|
|
21
|
+
tableContent,
|
|
22
|
+
withResetSizeButton,
|
|
23
|
+
} = props;
|
|
24
|
+
// const [tableHeight, setTableHeight] = useState("auto");
|
|
25
|
+
const [activeIndex, setActiveIndex] = useState(null);
|
|
26
|
+
const tableElement = useRef(null);
|
|
27
|
+
const columns = createHeaders(headers);
|
|
28
|
+
|
|
29
|
+
// useEffect(() => {
|
|
30
|
+
// setTableHeight(tableElement.current.offsetHeight);
|
|
31
|
+
// }, []);
|
|
32
|
+
|
|
33
|
+
const mouseDown = (index) => setActiveIndex(index);
|
|
34
|
+
|
|
35
|
+
const mouseMove = useCallback(
|
|
36
|
+
(e) => {
|
|
37
|
+
const gridColumns = columns.map((col, i) => {
|
|
38
|
+
if (i === activeIndex) {
|
|
39
|
+
const width = e.clientX - col.ref.current.offsetLeft;
|
|
40
|
+
if (width >= minCellWidth) return `${width}px`;
|
|
41
|
+
}
|
|
42
|
+
return `${col.ref.current.offsetWidth}px`;
|
|
43
|
+
});
|
|
44
|
+
const gridTemplateColumns = `${gridColumns.join(" ")}`;
|
|
45
|
+
tableElement.current.style.gridTemplateColumns = gridTemplateColumns;
|
|
46
|
+
},
|
|
47
|
+
[activeIndex, columns, minCellWidth]
|
|
48
|
+
);
|
|
49
|
+
|
|
50
|
+
const removeListeners = useCallback(() => {
|
|
51
|
+
window.removeEventListener("mousemove", mouseMove);
|
|
52
|
+
window.removeEventListener("mouseup", removeListeners);
|
|
53
|
+
}, [mouseMove]);
|
|
54
|
+
|
|
55
|
+
const mouseUp = useCallback(() => {
|
|
56
|
+
setActiveIndex(null);
|
|
57
|
+
removeListeners();
|
|
58
|
+
}, [setActiveIndex, removeListeners]);
|
|
59
|
+
|
|
60
|
+
useEffect(() => {
|
|
61
|
+
if (activeIndex > -1) {
|
|
62
|
+
window.addEventListener("mousemove", mouseMove);
|
|
63
|
+
window.addEventListener("mouseup", mouseUp);
|
|
64
|
+
}
|
|
65
|
+
return () => removeListeners();
|
|
66
|
+
}, [activeIndex, mouseMove, mouseUp, removeListeners]);
|
|
67
|
+
|
|
68
|
+
const resetTableCells = () => {
|
|
69
|
+
tableElement.current.style.gridTemplateColumns = "";
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
return (
|
|
73
|
+
<Container
|
|
74
|
+
gridTemplateColumns={gridTemplateColumns}
|
|
75
|
+
totalColumns={columns?.length}
|
|
76
|
+
totalRows={tableContent?.length}
|
|
77
|
+
>
|
|
78
|
+
{withResetSizeButton ? (
|
|
79
|
+
<button className="reset-button" onClick={resetTableCells}>
|
|
80
|
+
<RestartAlt sx={{ fontSize: 18 }} />
|
|
81
|
+
</button>
|
|
82
|
+
) : null}
|
|
83
|
+
<div className="table-wrapper">
|
|
84
|
+
<table className="resizeable-table" ref={tableElement}>
|
|
85
|
+
<thead>
|
|
86
|
+
<tr>
|
|
87
|
+
{columns?.map(({ ref, text }, i) => (
|
|
88
|
+
<th ref={ref} key={i}>
|
|
89
|
+
<span>{text}</span>
|
|
90
|
+
<div
|
|
91
|
+
style={{ height: "50px" /* tableHeight */ }}
|
|
92
|
+
onMouseDown={() => mouseDown(i)}
|
|
93
|
+
className={`resize-handle ${
|
|
94
|
+
activeIndex === i ? "active" : "idle"
|
|
95
|
+
}`}
|
|
96
|
+
/>
|
|
97
|
+
</th>
|
|
98
|
+
))}
|
|
99
|
+
</tr>
|
|
100
|
+
</thead>
|
|
101
|
+
<tbody>
|
|
102
|
+
{tableContent.map((row) => (
|
|
103
|
+
<tr key={row.key}>
|
|
104
|
+
{row?.columns?.map((column, indexColumn) => (
|
|
105
|
+
<td
|
|
106
|
+
className={typeof column === "object" ? "noOverflow" : ""}
|
|
107
|
+
key={`${row.key}-${indexColumn}`}
|
|
108
|
+
>
|
|
109
|
+
<span>{column}</span>
|
|
110
|
+
</td>
|
|
111
|
+
))}
|
|
112
|
+
</tr>
|
|
113
|
+
))}
|
|
114
|
+
</tbody>
|
|
115
|
+
</table>
|
|
116
|
+
</div>
|
|
117
|
+
</Container>
|
|
118
|
+
);
|
|
119
|
+
};
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
|
|
3
|
+
const defaultTemplateColumns = (totalColumns) =>
|
|
4
|
+
`minmax(100px, 1fr) `.repeat(totalColumns);
|
|
5
|
+
|
|
6
|
+
export const Container = styled.div`
|
|
7
|
+
position: absolute;
|
|
8
|
+
overflow: hidden; /* Clips any scrollbars that appear */
|
|
9
|
+
font-family: Avenir Next;
|
|
10
|
+
font-size: 13px;
|
|
11
|
+
width: 90%;
|
|
12
|
+
|
|
13
|
+
.reset-button {
|
|
14
|
+
display: flex;
|
|
15
|
+
justify-content: center;
|
|
16
|
+
align-items: center;
|
|
17
|
+
border-radius: 50%;
|
|
18
|
+
cursor: pointer;
|
|
19
|
+
padding: 3px;
|
|
20
|
+
border: 0;
|
|
21
|
+
background: #f5f5f5;
|
|
22
|
+
position: absolute;
|
|
23
|
+
top: 5px;
|
|
24
|
+
left: 5px;
|
|
25
|
+
margin: 0;
|
|
26
|
+
z-index: 10;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.table-wrapper {
|
|
30
|
+
border-radius: 6px;
|
|
31
|
+
background: #fff;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
table {
|
|
35
|
+
width: 100%;
|
|
36
|
+
height: calc(100vh - 250px);
|
|
37
|
+
overflow: auto; /* Allow scrolling within the table */
|
|
38
|
+
display: grid;
|
|
39
|
+
grid-template-columns: ${(props) =>
|
|
40
|
+
props.gridTemplateColumns ?? defaultTemplateColumns(props.totalColumns)};
|
|
41
|
+
grid-template-rows: ${(props) => `repeat(${props.totalRows + 2}, 50px)`};
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
table th {
|
|
45
|
+
font-size: 15px;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
table th,
|
|
49
|
+
table td {
|
|
50
|
+
text-align: left;
|
|
51
|
+
padding: 5px;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
table th span,
|
|
55
|
+
table td span {
|
|
56
|
+
white-space: nowrap;
|
|
57
|
+
text-overflow: ellipsis;
|
|
58
|
+
overflow: hidden;
|
|
59
|
+
display: block;
|
|
60
|
+
border-right: 1px solid #ccc;
|
|
61
|
+
text-align: center;
|
|
62
|
+
height: 100%;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
table th:last-child span,
|
|
66
|
+
table td:last-child span {
|
|
67
|
+
border-right: 0px;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
table tr td {
|
|
71
|
+
border-bottom: 1px solid #ccc;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
table tr th {
|
|
75
|
+
border-bottom: 1px solid #ccc;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
table thead,
|
|
79
|
+
table tbody,
|
|
80
|
+
table tr {
|
|
81
|
+
display: contents;
|
|
82
|
+
background: red;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
table thead {
|
|
86
|
+
-webkit-user-select: none; /* Safari */
|
|
87
|
+
-ms-user-select: none; /* IE 10 and IE 11 */
|
|
88
|
+
user-select: none; /* Standard syntax */
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
th {
|
|
92
|
+
position: sticky;
|
|
93
|
+
top: 0;
|
|
94
|
+
background-color: #fff;
|
|
95
|
+
line-height: 40px;
|
|
96
|
+
z-index: 8;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
td {
|
|
100
|
+
line-height: 40px;
|
|
101
|
+
height: 50px;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.resize-handle {
|
|
105
|
+
display: block;
|
|
106
|
+
position: absolute;
|
|
107
|
+
cursor: col-resize;
|
|
108
|
+
width: 8px;
|
|
109
|
+
right: 0;
|
|
110
|
+
top: 0;
|
|
111
|
+
z-index: 1;
|
|
112
|
+
border-right: 1px solid transparent;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.resize-handle:hover {
|
|
116
|
+
border-color: #ccc;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.resize-handle.active {
|
|
120
|
+
border-color: #517ea5;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.resizeable-table {
|
|
124
|
+
width: 100%;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.noOverflow {
|
|
128
|
+
overflow: inherit;
|
|
129
|
+
span {
|
|
130
|
+
overflow: inherit;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
`;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export const data = [
|
|
2
|
+
{
|
|
3
|
+
key: 1,
|
|
4
|
+
object: {},
|
|
5
|
+
columns: [
|
|
6
|
+
"Large Detroit Style Pizza",
|
|
7
|
+
3213456785,
|
|
8
|
+
"$31.43",
|
|
9
|
+
"Pending",
|
|
10
|
+
"Dave",
|
|
11
|
+
],
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
key: 2,
|
|
15
|
+
object: {},
|
|
16
|
+
columns: [
|
|
17
|
+
"Large Detroit Style Pizza",
|
|
18
|
+
3213456785,
|
|
19
|
+
"$31.43",
|
|
20
|
+
"Pending",
|
|
21
|
+
"Dave",
|
|
22
|
+
],
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
key: 3,
|
|
26
|
+
object: {},
|
|
27
|
+
columns: [
|
|
28
|
+
"Large Detroit Style Pizza",
|
|
29
|
+
3213456785,
|
|
30
|
+
"$31.43",
|
|
31
|
+
"Pending",
|
|
32
|
+
"Dave",
|
|
33
|
+
],
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
key: 4,
|
|
37
|
+
object: {},
|
|
38
|
+
columns: [
|
|
39
|
+
"Large Detroit Style Pizza",
|
|
40
|
+
3213456785,
|
|
41
|
+
"$31.43",
|
|
42
|
+
"Pending",
|
|
43
|
+
"Dave",
|
|
44
|
+
],
|
|
45
|
+
},
|
|
46
|
+
];
|
|
@@ -9,56 +9,56 @@ const Template = (args) => <Dashboard {...args} />;
|
|
|
9
9
|
export const DashboardDeafult = Template.bind({});
|
|
10
10
|
DashboardDeafult.args = {
|
|
11
11
|
user: {
|
|
12
|
-
id_user:
|
|
13
|
-
name: "
|
|
14
|
-
last_name: "
|
|
15
|
-
email: "
|
|
16
|
-
position: "
|
|
17
|
-
telephone: "+
|
|
12
|
+
id_user: 133,
|
|
13
|
+
name: "Financiado Bodega",
|
|
14
|
+
last_name: "Aurrera",
|
|
15
|
+
email: "financiadobodega@allfreemail.net",
|
|
16
|
+
position: "TI",
|
|
17
|
+
telephone: "+527777777777",
|
|
18
18
|
country: "México",
|
|
19
|
-
id_company:
|
|
20
|
-
id_cognito: "
|
|
19
|
+
id_company: 912,
|
|
20
|
+
id_cognito: "25481a4f-e8c7-4104-b772-64fdb291a640",
|
|
21
21
|
birth_Date: null,
|
|
22
|
-
about_me:
|
|
23
|
-
zip_code:
|
|
24
|
-
address:
|
|
25
|
-
job:
|
|
26
|
-
id_stripe:
|
|
22
|
+
about_me: null,
|
|
23
|
+
zip_code: null,
|
|
24
|
+
address: null,
|
|
25
|
+
job: null,
|
|
26
|
+
id_stripe: null,
|
|
27
27
|
id_role: 0,
|
|
28
28
|
active: 1,
|
|
29
|
-
is_retailer:
|
|
30
|
-
email_notify:
|
|
29
|
+
is_retailer: 0,
|
|
30
|
+
email_notify: 1,
|
|
31
31
|
is_user_tech: null,
|
|
32
32
|
membership: {
|
|
33
|
-
id:
|
|
34
|
-
start_date: "2022-
|
|
35
|
-
end_date: "2023-
|
|
36
|
-
planID:
|
|
37
|
-
plan: "
|
|
33
|
+
id: 101,
|
|
34
|
+
start_date: "2022-12-22T19:16:53.000Z",
|
|
35
|
+
end_date: "2023-12-22T19:16:53.000Z",
|
|
36
|
+
planID: 8,
|
|
37
|
+
plan: "prod_KtlhECVSFG2iro",
|
|
38
38
|
name: "Plan Pro",
|
|
39
|
-
user_limit: "
|
|
40
|
-
products_limit: "
|
|
41
|
-
type: "
|
|
39
|
+
user_limit: "20",
|
|
40
|
+
products_limit: "5000",
|
|
41
|
+
type: "Enterprise",
|
|
42
42
|
},
|
|
43
|
-
src: "https://content-management-profile.s3.amazonaws.com/id-
|
|
43
|
+
src: "https://content-management-profile.s3.amazonaws.com/id-133/133.png?1684388625309",
|
|
44
44
|
},
|
|
45
45
|
company: {
|
|
46
|
-
id_company:
|
|
47
|
-
trade_name: "
|
|
48
|
-
company_name: "
|
|
49
|
-
rfc: "
|
|
50
|
-
adress: "
|
|
46
|
+
id_company: 912,
|
|
47
|
+
trade_name: "Financiado Bodega",
|
|
48
|
+
company_name: "Bodega",
|
|
49
|
+
rfc: "9395jwhs",
|
|
50
|
+
adress: "Toluca",
|
|
51
51
|
about_company: null,
|
|
52
52
|
telephone: null,
|
|
53
53
|
web_site: null,
|
|
54
54
|
zip_code: null,
|
|
55
55
|
email: null,
|
|
56
56
|
social_link: null,
|
|
57
|
-
is_retailer:
|
|
57
|
+
is_retailer: 0,
|
|
58
58
|
financedRetailers: [
|
|
59
59
|
{
|
|
60
|
-
id:
|
|
61
|
-
name: "
|
|
60
|
+
id: 70,
|
|
61
|
+
name: "Bodega Aurrera",
|
|
62
62
|
country: "México",
|
|
63
63
|
id_region: 1,
|
|
64
64
|
active: 1,
|
|
@@ -66,26 +66,11 @@ DashboardDeafult.args = {
|
|
|
66
66
|
],
|
|
67
67
|
retailers: [
|
|
68
68
|
{
|
|
69
|
-
id:
|
|
70
|
-
name: "
|
|
71
|
-
country: "México",
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
id: 60,
|
|
75
|
-
name: "The Home Depot Resizing",
|
|
76
|
-
country: "México",
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
id: 61,
|
|
80
|
-
name: "Home Depot TAB",
|
|
81
|
-
country: "México",
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
id: 68,
|
|
85
|
-
name: "The Home Depot Merchants",
|
|
69
|
+
id: 70,
|
|
70
|
+
name: "Bodega Aurrera",
|
|
86
71
|
country: "México",
|
|
87
72
|
},
|
|
88
73
|
],
|
|
89
74
|
},
|
|
90
|
-
jwt: "eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.
|
|
75
|
+
jwt: "eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiIyNTQ4MWE0Zi1lOGM3LTQxMDQtYjc3Mi02NGZkYjI5MWE2NDAiLCJjb2duaXRvOmdyb3VwcyI6WyJ1c3VhcmlvX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwicGhvbmVfbnVtYmVyX3ZlcmlmaWVkIjpmYWxzZSwiY29nbml0bzp1c2VybmFtZSI6IjI1NDgxYTRmLWU4YzctNDEwNC1iNzcyLTY0ZmRiMjkxYTY0MCIsImNvZ25pdG86cm9sZXMiOlsiYXJuOmF3czppYW06Ojg5ODY3MDIzMjgwNzpyb2xlXC9jb250ZW50b2gtZGV2LXVzLWVhc3QtMS1sYW1iZGFSb2xlIl0sImF1ZCI6IjVhYzh0cGdzNmdic3ExM2ZydnJwaWVlcDQwIiwiZXZlbnRfaWQiOiJlNmQwYTZiNS0wZjMzLTQ4NGItYWM1YS0wNmQ0ZTlkZTY4Y2YiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY4NDM4ODYyNCwibmFtZSI6IkZpbmFuY2lhZG8gQm9kZWdhIEF1cnJlcmEiLCJwaG9uZV9udW1iZXIiOiIrNTI3Nzc3Nzc3Nzc3IiwiZXhwIjoxNjg0MzkyMjI0LCJpYXQiOjE2ODQzODg2MjQsImVtYWlsIjoiZmluYW5jaWFkb2JvZGVnYUBhbGxmcmVlbWFpbC5uZXQifQ.kYOldsvuUQofyxyDtxzVHBKVSbnPp5MK0VHrPsMCOf6Xe5rbo834kJGIVVO4ztguTHkHakKE0o3IQimLH5E8IAk8lX8olm9vTcxwpnlxOOVjePGrMAx2rwJS6Oi_45qE18whJdD_tXxceoZsU4hdDc_zQp64DUac3SfIPjs2ClyGCr66nO1VNXKYSTVGVQgV3Tcx65ah3m04GEsnpwAckUxmfKIws9FGsWl_CalkYG3HMR84psAIEA3kSYpiSF_biOySrXpX6H1HZjLRRR_6-P0AxNVZ6kmVTYbSO4vgmbEsO_feoDwtIxPWc3O7htOcevCAM8KyjmmQwlI52y4caQ",
|
|
91
76
|
};
|
|
@@ -252,7 +252,7 @@ export const Dashboard = ({ jwt, user, company }) => {
|
|
|
252
252
|
setParameterArray={setDatesRange}
|
|
253
253
|
isSingleSelect
|
|
254
254
|
/>
|
|
255
|
-
{providers?.length > 0 && (
|
|
255
|
+
{company.financedRetailers[0].id !== 70 && providers?.length > 0 && (
|
|
256
256
|
<CustomSelect
|
|
257
257
|
showFilterString={true}
|
|
258
258
|
showSearchBar={true}
|
|
@@ -276,7 +276,7 @@ export const Dashboard = ({ jwt, user, company }) => {
|
|
|
276
276
|
setParameterArray={setCategoryId}
|
|
277
277
|
defaultOption="Todas las categorías"
|
|
278
278
|
/>
|
|
279
|
-
{retailers?.length > 1 && (
|
|
279
|
+
{company.financedRetailers[0].id !== 70 && retailers?.length > 1 && (
|
|
280
280
|
<CustomSelect
|
|
281
281
|
showFilterString={true}
|
|
282
282
|
showSearchBar={true}
|
|
@@ -16,47 +16,121 @@ ProviderProductEditionDefault.args = {
|
|
|
16
16
|
Imágenes: false,
|
|
17
17
|
},
|
|
18
18
|
token:
|
|
19
|
-
"eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.
|
|
19
|
+
"eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiI1ODg0YWUzNC01OWQ2LTQ0NTQtYjk4ZS04MjE1MThiY2MzYTciLCJjb2duaXRvOmdyb3VwcyI6WyJ1c3VhcmlvX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfWE1aUWRxa0dqIiwicGhvbmVfbnVtYmVyX3ZlcmlmaWVkIjpmYWxzZSwiY29nbml0bzp1c2VybmFtZSI6IjU4ODRhZTM0LTU5ZDYtNDQ1NC1iOThlLTgyMTUxOGJjYzNhNyIsImNvZ25pdG86cm9sZXMiOlsiYXJuOmF3czppYW06Ojg5ODY3MDIzMjgwNzpyb2xlXC9jb250ZW50b2gtZGV2LXVzLWVhc3QtMS1sYW1iZGFSb2xlIl0sImF1ZCI6IjVhYzh0cGdzNmdic3ExM2ZydnJwaWVlcDQwIiwiZXZlbnRfaWQiOiJjOWRjOWE1OS0xNTAxLTQyOTgtODRjMi03MDM4NzRhNzIxMTEiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTY4MjQ2Mjc4NCwibmFtZSI6IkNhZGVuYSBJc21hZWwiLCJwaG9uZV9udW1iZXIiOiIrNTIzMTExMzY2MzM2IiwiZXhwIjoxNjgyNDY2Mzg0LCJpYXQiOjE2ODI0NjI3ODQsImVtYWlsIjoiY2FkZW5hLmlzbWFlbEBhbGxmcmVlbWFpbC5uZXQifQ.ebKSsnTxKoNfWDoKGFJRlLWgNulGj4KrDe0EgsqLEIVx3Qu0lgmg43UY5tZ3FUlRE8XO2UGq0XxEgdbGOe_4nbTRYigdvxP3bh3cPQ0s68hlTDfhPRvxVJYlaO4s0rhk9rt_VVteTyLfhPHFCymrkFYYDB8bVvKnxUUCX_nJvqGQkl48JiYgvYVLpuus5FvRkGwi1u-jTtMoKiUK-jw9MxI18hD0FWXVnJr-q9ftf2d0bv4JRv4XJ_tRh1N6jps5n3c_KKZswqRfGLU-8MS2X3DU6pDqEP2BZAGXksiFYXYH_uHE6BKJAl7EEhkDTqZsx_jWtVSXTdDg_QDKrOw0Kg",
|
|
20
20
|
articleId: 238,
|
|
21
21
|
category: 846,
|
|
22
22
|
version: 2,
|
|
23
23
|
productSelected: {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
24
|
+
orderId: 15165,
|
|
25
|
+
article_status: "AAC",
|
|
26
|
+
datasheet_status: "AAC",
|
|
27
|
+
description_status: "FAP",
|
|
28
|
+
images_status: "FAP",
|
|
29
|
+
prio: "none",
|
|
30
|
+
version: 3,
|
|
31
|
+
brand: null,
|
|
32
|
+
article: {
|
|
33
|
+
category: "Puertas y Ventanas|Molduras|Molduras Madera Blanda",
|
|
34
|
+
company_name: "Demo",
|
|
35
|
+
id_company: 923,
|
|
36
|
+
country: "México",
|
|
37
|
+
id_category: "2366",
|
|
38
|
+
id_article: 39336,
|
|
39
|
+
name: "Prueba Auditoria",
|
|
40
|
+
upc: "100030124",
|
|
41
|
+
},
|
|
42
|
+
retailers: [
|
|
43
|
+
{
|
|
44
|
+
id: 58,
|
|
45
|
+
name: "The Home Depot Golden",
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
id: 68,
|
|
49
|
+
name: "The Home Depot Dropship",
|
|
50
|
+
},
|
|
51
|
+
],
|
|
52
|
+
services: {
|
|
53
|
+
datasheets: 1,
|
|
54
|
+
descriptions: 1,
|
|
55
|
+
images: 1,
|
|
56
|
+
},
|
|
57
|
+
statusByRetailer: {
|
|
58
|
+
58: {
|
|
59
|
+
datasheet: "AAC",
|
|
60
|
+
description: "FAP",
|
|
61
|
+
images: "FAP",
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
retailersWithService: ["58"],
|
|
65
|
+
id_article: 39336,
|
|
32
66
|
retailersAvailable: [
|
|
67
|
+
{
|
|
68
|
+
id: 58,
|
|
69
|
+
name: "The Home Depot Golden",
|
|
70
|
+
},
|
|
33
71
|
{
|
|
34
72
|
id: 68,
|
|
35
|
-
name: "The Home Depot
|
|
73
|
+
name: "The Home Depot Dropship",
|
|
36
74
|
},
|
|
37
75
|
],
|
|
38
76
|
},
|
|
39
77
|
productToEdit: {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
product:
|
|
43
|
-
|
|
44
|
-
|
|
78
|
+
ArticleId: 39336,
|
|
79
|
+
idCategory: "2366",
|
|
80
|
+
product: {
|
|
81
|
+
orderId: 15165,
|
|
82
|
+
article_status: "AAC",
|
|
83
|
+
datasheet_status: "AAC",
|
|
84
|
+
description_status: "FAP",
|
|
85
|
+
images_status: "FAP",
|
|
86
|
+
prio: "none",
|
|
87
|
+
version: 3,
|
|
88
|
+
brand: null,
|
|
89
|
+
article: {
|
|
90
|
+
category: "Puertas y Ventanas|Molduras|Molduras Madera Blanda",
|
|
45
91
|
company_name: "Demo",
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
retailersAvailable: [
|
|
53
|
-
{
|
|
54
|
-
id: 68,
|
|
55
|
-
name: "The Home Depot Merchants",
|
|
56
|
-
},
|
|
57
|
-
],
|
|
92
|
+
id_company: 923,
|
|
93
|
+
country: "México",
|
|
94
|
+
id_category: "2366",
|
|
95
|
+
id_article: 39336,
|
|
96
|
+
name: "Prueba Auditoria",
|
|
97
|
+
upc: "100030124",
|
|
58
98
|
},
|
|
59
|
-
|
|
99
|
+
retailers: [
|
|
100
|
+
{
|
|
101
|
+
id: 58,
|
|
102
|
+
name: "The Home Depot Golden",
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
id: 68,
|
|
106
|
+
name: "The Home Depot Dropship",
|
|
107
|
+
},
|
|
108
|
+
],
|
|
109
|
+
services: {
|
|
110
|
+
datasheets: 1,
|
|
111
|
+
descriptions: 1,
|
|
112
|
+
images: 1,
|
|
113
|
+
},
|
|
114
|
+
statusByRetailer: {
|
|
115
|
+
58: {
|
|
116
|
+
datasheet: "AAC",
|
|
117
|
+
description: "FAP",
|
|
118
|
+
images: "FAP",
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
retailersWithService: ["58"],
|
|
122
|
+
id_article: 39336,
|
|
123
|
+
retailersAvailable: [
|
|
124
|
+
{
|
|
125
|
+
id: 58,
|
|
126
|
+
name: "The Home Depot Golden",
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
id: 68,
|
|
130
|
+
name: "The Home Depot Dropship",
|
|
131
|
+
},
|
|
132
|
+
],
|
|
133
|
+
},
|
|
60
134
|
},
|
|
61
135
|
location: {
|
|
62
136
|
pathname: "/EditProducts",
|
|
@@ -99,7 +173,7 @@ ProviderProductEditionDefault.args = {
|
|
|
99
173
|
products_limit: "500",
|
|
100
174
|
type: "PyMES",
|
|
101
175
|
},
|
|
102
|
-
src: "https://content-management-profile.s3.amazonaws.com/id-59/59.png?
|
|
176
|
+
src: "https://content-management-profile.s3.amazonaws.com/id-59/59.png?1682462786497",
|
|
103
177
|
},
|
|
104
178
|
company: {
|
|
105
179
|
id_company: 817,
|
|
@@ -117,7 +191,7 @@ ProviderProductEditionDefault.args = {
|
|
|
117
191
|
financedRetailers: [
|
|
118
192
|
{
|
|
119
193
|
id: 68,
|
|
120
|
-
name: "The Home Depot
|
|
194
|
+
name: "The Home Depot Dropship",
|
|
121
195
|
country: "México",
|
|
122
196
|
id_region: 1,
|
|
123
197
|
active: 1,
|
|
@@ -141,7 +215,12 @@ ProviderProductEditionDefault.args = {
|
|
|
141
215
|
},
|
|
142
216
|
{
|
|
143
217
|
id: 68,
|
|
144
|
-
name: "The Home Depot
|
|
218
|
+
name: "The Home Depot Dropship",
|
|
219
|
+
country: "México",
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
id: 58,
|
|
223
|
+
name: "The Home Depot Golden",
|
|
145
224
|
country: "México",
|
|
146
225
|
},
|
|
147
226
|
],
|