contentoh-components-library 21.6.60 → 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/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/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,1237 @@
|
|
|
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.SummaryView = exports.ServiceView = void 0;
|
|
9
|
+
|
|
10
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
|
|
11
|
+
|
|
12
|
+
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
13
|
+
|
|
14
|
+
var _react = require("react");
|
|
15
|
+
|
|
16
|
+
var _material = require("@mui/material");
|
|
17
|
+
|
|
18
|
+
var _ImageOutlined = _interopRequireDefault(require("@mui/icons-material/ImageOutlined"));
|
|
19
|
+
|
|
20
|
+
var _CloudUploadOutlined = _interopRequireDefault(require("@mui/icons-material/CloudUploadOutlined"));
|
|
21
|
+
|
|
22
|
+
var _PlayCircleOutline = _interopRequireDefault(require("@mui/icons-material/PlayCircleOutline"));
|
|
23
|
+
|
|
24
|
+
var _InsertDriveFileOutlined = _interopRequireDefault(require("@mui/icons-material/InsertDriveFileOutlined"));
|
|
25
|
+
|
|
26
|
+
var _LockOutlined = _interopRequireDefault(require("@mui/icons-material/LockOutlined"));
|
|
27
|
+
|
|
28
|
+
var _ErrorOutline = _interopRequireDefault(require("@mui/icons-material/ErrorOutline"));
|
|
29
|
+
|
|
30
|
+
var _ArrowForward = _interopRequireDefault(require("@mui/icons-material/ArrowForward"));
|
|
31
|
+
|
|
32
|
+
var _ui = require("./ui");
|
|
33
|
+
|
|
34
|
+
var _model = require("./model");
|
|
35
|
+
|
|
36
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
37
|
+
|
|
38
|
+
/*
|
|
39
|
+
Vistas de trabajo del prototipo. Una por tipo de entregable, no una por
|
|
40
|
+
servicio: Descripción, SEO y Header de ficha usan la de textos; Foto, Edición
|
|
41
|
+
y Resize, la de imágenes. El contenido es de ejemplo: lo que se muestra es
|
|
42
|
+
cómo se navega y qué ve cada quien, no el editor final.
|
|
43
|
+
*/
|
|
44
|
+
var baseStatus = function baseStatus(status) {
|
|
45
|
+
return String(status !== null && status !== void 0 ? status : "").split("/")[0];
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
var isRejected = function isRejected(status) {
|
|
49
|
+
return String(status !== null && status !== void 0 ? status : "").split("/").some(function (part) {
|
|
50
|
+
return ["RA", "RC", "RP", "RCA", "RAC"].includes(part);
|
|
51
|
+
});
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
var DONE = ["Ex", "FAP"];
|
|
55
|
+
/* ------------------------------------------------------------------------ */
|
|
56
|
+
|
|
57
|
+
/* Piezas comunes */
|
|
58
|
+
|
|
59
|
+
/* ------------------------------------------------------------------------ */
|
|
60
|
+
|
|
61
|
+
var Panel = function Panel(_ref) {
|
|
62
|
+
var title = _ref.title,
|
|
63
|
+
aside = _ref.aside,
|
|
64
|
+
children = _ref.children,
|
|
65
|
+
sx = _ref.sx;
|
|
66
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
|
|
67
|
+
sx: (0, _objectSpread2.default)({
|
|
68
|
+
border: "1px solid ".concat(_ui.COLORS.s2),
|
|
69
|
+
borderRadius: "10px",
|
|
70
|
+
bgcolor: _ui.COLORS.white,
|
|
71
|
+
p: 2,
|
|
72
|
+
mb: 2
|
|
73
|
+
}, sx),
|
|
74
|
+
children: [(title || aside) && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Stack, {
|
|
75
|
+
direction: "row",
|
|
76
|
+
alignItems: "baseline",
|
|
77
|
+
spacing: 1,
|
|
78
|
+
sx: {
|
|
79
|
+
mb: 1.5,
|
|
80
|
+
flexWrap: "wrap",
|
|
81
|
+
rowGap: 0.5
|
|
82
|
+
},
|
|
83
|
+
children: [title && /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
|
|
84
|
+
sx: {
|
|
85
|
+
fontFamily: _ui.TITLE_STACK,
|
|
86
|
+
fontWeight: 600,
|
|
87
|
+
fontSize: 15,
|
|
88
|
+
color: _ui.COLORS.s5
|
|
89
|
+
},
|
|
90
|
+
children: title
|
|
91
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
|
|
92
|
+
sx: {
|
|
93
|
+
flex: 1
|
|
94
|
+
}
|
|
95
|
+
}), aside]
|
|
96
|
+
}), children]
|
|
97
|
+
});
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
var Note = function Note(_ref2) {
|
|
101
|
+
var icon = _ref2.icon,
|
|
102
|
+
_ref2$tone = _ref2.tone,
|
|
103
|
+
tone = _ref2$tone === void 0 ? "info" : _ref2$tone,
|
|
104
|
+
children = _ref2.children;
|
|
105
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
|
|
106
|
+
sx: {
|
|
107
|
+
display: "flex",
|
|
108
|
+
alignItems: "flex-start",
|
|
109
|
+
gap: 1,
|
|
110
|
+
p: 1.5,
|
|
111
|
+
mb: 2,
|
|
112
|
+
borderRadius: "8px",
|
|
113
|
+
bgcolor: tone === "error" ? "rgba(215, 77, 237, 0.08)" : _ui.COLORS.blue_light,
|
|
114
|
+
border: "1px solid ".concat(tone === "error" ? "rgba(215, 77, 237, 0.35)" : _ui.COLORS.s2)
|
|
115
|
+
},
|
|
116
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
|
|
117
|
+
sx: {
|
|
118
|
+
color: tone === "error" ? _ui.COLORS.rejected_status : _ui.COLORS.s4,
|
|
119
|
+
display: "flex",
|
|
120
|
+
mt: "1px"
|
|
121
|
+
},
|
|
122
|
+
children: icon
|
|
123
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
|
|
124
|
+
sx: {
|
|
125
|
+
fontFamily: _ui.FONT_STACK,
|
|
126
|
+
fontSize: 13,
|
|
127
|
+
lineHeight: "19px",
|
|
128
|
+
color: _ui.COLORS.s5
|
|
129
|
+
},
|
|
130
|
+
children: children
|
|
131
|
+
})]
|
|
132
|
+
});
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
var REJECTION_COMMENTS = {
|
|
136
|
+
description: "Falta mencionar la garantía en la descripción larga.",
|
|
137
|
+
edition: "La toma de empaque tiene sombra: el fondo debe ser blanco puro.",
|
|
138
|
+
aplusPlatinum: "El banner principal no respeta la guía de marca de la cadena."
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
var RejectionNote = function RejectionNote(_ref3) {
|
|
142
|
+
var _statusName, _REJECTION_COMMENTS$s;
|
|
143
|
+
|
|
144
|
+
var service = _ref3.service;
|
|
145
|
+
return isRejected(service.status) ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(Note, {
|
|
146
|
+
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ErrorOutline.default, {
|
|
147
|
+
sx: {
|
|
148
|
+
fontSize: 18
|
|
149
|
+
}
|
|
150
|
+
}),
|
|
151
|
+
tone: "error",
|
|
152
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("b", {
|
|
153
|
+
children: [(_statusName = (0, _ui.statusName)(service.status)) !== null && _statusName !== void 0 ? _statusName : "Rechazado", "."]
|
|
154
|
+
}), " ", "\xAB", (_REJECTION_COMMENTS$s = REJECTION_COMMENTS[service.service_name]) !== null && _REJECTION_COMMENTS$s !== void 0 ? _REJECTION_COMMENTS$s : "Revisa los comentarios y vuelve a enviar.", "\xBB"]
|
|
155
|
+
}) : null;
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
var DropZone = function DropZone(_ref4) {
|
|
159
|
+
var label = _ref4.label,
|
|
160
|
+
hint = _ref4.hint,
|
|
161
|
+
sx = _ref4.sx;
|
|
162
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.ButtonBase, {
|
|
163
|
+
sx: (0, _objectSpread2.default)({
|
|
164
|
+
width: "100%",
|
|
165
|
+
minHeight: 120,
|
|
166
|
+
display: "flex",
|
|
167
|
+
flexDirection: "column",
|
|
168
|
+
gap: 0.75,
|
|
169
|
+
border: "1.5px dashed ".concat(_ui.COLORS.magenta_s2),
|
|
170
|
+
borderRadius: "10px",
|
|
171
|
+
bgcolor: "rgba(227, 58, 169, 0.04)",
|
|
172
|
+
color: _ui.COLORS.magenta_s2,
|
|
173
|
+
p: 2,
|
|
174
|
+
"&:hover": {
|
|
175
|
+
bgcolor: "rgba(227, 58, 169, 0.08)"
|
|
176
|
+
}
|
|
177
|
+
}, sx),
|
|
178
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_CloudUploadOutlined.default, {
|
|
179
|
+
sx: {
|
|
180
|
+
fontSize: 28
|
|
181
|
+
}
|
|
182
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
|
|
183
|
+
sx: {
|
|
184
|
+
fontFamily: _ui.FONT_STACK,
|
|
185
|
+
fontSize: 13,
|
|
186
|
+
fontWeight: 700
|
|
187
|
+
},
|
|
188
|
+
children: label
|
|
189
|
+
}), hint && /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
|
|
190
|
+
sx: (0, _objectSpread2.default)((0, _objectSpread2.default)({}, _ui.captionSx), {}, {
|
|
191
|
+
textAlign: "center"
|
|
192
|
+
}),
|
|
193
|
+
children: hint
|
|
194
|
+
})]
|
|
195
|
+
});
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
var CountedField = function CountedField(_ref5) {
|
|
199
|
+
var label = _ref5.label,
|
|
200
|
+
_ref5$value = _ref5.value,
|
|
201
|
+
initial = _ref5$value === void 0 ? "" : _ref5$value,
|
|
202
|
+
max = _ref5.max,
|
|
203
|
+
_ref5$rows = _ref5.rows,
|
|
204
|
+
rows = _ref5$rows === void 0 ? 1 : _ref5$rows,
|
|
205
|
+
_ref5$required = _ref5.required,
|
|
206
|
+
required = _ref5$required === void 0 ? false : _ref5$required,
|
|
207
|
+
placeholder = _ref5.placeholder;
|
|
208
|
+
|
|
209
|
+
var _useState = (0, _react.useState)(initial),
|
|
210
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
211
|
+
value = _useState2[0],
|
|
212
|
+
setValue = _useState2[1];
|
|
213
|
+
|
|
214
|
+
var over = max && value.length > max;
|
|
215
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
|
|
216
|
+
children: [label && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Typography, {
|
|
217
|
+
sx: _ui.labelSx,
|
|
218
|
+
children: [label, required && /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
|
|
219
|
+
component: "span",
|
|
220
|
+
sx: {
|
|
221
|
+
color: _ui.COLORS.magenta_s2
|
|
222
|
+
},
|
|
223
|
+
children: " *"
|
|
224
|
+
})]
|
|
225
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.TextField, {
|
|
226
|
+
fullWidth: true,
|
|
227
|
+
size: "small",
|
|
228
|
+
multiline: rows > 1,
|
|
229
|
+
minRows: rows > 1 ? rows : undefined,
|
|
230
|
+
value: value,
|
|
231
|
+
placeholder: placeholder,
|
|
232
|
+
onChange: function onChange(event) {
|
|
233
|
+
return setValue(event.target.value);
|
|
234
|
+
},
|
|
235
|
+
sx: _ui.fieldSx
|
|
236
|
+
}), max && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Typography, {
|
|
237
|
+
sx: (0, _objectSpread2.default)((0, _objectSpread2.default)({}, _ui.captionSx), {}, {
|
|
238
|
+
textAlign: "right",
|
|
239
|
+
mt: 0.25,
|
|
240
|
+
color: over ? _ui.COLORS.rejected_status : _ui.COLORS.s4
|
|
241
|
+
}),
|
|
242
|
+
children: [value.length, " / ", max]
|
|
243
|
+
})]
|
|
244
|
+
});
|
|
245
|
+
};
|
|
246
|
+
/* ------------------------------------------------------------------------ */
|
|
247
|
+
|
|
248
|
+
/* Resumen */
|
|
249
|
+
|
|
250
|
+
/* ------------------------------------------------------------------------ */
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
var StatTile = function StatTile(_ref6) {
|
|
254
|
+
var value = _ref6.value,
|
|
255
|
+
label = _ref6.label,
|
|
256
|
+
color = _ref6.color;
|
|
257
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
|
|
258
|
+
sx: {
|
|
259
|
+
flex: "1 1 120px",
|
|
260
|
+
border: "1px solid ".concat(_ui.COLORS.s2),
|
|
261
|
+
borderRadius: "10px",
|
|
262
|
+
p: 1.5,
|
|
263
|
+
bgcolor: _ui.COLORS.white
|
|
264
|
+
},
|
|
265
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Stack, {
|
|
266
|
+
direction: "row",
|
|
267
|
+
alignItems: "center",
|
|
268
|
+
spacing: 0.75,
|
|
269
|
+
children: [color && /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
|
|
270
|
+
sx: {
|
|
271
|
+
width: 8,
|
|
272
|
+
height: 8,
|
|
273
|
+
borderRadius: "50%",
|
|
274
|
+
bgcolor: color
|
|
275
|
+
}
|
|
276
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
|
|
277
|
+
sx: {
|
|
278
|
+
fontFamily: _ui.TITLE_STACK,
|
|
279
|
+
fontWeight: 600,
|
|
280
|
+
fontSize: 24,
|
|
281
|
+
lineHeight: "30px",
|
|
282
|
+
color: _ui.COLORS.s5
|
|
283
|
+
},
|
|
284
|
+
children: value
|
|
285
|
+
})]
|
|
286
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
|
|
287
|
+
sx: _ui.captionSx,
|
|
288
|
+
children: label
|
|
289
|
+
})]
|
|
290
|
+
});
|
|
291
|
+
};
|
|
292
|
+
|
|
293
|
+
var SummaryView = function SummaryView(_ref7) {
|
|
294
|
+
var services = _ref7.services,
|
|
295
|
+
userId = _ref7.userId,
|
|
296
|
+
onSelect = _ref7.onSelect;
|
|
297
|
+
var pending = services.filter(function (service) {
|
|
298
|
+
return (0, _model.isPendingFor)(service, userId);
|
|
299
|
+
}).length;
|
|
300
|
+
var rejected = services.filter(function (service) {
|
|
301
|
+
return isRejected(service.status);
|
|
302
|
+
}).length;
|
|
303
|
+
var done = services.filter(function (service) {
|
|
304
|
+
return DONE.includes(baseStatus(service.status));
|
|
305
|
+
}).length;
|
|
306
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
307
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Stack, {
|
|
308
|
+
direction: "row",
|
|
309
|
+
spacing: 1.5,
|
|
310
|
+
sx: {
|
|
311
|
+
mb: 2,
|
|
312
|
+
flexWrap: "wrap",
|
|
313
|
+
rowGap: 1.5
|
|
314
|
+
},
|
|
315
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(StatTile, {
|
|
316
|
+
value: services.length,
|
|
317
|
+
label: "Servicios contratados"
|
|
318
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(StatTile, {
|
|
319
|
+
value: pending,
|
|
320
|
+
label: "Te tocan a ti",
|
|
321
|
+
color: _ui.COLORS.magenta_s2
|
|
322
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(StatTile, {
|
|
323
|
+
value: rejected,
|
|
324
|
+
label: "Rechazados",
|
|
325
|
+
color: _ui.COLORS.rejected_status
|
|
326
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(StatTile, {
|
|
327
|
+
value: done,
|
|
328
|
+
label: "Terminados",
|
|
329
|
+
color: _ui.COLORS.exported
|
|
330
|
+
})]
|
|
331
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(Panel, {
|
|
332
|
+
title: "Avance",
|
|
333
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
|
|
334
|
+
"aria-hidden": "true",
|
|
335
|
+
sx: {
|
|
336
|
+
display: "flex",
|
|
337
|
+
gap: "3px",
|
|
338
|
+
height: 10
|
|
339
|
+
},
|
|
340
|
+
children: (0, _model.groupServices)(services).flatMap(function (group) {
|
|
341
|
+
return group.services;
|
|
342
|
+
}).map(function (service) {
|
|
343
|
+
var _statusName2;
|
|
344
|
+
|
|
345
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
|
|
346
|
+
title: "".concat(service.display_name, " \xB7 ").concat((_statusName2 = (0, _ui.statusName)(service.status)) !== null && _statusName2 !== void 0 ? _statusName2 : service.status),
|
|
347
|
+
sx: {
|
|
348
|
+
flex: "1 1 0",
|
|
349
|
+
minWidth: 4,
|
|
350
|
+
borderRadius: "3px",
|
|
351
|
+
bgcolor: (0, _ui.serviceStatusColor)(service)
|
|
352
|
+
}
|
|
353
|
+
}, service.service_name);
|
|
354
|
+
})
|
|
355
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
|
|
356
|
+
sx: (0, _objectSpread2.default)((0, _objectSpread2.default)({}, _ui.captionSx), {}, {
|
|
357
|
+
mt: 0.75
|
|
358
|
+
}),
|
|
359
|
+
children: "Cada segmento es un servicio, con el color de su estatus, en el orden de la lista."
|
|
360
|
+
})]
|
|
361
|
+
}), (0, _model.groupServices)(services).map(function (group) {
|
|
362
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Panel, {
|
|
363
|
+
title: group.label,
|
|
364
|
+
aside: /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
|
|
365
|
+
sx: _ui.captionSx,
|
|
366
|
+
children: group.services.length
|
|
367
|
+
}),
|
|
368
|
+
sx: {
|
|
369
|
+
p: 1,
|
|
370
|
+
pt: 1.5
|
|
371
|
+
},
|
|
372
|
+
children: group.services.map(function (service) {
|
|
373
|
+
var _service$assignees;
|
|
374
|
+
|
|
375
|
+
var especialist = (_service$assignees = service.assignees) === null || _service$assignees === void 0 ? void 0 : _service$assignees.especialist;
|
|
376
|
+
var mine = (0, _model.isPendingFor)(service, userId);
|
|
377
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.ButtonBase, {
|
|
378
|
+
onClick: function onClick() {
|
|
379
|
+
return onSelect(service.service_name);
|
|
380
|
+
},
|
|
381
|
+
sx: {
|
|
382
|
+
width: "100%",
|
|
383
|
+
display: "grid",
|
|
384
|
+
gridTemplateColumns: {
|
|
385
|
+
xs: "minmax(0, 1fr) auto",
|
|
386
|
+
sm: "minmax(0, 1.6fr) 72px minmax(0, 1fr) 16px 84px 20px"
|
|
387
|
+
},
|
|
388
|
+
alignItems: "center",
|
|
389
|
+
columnGap: 1.5,
|
|
390
|
+
px: 1,
|
|
391
|
+
py: 1,
|
|
392
|
+
borderRadius: "8px",
|
|
393
|
+
textAlign: "left",
|
|
394
|
+
"&:hover": {
|
|
395
|
+
bgcolor: _ui.COLORS.s1
|
|
396
|
+
},
|
|
397
|
+
"& + &": {
|
|
398
|
+
borderTop: "1px solid ".concat(_ui.COLORS.s2)
|
|
399
|
+
}
|
|
400
|
+
},
|
|
401
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Stack, {
|
|
402
|
+
direction: "row",
|
|
403
|
+
alignItems: "center",
|
|
404
|
+
spacing: 1,
|
|
405
|
+
sx: {
|
|
406
|
+
minWidth: 0
|
|
407
|
+
},
|
|
408
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ui.ServiceIcon, {
|
|
409
|
+
icon: service.icon,
|
|
410
|
+
sx: {
|
|
411
|
+
color: _ui.COLORS.s4
|
|
412
|
+
}
|
|
413
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
|
|
414
|
+
noWrap: true,
|
|
415
|
+
sx: {
|
|
416
|
+
fontFamily: _ui.FONT_STACK,
|
|
417
|
+
fontSize: 14,
|
|
418
|
+
color: _ui.COLORS.color_gray
|
|
419
|
+
},
|
|
420
|
+
children: service.display_name
|
|
421
|
+
})]
|
|
422
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
|
|
423
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ui.StatusChip, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, (0, _ui.serviceStatusProps)(service)), {}, {
|
|
424
|
+
oval: true
|
|
425
|
+
}))
|
|
426
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
|
|
427
|
+
noWrap: true,
|
|
428
|
+
sx: (0, _objectSpread2.default)((0, _objectSpread2.default)({}, _ui.captionSx), {}, {
|
|
429
|
+
display: {
|
|
430
|
+
xs: "none",
|
|
431
|
+
sm: "block"
|
|
432
|
+
}
|
|
433
|
+
}),
|
|
434
|
+
children: especialist ? (0, _model.fullName)(especialist) : "Sin especialista"
|
|
435
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
|
|
436
|
+
sx: {
|
|
437
|
+
display: {
|
|
438
|
+
xs: "none",
|
|
439
|
+
sm: "flex"
|
|
440
|
+
}
|
|
441
|
+
},
|
|
442
|
+
children: mine && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ui.PendingDot, {})
|
|
443
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
|
|
444
|
+
sx: (0, _objectSpread2.default)((0, _objectSpread2.default)({}, _ui.captionSx), {}, {
|
|
445
|
+
display: {
|
|
446
|
+
xs: "none",
|
|
447
|
+
sm: "block"
|
|
448
|
+
}
|
|
449
|
+
}),
|
|
450
|
+
children: service.updated_at
|
|
451
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ArrowForward.default, {
|
|
452
|
+
sx: {
|
|
453
|
+
display: {
|
|
454
|
+
xs: "none",
|
|
455
|
+
sm: "block"
|
|
456
|
+
},
|
|
457
|
+
fontSize: 16,
|
|
458
|
+
color: _ui.COLORS.s3
|
|
459
|
+
}
|
|
460
|
+
})]
|
|
461
|
+
}, service.service_name);
|
|
462
|
+
})
|
|
463
|
+
}, group.key);
|
|
464
|
+
})]
|
|
465
|
+
});
|
|
466
|
+
};
|
|
467
|
+
/* ------------------------------------------------------------------------ */
|
|
468
|
+
|
|
469
|
+
/* Ficha técnica */
|
|
470
|
+
|
|
471
|
+
/* ------------------------------------------------------------------------ */
|
|
472
|
+
|
|
473
|
+
|
|
474
|
+
exports.SummaryView = SummaryView;
|
|
475
|
+
var ATTRIBUTES = [{
|
|
476
|
+
label: "Marca",
|
|
477
|
+
value: "Norteña Pro",
|
|
478
|
+
required: true
|
|
479
|
+
}, {
|
|
480
|
+
label: "Modelo",
|
|
481
|
+
value: "NP-2040",
|
|
482
|
+
required: true
|
|
483
|
+
}, {
|
|
484
|
+
label: "Voltaje",
|
|
485
|
+
value: "20 V",
|
|
486
|
+
required: true
|
|
487
|
+
}, {
|
|
488
|
+
label: "Tipo de batería",
|
|
489
|
+
value: "Ion de litio",
|
|
490
|
+
required: true
|
|
491
|
+
}, {
|
|
492
|
+
label: "Velocidad máxima",
|
|
493
|
+
value: "1 500 rpm"
|
|
494
|
+
}, {
|
|
495
|
+
label: "Peso",
|
|
496
|
+
value: "1.4 kg"
|
|
497
|
+
}, {
|
|
498
|
+
label: "Garantía",
|
|
499
|
+
value: "2 años",
|
|
500
|
+
required: true
|
|
501
|
+
}, {
|
|
502
|
+
label: "Contenido de la caja",
|
|
503
|
+
value: "",
|
|
504
|
+
required: true
|
|
505
|
+
}];
|
|
506
|
+
|
|
507
|
+
var AttributesView = function AttributesView(_ref8) {
|
|
508
|
+
var service = _ref8.service,
|
|
509
|
+
retailerName = _ref8.retailerName;
|
|
510
|
+
var required = ATTRIBUTES.filter(function (item) {
|
|
511
|
+
return item.required;
|
|
512
|
+
});
|
|
513
|
+
var filled = required.filter(function (item) {
|
|
514
|
+
return item.value;
|
|
515
|
+
}).length;
|
|
516
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
517
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(RejectionNote, {
|
|
518
|
+
service: service
|
|
519
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(Panel, {
|
|
520
|
+
title: "Atributos de ".concat(retailerName),
|
|
521
|
+
aside: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Typography, {
|
|
522
|
+
sx: _ui.captionSx,
|
|
523
|
+
children: [filled, " de ", required.length, " requeridos completos"]
|
|
524
|
+
}),
|
|
525
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
|
|
526
|
+
sx: {
|
|
527
|
+
display: "grid",
|
|
528
|
+
gridTemplateColumns: {
|
|
529
|
+
xs: "1fr",
|
|
530
|
+
md: "1fr 1fr"
|
|
531
|
+
},
|
|
532
|
+
gap: 2
|
|
533
|
+
},
|
|
534
|
+
children: ATTRIBUTES.map(function (item) {
|
|
535
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(CountedField, {
|
|
536
|
+
label: item.label,
|
|
537
|
+
value: item.value,
|
|
538
|
+
required: item.required
|
|
539
|
+
}, item.label);
|
|
540
|
+
})
|
|
541
|
+
})
|
|
542
|
+
})]
|
|
543
|
+
});
|
|
544
|
+
};
|
|
545
|
+
/* ------------------------------------------------------------------------ */
|
|
546
|
+
|
|
547
|
+
/* Textos (Descripción, SEO, Header de ficha) */
|
|
548
|
+
|
|
549
|
+
/* ------------------------------------------------------------------------ */
|
|
550
|
+
|
|
551
|
+
|
|
552
|
+
var LONG_DESCRIPTION = "Perfora madera, metal y plástico sin cables. El motor de 20 V llega a 1 500 rpm y el embrague de 21 posiciones evita barrir tornillos. Incluye dos baterías de ion de litio de 2 Ah, cargador rápido y estuche.";
|
|
553
|
+
var TEXT_FIELDS = {
|
|
554
|
+
description: [{
|
|
555
|
+
label: "Descripción corta",
|
|
556
|
+
max: 150,
|
|
557
|
+
rows: 2,
|
|
558
|
+
required: true,
|
|
559
|
+
value: "Taladro inalámbrico de 20 V con dos baterías de ion de litio y cargador rápido."
|
|
560
|
+
}, {
|
|
561
|
+
label: "Descripción larga",
|
|
562
|
+
max: 1000,
|
|
563
|
+
rows: 5,
|
|
564
|
+
required: true,
|
|
565
|
+
value: LONG_DESCRIPTION
|
|
566
|
+
}, {
|
|
567
|
+
label: "Puntos clave",
|
|
568
|
+
max: 400,
|
|
569
|
+
rows: 3,
|
|
570
|
+
value: "• Motor de 1 500 rpm\n• Dos baterías de 2 Ah\n• Luz LED de trabajo"
|
|
571
|
+
}],
|
|
572
|
+
datasheetHeader: [{
|
|
573
|
+
label: "Encabezado de la ficha",
|
|
574
|
+
max: 120,
|
|
575
|
+
rows: 2,
|
|
576
|
+
required: true,
|
|
577
|
+
value: "Taladro inalámbrico 20 V | Norteña Pro NP-2040"
|
|
578
|
+
}],
|
|
579
|
+
seo: [{
|
|
580
|
+
label: "Título SEO",
|
|
581
|
+
max: 60,
|
|
582
|
+
required: true,
|
|
583
|
+
value: "Taladro inalámbrico 20 V con 2 baterías | Norteña Pro"
|
|
584
|
+
}, {
|
|
585
|
+
label: "Meta descripción",
|
|
586
|
+
max: 155,
|
|
587
|
+
rows: 3,
|
|
588
|
+
required: true,
|
|
589
|
+
value: "",
|
|
590
|
+
placeholder: "Resumen para buscadores"
|
|
591
|
+
}, {
|
|
592
|
+
label: "Palabras clave",
|
|
593
|
+
max: 200,
|
|
594
|
+
rows: 2,
|
|
595
|
+
value: "taladro inalámbrico, taladro 20v, herramienta eléctrica"
|
|
596
|
+
}]
|
|
597
|
+
};
|
|
598
|
+
|
|
599
|
+
var TextView = function TextView(_ref9) {
|
|
600
|
+
var _TEXT_FIELDS$service$;
|
|
601
|
+
|
|
602
|
+
var service = _ref9.service,
|
|
603
|
+
retailerName = _ref9.retailerName;
|
|
604
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
605
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(RejectionNote, {
|
|
606
|
+
service: service
|
|
607
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(Panel, {
|
|
608
|
+
title: "".concat(service.display_name, " para ").concat(retailerName),
|
|
609
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Stack, {
|
|
610
|
+
spacing: 2,
|
|
611
|
+
children: ((_TEXT_FIELDS$service$ = TEXT_FIELDS[service.service_name]) !== null && _TEXT_FIELDS$service$ !== void 0 ? _TEXT_FIELDS$service$ : TEXT_FIELDS.description).map(function (field) {
|
|
612
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(CountedField, (0, _objectSpread2.default)({}, field), field.label);
|
|
613
|
+
})
|
|
614
|
+
})
|
|
615
|
+
})]
|
|
616
|
+
});
|
|
617
|
+
};
|
|
618
|
+
/* ------------------------------------------------------------------------ */
|
|
619
|
+
|
|
620
|
+
/* Traducción */
|
|
621
|
+
|
|
622
|
+
/* ------------------------------------------------------------------------ */
|
|
623
|
+
|
|
624
|
+
|
|
625
|
+
var TRANSLATION_ROWS = [{
|
|
626
|
+
label: "Nombre del producto",
|
|
627
|
+
source: "Taladro inalámbrico 20 V con 2 baterías",
|
|
628
|
+
target: "20V Cordless Drill with 2 Batteries"
|
|
629
|
+
}, {
|
|
630
|
+
label: "Descripción corta",
|
|
631
|
+
source: "Taladro inalámbrico de 20 V con dos baterías de ion de litio y cargador rápido.",
|
|
632
|
+
target: "20V cordless drill with two lithium-ion batteries and a fast charger."
|
|
633
|
+
}, {
|
|
634
|
+
label: "Descripción larga",
|
|
635
|
+
source: LONG_DESCRIPTION,
|
|
636
|
+
target: ""
|
|
637
|
+
}, {
|
|
638
|
+
label: "Puntos clave",
|
|
639
|
+
source: "• Motor de 1 500 rpm\n• Dos baterías de 2 Ah\n• Luz LED de trabajo",
|
|
640
|
+
target: ""
|
|
641
|
+
}, {
|
|
642
|
+
label: "Contenido de la caja",
|
|
643
|
+
source: "Taladro, 2 baterías, cargador y estuche",
|
|
644
|
+
target: "Drill, 2 batteries, charger and carrying case"
|
|
645
|
+
}];
|
|
646
|
+
|
|
647
|
+
var LanguagePill = function LanguagePill(_ref10) {
|
|
648
|
+
var children = _ref10.children,
|
|
649
|
+
strong = _ref10.strong;
|
|
650
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
|
|
651
|
+
component: "span",
|
|
652
|
+
sx: {
|
|
653
|
+
px: 1.25,
|
|
654
|
+
height: 26,
|
|
655
|
+
display: "inline-flex",
|
|
656
|
+
alignItems: "center",
|
|
657
|
+
borderRadius: "13px",
|
|
658
|
+
fontFamily: _ui.FONT_STACK,
|
|
659
|
+
fontSize: 12,
|
|
660
|
+
fontWeight: 700,
|
|
661
|
+
bgcolor: strong ? _ui.COLORS.s5 : _ui.COLORS.s2,
|
|
662
|
+
color: strong ? _ui.COLORS.white : _ui.COLORS.s5
|
|
663
|
+
},
|
|
664
|
+
children: children
|
|
665
|
+
});
|
|
666
|
+
};
|
|
667
|
+
|
|
668
|
+
var TranslationView = function TranslationView(_ref11) {
|
|
669
|
+
var service = _ref11.service,
|
|
670
|
+
hasSourceServices = _ref11.hasSourceServices;
|
|
671
|
+
var done = TRANSLATION_ROWS.filter(function (row) {
|
|
672
|
+
return row.target;
|
|
673
|
+
}).length;
|
|
674
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
675
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(RejectionNote, {
|
|
676
|
+
service: service
|
|
677
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(Note, {
|
|
678
|
+
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_LockOutlined.default, {
|
|
679
|
+
sx: {
|
|
680
|
+
fontSize: 18
|
|
681
|
+
}
|
|
682
|
+
}),
|
|
683
|
+
children: ["El texto original viene de la Descripci\xF3n y la Ficha t\xE9cnica del producto y aqu\xED solo se lee.", hasSourceServices ? " Si hay que corregirlo, se hace en esos servicios." : " Este producto no tiene esos servicios contratados: su contenido sirve de base, pero no aparecen en la lista."]
|
|
684
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(Panel, {
|
|
685
|
+
title: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Stack, {
|
|
686
|
+
direction: "row",
|
|
687
|
+
alignItems: "center",
|
|
688
|
+
spacing: 1,
|
|
689
|
+
component: "span",
|
|
690
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(LanguagePill, {
|
|
691
|
+
children: "Espa\xF1ol (M\xE9xico)"
|
|
692
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ArrowForward.default, {
|
|
693
|
+
sx: {
|
|
694
|
+
fontSize: 16,
|
|
695
|
+
color: _ui.COLORS.s4
|
|
696
|
+
}
|
|
697
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(LanguagePill, {
|
|
698
|
+
strong: true,
|
|
699
|
+
children: "Ingl\xE9s (EE. UU.)"
|
|
700
|
+
})]
|
|
701
|
+
}),
|
|
702
|
+
aside: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
|
|
703
|
+
sx: {
|
|
704
|
+
minWidth: 150
|
|
705
|
+
},
|
|
706
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Typography, {
|
|
707
|
+
sx: (0, _objectSpread2.default)((0, _objectSpread2.default)({}, _ui.captionSx), {}, {
|
|
708
|
+
textAlign: "right"
|
|
709
|
+
}),
|
|
710
|
+
children: [done, " de ", TRANSLATION_ROWS.length, " campos traducidos"]
|
|
711
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.LinearProgress, {
|
|
712
|
+
variant: "determinate",
|
|
713
|
+
value: done / TRANSLATION_ROWS.length * 100,
|
|
714
|
+
sx: {
|
|
715
|
+
mt: 0.5,
|
|
716
|
+
height: 4,
|
|
717
|
+
borderRadius: 2,
|
|
718
|
+
bgcolor: _ui.COLORS.s2,
|
|
719
|
+
"& .MuiLinearProgress-bar": {
|
|
720
|
+
bgcolor: _ui.COLORS.magenta_s2
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
})]
|
|
724
|
+
}),
|
|
725
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
|
|
726
|
+
sx: {
|
|
727
|
+
display: {
|
|
728
|
+
xs: "none",
|
|
729
|
+
md: "grid"
|
|
730
|
+
},
|
|
731
|
+
gridTemplateColumns: "1fr 1fr",
|
|
732
|
+
columnGap: 2,
|
|
733
|
+
mb: 1
|
|
734
|
+
},
|
|
735
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
|
|
736
|
+
sx: (0, _objectSpread2.default)((0, _objectSpread2.default)({}, _ui.captionSx), {}, {
|
|
737
|
+
fontWeight: 700,
|
|
738
|
+
textTransform: "uppercase",
|
|
739
|
+
letterSpacing: "0.05em"
|
|
740
|
+
}),
|
|
741
|
+
children: "Original \xB7 solo lectura"
|
|
742
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
|
|
743
|
+
sx: (0, _objectSpread2.default)((0, _objectSpread2.default)({}, _ui.captionSx), {}, {
|
|
744
|
+
fontWeight: 700,
|
|
745
|
+
textTransform: "uppercase",
|
|
746
|
+
letterSpacing: "0.05em"
|
|
747
|
+
}),
|
|
748
|
+
children: "Traducci\xF3n"
|
|
749
|
+
})]
|
|
750
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Stack, {
|
|
751
|
+
spacing: 2,
|
|
752
|
+
children: TRANSLATION_ROWS.map(function (row) {
|
|
753
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
|
|
754
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
|
|
755
|
+
sx: _ui.labelSx,
|
|
756
|
+
children: row.label
|
|
757
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
|
|
758
|
+
sx: {
|
|
759
|
+
display: "grid",
|
|
760
|
+
gridTemplateColumns: {
|
|
761
|
+
xs: "1fr",
|
|
762
|
+
md: "1fr 1fr"
|
|
763
|
+
},
|
|
764
|
+
gap: 1.5
|
|
765
|
+
},
|
|
766
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
|
|
767
|
+
sx: {
|
|
768
|
+
p: "8.5px 14px",
|
|
769
|
+
borderRadius: "6px",
|
|
770
|
+
bgcolor: _ui.COLORS.s1,
|
|
771
|
+
border: "1px solid ".concat(_ui.COLORS.s2),
|
|
772
|
+
fontFamily: _ui.FONT_STACK,
|
|
773
|
+
fontSize: 14,
|
|
774
|
+
lineHeight: "23px",
|
|
775
|
+
color: _ui.COLORS.gray,
|
|
776
|
+
whiteSpace: "pre-line"
|
|
777
|
+
},
|
|
778
|
+
children: row.source
|
|
779
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(CountedField, {
|
|
780
|
+
label: "",
|
|
781
|
+
value: row.target,
|
|
782
|
+
rows: row.source.length > 80 || row.source.includes("\n") ? 3 : 1,
|
|
783
|
+
placeholder: "Pendiente de traducir"
|
|
784
|
+
})]
|
|
785
|
+
})]
|
|
786
|
+
}, row.label);
|
|
787
|
+
})
|
|
788
|
+
})]
|
|
789
|
+
})]
|
|
790
|
+
});
|
|
791
|
+
};
|
|
792
|
+
/* ------------------------------------------------------------------------ */
|
|
793
|
+
|
|
794
|
+
/* Imágenes (Imágenes, Foto, Edición, Resize, Adaptaciones, Imagen premium) */
|
|
795
|
+
|
|
796
|
+
/* ------------------------------------------------------------------------ */
|
|
797
|
+
|
|
798
|
+
|
|
799
|
+
var SHOTS = ["Frente", "Reverso", "Lateral", "Empaque", "En uso", "Detalle", "Ambiente", "Medidas"];
|
|
800
|
+
var TILE_STATES = {
|
|
801
|
+
ready: {
|
|
802
|
+
label: "Lista",
|
|
803
|
+
color: _ui.COLORS.finished
|
|
804
|
+
},
|
|
805
|
+
pending: {
|
|
806
|
+
label: "Pendiente",
|
|
807
|
+
color: _ui.COLORS.s4
|
|
808
|
+
},
|
|
809
|
+
rejected: {
|
|
810
|
+
label: "Rechazada",
|
|
811
|
+
color: _ui.COLORS.rejected_status
|
|
812
|
+
}
|
|
813
|
+
};
|
|
814
|
+
|
|
815
|
+
var tileState = function tileState(service, index) {
|
|
816
|
+
var base = baseStatus(service.status);
|
|
817
|
+
if (["Ex", "FAP", "AA", "AP", "AC", "ACA", "AAC"].includes(base)) return "ready";
|
|
818
|
+
if (["PA", "R"].includes(base)) return "pending";
|
|
819
|
+
if (isRejected(service.status) && index === 3) return "rejected";
|
|
820
|
+
return index < 5 ? "ready" : "pending";
|
|
821
|
+
};
|
|
822
|
+
|
|
823
|
+
var ImagesView = function ImagesView(_ref12) {
|
|
824
|
+
var service = _ref12.service,
|
|
825
|
+
imageServices = _ref12.imageServices,
|
|
826
|
+
onSelect = _ref12.onSelect,
|
|
827
|
+
userId = _ref12.userId;
|
|
828
|
+
var states = SHOTS.map(function (_, index) {
|
|
829
|
+
return tileState(service, index);
|
|
830
|
+
});
|
|
831
|
+
var ready = states.filter(function (state) {
|
|
832
|
+
return state === "ready";
|
|
833
|
+
}).length;
|
|
834
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
835
|
+
children: [imageServices.length > 1 && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
|
|
836
|
+
sx: {
|
|
837
|
+
mb: 2
|
|
838
|
+
},
|
|
839
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Typography, {
|
|
840
|
+
sx: (0, _objectSpread2.default)((0, _objectSpread2.default)({}, _ui.captionSx), {}, {
|
|
841
|
+
mb: 1
|
|
842
|
+
}),
|
|
843
|
+
children: ["Las im\xE1genes del producto son las mismas para ", imageServices.length, " servicios. Elige en cu\xE1l trabajas:"]
|
|
844
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Stack, {
|
|
845
|
+
direction: "row",
|
|
846
|
+
spacing: 1,
|
|
847
|
+
sx: {
|
|
848
|
+
flexWrap: "wrap",
|
|
849
|
+
rowGap: 1
|
|
850
|
+
},
|
|
851
|
+
children: imageServices.map(function (item) {
|
|
852
|
+
var active = item.service_name === service.service_name;
|
|
853
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.ButtonBase, {
|
|
854
|
+
"aria-pressed": active,
|
|
855
|
+
onClick: function onClick() {
|
|
856
|
+
return onSelect(item.service_name);
|
|
857
|
+
},
|
|
858
|
+
sx: {
|
|
859
|
+
gap: 0.75,
|
|
860
|
+
height: 32,
|
|
861
|
+
px: 1.5,
|
|
862
|
+
borderRadius: "16px",
|
|
863
|
+
fontFamily: _ui.FONT_STACK,
|
|
864
|
+
fontSize: 13,
|
|
865
|
+
fontWeight: active ? 700 : 400,
|
|
866
|
+
color: active ? _ui.COLORS.magenta_s2 : _ui.COLORS.s5,
|
|
867
|
+
bgcolor: active ? _ui.COLORS.white : _ui.COLORS.s2,
|
|
868
|
+
border: "1px solid ".concat(active ? _ui.COLORS.magenta_s2 : _ui.COLORS.s2)
|
|
869
|
+
},
|
|
870
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ui.ServiceIcon, {
|
|
871
|
+
icon: item.icon,
|
|
872
|
+
sx: {
|
|
873
|
+
fontSize: 16,
|
|
874
|
+
color: "inherit"
|
|
875
|
+
}
|
|
876
|
+
}), item.display_name, (0, _model.isPendingFor)(item, userId) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ui.PendingDot, {
|
|
877
|
+
size: 7,
|
|
878
|
+
withTooltip: false
|
|
879
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ui.StatusChip, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, (0, _ui.serviceStatusProps)(item)), {}, {
|
|
880
|
+
oval: true
|
|
881
|
+
}))]
|
|
882
|
+
}, item.service_name);
|
|
883
|
+
})
|
|
884
|
+
})]
|
|
885
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(RejectionNote, {
|
|
886
|
+
service: service
|
|
887
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(Panel, {
|
|
888
|
+
title: "".concat(service.display_name, " \xB7 ").concat(SHOTS.length, " tomas"),
|
|
889
|
+
aside: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Typography, {
|
|
890
|
+
sx: _ui.captionSx,
|
|
891
|
+
children: [ready, " listas para este servicio"]
|
|
892
|
+
}),
|
|
893
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
|
|
894
|
+
sx: {
|
|
895
|
+
display: "grid",
|
|
896
|
+
gridTemplateColumns: "repeat(auto-fill, minmax(132px, 1fr))",
|
|
897
|
+
gap: 1.5
|
|
898
|
+
},
|
|
899
|
+
children: [SHOTS.map(function (shot, index) {
|
|
900
|
+
var state = TILE_STATES[states[index]];
|
|
901
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
|
|
902
|
+
sx: {
|
|
903
|
+
border: "1px solid ".concat(states[index] === "rejected" ? _ui.COLORS.rejected_status : _ui.COLORS.s2),
|
|
904
|
+
borderRadius: "8px",
|
|
905
|
+
overflow: "hidden",
|
|
906
|
+
bgcolor: _ui.COLORS.white
|
|
907
|
+
},
|
|
908
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
|
|
909
|
+
sx: {
|
|
910
|
+
aspectRatio: "1 / 1",
|
|
911
|
+
display: "flex",
|
|
912
|
+
alignItems: "center",
|
|
913
|
+
justifyContent: "center",
|
|
914
|
+
background: "linear-gradient(135deg, ".concat(_ui.COLORS.blue_light, ", ").concat(_ui.COLORS.s2, ")")
|
|
915
|
+
},
|
|
916
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ImageOutlined.default, {
|
|
917
|
+
sx: {
|
|
918
|
+
fontSize: 34,
|
|
919
|
+
color: _ui.COLORS.s3
|
|
920
|
+
}
|
|
921
|
+
})
|
|
922
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Stack, {
|
|
923
|
+
direction: "row",
|
|
924
|
+
alignItems: "center",
|
|
925
|
+
spacing: 0.75,
|
|
926
|
+
sx: {
|
|
927
|
+
px: 1,
|
|
928
|
+
py: 0.75
|
|
929
|
+
},
|
|
930
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
|
|
931
|
+
noWrap: true,
|
|
932
|
+
sx: {
|
|
933
|
+
flex: 1,
|
|
934
|
+
fontFamily: _ui.FONT_STACK,
|
|
935
|
+
fontSize: 12,
|
|
936
|
+
color: _ui.COLORS.color_gray
|
|
937
|
+
},
|
|
938
|
+
children: shot
|
|
939
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
|
|
940
|
+
sx: {
|
|
941
|
+
width: 7,
|
|
942
|
+
height: 7,
|
|
943
|
+
borderRadius: "50%",
|
|
944
|
+
bgcolor: state.color
|
|
945
|
+
}
|
|
946
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
|
|
947
|
+
sx: {
|
|
948
|
+
fontFamily: _ui.FONT_STACK,
|
|
949
|
+
fontSize: 11,
|
|
950
|
+
color: state.color
|
|
951
|
+
},
|
|
952
|
+
children: state.label
|
|
953
|
+
})]
|
|
954
|
+
})]
|
|
955
|
+
}, shot);
|
|
956
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(DropZone, {
|
|
957
|
+
label: "Subir im\xE1genes",
|
|
958
|
+
hint: "JPG o PNG",
|
|
959
|
+
sx: {
|
|
960
|
+
minHeight: 0,
|
|
961
|
+
aspectRatio: "1 / 1.22"
|
|
962
|
+
}
|
|
963
|
+
})]
|
|
964
|
+
})
|
|
965
|
+
})]
|
|
966
|
+
});
|
|
967
|
+
};
|
|
968
|
+
/* ------------------------------------------------------------------------ */
|
|
969
|
+
|
|
970
|
+
/* Video */
|
|
971
|
+
|
|
972
|
+
/* ------------------------------------------------------------------------ */
|
|
973
|
+
|
|
974
|
+
|
|
975
|
+
var VIDEOS = [{
|
|
976
|
+
name: "Video demostrativo",
|
|
977
|
+
length: "0:45",
|
|
978
|
+
state: "ready"
|
|
979
|
+
}, {
|
|
980
|
+
name: "Unboxing",
|
|
981
|
+
length: "1:20",
|
|
982
|
+
state: "pending"
|
|
983
|
+
}];
|
|
984
|
+
|
|
985
|
+
var VideoView = function VideoView(_ref13) {
|
|
986
|
+
var service = _ref13.service;
|
|
987
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
988
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(RejectionNote, {
|
|
989
|
+
service: service
|
|
990
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(Panel, {
|
|
991
|
+
title: "Videos del producto",
|
|
992
|
+
aside: /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
|
|
993
|
+
sx: _ui.captionSx,
|
|
994
|
+
children: "MP4, hasta 500 MB"
|
|
995
|
+
}),
|
|
996
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
|
|
997
|
+
sx: {
|
|
998
|
+
display: "grid",
|
|
999
|
+
gridTemplateColumns: "repeat(auto-fill, minmax(220px, 1fr))",
|
|
1000
|
+
gap: 1.5
|
|
1001
|
+
},
|
|
1002
|
+
children: [VIDEOS.map(function (video) {
|
|
1003
|
+
var state = TILE_STATES[video.state];
|
|
1004
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
|
|
1005
|
+
sx: {
|
|
1006
|
+
border: "1px solid ".concat(_ui.COLORS.s2),
|
|
1007
|
+
borderRadius: "8px",
|
|
1008
|
+
overflow: "hidden"
|
|
1009
|
+
},
|
|
1010
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
|
|
1011
|
+
sx: {
|
|
1012
|
+
aspectRatio: "16 / 9",
|
|
1013
|
+
display: "flex",
|
|
1014
|
+
alignItems: "center",
|
|
1015
|
+
justifyContent: "center",
|
|
1016
|
+
bgcolor: _ui.COLORS.deep_gray
|
|
1017
|
+
},
|
|
1018
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_PlayCircleOutline.default, {
|
|
1019
|
+
sx: {
|
|
1020
|
+
fontSize: 40,
|
|
1021
|
+
color: _ui.COLORS.white,
|
|
1022
|
+
opacity: 0.85
|
|
1023
|
+
}
|
|
1024
|
+
})
|
|
1025
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Stack, {
|
|
1026
|
+
direction: "row",
|
|
1027
|
+
alignItems: "center",
|
|
1028
|
+
spacing: 0.75,
|
|
1029
|
+
sx: {
|
|
1030
|
+
px: 1.25,
|
|
1031
|
+
py: 1
|
|
1032
|
+
},
|
|
1033
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Typography, {
|
|
1034
|
+
noWrap: true,
|
|
1035
|
+
sx: {
|
|
1036
|
+
flex: 1,
|
|
1037
|
+
fontFamily: _ui.FONT_STACK,
|
|
1038
|
+
fontSize: 13,
|
|
1039
|
+
color: _ui.COLORS.color_gray
|
|
1040
|
+
},
|
|
1041
|
+
children: [video.name, " \xB7 ", video.length]
|
|
1042
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
|
|
1043
|
+
sx: {
|
|
1044
|
+
width: 7,
|
|
1045
|
+
height: 7,
|
|
1046
|
+
borderRadius: "50%",
|
|
1047
|
+
bgcolor: state.color
|
|
1048
|
+
}
|
|
1049
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
|
|
1050
|
+
sx: {
|
|
1051
|
+
fontFamily: _ui.FONT_STACK,
|
|
1052
|
+
fontSize: 11,
|
|
1053
|
+
color: state.color
|
|
1054
|
+
},
|
|
1055
|
+
children: state.label
|
|
1056
|
+
})]
|
|
1057
|
+
})]
|
|
1058
|
+
}, video.name);
|
|
1059
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(DropZone, {
|
|
1060
|
+
label: "Subir video",
|
|
1061
|
+
hint: "Arrastra el archivo o haz clic",
|
|
1062
|
+
sx: {
|
|
1063
|
+
aspectRatio: "16 / 11.5"
|
|
1064
|
+
}
|
|
1065
|
+
})]
|
|
1066
|
+
})
|
|
1067
|
+
})]
|
|
1068
|
+
});
|
|
1069
|
+
};
|
|
1070
|
+
/* ------------------------------------------------------------------------ */
|
|
1071
|
+
|
|
1072
|
+
/* Archivos (diseño, 360°, reportes, carga en cadena) */
|
|
1073
|
+
|
|
1074
|
+
/* ------------------------------------------------------------------------ */
|
|
1075
|
+
|
|
1076
|
+
|
|
1077
|
+
var FILES = {
|
|
1078
|
+
brandstore: [["brandstore_taladro_v2.zip", "Versión 2 · 10/10/2026 · 4.2 MB"], ["brandstore_taladro_v1.zip", "Versión 1 · 03/10/2026 · 4.0 MB"]],
|
|
1079
|
+
aplusPlatinum: [["aplus_taladro_v1.html", "Versión 1 · 09/10/2026 · 380 KB"]],
|
|
1080
|
+
golden: [["golden_thd_taladro_borrador.zip", "Borrador · 12/10/2026 · 2.1 MB"]],
|
|
1081
|
+
quality: [["reporte_calidad_11096.pdf", "Versión 1 · 11/10/2026 · 640 KB"]],
|
|
1082
|
+
audit: [],
|
|
1083
|
+
secodatReview: [["revision_secodat_11096.xlsx", "Versión final · 06/10/2026 · 85 KB"]]
|
|
1084
|
+
};
|
|
1085
|
+
|
|
1086
|
+
var FilesView = function FilesView(_ref14) {
|
|
1087
|
+
var _FILES$service$servic, _service$deliverable;
|
|
1088
|
+
|
|
1089
|
+
var service = _ref14.service;
|
|
1090
|
+
var files = (_FILES$service$servic = FILES[service.service_name]) !== null && _FILES$service$servic !== void 0 ? _FILES$service$servic : [];
|
|
1091
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
1092
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(RejectionNote, {
|
|
1093
|
+
service: service
|
|
1094
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(Panel, {
|
|
1095
|
+
title: "Entregable: ".concat((_service$deliverable = service.deliverable) !== null && _service$deliverable !== void 0 ? _service$deliverable : "Archivo"),
|
|
1096
|
+
aside: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Typography, {
|
|
1097
|
+
sx: _ui.captionSx,
|
|
1098
|
+
children: [files.length, " ", files.length === 1 ? "archivo" : "archivos"]
|
|
1099
|
+
}),
|
|
1100
|
+
children: [files.length === 0 ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
|
|
1101
|
+
sx: (0, _objectSpread2.default)((0, _objectSpread2.default)({}, _ui.captionSx), {}, {
|
|
1102
|
+
mb: 1.5
|
|
1103
|
+
}),
|
|
1104
|
+
children: "A\xFAn no hay entregables para este servicio."
|
|
1105
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Stack, {
|
|
1106
|
+
sx: {
|
|
1107
|
+
mb: 1.5
|
|
1108
|
+
},
|
|
1109
|
+
children: files.map(function (_ref15) {
|
|
1110
|
+
var _ref16 = (0, _slicedToArray2.default)(_ref15, 2),
|
|
1111
|
+
name = _ref16[0],
|
|
1112
|
+
meta = _ref16[1];
|
|
1113
|
+
|
|
1114
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Stack, {
|
|
1115
|
+
direction: "row",
|
|
1116
|
+
alignItems: "center",
|
|
1117
|
+
spacing: 1.5,
|
|
1118
|
+
sx: {
|
|
1119
|
+
py: 1.25,
|
|
1120
|
+
"& + &": {
|
|
1121
|
+
borderTop: "1px solid ".concat(_ui.COLORS.s2)
|
|
1122
|
+
}
|
|
1123
|
+
},
|
|
1124
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
|
|
1125
|
+
sx: {
|
|
1126
|
+
width: 36,
|
|
1127
|
+
height: 36,
|
|
1128
|
+
borderRadius: "8px",
|
|
1129
|
+
bgcolor: _ui.COLORS.s2,
|
|
1130
|
+
display: "flex",
|
|
1131
|
+
alignItems: "center",
|
|
1132
|
+
justifyContent: "center",
|
|
1133
|
+
flexShrink: 0
|
|
1134
|
+
},
|
|
1135
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_InsertDriveFileOutlined.default, {
|
|
1136
|
+
sx: {
|
|
1137
|
+
fontSize: 20,
|
|
1138
|
+
color: _ui.COLORS.s4
|
|
1139
|
+
}
|
|
1140
|
+
})
|
|
1141
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Box, {
|
|
1142
|
+
sx: {
|
|
1143
|
+
flex: 1,
|
|
1144
|
+
minWidth: 0
|
|
1145
|
+
},
|
|
1146
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
|
|
1147
|
+
noWrap: true,
|
|
1148
|
+
sx: {
|
|
1149
|
+
fontFamily: _ui.FONT_STACK,
|
|
1150
|
+
fontSize: 14,
|
|
1151
|
+
color: _ui.COLORS.color_gray
|
|
1152
|
+
},
|
|
1153
|
+
children: name
|
|
1154
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Typography, {
|
|
1155
|
+
sx: _ui.captionSx,
|
|
1156
|
+
children: meta
|
|
1157
|
+
})]
|
|
1158
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Button, {
|
|
1159
|
+
sx: (0, _objectSpread2.default)((0, _objectSpread2.default)({}, _ui.outlineButtonSx), {}, {
|
|
1160
|
+
height: 28,
|
|
1161
|
+
px: 1.5,
|
|
1162
|
+
fontSize: 12
|
|
1163
|
+
}),
|
|
1164
|
+
children: "Descargar"
|
|
1165
|
+
})]
|
|
1166
|
+
}, name);
|
|
1167
|
+
})
|
|
1168
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(DropZone, {
|
|
1169
|
+
label: "Subir entregable",
|
|
1170
|
+
hint: "PDF, ZIP, HTML o im\xE1genes"
|
|
1171
|
+
})]
|
|
1172
|
+
})]
|
|
1173
|
+
});
|
|
1174
|
+
};
|
|
1175
|
+
/* ------------------------------------------------------------------------ */
|
|
1176
|
+
|
|
1177
|
+
|
|
1178
|
+
var ServiceView = function ServiceView(_ref17) {
|
|
1179
|
+
var selected = _ref17.selected,
|
|
1180
|
+
service = _ref17.service,
|
|
1181
|
+
services = _ref17.services,
|
|
1182
|
+
userId = _ref17.userId,
|
|
1183
|
+
onSelect = _ref17.onSelect,
|
|
1184
|
+
retailerName = _ref17.retailerName;
|
|
1185
|
+
|
|
1186
|
+
if (selected === _model.SUMMARY || !service) {
|
|
1187
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(SummaryView, {
|
|
1188
|
+
services: services,
|
|
1189
|
+
userId: userId,
|
|
1190
|
+
onSelect: onSelect
|
|
1191
|
+
});
|
|
1192
|
+
}
|
|
1193
|
+
|
|
1194
|
+
switch (service.view) {
|
|
1195
|
+
case "attributes":
|
|
1196
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(AttributesView, {
|
|
1197
|
+
service: service,
|
|
1198
|
+
retailerName: retailerName
|
|
1199
|
+
}, service.service_name);
|
|
1200
|
+
|
|
1201
|
+
case "text":
|
|
1202
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(TextView, {
|
|
1203
|
+
service: service,
|
|
1204
|
+
retailerName: retailerName
|
|
1205
|
+
}, service.service_name);
|
|
1206
|
+
|
|
1207
|
+
case "translation":
|
|
1208
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(TranslationView, {
|
|
1209
|
+
service: service,
|
|
1210
|
+
hasSourceServices: services.some(function (item) {
|
|
1211
|
+
return ["description", "datasheet"].includes(item.service_name);
|
|
1212
|
+
})
|
|
1213
|
+
});
|
|
1214
|
+
|
|
1215
|
+
case "images":
|
|
1216
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(ImagesView, {
|
|
1217
|
+
service: service,
|
|
1218
|
+
imageServices: services.filter(function (item) {
|
|
1219
|
+
return item.view === "images";
|
|
1220
|
+
}),
|
|
1221
|
+
onSelect: onSelect,
|
|
1222
|
+
userId: userId
|
|
1223
|
+
});
|
|
1224
|
+
|
|
1225
|
+
case "video":
|
|
1226
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(VideoView, {
|
|
1227
|
+
service: service
|
|
1228
|
+
});
|
|
1229
|
+
|
|
1230
|
+
default:
|
|
1231
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(FilesView, {
|
|
1232
|
+
service: service
|
|
1233
|
+
}, service.service_name);
|
|
1234
|
+
}
|
|
1235
|
+
};
|
|
1236
|
+
|
|
1237
|
+
exports.ServiceView = ServiceView;
|