oa-componentbook 1.0.1-stage.67 → 1.0.1-stage.69

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.
@@ -54,7 +54,7 @@ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) r
54
54
  * @property {string} ['data-test'] Data test string to be applied to the outermost element.
55
55
  */
56
56
  function ApprovalWidget(_ref) {
57
- var _approvalForm$disable, _actionContent$label, _approvalForm$disable2, _approvalForm$disable3, _approvalForm$remarks, _approvalForm$disable4;
57
+ var _approvalForm$disable, _actionContent$label, _approvalForm$disable2, _approvalForm$disable3, _approvalForm$remarks, _approvalForm$disable4, _approvalForm$disable5, _approvalForm$disable6, _approvalForm$disable7;
58
58
  let {
59
59
  children,
60
60
  description,
@@ -103,7 +103,7 @@ function ApprovalWidget(_ref) {
103
103
  color: "secondary-content"
104
104
  }, descriptionTitle), /*#__PURE__*/_react.default.createElement(_Typography.default, {
105
105
  typography: "type-b2-400",
106
- color: "secondary-content"
106
+ color: "primary-content"
107
107
  }, description)), !isQuestionStyleWidget && /*#__PURE__*/_react.default.createElement("div", {
108
108
  className: "oaCustomerResponse"
109
109
  }, /*#__PURE__*/_react.default.createElement(_Typography.default, {
@@ -119,8 +119,12 @@ function ApprovalWidget(_ref) {
119
119
  "data-test": dataTest ? "".concat(dataTest, "--view-button") : undefined,
120
120
  onClick: () => viewOnClick(questionId),
121
121
  type: "text-only",
122
- label: isQuestionStyleWidget ? "View Previous Description" : "View History"
123
- }), children)), !isQuestionStyleWidget && /*#__PURE__*/_react.default.createElement("div", {
122
+ label:
123
+ // isQuestionStyleWidget
124
+ // ? "View Previous Description"
125
+ // :
126
+ "View History"
127
+ }), children)), (systemStatus === null || systemStatus === void 0 ? void 0 : systemStatus.length) > 0 && /*#__PURE__*/_react.default.createElement("div", {
124
128
  className: "col-sm-12 col-md-4 col-lg-4 flexCol8"
125
129
  }, systemStatus === null || systemStatus === void 0 ? void 0 : systemStatus.map(status => {
126
130
  var _status$items;
@@ -141,14 +145,17 @@ function ApprovalWidget(_ref) {
141
145
  return /*#__PURE__*/_react.default.createElement("div", {
142
146
  className: "tooltip-grid"
143
147
  }, columns.map(columnItems => {
144
- var _columnItems$;
148
+ var _columnItems$, _columnItems$2;
145
149
  return /*#__PURE__*/_react.default.createElement("div", {
146
150
  key: "col-".concat((_columnItems$ = columnItems[0]) === null || _columnItems$ === void 0 ? void 0 : _columnItems$.title),
147
151
  className: "tooltip-column"
148
- }, columnItems.map(item => /*#__PURE__*/_react.default.createElement("li", {
152
+ }, /*#__PURE__*/_react.default.createElement(_Typography.default, {
153
+ typography: "type-sl1-700",
154
+ color: "secondary-content"
155
+ }, (_columnItems$2 = columnItems[0]) === null || _columnItems$2 === void 0 ? void 0 : _columnItems$2.title), columnItems.map(item => /*#__PURE__*/_react.default.createElement("li", {
149
156
  key: item.title,
150
157
  className: "tooltip-item"
151
- }, /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
158
+ }, item.type && /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, {
152
159
  size: 20,
153
160
  icon: item.type === "positive" ? _Check.default : _Close.default,
154
161
  color: item.type === "positive" ? "positive" : "negative"
@@ -214,7 +221,40 @@ function ApprovalWidget(_ref) {
214
221
  required: true,
215
222
  message: "This field is required"
216
223
  }] : []
217
- })( /*#__PURE__*/_react.default.createElement(_CustomButton.default, actionContent)))) || undefined), hasDivider && /*#__PURE__*/_react.default.createElement(_antd.Divider, null));
224
+ })( /*#__PURE__*/_react.default.createElement(_CustomButton.default, actionContent))), actionRenderType === "radioWithForm" && /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_antd.Form.Item, {
225
+ className: "custom-radio-group"
226
+ }, getFieldDecorator("icQues_status_".concat(questionId, "}"), {
227
+ rules: isMandatory ? [{
228
+ required: true,
229
+ message: dataTest ? /*#__PURE__*/_react.default.createElement("span", {
230
+ "data-test": "".concat(dataTest, "--is-approved-validation-message")
231
+ }, "Approval status needs to be selected.") : "Approval status needs to be selected."
232
+ }] : []
233
+ })( /*#__PURE__*/_react.default.createElement(_CustomRadio.default.Group, {
234
+ "data-test": dataTest ? "".concat(dataTest, "--is-approved-radio-group") : undefined
235
+ }, /*#__PURE__*/_react.default.createElement(_CustomRadio.default, {
236
+ "data-test": dataTest ? "".concat(dataTest, "--is-approved-radio-yes") : undefined,
237
+ label: "Mark as Approved",
238
+ value: "Complete",
239
+ disabled: (_approvalForm$disable5 = approvalForm === null || approvalForm === void 0 ? void 0 : approvalForm.disabled) !== null && _approvalForm$disable5 !== void 0 ? _approvalForm$disable5 : false
240
+ }), /*#__PURE__*/_react.default.createElement(_CustomRadio.default, {
241
+ "data-test": dataTest ? "".concat(dataTest, "--is-approved-radio-no") : undefined,
242
+ disabled: (_approvalForm$disable6 = approvalForm === null || approvalForm === void 0 ? void 0 : approvalForm.disabled) !== null && _approvalForm$disable6 !== void 0 ? _approvalForm$disable6 : false,
243
+ label: "Mark as Pending",
244
+ value: "Incomplete"
245
+ })))), form.getFieldValue("icQues_status_".concat(questionId)) == "Incomplete" && /*#__PURE__*/_react.default.createElement("section", null, /*#__PURE__*/_react.default.createElement("h5", {
246
+ className: "type-b2-400"
247
+ }, "Remarks"), /*#__PURE__*/_react.default.createElement(_antd.Form.Item, null, getFieldDecorator("icQues_remarks_".concat(questionId), {
248
+ rules: isMandatory ? [{
249
+ required: true,
250
+ message: dataTest ? /*#__PURE__*/_react.default.createElement("span", {
251
+ "data-test": "".concat(dataTest, "--remarks-validation-message")
252
+ }, "Remarks cannot be empty.") : "Remarks cannot be empty."
253
+ }] : []
254
+ })( /*#__PURE__*/_react.default.createElement(_antd.Input.TextArea, {
255
+ "data-test": dataTest ? "".concat(dataTest, "--remarks") : undefined,
256
+ disabled: (_approvalForm$disable7 = approvalForm === null || approvalForm === void 0 ? void 0 : approvalForm.disabled) !== null && _approvalForm$disable7 !== void 0 ? _approvalForm$disable7 : false
257
+ })))))) || undefined), hasDivider && /*#__PURE__*/_react.default.createElement(_antd.Divider, null));
218
258
  }
219
259
  ApprovalWidget.propTypes = {
220
260
  children: _propTypes.default.node,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oa-componentbook",
3
- "version": "1.0.1-stage.67",
3
+ "version": "1.0.1-stage.69",
4
4
  "private": false,
5
5
  "description": "Reusable components",
6
6
  "main": "build/index.js",