oa-componentbook 1.0.1-stage.363 → 1.0.1-stage.364
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.
- package/build/components/oa-component-icons/MaterialIcon.js +1 -1
- package/build/components/oa-component-modal/styles.js +1 -1
- package/build/components/oa-component-tag/CustomTag.js +18 -12
- package/build/layout/GenricLayOut/GenricLayOut.js +284 -172
- package/build/layout/GenricLayOut/components/Header.js +7 -1
- package/build/layout/GenricLayOut/styles.js +1 -1
- package/build/widgets/oa-form-widget/FormWidget.js +62 -19
- package/build/widgets/oa-widget-approval/ApprovalWidgetNew.js +91 -46
- package/build/widgets/oa-widget-key-value/KeyValueWidget.js +3 -0
- package/package.json +1 -1
|
@@ -17,6 +17,7 @@ function Header(_ref) {
|
|
|
17
17
|
let {
|
|
18
18
|
heading,
|
|
19
19
|
subHeading,
|
|
20
|
+
subHeading1,
|
|
20
21
|
onSubHeadingClick,
|
|
21
22
|
handleSubHeadingSelect
|
|
22
23
|
} = _ref;
|
|
@@ -63,6 +64,11 @@ function Header(_ref) {
|
|
|
63
64
|
color: (_subHeading$color = subHeading === null || subHeading === void 0 ? void 0 : subHeading.color) !== null && _subHeading$color !== void 0 ? _subHeading$color : "secondary-content"
|
|
64
65
|
}, (subHeading === null || subHeading === void 0 || (_subHeading$icon = subHeading.icon) === null || _subHeading$icon === void 0 ? void 0 : _subHeading$icon.position) === "left" && /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, _extends({}, subHeading === null || subHeading === void 0 || (_subHeading$icon2 = subHeading.icon) === null || _subHeading$icon2 === void 0 ? void 0 : _subHeading$icon2.iconConfig, {
|
|
65
66
|
className: "margin-right-8"
|
|
66
|
-
})), subHeading === null || subHeading === void 0 ? void 0 : subHeading.text, (subHeading === null || subHeading === void 0 || (_subHeading$icon3 = subHeading.icon) === null || _subHeading$icon3 === void 0 ? void 0 : _subHeading$icon3.position) === "right" && /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, subHeading === null || subHeading === void 0 || (_subHeading$icon4 = subHeading.icon) === null || _subHeading$icon4 === void 0 ? void 0 : _subHeading$icon4.iconConfig)), subHeadingJsx(subHeading))
|
|
67
|
+
})), subHeading === null || subHeading === void 0 ? void 0 : subHeading.text, (subHeading === null || subHeading === void 0 || (_subHeading$icon3 = subHeading.icon) === null || _subHeading$icon3 === void 0 ? void 0 : _subHeading$icon3.position) === "right" && /*#__PURE__*/_react.default.createElement(_MaterialIcon.default, subHeading === null || subHeading === void 0 || (_subHeading$icon4 = subHeading.icon) === null || _subHeading$icon4 === void 0 ? void 0 : _subHeading$icon4.iconConfig)), subHeadingJsx(subHeading)), subHeading1 && /*#__PURE__*/_react.default.createElement("div", {
|
|
68
|
+
className: "subHadingText marginNone"
|
|
69
|
+
}, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
70
|
+
typography: subHeading1 === null || subHeading1 === void 0 ? void 0 : subHeading1.type,
|
|
71
|
+
color: "secondary-content"
|
|
72
|
+
}, subHeading1 === null || subHeading1 === void 0 ? void 0 : subHeading1.text)));
|
|
67
73
|
}
|
|
68
74
|
var _default = exports.default = Header;
|
|
@@ -16,7 +16,7 @@ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(
|
|
|
16
16
|
const DrawerWithOutFooter = exports.DrawerWithOutFooter = (0, _styledComponents.createGlobalStyle)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n.hubAutomationContainer .fullPageLayout {padding: 0 !important; background: #fff !important;}\n.hubAutomationContainer .fullPageLayout .oaRightLayouts{\n max-width: 1154px;\n margin: 24px auto;\n padding: 0 16px;\n box-shadow: none;}\n.oaDrawer div + div.ant-drawer-body{padding-bottom:100px !important;}\n\n.ant-checkbox-indeterminate .ant-checkbox-inner:after {\n background-color: #014fc5;\n}\n\n.ant-form-item .ant-form-item-label >label.ant-form-item-required::before {display:none;}\n.ant-form-item .ant-form-item-label >label.ant-form-item-required::after{ content: \"*\"; color: #DE350B; visibility: visible !important;}\n\n\n.cstUplaodWithFullWidth{margin-bottom:24px;}\n.cstUplaodWithFullWidth:last-child{margin-bottom:0;}\n.cstUplaodWithFullWidth .uploadDiv{width:100%;}\n.cstUplaodWithFullWidth .uploadDiv .ant-upload-list-item-container, .cstUplaodWithFullWidth .uploadDiv .ant-upload-wrapper .ant-upload-list-picture-card .ant-upload-select, .cstUplaodWithFullWidth .uploadDiv .ant-upload-wrapper.ant-upload-picture-card-wrapper .ant-upload-list.ant-upload-list-picture-card .ant-upload-list-item-container {\n width: 100%; \n height: 120px;\n}\n\n\n\n\n.oaDrawer .ant-form-item .ant-form-item-explain-error {\n color: #DE350B;\n font-size: 12px;\n margin: 4px 0 0 0;\n}\n.bottomSelectedSecion{background: #F6F6F6; padding: 16px 36px; position: fixed; bottom: 0; left: 0; right: 0;\nbox-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.14);\n display: flex; z-index: 2;\n align-items: center;\n justify-content: end;\n gap: 24px;}\n\n\n\n.listOfItems{ border-radius: 12px;\n border: 1px solid #E0E0E0;\n padding: 24px;\n margin: 24px 0 0 0;}\n modalSubheading{\n padding: 24px;\n margin: 24px 0 0 0;}\n\n.listOfItemsWithoutBorder{\n padding: 24px 0;\n margin: 24px 0 0 0;}\n\n modalSubheading{\n padding: 24px;\n margin: 24px 0 0 0;}\n\n\n\n\n.modalIconAndTextBox{display:flex; flex-direction:row; align-items: center; margin: 0 0 16px 0; gap:4px;}\n"])));
|
|
17
17
|
const FormWidgetStyle = exports.FormWidgetStyle = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .formBottomAction {\n position: absolute;\n bottom: 0px;\n background-color: rgb(249, 249, 249);\n box-shadow: rgba(0, 0, 0, 0.1) 0px -2px 8px;\n padding: 16px;\n display: flex;\n justify-content: flex-end;\n gap: 12px;\n z-index: 10;\n left: 0;\n right: 0;\n }\n\n .formBottomAction .ant-form-item {\n margin-bottom: 0px;\n }\n\n .searchErrorMsg {\n font-size: 12px;\n }\n .searchErrorMsg {\n font-size: 12px;\n }\n"])));
|
|
18
18
|
const TableDataStyle = exports.TableDataStyle = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n .tableContainerList th,\n button {\n white-space: nowrap;\n }\n .tableContainerList th,\n button {\n white-space: nowrap;\n }\n"])));
|
|
19
|
-
const OapageWithDataStyle = exports.OapageWithDataStyle = _styledComponents.default.aside(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n .oaTopHeaderAndBtnSec {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n }\n\n .fullPageLayout {\n display: flex;\n padding: 8px;\n background: #f6f6f6;\n }\n .ant-pagination {\n padding: 0 16px;\n justify-content: end;\n }\n .layoutHeadingPage {\n display: flex;\n gap: 8px;\n margin: 0 0 32px 0;\n flex-direction: column;\n justify-content: flex-start;\n }\n\n .topHadingWithIcon span {\n display: flex;\n align-items: center;\n justify-content: flex-start;\n gap: 8px;\n }\n\n .subHadingText {\n margin: 0 0 0 36px;\n }\n\n .marginNone {\n margin: 0 !important;\n }\n\n .subHadingText > span {\n display: flex;\n flex-direction: row;\n gap: 4px;\n align-items: center;\n }\n\n .oaRightLayouts {\n width: 100%;\n min-height: calc(100vh - 16px);\n padding: 76px 48px;\n overflow-y: auto;\n border-radius: 16px;\n background: #fff;\n box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.14);\n }\n\n .oaheaderSearchAndFilter {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin: 0 0 16px 0;\n gap: 16px;\n }\n\n
|
|
19
|
+
const OapageWithDataStyle = exports.OapageWithDataStyle = _styledComponents.default.aside(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n .oaTopHeaderAndBtnSec {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n }\n\n .fullPageLayout {\n display: flex;\n padding: 8px;\n background: #f6f6f6;\n }\n .ant-pagination {\n padding: 0 16px;\n justify-content: end;\n }\n .layoutHeadingPage {\n display: flex;\n gap: 8px;\n margin: 0 0 32px 0;\n flex-direction: column;\n justify-content: flex-start;\n }\n\n .topHadingWithIcon span {\n display: flex;\n align-items: center;\n justify-content: flex-start;\n gap: 8px;\n }\n\n .subHadingText {\n margin: 0 0 0 36px;\n }\n\n .marginNone {\n margin: 0 !important;\n }\n\n .subHadingText > span {\n display: flex;\n flex-direction: row;\n gap: 4px;\n align-items: center;\n }\n\n .oaRightLayouts {\n width: 100%;\n min-height: calc(100vh - 16px);\n padding: 76px 48px;\n overflow-y: auto;\n border-radius: 16px;\n background: #fff;\n box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.14);\n }\n\n .oaheaderSearchAndFilter {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin: 0 0 16px 0;\n gap: 16px;\n }\n\n .oaRightLayouts .iconAndTextSecBox {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 8px;\n }\n .inLine {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 4px;\n }\n\n .customeSelectDropdown {\n margin: 4px 0 0 8px;\n }\n\n .cardData {\n padding: 28px 0 48px 0;\n }\n\n .ant-carousel .slick-dots {\n position: static;\n margin: 20px auto 12px 0;\n }\n .ant-carousel .slick-dots li {\n width: 8px;\n height: 8px;\n }\n .ant-carousel .slick-dots li button {\n width: 8px;\n height: 8px;\n background: #cacaca;\n border-radius: 50%;\n opacity: 0.5;\n }\n .ant-carousel .slick-dots li.slick-active {\n width: 8px;\n height: 8px;\n }\n .ant-carousel .slick-dots li.slick-active button {\n width: 8px;\n height: 8px;\n opacity: 1;\n }\n .ant-carousel .slick-dots li::after {\n width: 8px;\n height: 8px;\n border-radius: 50%;\n opacity: 1;\n background: #717171;\n }\n\n .oaTabs .ant-tabs-nav {\n border-top: 1px solid #e0e0e0;\n border-left: 1px solid #e0e0e0;\n border-right: 1px solid #e0e0e0;\n padding: 12px 22px 0 22px;\n margin: 0 0 8px 0;\n background: #fff;\n border-radius: 4px 4px 0 0;\n }\n .ant-card-body {\n padding: 24px 16px !important;\n border-radius: 16px;\n background: #f6f6f6;\n }\n .cardContainer {\n display: flex;\n gap: 24px;\n }\n .selectAndSearch .noClear {\n border-radius: 0 4px 4px 0;\n width: 320px;\n }\n\n .searchErrorMsg {\n font-size: 12px;\n margin: 4px 0px 0px;\n color: #de350b;\n }\n .searchOnly {\n margin: 0px 0px 16px;\n position: relative;\n }\n .searchOnly .ant-input-affix-wrapper {\n border-radius: 4px;\n max-width: 420px;\n padding-left: 44px;\n }\n .searchOnly .cstSearchIcon {\n position: absolute;\n left: 16px;\n top: 14px;\n z-index: 2;\n }\n\n .selectAndSearch .ant-input-affix-wrapper {\n border-radius: 0 4px 4px 0;\n width: 320px;\n }\n\n .selectAndSearch {\n flex-shrink: 0;\n }\n\n .customeSelectDropdown .ant-select-selector {\n border: none;\n padding: 0;\n }\n .customeSelectDropdown .ant-select-selection-item > span {\n font-size: 24px;\n font-weight: 500;\n line-height: 32px;\n }\n\n .customeSelectDropdown .ant-select {\n margin: 0 0 0 32px;\n }\n\n .customeSelectDropdown .ant-select .ant-select-arrow {\n color: #014fc5;\n inset-inline-end: -6px;\n }\n\n .customeSelectDropdown .ant-select-selector {\n box-shadow: none !important;\n }\n .oaheaderButtons {\n display: flex;\n gap: 24px;\n align-items: center;\n position: relative;\n flex-grow: 1;\n justify-content: space-between;\n }\n\n .oaheaderButtons.single-child {\n justify-content: flex-end;\n }\n\n .oaheaderButtonsRight {\n display: flex;\n flex-direction: row;\n gap: 16px;\n }\n\n .oaheaderButtons .notifyDot {\n width: 12px;\n height: 12px;\n background: #de350b;\n position: absolute;\n top: -4px;\n right: -4px;\n border-radius: 50%;\n }\n\n @media only screen and (max-width: 600px) {\n .selectAndSearch .ant-input-affix-wrapper {\n width: calc(100% - 84px);\n }\n .oaheaderSearchAndFilter .dropDownSearchContainer {\n width: 100%;\n }\n\n .oaheaderSearchAndFilter {\n align-items: flex-end;\n flex-direction: column;\n gap: 16px;\n }\n\n .inLine {\n flex-direction: column;\n gap: 0;\n align-items: flex-start;\n }\n\n .subHadingText > span {\n flex-direction: column;\n align-items: flex-start;\n }\n\n .fullPageLayout {\n flex-direction: column;\n padding: 0;\n }\n .oaRightLayouts {\n padding: 16px;\n border-radius: 0;\n background: #fff;\n box-shadow: none;\n height: auto;\n background: #f6f6f6;\n }\n .oaTabs .ant-tabs-nav {\n margin: 0 0 28px 0;\n padding: 12px 0 0 0;\n }\n .layoutHeadingPage {\n margin: 0 0 16px 0;\n background: #fff;\n padding: 16px;\n border-radius: 8px;\n width: 100%;\n }\n .layoutHeadingAndSearch {\n background: #fff;\n padding: 20px 16px;\n margin: 0;\n width: 100%;\n border-radius: 8px;\n }\n }\n"])));
|
|
20
20
|
const ListofDamageParts = exports.ListofDamageParts = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n ul.damagedParts {\n display: flex;\n flex-direction: column;\n margin: 8px 0 0 16px;\n list-style-type: disc;\n }\n ul.damagedParts li {\n padding: 4px 0;\n width: 100%;\n }\n ul.damagedParts li::marker {\n color: #717171;\n font-size: 20px;\n }\n"])));
|
|
21
21
|
const IncidentListParts = exports.IncidentListParts = _styledComponents.default.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n .qaSec dl {\n display: flex;\n flex-direction: column;\n margin: 0;\n padding: 0;\n }\n .qaSec dl dt {\n display: flex;\n flex-direction: column;\n margin: 16px 0 0 0;\n }\n .qaSec dl dt:first-child {\n margin-top: 8px;\n }\n"])));
|
|
22
22
|
var _default = exports.default = {};
|
|
@@ -8,6 +8,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
});
|
|
9
9
|
exports.default = FormWidget;
|
|
10
10
|
require("core-js/modules/web.dom-collections.iterator.js");
|
|
11
|
+
require("core-js/modules/es.regexp.constructor.js");
|
|
12
|
+
require("core-js/modules/es.regexp.exec.js");
|
|
13
|
+
require("core-js/modules/es.regexp.to-string.js");
|
|
11
14
|
require("core-js/modules/es.array.includes.js");
|
|
12
15
|
require("core-js/modules/es.string.includes.js");
|
|
13
16
|
var _antd = require("antd");
|
|
@@ -43,7 +46,7 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
|
43
46
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
44
47
|
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } /* eslint-disable */
|
|
45
48
|
function FormWidget(props) {
|
|
46
|
-
var _cancel$type, _cancel$size, _clear$type, _clear$size, _submit$type;
|
|
49
|
+
var _cancel$type, _cancel$size, _clear$type, _clear$size, _submit$type, _submit$disabled;
|
|
47
50
|
const [form] = _antd.Form.useForm();
|
|
48
51
|
const [dynamicRules, setDynamicRules] = (0, _react.useState)({});
|
|
49
52
|
const {
|
|
@@ -61,15 +64,47 @@ function FormWidget(props) {
|
|
|
61
64
|
visible,
|
|
62
65
|
clear
|
|
63
66
|
} = cta !== null && cta !== void 0 ? cta : {};
|
|
64
|
-
const getFieldRules = item => {
|
|
65
|
-
|
|
67
|
+
const getFieldRules = (itemData, item) => {
|
|
68
|
+
if (item.customRulesCheck) {
|
|
69
|
+
return dynamicRules[item === null || item === void 0 ? void 0 : item.name] || (item === null || item === void 0 ? void 0 : item.rules) || [];
|
|
70
|
+
} else {
|
|
71
|
+
return getInputRules(itemData, item);
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
const modifedRuleWithItem = item => {
|
|
75
|
+
const temp = item === null || item === void 0 ? void 0 : item.map(r => {
|
|
76
|
+
if (!(r !== null && r !== void 0 && r.checkValidator) || !(r !== null && r !== void 0 && r.rule)) {
|
|
77
|
+
return null;
|
|
78
|
+
}
|
|
79
|
+
let pattern = r.rule.pattern;
|
|
80
|
+
if (typeof pattern === "string") {
|
|
81
|
+
const regex = new RegExp(pattern);
|
|
82
|
+
pattern = regex;
|
|
83
|
+
}
|
|
84
|
+
return _objectSpread(_objectSpread({}, r.rule), {}, {
|
|
85
|
+
pattern
|
|
86
|
+
});
|
|
87
|
+
}).filter(Boolean);
|
|
88
|
+
return temp;
|
|
89
|
+
};
|
|
90
|
+
const getInputRules = (itemData, item) => {
|
|
91
|
+
var _ref;
|
|
92
|
+
if (itemData !== null && itemData !== void 0 && itemData.customRules) {
|
|
93
|
+
for (const key in itemData === null || itemData === void 0 ? void 0 : itemData.customRules) {
|
|
94
|
+
if (item[key]) {
|
|
95
|
+
const modifiedRules = modifedRuleWithItem(itemData === null || itemData === void 0 ? void 0 : itemData.customRules[key]);
|
|
96
|
+
return modifiedRules;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
const itemRules = (_ref = itemData || item) === null || _ref === void 0 ? void 0 : _ref.rules;
|
|
101
|
+
return modifedRuleWithItem(itemRules);
|
|
66
102
|
};
|
|
67
103
|
const handleDynamicRuleUpdate = (fieldName, value, dynamicRulesConfig) => {
|
|
68
104
|
if (!dynamicRulesConfig) return;
|
|
69
|
-
|
|
70
|
-
Object.entries(dynamicRulesConfig).forEach(_ref => {
|
|
105
|
+
Object.entries(dynamicRulesConfig).forEach(_ref2 => {
|
|
71
106
|
var _config$conditions;
|
|
72
|
-
let [targetField, config] =
|
|
107
|
+
let [targetField, config] = _ref2;
|
|
73
108
|
const condition = (_config$conditions = config.conditions) === null || _config$conditions === void 0 ? void 0 : _config$conditions.find(c => c.type === "equals" ? value == c.value : c.type == "not_equals" ? value != c.value : c.type == "includes" ? value === null || value === void 0 ? void 0 : value.includes(c.value) : c.validator ? c.validator(value) : false);
|
|
74
109
|
const newRules = condition ? condition.rules : config.defaultRules || [];
|
|
75
110
|
setDynamicRules(prev => _objectSpread(_objectSpread({}, prev), {}, {
|
|
@@ -103,7 +138,7 @@ function FormWidget(props) {
|
|
|
103
138
|
};
|
|
104
139
|
const renderFieldWidget = (item, index, itemData) => {
|
|
105
140
|
if ((item === null || item === void 0 ? void 0 : item.widget) === "date" && (item === null || item === void 0 ? void 0 : item.visible) !== false) {
|
|
106
|
-
var _item$props, _item$props$getDisabl;
|
|
141
|
+
var _item$props, _item$props$getDisabl, _item$disabled;
|
|
107
142
|
return /*#__PURE__*/_react.default.createElement(_antd.Form.Item, {
|
|
108
143
|
value: item === null || item === void 0 ? void 0 : item.value,
|
|
109
144
|
name: item === null || item === void 0 ? void 0 : item.name,
|
|
@@ -116,11 +151,12 @@ function FormWidget(props) {
|
|
|
116
151
|
width: "100%"
|
|
117
152
|
},
|
|
118
153
|
disabledDateFunction: item === null || item === void 0 || (_item$props = item.props) === null || _item$props === void 0 || (_item$props$getDisabl = _item$props.getDisabledDateLogic) === null || _item$props$getDisabl === void 0 ? void 0 : _item$props$getDisabl.call(_item$props, item.valueProp),
|
|
154
|
+
disabled: (_item$disabled = item.disabled) !== null && _item$disabled !== void 0 ? _item$disabled : false,
|
|
119
155
|
defaultValue: item.defaultValue
|
|
120
156
|
}, item === null || item === void 0 ? void 0 : item.props)));
|
|
121
157
|
}
|
|
122
158
|
if ((item === null || item === void 0 ? void 0 : item.widget) === "select" && (item === null || item === void 0 ? void 0 : item.visible) !== false) {
|
|
123
|
-
var _item$
|
|
159
|
+
var _item$disabled2, _item$showSearch, _item$optionLabelProp;
|
|
124
160
|
return /*#__PURE__*/_react.default.createElement(_antd.Form.Item, {
|
|
125
161
|
name: item === null || item === void 0 ? void 0 : item.name,
|
|
126
162
|
label: item === null || item === void 0 ? void 0 : item.label,
|
|
@@ -130,7 +166,7 @@ function FormWidget(props) {
|
|
|
130
166
|
options: item === null || item === void 0 ? void 0 : item.value,
|
|
131
167
|
placeholder: item === null || item === void 0 ? void 0 : item.placeholder,
|
|
132
168
|
defaultValue: item.defaultValueRequired && (item === null || item === void 0 ? void 0 : item.defaultValue) !== "" ? item === null || item === void 0 ? void 0 : item.defaultValue : undefined,
|
|
133
|
-
disabled: (_item$
|
|
169
|
+
disabled: (_item$disabled2 = item.disabled) !== null && _item$disabled2 !== void 0 ? _item$disabled2 : false
|
|
134
170
|
}, (item === null || item === void 0 ? void 0 : item.onChange) && {
|
|
135
171
|
onChange: value => {
|
|
136
172
|
// Call the original onChange if provided
|
|
@@ -151,20 +187,22 @@ function FormWidget(props) {
|
|
|
151
187
|
},
|
|
152
188
|
showSearch: (_item$showSearch = item === null || item === void 0 ? void 0 : item.showSearch) !== null && _item$showSearch !== void 0 ? _item$showSearch : false,
|
|
153
189
|
filterOption: (input, option) => {
|
|
154
|
-
var _toLowerCase,
|
|
155
|
-
return (_toLowerCase = (
|
|
190
|
+
var _toLowerCase, _ref3, _option$label$props$t, _option$label, _input$toLowerCase;
|
|
191
|
+
return (_toLowerCase = (_ref3 = (_option$label$props$t = option === null || option === void 0 || (_option$label = option.label) === null || _option$label === void 0 || (_option$label = _option$label.props) === null || _option$label === void 0 ? void 0 : _option$label.title) !== null && _option$label$props$t !== void 0 ? _option$label$props$t : "").toLowerCase) === null || _toLowerCase === void 0 || (_toLowerCase = _toLowerCase.call(_ref3)) === null || _toLowerCase === void 0 ? void 0 : _toLowerCase.includes(input === null || input === void 0 || (_input$toLowerCase = input.toLowerCase) === null || _input$toLowerCase === void 0 ? void 0 : _input$toLowerCase.call(input));
|
|
156
192
|
}
|
|
157
193
|
}, item.optionLabelProp && {
|
|
158
194
|
optionLabelProp: (_item$optionLabelProp = item === null || item === void 0 ? void 0 : item.optionLabelProp) !== null && _item$optionLabelProp !== void 0 ? _item$optionLabelProp : ""
|
|
159
195
|
})));
|
|
160
196
|
}
|
|
161
197
|
if ((item === null || item === void 0 ? void 0 : item.widget) === "textArea") {
|
|
198
|
+
var _item$disabled3;
|
|
162
199
|
return /*#__PURE__*/_react.default.createElement(_antd.Form.Item, {
|
|
163
200
|
name: item === null || item === void 0 ? void 0 : item.name,
|
|
164
201
|
label: item === null || item === void 0 ? void 0 : item.label,
|
|
165
202
|
rules: item === null || item === void 0 ? void 0 : item.rules
|
|
166
203
|
}, /*#__PURE__*/_react.default.createElement(_CustomTextArea.default, {
|
|
167
204
|
rows: 4,
|
|
205
|
+
disabled: (_item$disabled3 = item.disabled) !== null && _item$disabled3 !== void 0 ? _item$disabled3 : false,
|
|
168
206
|
placeholder: item === null || item === void 0 ? void 0 : item.placeholder
|
|
169
207
|
}));
|
|
170
208
|
}
|
|
@@ -185,7 +223,7 @@ function FormWidget(props) {
|
|
|
185
223
|
return /*#__PURE__*/_react.default.createElement(_antd.Form.Item, {
|
|
186
224
|
name: "".concat(item === null || item === void 0 ? void 0 : item.name).concat(index ? index : ""),
|
|
187
225
|
label: renderLabelWithTooltip(item === null || item === void 0 ? void 0 : item.label, item === null || item === void 0 ? void 0 : item.tooltip),
|
|
188
|
-
rules: getFieldRules(item),
|
|
226
|
+
rules: getFieldRules(itemData, item),
|
|
189
227
|
extra: item === null || item === void 0 ? void 0 : item.helpText,
|
|
190
228
|
initialValue: item === null || item === void 0 ? void 0 : item.value
|
|
191
229
|
}, /*#__PURE__*/_react.default.createElement(_CustomInput.default, _extends({}, item === null || item === void 0 ? void 0 : item.props, {
|
|
@@ -198,13 +236,14 @@ function FormWidget(props) {
|
|
|
198
236
|
})));
|
|
199
237
|
}
|
|
200
238
|
if ((item === null || item === void 0 ? void 0 : item.widget) === "checkbox") {
|
|
201
|
-
var _item$rules, _item$className;
|
|
239
|
+
var _item$rules, _item$disabled4, _item$className;
|
|
202
240
|
return /*#__PURE__*/_react.default.createElement(_FormWidgetStyle.BgColorCheckBox, null, /*#__PURE__*/_react.default.createElement(_antd.Form.Item, {
|
|
203
241
|
name: "".concat(item === null || item === void 0 ? void 0 : item.name).concat(index ? index : ""),
|
|
204
242
|
rules: item === null || item === void 0 || (_item$rules = item.rules) === null || _item$rules === void 0 ? void 0 : _item$rules.map(r => (r === null || r === void 0 ? void 0 : r.checkValidator) && (r === null || r === void 0 ? void 0 : r.rule)).filter(Boolean),
|
|
205
243
|
valuePropName: "checked",
|
|
206
244
|
initialValue: item === null || item === void 0 ? void 0 : item.checked
|
|
207
245
|
}, /*#__PURE__*/_react.default.createElement(_CustomCheckBox.default, {
|
|
246
|
+
disabled: (_item$disabled4 = item.disabled) !== null && _item$disabled4 !== void 0 ? _item$disabled4 : false,
|
|
208
247
|
size: "large",
|
|
209
248
|
label: item === null || item === void 0 ? void 0 : item.label,
|
|
210
249
|
className: (_item$className = item === null || item === void 0 ? void 0 : item.className) !== null && _item$className !== void 0 ? _item$className : ""
|
|
@@ -242,7 +281,7 @@ function FormWidget(props) {
|
|
|
242
281
|
}
|
|
243
282
|
};
|
|
244
283
|
const renderWidget = item => {
|
|
245
|
-
var _item$value, _item$value2, _item$value2$map, _item$value3, _item$value4, _item$value5, _item$value6, _item$iconConfig, _item$subType, _item$
|
|
284
|
+
var _item$value, _item$value2, _item$value2$map, _item$value3, _item$value4, _item$value5, _item$value6, _item$iconConfig, _item$subType, _item$disabled5;
|
|
246
285
|
switch (item === null || item === void 0 ? void 0 : item.type) {
|
|
247
286
|
case "simpleList":
|
|
248
287
|
if ((item === null || item === void 0 || (_item$value = item.value) === null || _item$value === void 0 ? void 0 : _item$value.length) === 0) return null;
|
|
@@ -313,7 +352,8 @@ function FormWidget(props) {
|
|
|
313
352
|
key: item.key,
|
|
314
353
|
data: item.value,
|
|
315
354
|
info: keyValueInfo,
|
|
316
|
-
customClassName: item.className
|
|
355
|
+
customClassName: item.className,
|
|
356
|
+
tagStatus: item === null || item === void 0 ? void 0 : item.tagStatus
|
|
317
357
|
});
|
|
318
358
|
case "tag":
|
|
319
359
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -344,7 +384,7 @@ function FormWidget(props) {
|
|
|
344
384
|
}, /*#__PURE__*/_react.default.createElement(_CustomButton.default, _extends({
|
|
345
385
|
type: (_item$subType = item === null || item === void 0 ? void 0 : item.subType) !== null && _item$subType !== void 0 ? _item$subType : "primary",
|
|
346
386
|
label: item === null || item === void 0 ? void 0 : item.label,
|
|
347
|
-
disabled: (_item$
|
|
387
|
+
disabled: (_item$disabled5 = item === null || item === void 0 ? void 0 : item.disabled) !== null && _item$disabled5 !== void 0 ? _item$disabled5 : false,
|
|
348
388
|
onClick: () => {
|
|
349
389
|
if (item !== null && item !== void 0 && item.onClick) {
|
|
350
390
|
item.onClick(item === null || item === void 0 ? void 0 : item.action, item === null || item === void 0 ? void 0 : item.key);
|
|
@@ -401,13 +441,15 @@ function FormWidget(props) {
|
|
|
401
441
|
heading,
|
|
402
442
|
headingInfo,
|
|
403
443
|
items,
|
|
404
|
-
topDividerRequired
|
|
444
|
+
topDividerRequired
|
|
405
445
|
} = group;
|
|
406
446
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
|
|
407
447
|
key: index
|
|
408
|
-
}, bordered ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null,
|
|
448
|
+
}, bordered ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, topDividerRequired === true && /*#__PURE__*/_react.default.createElement(_antd.Divider, {
|
|
449
|
+
className: "dividerLine"
|
|
450
|
+
}), Heading(heading, headingInfo), /*#__PURE__*/_react.default.createElement(_FormWidgetStyle.FieldBoxBorder, null, items.map((item, i) => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
|
|
409
451
|
key: i
|
|
410
|
-
}, renderWidget(item))))) : /*#__PURE__*/_react.default.createElement(_FormWidgetStyle.FieldWithoutBorder, null, topDividerRequired && /*#__PURE__*/_react.default.createElement(_antd.Divider, {
|
|
452
|
+
}, renderWidget(item))))) : /*#__PURE__*/_react.default.createElement(_FormWidgetStyle.FieldWithoutBorder, null, topDividerRequired !== false && /*#__PURE__*/_react.default.createElement(_antd.Divider, {
|
|
411
453
|
className: "dividerLine"
|
|
412
454
|
}), Heading(heading, headingInfo), items.map((item, i) => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, {
|
|
413
455
|
key: i
|
|
@@ -456,6 +498,7 @@ function FormWidget(props) {
|
|
|
456
498
|
}
|
|
457
499
|
})), submit && /*#__PURE__*/_react.default.createElement(_antd.Form.Item, null, /*#__PURE__*/_react.default.createElement(_CustomButton.default, {
|
|
458
500
|
type: (_submit$type = submit === null || submit === void 0 ? void 0 : submit.type) !== null && _submit$type !== void 0 ? _submit$type : "primary",
|
|
501
|
+
disabled: (_submit$disabled = submit.disabled) !== null && _submit$disabled !== void 0 ? _submit$disabled : false,
|
|
459
502
|
onClick: () => {
|
|
460
503
|
var _form$validateFields3;
|
|
461
504
|
form === null || form === void 0 || (_form$validateFields3 = form.validateFields()) === null || _form$validateFields3 === void 0 || _form$validateFields3.then(value => {
|
|
@@ -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$
|
|
57
|
+
var _approvalForm$disable5, _actionContent$label, _approvalForm$disable6, _approvalForm$disable7, _approvalForm$disable8, _approvalForm$disable9, _approvalForm$remarks2, _approvalForm$disable10;
|
|
58
58
|
let {
|
|
59
59
|
children,
|
|
60
60
|
description,
|
|
@@ -134,6 +134,92 @@ function ApprovalWidget(_ref) {
|
|
|
134
134
|
return "";
|
|
135
135
|
}
|
|
136
136
|
};
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Renders the approval radio group with validation
|
|
140
|
+
* @param {boolean} isRequired - Whether the field is required
|
|
141
|
+
* @returns {React.ReactNode} Radio group component
|
|
142
|
+
*/
|
|
143
|
+
const renderApprovalRadioGroup = function renderApprovalRadioGroup() {
|
|
144
|
+
var _approvalForm$disable, _approvalForm$disable2;
|
|
145
|
+
let isRequired = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
146
|
+
return /*#__PURE__*/_react.default.createElement(_antd.Form.Item, {
|
|
147
|
+
name: "isApproved-".concat(questionId),
|
|
148
|
+
className: "custom-radio-group",
|
|
149
|
+
initialValue: isApproved,
|
|
150
|
+
rules: isRequired ? [{
|
|
151
|
+
required: true,
|
|
152
|
+
message: dataTest ? /*#__PURE__*/_react.default.createElement("span", {
|
|
153
|
+
"data-test": "".concat(dataTest, "--is-approved-validation-message")
|
|
154
|
+
}, "Approval status needs to be selected.") : "Approval status needs to be selected."
|
|
155
|
+
}] : []
|
|
156
|
+
}, /*#__PURE__*/_react.default.createElement(_CustomRadio.default.Group, {
|
|
157
|
+
"data-test": dataTest ? "".concat(dataTest, "--is-approved-radio-group") : undefined,
|
|
158
|
+
onChange: onRadioChange,
|
|
159
|
+
value: isApproved
|
|
160
|
+
}, /*#__PURE__*/_react.default.createElement(_CustomRadio.default, {
|
|
161
|
+
"data-test": dataTest ? "".concat(dataTest, "--is-approved-radio-yes") : undefined,
|
|
162
|
+
disabled: (_approvalForm$disable = approvalForm === null || approvalForm === void 0 ? void 0 : approvalForm.disabled) !== null && _approvalForm$disable !== void 0 ? _approvalForm$disable : false,
|
|
163
|
+
label: "Mark as Approved",
|
|
164
|
+
value: 1
|
|
165
|
+
}), /*#__PURE__*/_react.default.createElement(_CustomRadio.default, {
|
|
166
|
+
"data-test": dataTest ? "".concat(dataTest, "--is-approved-radio-no") : undefined,
|
|
167
|
+
disabled: (_approvalForm$disable2 = approvalForm === null || approvalForm === void 0 ? void 0 : approvalForm.disabled) !== null && _approvalForm$disable2 !== void 0 ? _approvalForm$disable2 : false,
|
|
168
|
+
label: "Mark as Pending",
|
|
169
|
+
value: 0
|
|
170
|
+
})));
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Renders the remarks textarea with validation
|
|
175
|
+
* @param {boolean} isRequired - Whether the field is required
|
|
176
|
+
* @returns {React.ReactNode} Remarks section component
|
|
177
|
+
*/
|
|
178
|
+
const renderRemarksSection = function renderRemarksSection() {
|
|
179
|
+
var _approvalForm$remarks, _approvalForm$disable3;
|
|
180
|
+
let isRequired = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
181
|
+
return isApproved === 0 && /*#__PURE__*/_react.default.createElement("section", null, /*#__PURE__*/_react.default.createElement("h5", {
|
|
182
|
+
className: "type-b2-400"
|
|
183
|
+
}, "Remarks"), /*#__PURE__*/_react.default.createElement(_antd.Form.Item, {
|
|
184
|
+
name: "remarks-".concat(questionId),
|
|
185
|
+
initialValue: (_approvalForm$remarks = approvalForm === null || approvalForm === void 0 ? void 0 : approvalForm.remarks) !== null && _approvalForm$remarks !== void 0 ? _approvalForm$remarks : "",
|
|
186
|
+
rules: isRequired ? [{
|
|
187
|
+
required: true,
|
|
188
|
+
message: dataTest ? /*#__PURE__*/_react.default.createElement("span", {
|
|
189
|
+
"data-test": "".concat(dataTest, "--remarks-validation-message")
|
|
190
|
+
}, "Remarks cannot be empty.") : "Remarks cannot be empty."
|
|
191
|
+
}] : []
|
|
192
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.Input.TextArea, {
|
|
193
|
+
"data-test": dataTest ? "".concat(dataTest, "--remarks") : undefined,
|
|
194
|
+
disabled: (_approvalForm$disable3 = approvalForm === null || approvalForm === void 0 ? void 0 : approvalForm.disabled) !== null && _approvalForm$disable3 !== void 0 ? _approvalForm$disable3 : false
|
|
195
|
+
})));
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* BUSINESS LOGIC: Two different radio implementations exist for different approval scenarios
|
|
200
|
+
*
|
|
201
|
+
* "radio" - MANDATORY APPROVAL: Always requires user to select approval status
|
|
202
|
+
* - Used when approval decision is compulsory (e.g., critical business processes)
|
|
203
|
+
* - Both approval status AND remarks (if pending) are mandatory
|
|
204
|
+
* - Cannot proceed without making a selection
|
|
205
|
+
*
|
|
206
|
+
* "radioOptional" - OPTIONAL APPROVAL: Approval status depends on isMandatory flag
|
|
207
|
+
* - Used when approval might be optional based on business rules
|
|
208
|
+
* - If isMandatory=true: Same behavior as "radio" (mandatory)
|
|
209
|
+
* - If isMandatory=false: User can skip approval selection
|
|
210
|
+
* - Provides flexibility for different approval workflows
|
|
211
|
+
*
|
|
212
|
+
* This separation allows the same component to handle both strict and flexible approval processes
|
|
213
|
+
*
|
|
214
|
+
* Renders the approval section based on action render type
|
|
215
|
+
* @returns {React.ReactNode} Approval section component
|
|
216
|
+
*/
|
|
217
|
+
const renderApprovalSection = () => {
|
|
218
|
+
const isRadioType = actionRenderType === "radio" || actionRenderType === "radioOptional";
|
|
219
|
+
if (!isRadioType) return null;
|
|
220
|
+
const isRequired = actionRenderType === "radio" || isMandatory;
|
|
221
|
+
return /*#__PURE__*/_react.default.createElement("div", null, renderApprovalRadioGroup(isRequired), renderRemarksSection(isRequired));
|
|
222
|
+
};
|
|
137
223
|
return /*#__PURE__*/_react.default.createElement(_styles.StyledContainer, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
138
224
|
className: "row"
|
|
139
225
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -147,14 +233,14 @@ function ApprovalWidget(_ref) {
|
|
|
147
233
|
typography: "type-b2-400",
|
|
148
234
|
color: "primary-content"
|
|
149
235
|
}, description)), !isQuestionStyleWidget && ((multipleDocDetails === null || multipleDocDetails === void 0 ? void 0 : multipleDocDetails.length) > 0 ? multipleDocDetails.map(docDetails => {
|
|
150
|
-
var _approvalForm$
|
|
236
|
+
var _approvalForm$disable4;
|
|
151
237
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
152
238
|
className: "oaCustomerResponse"
|
|
153
239
|
}, /*#__PURE__*/_react.default.createElement(_Typography.default, {
|
|
154
240
|
typography: "type-b2-400",
|
|
155
241
|
color: "secondary-content"
|
|
156
242
|
}, docDetails.documentTitle, " \xA0"), /*#__PURE__*/_react.default.createElement(_UploadDownloadWidget.default, _extends({
|
|
157
|
-
disabled: (_approvalForm$
|
|
243
|
+
disabled: (_approvalForm$disable4 = approvalForm === null || approvalForm === void 0 ? void 0 : approvalForm.disabled) !== null && _approvalForm$disable4 !== void 0 ? _approvalForm$disable4 : false,
|
|
158
244
|
"data-test": dataTest ? "".concat(dataTest, "--upload-download-widget") : undefined
|
|
159
245
|
}, docDetails, {
|
|
160
246
|
formName: isMandatory ? "file-".concat(questionId) : undefined
|
|
@@ -165,7 +251,7 @@ function ApprovalWidget(_ref) {
|
|
|
165
251
|
typography: "type-b2-400",
|
|
166
252
|
color: "secondary-content"
|
|
167
253
|
}, documentTitle, " \xA0"), /*#__PURE__*/_react.default.createElement(_UploadDownloadWidget.default, _extends({
|
|
168
|
-
disabled: (_approvalForm$
|
|
254
|
+
disabled: (_approvalForm$disable5 = approvalForm === null || approvalForm === void 0 ? void 0 : approvalForm.disabled) !== null && _approvalForm$disable5 !== void 0 ? _approvalForm$disable5 : false,
|
|
169
255
|
"data-test": dataTest ? "".concat(dataTest, "--upload-download-widget") : undefined
|
|
170
256
|
}, docDetails, {
|
|
171
257
|
formName: isMandatory ? "file-".concat(questionId) : undefined
|
|
@@ -240,49 +326,8 @@ function ApprovalWidget(_ref) {
|
|
|
240
326
|
typography: "type-b2-400",
|
|
241
327
|
color: "secondary-content"
|
|
242
328
|
}, (_actionContent$label = actionContent === null || actionContent === void 0 ? void 0 : actionContent.label) !== null && _actionContent$label !== void 0 ? _actionContent$label : "-")), actionRenderType === "button" && /*#__PURE__*/_react.default.createElement(_CustomButton.default, _extends({
|
|
243
|
-
disabled: (_approvalForm$disable3 = approvalForm === null || approvalForm === void 0 ? void 0 : approvalForm.disabled) !== null && _approvalForm$disable3 !== void 0 ? _approvalForm$disable3 : false
|
|
244
|
-
}, actionContent)), actionRenderType === "radio" &&
|
|
245
|
-
/*#__PURE__*/
|
|
246
|
-
//className="col-sm-12 col-md-4 col-lg-4"
|
|
247
|
-
_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_antd.Form.Item, {
|
|
248
|
-
name: "isApproved-".concat(questionId),
|
|
249
|
-
className: "custom-radio-group",
|
|
250
|
-
initialValue: isApproved,
|
|
251
|
-
rules: [{
|
|
252
|
-
required: true,
|
|
253
|
-
message: dataTest ? /*#__PURE__*/_react.default.createElement("span", {
|
|
254
|
-
"data-test": "".concat(dataTest, "--is-approved-validation-message")
|
|
255
|
-
}, "Approval status needs to be selected.") : "Approval status needs to be selected."
|
|
256
|
-
}]
|
|
257
|
-
}, /*#__PURE__*/_react.default.createElement(_CustomRadio.default.Group, {
|
|
258
|
-
"data-test": dataTest ? "".concat(dataTest, "--is-approved-radio-group") : undefined,
|
|
259
|
-
onChange: onRadioChange,
|
|
260
|
-
value: isApproved
|
|
261
|
-
}, /*#__PURE__*/_react.default.createElement(_CustomRadio.default, {
|
|
262
|
-
"data-test": dataTest ? "".concat(dataTest, "--is-approved-radio-yes") : undefined,
|
|
263
|
-
disabled: (_approvalForm$disable4 = approvalForm === null || approvalForm === void 0 ? void 0 : approvalForm.disabled) !== null && _approvalForm$disable4 !== void 0 ? _approvalForm$disable4 : false,
|
|
264
|
-
label: "Mark as Approved",
|
|
265
|
-
value: 1
|
|
266
|
-
}), /*#__PURE__*/_react.default.createElement(_CustomRadio.default, {
|
|
267
|
-
"data-test": dataTest ? "".concat(dataTest, "--is-approved-radio-no") : undefined,
|
|
268
|
-
disabled: (_approvalForm$disable5 = approvalForm === null || approvalForm === void 0 ? void 0 : approvalForm.disabled) !== null && _approvalForm$disable5 !== void 0 ? _approvalForm$disable5 : false,
|
|
269
|
-
label: "Mark as Pending",
|
|
270
|
-
value: 0
|
|
271
|
-
}))), isApproved === 0 && /*#__PURE__*/_react.default.createElement("section", null, /*#__PURE__*/_react.default.createElement("h5", {
|
|
272
|
-
className: "type-b2-400"
|
|
273
|
-
}, "Remarks"), /*#__PURE__*/_react.default.createElement(_antd.Form.Item, {
|
|
274
|
-
name: "remarks-".concat(questionId),
|
|
275
|
-
initialValue: (_approvalForm$remarks = approvalForm === null || approvalForm === void 0 ? void 0 : approvalForm.remarks) !== null && _approvalForm$remarks !== void 0 ? _approvalForm$remarks : "",
|
|
276
|
-
rules: [{
|
|
277
|
-
required: true,
|
|
278
|
-
message: dataTest ? /*#__PURE__*/_react.default.createElement("span", {
|
|
279
|
-
"data-test": "".concat(dataTest, "--remarks-validation-message")
|
|
280
|
-
}, "Remarks cannot be empty.") : "Remarks cannot be empty."
|
|
281
|
-
}]
|
|
282
|
-
}, /*#__PURE__*/_react.default.createElement(_antd.Input.TextArea, {
|
|
283
|
-
"data-test": dataTest ? "".concat(dataTest, "--remarks") : undefined,
|
|
284
329
|
disabled: (_approvalForm$disable6 = approvalForm === null || approvalForm === void 0 ? void 0 : approvalForm.disabled) !== null && _approvalForm$disable6 !== void 0 ? _approvalForm$disable6 : false
|
|
285
|
-
})))
|
|
330
|
+
}, actionContent)), renderApprovalSection(), actionRenderType === "buttonWithForm" && /*#__PURE__*/_react.default.createElement(_antd.Form.Item, {
|
|
286
331
|
validateStatus: form.getFieldError("validateDocumentButton#".concat(questionId)) ? "error" : "",
|
|
287
332
|
help: /*#__PURE__*/_react.default.createElement("div", {
|
|
288
333
|
className: "errorForRtv"
|
|
@@ -77,6 +77,9 @@ function KeyValueDataView(_ref) {
|
|
|
77
77
|
className: "type-b2-400",
|
|
78
78
|
title: value
|
|
79
79
|
}, value) || _react.default.isValidElement && /*#__PURE__*/_react.default.createElement("span", null, value), (tagStatus === null || tagStatus === void 0 ? void 0 : tagStatus.tagKey) === key && (tagStatus === null || tagStatus === void 0 ? void 0 : tagStatus.tagData) && /*#__PURE__*/_react.default.createElement(_CustomTag.default, {
|
|
80
|
+
style: {
|
|
81
|
+
width: "100px"
|
|
82
|
+
},
|
|
80
83
|
type: tagStatus.tagData.type || "success",
|
|
81
84
|
label: tagStatus.tagData.label,
|
|
82
85
|
size: tagStatus.tagData.size || "small"
|