cleanup
This commit is contained in:
parent
03710dfdae
commit
9a1ff79f66
43 changed files with 264 additions and 92 deletions
|
@ -1,6 +1,10 @@
|
|||
<template>
|
||||
<div class="relative w-full md:max-w-md">
|
||||
<TrashIcon class="absolute top-3 right-3 w-5 h-5 cursor-pointer" @click="deleteCalendar" />
|
||||
<TrashIcon
|
||||
v-if="can('delete', 'club', 'calendar')"
|
||||
class="absolute top-3 right-3 w-5 h-5 cursor-pointer"
|
||||
@click="deleteCalendar"
|
||||
/>
|
||||
<div class="flex flex-col items-center">
|
||||
<p class="text-xl font-medium">Termintyp erstellen</p>
|
||||
</div>
|
||||
|
@ -191,6 +195,7 @@ import { useCalendarTypeStore } from "@/stores/admin/calendarType";
|
|||
import type { CalendarTypeViewModel } from "@/viewmodels/admin/calendarType.models";
|
||||
import cloneDeep from "lodash.clonedeep";
|
||||
import isEqual from "lodash.isEqual";
|
||||
import { useAbilityStore } from "@/stores/ability";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
|
@ -208,6 +213,7 @@ export default defineComponent({
|
|||
...mapState(useModalStore, ["data"]),
|
||||
...mapState(useCalendarStore, ["calendars"]),
|
||||
...mapState(useCalendarTypeStore, ["calendarTypes"]),
|
||||
...mapState(useAbilityStore, ["can"]),
|
||||
canSaveOrReset(): boolean {
|
||||
return isEqual(this.origin, this.calendar);
|
||||
},
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
<div class="flex flex-col h-fit w-full border border-primary rounded-md">
|
||||
<div class="bg-primary p-2 text-white flex flex-row gap-2 justify-between items-center">
|
||||
<p class="grow">{{ award.award }}</p>
|
||||
<PencilIcon class="w-5 h-5 cursor-pointer" @click="openEditModal" />
|
||||
<TrashIcon class="w-5 h-5 cursor-pointer" @click="openDeleteModal" />
|
||||
<PencilIcon v-if="can('update', 'club', 'member')" class="w-5 h-5 cursor-pointer" @click="openEditModal" />
|
||||
<TrashIcon v-if="can('delete', 'club', 'member')" class="w-5 h-5 cursor-pointer" @click="openDeleteModal" />
|
||||
</div>
|
||||
<div class="p-2">
|
||||
<p>erhalten am: {{ award.date }}</p>
|
||||
|
@ -19,6 +19,7 @@ import { mapState, mapActions } from "pinia";
|
|||
import type { MemberAwardViewModel } from "@/viewmodels/admin/memberAward.models";
|
||||
import { PencilIcon, TrashIcon } from "@heroicons/vue/24/outline";
|
||||
import { useModalStore } from "@/stores/modal";
|
||||
import { useAbilityStore } from "@/stores/ability";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
|
@ -29,6 +30,9 @@ export default defineComponent({
|
|||
default: {},
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
...mapState(useAbilityStore, ["can"]),
|
||||
},
|
||||
methods: {
|
||||
...mapActions(useModalStore, ["openModal"]),
|
||||
openEditModal() {
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
<div class="bg-primary p-2 text-white flex flex-row gap-2 justify-between items-center">
|
||||
<EnvelopeIcon class="h-5 w-5 pr-1 box-content" v-if="communication.isNewsletterMain" />
|
||||
<p class="grow">{{ communication.type.type }} {{ communication.preferred ? "(bevorzugt)" : "" }}</p>
|
||||
<PencilIcon class="w-5 h-5 cursor-pointer" @click="openEditModal" />
|
||||
<TrashIcon class="w-5 h-5 cursor-pointer" @click="openDeleteModal" />
|
||||
<PencilIcon v-if="can('update', 'club', 'member')" class="w-5 h-5 cursor-pointer" @click="openEditModal" />
|
||||
<TrashIcon v-if="can('delete', 'club', 'member')" class="w-5 h-5 cursor-pointer" @click="openDeleteModal" />
|
||||
</div>
|
||||
<div class="p-2">
|
||||
<p v-for="field in communication.type.fields" :key="field">{{ field }}: {{ communication[field] || "--" }}</p>
|
||||
|
@ -18,6 +18,7 @@ import { mapState, mapActions } from "pinia";
|
|||
import type { CommunicationViewModel } from "@/viewmodels/admin/communication.models";
|
||||
import { EnvelopeIcon, PencilIcon, TrashIcon } from "@heroicons/vue/24/outline";
|
||||
import { useModalStore } from "@/stores/modal";
|
||||
import { useAbilityStore } from "@/stores/ability";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
|
@ -28,6 +29,9 @@ export default defineComponent({
|
|||
default: {},
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
...mapState(useAbilityStore, ["can"]),
|
||||
},
|
||||
methods: {
|
||||
...mapActions(useModalStore, ["openModal"]),
|
||||
openEditModal() {
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
<div class="flex flex-col h-fit w-full border border-primary rounded-md">
|
||||
<div class="bg-primary p-2 text-white flex flex-row gap-2 justify-between items-center">
|
||||
<p class="grow">{{ position.executivePosition }} von {{ position.start }} bis {{ position.end ?? "heute" }}</p>
|
||||
<PencilIcon class="w-5 h-5 cursor-pointer" @click="openEditModal" />
|
||||
<TrashIcon class="w-5 h-5 cursor-pointer" @click="openDeleteModal" />
|
||||
<PencilIcon v-if="can('update', 'club', 'member')" class="w-5 h-5 cursor-pointer" @click="openEditModal" />
|
||||
<TrashIcon v-if="can('delete', 'club', 'member')" class="w-5 h-5 cursor-pointer" @click="openDeleteModal" />
|
||||
</div>
|
||||
<div v-if="position.note" class="p-2">
|
||||
<p v-if="position.note">Notiz: {{ position.note }}</p>
|
||||
|
@ -17,6 +17,7 @@ import { mapState, mapActions } from "pinia";
|
|||
import type { MemberExecutivePositionViewModel } from "@/viewmodels/admin/memberExecutivePosition.models";
|
||||
import { PencilIcon, TrashIcon } from "@heroicons/vue/24/outline";
|
||||
import { useModalStore } from "@/stores/modal";
|
||||
import { useAbilityStore } from "@/stores/ability";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
|
@ -27,6 +28,9 @@ export default defineComponent({
|
|||
default: {},
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
...mapState(useAbilityStore, ["can"]),
|
||||
},
|
||||
methods: {
|
||||
...mapActions(useModalStore, ["openModal"]),
|
||||
openEditModal() {
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
<p class="grow">
|
||||
{{ qualification.qualification }} von {{ qualification.start }} bis {{ qualification.end ?? "heute" }}
|
||||
</p>
|
||||
<PencilIcon class="w-5 h-5 cursor-pointer" @click="openEditModal" />
|
||||
<TrashIcon class="w-5 h-5 cursor-pointer" @click="openDeleteModal" />
|
||||
<PencilIcon v-if="can('update', 'club', 'member')" class="w-5 h-5 cursor-pointer" @click="openEditModal" />
|
||||
<TrashIcon v-if="can('delete', 'club', 'member')" class="w-5 h-5 cursor-pointer" @click="openDeleteModal" />
|
||||
</div>
|
||||
<div v-if="qualification.note || qualification.terminationReason" class="p-2">
|
||||
<p v-if="qualification.note">Notiz: {{ qualification.note }}</p>
|
||||
|
@ -20,6 +20,7 @@ import { mapState, mapActions } from "pinia";
|
|||
import type { MemberQualificationViewModel } from "@/viewmodels/admin/memberQualification.models";
|
||||
import { PencilIcon, TrashIcon } from "@heroicons/vue/24/outline";
|
||||
import { useModalStore } from "@/stores/modal";
|
||||
import { useAbilityStore } from "@/stores/ability";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
|
@ -30,6 +31,9 @@ export default defineComponent({
|
|||
default: {},
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
...mapState(useAbilityStore, ["can"]),
|
||||
},
|
||||
methods: {
|
||||
...mapActions(useModalStore, ["openModal"]),
|
||||
openEditModal() {
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
{{ membership.start }} bis {{ membership.end ?? "heute" }}:
|
||||
{{ membership.status }}
|
||||
</p>
|
||||
<PencilIcon class="w-5 h-5 cursor-pointer" @click="openEditModal" />
|
||||
<TrashIcon class="w-5 h-5 cursor-pointer" @click="openDeleteModal" />
|
||||
<PencilIcon v-if="can('update', 'club', 'member')" class="w-5 h-5 cursor-pointer" @click="openEditModal" />
|
||||
<TrashIcon v-if="can('delete', 'club', 'member')" class="w-5 h-5 cursor-pointer" @click="openDeleteModal" />
|
||||
</div>
|
||||
<div v-if="membership.terminationReason || membership.internalId" class="p-2">
|
||||
<p v-if="membership.internalId">Interne ID: {{ membership.internalId }}</p>
|
||||
|
@ -21,6 +21,7 @@ import { mapState, mapActions } from "pinia";
|
|||
import type { MembershipViewModel } from "@/viewmodels/admin/membership.models";
|
||||
import { PencilIcon, TrashIcon } from "@heroicons/vue/24/outline";
|
||||
import { useModalStore } from "@/stores/modal";
|
||||
import { useAbilityStore } from "@/stores/ability";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
|
@ -31,6 +32,9 @@ export default defineComponent({
|
|||
default: {},
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
...mapState(useAbilityStore, ["can"]),
|
||||
},
|
||||
methods: {
|
||||
...mapActions(useModalStore, ["openModal"]),
|
||||
openEditModal() {
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
>
|
||||
<PencilIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
|
||||
</RouterLink>
|
||||
<div v-if="can('delete', 'user', 'user')" @click="openDeleteModal">
|
||||
<div v-if="can('delete', 'user', 'role')" @click="openDeleteModal">
|
||||
<TrashIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -45,7 +45,8 @@ import { useModalStore } from "@/stores/modal";
|
|||
import Spinner from "@/components/Spinner.vue";
|
||||
import SuccessCheckmark from "@/components/SuccessCheckmark.vue";
|
||||
import FailureXMark from "@/components/FailureXMark.vue";
|
||||
import { useUserStore } from "@/stores/admin/user";
|
||||
import { useInviteStore } from "@/stores/admin/invite";
|
||||
import type { CreateInviteViewModel } from "@/viewmodels/admin/invite.models";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
|
@ -66,16 +67,17 @@ export default defineComponent({
|
|||
},
|
||||
methods: {
|
||||
...mapActions(useModalStore, ["closeModal"]),
|
||||
...mapActions(useInviteStore, ["createInvite"]),
|
||||
invite(e: any) {
|
||||
let formData = e.target.elements;
|
||||
this.status = "loading";
|
||||
this.$http
|
||||
.post(`/admin/invite`, {
|
||||
username: formData.username.value,
|
||||
mail: formData.mail.value,
|
||||
firstname: formData.firstname.value,
|
||||
lastname: formData.lastname.value,
|
||||
})
|
||||
let createInvite: CreateInviteViewModel = {
|
||||
username: formData.username.value,
|
||||
mail: formData.mail.value,
|
||||
firstname: formData.firstname.value,
|
||||
lastname: formData.lastname.value,
|
||||
};
|
||||
this.createInvite(createInvite)
|
||||
.then((result) => {
|
||||
this.status = { status: "success" };
|
||||
})
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<UserGroupIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
|
||||
</RouterLink>
|
||||
<RouterLink
|
||||
v-if="can('admin', 'user') && false"
|
||||
v-if="can('admin', 'user', 'user')"
|
||||
:to="{ name: 'admin-user-user-permission', params: { id: user.id } }"
|
||||
>
|
||||
<WrenchScrewdriverIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue