This commit is contained in:
Julian Krauser 2024-11-24 15:31:08 +01:00
parent 03710dfdae
commit 9a1ff79f66
43 changed files with 264 additions and 92 deletions

View file

@ -27,6 +27,7 @@
autocomplete="off"
v-model="item.topic"
@keyup.prevent
:disabled="!can('create', 'club', 'protocol')"
/>
</summary>
<QuillEditor
@ -37,11 +38,15 @@
contentType="html"
:toolbar="toolbarOptions"
v-model:content="item.context"
:enable="can('create', 'club', 'protocol')"
:style="!can('create', 'club', 'protocol') ? 'opacity: 75%; background: rgb(243 244 246)' : ''"
/>
</details>
</div>
<button primary class="!w-fit" @click="createProtocolDecision">Eintrag hinzufügen</button>
<button v-if="can('create', 'club', 'protocol')" primary class="!w-fit" @click="createProtocolDecision">
Eintrag hinzufügen
</button>
</div>
</template>
@ -53,7 +58,8 @@ import { useProtocolStore } from "@/stores/admin/protocol";
import { QuillEditor } from "@vueup/vue-quill";
import "@vueup/vue-quill/dist/vue-quill.snow.css";
import { toolbarOptions } from "@/helpers/quillConfig";
import { useProtocolDecisionStore } from "../../../../stores/admin/protocolDecision";
import { useProtocolDecisionStore } from "@/stores/admin/protocolDecision";
import { useAbilityStore } from "@/stores/ability";
</script>
<script lang="ts">
@ -63,6 +69,7 @@ export default defineComponent({
},
computed: {
...mapWritableState(useProtocolDecisionStore, ["decision", "loading"]),
...mapState(useAbilityStore, ["can"]),
},
mounted() {
this.fetchProtocolDecision();