diff --git a/apps/OpenSign/src/components/pdf/DropdownWidgetOption.js b/apps/OpenSign/src/components/pdf/DropdownWidgetOption.js index 19d616dc9..1d9b2f415 100644 --- a/apps/OpenSign/src/components/pdf/DropdownWidgetOption.js +++ b/apps/OpenSign/src/components/pdf/DropdownWidgetOption.js @@ -1,6 +1,7 @@ import React, { useEffect, useState } from "react"; import { themeColor } from "../../constant/const"; import ModalUi from "../../primitives/ModalUi"; +import { radioButtonWidget } from "../../constant/Utils"; function DropdownWidgetOption(props) { const [dropdownOptionList, setDropdownOptionList] = useState([ "option-1", @@ -143,7 +144,7 @@ function DropdownWidgetOption(props) { // styleClass={"dropdownModal"} isOpen={props.showDropdown} title={props.title} - closeOff={true} + showClose={false} >
- {["checkbox", "radio"].includes(props.type) && + {["checkbox", radioButtonWidget].includes(props.type) && !props.isSignYourself && (
- {props.type === "checkbox" && !props.isSignYourself && ( - <> - - { - const count = handleSetMinMax(e); - setMinCount(count); - }} - className="drodown-input" - /> - - { - const count = handleSetMinMax(e); - setMaxCount(count); - }} - className="drodown-input" - /> - - )}
))} - + {props.type === "checkbox" && !props.isSignYourself && ( + <> + + { + const count = handleSetMinMax(e); + setMinCount(count); + }} + className="drodown-input" + /> + + { + const count = handleSetMinMax(e); + setMaxCount(count); + }} + className="drodown-input" + /> + + )}
- {["dropdown", "radio"].includes(props.type) && ( + {["dropdown", radioButtonWidget].includes(props.type) && ( <>
); - case "text": + case textInputWidget: return props.isSignYourself || (props.isNeedSign && props.data?.signerObjId === props.signerObjId) ? ( )} disabled={ - props.isNeedSign && props.data?.signerObjId !== props.signerObjId + props.isPlaceholder || + (props.isNeedSign && + props.data?.signerObjId !== props.signerObjId) } onBlur={handleInputBlur} closeOnScroll={true} className="inputPlaceholder" style={{ outlineColor: "#007bff" }} selected={ - startDate - ? startDate + props?.startDate + ? props?.startDate : props.pos.options?.response && new Date(props.pos.options.response) } - onChange={(date) => { - setStartDate(date); - }} + onChange={(date) => handleOnDateChange(date)} popperPlacement="top-end" customInput={} dateFormat={ @@ -661,7 +641,7 @@ function PlaceholderType(props) { ? props.selectDate?.format : props.pos?.options?.validation?.format ? props.pos?.options?.validation?.format - : "MM/dd/YYYY" + : "MM/dd/yyyy" } /> @@ -721,7 +701,7 @@ function PlaceholderType(props) { {type} ); - case "radio": + case radioButtonWidget: return (
{props.pos.options?.values.map((data, ind) => { @@ -752,12 +732,14 @@ function PlaceholderType(props) { })}
); - case "label": + case textWidget: return (