Add a confirmation dialog before deleting a guest
Some checks failed
Check usage of free licenses / build-static-assets (pull_request) Successful in 1m44s
Add copyright notice / copyright_notice (pull_request) Successful in 2m24s
Build Nginx-based docker image / build-static-assets (push) Successful in 8m30s
Playwright Tests / test (pull_request) Failing after 8m55s
Some checks failed
Check usage of free licenses / build-static-assets (pull_request) Successful in 1m44s
Add copyright notice / copyright_notice (pull_request) Successful in 2m24s
Build Nginx-based docker image / build-static-assets (push) Successful in 8m30s
Playwright Tests / test (pull_request) Failing after 8m55s
This commit is contained in:
parent
8306cfe249
commit
471b98fb53
@ -48,7 +48,12 @@ export default function guestsTable({ guests, onUpdate, onEdit }: {
|
|||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<div className="flex flex-row items-center">
|
<div className="flex flex-row items-center">
|
||||||
<TrashIcon className='size-6 cursor-pointer' onClick={() => { api.destroy(serializer, guest, onUpdate)}} />
|
<TrashIcon className='size-6 cursor-pointer' onClick={() => {
|
||||||
|
if (window.confirm(`Are you sure you want to delete guest "${guest.name}"?`)) {
|
||||||
|
api.destroy(serializer, guest, onUpdate)
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
/>
|
||||||
<PencilIcon className='size-6 cursor-pointer' onClick={() => onEdit(guest)} />
|
<PencilIcon className='size-6 cursor-pointer' onClick={() => onEdit(guest)} />
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user