()
| 1191 | }; |
| 1192 | //function to add default signature for all requested placeholder of sign |
| 1193 | const addDefaultSignature = async () => { |
| 1194 | const type = defaultSignAlert?.type; |
| 1195 | //get current signers placeholder position data |
| 1196 | const currentSignerPosition = signerPos?.filter( |
| 1197 | (data) => data.signerObjId === signerObjectId |
| 1198 | ); |
| 1199 | const defaultSign = type === "signature" ? defaultSignImg : myInitial; |
| 1200 | const placeHolder = currentSignerPosition[0].placeHolder; |
| 1201 | const filename = type === "signature" ? "mysign" : "myinitials"; |
| 1202 | const signImg = await convertJpegToPng(defaultSign, filename); |
| 1203 | //function for save default signature url for all placeholder position |
| 1204 | const updatePlace = addDefaultSignatureImg(placeHolder, signImg, type); |
| 1205 | |
| 1206 | const updatesignerPos = signerPos.map((x) => |
| 1207 | x.signerObjId === signerObjectId ? { ...x, placeHolder: updatePlace } : x |
| 1208 | ); |
| 1209 | setSignerPos(updatesignerPos); |
| 1210 | setDefaultSignAlert({ isShow: false, alertMessage: "" }); |
| 1211 | }; |
| 1212 | const handleDontShow = (isChecked) => { |
| 1213 | setIsDontShow(isChecked); |
| 1214 | }; |
no test coverage detected