| 150 | |
| 151 | // `handleCheckboxChange` is trigger when user enable/disable checkbox of respective type |
| 152 | const handleCheckboxChange = (index) => { |
| 153 | // // Create a copy of the signatureType array |
| 154 | // const updatedSignatureType = [...signatureType]; |
| 155 | // // Toggle the enabled value for the clicked item |
| 156 | // updatedSignatureType[index].enabled = !updatedSignatureType[index].enabled; |
| 157 | // // Update the state with the modified array |
| 158 | // setSignatureType(updatedSignatureType); |
| 159 | |
| 160 | setSignatureType((prev) => |
| 161 | prev.map((item, i) => |
| 162 | i === index ? { ...item, enabled: !item.enabled } : item |
| 163 | ) |
| 164 | ); |
| 165 | }; |
| 166 | |
| 167 | // `handleSave` is used save updated value signature type |
| 168 | const handleSave = withSessionValidation(async () => { |