contentoh-components-library 21.3.8 → 21.3.10
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/.env.development +2 -0
- package/dist/assets/images/generalButton/closeIcon.svg +2 -2
- package/dist/components/molecules/HeaderTop/index.js +16 -4
- package/dist/components/molecules/ProductNameHeader/index.js +1 -1
- package/dist/components/organisms/Chat/Chat.stories.js +31 -86
- package/dist/components/organisms/Chat/ContainerItems/index.js +4 -2
- package/dist/components/organisms/Chat/ContentChat/index.js +107 -50
- package/dist/components/organisms/Chat/index.js +51 -125
- package/dist/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +65 -50
- package/dist/components/pages/ProviderProductEdition/index.js +6 -2
- package/dist/global-files/handle_userTech.js +20 -0
- package/dist/global-files/utils.js +18 -2
- package/package.json +1 -1
- package/src/assets/images/generalButton/closeIcon.svg +2 -2
- package/src/components/molecules/HeaderTop/index.js +19 -3
- package/src/components/molecules/ProductNameHeader/index.js +1 -1
- package/src/components/organisms/Chat/Chat.stories.js +31 -83
- package/src/components/organisms/Chat/ContainerItems/index.js +3 -2
- package/src/components/organisms/Chat/ContentChat/index.js +82 -35
- package/src/components/organisms/Chat/index.js +66 -125
- package/src/components/pages/ProviderProductEdition/ProviderProductEdition.stories.js +67 -48
- package/src/components/pages/ProviderProductEdition/index.js +7 -1
- package/src/global-files/handle_userTech.js +7 -0
- package/src/global-files/utils.js +13 -0
|
@@ -16,41 +16,43 @@ ProviderProductEditionDefault.args = {
|
|
|
16
16
|
Imágenes: true,
|
|
17
17
|
},
|
|
18
18
|
token:
|
|
19
|
-
"eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiUlMyNTYifQ.
|
|
19
|
+
"eyJraWQiOiJkQWJkZCtlclwvTlwveVRQUWNvUlVyOCtrNUd2M1hMM2N1MWUzQ09zWExVRnc9IiwiYWxnIjoiU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PN7JVGbg9HC68__WklpgocSasU6fQg4Glh1kXWQ-fy4XaFw6cBParJjkqic2Gg1iqwB5wGbrwD4E0crZyPkgwwPydTLLu6WguGWBuQHhcoG-xg",
|
|
20
20
|
articleId: 238,
|
|
21
21
|
category: 846,
|
|
22
22
|
version: 2,
|
|
23
23
|
productSelected: {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
24
|
+
category: "Decoración|Accesorios Decorativos|Accesorios Decorativos",
|
|
25
|
+
company_name: "merchants24ene@allfreemail.net",
|
|
26
|
+
company_id: 918,
|
|
27
|
+
id_category: "2028",
|
|
28
|
+
id_article: 432,
|
|
29
|
+
name: "VELA AROMA 18 OZ MAN/CAN",
|
|
30
|
+
upc: "102852",
|
|
30
31
|
version: 1,
|
|
31
32
|
retailersAvailable: [
|
|
32
33
|
{
|
|
33
|
-
|
|
34
|
-
|
|
34
|
+
id: 68,
|
|
35
|
+
name: "The Home Depot Merchants",
|
|
35
36
|
},
|
|
36
37
|
],
|
|
37
38
|
},
|
|
38
39
|
productToEdit: {
|
|
39
|
-
idCategory:
|
|
40
|
-
ArticleId:
|
|
40
|
+
idCategory: "2028",
|
|
41
|
+
ArticleId: 432,
|
|
41
42
|
product: [
|
|
42
43
|
{
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
44
|
+
category: "Decoración|Accesorios Decorativos|Accesorios Decorativos",
|
|
45
|
+
company_name: "merchants24ene@allfreemail.net",
|
|
46
|
+
company_id: 918,
|
|
47
|
+
id_category: "2028",
|
|
48
|
+
id_article: 432,
|
|
49
|
+
name: "VELA AROMA 18 OZ MAN/CAN",
|
|
50
|
+
upc: "102852",
|
|
49
51
|
version: 1,
|
|
50
52
|
retailersAvailable: [
|
|
51
53
|
{
|
|
52
|
-
|
|
53
|
-
|
|
54
|
+
id: 68,
|
|
55
|
+
name: "The Home Depot Merchants",
|
|
54
56
|
},
|
|
55
57
|
],
|
|
56
58
|
},
|
|
@@ -60,30 +62,30 @@ ProviderProductEditionDefault.args = {
|
|
|
60
62
|
state: { origin: "Contentoh" },
|
|
61
63
|
},
|
|
62
64
|
user: {
|
|
63
|
-
id_user:
|
|
64
|
-
name: "
|
|
65
|
-
last_name: "
|
|
66
|
-
email: "
|
|
67
|
-
position: "
|
|
68
|
-
telephone: "+
|
|
65
|
+
id_user: 140,
|
|
66
|
+
name: "Prueba",
|
|
67
|
+
last_name: "Merchants",
|
|
68
|
+
email: "merchants24ene@allfreemail.net",
|
|
69
|
+
position: "merchants24ene@allfreemail.net",
|
|
70
|
+
telephone: "+521234567891",
|
|
69
71
|
country: "México",
|
|
70
|
-
id_company:
|
|
71
|
-
id_cognito: "
|
|
72
|
+
id_company: 918,
|
|
73
|
+
id_cognito: "03eb26a0-ab56-4767-b64f-84925807702a",
|
|
72
74
|
birth_Date: null,
|
|
73
|
-
about_me:
|
|
74
|
-
zip_code:
|
|
75
|
-
address:
|
|
76
|
-
job:
|
|
77
|
-
id_stripe:
|
|
75
|
+
about_me: null,
|
|
76
|
+
zip_code: null,
|
|
77
|
+
address: null,
|
|
78
|
+
job: null,
|
|
79
|
+
id_stripe: null,
|
|
78
80
|
id_role: 0,
|
|
79
81
|
active: 1,
|
|
80
82
|
is_retailer: 0,
|
|
81
|
-
email_notify:
|
|
82
|
-
is_user_tech:
|
|
83
|
+
email_notify: 1,
|
|
84
|
+
is_user_tech: null,
|
|
83
85
|
membership: {
|
|
84
|
-
id:
|
|
85
|
-
start_date: "
|
|
86
|
-
end_date: "
|
|
86
|
+
id: 109,
|
|
87
|
+
start_date: "2023-01-24T22:07:34.000Z",
|
|
88
|
+
end_date: "2024-01-24T22:07:34.000Z",
|
|
87
89
|
planID: 8,
|
|
88
90
|
plan: "prod_KtlhECVSFG2iro",
|
|
89
91
|
name: "Plan Pro",
|
|
@@ -91,21 +93,38 @@ ProviderProductEditionDefault.args = {
|
|
|
91
93
|
products_limit: "5000",
|
|
92
94
|
type: "Enterprise",
|
|
93
95
|
},
|
|
94
|
-
src: "https://content-management-profile.s3.amazonaws.com/id-
|
|
96
|
+
src: "https://content-management-profile.s3.amazonaws.com/id-140/140.png?1674599807427",
|
|
95
97
|
},
|
|
96
98
|
company: {
|
|
97
|
-
id_company:
|
|
98
|
-
trade_name: "
|
|
99
|
-
company_name: "
|
|
100
|
-
rfc: "
|
|
101
|
-
adress: "
|
|
102
|
-
about_company:
|
|
103
|
-
telephone:
|
|
104
|
-
web_site:
|
|
105
|
-
zip_code:
|
|
99
|
+
id_company: 918,
|
|
100
|
+
trade_name: "merchants24ene@allfreemail.net",
|
|
101
|
+
company_name: "merchants24ene@allfreemail.net",
|
|
102
|
+
rfc: "merchants24ene@allfreemail.net",
|
|
103
|
+
adress: "merchants24ene@allfreemail.net",
|
|
104
|
+
about_company: null,
|
|
105
|
+
telephone: null,
|
|
106
|
+
web_site: null,
|
|
107
|
+
zip_code: null,
|
|
106
108
|
email: null,
|
|
107
|
-
social_link:
|
|
109
|
+
social_link: null,
|
|
108
110
|
is_retailer: 0,
|
|
111
|
+
financedRetailers: [
|
|
112
|
+
{
|
|
113
|
+
id: 68,
|
|
114
|
+
name: "The Home Depot Merchants",
|
|
115
|
+
country: "México",
|
|
116
|
+
id_region: 1,
|
|
117
|
+
active: 1,
|
|
118
|
+
},
|
|
119
|
+
],
|
|
120
|
+
retailers: [
|
|
121
|
+
{
|
|
122
|
+
id: null,
|
|
123
|
+
name: null,
|
|
124
|
+
country: null,
|
|
125
|
+
},
|
|
126
|
+
],
|
|
109
127
|
},
|
|
110
128
|
showSurvey: (v) => v && alert("se muestra"),
|
|
129
|
+
withChat: true,
|
|
111
130
|
};
|
|
@@ -134,6 +134,7 @@ export const ProviderProductEdition = ({
|
|
|
134
134
|
setShowContentohRequestModal,
|
|
135
135
|
showSurvey,
|
|
136
136
|
company,
|
|
137
|
+
withChat,
|
|
137
138
|
}) => {
|
|
138
139
|
const [activeTab, setActiveTab] = useState("Descripción");
|
|
139
140
|
const [activeImage, setActiveImage] = useState();
|
|
@@ -1059,7 +1060,12 @@ export const ProviderProductEdition = ({
|
|
|
1059
1060
|
];
|
|
1060
1061
|
return (
|
|
1061
1062
|
<Container headerTop={headerTop}>
|
|
1062
|
-
<HeaderTop
|
|
1063
|
+
<HeaderTop
|
|
1064
|
+
setHeaderTop={setHeaderTop}
|
|
1065
|
+
withChat={withChat}
|
|
1066
|
+
productSelected={productSelected}
|
|
1067
|
+
token={token}
|
|
1068
|
+
/>
|
|
1063
1069
|
<div className="data-container">
|
|
1064
1070
|
<div className="image-data-panel">
|
|
1065
1071
|
<ImagePreviewer
|
|
@@ -307,3 +307,16 @@ export const isObject = (obj) => {
|
|
|
307
307
|
if (obj && typeof obj === "object" && !Array.isArray(obj)) return true;
|
|
308
308
|
return false;
|
|
309
309
|
};
|
|
310
|
+
|
|
311
|
+
/*------------------------
|
|
312
|
+
recibe un value y lo codifica
|
|
313
|
+
primero a JSON y luego a URI
|
|
314
|
+
--------------------------*/
|
|
315
|
+
export const encodeUriJson = (value) => {
|
|
316
|
+
try {
|
|
317
|
+
const encodeValue = encodeURIComponent(JSON.stringify(value));
|
|
318
|
+
return encodeValue;
|
|
319
|
+
} catch (err) {
|
|
320
|
+
return undefined;
|
|
321
|
+
}
|
|
322
|
+
};
|