File tree Expand file tree Collapse file tree 4 files changed +21
-23
lines changed Expand file tree Collapse file tree 4 files changed +21
-23
lines changed Original file line number Diff line number Diff line change 11<script setup>
2- import { Link } from " @inertiajs/vue3"
2+ import { useForm } from " @inertiajs/vue3"
33import BaseButton from " @/Components/BaseButton.vue"
44import BaseButtons from " @/Components/BaseButtons.vue"
55import {
@@ -25,6 +25,14 @@ const props = defineProps({
2525 default: 0
2626 },
2727})
28+
29+ const formDelete = useForm ({})
30+
31+ function destroy (id ) {
32+ if (confirm (" Are you sure you want to delete?" )) {
33+ formDelete .delete (route (" admin.category.type.item.destroy" , {type: props .categoryType .id , item: id}))
34+ }
35+ }
2836 </script >
2937
3038<template >
Original file line number Diff line number Diff line change 11<script setup>
2- import { Link } from " @inertiajs/vue3"
2+ import { useForm } from " @inertiajs/vue3"
33import BaseButton from " @/Components/BaseButton.vue"
44import BaseButtons from " @/Components/BaseButtons.vue"
55import BaseIcon from ' @/Components/BaseIcon.vue'
@@ -26,6 +26,15 @@ const props = defineProps({
2626 default: 0
2727 },
2828})
29+
30+ const formDelete = useForm ({})
31+
32+ function destroy (id ) {
33+ if (confirm (" Are you sure you want to delete?" )) {
34+ formDelete .delete (route (" admin.menu.item.destroy" , {menu: props .menu .id , item: id}))
35+ }
36+ }
37+
2938 </script >
3039
3140<template >
@@ -36,7 +45,6 @@ const props = defineProps({
3645 v-if =" item.icon"
3746 :path =" item.icon"
3847 class =" flex-none"
39- :class =" activeInactiveStyle"
4048 :size =" 18"
4149 />
4250 {{ item.name }}
Original file line number Diff line number Diff line change 11<script setup>
2- import { Head , useForm } from " @inertiajs/vue3"
2+ import { Head } from " @inertiajs/vue3"
33import {
44 mdiLink ,
55 mdiPlus ,
@@ -30,14 +30,6 @@ const props = defineProps({
3030 },
3131})
3232
33- const formDelete = useForm ({})
34-
35- function destroy (id ) {
36- if (confirm (" Are you sure you want to delete?" )) {
37- formDelete .delete (route (" admin.category.type.item.destroy" , {type: props .categoryType .id , item: id}))
38- }
39- }
40-
4133 </script >
4234
4335<template >
Original file line number Diff line number Diff line change 11<script setup>
2- import { Head , Link , useForm } from " @inertiajs/vue3"
2+ import { Head } from " @inertiajs/vue3"
33import {
44 mdiLink ,
55 mdiPlus ,
6- mdiSquareEditOutline ,
7- mdiTrashCan ,
86 mdiAlertBoxOutline ,
97 mdiArrowLeftBoldOutline
108} from " @mdi/js"
@@ -32,14 +30,6 @@ const props = defineProps({
3230 },
3331})
3432
35- const formDelete = useForm ({})
36-
37- function destroy (id ) {
38- if (confirm (" Are you sure you want to delete?" )) {
39- formDelete .delete (route (" admin.menu.item.destroy" , {menu: props .menu .id , item: id}))
40- }
41- }
42-
4333 </script >
4434
4535<template >
You can’t perform that action at this time.
0 commit comments