contentoh-components-library 21.4.128 → 21.4.129

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.
@@ -27,7 +27,8 @@ var InputFormatter = function InputFormatter(_ref) {
27
27
  updatedDescriptions = _ref.updatedDescriptions,
28
28
  setUpdatedDescriptions = _ref.setUpdatedDescriptions,
29
29
  isRequired = _ref.isRequired,
30
- maxChar = _ref.maxChar;
30
+ maxChar = _ref.maxChar,
31
+ disabled = _ref.disabled;
31
32
 
32
33
  var _useState = (0, _react.useState)(mainValue),
33
34
  _useState2 = (0, _slicedToArray2.default)(_useState, 2),
@@ -152,8 +153,8 @@ var InputFormatter = function InputFormatter(_ref) {
152
153
  ref: function ref(el) {
153
154
  return setQuill(el);
154
155
  },
155
- defaultValue: getValue(inputValue) //disabled={!props.enableInputs}
156
- ,
156
+ defaultValue: getValue(inputValue),
157
+ readOnly: disabled,
157
158
  modules: {
158
159
  toolbar: ["bold"]
159
160
  },
@@ -197,7 +197,7 @@ var GalleryElement = function GalleryElement(_ref) {
197
197
  index: number
198
198
  });
199
199
  }
200
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
200
+ }), (image === null || image === void 0 ? void 0 : image.isApproved) === false && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
201
201
  style: {
202
202
  display: "flex",
203
203
  "justify-content": "center",
@@ -189,38 +189,38 @@ var InputGroup = function InputGroup(_ref) {
189
189
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
190
190
  className: "inputs-container",
191
191
  children: inputGroup === null || inputGroup === void 0 ? void 0 : (_inputGroup$inputs = inputGroup.inputs) === null || _inputGroup$inputs === void 0 ? void 0 : _inputGroup$inputs.map(function (input, index) {
192
- var _dataInputs$input, _dataInputs$input2, _dataInputs$input3, _dataInputs$input4, _dataInputs$input5, _dataInputs$input6, _auditInputs$input, _dataInputs$input7, _dataInputs$input8, _dataInputs$input9, _dataInputs$input10, _dataInputs$input11, _dataInputs$input12, _dataInputs$input13, _dataInputs$input14, _dataInputs$input15, _auditInputGroup$inpu, _auditInputGroup$inpu2;
192
+ var _dataInputs$input, _dataInputs$input2, _dataInputs$input3, _dataInputs$input4, _dataInputs$input5, _dataInputs$input6, _dataInputs$input7, _auditInputs$input, _dataInputs$input8, _dataInputs$input9, _dataInputs$input10, _dataInputs$input11, _dataInputs$input12, _dataInputs$input13, _dataInputs$input14, _dataInputs$input15, _dataInputs$input16, _dataInputs$input17, _auditInputGroup$inpu, _auditInputGroup$inpu2;
193
193
 
194
194
  return activeSection === "Ficha técnica" ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
195
195
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_TagAndInput.TagAndInput, {
196
196
  //disabled={input === 40001}
197
- disabled: dataInputs[input].isApproved,
198
- inputId: (_dataInputs$input3 = dataInputs[input]) === null || _dataInputs$input3 === void 0 ? void 0 : _dataInputs$input3.id,
197
+ disabled: (_dataInputs$input3 = dataInputs[input]) === null || _dataInputs$input3 === void 0 ? void 0 : _dataInputs$input3.isApproved,
198
+ inputId: (_dataInputs$input4 = dataInputs[input]) === null || _dataInputs$input4 === void 0 ? void 0 : _dataInputs$input4.id,
199
199
  version: version,
200
- inputType: inputTypeValue((_dataInputs$input4 = dataInputs[input]) === null || _dataInputs$input4 === void 0 ? void 0 : _dataInputs$input4.type),
201
- label: ((_dataInputs$input5 = dataInputs[input]) === null || _dataInputs$input5 === void 0 ? void 0 : _dataInputs$input5.name) + ((_dataInputs$input6 = dataInputs[input]) !== null && _dataInputs$input6 !== void 0 && _dataInputs$input6.required ? "*" : ""),
202
- value: compare ? (_auditInputs$input = auditInputs[input]) === null || _auditInputs$input === void 0 ? void 0 : _auditInputs$input.value : (_dataInputs$input7 = dataInputs[input]) === null || _dataInputs$input7 === void 0 ? void 0 : _dataInputs$input7.value,
200
+ inputType: inputTypeValue((_dataInputs$input5 = dataInputs[input]) === null || _dataInputs$input5 === void 0 ? void 0 : _dataInputs$input5.type),
201
+ label: ((_dataInputs$input6 = dataInputs[input]) === null || _dataInputs$input6 === void 0 ? void 0 : _dataInputs$input6.name) + ((_dataInputs$input7 = dataInputs[input]) !== null && _dataInputs$input7 !== void 0 && _dataInputs$input7.required ? "*" : ""),
202
+ value: compare ? (_auditInputs$input = auditInputs[input]) === null || _auditInputs$input === void 0 ? void 0 : _auditInputs$input.value : (_dataInputs$input8 = dataInputs[input]) === null || _dataInputs$input8 === void 0 ? void 0 : _dataInputs$input8.value,
203
203
  inputPlaceHolder: input === null || input === void 0 ? void 0 : input.placeholder,
204
204
  articleId: articleId,
205
- isRequired: (_dataInputs$input8 = dataInputs[input]) === null || _dataInputs$input8 === void 0 ? void 0 : _dataInputs$input8.required,
205
+ isRequired: (_dataInputs$input9 = dataInputs[input]) === null || _dataInputs$input9 === void 0 ? void 0 : _dataInputs$input9.required,
206
206
  updatedDatasheets: updatedDatasheets,
207
207
  setUpdatedDatasheets: setUpdatedDatasheets,
208
- maxChar: (_dataInputs$input9 = dataInputs[input]) !== null && _dataInputs$input9 !== void 0 && _dataInputs$input9.max_chars ? (_dataInputs$input10 = dataInputs[input]) === null || _dataInputs$input10 === void 0 ? void 0 : _dataInputs$input10.max_chars : 999,
209
- optionList: (_dataInputs$input11 = dataInputs[input]) === null || _dataInputs$input11 === void 0 ? void 0 : _dataInputs$input11.option_list,
210
- description: (_dataInputs$input12 = dataInputs[input]) === null || _dataInputs$input12 === void 0 ? void 0 : _dataInputs$input12.description,
208
+ maxChar: (_dataInputs$input10 = dataInputs[input]) !== null && _dataInputs$input10 !== void 0 && _dataInputs$input10.max_chars ? (_dataInputs$input11 = dataInputs[input]) === null || _dataInputs$input11 === void 0 ? void 0 : _dataInputs$input11.max_chars : 999,
209
+ optionList: (_dataInputs$input12 = dataInputs[input]) === null || _dataInputs$input12 === void 0 ? void 0 : _dataInputs$input12.option_list,
210
+ description: (_dataInputs$input13 = dataInputs[input]) === null || _dataInputs$input13 === void 0 ? void 0 : _dataInputs$input13.description,
211
211
  showTooltip: true,
212
212
  auditClass: compare && !isEquals(dataInputs[input].value, auditInputs[input].value) ? "audit-class" : ""
213
- }, index + "-" + ((_dataInputs$input = dataInputs[input]) === null || _dataInputs$input === void 0 ? void 0 : _dataInputs$input.value) + "-" + ((_dataInputs$input2 = dataInputs[input]) === null || _dataInputs$input2 === void 0 ? void 0 : _dataInputs$input2.id) + "-" + compare), /*#__PURE__*/(0, _jsxRuntime.jsx)(InputReviewSection, {
214
- inputId: (_dataInputs$input13 = dataInputs[input]) === null || _dataInputs$input13 === void 0 ? void 0 : _dataInputs$input13.id,
215
- isApproved: (_dataInputs$input14 = dataInputs[input]) === null || _dataInputs$input14 === void 0 ? void 0 : _dataInputs$input14.isApproved,
216
- comment: (_dataInputs$input15 = dataInputs[input]) === null || _dataInputs$input15 === void 0 ? void 0 : _dataInputs$input15.comment,
213
+ }, index + "-" + ((_dataInputs$input = dataInputs[input]) === null || _dataInputs$input === void 0 ? void 0 : _dataInputs$input.value) + "-" + ((_dataInputs$input2 = dataInputs[input]) === null || _dataInputs$input2 === void 0 ? void 0 : _dataInputs$input2.id) + "-" + compare), ((_dataInputs$input14 = dataInputs[input]) === null || _dataInputs$input14 === void 0 ? void 0 : _dataInputs$input14.isApproved) === false && /*#__PURE__*/(0, _jsxRuntime.jsx)(InputReviewSection, {
214
+ inputId: (_dataInputs$input15 = dataInputs[input]) === null || _dataInputs$input15 === void 0 ? void 0 : _dataInputs$input15.id,
215
+ isApproved: (_dataInputs$input16 = dataInputs[input]) === null || _dataInputs$input16 === void 0 ? void 0 : _dataInputs$input16.isApproved,
216
+ comment: (_dataInputs$input17 = dataInputs[input]) === null || _dataInputs$input17 === void 0 ? void 0 : _dataInputs$input17.comment,
217
217
  handleImgClick: handleImgClick,
218
218
  changeImageBtn: changeImageBtn,
219
219
  showDivState: showDivStates,
220
220
  imageStates: imageStates
221
221
  })]
222
222
  }) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
223
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(InputReviewSection, {
223
+ children: [(input === null || input === void 0 ? void 0 : input.isApproved) === false && /*#__PURE__*/(0, _jsxRuntime.jsx)(InputReviewSection, {
224
224
  inputId: input === null || input === void 0 ? void 0 : input.id,
225
225
  isApproved: input === null || input === void 0 ? void 0 : input.isApproved,
226
226
  comment: input === null || input === void 0 ? void 0 : input.comment,
@@ -235,6 +235,7 @@ var InputGroup = function InputGroup(_ref) {
235
235
  label: (input === null || input === void 0 ? void 0 : input.name) + (input.required ? "*" : ""),
236
236
  value: compare ? auditInputGroup === null || auditInputGroup === void 0 ? void 0 : (_auditInputGroup$inpu = auditInputGroup.inputs[index]) === null || _auditInputGroup$inpu === void 0 ? void 0 : _auditInputGroup$inpu.value : input === null || input === void 0 ? void 0 : input.value,
237
237
  isRequired: input.required,
238
+ disabled: input === null || input === void 0 ? void 0 : input.isApproved,
238
239
  maxChar: input.max_chars,
239
240
  inputPlaceHolder: input === null || input === void 0 ? void 0 : input.placeholder,
240
241
  updatedDescriptions: updatedDescriptions,
@@ -257,41 +258,41 @@ var InputGroup = function InputGroup(_ref) {
257
258
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
258
259
  className: "inputs-container",
259
260
  children: inputGroup === null || inputGroup === void 0 ? void 0 : (_inputGroup$inputs2 = inputGroup.inputs) === null || _inputGroup$inputs2 === void 0 ? void 0 : _inputGroup$inputs2.map(function (input, index) {
260
- var _dataInputs$input16, _dataInputs$input17, _dataInputs$input18, _dataInputs$input19, _dataInputs$input20, _dataInputs$input21, _auditInputs$input2, _dataInputs$input22, _dataInputs$input23, _dataInputs$input24, _dataInputs$input25, _dataInputs$input26, _dataInputs$input27, _dataInputs$input28, _dataInputs$input29, _dataInputs$input30, _auditInputGroup$inpu3, _auditInputGroup$inpu4;
261
+ var _dataInputs$input18, _dataInputs$input19, _dataInputs$input20, _dataInputs$input21, _dataInputs$input22, _dataInputs$input23, _dataInputs$input24, _auditInputs$input2, _dataInputs$input25, _dataInputs$input26, _dataInputs$input27, _dataInputs$input28, _dataInputs$input29, _dataInputs$input30, _dataInputs$input31, _dataInputs$input32, _dataInputs$input33, _dataInputs$input34, _auditInputGroup$inpu3, _auditInputGroup$inpu4;
261
262
 
262
263
  return activeSection === "Ficha técnica" ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
263
264
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_TagAndInput.TagAndInput, {
264
265
  //disabled={input === 40001}
265
- disabled: false,
266
- inputId: (_dataInputs$input18 = dataInputs[input]) === null || _dataInputs$input18 === void 0 ? void 0 : _dataInputs$input18.id,
266
+ disabled: (_dataInputs$input20 = dataInputs[input]) === null || _dataInputs$input20 === void 0 ? void 0 : _dataInputs$input20.isApproved,
267
+ inputId: (_dataInputs$input21 = dataInputs[input]) === null || _dataInputs$input21 === void 0 ? void 0 : _dataInputs$input21.id,
267
268
  version: version,
268
- inputType: inputTypeValue((_dataInputs$input19 = dataInputs[input]) === null || _dataInputs$input19 === void 0 ? void 0 : _dataInputs$input19.type),
269
- label: ((_dataInputs$input20 = dataInputs[input]) === null || _dataInputs$input20 === void 0 ? void 0 : _dataInputs$input20.name) + ((_dataInputs$input21 = dataInputs[input]) !== null && _dataInputs$input21 !== void 0 && _dataInputs$input21.required ? "*" : ""),
270
- value: compare ? (_auditInputs$input2 = auditInputs[input]) === null || _auditInputs$input2 === void 0 ? void 0 : _auditInputs$input2.value : (_dataInputs$input22 = dataInputs[input]) === null || _dataInputs$input22 === void 0 ? void 0 : _dataInputs$input22.value,
269
+ inputType: inputTypeValue((_dataInputs$input22 = dataInputs[input]) === null || _dataInputs$input22 === void 0 ? void 0 : _dataInputs$input22.type),
270
+ label: ((_dataInputs$input23 = dataInputs[input]) === null || _dataInputs$input23 === void 0 ? void 0 : _dataInputs$input23.name) + ((_dataInputs$input24 = dataInputs[input]) !== null && _dataInputs$input24 !== void 0 && _dataInputs$input24.required ? "*" : ""),
271
+ value: compare ? (_auditInputs$input2 = auditInputs[input]) === null || _auditInputs$input2 === void 0 ? void 0 : _auditInputs$input2.value : (_dataInputs$input25 = dataInputs[input]) === null || _dataInputs$input25 === void 0 ? void 0 : _dataInputs$input25.value,
271
272
  inputPlaceHolder: input === null || input === void 0 ? void 0 : input.placeholder,
272
273
  articleId: articleId,
273
- isRequired: (_dataInputs$input23 = dataInputs[input]) === null || _dataInputs$input23 === void 0 ? void 0 : _dataInputs$input23.required,
274
+ isRequired: (_dataInputs$input26 = dataInputs[input]) === null || _dataInputs$input26 === void 0 ? void 0 : _dataInputs$input26.required,
274
275
  updatedDatasheets: updatedDatasheets,
275
276
  setUpdatedDatasheets: setUpdatedDatasheets,
276
- maxChar: (_dataInputs$input24 = dataInputs[input]) !== null && _dataInputs$input24 !== void 0 && _dataInputs$input24.max_chars ? (_dataInputs$input25 = dataInputs[input]) === null || _dataInputs$input25 === void 0 ? void 0 : _dataInputs$input25.max_chars : 999,
277
- optionList: (_dataInputs$input26 = dataInputs[input]) === null || _dataInputs$input26 === void 0 ? void 0 : _dataInputs$input26.option_list,
278
- description: (_dataInputs$input27 = dataInputs[input]) === null || _dataInputs$input27 === void 0 ? void 0 : _dataInputs$input27.description,
277
+ maxChar: (_dataInputs$input27 = dataInputs[input]) !== null && _dataInputs$input27 !== void 0 && _dataInputs$input27.max_chars ? (_dataInputs$input28 = dataInputs[input]) === null || _dataInputs$input28 === void 0 ? void 0 : _dataInputs$input28.max_chars : 999,
278
+ optionList: (_dataInputs$input29 = dataInputs[input]) === null || _dataInputs$input29 === void 0 ? void 0 : _dataInputs$input29.option_list,
279
+ description: (_dataInputs$input30 = dataInputs[input]) === null || _dataInputs$input30 === void 0 ? void 0 : _dataInputs$input30.description,
279
280
  showTooltip: true,
280
281
  inputGroup: inputGroup,
281
282
  dataInputs: dataInputs,
282
283
  onChange: setUpdatedBoxData,
283
284
  auditClass: compare && !isEquals(dataInputs[input].value, auditInputs[input].value) ? "audit-class" : ""
284
- }, index + "-" + ((_dataInputs$input16 = dataInputs[input]) === null || _dataInputs$input16 === void 0 ? void 0 : _dataInputs$input16.value) + "-" + ((_dataInputs$input17 = dataInputs[input]) === null || _dataInputs$input17 === void 0 ? void 0 : _dataInputs$input17.id) + "-" + compare), /*#__PURE__*/(0, _jsxRuntime.jsx)(InputReviewSection, {
285
- inputId: (_dataInputs$input28 = dataInputs[input]) === null || _dataInputs$input28 === void 0 ? void 0 : _dataInputs$input28.id,
286
- isApproved: (_dataInputs$input29 = dataInputs[input]) === null || _dataInputs$input29 === void 0 ? void 0 : _dataInputs$input29.isApproved,
287
- comment: (_dataInputs$input30 = dataInputs[input]) === null || _dataInputs$input30 === void 0 ? void 0 : _dataInputs$input30.comment,
285
+ }, index + "-" + ((_dataInputs$input18 = dataInputs[input]) === null || _dataInputs$input18 === void 0 ? void 0 : _dataInputs$input18.value) + "-" + ((_dataInputs$input19 = dataInputs[input]) === null || _dataInputs$input19 === void 0 ? void 0 : _dataInputs$input19.id) + "-" + compare), ((_dataInputs$input31 = dataInputs[input]) === null || _dataInputs$input31 === void 0 ? void 0 : _dataInputs$input31.isApproved) === false && /*#__PURE__*/(0, _jsxRuntime.jsx)(InputReviewSection, {
286
+ inputId: (_dataInputs$input32 = dataInputs[input]) === null || _dataInputs$input32 === void 0 ? void 0 : _dataInputs$input32.id,
287
+ isApproved: (_dataInputs$input33 = dataInputs[input]) === null || _dataInputs$input33 === void 0 ? void 0 : _dataInputs$input33.isApproved,
288
+ comment: (_dataInputs$input34 = dataInputs[input]) === null || _dataInputs$input34 === void 0 ? void 0 : _dataInputs$input34.comment,
288
289
  handleImgClick: handleImgClick,
289
290
  changeImageBtn: changeImageBtn,
290
291
  showDivState: showDivStates,
291
292
  imageStates: imageStates
292
293
  })]
293
294
  }) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
294
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(InputReviewSection, {
295
+ children: [(input === null || input === void 0 ? void 0 : input.isApproved) === false && /*#__PURE__*/(0, _jsxRuntime.jsx)(InputReviewSection, {
295
296
  inputId: input === null || input === void 0 ? void 0 : input.id,
296
297
  isApproved: input === null || input === void 0 ? void 0 : input.isApproved,
297
298
  comment: input === null || input === void 0 ? void 0 : input.comment,
@@ -302,6 +303,7 @@ var InputGroup = function InputGroup(_ref) {
302
303
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_TagAndInput.TagAndInput, {
303
304
  inputId: input.id,
304
305
  index: index,
306
+ disabled: input === null || input === void 0 ? void 0 : input.isApproved,
305
307
  inputType: "textarea",
306
308
  label: (input === null || input === void 0 ? void 0 : input.name) + (input.required ? "*" : ""),
307
309
  value: compare ? auditInputGroup === null || auditInputGroup === void 0 ? void 0 : (_auditInputGroup$inpu3 = auditInputGroup.inputs[index]) === null || _auditInputGroup$inpu3 === void 0 ? void 0 : _auditInputGroup$inpu3.value : input === null || input === void 0 ? void 0 : input.value,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "contentoh-components-library",
3
- "version": "21.4.128",
3
+ "version": "21.4.129",
4
4
  "dependencies": {
5
5
  "@aws-amplify/auth": "^4.5.3",
6
6
  "@aws-amplify/datastore": "^3.11.0",
@@ -11,6 +11,7 @@ export const InputFormatter = ({
11
11
  setUpdatedDescriptions,
12
12
  isRequired,
13
13
  maxChar,
14
+ disabled,
14
15
  }) => {
15
16
  const [inputValue, setInputValue] = useState(mainValue);
16
17
  const [selection, setSelection] = useState(false);
@@ -117,7 +118,7 @@ export const InputFormatter = ({
117
118
  id={inputId + ""}
118
119
  ref={(el) => setQuill(el)}
119
120
  defaultValue={getValue(inputValue)}
120
- //disabled={!props.enableInputs}
121
+ readOnly={disabled}
121
122
  modules={{ toolbar: ["bold"] }}
122
123
  onKeyPress={(e) => {
123
124
  if (charsCounter >= maxLength && e.key !== "Backspace") {
@@ -162,56 +162,60 @@ export const GalleryElement = ({
162
162
  }}
163
163
  />
164
164
 
165
- <div
166
- style={{
167
- display: "flex",
168
- "justify-content": "center",
169
- "align-items": "center",
170
- }}
171
- >
172
- <Tooltip
173
- componentTooltip={
174
- <>
175
- <p>
176
- <b>Comentarios:</b>
177
- </p>
178
- <p>{image.comment}</p>
179
- </>
180
- }
181
- children={
182
- !image.isApproved && (
183
- <img
184
- src={
185
- imageStates[image.image_id] ? acceptIcon : rejectIcon
186
- }
187
- alt={"botón rechazar"}
188
- style={{ cursor: "pointer" }}
189
- onClick={() => handleImgClick(image.image_id)}
190
- />
191
- )
192
- }
193
- classNameTooltip={"container-tooltip"}
194
- />
195
- {showDivStates[image.image_id] && (
196
- <div className="btnReviewState">
197
- <div>
198
- <button
199
- id="aceptbtn"
200
- onClick={() =>
201
- changeImageBtn(image.image_id, "validate")
202
- }
203
- >
165
+ {image?.isApproved === false && (
166
+ <div
167
+ style={{
168
+ display: "flex",
169
+ "justify-content": "center",
170
+ "align-items": "center",
171
+ }}
172
+ >
173
+ <Tooltip
174
+ componentTooltip={
175
+ <>
176
+ <p>
177
+ <b>Comentarios:</b>
178
+ </p>
179
+ <p>{image.comment}</p>
180
+ </>
181
+ }
182
+ children={
183
+ !image.isApproved && (
204
184
  <img
205
- src={acceptIcon}
206
- alt="acept button"
185
+ src={
186
+ imageStates[image.image_id]
187
+ ? acceptIcon
188
+ : rejectIcon
189
+ }
190
+ alt={"botón rechazar"}
207
191
  style={{ cursor: "pointer" }}
192
+ onClick={() => handleImgClick(image.image_id)}
208
193
  />
209
- Validar
210
- </button>
194
+ )
195
+ }
196
+ classNameTooltip={"container-tooltip"}
197
+ />
198
+ {showDivStates[image.image_id] && (
199
+ <div className="btnReviewState">
200
+ <div>
201
+ <button
202
+ id="aceptbtn"
203
+ onClick={() =>
204
+ changeImageBtn(image.image_id, "validate")
205
+ }
206
+ >
207
+ <img
208
+ src={acceptIcon}
209
+ alt="acept button"
210
+ style={{ cursor: "pointer" }}
211
+ />
212
+ Validar
213
+ </button>
214
+ </div>
211
215
  </div>
212
- </div>
213
- )}
214
- </div>
216
+ )}
217
+ </div>
218
+ )}
215
219
  </>
216
220
  )}
217
221
  </div>
@@ -186,7 +186,7 @@ export const InputGroup = ({
186
186
  compare
187
187
  }
188
188
  //disabled={input === 40001}
189
- disabled={dataInputs[input].isApproved}
189
+ disabled={dataInputs[input]?.isApproved}
190
190
  inputId={dataInputs[input]?.id}
191
191
  version={version}
192
192
  inputType={inputTypeValue(dataInputs[input]?.type)}
@@ -222,27 +222,31 @@ export const InputGroup = ({
222
222
  : ""
223
223
  }
224
224
  />
225
- <InputReviewSection
226
- inputId={dataInputs[input]?.id}
227
- isApproved={dataInputs[input]?.isApproved}
228
- comment={dataInputs[input]?.comment}
229
- handleImgClick={handleImgClick}
230
- changeImageBtn={changeImageBtn}
231
- showDivState={showDivStates}
232
- imageStates={imageStates}
233
- />
225
+ {dataInputs[input]?.isApproved === false && (
226
+ <InputReviewSection
227
+ inputId={dataInputs[input]?.id}
228
+ isApproved={dataInputs[input]?.isApproved}
229
+ comment={dataInputs[input]?.comment}
230
+ handleImgClick={handleImgClick}
231
+ changeImageBtn={changeImageBtn}
232
+ showDivState={showDivStates}
233
+ imageStates={imageStates}
234
+ />
235
+ )}
234
236
  </>
235
237
  ) : (
236
238
  <>
237
- <InputReviewSection
238
- inputId={input?.id}
239
- isApproved={input?.isApproved}
240
- comment={input?.comment}
241
- handleImgClick={handleImgClick}
242
- changeImageBtn={changeImageBtn}
243
- showDivState={showDivStates}
244
- imageStates={imageStates}
245
- />
239
+ {input?.isApproved === false && (
240
+ <InputReviewSection
241
+ inputId={input?.id}
242
+ isApproved={input?.isApproved}
243
+ comment={input?.comment}
244
+ handleImgClick={handleImgClick}
245
+ changeImageBtn={changeImageBtn}
246
+ showDivState={showDivStates}
247
+ imageStates={imageStates}
248
+ />
249
+ )}
246
250
  <TagAndInput
247
251
  key={index + "-" + input?.value + "-" + compare}
248
252
  inputId={input.id}
@@ -255,6 +259,7 @@ export const InputGroup = ({
255
259
  : input?.value
256
260
  }
257
261
  isRequired={input.required}
262
+ disabled={input?.isApproved}
258
263
  maxChar={input.max_chars}
259
264
  inputPlaceHolder={input?.placeholder}
260
265
  updatedDescriptions={updatedDescriptions}
@@ -309,7 +314,7 @@ export const InputGroup = ({
309
314
  compare
310
315
  }
311
316
  //disabled={input === 40001}
312
- disabled={false}
317
+ disabled={dataInputs[input]?.isApproved}
313
318
  inputId={dataInputs[input]?.id}
314
319
  version={version}
315
320
  inputType={inputTypeValue(dataInputs[input]?.type)}
@@ -348,31 +353,36 @@ export const InputGroup = ({
348
353
  : ""
349
354
  }
350
355
  />
351
- <InputReviewSection
352
- inputId={dataInputs[input]?.id}
353
- isApproved={dataInputs[input]?.isApproved}
354
- comment={dataInputs[input]?.comment}
355
- handleImgClick={handleImgClick}
356
- changeImageBtn={changeImageBtn}
357
- showDivState={showDivStates}
358
- imageStates={imageStates}
359
- />
356
+ {dataInputs[input]?.isApproved === false && (
357
+ <InputReviewSection
358
+ inputId={dataInputs[input]?.id}
359
+ isApproved={dataInputs[input]?.isApproved}
360
+ comment={dataInputs[input]?.comment}
361
+ handleImgClick={handleImgClick}
362
+ changeImageBtn={changeImageBtn}
363
+ showDivState={showDivStates}
364
+ imageStates={imageStates}
365
+ />
366
+ )}
360
367
  </>
361
368
  ) : (
362
369
  <>
363
- <InputReviewSection
364
- inputId={input?.id}
365
- isApproved={input?.isApproved}
366
- comment={input?.comment}
367
- handleImgClick={handleImgClick}
368
- changeImageBtn={changeImageBtn}
369
- showDivState={showDivStates}
370
- imageStates={imageStates}
371
- />
370
+ {input?.isApproved === false && (
371
+ <InputReviewSection
372
+ inputId={input?.id}
373
+ isApproved={input?.isApproved}
374
+ comment={input?.comment}
375
+ handleImgClick={handleImgClick}
376
+ changeImageBtn={changeImageBtn}
377
+ showDivState={showDivStates}
378
+ imageStates={imageStates}
379
+ />
380
+ )}
372
381
  <TagAndInput
373
382
  key={index + "-" + input?.value + "-" + compare}
374
383
  inputId={input.id}
375
384
  index={index}
385
+ disabled={input?.isApproved}
376
386
  inputType={"textarea"}
377
387
  label={input?.name + (input.required ? "*" : "")}
378
388
  value={