contentoh-components-library 21.1.0 → 21.1.1

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.
@@ -60,7 +60,7 @@ var GeneralInput = function GeneralInput(_ref) {
60
60
  setTextValue({
61
61
  value: validateInput(evt, position, inputsArray)
62
62
  });
63
- } else if (updatedDatasheets || updatedDescriptions) {
63
+ } else if (updatedDatasheets || updatedDescriptions || inputType === "textarea") {
64
64
  setTextValue({
65
65
  value: inputType === "checkbox" ? evt.target.checked : evt.target.value
66
66
  });
@@ -17,6 +17,6 @@ var _genericModalClose = _interopRequireDefault(require("../../../assets/images/
17
17
 
18
18
  var _templateObject;
19
19
 
20
- var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n height: 100%;\n background-color: ", ";\n display: flex;\n align-items: center;\n justify-content: center;\n position: fixed;\n background-color: rgba(59, 59, 59, 0.53);\n backdrop-filter: blur(4px);\n top: 0;\n left: 0;\n z-index: 100;\n\n h2 {\n overflow: initial;\n }\n\n .global-styles {\n background-color: ", ";\n height: auto;\n width: auto;\n position: relative;\n border-radius: 15px;\n padding: 40px;\n text-align: center;\n .close-button {\n background-image: url(", ");\n background-color: transparent;\n width: 14px;\n height: 14px;\n cursor: pointer;\n border: none;\n position: absolute;\n right: 20px;\n top: 20px;\n }\n .general-white-button {\n width: 160px;\n height: 40px;\n color: ", ";\n border: 1px solid ", ";\n background-color: transparent;\n & + * {\n margin-left: 45px;\n height: 40px;\n width: 161px;\n }\n }\n\n &.log-out {\n padding-bottom: 60px;\n img {\n & + * {\n margin-top: 20px;\n }\n }\n .with-bold-text {\n font-size: 24px;\n & + * {\n margin-top: 20px;\n }\n }\n }\n\n &.delete-product {\n img {\n height: 50px;\n width: 56px;\n & + * {\n margin-top: 30px;\n }\n }\n .product-name-header,\n .retailer-name-header {\n & + * {\n margin-top: 30px;\n }\n }\n }\n\n &.product-edition {\n padding-top: 50px;\n .product-name-header {\n & + * {\n margin-top: 25px;\n }\n }\n }\n\n &.send-invitation {\n width: 604px;\n img {\n & + * {\n margin-top: 40px;\n }\n }\n p {\n font-family: ", ";\n font-style: normal;\n font-size: 24px;\n color: ", ";\n line-height: 28px;\n span {\n font-family: ", ";\n }\n }\n }\n\n &.upload-image {\n width: 430px;\n padding: 50px;\n img {\n & + * {\n margin-top: 33px;\n }\n }\n .input-name-header {\n & + * {\n margin-top: 20px;\n }\n }\n .list-container {\n & + .general-button-default {\n margin-top: 40px;\n }\n }\n }\n }\n"])), _variables.GlobalColors.white, _variables.GlobalColors.deep_gray, _genericModalClose.default, _variables.GlobalColors.s2, _variables.GlobalColors.white, _variables.FontFamily.Raleway_500, _variables.GlobalColors.white, _variables.FontFamily.Raleway_700);
20
+ var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n height: 100%;\n background-color: ", ";\n display: flex;\n align-items: center;\n justify-content: center;\n position: fixed;\n background-color: rgba(59, 59, 59, 0.53);\n backdrop-filter: blur(4px);\n top: 0;\n left: 0;\n z-index: 100;\n\n h2 {\n overflow: initial;\n }\n\n .global-styles {\n background-color: ", ";\n height: auto;\n width: 500px;\n position: relative;\n border-radius: 15px;\n padding: 40px;\n text-align: center;\n .close-button {\n background-image: url(", ");\n background-color: transparent;\n width: 14px;\n height: 14px;\n cursor: pointer;\n border: none;\n position: absolute;\n right: 20px;\n top: 20px;\n }\n .general-white-button {\n width: 160px;\n height: 40px;\n color: ", ";\n border: 1px solid ", ";\n background-color: transparent;\n & + * {\n margin-left: 45px;\n height: 40px;\n width: 161px;\n }\n }\n\n &.log-out {\n padding-bottom: 60px;\n img {\n & + * {\n margin-top: 20px;\n }\n }\n .with-bold-text {\n font-size: 24px;\n & + * {\n margin-top: 20px;\n }\n }\n }\n\n &.delete-product {\n img {\n height: 50px;\n width: 56px;\n & + * {\n margin-top: 30px;\n }\n }\n .product-name-header,\n .retailer-name-header {\n & + * {\n margin-top: 30px;\n }\n }\n }\n\n &.product-edition {\n padding-top: 50px;\n .product-name-header {\n & + * {\n margin-top: 25px;\n }\n }\n }\n\n &.send-invitation {\n width: 604px;\n img {\n & + * {\n margin-top: 40px;\n }\n }\n p {\n font-family: ", ";\n font-style: normal;\n font-size: 24px;\n color: ", ";\n line-height: 28px;\n span {\n font-family: ", ";\n }\n }\n }\n\n &.upload-image {\n width: 430px;\n padding: 50px;\n img {\n & + * {\n margin-top: 33px;\n }\n }\n .input-name-header {\n & + * {\n margin-top: 20px;\n }\n }\n .list-container {\n & + .general-button-default {\n margin-top: 40px;\n }\n }\n }\n }\n"])), _variables.GlobalColors.white, _variables.GlobalColors.deep_gray, _genericModalClose.default, _variables.GlobalColors.s2, _variables.GlobalColors.white, _variables.FontFamily.Raleway_500, _variables.GlobalColors.white, _variables.FontFamily.Raleway_700);
21
21
 
22
22
  exports.Container = Container;
@@ -98,18 +98,27 @@ var InputFormatter = function InputFormatter(_ref) {
98
98
 
99
99
  setCharsCounter(h.getLength() - 1);
100
100
  value = valueFormater(value);
101
- var idInput = inputId;
102
- var dataSave = updatedDescriptions === null || updatedDescriptions === void 0 ? void 0 : updatedDescriptions.slice();
103
-
104
- if (dataSave.length > 0) {
105
- if (dataSave.filter(function (e) {
106
- return e.attributeId === idInput;
107
- }).length > 0) {
108
- dataSave.forEach(function (e) {
109
- if (e.attributeId === idInput) {
110
- e.value = value;
111
- }
112
- });
101
+
102
+ if (updatedDescriptions) {
103
+ var idInput = inputId;
104
+ var dataSave = updatedDescriptions === null || updatedDescriptions === void 0 ? void 0 : updatedDescriptions.slice();
105
+
106
+ if ((dataSave === null || dataSave === void 0 ? void 0 : dataSave.length) > 0) {
107
+ if (dataSave.filter(function (e) {
108
+ return e.attributeId === idInput;
109
+ }).length > 0) {
110
+ dataSave.forEach(function (e) {
111
+ if (e.attributeId === idInput) {
112
+ e.value = value;
113
+ }
114
+ });
115
+ } else {
116
+ dataSave.push({
117
+ articleId: articleId,
118
+ attributeId: idInput,
119
+ value: value
120
+ });
121
+ }
113
122
  } else {
114
123
  dataSave.push({
115
124
  articleId: articleId,
@@ -117,15 +126,9 @@ var InputFormatter = function InputFormatter(_ref) {
117
126
  value: value
118
127
  });
119
128
  }
120
- } else {
121
- dataSave.push({
122
- articleId: articleId,
123
- attributeId: idInput,
124
- value: value
125
- });
126
- }
127
129
 
128
- setUpdatedDescriptions(dataSave);
130
+ setUpdatedDescriptions(dataSave);
131
+ }
129
132
  };
130
133
 
131
134
  var getSelection = function getSelection(range, a, b) {
@@ -15,7 +15,7 @@ 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 .quill {\n border: 1px solid\n ", ";\n position: relative;\n border-radius: 2px;\n\n .ql-toolbar {\n background-color: ", ";\n position: absolute;\n z-index: 10;\n border: 1px solid ", ";\n width: 45px;\n height: 45px;\n border-radius: 4px;\n visibility: ", ";\n top: ", "px;\n left: ", "px;\n }\n\n .ql-container {\n border: none;\n font-family: ", ";\n color: ", ";\n strong {\n font-family: ", ";\n }\n }\n }\n .description-limit {\n font-size: 12px;\n font-family: ", ";\n color: ", ";\n text-align: right;\n }\n"])), function (_ref) {
18
+ var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .quill {\n background-color: ", ";\n border: 1px solid\n ", ";\n position: relative;\n border-radius: 2px;\n\n .ql-toolbar {\n background-color: ", ";\n position: absolute;\n z-index: 10;\n border: 1px solid ", ";\n width: 45px;\n height: 45px;\n border-radius: 4px;\n visibility: ", ";\n top: ", "px;\n left: ", "px;\n }\n\n .ql-container {\n border: none;\n font-family: ", ";\n color: ", ";\n strong {\n font-family: ", ";\n }\n }\n }\n .description-limit {\n font-size: 12px;\n font-family: ", ";\n color: ", ";\n text-align: right;\n }\n"])), _variables.GlobalColors.white, function (_ref) {
19
19
  var focus = _ref.focus,
20
20
  isRequired = _ref.isRequired;
21
21
  return focus ? _variables.GlobalColors.magenta_s2 : isRequired ? "red" : _variables.GlobalColors.s3;
@@ -34,7 +34,8 @@ var TagAndInput = function TagAndInput(_ref) {
34
34
  required = _ref.required,
35
35
  optionList = _ref.optionList,
36
36
  description = _ref.description,
37
- inputOnChange = _ref.inputOnChange;
37
+ inputOnChange = _ref.inputOnChange,
38
+ color = _ref.color;
38
39
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Container, {
39
40
  inputType: inputType,
40
41
  className: "input-container",
@@ -42,7 +43,8 @@ var TagAndInput = function TagAndInput(_ref) {
42
43
  className: "title-container",
43
44
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_index.ScreenHeader, {
44
45
  text: label,
45
- headerType: "input-name-header"
46
+ headerType: "input-name-header",
47
+ color: color
46
48
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
47
49
  className: "tooltip",
48
50
  children: label
@@ -41,54 +41,54 @@ RetailerProductEditionDefault.args = {
41
41
  descriptions: 1,
42
42
  images: 1
43
43
  },
44
- orderId: 1,
45
- status: "AF",
46
- datasheet_status: "AF",
44
+ orderId: 27,
45
+ status: "RC",
46
+ datasheet_status: "AC",
47
47
  prio: "none",
48
48
  version: 2,
49
- description_status: "AF",
50
- images_status: "AF",
49
+ description_status: "RC",
50
+ images_status: "AC",
51
51
  article: {
52
- id_article: 33250,
53
- id_category: "689",
54
- name: "crema antiarrugas",
55
- upc: "2512651",
56
- timestamp: "2022-06-14T14:52:51.000Z",
57
- id_user: 28,
52
+ id_article: 55099,
53
+ id_category: "2004",
54
+ name: "Producto de prueba 1 THD",
55
+ upc: "SKU1235THD",
56
+ timestamp: "2022-06-17T23:41:20.000Z",
57
+ id_user: 102,
58
58
  status: "NULL",
59
59
  active: 1,
60
- company_id: 1,
61
- company_name: "COMPANY DEV",
60
+ company_id: 833,
61
+ company_name: "THD Proveedor",
62
62
  country: "México",
63
- id_order: 1,
64
- id_datasheet_especialist: 54,
63
+ id_order: 27,
64
+ id_datasheet_especialist: 36,
65
65
  id_datasheet_facilitator: 52,
66
- id_description_especialist: 54,
66
+ id_description_especialist: 36,
67
67
  id_description_facilitator: 52,
68
68
  id_images_especialist: 55,
69
69
  id_images_facilitator: 53,
70
70
  id_auditor: 30,
71
71
  id_recepcionist: null,
72
- category: "SALUD Y BELLEZA|CUIDADO CORPORAL|CREMAS FAMILIARES",
72
+ category: "BAÑOS|ACCESORIOS PARA BAÑO|ACCESORIOS INDIVIDUALES",
73
73
  missingAttributes: null,
74
74
  missingDescriptions: null,
75
75
  missingImages: null
76
76
  },
77
77
  retailers: [{
78
- id: 4,
79
- name: "Walmart Super y Superama",
78
+ id: 58,
79
+ name: "The Home Depot Golden",
80
80
  country: "México",
81
81
  id_region: 1,
82
82
  active: 1
83
83
  }, {
84
- id: 26,
85
- name: "Mercado Libre",
84
+ id: 59,
85
+ name: "The Home Depot Platinum",
86
86
  country: "México",
87
87
  id_region: 1,
88
88
  active: 1
89
89
  }],
90
90
  country: "México",
91
- upc: "2512651"
91
+ upc: "SKU1235THD"
92
92
  },
93
93
  location: {
94
94
  product: {
@@ -126,6 +126,6 @@ RetailerProductEditionDefault.args = {
126
126
  products_limit: "3",
127
127
  type: "PyMES"
128
128
  },
129
- src: "https://content-management-profile.s3.amazonaws.com/id-30/30.png?1655502088129"
129
+ src: "https://content-management-profile.s3.amazonaws.com/id-30/30.png?1655598361036"
130
130
  }
131
131
  };
@@ -73,6 +73,8 @@ var _Loading = require("../../atoms/Loading");
73
73
 
74
74
  var _genericModalCheck = _interopRequireDefault(require("../../../assets/images/genericModal/genericModalCheck.svg"));
75
75
 
76
+ var _errorModal = _interopRequireDefault(require("../../../assets/images/genericModal/errorModal.svg"));
77
+
76
78
  var _jsxRuntime = require("react/jsx-runtime");
77
79
 
78
80
  var reducerImages = function reducerImages(state, action) {
@@ -978,19 +980,22 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
978
980
  switch (userId) {
979
981
  case 7:
980
982
  case 8:
981
- return ["RA", "RF"].includes(product === null || product === void 0 ? void 0 : product.status) && statusArray.includes(srvActive === null || srvActive === void 0 ? void 0 : srvActive.status) || statusArray.includes(product.status) && srv.filter(function (serv) {
983
+ return ["RA", "RF"].includes(product === null || product === void 0 ? void 0 : product.status) && //"IN_PROGRESS", "RF", "RA"
984
+ statusArray.includes(srvActive === null || srvActive === void 0 ? void 0 : srvActive.status) || statusArray.includes(product.status) && srv.filter(function (serv) {
982
985
  return statusArray.includes(serv.status);
983
986
  }).length === srv.length;
984
987
 
985
988
  case 4:
986
989
  case 5:
987
- return unvalidated && ["IN_PROGRESS", "QF"].includes(product.status) && srv.filter(function (serv) {
990
+ return unvalidated && ["IN_PROGRESS", "QF"].includes(product.status) && //"RF", "AF", "AA", "AP", "AC
991
+ srv.filter(function (serv) {
988
992
  return statusArray.includes(serv.status);
989
993
  }).length === srv.length;
990
994
 
991
995
  case 6:
992
- return statusArray.includes(product.status) && servicesData.every(function (serv) {
993
- return ["RA", "AA"].includes(serv.status);
996
+ return statusArray.includes(product.status) && //RP, RC, AF
997
+ servicesData.every(function (serv) {
998
+ return ["RA", "AA", "AP", "AC"].includes(serv.status);
994
999
  }) && auditorUnvalidated;
995
1000
 
996
1001
  default:
@@ -1622,7 +1627,27 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
1622
1627
  sendToFacilitator("A");
1623
1628
  },
1624
1629
  reject: function reject() {
1625
- sendToFacilitator("R");
1630
+ //sendToFacilitator("R");
1631
+ setMessage("Rechazado");
1632
+ setComponentsArray([/*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
1633
+ src: _errorModal.default
1634
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ScreenHeader.ScreenHeader, {
1635
+ text: "Agrega tu comentarios para enviar el rechazo",
1636
+ headerType: "input-name-header",
1637
+ color: "white"
1638
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.TagAndInput, {
1639
+ label: "Caja de Comentario",
1640
+ inputType: "textarea",
1641
+ inputId: "modal-commentary-box",
1642
+ index: 0,
1643
+ color: "white"
1644
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralButton.Button, {
1645
+ buttonType: "general-default-button",
1646
+ label: "Enviar comentario",
1647
+ onClick: function onClick(e) {
1648
+ return createComment(e, document.querySelector("#modal-commentary-box .ql-container .ql-editor > p").innerHTML, activeTab);
1649
+ }
1650
+ })]);
1626
1651
  },
1627
1652
  showValidationButtons: approveRejectButtons() && (auditorAssigned() || userAssigned())
1628
1653
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_FullTabsMenu.FullTabsMenu, {
@@ -1717,7 +1742,7 @@ var RetailerProductEdition = function RetailerProductEdition(_ref) {
1717
1742
  buttonType: "general-transparent-button",
1718
1743
  label: "Enviar comentario",
1719
1744
  onClick: function onClick(e) {
1720
- return createComment(e, document.querySelector("#description-commentary-box-0 .ql-container .ql-editor > p").innerHTML, activeTab);
1745
+ return createComment(e, document.querySelector("#commentary-box .ql-container .ql-editor > p").innerHTML, activeTab);
1721
1746
  }
1722
1747
  })
1723
1748
  })]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "contentoh-components-library",
3
- "version": "21.1.0",
3
+ "version": "21.1.1",
4
4
  "dependencies": {
5
5
  "@aws-amplify/auth": "^4.5.3",
6
6
  "@aws-amplify/datastore": "^3.11.0",
@@ -34,7 +34,11 @@ export const GeneralInput = ({
34
34
  if (validateInput) {
35
35
  console.log("here");
36
36
  setTextValue({ value: validateInput(evt, position, inputsArray) });
37
- } else if (updatedDatasheets || updatedDescriptions) {
37
+ } else if (
38
+ updatedDatasheets ||
39
+ updatedDescriptions ||
40
+ inputType === "textarea"
41
+ ) {
38
42
  setTextValue({
39
43
  value: inputType === "checkbox" ? evt.target.checked : evt.target.value,
40
44
  });
@@ -23,7 +23,7 @@ export const Container = styled.div`
23
23
  .global-styles {
24
24
  background-color: ${GlobalColors.deep_gray};
25
25
  height: auto;
26
- width: auto;
26
+ width: 500px;
27
27
  position: relative;
28
28
  border-radius: 15px;
29
29
  padding: 40px;
@@ -59,15 +59,23 @@ export const InputFormatter = ({
59
59
  setCharsCounter(h.getLength() - 1);
60
60
  value = valueFormater(value);
61
61
 
62
- let idInput = inputId;
63
- let dataSave = updatedDescriptions?.slice();
64
- if (dataSave.length > 0) {
65
- if (dataSave.filter((e) => e.attributeId === idInput).length > 0) {
66
- dataSave.forEach((e) => {
67
- if (e.attributeId === idInput) {
68
- e.value = value;
69
- }
70
- });
62
+ if (updatedDescriptions) {
63
+ let idInput = inputId;
64
+ let dataSave = updatedDescriptions?.slice();
65
+ if (dataSave?.length > 0) {
66
+ if (dataSave.filter((e) => e.attributeId === idInput).length > 0) {
67
+ dataSave.forEach((e) => {
68
+ if (e.attributeId === idInput) {
69
+ e.value = value;
70
+ }
71
+ });
72
+ } else {
73
+ dataSave.push({
74
+ articleId: articleId,
75
+ attributeId: idInput,
76
+ value: value,
77
+ });
78
+ }
71
79
  } else {
72
80
  dataSave.push({
73
81
  articleId: articleId,
@@ -75,14 +83,8 @@ export const InputFormatter = ({
75
83
  value: value,
76
84
  });
77
85
  }
78
- } else {
79
- dataSave.push({
80
- articleId: articleId,
81
- attributeId: idInput,
82
- value: value,
83
- });
86
+ setUpdatedDescriptions(dataSave);
84
87
  }
85
- setUpdatedDescriptions(dataSave);
86
88
  };
87
89
 
88
90
  const getSelection = (range, a, b) => {
@@ -3,6 +3,7 @@ import { GlobalColors, FontFamily } from "../../../global-files/variables";
3
3
 
4
4
  export const Container = styled.div`
5
5
  .quill {
6
+ background-color: ${GlobalColors.white};
6
7
  border: 1px solid
7
8
  ${({ focus, isRequired }) =>
8
9
  focus ? GlobalColors.magenta_s2 : isRequired ? "red" : GlobalColors.s3};
@@ -24,6 +24,7 @@ export const TagAndInput = ({
24
24
  optionList,
25
25
  description,
26
26
  inputOnChange,
27
+ color,
27
28
  }) => {
28
29
  return (
29
30
  <Container
@@ -32,7 +33,11 @@ export const TagAndInput = ({
32
33
  key={`generalTagInput-${inputType}`}
33
34
  >
34
35
  <div className="title-container">
35
- <ScreenHeader text={label} headerType={"input-name-header"} />
36
+ <ScreenHeader
37
+ text={label}
38
+ headerType={"input-name-header"}
39
+ color={color}
40
+ />
36
41
  <span className="tooltip">{label}</span>
37
42
  </div>
38
43
  <GeneralInput
@@ -26,57 +26,57 @@ RetailerProductEditionDefault.args = {
26
26
  descriptions: 1,
27
27
  images: 1,
28
28
  },
29
- orderId: 1,
30
- status: "AF",
31
- datasheet_status: "AF",
29
+ orderId: 27,
30
+ status: "RC",
31
+ datasheet_status: "AC",
32
32
  prio: "none",
33
33
  version: 2,
34
- description_status: "AF",
35
- images_status: "AF",
34
+ description_status: "RC",
35
+ images_status: "AC",
36
36
  article: {
37
- id_article: 33250,
38
- id_category: "689",
39
- name: "crema antiarrugas",
40
- upc: "2512651",
41
- timestamp: "2022-06-14T14:52:51.000Z",
42
- id_user: 28,
37
+ id_article: 55099,
38
+ id_category: "2004",
39
+ name: "Producto de prueba 1 THD",
40
+ upc: "SKU1235THD",
41
+ timestamp: "2022-06-17T23:41:20.000Z",
42
+ id_user: 102,
43
43
  status: "NULL",
44
44
  active: 1,
45
- company_id: 1,
46
- company_name: "COMPANY DEV",
45
+ company_id: 833,
46
+ company_name: "THD Proveedor",
47
47
  country: "México",
48
- id_order: 1,
49
- id_datasheet_especialist: 54,
48
+ id_order: 27,
49
+ id_datasheet_especialist: 36,
50
50
  id_datasheet_facilitator: 52,
51
- id_description_especialist: 54,
51
+ id_description_especialist: 36,
52
52
  id_description_facilitator: 52,
53
53
  id_images_especialist: 55,
54
54
  id_images_facilitator: 53,
55
55
  id_auditor: 30,
56
56
  id_recepcionist: null,
57
- category: "SALUD Y BELLEZA|CUIDADO CORPORAL|CREMAS FAMILIARES",
57
+ category: "BAÑOS|ACCESORIOS PARA BAÑO|ACCESORIOS INDIVIDUALES",
58
58
  missingAttributes: null,
59
59
  missingDescriptions: null,
60
60
  missingImages: null,
61
61
  },
62
62
  retailers: [
63
63
  {
64
- id: 4,
65
- name: "Walmart Super y Superama",
64
+ id: 58,
65
+ name: "The Home Depot Golden",
66
66
  country: "México",
67
67
  id_region: 1,
68
68
  active: 1,
69
69
  },
70
70
  {
71
- id: 26,
72
- name: "Mercado Libre",
71
+ id: 59,
72
+ name: "The Home Depot Platinum",
73
73
  country: "México",
74
74
  id_region: 1,
75
75
  active: 1,
76
76
  },
77
77
  ],
78
78
  country: "México",
79
- upc: "2512651",
79
+ upc: "SKU1235THD",
80
80
  },
81
81
  location: {
82
82
  product: { articleId: 109485, versionId: 3 },
@@ -111,6 +111,6 @@ RetailerProductEditionDefault.args = {
111
111
  products_limit: "3",
112
112
  type: "PyMES",
113
113
  },
114
- src: "https://content-management-profile.s3.amazonaws.com/id-30/30.png?1655502088129",
114
+ src: "https://content-management-profile.s3.amazonaws.com/id-30/30.png?1655598361036",
115
115
  },
116
116
  };
@@ -30,6 +30,7 @@ import { ScreenHeader } from "../../atoms/ScreenHeader";
30
30
  import { Loading } from "../../atoms/Loading";
31
31
  import succes from "../../../assets/images/genericModal/genericModalCheck.svg";
32
32
  import { getNewStatus } from "../../../global-files/data";
33
+ import errorModal from "../../../assets/images/genericModal/errorModal.svg";
33
34
 
34
35
  const reducerImages = (state, action) => {
35
36
  let { values, attrForImgs } = state;
@@ -579,7 +580,7 @@ export const RetailerProductEdition = ({
579
580
  case 7:
580
581
  case 8:
581
582
  return (
582
- (["RA", "RF"].includes(product?.status) &&
583
+ (["RA", "RF"].includes(product?.status) && //"IN_PROGRESS", "RF", "RA"
583
584
  statusArray.includes(srvActive?.status)) ||
584
585
  (statusArray.includes(product.status) &&
585
586
  srv.filter((serv) => statusArray.includes(serv.status)).length ===
@@ -589,14 +590,16 @@ export const RetailerProductEdition = ({
589
590
  case 5:
590
591
  return (
591
592
  unvalidated &&
592
- ["IN_PROGRESS", "QF"].includes(product.status) &&
593
+ ["IN_PROGRESS", "QF"].includes(product.status) && //"RF", "AF", "AA", "AP", "AC
593
594
  srv.filter((serv) => statusArray.includes(serv.status)).length ===
594
595
  srv.length
595
596
  );
596
597
  case 6:
597
598
  return (
598
- statusArray.includes(product.status) &&
599
- servicesData.every((serv) => ["RA", "AA"].includes(serv.status)) &&
599
+ statusArray.includes(product.status) && //RP, RC, AF
600
+ servicesData.every((serv) =>
601
+ ["RA", "AA", "AP", "AC"].includes(serv.status)
602
+ ) &&
600
603
  auditorUnvalidated
601
604
  );
602
605
  default:
@@ -1175,7 +1178,36 @@ export const RetailerProductEdition = ({
1175
1178
  sendToFacilitator("A");
1176
1179
  }}
1177
1180
  reject={() => {
1178
- sendToFacilitator("R");
1181
+ //sendToFacilitator("R");
1182
+ setMessage("Rechazado");
1183
+ setComponentsArray([
1184
+ <img src={errorModal} />,
1185
+ <ScreenHeader
1186
+ text={"Agrega tu comentarios para enviar el rechazo"}
1187
+ headerType={"input-name-header"}
1188
+ color={"white"}
1189
+ />,
1190
+ <TagAndInput
1191
+ label={"Caja de Comentario"}
1192
+ inputType={"textarea"}
1193
+ inputId={"modal-commentary-box"}
1194
+ index={0}
1195
+ color={"white"}
1196
+ />,
1197
+ <Button
1198
+ buttonType={"general-default-button"}
1199
+ label={"Enviar comentario"}
1200
+ onClick={(e) =>
1201
+ createComment(
1202
+ e,
1203
+ document.querySelector(
1204
+ "#modal-commentary-box .ql-container .ql-editor > p"
1205
+ ).innerHTML,
1206
+ activeTab
1207
+ )
1208
+ }
1209
+ />,
1210
+ ]);
1179
1211
  }}
1180
1212
  showValidationButtons={
1181
1213
  approveRejectButtons() && (auditorAssigned() || userAssigned())
@@ -1309,7 +1341,7 @@ export const RetailerProductEdition = ({
1309
1341
  createComment(
1310
1342
  e,
1311
1343
  document.querySelector(
1312
- "#description-commentary-box-0 .ql-container .ql-editor > p"
1344
+ "#commentary-box .ql-container .ql-editor > p"
1313
1345
  ).innerHTML,
1314
1346
  activeTab
1315
1347
  )