contentoh-components-library 21.6.59 → 21.6.61
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/organisms/ServicesNavigation/ServiceToolbar.js +210 -0
- package/dist/components/organisms/ServicesNavigation/ServicesNavigation.stories.js +138 -0
- package/dist/components/organisms/ServicesNavigation/ServicesRail.js +705 -0
- package/dist/components/organisms/ServicesNavigation/catalog.js +505 -0
- package/dist/components/organisms/ServicesNavigation/index.js +337 -0
- package/dist/components/organisms/ServicesNavigation/model.js +167 -0
- package/dist/components/organisms/ServicesNavigation/ui.js +371 -0
- package/dist/components/organisms/ServicesNavigation/views.js +1237 -0
- package/dist/components/organisms/ServicesWorkspace/AssigneePicker.js +459 -0
- package/dist/components/organisms/ServicesWorkspace/ServicesWorkspace.stories.js +119 -0
- package/dist/components/organisms/ServicesWorkspace/demo.js +137 -0
- package/dist/components/organisms/ServicesWorkspace/index.js +813 -0
- package/dist/components/organisms/ServicesWorkspace/servicesModel.js +351 -0
- package/dist/components/organisms/ServicesWorkspace/tooltipStyles.js +37 -0
- package/dist/components/pages/CreatorsProductEdition/mocks/mockApi.js +40 -0
- package/dist/components/pages/CreatorsProductEdition/mocks/productServices.fixtures.js +387 -0
- package/dist/components/pages/CreatorsProductEdition/sections/StatusChip.js +13 -4
- package/dist/components/pages/ProductEdition/ProductEdition.stories.js +148 -0
- package/dist/components/pages/ProductEdition/ProductEditionView.js +1355 -0
- package/dist/components/pages/ProductEdition/ServiceHeader.js +142 -0
- package/dist/components/pages/ProductEdition/api.js +256 -0
- package/dist/components/pages/ProductEdition/index.js +37 -0
- package/dist/components/pages/ProductEdition/permissions.js +200 -0
- package/dist/components/pages/ProductEdition/permissions.test.js +320 -0
- package/dist/components/pages/ProductEdition/sections/CatalogServicePanel.js +237 -0
- package/dist/components/pages/ProductEdition/sections/EditionTopBar.js +174 -0
- package/dist/components/pages/ProductEdition/sections/ImagePanel.js +440 -0
- package/dist/components/pages/ProductEdition/sections/ServiceTeam.js +275 -0
- package/dist/components/pages/ProductEdition/sections/ServiceTools.js +186 -0
- package/dist/components/pages/ProductEdition/services.js +233 -0
- package/dist/components/pages/ProductEdition/services.test.js +195 -0
- package/dist/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +15 -2
- package/dist/components/pages/RetailerProductEdition/context/provider-product-edition.context.js +2 -2
- package/dist/components/pages/RetailerProductEdition/index.js +57 -40
- package/dist/components/pages/RetailerProductEdition/utils.js +6 -2
- package/dist/index.js +13 -0
- package/package.json +1 -1
- package/src/components/organisms/ServicesNavigation/ServiceToolbar.jsx +143 -0
- package/src/components/organisms/ServicesNavigation/ServicesNavigation.stories.js +101 -0
- package/src/components/organisms/ServicesNavigation/ServicesRail.jsx +591 -0
- package/src/components/organisms/ServicesNavigation/catalog.js +180 -0
- package/src/components/organisms/ServicesNavigation/index.jsx +232 -0
- package/src/components/organisms/ServicesNavigation/model.js +85 -0
- package/src/components/organisms/ServicesNavigation/ui.jsx +229 -0
- package/src/components/organisms/ServicesNavigation/views.jsx +705 -0
- package/src/components/organisms/ServicesWorkspace/AssigneePicker.js +348 -0
- package/src/components/organisms/ServicesWorkspace/ServicesWorkspace.stories.js +61 -0
- package/src/components/organisms/ServicesWorkspace/demo.js +58 -0
- package/src/components/organisms/ServicesWorkspace/index.js +556 -0
- package/src/components/organisms/ServicesWorkspace/servicesModel.js +203 -0
- package/src/components/organisms/ServicesWorkspace/tooltipStyles.js +27 -0
- package/src/components/pages/CreatorsProductEdition/mocks/mockApi.js +17 -0
- package/src/components/pages/CreatorsProductEdition/mocks/productServices.fixtures.js +175 -0
- package/src/components/pages/CreatorsProductEdition/sections/StatusChip.jsx +8 -4
- package/src/components/pages/ProductEdition/ProductEdition.stories.js +106 -0
- package/src/components/pages/ProductEdition/ProductEditionView.jsx +1142 -0
- package/src/components/pages/ProductEdition/ServiceHeader.jsx +104 -0
- package/src/components/pages/ProductEdition/api.js +84 -0
- package/src/components/pages/ProductEdition/index.js +21 -0
- package/src/components/pages/ProductEdition/permissions.js +128 -0
- package/src/components/pages/ProductEdition/permissions.test.js +249 -0
- package/src/components/pages/ProductEdition/sections/CatalogServicePanel.jsx +123 -0
- package/src/components/pages/ProductEdition/sections/EditionTopBar.jsx +134 -0
- package/src/components/pages/ProductEdition/sections/ImagePanel.jsx +342 -0
- package/src/components/pages/ProductEdition/sections/ServiceTeam.jsx +184 -0
- package/src/components/pages/ProductEdition/sections/ServiceTools.jsx +134 -0
- package/src/components/pages/ProductEdition/services.js +187 -0
- package/src/components/pages/ProductEdition/services.test.js +88 -0
- package/src/components/pages/RetailerProductEdition/RetailerProductEdition.stories.js +12 -0
- package/src/components/pages/RetailerProductEdition/context/provider-product-edition.context.jsx +6 -2
- package/src/components/pages/RetailerProductEdition/index.js +28 -3
- package/src/components/pages/RetailerProductEdition/utils.js +5 -0
- package/src/index.js +1 -0
- package/.claude/settings.local.json +0 -7
- package/dist/ai/prompts/attribute.prompt.js +0 -28
- package/dist/ai/prompts/description.prompt.js +0 -33
- package/dist/ai/schemas/attribute.schema.js +0 -35
- package/dist/ai/schemas/description.schema.js +0 -27
|
@@ -0,0 +1,505 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.buildServices = exports.allCatalogServices = exports.TWENTY_SERVICES = exports.SERVICE_GROUPS = exports.SERVICE_CATALOG = exports.DEMO_USERS = exports.DEMO_PRODUCT = void 0;
|
|
9
|
+
|
|
10
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
11
|
+
|
|
12
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
|
13
|
+
|
|
14
|
+
/*
|
|
15
|
+
Datos de ejemplo del prototipo de navegación por servicios.
|
|
16
|
+
|
|
17
|
+
Nada de esto sale de la base todavía. Es el catálogo de `cat_service`
|
|
18
|
+
(docs/sql/catalog/002) con dos datos que la edición necesita para pintar cada
|
|
19
|
+
servicio:
|
|
20
|
+
|
|
21
|
+
- group: en qué bloque de la lista lateral va. Los bloques son fijos y no
|
|
22
|
+
dependen del estatus, para que un servicio siempre esté en el mismo lugar
|
|
23
|
+
y el usuario lo encuentre de memoria.
|
|
24
|
+
- view: qué vista de trabajo abre. La vista depende del tipo de entregable,
|
|
25
|
+
no del servicio: Foto, Edición y Resize abren la misma vista de imágenes.
|
|
26
|
+
*/
|
|
27
|
+
var SERVICE_GROUPS = [{
|
|
28
|
+
key: "texts",
|
|
29
|
+
label: "Textos"
|
|
30
|
+
}, {
|
|
31
|
+
key: "images",
|
|
32
|
+
label: "Imágenes"
|
|
33
|
+
}, {
|
|
34
|
+
key: "media",
|
|
35
|
+
label: "Multimedia y diseño"
|
|
36
|
+
}, {
|
|
37
|
+
key: "review",
|
|
38
|
+
label: "Revisión y entrega"
|
|
39
|
+
}, {
|
|
40
|
+
key: "maintenance",
|
|
41
|
+
label: "Mantenimiento"
|
|
42
|
+
}, {
|
|
43
|
+
key: "logistics",
|
|
44
|
+
label: "Logística"
|
|
45
|
+
}];
|
|
46
|
+
/*
|
|
47
|
+
Los servicios activos de `cat_service` que se trabajan en la edición
|
|
48
|
+
(docs/sql/catalog/002 y 006 del backend), con los mismos `service_name`,
|
|
49
|
+
`display_name` y bloque (`category_name`). Dentro de cada bloque van en el
|
|
50
|
+
orden del catálogo (`sort_order`). Los de logística (Levantamiento, Compra,
|
|
51
|
+
Armado) usan un flujo simple (casilla o avance) y abren la vista «simple»:
|
|
52
|
+
su estatus por cadena y quién lo tiene, sin editor.
|
|
53
|
+
|
|
54
|
+
`view` sale del tipo de entregable: attributes → ficha, text → textos
|
|
55
|
+
(Traducción tiene la suya), images → la vista de imágenes compartida,
|
|
56
|
+
video → videos, file → archivos. A+, Golden, Banner y Render entregan
|
|
57
|
+
imágenes, pero son diseños: van como archivos.
|
|
58
|
+
*/
|
|
59
|
+
|
|
60
|
+
exports.SERVICE_GROUPS = SERVICE_GROUPS;
|
|
61
|
+
var SERVICE_CATALOG = [// Textos
|
|
62
|
+
{
|
|
63
|
+
service_name: "datasheet",
|
|
64
|
+
display_name: "Ficha técnica",
|
|
65
|
+
group: "texts",
|
|
66
|
+
view: "attributes",
|
|
67
|
+
icon: "datasheet"
|
|
68
|
+
}, {
|
|
69
|
+
service_name: "description",
|
|
70
|
+
display_name: "Descripción",
|
|
71
|
+
group: "texts",
|
|
72
|
+
view: "text",
|
|
73
|
+
icon: "description"
|
|
74
|
+
}, {
|
|
75
|
+
service_name: "datasheetHeader",
|
|
76
|
+
display_name: "Header Ficha",
|
|
77
|
+
group: "texts",
|
|
78
|
+
view: "text",
|
|
79
|
+
icon: "header"
|
|
80
|
+
}, {
|
|
81
|
+
service_name: "translation",
|
|
82
|
+
display_name: "Traducción",
|
|
83
|
+
group: "texts",
|
|
84
|
+
view: "translation",
|
|
85
|
+
icon: "translation"
|
|
86
|
+
}, {
|
|
87
|
+
service_name: "seo",
|
|
88
|
+
display_name: "SEO",
|
|
89
|
+
group: "texts",
|
|
90
|
+
view: "text",
|
|
91
|
+
icon: "seo"
|
|
92
|
+
}, {
|
|
93
|
+
service_name: "benefitBullets",
|
|
94
|
+
display_name: "Legales + beneficios (bullets)",
|
|
95
|
+
group: "texts",
|
|
96
|
+
view: "text",
|
|
97
|
+
icon: "bullets"
|
|
98
|
+
}, // Imágenes (fotografía y edición sobre las imágenes del producto)
|
|
99
|
+
{
|
|
100
|
+
service_name: "images",
|
|
101
|
+
display_name: "Imágenes",
|
|
102
|
+
group: "images",
|
|
103
|
+
view: "images",
|
|
104
|
+
icon: "images"
|
|
105
|
+
}, {
|
|
106
|
+
service_name: "photo",
|
|
107
|
+
display_name: "Foto",
|
|
108
|
+
group: "images",
|
|
109
|
+
view: "images",
|
|
110
|
+
icon: "photo"
|
|
111
|
+
}, {
|
|
112
|
+
service_name: "edition",
|
|
113
|
+
display_name: "Edición",
|
|
114
|
+
group: "images",
|
|
115
|
+
view: "images",
|
|
116
|
+
icon: "edition"
|
|
117
|
+
}, {
|
|
118
|
+
service_name: "premiumImage",
|
|
119
|
+
display_name: "Premium",
|
|
120
|
+
group: "images",
|
|
121
|
+
view: "images",
|
|
122
|
+
icon: "premium"
|
|
123
|
+
}, {
|
|
124
|
+
service_name: "resize",
|
|
125
|
+
display_name: "Resize",
|
|
126
|
+
group: "images",
|
|
127
|
+
view: "images",
|
|
128
|
+
icon: "resize"
|
|
129
|
+
}, {
|
|
130
|
+
service_name: "adaptations",
|
|
131
|
+
display_name: "Adaptaciones",
|
|
132
|
+
group: "images",
|
|
133
|
+
view: "images",
|
|
134
|
+
icon: "adaptations"
|
|
135
|
+
}, {
|
|
136
|
+
service_name: "graphicTranslation",
|
|
137
|
+
display_name: "Traducciones gráficas",
|
|
138
|
+
group: "images",
|
|
139
|
+
view: "images",
|
|
140
|
+
icon: "graphicTranslation"
|
|
141
|
+
}, {
|
|
142
|
+
service_name: "visualUpdate",
|
|
143
|
+
display_name: "Actualización visual",
|
|
144
|
+
group: "images",
|
|
145
|
+
view: "images",
|
|
146
|
+
icon: "visualUpdate"
|
|
147
|
+
}, {
|
|
148
|
+
service_name: "ambientImage",
|
|
149
|
+
display_name: "Ambientada",
|
|
150
|
+
group: "images",
|
|
151
|
+
view: "images",
|
|
152
|
+
icon: "ambient"
|
|
153
|
+
}, {
|
|
154
|
+
service_name: "specialPhoto",
|
|
155
|
+
display_name: "Foto especial",
|
|
156
|
+
group: "images",
|
|
157
|
+
view: "images",
|
|
158
|
+
icon: "specialPhoto"
|
|
159
|
+
}, {
|
|
160
|
+
service_name: "modelPhoto",
|
|
161
|
+
display_name: "Foto con modelo",
|
|
162
|
+
group: "images",
|
|
163
|
+
view: "images",
|
|
164
|
+
icon: "modelPhoto"
|
|
165
|
+
}, {
|
|
166
|
+
service_name: "premiumAmbientImage",
|
|
167
|
+
display_name: "Foto ambientada premium",
|
|
168
|
+
group: "images",
|
|
169
|
+
view: "images",
|
|
170
|
+
icon: "premiumAmbient"
|
|
171
|
+
}, // Multimedia y diseño
|
|
172
|
+
{
|
|
173
|
+
service_name: "aplusPlatinum",
|
|
174
|
+
display_name: "A+ / Platinum SKU",
|
|
175
|
+
group: "media",
|
|
176
|
+
view: "files",
|
|
177
|
+
icon: "aplus",
|
|
178
|
+
deliverable: "Diseño"
|
|
179
|
+
}, {
|
|
180
|
+
service_name: "brandstore",
|
|
181
|
+
display_name: "Brandstore",
|
|
182
|
+
group: "media",
|
|
183
|
+
view: "files",
|
|
184
|
+
icon: "brandstore",
|
|
185
|
+
deliverable: "Diseño"
|
|
186
|
+
}, {
|
|
187
|
+
service_name: "image360",
|
|
188
|
+
display_name: "360°",
|
|
189
|
+
group: "media",
|
|
190
|
+
view: "files",
|
|
191
|
+
icon: "image360",
|
|
192
|
+
deliverable: "Archivos 360"
|
|
193
|
+
}, {
|
|
194
|
+
service_name: "videos",
|
|
195
|
+
display_name: "Videos",
|
|
196
|
+
group: "media",
|
|
197
|
+
view: "video",
|
|
198
|
+
icon: "video"
|
|
199
|
+
}, {
|
|
200
|
+
service_name: "golden",
|
|
201
|
+
display_name: "Golden",
|
|
202
|
+
group: "media",
|
|
203
|
+
view: "files",
|
|
204
|
+
icon: "golden",
|
|
205
|
+
deliverable: "Diseño"
|
|
206
|
+
}, {
|
|
207
|
+
service_name: "banner",
|
|
208
|
+
display_name: "Banner",
|
|
209
|
+
group: "media",
|
|
210
|
+
view: "files",
|
|
211
|
+
icon: "banner",
|
|
212
|
+
deliverable: "Diseño"
|
|
213
|
+
}, {
|
|
214
|
+
service_name: "render",
|
|
215
|
+
display_name: "Render",
|
|
216
|
+
group: "media",
|
|
217
|
+
view: "files",
|
|
218
|
+
icon: "render",
|
|
219
|
+
deliverable: "Render"
|
|
220
|
+
}, {
|
|
221
|
+
service_name: "arModel",
|
|
222
|
+
display_name: "Modelado 3D (realidad aumentada)",
|
|
223
|
+
group: "media",
|
|
224
|
+
view: "files",
|
|
225
|
+
icon: "arModel",
|
|
226
|
+
deliverable: "Modelo 3D"
|
|
227
|
+
}, {
|
|
228
|
+
service_name: "manualDigitization",
|
|
229
|
+
display_name: "Digitalización de manuales",
|
|
230
|
+
group: "media",
|
|
231
|
+
view: "files",
|
|
232
|
+
icon: "manual",
|
|
233
|
+
deliverable: "Manual digital"
|
|
234
|
+
}, // Revisión y entrega
|
|
235
|
+
{
|
|
236
|
+
service_name: "quality",
|
|
237
|
+
display_name: "Calidad de textos",
|
|
238
|
+
group: "review",
|
|
239
|
+
view: "files",
|
|
240
|
+
icon: "quality",
|
|
241
|
+
deliverable: "Reporte"
|
|
242
|
+
}, {
|
|
243
|
+
service_name: "secodatReview",
|
|
244
|
+
display_name: "Revisión secodat",
|
|
245
|
+
group: "review",
|
|
246
|
+
view: "files",
|
|
247
|
+
icon: "secodat",
|
|
248
|
+
deliverable: "Reporte"
|
|
249
|
+
}, {
|
|
250
|
+
service_name: "followUp",
|
|
251
|
+
display_name: "Seguimiento",
|
|
252
|
+
group: "review",
|
|
253
|
+
view: "files",
|
|
254
|
+
icon: "followUp",
|
|
255
|
+
deliverable: "Reporte"
|
|
256
|
+
}, {
|
|
257
|
+
service_name: "uploadOnly",
|
|
258
|
+
display_name: "Solo Carga",
|
|
259
|
+
group: "review",
|
|
260
|
+
view: "files",
|
|
261
|
+
icon: "upload",
|
|
262
|
+
deliverable: "Carga en cadena"
|
|
263
|
+
}, {
|
|
264
|
+
service_name: "audit",
|
|
265
|
+
display_name: "Auditoría de textos",
|
|
266
|
+
group: "review",
|
|
267
|
+
view: "files",
|
|
268
|
+
icon: "audit",
|
|
269
|
+
deliverable: "Reporte"
|
|
270
|
+
}, {
|
|
271
|
+
service_name: "inputReview",
|
|
272
|
+
display_name: "Revisión de Input",
|
|
273
|
+
group: "review",
|
|
274
|
+
view: "files",
|
|
275
|
+
icon: "inputReview",
|
|
276
|
+
deliverable: "Reporte"
|
|
277
|
+
}, {
|
|
278
|
+
service_name: "clientReview",
|
|
279
|
+
display_name: "Revisión Cliente",
|
|
280
|
+
group: "review",
|
|
281
|
+
view: "files",
|
|
282
|
+
icon: "clientReview",
|
|
283
|
+
deliverable: "Reporte"
|
|
284
|
+
}, {
|
|
285
|
+
service_name: "visualQuality",
|
|
286
|
+
display_name: "Calidad visual",
|
|
287
|
+
group: "review",
|
|
288
|
+
view: "files",
|
|
289
|
+
icon: "visualQuality",
|
|
290
|
+
deliverable: "Reporte"
|
|
291
|
+
}, {
|
|
292
|
+
service_name: "visualAudit",
|
|
293
|
+
display_name: "Auditoría visual",
|
|
294
|
+
group: "review",
|
|
295
|
+
view: "files",
|
|
296
|
+
icon: "visualAudit",
|
|
297
|
+
deliverable: "Reporte"
|
|
298
|
+
}, {
|
|
299
|
+
service_name: "gdsnUpload",
|
|
300
|
+
display_name: "Carga GDSN (Syncway)",
|
|
301
|
+
group: "review",
|
|
302
|
+
view: "files",
|
|
303
|
+
icon: "gdsn",
|
|
304
|
+
deliverable: "Carga en GDSN"
|
|
305
|
+
}, // Mantenimiento
|
|
306
|
+
{
|
|
307
|
+
service_name: "maintenance",
|
|
308
|
+
display_name: "Mantenimiento de textos",
|
|
309
|
+
group: "maintenance",
|
|
310
|
+
view: "files",
|
|
311
|
+
icon: "maintenance",
|
|
312
|
+
deliverable: "Archivo"
|
|
313
|
+
}, {
|
|
314
|
+
service_name: "visualMaintenance",
|
|
315
|
+
display_name: "Mantenimiento de imágenes",
|
|
316
|
+
group: "maintenance",
|
|
317
|
+
view: "images",
|
|
318
|
+
icon: "visualMaintenance"
|
|
319
|
+
}, // Logística: flujo simple (casilla o avance), sin editor. La edición muestra
|
|
320
|
+
// su estatus por cadena y quién lo tiene (ProductEdition/sections/CatalogServicePanel).
|
|
321
|
+
{
|
|
322
|
+
service_name: "productPickup",
|
|
323
|
+
display_name: "Levantamiento y recolección",
|
|
324
|
+
group: "logistics",
|
|
325
|
+
view: "simple",
|
|
326
|
+
icon: "pickup"
|
|
327
|
+
}, {
|
|
328
|
+
service_name: "productPurchase",
|
|
329
|
+
display_name: "Compra de producto en tienda",
|
|
330
|
+
group: "logistics",
|
|
331
|
+
view: "simple",
|
|
332
|
+
icon: "purchase"
|
|
333
|
+
}, {
|
|
334
|
+
service_name: "productAssembly",
|
|
335
|
+
display_name: "Armado de producto",
|
|
336
|
+
group: "logistics",
|
|
337
|
+
view: "simple",
|
|
338
|
+
icon: "assembly"
|
|
339
|
+
}];
|
|
340
|
+
exports.SERVICE_CATALOG = SERVICE_CATALOG;
|
|
341
|
+
var DEMO_USERS = {
|
|
342
|
+
ana: {
|
|
343
|
+
id_user: 9100,
|
|
344
|
+
name: "Ana",
|
|
345
|
+
last_name: "López"
|
|
346
|
+
},
|
|
347
|
+
carlos: {
|
|
348
|
+
id_user: 9101,
|
|
349
|
+
name: "Carlos",
|
|
350
|
+
last_name: "Méndez"
|
|
351
|
+
},
|
|
352
|
+
diana: {
|
|
353
|
+
id_user: 9102,
|
|
354
|
+
name: "Diana",
|
|
355
|
+
last_name: "Ruiz"
|
|
356
|
+
},
|
|
357
|
+
eduardo: {
|
|
358
|
+
id_user: 9103,
|
|
359
|
+
name: "Eduardo",
|
|
360
|
+
last_name: "Pérez"
|
|
361
|
+
},
|
|
362
|
+
fernanda: {
|
|
363
|
+
id_user: 9104,
|
|
364
|
+
name: "Fernanda",
|
|
365
|
+
last_name: "Soto"
|
|
366
|
+
},
|
|
367
|
+
gabriel: {
|
|
368
|
+
id_user: 9105,
|
|
369
|
+
name: "Gabriel",
|
|
370
|
+
last_name: "Torres"
|
|
371
|
+
},
|
|
372
|
+
helena: {
|
|
373
|
+
id_user: 9106,
|
|
374
|
+
name: "Helena",
|
|
375
|
+
last_name: "Vargas"
|
|
376
|
+
}
|
|
377
|
+
};
|
|
378
|
+
/** Producto con la forma que espera la cabecera de la edición (ProductHeader). */
|
|
379
|
+
|
|
380
|
+
exports.DEMO_USERS = DEMO_USERS;
|
|
381
|
+
var DEMO_PRODUCT = {
|
|
382
|
+
id_article: 11096001,
|
|
383
|
+
id_order: 11096,
|
|
384
|
+
name: "Taladro inalámbrico 20 V con 2 baterías",
|
|
385
|
+
upc: "7501234567890",
|
|
386
|
+
sku: "TAL-20V-2B",
|
|
387
|
+
categoryName: "Herramientas|Eléctricas|Taladros",
|
|
388
|
+
status: "CA",
|
|
389
|
+
timestamp: "2026-10-08T15:00:00Z",
|
|
390
|
+
article: {
|
|
391
|
+
company_name: "Herramientas del Norte"
|
|
392
|
+
},
|
|
393
|
+
categoryRetailer: [{
|
|
394
|
+
id_retailer: 58,
|
|
395
|
+
name: "The Home Depot",
|
|
396
|
+
retailer: "The Home Depot",
|
|
397
|
+
category: "Herramientas|Eléctricas|Taladros"
|
|
398
|
+
}]
|
|
399
|
+
};
|
|
400
|
+
exports.DEMO_PRODUCT = DEMO_PRODUCT;
|
|
401
|
+
var DATES = ["13/10/2026", "12/10/2026", "10/10/2026", "09/10/2026", "07/10/2026"];
|
|
402
|
+
/**
|
|
403
|
+
* Servicios del producto para las historias. Cada fila es
|
|
404
|
+
* [service_name, estatus, { especialist, facilitator, auditor }].
|
|
405
|
+
* El coordinador (facilitator) y el auditor tienen valores por omisión.
|
|
406
|
+
*/
|
|
407
|
+
|
|
408
|
+
var buildServices = function buildServices(rows) {
|
|
409
|
+
return rows.map(function (_ref, index) {
|
|
410
|
+
var _team$especialist;
|
|
411
|
+
|
|
412
|
+
var _ref2 = (0, _slicedToArray2.default)(_ref, 3),
|
|
413
|
+
serviceName = _ref2[0],
|
|
414
|
+
status = _ref2[1],
|
|
415
|
+
_ref2$ = _ref2[2],
|
|
416
|
+
team = _ref2$ === void 0 ? {} : _ref2$;
|
|
417
|
+
|
|
418
|
+
var definition = SERVICE_CATALOG.find(function (item) {
|
|
419
|
+
return item.service_name === serviceName;
|
|
420
|
+
});
|
|
421
|
+
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, definition), {}, {
|
|
422
|
+
status: status,
|
|
423
|
+
updated_at: DATES[index % DATES.length],
|
|
424
|
+
assignees: {
|
|
425
|
+
especialist: (_team$especialist = team.especialist) !== null && _team$especialist !== void 0 ? _team$especialist : null,
|
|
426
|
+
facilitator: team.facilitator === undefined ? DEMO_USERS.helena : team.facilitator,
|
|
427
|
+
auditor: team.auditor === undefined ? DEMO_USERS.fernanda : team.auditor
|
|
428
|
+
}
|
|
429
|
+
});
|
|
430
|
+
});
|
|
431
|
+
};
|
|
432
|
+
|
|
433
|
+
exports.buildServices = buildServices;
|
|
434
|
+
var ana = DEMO_USERS.ana,
|
|
435
|
+
carlos = DEMO_USERS.carlos,
|
|
436
|
+
diana = DEMO_USERS.diana,
|
|
437
|
+
eduardo = DEMO_USERS.eduardo,
|
|
438
|
+
fernanda = DEMO_USERS.fernanda,
|
|
439
|
+
gabriel = DEMO_USERS.gabriel;
|
|
440
|
+
/** Veinte servicios del catálogo con estatus y equipos variados. */
|
|
441
|
+
|
|
442
|
+
var TWENTY_SERVICES = buildServices([["datasheet", "AA", {
|
|
443
|
+
especialist: ana
|
|
444
|
+
}], ["description", "RA/AS", {
|
|
445
|
+
especialist: ana
|
|
446
|
+
}], ["datasheetHeader", "AC", {
|
|
447
|
+
especialist: ana
|
|
448
|
+
}], ["seo", "CA", {
|
|
449
|
+
especialist: eduardo
|
|
450
|
+
}], ["translation", "CA", {
|
|
451
|
+
especialist: diana
|
|
452
|
+
}], ["images", "AS", {
|
|
453
|
+
especialist: carlos
|
|
454
|
+
}], ["photo", "Ex", {
|
|
455
|
+
especialist: gabriel
|
|
456
|
+
}], ["edition", "RA/AS", {
|
|
457
|
+
especialist: carlos
|
|
458
|
+
}], ["resize", "CA", {
|
|
459
|
+
especialist: carlos
|
|
460
|
+
}], ["adaptations", "PA"], ["premiumImage", "AP", {
|
|
461
|
+
especialist: gabriel
|
|
462
|
+
}], ["videos", "IE", {
|
|
463
|
+
especialist: gabriel
|
|
464
|
+
}], ["image360", "PA"], ["brandstore", "AC", {
|
|
465
|
+
especialist: eduardo
|
|
466
|
+
}], ["aplusPlatinum", "RC", {
|
|
467
|
+
especialist: eduardo
|
|
468
|
+
}], ["golden", "AS", {
|
|
469
|
+
especialist: eduardo
|
|
470
|
+
}], ["quality", "AA", {
|
|
471
|
+
especialist: fernanda,
|
|
472
|
+
auditor: diana
|
|
473
|
+
}], ["audit", "R", {
|
|
474
|
+
especialist: fernanda,
|
|
475
|
+
auditor: diana
|
|
476
|
+
}], ["secodatReview", "Ex", {
|
|
477
|
+
especialist: fernanda,
|
|
478
|
+
auditor: diana
|
|
479
|
+
}], ["uploadOnly", "PA"]]);
|
|
480
|
+
/** Estatus variados para mostrar todos los servicios del catálogo a la vez. */
|
|
481
|
+
|
|
482
|
+
exports.TWENTY_SERVICES = TWENTY_SERVICES;
|
|
483
|
+
var SAMPLE_STATUSES = ["PA", "AS", "CA", "IE", "AC", "AA", "AP", "Ex", "RA/AS", "RC"];
|
|
484
|
+
/**
|
|
485
|
+
* Todos los servicios activos del catálogo con un estatus de ejemplo cada uno
|
|
486
|
+
* (los tres de siempre se pueden excluir: en la edición real salen del
|
|
487
|
+
* producto).
|
|
488
|
+
*/
|
|
489
|
+
|
|
490
|
+
var allCatalogServices = function allCatalogServices() {
|
|
491
|
+
var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
492
|
+
_ref3$exclude = _ref3.exclude,
|
|
493
|
+
exclude = _ref3$exclude === void 0 ? [] : _ref3$exclude;
|
|
494
|
+
|
|
495
|
+
return SERVICE_CATALOG.filter(function (item) {
|
|
496
|
+
return !exclude.includes(item.service_name);
|
|
497
|
+
}).map(function (item, index) {
|
|
498
|
+
return {
|
|
499
|
+
service_name: item.service_name,
|
|
500
|
+
status: SAMPLE_STATUSES[index * 3 % SAMPLE_STATUSES.length]
|
|
501
|
+
};
|
|
502
|
+
});
|
|
503
|
+
};
|
|
504
|
+
|
|
505
|
+
exports.allCatalogServices = allCatalogServices;
|