Added actions / cancel to alert modals
This commit is contained in:
@@ -17,7 +17,7 @@ watch(isDeleteEventModalOpen, (hasOpened, _o) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
async function handleSubmit() {
|
async function handleAction() {
|
||||||
try {
|
try {
|
||||||
await deleteEventFromSkeleton()
|
await deleteEventFromSkeleton()
|
||||||
|
|
||||||
@@ -46,21 +46,24 @@ async function handleSubmit() {
|
|||||||
Les données associés à cet évènement seront supprimées et vous ne pourrez plus les récupérer !
|
Les données associés à cet évènement seront supprimées et vous ne pourrez plus les récupérer !
|
||||||
</UiAlertDialogDescription>
|
</UiAlertDialogDescription>
|
||||||
|
|
||||||
<form @submit.prevent="handleSubmit">
|
<form>
|
||||||
<div class="grid grid-cols-2 gap-y-4">
|
<div class="grid grid-cols-2 gap-y-4">
|
||||||
<div class="text-red-500 ml-8">
|
<div class="text-red-500 ml-8">
|
||||||
<span class="text-sm">
|
<span class="text-sm">
|
||||||
{{ formErrors.message }}
|
{{ formErrors.message }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="text-right">
|
|
||||||
<UiButton size="sm" type="submit" variant="destructive">
|
|
||||||
Supprimer
|
|
||||||
</UiButton>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
<UiAlertDialogFooter>
|
||||||
|
<UiAlertDialogCancel>
|
||||||
|
Annuler
|
||||||
|
</UiAlertDialogCancel>
|
||||||
|
<UiAlertDialogAction class="destructive" @click="handleAction">
|
||||||
|
Supprimer
|
||||||
|
</UiAlertDialogAction>
|
||||||
|
</UiAlertDialogFooter>
|
||||||
</UiAlertDialogContent>
|
</UiAlertDialogContent>
|
||||||
</UiAlertDialog>
|
</UiAlertDialog>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ watch(isEditEventModalOpen, (hasOpened, _o) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
async function handleSubmit() {
|
async function handleAction() {
|
||||||
try {
|
try {
|
||||||
await updateEventFromSkeleton()
|
await updateEventFromSkeleton()
|
||||||
|
|
||||||
@@ -51,7 +51,7 @@ async function handleSubmit() {
|
|||||||
</UiAlertDialogDescription>
|
</UiAlertDialogDescription>
|
||||||
</VisuallyHidden>
|
</VisuallyHidden>
|
||||||
|
|
||||||
<form @submit.prevent="handleSubmit">
|
<form>
|
||||||
<div class="grid grid-cols-2 gap-y-4">
|
<div class="grid grid-cols-2 gap-y-4">
|
||||||
<div class="col-span-2 ml-8">
|
<div class="col-span-2 ml-8">
|
||||||
<input
|
<input
|
||||||
@@ -100,17 +100,16 @@ async function handleSubmit() {
|
|||||||
{{ formErrors.message }}
|
{{ formErrors.message }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex gap-2 justify-end">
|
|
||||||
<UiButton size="sm" type="button" variant="secondary">
|
|
||||||
Annuler
|
|
||||||
</UiButton>
|
|
||||||
<UiButton size="sm" type="submit">
|
|
||||||
Sauvegarder
|
|
||||||
</UiButton>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
<UiAlertDialogFooter>
|
||||||
|
<UiAlertDialogCancel>
|
||||||
|
Annuler
|
||||||
|
</UiAlertDialogCancel>
|
||||||
|
<UiAlertDialogAction @click="handleAction">
|
||||||
|
Sauvegarder
|
||||||
|
</UiAlertDialogAction>
|
||||||
|
</UiAlertDialogFooter>
|
||||||
</UiAlertDialogContent>
|
</UiAlertDialogContent>
|
||||||
</UiAlertDialog>
|
</UiAlertDialog>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
Reference in New Issue
Block a user