update add row whatsapp on manage notification

This commit is contained in:
Raja Oktafrianto
2025-05-17 13:56:45 +07:00
parent 02fed7c67f
commit 248e41d4a8
2 changed files with 51 additions and 2 deletions

View File

@ -339,6 +339,17 @@ const AddDialog = () => {
/>
<span>E-Mail</span>
</label>
<label className="flex items-center space-x-2">
<input
type="radio"
name="via"
value="whatsapp"
checked={formField.via === 'whatsapp'}
onChange={handleChange}
className="accent-blue-600"
/>
<span>WhatsApp</span>
</label>
</div>
</div>
{errors.via && (
@ -350,6 +361,29 @@ const AddDialog = () => {
)}
</div>
<div className="w-full">
<div className="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label className="form-label flex items-center gap-1 max-w-56">
Number WhatsApp
</label>
<Input
className="input col-span-6"
name="content"
placeholder="Enter OTP (5 digits)"
value={formField.content}
onChange={(e) => {
const value = e.target.value;
if (/^\d{0,5}$/.test(value)) {
handleChange(e);
}
}}
disabled={formField.via !== 'whatsapp'}
inputMode="numeric"
pattern="\d*"
/>
</div>
</div>
<div className="w-full">
<div className="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label className="form-label flex items-center gap-1 max-w-56">Subject</label>