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.
Files changed (30) hide show
  1. package/dist/ai/prompts/attribute.prompt.js +28 -0
  2. package/dist/ai/prompts/description.prompt.js +33 -0
  3. package/dist/ai/schemas/attribute.schema.js +35 -0
  4. package/dist/ai/schemas/description.schema.js +27 -0
  5. package/dist/components/atoms/AssetPreview/AssetPreview.stories.js +118 -0
  6. package/dist/components/atoms/AssetPreview/index.js +150 -0
  7. package/dist/components/atoms/AssetPreview/styles.js +28 -0
  8. package/dist/components/molecules/GalleryAssetElement/GalleryAssetElement.stories.js +147 -0
  9. package/dist/components/molecules/GalleryAssetElement/index.js +178 -0
  10. package/dist/components/molecules/GalleryAssetElement/styles.js +26 -0
  11. package/dist/components/molecules/GalleryTrayTabs/GalleryTrayTabs.stories.js +56 -0
  12. package/dist/components/molecules/GalleryTrayTabs/index.js +60 -0
  13. package/dist/components/molecules/GalleryTrayTabs/styles.js +20 -0
  14. package/dist/components/organisms/DigitalAssetsTray/DigitalAssetsTray.stories.js +171 -0
  15. package/dist/components/organisms/DigitalAssetsTray/index.js +211 -0
  16. package/dist/components/organisms/DigitalAssetsTray/styles.js +22 -0
  17. package/dist/components/pages/RetailerProductEdition/index.js +12 -4
  18. package/dist/components/pages/RetailerProductEdition/stories/TextEditor.stories.js +45 -135
  19. package/dist/components/pages/RetailerProductEdition/utils.js +1 -1
  20. package/dist/global-files/digital-assets/assetTypes.js +480 -0
  21. package/dist/global-files/digital-assets/assets.actions.js +64 -0
  22. package/dist/global-files/digital-assets/assets.adapter.js +304 -0
  23. package/dist/global-files/digital-assets/assets.mock.js +136 -0
  24. package/dist/global-files/digital-assets/assets.reducer.js +220 -0
  25. package/dist/global-files/digital-assets/uploadAssets.js +179 -0
  26. package/dist/global-files/digital-assets/useDigitalAssets.js +522 -0
  27. package/package.json +1 -1
  28. package/src/components/pages/RetailerProductEdition/index.js +15 -5
  29. package/src/components/pages/RetailerProductEdition/stories/TextEditor.stories.js +54 -95
  30. package/src/components/pages/RetailerProductEdition/utils.js +1 -1
@@ -0,0 +1,211 @@
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.DigitalAssetsTray = void 0;
9
+
10
+ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
11
+
12
+ var _reactDropzone = require("react-dropzone");
13
+
14
+ var _styles = require("./styles");
15
+
16
+ var _GalleryAssetElement = require("../../molecules/GalleryAssetElement");
17
+
18
+ var _GalleryHeader = require("../../molecules/GalleryHeader");
19
+
20
+ var _ButtonV = require("../../atoms/ButtonV2");
21
+
22
+ var _assetTypes = require("../../../global-files/digital-assets/assetTypes");
23
+
24
+ var _jsxRuntime = require("react/jsx-runtime");
25
+
26
+ var CHECK_ALL_ID = "check-all-assets";
27
+ var ITEM_SELECTOR = "[id^='gallery-asset-']";
28
+ /**
29
+ * Bandeja de activos digitales: soltar archivos, verlos, reetiquetarlos y
30
+ * quitarlos.
31
+ *
32
+ * Tiene su propio dropzone en vez de compartir el de las imágenes porque los
33
+ * formatos aceptados son distintos: mezclarlos dejaría soltar un PDF sobre la
34
+ * bandeja de fotos y un JPG sobre la de activos.
35
+ *
36
+ * No guarda ni sube nada. Recibe el estado ya armado por `useDigitalAssets`,
37
+ * así que cuando se defina el contrato del backend solo hay que conectarle las
38
+ * llamadas; la interfaz no cambia.
39
+ */
40
+
41
+ var DigitalAssetsTray = function DigitalAssetsTray(_ref) {
42
+ var _ref$assets = _ref.assets,
43
+ assets = _ref$assets === void 0 ? [] : _ref$assets,
44
+ _ref$notices = _ref.notices,
45
+ notices = _ref$notices === void 0 ? [] : _ref$notices,
46
+ _ref$unsaved = _ref.unsaved,
47
+ unsaved = _ref$unsaved === void 0 ? {
48
+ nuevos: 0,
49
+ modificados: 0,
50
+ borrados: 0,
51
+ total: 0
52
+ } : _ref$unsaved,
53
+ _ref$remaining = _ref.remaining,
54
+ remaining = _ref$remaining === void 0 ? _assetTypes.MAX_ASSETS_PER_PRODUCT : _ref$remaining,
55
+ addFiles = _ref.addFiles,
56
+ removeAsset = _ref.removeAsset,
57
+ changeAssetType = _ref.changeAssetType,
58
+ clearNotices = _ref.clearNotices,
59
+ _ref$selectedAssets = _ref.selectedAssets,
60
+ selectedAssets = _ref$selectedAssets === void 0 ? [] : _ref$selectedAssets,
61
+ setSelectedAssets = _ref.setSelectedAssets,
62
+ setCheckAll = _ref.setCheckAll,
63
+ _ref$gridLayout = _ref.gridLayout,
64
+ gridLayout = _ref$gridLayout === void 0 ? false : _ref$gridLayout,
65
+ _ref$readOnly = _ref.readOnly,
66
+ readOnly = _ref$readOnly === void 0 ? false : _ref$readOnly,
67
+ _ref$emptyMessage = _ref.emptyMessage,
68
+ emptyMessage = _ref$emptyMessage === void 0 ? "Este producto no tiene activos digitales" : _ref$emptyMessage;
69
+
70
+ var _useDropzone = (0, _reactDropzone.useDropzone)({
71
+ accept: (0, _assetTypes.buildDropzoneAccept)(),
72
+ noKeyboard: true,
73
+ multiple: true,
74
+ noClick: true,
75
+ disabled: readOnly,
76
+ onDrop: function onDrop(acceptedFiles) {
77
+ return addFiles === null || addFiles === void 0 ? void 0 : addFiles(acceptedFiles);
78
+ }
79
+ }),
80
+ getRootProps = _useDropzone.getRootProps,
81
+ getInputProps = _useDropzone.getInputProps,
82
+ isDragActive = _useDropzone.isDragActive,
83
+ open = _useDropzone.open;
84
+
85
+ var noticesBy = function noticesBy(level) {
86
+ return notices.filter(function (item) {
87
+ return item.level === level;
88
+ });
89
+ };
90
+ /*
91
+ Se desglosa en vez de mostrar solo el número: "3 cambios sin guardar" no le
92
+ dice al usuario qué perdería si se va, y no es lo mismo dejar sin guardar un
93
+ borrado que un archivo nuevo.
94
+ */
95
+
96
+
97
+ var detalleSinGuardar = [unsaved.nuevos && "".concat(unsaved.nuevos, " nuevo").concat(unsaved.nuevos > 1 ? "s" : ""), unsaved.modificados && "".concat(unsaved.modificados, " modificado").concat(unsaved.modificados > 1 ? "s" : ""), unsaved.borrados && "".concat(unsaved.borrados, " por borrar")].filter(Boolean).join(" · ");
98
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
99
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
100
+ className: "tray-toolbar",
101
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("p", {
102
+ className: "tray-hint",
103
+ title: "Formatos permitidos: ".concat((0, _assetTypes.acceptedFormatsLabel)()),
104
+ children: ["Arrastra aqu\xED videos, 360, GIF, documentos, hojas de c\xE1lculo o archivos editables. Quedan ", remaining, " de ", _assetTypes.MAX_ASSETS_PER_PRODUCT, "."]
105
+ }), !readOnly && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ButtonV.ButtonV2, {
106
+ label: "Agregar activos",
107
+ type: "pink",
108
+ size: 12,
109
+ onClick: open
110
+ })]
111
+ }), unsaved.total > 0 && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
112
+ className: "tray-unsaved",
113
+ role: "status",
114
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
115
+ className: "tray-unsaved-dot"
116
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("p", {
117
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("strong", {
118
+ children: [unsaved.total, " cambio", unsaved.total > 1 ? "s" : "", " sin guardar"]
119
+ }), detalleSinGuardar && /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
120
+ className: "tray-unsaved-detail",
121
+ children: [" \u2014 ", detalleSinGuardar]
122
+ })]
123
+ })]
124
+ }), noticesBy("error").length > 0 && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
125
+ className: "tray-notice tray-notice-error",
126
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
127
+ className: "tray-notice-head",
128
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("p", {
129
+ children: ["No se pudieron agregar ", noticesBy("error").length, " archivo(s):"]
130
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
131
+ type: "button",
132
+ onClick: clearNotices,
133
+ title: "Cerrar",
134
+ children: "\xD7"
135
+ })]
136
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("ul", {
137
+ children: noticesBy("error").map(function (item, index) {
138
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("li", {
139
+ children: item.message
140
+ }, "err-".concat(item.name, "-").concat(index));
141
+ })
142
+ })]
143
+ }), noticesBy("warning").length > 0 && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
144
+ className: "tray-notice tray-notice-warning",
145
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
146
+ className: "tray-notice-head",
147
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
148
+ children: "Se agregaron, pero ten en cuenta:"
149
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
150
+ type: "button",
151
+ onClick: clearNotices,
152
+ title: "Cerrar",
153
+ children: "\xD7"
154
+ })]
155
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("ul", {
156
+ children: noticesBy("warning").map(function (item, index) {
157
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("li", {
158
+ children: item.message
159
+ }, "warn-".concat(item.name, "-").concat(index));
160
+ })
161
+ })]
162
+ }), !gridLayout && assets.length > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_GalleryHeader.GalleryHeader, {
163
+ variant: "asset",
164
+ checkAllId: CHECK_ALL_ID,
165
+ itemSelector: ITEM_SELECTOR,
166
+ setCheckAll: setCheckAll,
167
+ setSelectedImages: setSelectedAssets
168
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", (0, _objectSpread2.default)((0, _objectSpread2.default)({}, getRootProps({
169
+ className: "dropzone ".concat(isDragActive ? "drag-active" : "").trim()
170
+ })), {}, {
171
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("input", (0, _objectSpread2.default)({}, getInputProps())), isDragActive && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
172
+ className: "drag-overlay",
173
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
174
+ children: "Suelta los activos aqu\xED"
175
+ })
176
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("aside", {
177
+ className: gridLayout ? "tray-grid" : "tray-rows",
178
+ children: assets.map(function (asset, index) {
179
+ var _asset$id;
180
+
181
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_GalleryAssetElement.GalleryAssetElement, {
182
+ asset: asset,
183
+ index: index,
184
+ gridLayout: gridLayout,
185
+ checkAllId: CHECK_ALL_ID,
186
+ itemSelector: ITEM_SELECTOR,
187
+ selectedAssets: selectedAssets,
188
+ setSelectedAssets: setSelectedAssets,
189
+ setCheckAll: setCheckAll,
190
+ changeAsset: function changeAsset(_ref2) {
191
+ var value = _ref2.value;
192
+ return changeAssetType === null || changeAssetType === void 0 ? void 0 : changeAssetType(index, value);
193
+ },
194
+ onRemove: removeAsset,
195
+ readOnly: readOnly
196
+ }, (_asset$id = asset.id) !== null && _asset$id !== void 0 ? _asset$id : asset.tempId);
197
+ })
198
+ }), assets.length === 0 && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
199
+ className: "tray-empty",
200
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
201
+ children: emptyMessage
202
+ }), !readOnly && /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
203
+ className: "tray-empty-hint",
204
+ children: "Arr\xE1stralos aqu\xED o usa \xABAgregar activos\xBB."
205
+ })]
206
+ })]
207
+ }))]
208
+ });
209
+ };
210
+
211
+ exports.DigitalAssetsTray = DigitalAssetsTray;
@@ -0,0 +1,22 @@
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.Container = void 0;
9
+
10
+ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
11
+
12
+ var _styledComponents = _interopRequireDefault(require("styled-components"));
13
+
14
+ var _variables = require("../../../global-files/variables");
15
+
16
+ var _templateObject;
17
+
18
+ /* El dropzone replica el de la bandeja de imágenes para que arrastrar se sienta
19
+ igual en las dos. */
20
+ var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n display: flex;\n flex-direction: column;\n gap: 8px;\n\n .tray-toolbar {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n }\n\n .tray-hint {\n margin: 0;\n font-family: ", ";\n font-size: 12px;\n line-height: 18px;\n color: ", ";\n }\n\n /*\n Aviso de cambios sin guardar. Va arriba del listado y no junto al bot\xF3n de\n guardar, que vive en otra barra: el usuario mira la bandeja, no el men\xFA.\n */\n .tray-unsaved {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 6px 12px;\n border-radius: 6px;\n border: 1px solid ", ";\n background: rgba(237, 154, 77, 0.08);\n\n p {\n margin: 0;\n font-family: ", ";\n font-size: 12px;\n line-height: 18px;\n color: ", ";\n }\n\n strong {\n font-family: ", ";\n color: ", ";\n }\n }\n\n .tray-unsaved-dot {\n width: 8px;\n height: 8px;\n border-radius: 50%;\n background: ", ";\n flex-shrink: 0;\n }\n\n .tray-unsaved-detail {\n color: ", ";\n }\n\n .tray-notice {\n border-radius: 6px;\n padding: 8px 12px;\n border: 1px solid;\n\n .tray-notice-head {\n display: flex;\n align-items: center;\n justify-content: space-between;\n\n p {\n margin: 0;\n font-family: ", ";\n font-size: 12px;\n }\n\n button {\n border: none;\n background: none;\n cursor: pointer;\n font-size: 16px;\n line-height: 1;\n color: inherit;\n }\n }\n\n ul {\n margin: 4px 0 0;\n padding-left: 18px;\n }\n\n li {\n font-family: ", ";\n font-size: 12px;\n line-height: 18px;\n color: ", ";\n }\n }\n\n /* Rojo = no entr\xF3. \xC1mbar = entr\xF3, pero hay algo que saber. */\n .tray-notice-error {\n border-color: ", ";\n background: rgba(", ", 0.05);\n color: ", ";\n }\n\n .tray-notice-warning {\n border-color: ", ";\n background: rgba(237, 154, 77, 0.08);\n color: ", ";\n }\n\n .dropzone {\n position: relative;\n width: 100%;\n min-height: 160px;\n transition: all 0.5s ease;\n\n &.drag-active {\n background-color: rgba(", ", 0.05);\n border: 2px dashed ", ";\n border-radius: 8px;\n\n aside {\n opacity: 0.3;\n pointer-events: none;\n }\n }\n\n .drag-overlay {\n position: absolute;\n inset: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 1;\n\n p {\n font-family: ", ";\n font-size: 16px;\n color: ", ";\n }\n }\n }\n\n .tray-rows {\n display: flex;\n flex-direction: column;\n }\n\n .tray-grid {\n display: flex;\n flex-wrap: wrap;\n gap: 12px;\n }\n\n .tray-empty {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n text-align: center;\n width: 80%;\n\n p {\n margin: 0;\n font-family: ", ";\n font-size: 16px;\n color: ", ";\n }\n\n .tray-empty-hint {\n margin-top: 6px;\n font-size: 13px;\n color: ", ";\n }\n }\n"])), _variables.FontFamily.Lato, _variables.GlobalColors.s4, _variables.GlobalColors.in_progress, _variables.FontFamily.Lato, _variables.GlobalColors.s5, _variables.FontFamily.Raleway_600, _variables.GlobalColors.in_progress, _variables.GlobalColors.in_progress, _variables.GlobalColors.s4, _variables.FontFamily.Raleway_600, _variables.FontFamily.Lato, _variables.GlobalColors.s5, _variables.GlobalColors.secondary_magenta, _variables.GlobalColors.rgb_color_pink, _variables.GlobalColors.secondary_magenta, _variables.GlobalColors.in_progress, _variables.GlobalColors.in_progress, _variables.GlobalColors.rgb_color_pink, _variables.GlobalColors.color_pink, _variables.FontFamily.AvenirNext, _variables.GlobalColors.color_pink, _variables.FontFamily.Lato, _variables.GlobalColors.gray, _variables.GlobalColors.s4);
21
+
22
+ exports.Container = Container;
@@ -1156,8 +1156,10 @@ var RetailerProductEditionView = function RetailerProductEditionView(_ref) {
1156
1156
  // tal cual, y el especialista que además es auditor alcanza la segunda fase.
1157
1157
 
1158
1158
  var canEvaluateAsFacilitator = retailerStatus === "IE" && ([1, 4, 5].includes(user.id_role) || isAssignedAs("facilitator", concept));
1159
- var canEvaluateAsAuditor = ["AC", "RP", "RCA", "SAC"].includes(retailerStatus) && ([1, 6].includes(user.id_role) || isAuditorAssigned());
1160
- return canEvaluateAsFacilitator || canEvaluateAsAuditor;
1159
+ var canEvaluateAsAuditor = ["AC", "RP", "RCA", "SAC"].includes(retailerStatus) && ([1, 6].includes(user.id_role) || isAuditorAssigned()); // Los roles 7 y 8 también pueden validar/rechazar lo que está en AC.
1160
+
1161
+ var canEvaluateAC = retailerStatus === "AC" && [7, 8].includes(user.id_role);
1162
+ return canEvaluateAsFacilitator || canEvaluateAsAuditor || canEvaluateAC;
1161
1163
  };
1162
1164
 
1163
1165
  var canShowBulkEvaluationButtons = function canShowBulkEvaluationButtons() {
@@ -1179,7 +1181,12 @@ var RetailerProductEditionView = function RetailerProductEditionView(_ref) {
1179
1181
 
1180
1182
  return ["AC", "RP", "RCA"].includes(srv === null || srv === void 0 ? void 0 : (_srv$status2 = srv.status) === null || _srv$status2 === void 0 ? void 0 : _srv$status2.replace(/.*\//, ""));
1181
1183
  }) && ([1, 6].includes(user.id_role) || isAuditorAssigned());
1182
- return canEvaluateAsFacilitator || canEvaluateAsAuditor;
1184
+ var canEvaluateAC = services.length > 0 && services.every(function (srv) {
1185
+ var _srv$status3;
1186
+
1187
+ return (srv === null || srv === void 0 ? void 0 : (_srv$status3 = srv.status) === null || _srv$status3 === void 0 ? void 0 : _srv$status3.replace(/.*\//, "")) === "AC";
1188
+ }) && [7, 8].includes(user.id_role);
1189
+ return canEvaluateAsFacilitator || canEvaluateAsAuditor || canEvaluateAC;
1183
1190
  };
1184
1191
 
1185
1192
  var getStatusByCurrentServiceAndRetailer = function getStatusByCurrentServiceAndRetailer() {
@@ -2715,7 +2722,8 @@ var RetailerProductEditionView = function RetailerProductEditionView(_ref) {
2715
2722
  switch (id_rol) {
2716
2723
  case 7:
2717
2724
  case 8:
2718
- var canSendEvaluation = statusArray.includes(statusBySelectedRetailerService); // const conditionTwo = statusArray.includes(product?.status);
2725
+ // AC se valida/rechaza desde el panel, no se reenvía con "Enviar evaluación".
2726
+ var canSendEvaluation = statusBySelectedRetailerService !== "AC" && statusArray.includes(statusBySelectedRetailerService); // const conditionTwo = statusArray.includes(product?.status);
2719
2727
  // const conditionThree =
2720
2728
  // servicesByTab.filter((service) =>
2721
2729
  // statusArray.includes(service.status?.replace(/.*\//, "")),
@@ -33,164 +33,74 @@ TextEditor.args = {
33
33
  },
34
34
  token: "eyJraWQiOiJEV3owZnNieXg2MXNFcVduN3RCXC81bVhod3ZNbFZIOTgwUnZcL3RjT0lKdEk9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiI4ZDAxMDIxNC01YmZhLTQzYzMtOTZmYi1jNTU2ZGMwNTc3NGIiLCJjb2duaXRvOmdyb3VwcyI6WyJjb2xhYm9yYWRvcmVzX2NvbnRlbnRvaCJdLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29tXC91cy1lYXN0LTFfbFN6UVo0WjdSIiwiY29nbml0bzp1c2VybmFtZSI6IjhkMDEwMjE0LTViZmEtNDNjMy05NmZiLWM1NTZkYzA1Nzc0YiIsImF1ZCI6IjUyZDlza2tkY2c4cWpwODhvb2sxdXNlNm1rIiwiZXZlbnRfaWQiOiIzYzc3Y2JjMC02ZTM0LTRhZDQtOGJjMy02MmJmNGRhOTYxMTUiLCJ0b2tlbl91c2UiOiJpZCIsImF1dGhfdGltZSI6MTc2ODQ5NjU3NywibmFtZSI6IkNvbGFib3JhZG9yIiwicGhvbmVfbnVtYmVyIjoiKzUyMTExMSIsImV4cCI6MTc2ODUwMDE3NywiaWF0IjoxNzY4NDk2NTc3LCJlbWFpbCI6ImthcmFmZTMyMThAbW9tMmtpZC5jb20ifQ.FhBvgESIAX90v1_2auyejto5NrMetq5qHoFxzh9lRr07UsYw2iKdDG29VyJLZ_bPStSUx-424U7FR1ctSD9mU831TKuwSyGyGKLz0mO70Ume7pgt8zfN0C_YWv5MFG4thcMrvMfEuyzfUhvQ944HBjXvqzyjcOdCjsFx9gVEnLh1bsXe1MJrUx8H1KN5gNrrkkTE7Qo3ybyr_WZF1002JsdMaoFg2UP3H5gzcbcuxgtjNuyhqaXGnoCBsPhu6SOAwWLEu1pZMty88OFteEWEdxJxCbzKaj8IomT8U4Tjiti4tshMkXRnxHBqAkGzLDu3ypbG4S31CR7RgDxRIVqntw",
35
35
  productSelected: {
36
- orderId: 10424,
37
- status: "CA",
38
- datasheet_status: "CA",
39
- prio: "none",
40
- version: 3,
41
- description_status: "CA",
42
- images_status: "CA",
43
- brand: "Marca",
44
- retailerOrder: 0,
45
- missing: {
46
- datasheet: null,
47
- descriptions: null,
48
- images: null
49
- },
36
+ articleId: 150504,
50
37
  services: {
51
38
  datasheets: 1,
52
39
  descriptions: 1,
53
40
  images: 1
54
41
  },
42
+ orderId: 11130,
43
+ city: "CDMX, México",
44
+ status: "AC",
45
+ datasheet_status: "AC",
46
+ prio: "none",
47
+ version: 3,
48
+ description_status: "AC",
49
+ images_status: "AC",
50
+ statusByRetailer: [{
51
+ status: "AC",
52
+ service: "datasheet",
53
+ retailer_id: 9,
54
+ task_user_group_id: 4
55
+ }, {
56
+ status: "AC",
57
+ service: "description",
58
+ retailer_id: 9,
59
+ task_user_group_id: 4
60
+ }, {
61
+ status: "AC",
62
+ service: "images",
63
+ retailer_id: 9,
64
+ task_user_group_id: 4
65
+ }],
55
66
  article: {
56
- category: "Categoría Genérica Rappi|Categoría Genérica|Categoría Genérica",
67
+ id_article: 150504,
68
+ id_category: 6103,
69
+ brand: "Generico",
70
+ name: "Pruebas Tech",
71
+ upc: "43876912836",
72
+ sku: "43876912836",
73
+ timestamp: "2026-09-26T03:09:13.000Z",
74
+ active: 1,
75
+ company_id: 1116,
57
76
  company_name: "Walmart SA de CV",
58
77
  country: "México",
59
- id_category: "4911",
78
+ id_order: 11130,
60
79
  id_datasheet_especialist: 426,
61
80
  id_datasheet_facilitator: null,
62
81
  id_description_especialist: 426,
63
82
  id_description_facilitator: null,
64
83
  id_images_especialist: 427,
65
84
  id_images_facilitator: null,
66
- id_order: 10424,
67
- id_article: 144832,
68
- id_auditor: 425,
69
- name: "Copia prod cadenas 1",
70
- timestamp: "2025-11-16T00:32:13.000Z",
71
- upc: "100023",
72
- sku: "900006",
85
+ id_auditor: 426,
86
+ id_recepcionist: null,
87
+ category: "Alimentos y Bebidas|Amazon Súper|Abarrotes",
73
88
  categoryRetailer: [{
74
- id_category: 3431,
75
- id_retailer: 24,
76
- category_name: "Abarrotes Básicos Alsuper|Abarrotes Básicos|Abarrotes Básicos",
77
- retailer_name: "Alsuper"
78
- }, {
79
- id_category: 3435,
80
- id_retailer: 21,
81
- category_name: "Bebés Cuidado e Higiene|Bebés Cuidado e Higiene|Bebés Cuidado e Higiene",
82
- retailer_name: "Anicetos"
83
- }, {
84
- id_category: 3438,
85
- id_retailer: 1008,
86
- category_name: "Categoría Genérica App Olímpica|Categoría Genérica|Categoría Genérica",
87
- retailer_name: "App Olímpica"
88
- }, {
89
- id_category: 3439,
90
- id_retailer: 2004,
91
- category_name: "Categoría Genérica Automercado|Categoría Genérica Automercado|Categoría Genérica Automercado",
92
- retailer_name: "Automercado"
93
- }, {
94
- id_category: 4774,
95
- id_retailer: 1032,
96
- category_name: "Categoría Genérica IMPIRA Colombia|Categoría Genérica|Categoría Genérica",
97
- retailer_name: "IMPIRA Colombia"
98
- }, {
99
- id_category: 4911,
100
- id_retailer: 16,
101
- category_name: "Categoría Genérica Rappi|Categoría Genérica|Categoría Genérica",
102
- retailer_name: "Rappi"
103
- }, {
104
89
  id_category: 6103,
105
90
  id_retailer: 9,
106
91
  category_name: "Alimentos y Bebidas|Amazon Súper|Abarrotes",
107
92
  retailer_name: "Amazon"
108
- }, {
109
- id_category: 6792,
110
- id_retailer: 32,
111
- category_name: "Categoría Salud y Belleza Coppel|Categoría Salud y Belleza|Categoría Salud y Belleza",
112
- retailer_name: "Coppel"
113
- }, {
114
- id_category: 7008,
115
- id_retailer: 3,
116
- category_name: "Bebés|Accesorios para Bebés|Accesorios para Bebés",
117
- retailer_name: "Sam´s Club"
118
93
  }]
119
94
  },
120
95
  retailers: [{
121
- id: 3,
122
- name: "Sam´s Club"
123
- }, {
124
- id: 16,
125
- name: "Rappi"
126
- }, {
127
- id: 32,
128
- name: "Coppel"
129
- }, {
130
- id: 1008,
131
- name: "App Olímpica"
96
+ id: 9,
97
+ name: "Amazon"
132
98
  }],
133
- statusByRetailer: [{
134
- status: "RA/AS",
135
- service: "datasheet",
136
- retailer_id: 3
137
- }, {
138
- status: "RA/AS",
139
- service: "description",
140
- retailer_id: 3
141
- }, {
142
- status: "AA",
143
- service: "images",
144
- retailer_id: 3
145
- }, {
146
- status: "AC",
147
- service: "datasheet",
148
- retailer_id: 16
149
- }, {
150
- status: "AC",
151
- service: "description",
152
- retailer_id: 16
153
- }, {
154
- status: "AC",
155
- service: "images",
156
- retailer_id: 16
157
- }, {
158
- status: "AC",
159
- service: "datasheet",
160
- retailer_id: 32
161
- }, {
162
- status: "AC",
163
- service: "description",
164
- retailer_id: 32
165
- }, {
166
- status: "AC",
167
- service: "images",
168
- retailer_id: 32
169
- }, {
170
- status: "PA",
171
- service: "datasheet",
172
- retailer_id: 1032
173
- }, {
174
- status: "PA",
175
- service: "description",
176
- retailer_id: 1032
177
- }, {
178
- status: "PA",
179
- service: "images",
180
- retailer_id: 1032
181
- }, {
182
- status: "PA",
183
- service: "datasheet",
184
- retailer_id: 2004
185
- }, {
186
- status: "PA",
187
- service: "description",
188
- retailer_id: 2004
189
- }, {
190
- status: "PA",
191
- service: "images",
192
- retailer_id: 2004
193
- }]
99
+ variantsCount: 0,
100
+ parent: null,
101
+ parentArticleId: null,
102
+ country: "México",
103
+ upc: "43876912836"
194
104
  },
195
105
  user: {
196
106
  id_user: 426,
@@ -228,7 +228,7 @@ var getStatusArrayByRole = function getStatusArrayByRole(idRole) {
228
228
 
229
229
  case 7:
230
230
  case 8:
231
- return ["PA", "AS", "CA", "RC", "RA", "RP", "RCA"];
231
+ return ["PA", "AS", "CA", "RC", "RA", "RP", "RCA", "AC"];
232
232
 
233
233
  case 4:
234
234
  case 5: