@djb25/digit-ui-module-fsm 1.0.22 → 1.0.23
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/dist/index.js +22 -0
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +22 -0
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -561,6 +561,28 @@ const SelectGender = _ref => {
|
|
|
561
561
|
if (isLoading) {
|
|
562
562
|
return /*#__PURE__*/React.createElement(Loader, null);
|
|
563
563
|
}
|
|
564
|
+
const isRegistry = window.location.pathname.includes("/registry/");
|
|
565
|
+
if (isRegistry) {
|
|
566
|
+
const selectedValue = (GenderData === null || GenderData === void 0 ? void 0 : GenderData.find(option => {
|
|
567
|
+
var _formData$config$key;
|
|
568
|
+
return option.code === ((formData === null || formData === void 0 ? void 0 : (_formData$config$key = formData[config.key]) === null || _formData$config$key === void 0 ? void 0 : _formData$config$key.code) || (formData === null || formData === void 0 ? void 0 : formData[config.key]) || (genderType === null || genderType === void 0 ? void 0 : genderType.code) || genderType);
|
|
569
|
+
})) || null;
|
|
570
|
+
return /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel$1, null, t(config.label), config.isMandatory ? /*#__PURE__*/React.createElement("span", {
|
|
571
|
+
className: "check-page-link-button"
|
|
572
|
+
}, " * ") : ""), /*#__PURE__*/React.createElement(Dropdown, {
|
|
573
|
+
className: "payment-form-text-input-correction",
|
|
574
|
+
isMandatory: config.isMandatory,
|
|
575
|
+
selected: selectedValue,
|
|
576
|
+
option: GenderData === null || GenderData === void 0 ? void 0 : GenderData.sort((a, b) => a.code.localeCompare(b.code)),
|
|
577
|
+
select: value => {
|
|
578
|
+
setGenderType(value);
|
|
579
|
+
onSelect(config.key, value);
|
|
580
|
+
},
|
|
581
|
+
optionKey: "i18nKey",
|
|
582
|
+
disable: config.disable,
|
|
583
|
+
t: t
|
|
584
|
+
}));
|
|
585
|
+
}
|
|
564
586
|
if (userType === "employee") {
|
|
565
587
|
return /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel$1, null, t(config.label)), /*#__PURE__*/React.createElement(Dropdown, {
|
|
566
588
|
className: "payment-form-text-input-correction",
|