contentoh-components-library 21.6.53 → 21.6.54
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/ai/prompts/attribute.prompt.js +28 -0
- package/dist/ai/prompts/description.prompt.js +33 -0
- package/dist/ai/schemas/attribute.schema.js +35 -0
- package/dist/ai/schemas/description.schema.js +27 -0
- package/dist/components/atoms/AssetPreview/AssetPreview.stories.js +118 -0
- package/dist/components/atoms/AssetPreview/index.js +150 -0
- package/dist/components/atoms/AssetPreview/styles.js +28 -0
- package/dist/components/molecules/GalleryAssetElement/GalleryAssetElement.stories.js +147 -0
- package/dist/components/molecules/GalleryAssetElement/index.js +178 -0
- package/dist/components/molecules/GalleryAssetElement/styles.js +26 -0
- package/dist/components/molecules/GalleryTrayTabs/GalleryTrayTabs.stories.js +56 -0
- package/dist/components/molecules/GalleryTrayTabs/index.js +60 -0
- package/dist/components/molecules/GalleryTrayTabs/styles.js +20 -0
- package/dist/components/organisms/DigitalAssetsTray/DigitalAssetsTray.stories.js +171 -0
- package/dist/components/organisms/DigitalAssetsTray/index.js +211 -0
- package/dist/components/organisms/DigitalAssetsTray/styles.js +22 -0
- package/dist/components/pages/RetailerProductEdition/index.js +12 -4
- package/dist/components/pages/RetailerProductEdition/stories/TextEditor.stories.js +45 -135
- package/dist/components/pages/RetailerProductEdition/utils.js +1 -1
- package/dist/global-files/digital-assets/assetTypes.js +480 -0
- package/dist/global-files/digital-assets/assets.actions.js +64 -0
- package/dist/global-files/digital-assets/assets.adapter.js +304 -0
- package/dist/global-files/digital-assets/assets.mock.js +136 -0
- package/dist/global-files/digital-assets/assets.reducer.js +220 -0
- package/dist/global-files/digital-assets/uploadAssets.js +179 -0
- package/dist/global-files/digital-assets/useDigitalAssets.js +522 -0
- package/package.json +1 -1
- package/src/components/pages/RetailerProductEdition/index.js +15 -5
- package/src/components/pages/RetailerProductEdition/stories/TextEditor.stories.js +54 -95
- package/src/components/pages/RetailerProductEdition/utils.js +1 -1
package/package.json
CHANGED
|
@@ -786,7 +786,11 @@ const RetailerProductEditionView = ({
|
|
|
786
786
|
["AC", "RP", "RCA", "SAC"].includes(retailerStatus) &&
|
|
787
787
|
([1, 6].includes(user.id_role) || isAuditorAssigned());
|
|
788
788
|
|
|
789
|
-
|
|
789
|
+
// Los roles 7 y 8 también pueden validar/rechazar lo que está en AC.
|
|
790
|
+
const canEvaluateAC =
|
|
791
|
+
retailerStatus === "AC" && [7, 8].includes(user.id_role);
|
|
792
|
+
|
|
793
|
+
return canEvaluateAsFacilitator || canEvaluateAsAuditor || canEvaluateAC;
|
|
790
794
|
};
|
|
791
795
|
|
|
792
796
|
const canShowBulkEvaluationButtons = () => {
|
|
@@ -806,7 +810,12 @@ const RetailerProductEditionView = ({
|
|
|
806
810
|
["AC", "RP", "RCA"].includes(srv?.status?.replace(/.*\//, "")),
|
|
807
811
|
) && ([1, 6].includes(user.id_role) || isAuditorAssigned());
|
|
808
812
|
|
|
809
|
-
|
|
813
|
+
const canEvaluateAC =
|
|
814
|
+
services.length > 0 &&
|
|
815
|
+
services.every((srv) => srv?.status?.replace(/.*\//, "") === "AC") &&
|
|
816
|
+
[7, 8].includes(user.id_role);
|
|
817
|
+
|
|
818
|
+
return canEvaluateAsFacilitator || canEvaluateAsAuditor || canEvaluateAC;
|
|
810
819
|
};
|
|
811
820
|
|
|
812
821
|
const getStatusByCurrentServiceAndRetailer = () => {
|
|
@@ -1951,9 +1960,10 @@ const RetailerProductEditionView = ({
|
|
|
1951
1960
|
switch (id_rol) {
|
|
1952
1961
|
case 7:
|
|
1953
1962
|
case 8:
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1963
|
+
// AC se valida/rechaza desde el panel, no se reenvía con "Enviar evaluación".
|
|
1964
|
+
const canSendEvaluation =
|
|
1965
|
+
statusBySelectedRetailerService !== "AC" &&
|
|
1966
|
+
statusArray.includes(statusBySelectedRetailerService);
|
|
1957
1967
|
|
|
1958
1968
|
// const con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tjNuyhqaXGnoCBsPhu6SOAwWLEu1pZMty88OFteEWEdxJxCbzKaj8IomT8U4Tjiti4tshMkXRnxHBqAkGzLDu3ypbG4S31CR7RgDxRIVqntw",
|
|
20
20
|
productSelected: {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
articleId: 150504,
|
|
22
|
+
services: {
|
|
23
|
+
datasheets: 1,
|
|
24
|
+
descriptions: 1,
|
|
25
|
+
images: 1,
|
|
26
|
+
},
|
|
27
|
+
orderId: 11130,
|
|
28
|
+
city: "CDMX, México",
|
|
29
|
+
status: "AC",
|
|
30
|
+
datasheet_status: "AC",
|
|
24
31
|
prio: "none",
|
|
25
32
|
version: 3,
|
|
26
|
-
description_status: "
|
|
27
|
-
images_status: "
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
33
|
+
description_status: "AC",
|
|
34
|
+
images_status: "AC",
|
|
35
|
+
statusByRetailer: [
|
|
36
|
+
{
|
|
37
|
+
status: "AC",
|
|
38
|
+
service: "datasheet",
|
|
39
|
+
retailer_id: 9,
|
|
40
|
+
task_user_group_id: 4,
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
status: "AC",
|
|
44
|
+
service: "description",
|
|
45
|
+
retailer_id: 9,
|
|
46
|
+
task_user_group_id: 4,
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
status: "AC",
|
|
50
|
+
service: "images",
|
|
51
|
+
retailer_id: 9,
|
|
52
|
+
task_user_group_id: 4,
|
|
53
|
+
},
|
|
54
|
+
],
|
|
32
55
|
article: {
|
|
33
|
-
|
|
34
|
-
|
|
56
|
+
id_article: 150504,
|
|
57
|
+
id_category: 6103,
|
|
58
|
+
brand: "Generico",
|
|
59
|
+
name: "Pruebas Tech",
|
|
60
|
+
upc: "43876912836",
|
|
61
|
+
sku: "43876912836",
|
|
62
|
+
timestamp: "2026-09-26T03:09:13.000Z",
|
|
63
|
+
active: 1,
|
|
64
|
+
company_id: 1116,
|
|
35
65
|
company_name: "Walmart SA de CV",
|
|
36
66
|
country: "México",
|
|
37
|
-
|
|
67
|
+
id_order: 11130,
|
|
38
68
|
id_datasheet_especialist: 426,
|
|
39
69
|
id_datasheet_facilitator: null,
|
|
40
70
|
id_description_especialist: 426,
|
|
41
71
|
id_description_facilitator: null,
|
|
42
72
|
id_images_especialist: 427,
|
|
43
73
|
id_images_facilitator: null,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
name: "Copia prod cadenas 1",
|
|
48
|
-
timestamp: "2025-11-16T00:32:13.000Z",
|
|
49
|
-
upc: "100023",
|
|
50
|
-
sku: "900006",
|
|
74
|
+
id_auditor: 426,
|
|
75
|
+
id_recepcionist: null,
|
|
76
|
+
category: "Alimentos y Bebidas|Amazon Súper|Abarrotes",
|
|
51
77
|
categoryRetailer: [
|
|
52
|
-
{
|
|
53
|
-
id_category: 3431,
|
|
54
|
-
id_retailer: 24,
|
|
55
|
-
category_name:
|
|
56
|
-
"Abarrotes Básicos Alsuper|Abarrotes Básicos|Abarrotes Básicos",
|
|
57
|
-
retailer_name: "Alsuper",
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
id_category: 3435,
|
|
61
|
-
id_retailer: 21,
|
|
62
|
-
category_name:
|
|
63
|
-
"Bebés Cuidado e Higiene|Bebés Cuidado e Higiene|Bebés Cuidado e Higiene",
|
|
64
|
-
retailer_name: "Anicetos",
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
id_category: 3438,
|
|
68
|
-
id_retailer: 1008,
|
|
69
|
-
category_name:
|
|
70
|
-
"Categoría Genérica App Olímpica|Categoría Genérica|Categoría Genérica",
|
|
71
|
-
retailer_name: "App Olímpica",
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
id_category: 3439,
|
|
75
|
-
id_retailer: 2004,
|
|
76
|
-
category_name:
|
|
77
|
-
"Categoría Genérica Automercado|Categoría Genérica Automercado|Categoría Genérica Automercado",
|
|
78
|
-
retailer_name: "Automercado",
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
id_category: 4774,
|
|
82
|
-
id_retailer: 1032,
|
|
83
|
-
category_name:
|
|
84
|
-
"Categoría Genérica IMPIRA Colombia|Categoría Genérica|Categoría Genérica",
|
|
85
|
-
retailer_name: "IMPIRA Colombia",
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
id_category: 4911,
|
|
89
|
-
id_retailer: 16,
|
|
90
|
-
category_name:
|
|
91
|
-
"Categoría Genérica Rappi|Categoría Genérica|Categoría Genérica",
|
|
92
|
-
retailer_name: "Rappi",
|
|
93
|
-
},
|
|
94
78
|
{
|
|
95
79
|
id_category: 6103,
|
|
96
80
|
id_retailer: 9,
|
|
97
81
|
category_name: "Alimentos y Bebidas|Amazon Súper|Abarrotes",
|
|
98
82
|
retailer_name: "Amazon",
|
|
99
83
|
},
|
|
100
|
-
{
|
|
101
|
-
id_category: 6792,
|
|
102
|
-
id_retailer: 32,
|
|
103
|
-
category_name:
|
|
104
|
-
"Categoría Salud y Belleza Coppel|Categoría Salud y Belleza|Categoría Salud y Belleza",
|
|
105
|
-
retailer_name: "Coppel",
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
id_category: 7008,
|
|
109
|
-
id_retailer: 3,
|
|
110
|
-
category_name: "Bebés|Accesorios para Bebés|Accesorios para Bebés",
|
|
111
|
-
retailer_name: "Sam´s Club",
|
|
112
|
-
},
|
|
113
84
|
],
|
|
114
85
|
},
|
|
115
86
|
retailers: [
|
|
116
|
-
{
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
],
|
|
121
|
-
statusByRetailer: [
|
|
122
|
-
{ status: "RA/AS", service: "datasheet", retailer_id: 3 },
|
|
123
|
-
{ status: "RA/AS", service: "description", retailer_id: 3 },
|
|
124
|
-
{ status: "AA", service: "images", retailer_id: 3 },
|
|
125
|
-
{ status: "AC", service: "datasheet", retailer_id: 16 },
|
|
126
|
-
{ status: "AC", service: "description", retailer_id: 16 },
|
|
127
|
-
{ status: "AC", service: "images", retailer_id: 16 },
|
|
128
|
-
{ status: "AC", service: "datasheet", retailer_id: 32 },
|
|
129
|
-
{ status: "AC", service: "description", retailer_id: 32 },
|
|
130
|
-
{ status: "AC", service: "images", retailer_id: 32 },
|
|
131
|
-
{ status: "PA", service: "datasheet", retailer_id: 1032 },
|
|
132
|
-
{ status: "PA", service: "description", retailer_id: 1032 },
|
|
133
|
-
{ status: "PA", service: "images", retailer_id: 1032 },
|
|
134
|
-
{ status: "PA", service: "datasheet", retailer_id: 2004 },
|
|
135
|
-
{ status: "PA", service: "description", retailer_id: 2004 },
|
|
136
|
-
{ status: "PA", service: "images", retailer_id: 2004 },
|
|
87
|
+
{
|
|
88
|
+
id: 9,
|
|
89
|
+
name: "Amazon",
|
|
90
|
+
},
|
|
137
91
|
],
|
|
92
|
+
variantsCount: 0,
|
|
93
|
+
parent: null,
|
|
94
|
+
parentArticleId: null,
|
|
95
|
+
country: "México",
|
|
96
|
+
upc: "43876912836",
|
|
138
97
|
},
|
|
139
98
|
user: {
|
|
140
99
|
id_user: 426,
|
|
@@ -186,7 +186,7 @@ export const getStatusArrayByRole = (idRole) => {
|
|
|
186
186
|
];
|
|
187
187
|
case 7:
|
|
188
188
|
case 8:
|
|
189
|
-
return ["PA", "AS", "CA", "RC", "RA", "RP", "RCA"];
|
|
189
|
+
return ["PA", "AS", "CA", "RC", "RA", "RP", "RCA", "AC"];
|
|
190
190
|
case 4:
|
|
191
191
|
case 5:
|
|
192
192
|
return ["RC", "AC", "AA", "AP", "ACA"];
|