enhance: enable deletion of protocol content
This commit is contained in:
parent
5b7a9a3ace
commit
2ce66da1d1
5 changed files with 124 additions and 9 deletions
|
@ -31,6 +31,16 @@
|
|||
:disabled="!can('create', 'club', 'protocol')"
|
||||
/>
|
||||
|
||||
<DoubleConfirmClick
|
||||
v-if="can('create', 'club', 'protocol')"
|
||||
light
|
||||
v-slot="{ isSensitive }"
|
||||
@click:submit="removeFromArray(item.id)"
|
||||
>
|
||||
<TrashIcon v-if="!isSensitive" class="h-5 w-5" />
|
||||
<TrashIconSolid v-else class="h-5 w-5" />
|
||||
</DoubleConfirmClick>
|
||||
|
||||
<div class="flex flex-col">
|
||||
<ChevronUpIcon
|
||||
v-if="index != 0"
|
||||
|
@ -73,7 +83,9 @@ import "@vueup/vue-quill/dist/vue-quill.snow.css";
|
|||
import { toolbarOptions } from "@/helpers/quillConfig";
|
||||
import { useProtocolAgendaStore } from "@/stores/admin/club/protocol/protocolAgenda";
|
||||
import { useAbilityStore } from "@/stores/ability";
|
||||
import { ChevronDownIcon, ChevronUpIcon } from "@heroicons/vue/24/outline";
|
||||
import { ChevronDownIcon, ChevronUpIcon, TrashIcon } from "@heroicons/vue/24/outline";
|
||||
import { TrashIcon as TrashIconSolid } from "@heroicons/vue/24/solid";
|
||||
import DoubleConfirmClick from "@/components/DoubleConfirmClick.vue";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
|
@ -109,6 +121,9 @@ export default defineComponent({
|
|||
});
|
||||
}
|
||||
},
|
||||
removeFromArray(thisId: number) {
|
||||
this.agenda = this.agenda.filter((item) => item.id !== thisId);
|
||||
},
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue