contentoh-components-library 21.1.5 → 21.1.6

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.
@@ -56,7 +56,6 @@ var GeneralInput = function GeneralInput(_ref) {
56
56
 
57
57
  var onHandleChange = function onHandleChange(evt) {
58
58
  if (validateInput) {
59
- console.log("here");
60
59
  setTextValue({
61
60
  value: validateInput(evt, position, inputsArray)
62
61
  });
@@ -1572,7 +1572,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
1572
1572
  var datasheet_status = product.datasheet_status,
1573
1573
  description_status = product.description_status,
1574
1574
  images_status = product.images_status;
1575
- var completionStates = ["AP", "Evaluated", "NS"];
1575
+ var completionStates = user.is_retailer ? ["AC", "Evaluated", "NS"] : ["AP", "Evaluated", "NS"];
1576
1576
  var dsEvaluated = completionStates.includes(datasheet_status);
1577
1577
  var descsEvaluated = completionStates.includes(description_status);
1578
1578
  var imgsEvaluated = completionStates.includes(images_status);
@@ -1593,7 +1593,7 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
1593
1593
  retailerId = activeRetailer === null || activeRetailer === void 0 ? void 0 : activeRetailer.id;
1594
1594
 
1595
1595
  if (!result) {
1596
- _context13.next = 10;
1596
+ _context13.next = 9;
1597
1597
  break;
1598
1598
  }
1599
1599
 
@@ -1604,19 +1604,18 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
1604
1604
  result: result,
1605
1605
  retailerId: retailerId
1606
1606
  };
1607
- console.log(data, "data");
1608
- _context13.next = 8;
1607
+ _context13.next = 7;
1609
1608
  return _axios.default.put("".concat(process.env.REACT_APP_EVALUATION_ENDPOINT), data, {
1610
1609
  headers: {
1611
1610
  Authorization: token
1612
1611
  }
1613
1612
  });
1614
1613
 
1615
- case 8:
1616
- _context13.next = 19;
1614
+ case 7:
1615
+ _context13.next = 18;
1617
1616
  break;
1618
1617
 
1619
- case 10:
1618
+ case 9:
1620
1619
  _productTemp = product;
1621
1620
  concept = getConcept(activeTab);
1622
1621
  _productTemp["".concat(concept, "_status")] = "Evaluated";
@@ -1648,11 +1647,11 @@ var ProviderProductEdition = function ProviderProductEdition(_ref) {
1648
1647
  return (0, _objectSpread3.default)((0, _objectSpread3.default)({}, prev), {}, (0, _defineProperty2.default)({}, concept, "Evaluated"));
1649
1648
  });
1650
1649
 
1651
- case 19:
1650
+ case 18:
1652
1651
  loadData();
1653
1652
  showSurvey && showSurvey(confirmStatusComplete());
1654
1653
 
1655
- case 21:
1654
+ case 20:
1656
1655
  case "end":
1657
1656
  return _context13.stop();
1658
1657
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "contentoh-components-library",
3
- "version": "21.1.5",
3
+ "version": "21.1.6",
4
4
  "dependencies": {
5
5
  "@aws-amplify/auth": "^4.5.3",
6
6
  "@aws-amplify/datastore": "^3.11.0",
@@ -32,7 +32,6 @@ export const GeneralInput = ({
32
32
 
33
33
  const onHandleChange = (evt) => {
34
34
  if (validateInput) {
35
- console.log("here");
36
35
  setTextValue({ value: validateInput(evt, position, inputsArray) });
37
36
  } else if (
38
37
  updatedDatasheets ||
@@ -1081,7 +1081,9 @@ export const ProviderProductEdition = ({
1081
1081
  // }, [services, servicesData, activeTab]);
1082
1082
  const confirmStatusComplete = () => {
1083
1083
  const { datasheet_status, description_status, images_status } = product;
1084
- const completionStates = ["AP", "Evaluated", "NS"];
1084
+ const completionStates = user.is_retailer
1085
+ ? ["AC", "Evaluated", "NS"]
1086
+ : ["AP", "Evaluated", "NS"];
1085
1087
  const dsEvaluated = completionStates.includes(datasheet_status);
1086
1088
  const descsEvaluated = completionStates.includes(description_status);
1087
1089
  const imgsEvaluated = completionStates.includes(images_status);
@@ -1103,7 +1105,6 @@ export const ProviderProductEdition = ({
1103
1105
  result: result,
1104
1106
  retailerId,
1105
1107
  };
1106
- console.log(data, "data");
1107
1108
  await axios.put(`${process.env.REACT_APP_EVALUATION_ENDPOINT}`, data, {
1108
1109
  headers: {
1109
1110
  Authorization: token,