contentoh-components-library 21.0.99 → 21.1.2

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.
@@ -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
  )