contentoh-components-library 21.5.98 → 21.6.0

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.
@@ -112,44 +112,49 @@ var ProviderProductEditionView = function ProviderProductEditionView(_ref) {
112
112
 
113
113
  var isRetailer = user === null || user === void 0 ? void 0 : user.is_retailer;
114
114
 
115
- var _useState = (0, _react.useState)(false),
115
+ var _useState = (0, _react.useState)(null),
116
116
  _useState2 = (0, _slicedToArray2.default)(_useState, 2),
117
- showModal = _useState2[0],
118
- setShowModal = _useState2[1];
117
+ boxData = _useState2[0],
118
+ setBoxData = _useState2[1];
119
119
 
120
120
  var _useState3 = (0, _react.useState)(false),
121
121
  _useState4 = (0, _slicedToArray2.default)(_useState3, 2),
122
- showRejectModal = _useState4[0],
123
- setShowRejectModal = _useState4[1];
122
+ showModal = _useState4[0],
123
+ setShowModal = _useState4[1];
124
124
 
125
- var _useState5 = (0, _react.useState)(0),
125
+ var _useState5 = (0, _react.useState)(false),
126
126
  _useState6 = (0, _slicedToArray2.default)(_useState5, 2),
127
- headerTop = _useState6[0],
128
- setHeaderTop = _useState6[1];
127
+ showRejectModal = _useState6[0],
128
+ setShowRejectModal = _useState6[1];
129
129
 
130
- var _useState7 = (0, _react.useState)({}),
130
+ var _useState7 = (0, _react.useState)(0),
131
131
  _useState8 = (0, _slicedToArray2.default)(_useState7, 2),
132
- assig = _useState8[0],
133
- setAssig = _useState8[1];
132
+ headerTop = _useState8[0],
133
+ setHeaderTop = _useState8[1];
134
134
 
135
- var _useState9 = (0, _react.useState)(false),
135
+ var _useState9 = (0, _react.useState)({}),
136
136
  _useState10 = (0, _slicedToArray2.default)(_useState9, 2),
137
- imageLayout = _useState10[0],
138
- setImageLayout = _useState10[1];
137
+ assig = _useState10[0],
138
+ setAssig = _useState10[1];
139
139
 
140
140
  var _useState11 = (0, _react.useState)(false),
141
141
  _useState12 = (0, _slicedToArray2.default)(_useState11, 2),
142
- rejectAll = _useState12[0],
143
- setRejectAll = _useState12[1];
142
+ imageLayout = _useState12[0],
143
+ setImageLayout = _useState12[1];
144
144
 
145
- var _useState13 = (0, _react.useState)({
145
+ var _useState13 = (0, _react.useState)(false),
146
+ _useState14 = (0, _slicedToArray2.default)(_useState13, 2),
147
+ rejectAll = _useState14[0],
148
+ setRejectAll = _useState14[1];
149
+
150
+ var _useState15 = (0, _react.useState)({
146
151
  "Ficha técnica": null,
147
152
  Descripción: null,
148
153
  Imágenes: null
149
154
  }),
150
- _useState14 = (0, _slicedToArray2.default)(_useState13, 2),
151
- origin = _useState14[0],
152
- setOrigin = _useState14[1];
155
+ _useState16 = (0, _slicedToArray2.default)(_useState15, 2),
156
+ origin = _useState16[0],
157
+ setOrigin = _useState16[1];
153
158
 
154
159
  var _useCloseModal = (0, _customHooks.useCloseModal)("version-selector"),
155
160
  _useCloseModal2 = (0, _slicedToArray2.default)(_useCloseModal, 2),
@@ -95,6 +95,8 @@ var _material = require("@mui/material");
95
95
 
96
96
  var _jsxRuntime = require("react/jsx-runtime");
97
97
 
98
+ var allowedAccountsToViewChangeStatus = ["mperez@contentoh.com", "gmorales@contentoh.com", "rvega@contentoh.com", "amora@contentoh.com", "oparra@contentoh.com", "zsegura@contentoh.com", "oserna@contentoh.com", "jalvarado@contentoh.com"];
99
+
98
100
  var RetailerProductEditionView = function RetailerProductEditionView(_ref) {
99
101
  var _location$state, _location$state2, _state$active_retaile4, _state$active_retaile5, _state$images_values$2, _state$images_values10, _state$images_values11, _state$product8, _state$active_retaile6, _state$active_retaile7, _state$active_retaile8, _state$active_retaile9, _state$product9, _state$product10, _state$product11, _state$datasheets_inp, _state$datasheets_inp2, _state$product12, _state$images_values12, _state$comment;
100
102
 
@@ -2131,7 +2133,7 @@ var RetailerProductEditionView = function RetailerProductEditionView(_ref) {
2131
2133
  })]
2132
2134
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
2133
2135
  className: "action-buttons",
2134
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralButton.Button, {
2136
+ children: [allowedAccountsToViewChangeStatus.includes(user === null || user === void 0 ? void 0 : user.email) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_GeneralButton.Button, {
2135
2137
  buttonType: "general-pink-button",
2136
2138
  label: "Cambio de Estatus",
2137
2139
  onClick: function onClick() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "contentoh-components-library",
3
- "version": "21.5.98",
3
+ "version": "21.6.0",
4
4
  "dependencies": {
5
5
  "@aws-amplify/auth": "^4.5.3",
6
6
  "@aws-amplify/datastore": "^3.11.0",
@@ -70,6 +70,7 @@ const ProviderProductEditionView = ({
70
70
 
71
71
  const isRetailer = user?.is_retailer;
72
72
 
73
+ const [boxData, setBoxData] = useState(null);
73
74
  const [showModal, setShowModal] = useState(false);
74
75
  const [showRejectModal, setShowRejectModal] = useState(false);
75
76
  const [headerTop, setHeaderTop] = useState(0);
@@ -65,6 +65,17 @@ import ChangeStatusModal from "../../organisms/ChangeStatusModal";
65
65
 
66
66
  import { Skeleton, Box, Stack } from "@mui/material";
67
67
 
68
+ const allowedAccountsToViewChangeStatus = [
69
+ "mperez@contentoh.com",
70
+ "gmorales@contentoh.com",
71
+ "rvega@contentoh.com",
72
+ "amora@contentoh.com",
73
+ "oparra@contentoh.com",
74
+ "zsegura@contentoh.com",
75
+ "oserna@contentoh.com",
76
+ "jalvarado@contentoh.com"
77
+ ];
78
+
68
79
  const RetailerProductEditionView = ({
69
80
  tabsSections,
70
81
  productSelected = {},
@@ -1774,12 +1785,16 @@ const RetailerProductEditionView = ({
1774
1785
  )}
1775
1786
 
1776
1787
  <div className="action-buttons">
1777
- <Button
1778
- buttonType={"general-pink-button"}
1779
- label={"Cambio de Estatus"}
1780
- onClick={() => setOpenChangeStatusModal(true)}
1781
- id="button-change-status"
1782
- />
1788
+ {
1789
+ allowedAccountsToViewChangeStatus.includes(user?.email) && (
1790
+ <Button
1791
+ buttonType={"general-pink-button"}
1792
+ label={"Cambio de Estatus"}
1793
+ onClick={() => setOpenChangeStatusModal(true)}
1794
+ id="button-change-status"
1795
+ />
1796
+ )
1797
+ }
1783
1798
  {[7, 8].includes(user.id_role) && (
1784
1799
  <Button
1785
1800
  buttonType={