contentoh-components-library 21.6.0 → 21.6.11

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 (29) hide show
  1. package/dist/components/atoms/ProgressBar/index.js +1 -1
  2. package/dist/components/atoms/ProgressBar/styles.js +4 -4
  3. package/dist/components/atoms/Status/index.js +16 -1
  4. package/dist/components/atoms/Status/styles.js +1 -1
  5. package/dist/components/organisms/ChangeStatusModal/index.js +166 -53
  6. package/dist/components/organisms/ChangeStatusModal/styles.js +12 -8
  7. package/dist/components/pages/ProviderProductEdition/context/provider-product-edition.context.js +3 -1
  8. package/dist/components/pages/ProviderProductEdition/index.js +65 -36
  9. package/dist/components/pages/ProviderProductEdition/utils.js +3 -1
  10. package/dist/components/pages/RetailerProductEdition/context/reducers/product.js +11 -19
  11. package/dist/components/pages/RetailerProductEdition/index.js +16 -10
  12. package/dist/components/pages/RetailerProductEdition/utils.js +1 -1
  13. package/dist/contexts/AiProductEdition.js +34 -22
  14. package/dist/global-files/statusDictionary.js +36 -1
  15. package/package.json +1 -1
  16. package/src/components/atoms/ProgressBar/index.js +2 -6
  17. package/src/components/atoms/ProgressBar/styles.js +4 -58
  18. package/src/components/atoms/Status/index.js +11 -3
  19. package/src/components/atoms/Status/styles.js +113 -0
  20. package/src/components/organisms/ChangeStatusModal/index.jsx +103 -29
  21. package/src/components/organisms/ChangeStatusModal/styles.js +20 -0
  22. package/src/components/pages/ProviderProductEdition/context/provider-product-edition.context.jsx +1 -0
  23. package/src/components/pages/ProviderProductEdition/index.js +40 -14
  24. package/src/components/pages/ProviderProductEdition/utils.js +5 -1
  25. package/src/components/pages/RetailerProductEdition/context/reducers/product.js +4 -20
  26. package/src/components/pages/RetailerProductEdition/index.js +20 -16
  27. package/src/components/pages/RetailerProductEdition/utils.js +1 -1
  28. package/src/contexts/AiProductEdition.jsx +22 -13
  29. package/src/global-files/statusDictionary.js +31 -1
@@ -48,7 +48,7 @@ var ProgressBar = function ProgressBar(_ref) {
48
48
  })]
49
49
  }),
50
50
  children: !percent && percent != 0 ? null : /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Container, {
51
- className: "status-".concat(progressBarType),
51
+ percentageRequired: Math.round(percent),
52
52
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("p", {
53
53
  children: [Math.round(percent), "%"]
54
54
  })
@@ -15,16 +15,16 @@ var _variables = require("../../../global-files/variables");
15
15
 
16
16
  var _templateObject, _templateObject2;
17
17
 
18
- var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n background-color: ", ";\n width: fit-content;\n height: 27px;\n padding: 4px;\n border-radius: 15px;\n font-family: ", ";\n font-weight: 600;\n font-size: 14px;\n line-height: 19px;\n color: ", ";\n\n &.status-CA,\n &.status-IE {\n background-color: ", ";\n }\n\n &.status-R,\n &.status-AS,\n &.status-PA {\n background-color: ", ";\n }\n\n &.status-AA,\n &.status-AP,\n &.status-ACA,\n &.status-AC {\n background-color: ", ";\n }\n\n &.status-RA,\n &.status-RC,\n &.status-RP,\n &.status-RCA {\n background-color: ", ";\n }\n\n &.status-Dat,\n &.status-Dsc,\n &.status-Imgs {\n background-color: ", ";\n }\n\n &.status-Ex {\n background-color: ", ";\n }\n\n &.status-DDI {\n background-color: ", ";\n }\n\n &.status-GLD {\n background-color: ", ";\n }\n\n &.status-TAB {\n background-color: ", ";\n }\n\n &.status-Pt {\n background-color: ", ";\n color: ", ";\n }\n"])), _variables.GlobalColors.s3, _variables.FontFamily.AvenirNext, function (backgroundColor) {
19
- return backgroundColor === "s2" || backgroundColor === "s1" ? _variables.GlobalColors.s4 : _variables.GlobalColors.white;
20
- }, _variables.GlobalColors.in_progress, _variables.GlobalColors.reception, _variables.GlobalColors.finished, _variables.GlobalColors.rejected_status, _variables.GlobalColors.s4, _variables.GlobalColors.exported, _variables.GlobalColors.original_purpura, _variables.GlobalColors.in_progress, _variables.GlobalColors.deep_gray, _variables.GlobalColors.s2, _variables.GlobalColors.s4);
18
+ var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n background-color: ", ";\n width: fit-content;\n height: 27px;\n padding: 4px;\n border-radius: 15px;\n font-family: ", ";\n font-weight: 600;\n font-size: 14px;\n line-height: 19px;\n color: ", ";\n"])), function (props) {
19
+ return props.percentageRequired >= 100 ? _variables.GlobalColors.color_pink : _variables.GlobalColors.s3;
20
+ }, _variables.FontFamily.AvenirNext, _variables.GlobalColors.white);
21
21
 
22
22
  exports.Container = Container;
23
23
 
24
24
  var ContainerIcon = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n cursor: pointer;\n @font-face {\n font-family: \"Material Symbols Outlined\";\n font-style: normal;\n font-weight: 100 700;\n src: url(https://fonts.gstatic.com/s/materialsymbolsoutlined/v68/kJEhBvYX7BgnkSrUwT8OhrdQw4oELdPIeeII9v6oFsLjBuVY.woff2)\n format(\"woff2\");\n }\n\n .hola {\n font-family: \"Material Symbols Outlined\";\n font-size: 30px;\n //line-height: 1;\n margin-top: 10px;\n }\n .hola {\n font-variation-settings: \"FILL\"\n ", ",\n \"wght\" 400, \"GRAD\" 0, \"opsz\" 48;\n color: ", ";\n }\n"])), function (props) {
25
25
  return props.percentageRequired < 100 ? 0 : 1;
26
26
  }, function (props) {
27
- return props.percentageRequired < 100 ? "#d4d1d7" : "#e33aa9";
27
+ return props.percentageRequired < 100 ? "#d4d1d7" : _variables.GlobalColors.color_pink;
28
28
  });
29
29
 
30
30
  exports.ContainerIcon = ContainerIcon;
@@ -7,13 +7,28 @@ exports.Status = void 0;
7
7
 
8
8
  var _styles = require("./styles");
9
9
 
10
+ var _statusDictionary = require("../../../global-files/statusDictionary");
11
+
10
12
  var _jsxRuntime = require("react/jsx-runtime");
11
13
 
14
+ var getStatusName = function getStatusName(statusType) {
15
+ if (!statusType) return null;
16
+ var parts = statusType.split("/");
17
+ var names = parts.map(function (key) {
18
+ var _STATUS_DICTIONARY$ke;
19
+
20
+ return (_STATUS_DICTIONARY$ke = _statusDictionary.STATUS_DICTIONARY[key]) === null || _STATUS_DICTIONARY$ke === void 0 ? void 0 : _STATUS_DICTIONARY$ke.name;
21
+ }).filter(Boolean);
22
+ return names.length > 0 ? names.join(" / ") : null;
23
+ };
24
+
12
25
  var Status = function Status(_ref) {
13
26
  var statusType = _ref.statusType,
14
27
  ovalForm = _ref.ovalForm;
28
+ var tooltipLabel = getStatusName(statusType);
15
29
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Container, {
16
- className: "status-".concat(statusType === null || statusType === void 0 ? void 0 : statusType.replace(/\/.*/, ""), " ").concat(ovalForm && "oval-form"),
30
+ className: "status-".concat(statusType === null || statusType === void 0 ? void 0 : statusType.replace(/\/.*/, ""), " ").concat(ovalForm ? "oval-form" : ""),
31
+ "data-tooltip": tooltipLabel,
17
32
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
18
33
  children: statusType !== null && statusType !== void 0 ? statusType : "NS"
19
34
  })
@@ -15,6 +15,6 @@ var _variables = require("../../../global-files/variables");
15
15
 
16
16
  var _templateObject;
17
17
 
18
- var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: fit-content;\n padding: 0 10px;\n height: 20px;\n background-color: ", ";\n border-radius: 3px;\n\n p {\n text-align: center;\n color: ", ";\n font-family: ", ";\n font-size: 12px;\n line-height: 20px;\n }\n\n &.status-CA,\n &.status-IE {\n background-color: ", ";\n }\n\n &.status-R,\n &.status-AS,\n &.status-SAC,\n &.status-PA {\n background-color: ", ";\n }\n\n &.status-AA,\n &.status-AP,\n &.status-AC,\n &.status-AAC,\n &.status-ACA {\n background-color: ", ";\n }\n\n &.status-RA,\n &.status-RC,\n &.status-RP,\n &.status-RAC,\n &.status-RCA {\n background-color: ", ";\n }\n\n &.status-Dat,\n &.status-Dsc,\n &.status-Imgs {\n background-color: ", ";\n }\n\n &.status-FAP,\n &.status-Ex {\n background-color: ", ";\n }\n\n &.status-DDI {\n background-color: ", ";\n }\n\n &.status-GLD {\n background-color: ", ";\n }\n\n &.status-TAB {\n background-color: ", ";\n }\n\n &.status-Pt {\n background-color: ", ";\n color: ", ";\n }\n\n &.oval-form {\n border-radius: 10px;\n }\n"])), _variables.GlobalColors.s3, _variables.GlobalColors.white, _variables.FontFamily.Lato, _variables.GlobalColors.in_progress, _variables.GlobalColors.reception, _variables.GlobalColors.finished, _variables.GlobalColors.rejected_status, _variables.GlobalColors.s4, _variables.GlobalColors.exported, _variables.GlobalColors.original_purpura, _variables.GlobalColors.in_progress, _variables.GlobalColors.deep_gray, _variables.GlobalColors.s2, _variables.GlobalColors.s4);
18
+ var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n width: fit-content;\n padding: 0 10px;\n height: 20px;\n background-color: ", ";\n border-radius: 3px;\n cursor: default;\n\n p {\n text-align: center;\n color: ", ";\n font-family: ", ";\n font-size: 12px;\n line-height: 20px;\n }\n\n &[data-tooltip]::after {\n content: attr(data-tooltip);\n position: absolute;\n bottom: calc(100% + 7px);\n left: 50%;\n transform: translateX(-50%) translateY(4px);\n background-color: ", ";\n color: ", ";\n font-family: ", ";\n font-size: 11px;\n font-weight: 600;\n padding: 4px 10px;\n border-radius: 6px;\n white-space: nowrap;\n z-index: 200;\n pointer-events: none;\n opacity: 0;\n visibility: hidden;\n transition: opacity 0.18s ease, transform 0.18s ease;\n }\n\n &[data-tooltip]::before {\n content: \"\";\n position: absolute;\n bottom: calc(100% + 1px);\n left: 50%;\n transform: translateX(-50%) translateY(4px);\n border: 6px solid transparent;\n border-top-color: ", ";\n z-index: 200;\n pointer-events: none;\n opacity: 0;\n visibility: hidden;\n transition: opacity 0.18s ease, transform 0.18s ease;\n }\n\n &[data-tooltip]:hover::after,\n &[data-tooltip]:hover::before {\n opacity: 1;\n visibility: visible;\n transform: translateX(-50%) translateY(0);\n }\n\n &.status-CA[data-tooltip]::after,\n &.status-IE[data-tooltip]::after {\n background-color: ", ";\n }\n &.status-CA[data-tooltip]::before,\n &.status-IE[data-tooltip]::before {\n border-top-color: ", ";\n }\n\n &.status-R[data-tooltip]::after,\n &.status-AS[data-tooltip]::after,\n &.status-SAC[data-tooltip]::after,\n &.status-PA[data-tooltip]::after {\n background-color: ", ";\n }\n &.status-R[data-tooltip]::before,\n &.status-AS[data-tooltip]::before,\n &.status-SAC[data-tooltip]::before,\n &.status-PA[data-tooltip]::before {\n border-top-color: ", ";\n }\n\n &.status-AA[data-tooltip]::after,\n &.status-AP[data-tooltip]::after,\n &.status-AC[data-tooltip]::after,\n &.status-AAC[data-tooltip]::after,\n &.status-ACA[data-tooltip]::after {\n background-color: ", ";\n }\n &.status-AA[data-tooltip]::before,\n &.status-AP[data-tooltip]::before,\n &.status-AC[data-tooltip]::before,\n &.status-AAC[data-tooltip]::before,\n &.status-ACA[data-tooltip]::before {\n border-top-color: ", ";\n }\n\n &.status-RA[data-tooltip]::after,\n &.status-RC[data-tooltip]::after,\n &.status-RP[data-tooltip]::after,\n &.status-RAC[data-tooltip]::after,\n &.status-RCA[data-tooltip]::after {\n background-color: ", ";\n }\n &.status-RA[data-tooltip]::before,\n &.status-RC[data-tooltip]::before,\n &.status-RP[data-tooltip]::before,\n &.status-RAC[data-tooltip]::before,\n &.status-RCA[data-tooltip]::before {\n border-top-color: ", ";\n }\n\n &.status-FAP[data-tooltip]::after,\n &.status-Ex[data-tooltip]::after {\n background-color: ", ";\n }\n &.status-FAP[data-tooltip]::before,\n &.status-Ex[data-tooltip]::before {\n border-top-color: ", ";\n }\n\n &.status-DDI[data-tooltip]::after {\n background-color: ", ";\n }\n &.status-DDI[data-tooltip]::before {\n border-top-color: ", ";\n }\n\n &.status-CA,\n &.status-IE {\n background-color: ", ";\n }\n\n &.status-R,\n &.status-AS,\n &.status-SAC,\n &.status-PA {\n background-color: ", ";\n }\n\n &.status-AA,\n &.status-AP,\n &.status-AC,\n &.status-AAC,\n &.status-ACA {\n background-color: ", ";\n }\n\n &.status-RA,\n &.status-RC,\n &.status-RP,\n &.status-RAC,\n &.status-RCA {\n background-color: ", ";\n }\n\n &.status-Dat,\n &.status-Dsc,\n &.status-Imgs {\n background-color: ", ";\n }\n\n &.status-FAP,\n &.status-Ex {\n background-color: ", ";\n }\n\n &.status-DDI {\n background-color: ", ";\n }\n\n &.status-GLD {\n background-color: ", ";\n }\n\n &.status-TAB {\n background-color: ", ";\n }\n\n &.status-Pt {\n background-color: ", ";\n color: ", ";\n }\n\n &.oval-form {\n border-radius: 10px;\n }\n"])), _variables.GlobalColors.s3, _variables.GlobalColors.white, _variables.FontFamily.Lato, _variables.GlobalColors.s3, _variables.GlobalColors.white, _variables.FontFamily.Lato, _variables.GlobalColors.s3, _variables.GlobalColors.in_progress, _variables.GlobalColors.in_progress, _variables.GlobalColors.reception, _variables.GlobalColors.reception, _variables.GlobalColors.finished, _variables.GlobalColors.finished, _variables.GlobalColors.rejected_status, _variables.GlobalColors.rejected_status, _variables.GlobalColors.exported, _variables.GlobalColors.exported, _variables.GlobalColors.original_purpura, _variables.GlobalColors.original_purpura, _variables.GlobalColors.in_progress, _variables.GlobalColors.reception, _variables.GlobalColors.finished, _variables.GlobalColors.rejected_status, _variables.GlobalColors.s4, _variables.GlobalColors.exported, _variables.GlobalColors.original_purpura, _variables.GlobalColors.in_progress, _variables.GlobalColors.deep_gray, _variables.GlobalColors.s2, _variables.GlobalColors.s4);
19
19
 
20
20
  exports.Container = Container;
@@ -11,6 +11,10 @@ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"))
11
11
 
12
12
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/asyncToGenerator"));
13
13
 
14
+ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/toConsumableArray"));
15
+
16
+ var _createForOfIteratorHelper2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/createForOfIteratorHelper"));
17
+
14
18
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/slicedToArray"));
15
19
 
16
20
  var _react = require("react");
@@ -43,29 +47,10 @@ var _axios = _interopRequireDefault(require("axios"));
43
47
 
44
48
  var _jsxRuntime = require("react/jsx-runtime");
45
49
 
46
- var statusOptions = [{
47
- value: "PA",
48
- label: "Por Asignar"
49
- }, {
50
- value: "AS",
51
- label: "Asignado"
52
- }, {
53
- value: "AC",
54
- label: "Aprobado Coordinador"
55
- }, {
56
- value: "AP",
57
- label: "Aprobado Proveedor"
58
- }, {
59
- value: "R",
60
- label: "Rechazado"
61
- }, {
62
- value: "RP",
63
- label: "Rechazo Pendiente"
64
- }];
65
50
  var availableServices = ["description", "datasheet", "images"];
66
51
 
67
52
  var ChangeStatusModal = function ChangeStatusModal(_ref) {
68
- var _state$product9, _state$product10, _state$product10$cate, _state$product$servic, _state$product11, _state$product$servic2, _state$product12;
53
+ var _ref2, _serviceStatusObj$nam, _state$product10, _ref4, _serviceStatusObj$nam2, _ref5, _serviceStatusObj$nam3, _state$product11, _state$product11$cate, _state$product$servic, _state$product12, _state$product$servic2, _state$product13;
69
54
 
70
55
  var state = _ref.state,
71
56
  open = _ref.open,
@@ -115,7 +100,113 @@ var ChangeStatusModal = function ChangeStatusModal(_ref) {
115
100
  currentStatusObj = _useState16[0],
116
101
  setCurrentStatusObj = _useState16[1];
117
102
 
118
- var isStatusValid = newStatus !== "" && newStatus !== currentStatusObj.label;
103
+ var getServiceStatusStr = function getServiceStatusStr(retailerId, service) {
104
+ var _state$product, _sbyR$retailerId$serv, _sbyR$retailerId;
105
+
106
+ var sbyR = state === null || state === void 0 ? void 0 : (_state$product = state.product) === null || _state$product === void 0 ? void 0 : _state$product.statusByRetailer;
107
+ if (!sbyR) return null;
108
+
109
+ if (Array.isArray(sbyR)) {
110
+ var _sbyR$find$status, _sbyR$find;
111
+
112
+ return (_sbyR$find$status = (_sbyR$find = sbyR.find(function (item) {
113
+ return item.retailer_id === retailerId && item.service === service;
114
+ })) === null || _sbyR$find === void 0 ? void 0 : _sbyR$find.status) !== null && _sbyR$find$status !== void 0 ? _sbyR$find$status : null;
115
+ }
116
+
117
+ return (_sbyR$retailerId$serv = (_sbyR$retailerId = sbyR[retailerId]) === null || _sbyR$retailerId === void 0 ? void 0 : _sbyR$retailerId[service]) !== null && _sbyR$retailerId$serv !== void 0 ? _sbyR$retailerId$serv : null;
118
+ };
119
+
120
+ var serviceStatusObj = function () {
121
+ if (scope !== "service" || selectedChains.length !== 1 || selectedServices.length !== 1) return null;
122
+ var statusStr = getServiceStatusStr(selectedChains[0], selectedServices[0]);
123
+ var statusKey = statusStr === null || statusStr === void 0 ? void 0 : statusStr.split("/").pop();
124
+ return statusKey ? _statusDictionary.STATUS_DICTIONARY[statusKey] : null;
125
+ }(); // Statuses for multi-service/chain selection (when not exactly 1+1)
126
+
127
+
128
+ var multiServiceStatuses = function () {
129
+ if (scope !== "service" || selectedChains.length === 0 || selectedServices.length === 0) return [];
130
+ if (selectedChains.length === 1 && selectedServices.length === 1) return [];
131
+ var results = [];
132
+
133
+ var _iterator = (0, _createForOfIteratorHelper2.default)(selectedChains),
134
+ _step;
135
+
136
+ try {
137
+ var _loop = function _loop() {
138
+ var _availableRetailers$f, _availableRetailers$f2;
139
+
140
+ var chainId = _step.value;
141
+ var chainName = (_availableRetailers$f = (_availableRetailers$f2 = availableRetailers.find(function (r) {
142
+ return r.id_retailer === chainId;
143
+ })) === null || _availableRetailers$f2 === void 0 ? void 0 : _availableRetailers$f2.name) !== null && _availableRetailers$f !== void 0 ? _availableRetailers$f : chainId;
144
+
145
+ var _iterator2 = (0, _createForOfIteratorHelper2.default)(selectedServices),
146
+ _step2;
147
+
148
+ try {
149
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
150
+ var service = _step2.value;
151
+ var statusStr = getServiceStatusStr(chainId, service);
152
+ var statusKey = statusStr === null || statusStr === void 0 ? void 0 : statusStr.split("/").pop();
153
+ var statusObj = statusKey ? _statusDictionary.STATUS_DICTIONARY[statusKey] : null;
154
+
155
+ if (statusObj) {
156
+ results.push({
157
+ chainId: chainId,
158
+ chainName: chainName,
159
+ service: service,
160
+ statusName: statusObj.name
161
+ });
162
+ }
163
+ }
164
+ } catch (err) {
165
+ _iterator2.e(err);
166
+ } finally {
167
+ _iterator2.f();
168
+ }
169
+ };
170
+
171
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
172
+ _loop();
173
+ }
174
+ } catch (err) {
175
+ _iterator.e(err);
176
+ } finally {
177
+ _iterator.f();
178
+ }
179
+
180
+ return results;
181
+ }(); // If all selected services share the same status, block it; otherwise null
182
+
183
+
184
+ var multiAllSameStatus = function () {
185
+ if (multiServiceStatuses.length === 0) return null;
186
+ var names = (0, _toConsumableArray2.default)(new Set(multiServiceStatuses.map(function (s) {
187
+ return s.statusName;
188
+ })));
189
+ return names.length === 1 ? names[0] : null;
190
+ }(); // Map statusName -> owner labels to show below each pill when statuses differ
191
+
192
+
193
+ var statusOwnerMap = function () {
194
+ if (multiServiceStatuses.length === 0 || multiAllSameStatus !== null) return {};
195
+
196
+ var serviceLabel = function serviceLabel(service) {
197
+ return service === "description" ? "Descripciones" : service === "datasheet" ? "Ficha Técnica" : "Imágenes";
198
+ };
199
+
200
+ return multiServiceStatuses.reduce(function (acc, item) {
201
+ if (!acc[item.statusName]) acc[item.statusName] = [];
202
+ var label = selectedChains.length > 1 ? "".concat(item.chainName, ": ").concat(serviceLabel(item.service)) : serviceLabel(item.service);
203
+ acc[item.statusName].push(label);
204
+ return acc;
205
+ }, {});
206
+ }();
207
+
208
+ var disabledStatusName = scope === "service" ? (_ref2 = (_serviceStatusObj$nam = serviceStatusObj === null || serviceStatusObj === void 0 ? void 0 : serviceStatusObj.name) !== null && _serviceStatusObj$nam !== void 0 ? _serviceStatusObj$nam : multiAllSameStatus) !== null && _ref2 !== void 0 ? _ref2 : null : currentStatusObj === null || currentStatusObj === void 0 ? void 0 : currentStatusObj.name;
209
+ var isStatusValid = newStatus !== "" && newStatus !== disabledStatusName;
119
210
  var isCommentValid = comment.trim().length > 0;
120
211
  var isScopeValid = false;
121
212
  if (scope === "product") isScopeValid = true;
@@ -130,8 +221,8 @@ var ChangeStatusModal = function ChangeStatusModal(_ref) {
130
221
  };
131
222
 
132
223
  var handleSubmit = /*#__PURE__*/function () {
133
- var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
134
- var _state$product, _state$product2, _state$product3, _state$product4, _availableRetailers$f, _state$product5;
224
+ var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
225
+ var _state$product2, _state$product3, _state$product4, _state$product5, _availableRetailers$f3, _state$product6;
135
226
 
136
227
  var upc, article_id, order_id, version, retailers_selected, services_selected, old_status, new_status, commentary, payload, response;
137
228
  return _regenerator.default.wrap(function _callee$(_context) {
@@ -147,20 +238,20 @@ var ChangeStatusModal = function ChangeStatusModal(_ref) {
147
238
 
148
239
  case 2:
149
240
  setIsSubmitting(true);
150
- upc = state === null || state === void 0 ? void 0 : (_state$product = state.product) === null || _state$product === void 0 ? void 0 : _state$product.upc;
151
- article_id = state === null || state === void 0 ? void 0 : (_state$product2 = state.product) === null || _state$product2 === void 0 ? void 0 : _state$product2.id_article;
152
- order_id = state === null || state === void 0 ? void 0 : (_state$product3 = state.product) === null || _state$product3 === void 0 ? void 0 : _state$product3.id_order;
153
- version = state === null || state === void 0 ? void 0 : (_state$product4 = state.product) === null || _state$product4 === void 0 ? void 0 : _state$product4.version;
154
- retailers_selected = availableRetailers === null || availableRetailers === void 0 ? void 0 : (_availableRetailers$f = availableRetailers.filter(function (retailer) {
241
+ upc = state === null || state === void 0 ? void 0 : (_state$product2 = state.product) === null || _state$product2 === void 0 ? void 0 : _state$product2.upc;
242
+ article_id = state === null || state === void 0 ? void 0 : (_state$product3 = state.product) === null || _state$product3 === void 0 ? void 0 : _state$product3.id_article;
243
+ order_id = state === null || state === void 0 ? void 0 : (_state$product4 = state.product) === null || _state$product4 === void 0 ? void 0 : _state$product4.id_order;
244
+ version = state === null || state === void 0 ? void 0 : (_state$product5 = state.product) === null || _state$product5 === void 0 ? void 0 : _state$product5.version;
245
+ retailers_selected = availableRetailers === null || availableRetailers === void 0 ? void 0 : (_availableRetailers$f3 = availableRetailers.filter(function (retailer) {
155
246
  return selectedChains === null || selectedChains === void 0 ? void 0 : selectedChains.includes(retailer.id_retailer);
156
- })) === null || _availableRetailers$f === void 0 ? void 0 : _availableRetailers$f.map(function (retailer) {
247
+ })) === null || _availableRetailers$f3 === void 0 ? void 0 : _availableRetailers$f3.map(function (retailer) {
157
248
  return {
158
249
  id: retailer === null || retailer === void 0 ? void 0 : retailer.id_retailer,
159
250
  name: retailer === null || retailer === void 0 ? void 0 : retailer.name
160
251
  };
161
252
  });
162
253
  services_selected = selectedServices;
163
- old_status = state === null || state === void 0 ? void 0 : (_state$product5 = state.product) === null || _state$product5 === void 0 ? void 0 : _state$product5.status;
254
+ old_status = state === null || state === void 0 ? void 0 : (_state$product6 = state.product) === null || _state$product6 === void 0 ? void 0 : _state$product6.status;
164
255
  new_status = Object.values(_statusDictionary.STATUS_DICTIONARY).find(function (status) {
165
256
  return status.name === newStatus;
166
257
  }).status;
@@ -177,9 +268,9 @@ var ChangeStatusModal = function ChangeStatusModal(_ref) {
177
268
  };
178
269
  }) : retailers_selected,
179
270
  services: scope !== "service" ? Object.keys(state === null || state === void 0 ? void 0 : state.product.services).filter(function (service) {
180
- var _state$product6;
271
+ var _state$product7;
181
272
 
182
- return !!(state !== null && state !== void 0 && (_state$product6 = state.product) !== null && _state$product6 !== void 0 && _state$product6.services[service]);
273
+ return !!(state !== null && state !== void 0 && (_state$product7 = state.product) !== null && _state$product7 !== void 0 && _state$product7.services[service]);
183
274
  }).map(function (service) {
184
275
  return service.replace("datasheets", "datasheet").replace("descriptions", "description");
185
276
  }) : services_selected,
@@ -209,16 +300,17 @@ var ChangeStatusModal = function ChangeStatusModal(_ref) {
209
300
  }));
210
301
 
211
302
  return function handleSubmit() {
212
- return _ref2.apply(this, arguments);
303
+ return _ref3.apply(this, arguments);
213
304
  };
214
305
  }();
215
306
 
216
307
  (0, _react.useEffect)(function () {
217
- var _state$product7, _state$product8;
308
+ var _state$product8, _state$product8$statu, _state$product9;
218
309
 
219
310
  if (!state) return;
220
- setCurrentStatusObj(_statusDictionary.STATUS_DICTIONARY[state === null || state === void 0 ? void 0 : (_state$product7 = state.product) === null || _state$product7 === void 0 ? void 0 : _state$product7.status]);
221
- setAvailableRetailers((state === null || state === void 0 ? void 0 : (_state$product8 = state.product) === null || _state$product8 === void 0 ? void 0 : _state$product8.categoryRetailerInOrder) || []);
311
+ var statusKey = state === null || state === void 0 ? void 0 : (_state$product8 = state.product) === null || _state$product8 === void 0 ? void 0 : (_state$product8$statu = _state$product8.status) === null || _state$product8$statu === void 0 ? void 0 : _state$product8$statu.split("/").pop();
312
+ setCurrentStatusObj(_statusDictionary.STATUS_DICTIONARY[statusKey]);
313
+ setAvailableRetailers((state === null || state === void 0 ? void 0 : (_state$product9 = state.product) === null || _state$product9 === void 0 ? void 0 : _state$product9.categoryRetailerInOrder) || []);
222
314
  }, [state]);
223
315
  var selectMenuProps = {
224
316
  PaperProps: {
@@ -247,7 +339,7 @@ var ChangeStatusModal = function ChangeStatusModal(_ref) {
247
339
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("h2", {
248
340
  children: "Cambio de Estatus"
249
341
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("p", {
250
- children: state === null || state === void 0 ? void 0 : (_state$product9 = state.product) === null || _state$product9 === void 0 ? void 0 : _state$product9.name
342
+ children: state === null || state === void 0 ? void 0 : (_state$product10 = state.product) === null || _state$product10 === void 0 ? void 0 : _state$product10.name
251
343
  })]
252
344
  })]
253
345
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.MainSection, {
@@ -432,26 +524,47 @@ var ChangeStatusModal = function ChangeStatusModal(_ref) {
432
524
  })
433
525
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Section, {
434
526
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.SectionTitle, {
435
- children: "Estatus actual:"
527
+ children: "Estatus actual del producto:"
436
528
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.StatusPill, {
437
- label: currentStatusObj === null || currentStatusObj === void 0 ? void 0 : currentStatusObj.name,
529
+ label: (_ref4 = (_serviceStatusObj$nam2 = serviceStatusObj === null || serviceStatusObj === void 0 ? void 0 : serviceStatusObj.name) !== null && _serviceStatusObj$nam2 !== void 0 ? _serviceStatusObj$nam2 : multiAllSameStatus) !== null && _ref4 !== void 0 ? _ref4 : currentStatusObj === null || currentStatusObj === void 0 ? void 0 : currentStatusObj.name,
438
530
  selected: false,
439
531
  disabled: true
440
532
  })]
441
533
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Section, {
442
534
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.SectionTitle, {
443
535
  children: "Nuevo estatus:"
444
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.StatusGrid, {
445
- children: Object.values(_statusDictionary.STATUS_DICTIONARY).map(function (status) {
446
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.StatusPill, {
447
- label: status.name,
448
- disabled: status.name === (currentStatusObj === null || currentStatusObj === void 0 ? void 0 : currentStatusObj.name),
449
- selected: status.name === newStatus,
450
- onClick: function onClick() {
451
- return status.name !== (currentStatusObj === null || currentStatusObj === void 0 ? void 0 : currentStatusObj.name) && setNewStatus(status.name);
452
- }
453
- }, status.name);
454
- })
536
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.StatusGridWrapper, {
537
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.StatusGrid, {
538
+ children: Object.values(_statusDictionary.STATUS_DICTIONARY).map(function (status) {
539
+ var ownerLabels = statusOwnerMap[status.name];
540
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
541
+ style: {
542
+ display: "flex",
543
+ flexDirection: "column",
544
+ alignItems: "flex-start",
545
+ gap: 4
546
+ },
547
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.StatusPill, {
548
+ label: status.name,
549
+ disabled: status.name === disabledStatusName,
550
+ selected: status.name === newStatus,
551
+ onClick: function onClick() {
552
+ return status.name !== disabledStatusName && setNewStatus(status.name);
553
+ }
554
+ }), (ownerLabels === null || ownerLabels === void 0 ? void 0 : ownerLabels.length) > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
555
+ style: {
556
+ fontSize: "0.68rem",
557
+ color: _styles.colors.primary,
558
+ fontFamily: "Raleway, sans-serif",
559
+ paddingLeft: 2
560
+ },
561
+ children: ownerLabels.join(", ")
562
+ })]
563
+ }, status.name);
564
+ })
565
+ }), !isScopeValid && /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.StatusGridOverlay, {
566
+ children: scope === "retailer" ? "Selecciona una cadena para continuar" : "Selecciona una cadena y un servicio para continuar"
567
+ })]
455
568
  })]
456
569
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Section, {
457
570
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.SectionTitle, {
@@ -483,7 +596,7 @@ var ChangeStatusModal = function ChangeStatusModal(_ref) {
483
596
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
484
597
  className: "status-flow",
485
598
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.StatusPill, {
486
- label: currentStatusObj === null || currentStatusObj === void 0 ? void 0 : currentStatusObj.name,
599
+ label: (_ref5 = (_serviceStatusObj$nam3 = serviceStatusObj === null || serviceStatusObj === void 0 ? void 0 : serviceStatusObj.name) !== null && _serviceStatusObj$nam3 !== void 0 ? _serviceStatusObj$nam3 : multiAllSameStatus) !== null && _ref5 !== void 0 ? _ref5 : currentStatusObj === null || currentStatusObj === void 0 ? void 0 : currentStatusObj.name,
487
600
  selected: false,
488
601
  disabled: true,
489
602
  size: "small"
@@ -502,11 +615,11 @@ var ChangeStatusModal = function ChangeStatusModal(_ref) {
502
615
  children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
503
616
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Link.default, {
504
617
  fontSize: "small"
505
- }), scope === "product" ? state === null || state === void 0 ? void 0 : (_state$product10 = state.product) === null || _state$product10 === void 0 ? void 0 : (_state$product10$cate = _state$product10.categoryRetailerInOrder) === null || _state$product10$cate === void 0 ? void 0 : _state$product10$cate.length : selectedChains.length, " ", "cadena(s)"]
618
+ }), scope === "product" ? state === null || state === void 0 ? void 0 : (_state$product11 = state.product) === null || _state$product11 === void 0 ? void 0 : (_state$product11$cate = _state$product11.categoryRetailerInOrder) === null || _state$product11$cate === void 0 ? void 0 : _state$product11$cate.length : selectedChains.length, " ", "cadena(s)"]
506
619
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
507
620
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_BuildOutlined.default, {
508
621
  fontSize: "small"
509
- }), scope === "service" ? selectedServices.length : Object.values((_state$product$servic = state === null || state === void 0 ? void 0 : (_state$product11 = state.product) === null || _state$product11 === void 0 ? void 0 : _state$product11.services) !== null && _state$product$servic !== void 0 ? _state$product$servic : {}) ? Object.values((_state$product$servic2 = state === null || state === void 0 ? void 0 : (_state$product12 = state.product) === null || _state$product12 === void 0 ? void 0 : _state$product12.services) !== null && _state$product$servic2 !== void 0 ? _state$product$servic2 : {}).filter(function (service) {
622
+ }), scope === "service" ? selectedServices.length : Object.values((_state$product$servic = state === null || state === void 0 ? void 0 : (_state$product12 = state.product) === null || _state$product12 === void 0 ? void 0 : _state$product12.services) !== null && _state$product$servic !== void 0 ? _state$product$servic : {}) ? Object.values((_state$product$servic2 = state === null || state === void 0 ? void 0 : (_state$product13 = state.product) === null || _state$product13 === void 0 ? void 0 : _state$product13.services) !== null && _state$product$servic2 !== void 0 ? _state$product$servic2 : {}).filter(function (service) {
510
623
  return !!service;
511
624
  }).length : "No es un array", "\xA0servicios"]
512
625
  })]
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.colors = exports.StyledTextArea = exports.StyledSelect = exports.StyledFormControl = exports.StyledDialog = exports.StatusPill = exports.StatusGrid = exports.SectionTitle = exports.Section = exports.ScopeButtonGroup = exports.ScopeButton = exports.ModalHeader = exports.MainSection = exports.ImpactSummary = exports.HelperText = exports.FooterActions = exports.BadgeCircle = exports.ActionButton = void 0;
8
+ exports.colors = exports.StyledTextArea = exports.StyledSelect = exports.StyledFormControl = exports.StyledDialog = exports.StatusPill = exports.StatusGridWrapper = exports.StatusGridOverlay = exports.StatusGrid = exports.SectionTitle = exports.Section = exports.ScopeButtonGroup = exports.ScopeButton = exports.ModalHeader = exports.MainSection = exports.ImpactSummary = exports.HelperText = exports.FooterActions = exports.BadgeCircle = exports.ActionButton = void 0;
9
9
 
10
10
  var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/taggedTemplateLiteral"));
11
11
 
@@ -13,7 +13,7 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
13
13
 
14
14
  var _material = require("@mui/material");
15
15
 
16
- var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17;
16
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19;
17
17
 
18
18
  var colors = {
19
19
  background: 'rgba(0, 0, 0, 0.4)',
@@ -71,15 +71,19 @@ var StatusPill = (0, _styledComponents.default)(_material.Chip)(_templateObject1
71
71
  exports.StatusPill = StatusPill;
72
72
  var StatusGrid = (0, _styledComponents.default)(_material.Box)(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-wrap: wrap;\n gap: 12px;\n"])));
73
73
  exports.StatusGrid = StatusGrid;
74
- var StyledTextArea = (0, _styledComponents.default)(_material.TextField)(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2.default)(["\n && {\n width: 100%;\n background-color: ", ";\n border-radius: 8px;\n\n .MuiOutlinedInput-root {\n font-size: 14px;\n font-family: \"Raleway\", sans-serif;\n color: ", ";\n fieldset {\n border-color: ", ";\n }\n &:hover fieldset {\n border-color: #BDBDBD;\n }\n &.Mui-focused fieldset {\n border-color: ", ";\n }\n }\n }\n"])), colors.inputBg, colors.textMain, colors.border, colors.primary);
74
+ var StatusGridWrapper = (0, _styledComponents.default)(_material.Box)(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n"])));
75
+ exports.StatusGridWrapper = StatusGridWrapper;
76
+ var StatusGridOverlay = (0, _styledComponents.default)(_material.Box)(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n inset: -8px -4px;\n background: rgba(255, 255, 255, 0.82);\n backdrop-filter: blur(1px);\n border-radius: 8px;\n display: flex;\n align-items: center;\n justify-content: center;\n font-family: \"Raleway\", sans-serif;\n font-size: 13px;\n font-weight: 600;\n color: rgba(0, 0, 0, 0.45);\n pointer-events: none;\n"])));
77
+ exports.StatusGridOverlay = StatusGridOverlay;
78
+ var StyledTextArea = (0, _styledComponents.default)(_material.TextField)(_templateObject14 || (_templateObject14 = (0, _taggedTemplateLiteral2.default)(["\n && {\n width: 100%;\n background-color: ", ";\n border-radius: 8px;\n\n .MuiOutlinedInput-root {\n font-size: 14px;\n font-family: \"Raleway\", sans-serif;\n color: ", ";\n fieldset {\n border-color: ", ";\n }\n &:hover fieldset {\n border-color: #BDBDBD;\n }\n &.Mui-focused fieldset {\n border-color: ", ";\n }\n }\n }\n"])), colors.inputBg, colors.textMain, colors.border, colors.primary);
75
79
  exports.StyledTextArea = StyledTextArea;
76
- var StyledSelect = (0, _styledComponents.default)(_material.Select)(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2.default)(["\n && {\n width: 100%;\n background-color: ", ";\n border-radius: 5px;\n font-family: \"Raleway\", sans-serif;\n font-size: 0.85rem;\n margin-bottom: 12px;\n\n .MuiSelect-select {\n padding: 8px 12px;\n display: flex;\n align-items: center;\n min-height: auto !important;\n }\n\n .MuiOutlinedInput-notchedOutline {\n border-color: ", ";\n }\n &:hover .MuiOutlinedInput-notchedOutline {\n border-color: #BDBDBD;\n }\n &.Mui-focused .MuiOutlinedInput-notchedOutline {\n border-color: ", ";\n }\n\n .MuiSvgIcon-root {\n color: ", ";\n font-size: 1.2rem;\n }\n }\n"])), colors.inputBg, colors.border, colors.primary, colors.textMuted);
80
+ var StyledSelect = (0, _styledComponents.default)(_material.Select)(_templateObject15 || (_templateObject15 = (0, _taggedTemplateLiteral2.default)(["\n && {\n width: 100%;\n background-color: ", ";\n border-radius: 5px;\n font-family: \"Raleway\", sans-serif;\n font-size: 0.85rem;\n margin-bottom: 12px;\n\n .MuiSelect-select {\n padding: 8px 12px;\n display: flex;\n align-items: center;\n min-height: auto !important;\n }\n\n .MuiOutlinedInput-notchedOutline {\n border-color: ", ";\n }\n &:hover .MuiOutlinedInput-notchedOutline {\n border-color: #BDBDBD;\n }\n &.Mui-focused .MuiOutlinedInput-notchedOutline {\n border-color: ", ";\n }\n\n .MuiSvgIcon-root {\n color: ", ";\n font-size: 1.2rem;\n }\n }\n"])), colors.inputBg, colors.border, colors.primary, colors.textMuted);
77
81
  exports.StyledSelect = StyledSelect;
78
- var StyledFormControl = (0, _styledComponents.default)(_material.FormControl)(_templateObject14 || (_templateObject14 = (0, _taggedTemplateLiteral2.default)(["\n && {\n .MuiInputLabel-root {\n font-family: \"Raleway\", sans-serif;\n font-size: 0.85rem;\n color: ", ";\n transform: translate(14px, 10px) scale(1);\n\n &.MuiInputLabel-shrink {\n transform: translate(14px, -8px) scale(0.75);\n color: ", ";\n background-color: #fff;\n padding: 0 6px;\n }\n }\n }\n"])), colors.textMuted, colors.primary);
82
+ var StyledFormControl = (0, _styledComponents.default)(_material.FormControl)(_templateObject16 || (_templateObject16 = (0, _taggedTemplateLiteral2.default)(["\n && {\n .MuiInputLabel-root {\n font-family: \"Raleway\", sans-serif;\n font-size: 0.85rem;\n color: ", ";\n transform: translate(14px, 10px) scale(1);\n\n &.MuiInputLabel-shrink {\n transform: translate(14px, -8px) scale(0.75);\n color: ", ";\n background-color: #fff;\n padding: 0 6px;\n }\n }\n }\n"])), colors.textMuted, colors.primary);
79
83
  exports.StyledFormControl = StyledFormControl;
80
- var FooterActions = (0, _styledComponents.default)(_material.Box)(_templateObject15 || (_templateObject15 = (0, _taggedTemplateLiteral2.default)(["\n flex-shrink: 0;\n display: flex;\n justify-content: flex-end;\n gap: 16px;\n padding: 16px 32px;\n background-color: ", ";\n border-top: 1px solid ", ";\n"])), colors.paper, colors.border);
84
+ var FooterActions = (0, _styledComponents.default)(_material.Box)(_templateObject17 || (_templateObject17 = (0, _taggedTemplateLiteral2.default)(["\n flex-shrink: 0;\n display: flex;\n justify-content: flex-end;\n gap: 16px;\n padding: 16px 32px;\n background-color: ", ";\n border-top: 1px solid ", ";\n"])), colors.paper, colors.border);
81
85
  exports.FooterActions = FooterActions;
82
- var ActionButton = (0, _styledComponents.default)(_material.Button)(_templateObject16 || (_templateObject16 = (0, _taggedTemplateLiteral2.default)(["\n && {\n text-transform: none;\n font-family: \"Raleway-500\", \"Raleway\", sans-serif;\n padding: 4px 16px;\n border-radius: 5px;\n\n &.cancel {\n color: ", ";\n border: 1px solid ", ";\n &:hover {\n background-color: ", ";\n }\n }\n\n &.submit {\n background-color: ", ";\n color: #FFFFFF;\n &:hover {\n background-color: ", ";\n }\n &:disabled {\n opacity: 0.5;\n background-color: #CCCCCC;\n color: #888888;\n }\n }\n }\n"])), colors.textMain, colors.border, colors.summaryBg, colors.primary, colors.primaryHover);
86
+ var ActionButton = (0, _styledComponents.default)(_material.Button)(_templateObject18 || (_templateObject18 = (0, _taggedTemplateLiteral2.default)(["\n && {\n text-transform: none;\n font-family: \"Raleway-500\", \"Raleway\", sans-serif;\n padding: 4px 16px;\n border-radius: 5px;\n\n &.cancel {\n color: ", ";\n border: 1px solid ", ";\n &:hover {\n background-color: ", ";\n }\n }\n\n &.submit {\n background-color: ", ";\n color: #FFFFFF;\n &:hover {\n background-color: ", ";\n }\n &:disabled {\n opacity: 0.5;\n background-color: #CCCCCC;\n color: #888888;\n }\n }\n }\n"])), colors.textMain, colors.border, colors.summaryBg, colors.primary, colors.primaryHover);
83
87
  exports.ActionButton = ActionButton;
84
- var ImpactSummary = (0, _styledComponents.default)(_material.Box)(_templateObject17 || (_templateObject17 = (0, _taggedTemplateLiteral2.default)(["\n margin: 0 32px 32px;\n padding: 20px;\n background-color: ", ";\n border: 1px solid ", ";\n border-radius: 12px;\n\n .summary-title {\n font-family: \"Raleway-500\", \"Raleway\", sans-serif;\n font-size: 0.9rem;\n color: ", ";\n margin-bottom: 16px;\n display: block;\n }\n\n .status-flow {\n display: flex;\n align-items: center;\n gap: 12px;\n margin-bottom: 16px;\n color: ", ";\n }\n\n .impact-counts {\n display: flex;\n gap: 24px;\n color: ", ";\n font-size: 0.85rem;\n\n div {\n display: flex;\n align-items: center;\n gap: 8px;\n }\n }\n"])), colors.summaryBg, colors.border, colors.textMuted, colors.textMain, colors.textMuted);
88
+ var ImpactSummary = (0, _styledComponents.default)(_material.Box)(_templateObject19 || (_templateObject19 = (0, _taggedTemplateLiteral2.default)(["\n margin: 0 32px 32px;\n padding: 20px;\n background-color: ", ";\n border: 1px solid ", ";\n border-radius: 12px;\n\n .summary-title {\n font-family: \"Raleway-500\", \"Raleway\", sans-serif;\n font-size: 0.9rem;\n color: ", ";\n margin-bottom: 16px;\n display: block;\n }\n\n .status-flow {\n display: flex;\n align-items: center;\n gap: 12px;\n margin-bottom: 16px;\n color: ", ";\n }\n\n .impact-counts {\n display: flex;\n gap: 24px;\n color: ", ";\n font-size: 0.85rem;\n\n div {\n display: flex;\n align-items: center;\n gap: 8px;\n }\n }\n"])), colors.summaryBg, colors.border, colors.textMuted, colors.textMain, colors.textMuted);
85
89
  exports.ImpactSummary = ImpactSummary;
@@ -29,6 +29,8 @@ var _providerProductEdition = require("./provider-product-edition.reducer");
29
29
 
30
30
  var _axios = _interopRequireDefault(require("axios"));
31
31
 
32
+ var _utils = require("../utils");
33
+
32
34
  var _genericModalCheck = _interopRequireDefault(require("../../../../assets/images/genericModal/genericModalCheck.svg"));
33
35
 
34
36
  var _errorModal = _interopRequireDefault(require("../../../../assets/images/genericModal/errorModal.svg"));
@@ -573,7 +575,7 @@ var ProviderProductEditionProvider = function ProviderProductEditionProvider(_re
573
575
  while (1) {
574
576
  switch (_context5.prev = _context5.next) {
575
577
  case 0:
576
- concept = getConceptByTab(state.active_tab);
578
+ concept = (0, _utils.getConceptByTab)(state.active_tab);
577
579
  data = {
578
580
  articleId: (_state$product13 = state.product) === null || _state$product13 === void 0 ? void 0 : _state$product13.id_article,
579
581
  orderId: ((_state$product14 = state.product) === null || _state$product14 === void 0 ? void 0 : _state$product14.orderId) || ((_state$product15 = state.product) === null || _state$product15 === void 0 ? void 0 : _state$product15.id_order),