Merge pull request 'feature/#59-System-naming' (#68) from feature/#59-System-naming into develop
Reviewed-on: #68
This commit is contained in:
commit
8de919cbab
146 changed files with 632 additions and 526 deletions
|
@ -12,8 +12,10 @@
|
|||
:disableSubLink="true"
|
||||
/>
|
||||
<TopLevelLink
|
||||
v-else-if="routeName == 'account' || routeName.includes('account-') || routeName == 'docs' || routeName.includes('docs-')"
|
||||
:link="{ key: 'club', title: 'Zur Verwaltung', levelDefault: '' }"
|
||||
v-else-if="
|
||||
routeName == 'account' || routeName.includes('account-') || routeName == 'docs' || routeName.includes('docs-')
|
||||
"
|
||||
:link="{ key: 'club', title: 'Zur Admin Oberfläche', levelDefault: '' }"
|
||||
:disableSubLink="true"
|
||||
/>
|
||||
</div>
|
||||
|
|
|
@ -2,7 +2,9 @@
|
|||
<header class="flex flex-row h-16 min-h-16 justify-between p-3 md:px-5 bg-white shadow-sm">
|
||||
<RouterLink to="/" class="flex flex-row gap-2 align-bottom w-fit h-full">
|
||||
<img src="/Logo.png" alt="LOGO" class="h-full w-auto" />
|
||||
<h1 v-if="false" class="font-bold text-3xl w-fit whitespace-nowrap">{{config.app_name_overwrite || "FF Admin"}}</h1>
|
||||
<h1 v-if="false" class="font-bold text-3xl w-fit whitespace-nowrap">
|
||||
{{ config.app_name_overwrite || "FF Admin" }}
|
||||
</h1>
|
||||
</RouterLink>
|
||||
<div class="flex flex-row gap-2 items-center">
|
||||
<div v-if="authCheck" class="hidden md:flex flex-row gap-2 h-full align-middle">
|
||||
|
@ -13,8 +15,13 @@
|
|||
:link="item"
|
||||
/>
|
||||
<TopLevelLink
|
||||
v-else-if="routeName == 'account' || routeName.includes('account-') || routeName == 'docs' || routeName.includes('docs-')"
|
||||
:link="{ key: 'club', title: 'Zur Verwaltung', levelDefault: '' }"
|
||||
v-else-if="
|
||||
routeName == 'account' ||
|
||||
routeName.includes('account-') ||
|
||||
routeName == 'docs' ||
|
||||
routeName.includes('docs-')
|
||||
"
|
||||
:link="{ key: 'club', title: 'Zur Admin Oberfläche', levelDefault: '' }"
|
||||
:disable-sub-link="true"
|
||||
/>
|
||||
</div>
|
||||
|
@ -30,7 +37,7 @@ import { useAuthStore } from "@/stores/auth";
|
|||
import { useNavigationStore } from "@/stores/admin/navigation";
|
||||
import TopLevelLink from "./admin/TopLevelLink.vue";
|
||||
import UserMenu from "./UserMenu.vue";
|
||||
import { config } from "@/config"
|
||||
import { config } from "@/config";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
|
|
|
@ -73,11 +73,7 @@
|
|||
<br />
|
||||
<TextCopy :copyText="generatedLink" />
|
||||
<div v-if="selectedTypes.length != 0" class="flex flex-row gap-2 items-center">
|
||||
<input
|
||||
type="checkbox"
|
||||
id="nscdr"
|
||||
v-model="provideNSCDR"
|
||||
/>
|
||||
<input type="checkbox" id="nscdr" v-model="provideNSCDR" />
|
||||
<label for="nscdr">Standard-Typen trotz Auswahl ausliefern</label>
|
||||
</div>
|
||||
<br />
|
||||
|
@ -105,8 +101,8 @@ import { defineComponent } from "vue";
|
|||
import { mapState, mapActions } from "pinia";
|
||||
import { RouterLink } from "vue-router";
|
||||
import { useModalStore } from "@/stores/modal";
|
||||
import { useCalendarTypeStore } from "@/stores/admin/settings/calendarType";
|
||||
import type { CalendarTypeViewModel } from "@/viewmodels/admin/settings/calendarType.models";
|
||||
import { useCalendarTypeStore } from "@/stores/admin/configuration/calendarType";
|
||||
import type { CalendarTypeViewModel } from "@/viewmodels/admin/configuration/calendarType.models";
|
||||
import { Listbox, ListboxButton, ListboxOptions, ListboxOption, ListboxLabel } from "@headlessui/vue";
|
||||
import { CheckIcon, ChevronUpDownIcon } from "@heroicons/vue/20/solid";
|
||||
import TextCopy from "@/components/TextCopy.vue";
|
||||
|
@ -119,7 +115,7 @@ export default defineComponent({
|
|||
data() {
|
||||
return {
|
||||
selectedTypes: [] as Array<CalendarTypeViewModel>,
|
||||
provideNSCDR: false as boolean
|
||||
provideNSCDR: false as boolean,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
|
@ -133,7 +129,7 @@ export default defineComponent({
|
|||
},
|
||||
generatedLink() {
|
||||
let extend = this.selectedTypes.map((t) => [t.type, t.passphrase].filter((at) => at).join(":"));
|
||||
return `webcal://${host || window.location.host}/api/public/calendar${extend.length == 0 ? "" : "?types=" + extend.join("&types=")}${this.provideNSCDR && extend.length != 0 ? '&nscdr=true':''}`;
|
||||
return `webcal://${host || window.location.host}/api/public/calendar${extend.length == 0 ? "" : "?types=" + extend.join("&types=")}${this.provideNSCDR && extend.length != 0 ? "&nscdr=true" : ""}`;
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
|
|
|
@ -166,8 +166,8 @@ import { useCalendarStore } from "@/stores/admin/club/calendar";
|
|||
import type { CreateCalendarViewModel } from "@/viewmodels/admin/club/calendar.models";
|
||||
import { Listbox, ListboxButton, ListboxOptions, ListboxOption, ListboxLabel } from "@headlessui/vue";
|
||||
import { CheckIcon, ChevronUpDownIcon } from "@heroicons/vue/20/solid";
|
||||
import { useCalendarTypeStore } from "@/stores/admin/settings/calendarType";
|
||||
import type { CalendarTypeViewModel } from "@/viewmodels/admin/settings/calendarType.models";
|
||||
import { useCalendarTypeStore } from "@/stores/admin/configuration/calendarType";
|
||||
import type { CalendarTypeViewModel } from "@/viewmodels/admin/configuration/calendarType.models";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
|
|
|
@ -189,8 +189,8 @@ import type {
|
|||
} from "@/viewmodels/admin/club/calendar.models";
|
||||
import { Listbox, ListboxButton, ListboxOptions, ListboxOption, ListboxLabel } from "@headlessui/vue";
|
||||
import { CheckIcon, ChevronUpDownIcon, TrashIcon } from "@heroicons/vue/20/solid";
|
||||
import { useCalendarTypeStore } from "@/stores/admin/settings/calendarType";
|
||||
import type { CalendarTypeViewModel } from "@/viewmodels/admin/settings/calendarType.models";
|
||||
import { useCalendarTypeStore } from "@/stores/admin/configuration/calendarType";
|
||||
import type { CalendarTypeViewModel } from "@/viewmodels/admin/configuration/calendarType.models";
|
||||
import cloneDeep from "lodash.clonedeep";
|
||||
import isEqual from "lodash.isequal";
|
||||
import { useAbilityStore } from "@/stores/ability";
|
||||
|
|
|
@ -101,8 +101,8 @@ import { Listbox, ListboxButton, ListboxOptions, ListboxOption, ListboxLabel } f
|
|||
import { CheckIcon, ChevronUpDownIcon } from "@heroicons/vue/20/solid";
|
||||
import { useMemberStore } from "@/stores/admin/club/member/member";
|
||||
import type { CreateMemberViewModel } from "@/viewmodels/admin/club/member/member.models";
|
||||
import { useSalutationStore } from "../../../../stores/admin/settings/salutation";
|
||||
import type { SalutationViewModel } from "../../../../viewmodels/admin/settings/salutation.models";
|
||||
import { useSalutationStore } from "../../../../stores/admin/configuration/salutation";
|
||||
import type { SalutationViewModel } from "../../../../viewmodels/admin/configuration/salutation.models";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
|
|
|
@ -97,12 +97,12 @@ import SuccessCheckmark from "@/components/SuccessCheckmark.vue";
|
|||
import FailureXMark from "@/components/FailureXMark.vue";
|
||||
import { Listbox, ListboxButton, ListboxOptions, ListboxOption, ListboxLabel } from "@headlessui/vue";
|
||||
import { CheckIcon, ChevronUpDownIcon } from "@heroicons/vue/20/solid";
|
||||
import { useMembershipStatusStore } from "@/stores/admin/settings/membershipStatus";
|
||||
import type { MembershipStatusViewModel } from "@/viewmodels/admin/settings/membershipStatus.models";
|
||||
import { useMembershipStatusStore } from "@/stores/admin/configuration/membershipStatus";
|
||||
import type { MembershipStatusViewModel } from "@/viewmodels/admin/configuration/membershipStatus.models";
|
||||
import type { CreateMembershipViewModel } from "@/viewmodels/admin/club/member/membership.models";
|
||||
import { useMembershipStore } from "@/stores/admin/club/member/membership";
|
||||
import { useAwardStore } from "@/stores/admin/settings/award";
|
||||
import type { AwardViewModel } from "@/viewmodels/admin/settings/award.models";
|
||||
import { useAwardStore } from "@/stores/admin/configuration/award";
|
||||
import type { AwardViewModel } from "@/viewmodels/admin/configuration/award.models";
|
||||
import type { CreateMemberAwardViewModel } from "@/viewmodels/admin/club/member/memberAward.models";
|
||||
import { useMemberAwardStore } from "@/stores/admin/club/member/memberAward";
|
||||
</script>
|
||||
|
|
|
@ -100,7 +100,7 @@ import SuccessCheckmark from "@/components/SuccessCheckmark.vue";
|
|||
import FailureXMark from "@/components/FailureXMark.vue";
|
||||
import { Listbox, ListboxButton, ListboxOptions, ListboxOption, ListboxLabel } from "@headlessui/vue";
|
||||
import { CheckIcon, ChevronUpDownIcon } from "@heroicons/vue/20/solid";
|
||||
import { useAwardStore } from "@/stores/admin/settings/award";
|
||||
import { useAwardStore } from "@/stores/admin/configuration/award";
|
||||
import type {
|
||||
CreateMemberAwardViewModel,
|
||||
MemberAwardViewModel,
|
||||
|
|
|
@ -131,8 +131,8 @@ import { Listbox, ListboxButton, ListboxOptions, ListboxOption, ListboxLabel } f
|
|||
import { CheckIcon, ChevronUpDownIcon } from "@heroicons/vue/20/solid";
|
||||
import { useCommunicationStore } from "@/stores/admin/club/member/communication";
|
||||
import type { CreateCommunicationViewModel } from "@/viewmodels/admin/club/member/communication.models";
|
||||
import { useCommunicationTypeStore } from "@/stores/admin/settings/communicationType";
|
||||
import type { CommunicationTypeViewModel } from "@/viewmodels/admin/settings/communicationType.models";
|
||||
import { useCommunicationTypeStore } from "@/stores/admin/configuration/communicationType";
|
||||
import type { CommunicationTypeViewModel } from "@/viewmodels/admin/configuration/communicationType.models";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
|
|
|
@ -99,12 +99,12 @@ import SuccessCheckmark from "@/components/SuccessCheckmark.vue";
|
|||
import FailureXMark from "@/components/FailureXMark.vue";
|
||||
import { Listbox, ListboxButton, ListboxOptions, ListboxOption, ListboxLabel } from "@headlessui/vue";
|
||||
import { CheckIcon, ChevronUpDownIcon } from "@heroicons/vue/20/solid";
|
||||
import { useMembershipStatusStore } from "@/stores/admin/settings/membershipStatus";
|
||||
import type { MembershipStatusViewModel } from "@/viewmodels/admin/settings/membershipStatus.models";
|
||||
import { useMembershipStatusStore } from "@/stores/admin/configuration/membershipStatus";
|
||||
import type { MembershipStatusViewModel } from "@/viewmodels/admin/configuration/membershipStatus.models";
|
||||
import type { CreateMembershipViewModel } from "@/viewmodels/admin/club/member/membership.models";
|
||||
import { useMembershipStore } from "@/stores/admin/club/member/membership";
|
||||
import { useExecutivePositionStore } from "@/stores/admin/settings/executivePosition";
|
||||
import type { ExecutivePositionViewModel } from "@/viewmodels/admin/settings/executivePosition.models";
|
||||
import { useExecutivePositionStore } from "@/stores/admin/configuration/executivePosition";
|
||||
import type { ExecutivePositionViewModel } from "@/viewmodels/admin/configuration/executivePosition.models";
|
||||
import type { CreateMemberExecutivePositionViewModel } from "@/viewmodels/admin/club/member/memberExecutivePosition.models";
|
||||
import { useMemberExecutivePositionStore } from "@/stores/admin/club/member/memberExecutivePosition";
|
||||
</script>
|
||||
|
|
|
@ -106,7 +106,7 @@ import SuccessCheckmark from "@/components/SuccessCheckmark.vue";
|
|||
import FailureXMark from "@/components/FailureXMark.vue";
|
||||
import { Listbox, ListboxButton, ListboxOptions, ListboxOption, ListboxLabel } from "@headlessui/vue";
|
||||
import { CheckIcon, ChevronUpDownIcon } from "@heroicons/vue/20/solid";
|
||||
import { useExecutivePositionStore } from "@/stores/admin/settings/executivePosition";
|
||||
import { useExecutivePositionStore } from "@/stores/admin/configuration/executivePosition";
|
||||
import type {
|
||||
CreateMemberExecutivePositionViewModel,
|
||||
MemberExecutivePositionViewModel,
|
||||
|
|
|
@ -106,12 +106,12 @@ import SuccessCheckmark from "@/components/SuccessCheckmark.vue";
|
|||
import FailureXMark from "@/components/FailureXMark.vue";
|
||||
import { Listbox, ListboxButton, ListboxOptions, ListboxOption, ListboxLabel } from "@headlessui/vue";
|
||||
import { CheckIcon, ChevronUpDownIcon } from "@heroicons/vue/20/solid";
|
||||
import { useMembershipStatusStore } from "@/stores/admin/settings/membershipStatus";
|
||||
import type { MembershipStatusViewModel } from "@/viewmodels/admin/settings/membershipStatus.models";
|
||||
import { useMembershipStatusStore } from "@/stores/admin/configuration/membershipStatus";
|
||||
import type { MembershipStatusViewModel } from "@/viewmodels/admin/configuration/membershipStatus.models";
|
||||
import type { CreateMembershipViewModel } from "@/viewmodels/admin/club/member/membership.models";
|
||||
import { useMembershipStore } from "@/stores/admin/club/member/membership";
|
||||
import { useQualificationStore } from "@/stores/admin/settings/qualification";
|
||||
import type { QualificationViewModel } from "@/viewmodels/admin/settings/qualification.models";
|
||||
import { useQualificationStore } from "@/stores/admin/configuration/qualification";
|
||||
import type { QualificationViewModel } from "@/viewmodels/admin/configuration/qualification.models";
|
||||
import type { CreateMemberQualificationViewModel } from "@/viewmodels/admin/club/member/memberQualification.models";
|
||||
import { useMemberQualificationStore } from "@/stores/admin/club/member/memberQualification";
|
||||
</script>
|
||||
|
|
|
@ -41,7 +41,7 @@ import { useModalStore } from "@/stores/modal";
|
|||
import Spinner from "@/components/Spinner.vue";
|
||||
import SuccessCheckmark from "@/components/SuccessCheckmark.vue";
|
||||
import FailureXMark from "@/components/FailureXMark.vue";
|
||||
import { useQualificationStore } from "@/stores/admin/settings/qualification";
|
||||
import { useQualificationStore } from "@/stores/admin/configuration/qualification";
|
||||
import { useMemberQualificationStore } from "@/stores/admin/club/member/memberQualification";
|
||||
</script>
|
||||
|
||||
|
|
|
@ -107,7 +107,7 @@ import SuccessCheckmark from "@/components/SuccessCheckmark.vue";
|
|||
import FailureXMark from "@/components/FailureXMark.vue";
|
||||
import { Listbox, ListboxButton, ListboxOptions, ListboxOption, ListboxLabel } from "@headlessui/vue";
|
||||
import { CheckIcon, ChevronUpDownIcon } from "@heroicons/vue/20/solid";
|
||||
import { useQualificationStore } from "@/stores/admin/settings/qualification";
|
||||
import { useQualificationStore } from "@/stores/admin/configuration/qualification";
|
||||
import type {
|
||||
CreateMemberQualificationViewModel,
|
||||
MemberQualificationViewModel,
|
||||
|
|
|
@ -94,8 +94,8 @@ import SuccessCheckmark from "@/components/SuccessCheckmark.vue";
|
|||
import FailureXMark from "@/components/FailureXMark.vue";
|
||||
import { Listbox, ListboxButton, ListboxOptions, ListboxOption, ListboxLabel } from "@headlessui/vue";
|
||||
import { CheckIcon, ChevronUpDownIcon } from "@heroicons/vue/20/solid";
|
||||
import { useMembershipStatusStore } from "@/stores/admin/settings/membershipStatus";
|
||||
import type { MembershipStatusViewModel } from "@/viewmodels/admin/settings/membershipStatus.models";
|
||||
import { useMembershipStatusStore } from "@/stores/admin/configuration/membershipStatus";
|
||||
import type { MembershipStatusViewModel } from "@/viewmodels/admin/configuration/membershipStatus.models";
|
||||
import type { CreateMembershipViewModel } from "@/viewmodels/admin/club/member/membership.models";
|
||||
import { useMembershipStore } from "@/stores/admin/club/member/membership";
|
||||
</script>
|
||||
|
|
|
@ -103,7 +103,7 @@ import SuccessCheckmark from "@/components/SuccessCheckmark.vue";
|
|||
import FailureXMark from "@/components/FailureXMark.vue";
|
||||
import { Listbox, ListboxButton, ListboxOptions, ListboxOption, ListboxLabel } from "@headlessui/vue";
|
||||
import { CheckIcon, ChevronUpDownIcon } from "@heroicons/vue/20/solid";
|
||||
import { useMembershipStatusStore } from "@/stores/admin/settings/membershipStatus";
|
||||
import { useMembershipStatusStore } from "@/stores/admin/configuration/membershipStatus";
|
||||
import type {
|
||||
CreateMembershipViewModel,
|
||||
MembershipViewModel,
|
||||
|
|
|
@ -4,12 +4,12 @@
|
|||
<p>{{ award.award }}</p>
|
||||
<div class="flex flex-row">
|
||||
<RouterLink
|
||||
v-if="can('update', 'settings', 'award')"
|
||||
:to="{ name: 'admin-settings-award-edit', params: { id: award.id } }"
|
||||
v-if="can('update', 'configuration', 'award')"
|
||||
:to="{ name: 'admin-configuration-award-edit', params: { id: award.id } }"
|
||||
>
|
||||
<PencilIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
|
||||
</RouterLink>
|
||||
<div v-if="can('delete', 'settings', 'award')" @click="openDeleteModal">
|
||||
<div v-if="can('delete', 'configuration', 'award')" @click="openDeleteModal">
|
||||
<TrashIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
|
||||
</div>
|
||||
</div>
|
||||
|
@ -23,7 +23,7 @@ import { mapState, mapActions } from "pinia";
|
|||
import { PencilIcon, TrashIcon } from "@heroicons/vue/24/outline";
|
||||
import { useAbilityStore } from "@/stores/ability";
|
||||
import { useModalStore } from "@/stores/modal";
|
||||
import type { AwardViewModel } from "@/viewmodels/admin/settings/award.models";
|
||||
import type { AwardViewModel } from "@/viewmodels/admin/configuration/award.models";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
|
@ -38,7 +38,7 @@ export default defineComponent({
|
|||
...mapActions(useModalStore, ["openModal"]),
|
||||
openDeleteModal() {
|
||||
this.openModal(
|
||||
markRaw(defineAsyncComponent(() => import("@/components/admin/settings/award/DeleteAwardModal.vue"))),
|
||||
markRaw(defineAsyncComponent(() => import("@/components/admin/configuration/award/DeleteAwardModal.vue"))),
|
||||
this.award.id
|
||||
);
|
||||
},
|
|
@ -34,8 +34,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 { useAwardStore } from "@/stores/admin/settings/award";
|
||||
import type { CreateAwardViewModel } from "@/viewmodels/admin/settings/award.models";
|
||||
import { useAwardStore } from "@/stores/admin/configuration/award";
|
||||
import type { CreateAwardViewModel } from "@/viewmodels/admin/configuration/award.models";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
|
@ -31,8 +31,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 { useRoleStore } from "@/stores/admin/user/role";
|
||||
import { useAwardStore } from "@/stores/admin/settings/award";
|
||||
import { useRoleStore } from "@/stores/admin/management/role";
|
||||
import { useAwardStore } from "@/stores/admin/configuration/award";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
|
@ -11,12 +11,12 @@
|
|||
</div>
|
||||
<div class="flex flex-row">
|
||||
<RouterLink
|
||||
v-if="can('update', 'settings', 'calendar_type')"
|
||||
:to="{ name: 'admin-settings-calendar_type-edit', params: { id: calendarType.id } }"
|
||||
v-if="can('update', 'configuration', 'calendar_type')"
|
||||
:to="{ name: 'admin-configuration-calendar_type-edit', params: { id: calendarType.id } }"
|
||||
>
|
||||
<PencilIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
|
||||
</RouterLink>
|
||||
<div v-if="can('delete', 'settings', 'calendar_type')" @click="openDeleteModal">
|
||||
<div v-if="can('delete', 'configuration', 'calendar_type')" @click="openDeleteModal">
|
||||
<TrashIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
|
||||
</div>
|
||||
</div>
|
||||
|
@ -30,7 +30,7 @@ import { mapState, mapActions } from "pinia";
|
|||
import { PencilIcon, TrashIcon, EyeIcon } from "@heroicons/vue/24/outline";
|
||||
import { useAbilityStore } from "@/stores/ability";
|
||||
import { useModalStore } from "@/stores/modal";
|
||||
import type { CalendarTypeViewModel } from "@/viewmodels/admin/settings/calendarType.models";
|
||||
import type { CalendarTypeViewModel } from "@/viewmodels/admin/configuration/calendarType.models";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
|
@ -46,7 +46,9 @@ export default defineComponent({
|
|||
openDeleteModal() {
|
||||
this.openModal(
|
||||
markRaw(
|
||||
defineAsyncComponent(() => import("@/components/admin/settings/calendarType/DeleteCalendarTypeModal.vue"))
|
||||
defineAsyncComponent(
|
||||
() => import("@/components/admin/configuration/calendarType/DeleteCalendarTypeModal.vue")
|
||||
)
|
||||
),
|
||||
this.calendarType.id
|
||||
);
|
|
@ -47,8 +47,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 { useCalendarTypeStore } from "@/stores/admin/settings/calendarType";
|
||||
import type { CreateCalendarTypeViewModel } from "@/viewmodels/admin/settings/calendarType.models";
|
||||
import { useCalendarTypeStore } from "@/stores/admin/configuration/calendarType";
|
||||
import type { CreateCalendarTypeViewModel } from "@/viewmodels/admin/configuration/calendarType.models";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
|
@ -31,7 +31,7 @@ import { useModalStore } from "@/stores/modal";
|
|||
import Spinner from "@/components/Spinner.vue";
|
||||
import SuccessCheckmark from "@/components/SuccessCheckmark.vue";
|
||||
import FailureXMark from "@/components/FailureXMark.vue";
|
||||
import { useCalendarTypeStore } from "@/stores/admin/settings/calendarType";
|
||||
import { useCalendarTypeStore } from "@/stores/admin/configuration/calendarType";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
|
@ -4,12 +4,12 @@
|
|||
<p>{{ communicationType.type }}</p>
|
||||
<div class="flex flex-row">
|
||||
<RouterLink
|
||||
v-if="can('update', 'settings', 'communication_type')"
|
||||
:to="{ name: 'admin-settings-communication_type-edit', params: { id: communicationType.id } }"
|
||||
v-if="can('update', 'configuration', 'communication_type')"
|
||||
:to="{ name: 'admin-configuration-communication_type-edit', params: { id: communicationType.id } }"
|
||||
>
|
||||
<PencilIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
|
||||
</RouterLink>
|
||||
<div v-if="can('delete', 'settings', 'communication_type')" @click="openDeleteModal">
|
||||
<div v-if="can('delete', 'configuration', 'communication_type')" @click="openDeleteModal">
|
||||
<TrashIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
|
||||
</div>
|
||||
</div>
|
||||
|
@ -33,7 +33,7 @@ import { mapState, mapActions } from "pinia";
|
|||
import { PencilIcon, TrashIcon } from "@heroicons/vue/24/outline";
|
||||
import { useAbilityStore } from "@/stores/ability";
|
||||
import { useModalStore } from "@/stores/modal";
|
||||
import type { CommunicationTypeViewModel } from "@/viewmodels/admin/settings/communicationType.models";
|
||||
import type { CommunicationTypeViewModel } from "@/viewmodels/admin/configuration/communicationType.models";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
|
@ -50,7 +50,7 @@ export default defineComponent({
|
|||
this.openModal(
|
||||
markRaw(
|
||||
defineAsyncComponent(
|
||||
() => import("@/components/admin/settings/communicationType/DeleteCommunicationTypeModal.vue")
|
||||
() => import("@/components/admin/configuration/communicationType/DeleteCommunicationTypeModal.vue")
|
||||
)
|
||||
),
|
||||
this.communicationType.id
|
|
@ -80,8 +80,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 { useCommunicationTypeStore } from "@/stores/admin/settings/communicationType";
|
||||
import type { CreateCommunicationTypeViewModel } from "@/viewmodels/admin/settings/communicationType.models";
|
||||
import { useCommunicationTypeStore } from "@/stores/admin/configuration/communicationType";
|
||||
import type { CreateCommunicationTypeViewModel } from "@/viewmodels/admin/configuration/communicationType.models";
|
||||
import { Listbox, ListboxButton, ListboxOptions, ListboxOption, ListboxLabel } from "@headlessui/vue";
|
||||
import { CheckIcon, ChevronUpDownIcon } from "@heroicons/vue/20/solid";
|
||||
import type { CommunicationFieldType } from "@/types/fieldTypes";
|
|
@ -31,7 +31,7 @@ import { useModalStore } from "@/stores/modal";
|
|||
import Spinner from "@/components/Spinner.vue";
|
||||
import SuccessCheckmark from "@/components/SuccessCheckmark.vue";
|
||||
import FailureXMark from "@/components/FailureXMark.vue";
|
||||
import { useCommunicationTypeStore } from "@/stores/admin/settings/communicationType";
|
||||
import { useCommunicationTypeStore } from "@/stores/admin/configuration/communicationType";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
|
@ -34,8 +34,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 { useExecutivePositionStore } from "@/stores/admin/settings/executivePosition";
|
||||
import type { CreateExecutivePositionViewModel } from "@/viewmodels/admin/settings/executivePosition.models";
|
||||
import { useExecutivePositionStore } from "@/stores/admin/configuration/executivePosition";
|
||||
import type { CreateExecutivePositionViewModel } from "@/viewmodels/admin/configuration/executivePosition.models";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
|
@ -31,8 +31,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 { useRoleStore } from "@/stores/admin/user/role";
|
||||
import { useExecutivePositionStore } from "@/stores/admin/settings/executivePosition";
|
||||
import { useRoleStore } from "@/stores/admin/management/role";
|
||||
import { useExecutivePositionStore } from "@/stores/admin/configuration/executivePosition";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
|
@ -4,12 +4,12 @@
|
|||
<p>{{ executivePosition.position }}</p>
|
||||
<div class="flex flex-row">
|
||||
<RouterLink
|
||||
v-if="can('update', 'settings', 'executive_position')"
|
||||
:to="{ name: 'admin-settings-executive_position-edit', params: { id: executivePosition.id } }"
|
||||
v-if="can('update', 'configuration', 'executive_position')"
|
||||
:to="{ name: 'admin-configuration-executive_position-edit', params: { id: executivePosition.id } }"
|
||||
>
|
||||
<PencilIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
|
||||
</RouterLink>
|
||||
<div v-if="can('delete', 'settings', 'executive_position')" @click="openDeleteModal">
|
||||
<div v-if="can('delete', 'configuration', 'executive_position')" @click="openDeleteModal">
|
||||
<TrashIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
|
||||
</div>
|
||||
</div>
|
||||
|
@ -23,7 +23,7 @@ import { mapState, mapActions } from "pinia";
|
|||
import { PencilIcon, TrashIcon } from "@heroicons/vue/24/outline";
|
||||
import { useAbilityStore } from "@/stores/ability";
|
||||
import { useModalStore } from "@/stores/modal";
|
||||
import type { ExecutivePositionViewModel } from "@/viewmodels/admin/settings/executivePosition.models";
|
||||
import type { ExecutivePositionViewModel } from "@/viewmodels/admin/configuration/executivePosition.models";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
|
@ -40,7 +40,7 @@ export default defineComponent({
|
|||
this.openModal(
|
||||
markRaw(
|
||||
defineAsyncComponent(
|
||||
() => import("@/components/admin/settings/executivePosition/DeleteExecutivePositionModal.vue")
|
||||
() => import("@/components/admin/configuration/executivePosition/DeleteExecutivePositionModal.vue")
|
||||
)
|
||||
),
|
||||
this.executivePosition.id
|
|
@ -34,8 +34,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 { useMembershipStatusStore } from "@/stores/admin/settings/membershipStatus";
|
||||
import type { CreateMembershipStatusViewModel } from "@/viewmodels/admin/settings/membershipStatus.models";
|
||||
import { useMembershipStatusStore } from "@/stores/admin/configuration/membershipStatus";
|
||||
import type { CreateMembershipStatusViewModel } from "@/viewmodels/admin/configuration/membershipStatus.models";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
|
@ -31,8 +31,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 { useRoleStore } from "@/stores/admin/user/role";
|
||||
import { useMembershipStatusStore } from "@/stores/admin/settings/membershipStatus";
|
||||
import { useRoleStore } from "@/stores/admin/management/role";
|
||||
import { useMembershipStatusStore } from "@/stores/admin/configuration/membershipStatus";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
|
@ -4,12 +4,12 @@
|
|||
<p>{{ membershipStatus.status }}</p>
|
||||
<div class="flex flex-row">
|
||||
<RouterLink
|
||||
v-if="can('update', 'settings', 'membership_status')"
|
||||
:to="{ name: 'admin-settings-membership_status-edit', params: { id: membershipStatus.id } }"
|
||||
v-if="can('update', 'configuration', 'membership_status')"
|
||||
:to="{ name: 'admin-configuration-membership_status-edit', params: { id: membershipStatus.id } }"
|
||||
>
|
||||
<PencilIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
|
||||
</RouterLink>
|
||||
<div v-if="can('delete', 'settings', 'membership_status')" @click="openDeleteModal">
|
||||
<div v-if="can('delete', 'configuration', 'membership_status')" @click="openDeleteModal">
|
||||
<TrashIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
|
||||
</div>
|
||||
</div>
|
||||
|
@ -23,7 +23,7 @@ import { mapState, mapActions } from "pinia";
|
|||
import { PencilIcon, TrashIcon } from "@heroicons/vue/24/outline";
|
||||
import { useAbilityStore } from "@/stores/ability";
|
||||
import { useModalStore } from "@/stores/modal";
|
||||
import type { MembershipStatusViewModel } from "@/viewmodels/admin/settings/membershipStatus.models";
|
||||
import type { MembershipStatusViewModel } from "@/viewmodels/admin/configuration/membershipStatus.models";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
|
@ -40,7 +40,7 @@ export default defineComponent({
|
|||
this.openModal(
|
||||
markRaw(
|
||||
defineAsyncComponent(
|
||||
() => import("@/components/admin/settings/membershipStatus/DeleteMembershipStatusModal.vue")
|
||||
() => import("@/components/admin/configuration/membershipStatus/DeleteMembershipStatusModal.vue")
|
||||
)
|
||||
),
|
||||
this.membershipStatus.id
|
|
@ -2,7 +2,7 @@
|
|||
<form ref="form" class="flex flex-col h-fit w-full border border-primary rounded-md" @submit.prevent="updateUsage">
|
||||
<div class="bg-primary p-2 text-white flex flex-row justify-between items-center">
|
||||
<p>Newsletter bei Type "{{ comType.type }}" versenden/exportieren als</p>
|
||||
<div v-if="can('create','settings','newsletter_config')" class="flex flex-row justify-end w-16">
|
||||
<div v-if="can('create', 'configuration', 'newsletter_config')" class="flex flex-row justify-end w-16">
|
||||
<button v-if="status == null" type="submit" class="!p-0 !h-fit !w-fit" title="speichern">
|
||||
<ArchiveBoxArrowDownIcon class="w-5 h-5 p-1 box-content pointer-events-none" />
|
||||
</button>
|
||||
|
@ -18,7 +18,9 @@
|
|||
<div class="flex flex-row gap-2 items-center">
|
||||
<select ref="config" id="config" :value="newsletterConfig?.config ?? 'def'">
|
||||
<option value="def">Standard (pdf nur mit Name)</option>
|
||||
<option v-for="config in configs" :key="config" :value="config">{{ config == "pdf" ? "pdf mit Adresse":config }}</option>
|
||||
<option v-for="config in configs" :key="config" :value="config">
|
||||
{{ config == "pdf" ? "pdf mit Adresse" : config }}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -29,14 +31,14 @@
|
|||
import { defineComponent, type PropType } from "vue";
|
||||
import { mapState, mapActions } from "pinia";
|
||||
import { ArchiveBoxArrowDownIcon, ArchiveBoxXMarkIcon } from "@heroicons/vue/24/outline";
|
||||
import { useNewsletterConfigStore } from "@/stores/admin/settings/newsletterConfig";
|
||||
import { useNewsletterConfigStore } from "@/stores/admin/configuration/newsletterConfig";
|
||||
import Spinner from "@/components/Spinner.vue";
|
||||
import SuccessCheckmark from "@/components/SuccessCheckmark.vue";
|
||||
import FailureXMark from "@/components/FailureXMark.vue";
|
||||
import { useModalStore } from "@/stores/modal";
|
||||
import { NewsletterConfigType } from "@/enums/newsletterConfigType";
|
||||
import type { AxiosResponse } from "axios";
|
||||
import type { CommunicationTypeViewModel } from "@/viewmodels/admin/settings/communicationType.models";
|
||||
import type { CommunicationTypeViewModel } from "@/viewmodels/admin/configuration/communicationType.models";
|
||||
import { useAbilityStore } from "@/stores/ability";
|
||||
</script>
|
||||
|
||||
|
@ -52,12 +54,12 @@ export default defineComponent({
|
|||
configs: [] as Array<string>,
|
||||
};
|
||||
},
|
||||
computed:{
|
||||
computed: {
|
||||
...mapState(useNewsletterConfigStore, ["config"]),
|
||||
...mapState(useAbilityStore, ["can"]),
|
||||
newsletterConfig() {
|
||||
return this.config.find(c => c.comTypeId == this.comType.id)
|
||||
}
|
||||
return this.config.find((c) => c.comTypeId == this.comType.id);
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.configs = Object.values(NewsletterConfigType);
|
||||
|
@ -74,25 +76,26 @@ export default defineComponent({
|
|||
const fromData = e.target.elements;
|
||||
const config = fromData.config.value === "def" ? null : fromData.config.value;
|
||||
|
||||
this.status = "loading"
|
||||
let request: Promise<AxiosResponse<any, any>>
|
||||
if(config){
|
||||
this.status = "loading";
|
||||
let request: Promise<AxiosResponse<any, any>>;
|
||||
if (config) {
|
||||
request = this.setNewsletterConfig({
|
||||
comTypeId: this.comType.id,
|
||||
config: config
|
||||
})
|
||||
config: config,
|
||||
});
|
||||
} else {
|
||||
request = this.deleteNewsletterConfig(this.comType.id)
|
||||
request = this.deleteNewsletterConfig(this.comType.id);
|
||||
}
|
||||
request.then(() => {
|
||||
this.status = { status: "success" };
|
||||
this.timeout = setTimeout(() => {
|
||||
this.status = null;
|
||||
}, 2000);
|
||||
})
|
||||
.catch(() => {
|
||||
this.status = { status: "failed" };
|
||||
});
|
||||
request
|
||||
.then(() => {
|
||||
this.status = { status: "success" };
|
||||
this.timeout = setTimeout(() => {
|
||||
this.status = null;
|
||||
}, 2000);
|
||||
})
|
||||
.catch(() => {
|
||||
this.status = { status: "failed" };
|
||||
});
|
||||
},
|
||||
resetForm() {
|
||||
(this.$refs.config as HTMLSelectElement).value = String(this.newsletterConfig?.config ?? "def");
|
|
@ -38,8 +38,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 { useQualificationStore } from "@/stores/admin/settings/qualification";
|
||||
import type { CreateQualificationViewModel } from "@/viewmodels/admin/settings/qualification.models";
|
||||
import { useQualificationStore } from "@/stores/admin/configuration/qualification";
|
||||
import type { CreateQualificationViewModel } from "@/viewmodels/admin/configuration/qualification.models";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
|
@ -31,8 +31,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 { useRoleStore } from "@/stores/admin/user/role";
|
||||
import { useQualificationStore } from "@/stores/admin/settings/qualification";
|
||||
import { useRoleStore } from "@/stores/admin/management/role";
|
||||
import { useQualificationStore } from "@/stores/admin/configuration/qualification";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
|
@ -4,12 +4,12 @@
|
|||
<p>{{ qualification.qualification }}</p>
|
||||
<div class="flex flex-row">
|
||||
<RouterLink
|
||||
v-if="can('update', 'settings', 'qualification')"
|
||||
:to="{ name: 'admin-settings-qualification-edit', params: { id: qualification.id } }"
|
||||
v-if="can('update', 'configuration', 'qualification')"
|
||||
:to="{ name: 'admin-configuration-qualification-edit', params: { id: qualification.id } }"
|
||||
>
|
||||
<PencilIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
|
||||
</RouterLink>
|
||||
<div v-if="can('delete', 'settings', 'qualification')" @click="openDeleteModal">
|
||||
<div v-if="can('delete', 'configuration', 'qualification')" @click="openDeleteModal">
|
||||
<TrashIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
|
||||
</div>
|
||||
</div>
|
||||
|
@ -29,7 +29,7 @@ import { mapState, mapActions } from "pinia";
|
|||
import { PencilIcon, TrashIcon } from "@heroicons/vue/24/outline";
|
||||
import { useAbilityStore } from "@/stores/ability";
|
||||
import { useModalStore } from "@/stores/modal";
|
||||
import type { QualificationViewModel } from "@/viewmodels/admin/settings/qualification.models";
|
||||
import type { QualificationViewModel } from "@/viewmodels/admin/configuration/qualification.models";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
|
@ -45,7 +45,9 @@ export default defineComponent({
|
|||
openDeleteModal() {
|
||||
this.openModal(
|
||||
markRaw(
|
||||
defineAsyncComponent(() => import("@/components/admin/settings/qualification/DeleteQualificationModal.vue"))
|
||||
defineAsyncComponent(
|
||||
() => import("@/components/admin/configuration/qualification/DeleteQualificationModal.vue")
|
||||
)
|
||||
),
|
||||
this.qualification.id
|
||||
);
|
|
@ -34,8 +34,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 { useQueryStoreStore } from "@/stores/admin/settings/queryStore";
|
||||
import type { CreateQueryViewModel } from "@/viewmodels/admin/settings/query.models";
|
||||
import { useQueryStoreStore } from "@/stores/admin/configuration/queryStore";
|
||||
import type { CreateQueryViewModel } from "@/viewmodels/admin/configuration/query.models";
|
||||
import { useQueryBuilderStore } from "@/stores/admin/club/queryBuilder";
|
||||
</script>
|
||||
|
|
@ -31,7 +31,7 @@ import { useModalStore } from "@/stores/modal";
|
|||
import Spinner from "@/components/Spinner.vue";
|
||||
import SuccessCheckmark from "@/components/SuccessCheckmark.vue";
|
||||
import FailureXMark from "@/components/FailureXMark.vue";
|
||||
import { useQueryStoreStore } from "@/stores/admin/settings/queryStore";
|
||||
import { useQueryStoreStore } from "@/stores/admin/configuration/queryStore";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
|
@ -6,10 +6,10 @@
|
|||
<div @click="loadUpdate">
|
||||
<EyeIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
|
||||
</div>
|
||||
<div v-if="can('update', 'settings', 'query_store')" @click="loadUpdate">
|
||||
<div v-if="can('update', 'configuration', 'query_store')" @click="loadUpdate">
|
||||
<PencilIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
|
||||
</div>
|
||||
<div v-if="can('delete', 'settings', 'query_store')" @click="openDeleteModal">
|
||||
<div v-if="can('delete', 'configuration', 'query_store')" @click="openDeleteModal">
|
||||
<TrashIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
|
||||
</div>
|
||||
</div>
|
||||
|
@ -23,7 +23,7 @@ import { mapState, mapActions, mapWritableState } from "pinia";
|
|||
import { EyeIcon, PencilIcon, TrashIcon } from "@heroicons/vue/24/outline";
|
||||
import { useAbilityStore } from "@/stores/ability";
|
||||
import { useModalStore } from "@/stores/modal";
|
||||
import type { QueryViewModel } from "@/viewmodels/admin/settings/query.models";
|
||||
import type { QueryViewModel } from "@/viewmodels/admin/configuration/query.models";
|
||||
import { useQueryBuilderStore } from "@/stores/admin/club/queryBuilder";
|
||||
</script>
|
||||
|
||||
|
@ -45,7 +45,9 @@ export default defineComponent({
|
|||
},
|
||||
openDeleteModal() {
|
||||
this.openModal(
|
||||
markRaw(defineAsyncComponent(() => import("@/components/admin/settings/queryStore/DeleteQueryStoreModal.vue"))),
|
||||
markRaw(
|
||||
defineAsyncComponent(() => import("@/components/admin/configuration/queryStore/DeleteQueryStoreModal.vue"))
|
||||
),
|
||||
this.queryItem.id
|
||||
);
|
||||
},
|
|
@ -36,8 +36,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 { useQueryStoreStore } from "@/stores/admin/settings/queryStore";
|
||||
import type { CreateQueryViewModel, UpdateQueryViewModel } from "@/viewmodels/admin/settings/query.models";
|
||||
import { useQueryStoreStore } from "@/stores/admin/configuration/queryStore";
|
||||
import type { CreateQueryViewModel, UpdateQueryViewModel } from "@/viewmodels/admin/configuration/query.models";
|
||||
import { useQueryBuilderStore } from "@/stores/admin/club/queryBuilder";
|
||||
</script>
|
||||
|
||||
|
@ -67,7 +67,9 @@ export default defineComponent({
|
|||
...mapActions(useQueryStoreStore, ["updateActiveQueryStore"]),
|
||||
changeToCreate() {
|
||||
this.openModal(
|
||||
markRaw(defineAsyncComponent(() => import("@/components/admin/settings/queryStore/CreateQueryStoreModal.vue")))
|
||||
markRaw(
|
||||
defineAsyncComponent(() => import("@/components/admin/configuration/queryStore/CreateQueryStoreModal.vue"))
|
||||
)
|
||||
);
|
||||
},
|
||||
triggerUpdate() {
|
|
@ -34,8 +34,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 { useSalutationStore } from "@/stores/admin/settings/salutation";
|
||||
import type { CreateSalutationViewModel } from "@/viewmodels/admin/settings/salutation.models";
|
||||
import { useSalutationStore } from "@/stores/admin/configuration/salutation";
|
||||
import type { CreateSalutationViewModel } from "@/viewmodels/admin/configuration/salutation.models";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
|
@ -31,8 +31,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 { useRoleStore } from "@/stores/admin/user/role";
|
||||
import { useSalutationStore } from "@/stores/admin/settings/salutation";
|
||||
import { useRoleStore } from "@/stores/admin/management/role";
|
||||
import { useSalutationStore } from "@/stores/admin/configuration/salutation";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
|
@ -4,12 +4,12 @@
|
|||
<p>{{ salutation.salutation }}</p>
|
||||
<div class="flex flex-row">
|
||||
<RouterLink
|
||||
v-if="can('update', 'settings', 'salutation')"
|
||||
:to="{ name: 'admin-settings-salutation-edit', params: { id: salutation.id } }"
|
||||
v-if="can('update', 'configuration', 'salutation')"
|
||||
:to="{ name: 'admin-configuration-salutation-edit', params: { id: salutation.id } }"
|
||||
>
|
||||
<PencilIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
|
||||
</RouterLink>
|
||||
<div v-if="can('delete', 'settings', 'salutation')" @click="openDeleteModal">
|
||||
<div v-if="can('delete', 'configuration', 'salutation')" @click="openDeleteModal">
|
||||
<TrashIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
|
||||
</div>
|
||||
</div>
|
||||
|
@ -23,7 +23,7 @@ import { mapState, mapActions } from "pinia";
|
|||
import { PencilIcon, TrashIcon } from "@heroicons/vue/24/outline";
|
||||
import { useAbilityStore } from "@/stores/ability";
|
||||
import { useModalStore } from "@/stores/modal";
|
||||
import type { SalutationViewModel } from "@/viewmodels/admin/settings/salutation.models";
|
||||
import type { SalutationViewModel } from "@/viewmodels/admin/configuration/salutation.models";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
|
@ -38,7 +38,9 @@ export default defineComponent({
|
|||
...mapActions(useModalStore, ["openModal"]),
|
||||
openDeleteModal() {
|
||||
this.openModal(
|
||||
markRaw(defineAsyncComponent(() => import("@/components/admin/settings/salutation/DeleteSalutationModal.vue"))),
|
||||
markRaw(
|
||||
defineAsyncComponent(() => import("@/components/admin/configuration/salutation/DeleteSalutationModal.vue"))
|
||||
),
|
||||
this.salutation.id
|
||||
);
|
||||
},
|
|
@ -38,8 +38,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 { useTemplateStore } from "@/stores/admin/settings/template";
|
||||
import type { CreateTemplateViewModel } from "@/viewmodels/admin/settings/template.models";
|
||||
import { useTemplateStore } from "@/stores/admin/configuration/template";
|
||||
import type { CreateTemplateViewModel } from "@/viewmodels/admin/configuration/template.models";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
|
@ -70,7 +70,7 @@ export default defineComponent({
|
|||
this.status = { status: "success" };
|
||||
this.timeout = setTimeout(() => {
|
||||
this.closeModal();
|
||||
this.$router.push({ name: "admin-settings-template-edit", params: { id: res.data } });
|
||||
this.$router.push({ name: "admin-configuration-template-edit", params: { id: res.data } });
|
||||
}, 1500);
|
||||
})
|
||||
.catch(() => {
|
|
@ -31,8 +31,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 { useQueryStoreStore } from "@/stores/admin/settings/queryStore";
|
||||
import { useTemplateStore } from "@/stores/admin/settings/template";
|
||||
import { useQueryStoreStore } from "@/stores/admin/configuration/queryStore";
|
||||
import { useTemplateStore } from "@/stores/admin/configuration/template";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
|
@ -4,18 +4,18 @@
|
|||
<p>{{ template.template }}</p>
|
||||
<div class="flex flex-row justify-end w-24">
|
||||
<RouterLink
|
||||
v-if="can('update', 'settings', 'template')"
|
||||
:to="{ name: 'admin-settings-template-edit', params: { id: template.id } }"
|
||||
v-if="can('update', 'configuration', 'template')"
|
||||
:to="{ name: 'admin-configuration-template-edit', params: { id: template.id } }"
|
||||
>
|
||||
<PencilIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
|
||||
</RouterLink>
|
||||
</RouterLink>
|
||||
<button v-if="status == null" class="!p-0 !h-fit !w-fit" title="duplizieren" @click="cloneElement">
|
||||
<DocumentDuplicateIcon class="w-5 h-5 p-1 box-content pointer-events-none" />
|
||||
</button>
|
||||
<Spinner v-else-if="status == 'loading'" class="my-auto" />
|
||||
<SuccessCheckmark v-else-if="status?.status == 'success'" />
|
||||
<FailureXMark v-else-if="status?.status == 'failed'" />
|
||||
<div v-if="can('delete', 'settings', 'template')" @click="openDeleteModal">
|
||||
<div v-if="can('delete', 'configuration', 'template')" @click="openDeleteModal">
|
||||
<TrashIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
|
||||
</div>
|
||||
</div>
|
||||
|
@ -35,8 +35,8 @@ import { mapState, mapActions } from "pinia";
|
|||
import { PencilIcon, TrashIcon, DocumentDuplicateIcon } from "@heroicons/vue/24/outline";
|
||||
import { useAbilityStore } from "@/stores/ability";
|
||||
import { useModalStore } from "@/stores/modal";
|
||||
import type { TemplateViewModel } from "@/viewmodels/admin/settings/template.models";
|
||||
import { useTemplateStore } from "@/stores/admin/settings/template";
|
||||
import type { TemplateViewModel } from "@/viewmodels/admin/configuration/template.models";
|
||||
import { useTemplateStore } from "@/stores/admin/configuration/template";
|
||||
import Spinner from "@/components/Spinner.vue";
|
||||
import SuccessCheckmark from "@/components/SuccessCheckmark.vue";
|
||||
import FailureXMark from "@/components/FailureXMark.vue";
|
||||
|
@ -63,26 +63,28 @@ export default defineComponent({
|
|||
},
|
||||
methods: {
|
||||
...mapActions(useModalStore, ["openModal"]),
|
||||
...mapActions(useTemplateStore,["cloneTemplate"]),
|
||||
...mapActions(useTemplateStore, ["cloneTemplate"]),
|
||||
openDeleteModal() {
|
||||
this.openModal(
|
||||
markRaw(defineAsyncComponent(() => import("@/components/admin/settings/template/DeleteTemplateModal.vue"))),
|
||||
markRaw(
|
||||
defineAsyncComponent(() => import("@/components/admin/configuration/template/DeleteTemplateModal.vue"))
|
||||
),
|
||||
this.template.id
|
||||
);
|
||||
},
|
||||
cloneElement(){
|
||||
cloneElement() {
|
||||
this.cloneTemplate(this.template.id)
|
||||
.then((res) => {
|
||||
this.status = { status: "success" };
|
||||
this.timeout = setTimeout(() => {
|
||||
this.status = null;
|
||||
this.$router.push({ name: "admin-settings-template-edit", params: { id: res.data } });
|
||||
this.$router.push({ name: "admin-configuration-template-edit", params: { id: res.data } });
|
||||
}, 2000);
|
||||
})
|
||||
.catch(() => {
|
||||
this.status = { status: "failed" };
|
||||
});
|
||||
}
|
||||
},
|
||||
},
|
||||
});
|
||||
</script>
|
|
@ -14,7 +14,7 @@ import { defineComponent } from "vue";
|
|||
import { mapState, mapActions } from "pinia";
|
||||
import { useModalStore } from "@/stores/modal";
|
||||
import Spinner from "@/components/Spinner.vue";
|
||||
import { useTemplateUsageStore } from "@/stores/admin/settings/templateUsage";
|
||||
import { useTemplateUsageStore } from "@/stores/admin/configuration/templateUsage";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
|
@ -22,7 +22,7 @@ export default defineComponent({
|
|||
data() {
|
||||
return {
|
||||
status: null as null | "loading" | { status: "success" | "failed"; reason?: string },
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapState(useModalStore, ["data"]),
|
||||
|
@ -34,7 +34,7 @@ export default defineComponent({
|
|||
...mapActions(useModalStore, ["closeModal"]),
|
||||
...mapActions(useTemplateUsageStore, ["previewTemplateUsage"]),
|
||||
fetchItem() {
|
||||
this.status = "loading"
|
||||
this.status = "loading";
|
||||
this.previewTemplateUsage(this.data)
|
||||
.then((response) => {
|
||||
this.status = { status: "success" };
|
|
@ -6,13 +6,24 @@
|
|||
<button type="button" class="!p-0 !h-fit !w-fit" title="Vorschau erzeugen" @click="previewUsage">
|
||||
<EyeIcon class="w-5 h-5 p-1 box-content pointer-events-none" />
|
||||
</button>
|
||||
<button v-if="status == null && can('create','settings','newsletter_config')" type="submit" class="!p-0 !h-fit !w-fit" title="speichern">
|
||||
<button
|
||||
v-if="status == null && can('create', 'configuration', 'newsletter_config')"
|
||||
type="submit"
|
||||
class="!p-0 !h-fit !w-fit"
|
||||
title="speichern"
|
||||
>
|
||||
<ArchiveBoxArrowDownIcon class="w-5 h-5 p-1 box-content pointer-events-none" />
|
||||
</button>
|
||||
<Spinner v-else-if="status == 'loading'" class="my-auto" />
|
||||
<SuccessCheckmark v-else-if="status?.status == 'success'" />
|
||||
<FailureXMark v-else-if="status?.status == 'failed'" />
|
||||
<button type="button" v-if="can('create','settings','newsletter_config')" class="!p-0 !h-fit !w-fit" title="zurücksetzen" @click="resetForm">
|
||||
<button
|
||||
type="button"
|
||||
v-if="can('create', 'configuration', 'newsletter_config')"
|
||||
class="!p-0 !h-fit !w-fit"
|
||||
title="zurücksetzen"
|
||||
@click="resetForm"
|
||||
>
|
||||
<ArchiveBoxXMarkIcon class="w-5 h-5 p-1 box-content pointer-events-none" />
|
||||
</button>
|
||||
</div>
|
||||
|
@ -23,13 +34,22 @@
|
|||
<p class="min-w-16">Kopfzeile:</p>
|
||||
<select ref="header" id="header" :value="templateUsage.header?.id ?? 'def'">
|
||||
<option value="def">Standard-Vorlage verwenden</option>
|
||||
<option v-for="template in templates" :key="template.id" :value="template.id">{{ template.template }}</option>
|
||||
<option v-for="template in templates" :key="template.id" :value="template.id">
|
||||
{{ template.template }}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="flex flex-row gap-2 items-center">
|
||||
<p class="whitespace-nowrap">Höhe [mm]:</p>
|
||||
<input id="headerHeight" type="number" :min="15" v-model="templateUsage.headerHeight" class="!w-24" placeholder="15">
|
||||
</div>
|
||||
<input
|
||||
id="headerHeight"
|
||||
type="number"
|
||||
:min="15"
|
||||
v-model="templateUsage.headerHeight"
|
||||
class="!w-24"
|
||||
placeholder="15"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex flex-row gap-2 items-center">
|
||||
<p class="min-w-16">Hauptteil:</p>
|
||||
|
@ -43,12 +63,21 @@
|
|||
<p class="min-w-16">Fußzeile:</p>
|
||||
<select ref="footer" id="footer" :value="templateUsage.footer?.id ?? 'def'">
|
||||
<option value="def">Standard-Vorlage verwenden</option>
|
||||
<option v-for="template in templates" :key="template.id" :value="template.id">{{ template.template }}</option>
|
||||
<option v-for="template in templates" :key="template.id" :value="template.id">
|
||||
{{ template.template }}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="flex flex-row gap-2 items-center">
|
||||
<p class="whitespace-nowrap">Höhe [mm]:</p>
|
||||
<input id="footerHeight" type="number" :min="15" v-model="templateUsage.footerHeight" class="!w-24" placeholder="15">
|
||||
<input
|
||||
id="footerHeight"
|
||||
type="number"
|
||||
:min="15"
|
||||
v-model="templateUsage.footerHeight"
|
||||
class="!w-24"
|
||||
placeholder="15"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -59,9 +88,9 @@
|
|||
import { defineAsyncComponent, defineComponent, markRaw, type PropType } from "vue";
|
||||
import { mapState, mapActions } from "pinia";
|
||||
import { ArchiveBoxArrowDownIcon, ArchiveBoxXMarkIcon, EyeIcon } from "@heroicons/vue/24/outline";
|
||||
import type { TemplateUsageViewModel } from "@/viewmodels/admin/settings/templateUsage.models";
|
||||
import { useTemplateStore } from "@/stores/admin/settings/template";
|
||||
import { useTemplateUsageStore } from "@/stores/admin/settings/templateUsage";
|
||||
import type { TemplateUsageViewModel } from "@/viewmodels/admin/configuration/templateUsage.models";
|
||||
import { useTemplateStore } from "@/stores/admin/configuration/template";
|
||||
import { useTemplateUsageStore } from "@/stores/admin/configuration/templateUsage";
|
||||
import Spinner from "@/components/Spinner.vue";
|
||||
import SuccessCheckmark from "@/components/SuccessCheckmark.vue";
|
||||
import FailureXMark from "@/components/FailureXMark.vue";
|
||||
|
@ -94,9 +123,11 @@ export default defineComponent({
|
|||
...mapActions(useTemplateUsageStore, ["updateTemplateUsage"]),
|
||||
previewUsage() {
|
||||
this.openModal(
|
||||
markRaw(defineAsyncComponent(() => import("@/components/admin/settings/templateUsage/TemplatePreviewModal.vue"))),
|
||||
markRaw(
|
||||
defineAsyncComponent(() => import("@/components/admin/configuration/templateUsage/TemplatePreviewModal.vue"))
|
||||
),
|
||||
this.templateUsage.scope
|
||||
)
|
||||
);
|
||||
},
|
||||
updateUsage(e: any) {
|
||||
const fromData = e.target.elements;
|
||||
|
@ -106,14 +137,14 @@ export default defineComponent({
|
|||
const headerHeight = fromData.footer.value === "" ? null : parseInt(fromData.headerHeight.value);
|
||||
const footerHeight = fromData.footer.value === "" ? null : parseInt(fromData.footerHeight.value);
|
||||
|
||||
this.status = "loading"
|
||||
this.status = "loading";
|
||||
this.updateTemplateUsage({
|
||||
scope: this.templateUsage.scope,
|
||||
headerId: headerId,
|
||||
bodyId: bodyId,
|
||||
footerId: footerId,
|
||||
headerHeight:headerHeight,
|
||||
footerHeight: footerHeight
|
||||
headerHeight: headerHeight,
|
||||
footerHeight: footerHeight,
|
||||
})
|
||||
.then(() => {
|
||||
this.status = { status: "success" };
|
|
@ -6,7 +6,7 @@
|
|||
<div @click="downloadBackup">
|
||||
<ArrowDownTrayIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
|
||||
</div>
|
||||
<div v-if="can('admin', 'user', 'backup')" @click="openRestoreModal">
|
||||
<div v-if="can('admin', 'management', 'backup')" @click="openRestoreModal">
|
||||
<BarsArrowUpIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
|
||||
</div>
|
||||
</div>
|
||||
|
@ -20,7 +20,7 @@ import { mapState, mapActions } from "pinia";
|
|||
import { ArchiveBoxArrowDownIcon, ArrowDownTrayIcon, BarsArrowUpIcon } from "@heroicons/vue/24/outline";
|
||||
import { useAbilityStore } from "@/stores/ability";
|
||||
import { useModalStore } from "@/stores/modal";
|
||||
import { useBackupStore } from "../../../../stores/admin/user/backup";
|
||||
import { useBackupStore } from "../../../../stores/admin/management/backup";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
|
@ -36,7 +36,7 @@ export default defineComponent({
|
|||
...mapActions(useBackupStore, ["fetchBackupById"]),
|
||||
openRestoreModal() {
|
||||
this.openModal(
|
||||
markRaw(defineAsyncComponent(() => import("@/components/admin/user/backup/RestoreBackupModal.vue"))),
|
||||
markRaw(defineAsyncComponent(() => import("@/components/admin/management/backup/RestoreBackupModal.vue"))),
|
||||
this.backup
|
||||
);
|
||||
},
|
|
@ -30,7 +30,7 @@ import { useModalStore } from "@/stores/modal";
|
|||
import Spinner from "@/components/Spinner.vue";
|
||||
import SuccessCheckmark from "@/components/SuccessCheckmark.vue";
|
||||
import FailureXMark from "@/components/FailureXMark.vue";
|
||||
import { useBackupStore } from "@/stores/admin/user/backup";
|
||||
import { useBackupStore } from "@/stores/admin/management/backup";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
|
@ -56,8 +56,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 { useBackupStore } from "@/stores/admin/user/backup";
|
||||
import type { BackupRestoreViewModel } from "../../../../viewmodels/admin/user/backup.models";
|
||||
import { useBackupStore } from "@/stores/admin/management/backup";
|
||||
import type { BackupRestoreViewModel } from "../../../../viewmodels/admin/management/backup.models";
|
||||
import { InformationCircleIcon } from "@heroicons/vue/24/outline";
|
||||
import { backupSections, type BackupSection } from "../../../../types/backupTypes";
|
||||
</script>
|
|
@ -51,7 +51,7 @@ import { useModalStore } from "@/stores/modal";
|
|||
import Spinner from "@/components/Spinner.vue";
|
||||
import SuccessCheckmark from "@/components/SuccessCheckmark.vue";
|
||||
import FailureXMark from "@/components/FailureXMark.vue";
|
||||
import { useBackupStore } from "@/stores/admin/user/backup";
|
||||
import { useBackupStore } from "@/stores/admin/management/backup";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
|
@ -75,7 +75,6 @@ export default defineComponent({
|
|||
},
|
||||
fileDrop(event: DragEvent) {
|
||||
const file = event.dataTransfer?.files[0];
|
||||
console.log("hi", file);
|
||||
if (file?.type.toLocaleLowerCase() != "application/json") return;
|
||||
this.uploadFile(file);
|
||||
},
|
|
@ -34,7 +34,7 @@ import { useModalStore } from "@/stores/modal";
|
|||
import Spinner from "@/components/Spinner.vue";
|
||||
import SuccessCheckmark from "@/components/SuccessCheckmark.vue";
|
||||
import FailureXMark from "@/components/FailureXMark.vue";
|
||||
import { useRoleStore } from "@/stores/admin/user/role";
|
||||
import { useRoleStore } from "@/stores/admin/management/role";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
|
@ -31,7 +31,7 @@ import { useModalStore } from "@/stores/modal";
|
|||
import Spinner from "@/components/Spinner.vue";
|
||||
import SuccessCheckmark from "@/components/SuccessCheckmark.vue";
|
||||
import FailureXMark from "@/components/FailureXMark.vue";
|
||||
import { useRoleStore } from "@/stores/admin/user/role";
|
||||
import { useRoleStore } from "@/stores/admin/management/role";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
|
@ -4,18 +4,18 @@
|
|||
<p>{{ role.role }} <small v-if="role.permissions.admin">(Admin)</small></p>
|
||||
<div class="flex flex-row">
|
||||
<RouterLink
|
||||
v-if="can('admin', 'user', 'role')"
|
||||
:to="{ name: 'admin-user-role-permission', params: { id: role.id } }"
|
||||
v-if="can('admin', 'management', 'role')"
|
||||
:to="{ name: 'admin-management-role-permission', params: { id: role.id } }"
|
||||
>
|
||||
<WrenchScrewdriverIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
|
||||
</RouterLink>
|
||||
<RouterLink
|
||||
v-if="can('update', 'user', 'role')"
|
||||
:to="{ name: 'admin-user-role-edit', params: { id: role.id } }"
|
||||
v-if="can('update', 'management', 'role')"
|
||||
:to="{ name: 'admin-management-role-edit', params: { id: role.id } }"
|
||||
>
|
||||
<PencilIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
|
||||
</RouterLink>
|
||||
<div v-if="can('delete', 'user', 'role')" @click="openDeleteModal">
|
||||
<div v-if="can('delete', 'management', 'role')" @click="openDeleteModal">
|
||||
<TrashIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
|
||||
</div>
|
||||
</div>
|
||||
|
@ -27,7 +27,7 @@
|
|||
import { defineComponent, defineAsyncComponent, markRaw, type PropType } from "vue";
|
||||
import { mapState, mapActions } from "pinia";
|
||||
import { PencilIcon, WrenchScrewdriverIcon, TrashIcon } from "@heroicons/vue/24/outline";
|
||||
import type { RoleViewModel } from "@/viewmodels/admin/user/role.models";
|
||||
import type { RoleViewModel } from "@/viewmodels/admin/management/role.models";
|
||||
import { RouterLink } from "vue-router";
|
||||
import { useAbilityStore } from "@/stores/ability";
|
||||
import { useModalStore } from "@/stores/modal";
|
||||
|
@ -45,7 +45,7 @@ export default defineComponent({
|
|||
...mapActions(useModalStore, ["openModal"]),
|
||||
openDeleteModal() {
|
||||
this.openModal(
|
||||
markRaw(defineAsyncComponent(() => import("@/components/admin/user/role/DeleteRoleModal.vue"))),
|
||||
markRaw(defineAsyncComponent(() => import("@/components/admin/management/role/DeleteRoleModal.vue"))),
|
||||
this.role.id
|
||||
);
|
||||
},
|
|
@ -31,7 +31,7 @@ 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/user";
|
||||
import { useUserStore } from "@/stores/admin/management/user";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
|
@ -3,7 +3,7 @@
|
|||
<div class="bg-primary p-2 text-white flex flex-row justify-between items-center">
|
||||
<p>{{ invite.firstname }} {{ invite.lastname }}</p>
|
||||
<div class="flex flex-row">
|
||||
<div v-if="can('delete', 'user', 'user')" @click="triggerDeleteInvite">
|
||||
<div v-if="can('delete', 'management', 'user')" @click="triggerDeleteInvite">
|
||||
<TrashIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
|
||||
</div>
|
||||
</div>
|
||||
|
@ -24,10 +24,10 @@
|
|||
<script setup lang="ts">
|
||||
import { defineComponent, type PropType } from "vue";
|
||||
import { mapState, mapActions } from "pinia";
|
||||
import type { InviteViewModel } from "@/viewmodels/admin/user/invite.models";
|
||||
import type { InviteViewModel } from "@/viewmodels/admin/management/invite.models";
|
||||
import { PencilIcon, UserGroupIcon, WrenchScrewdriverIcon, TrashIcon } from "@heroicons/vue/24/outline";
|
||||
import { useAbilityStore } from "@/stores/ability";
|
||||
import { useInviteStore } from "@/stores/admin/user/invite";
|
||||
import { useInviteStore } from "@/stores/admin/management/invite";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
|
@ -47,8 +47,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 { useInviteStore } from "@/stores/admin/user/invite";
|
||||
import type { CreateInviteViewModel } from "@/viewmodels/admin/user/invite.models";
|
||||
import { useInviteStore } from "@/stores/admin/management/invite";
|
||||
import type { CreateInviteViewModel } from "@/viewmodels/admin/management/invite.models";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
|
@ -7,25 +7,25 @@
|
|||
</p>
|
||||
<div class="flex flex-row">
|
||||
<RouterLink
|
||||
v-if="can('admin', 'user', 'user')"
|
||||
:to="{ name: 'admin-user-user-roles', params: { id: user.id } }"
|
||||
v-if="can('admin', 'management', 'user')"
|
||||
:to="{ name: 'admin-management-user-roles', params: { id: user.id } }"
|
||||
>
|
||||
<UserGroupIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
|
||||
</RouterLink>
|
||||
<RouterLink
|
||||
v-if="can('admin', 'user', 'user')"
|
||||
:to="{ name: 'admin-user-user-permission', params: { id: user.id } }"
|
||||
v-if="can('admin', 'management', 'user')"
|
||||
:to="{ name: 'admin-management-user-permission', params: { id: user.id } }"
|
||||
>
|
||||
<WrenchScrewdriverIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
|
||||
</RouterLink>
|
||||
<RouterLink
|
||||
v-if="can('update', 'user', 'user')"
|
||||
:to="{ name: 'admin-user-user-edit', params: { id: user.id } }"
|
||||
v-if="can('update', 'management', 'user')"
|
||||
:to="{ name: 'admin-management-user-edit', params: { id: user.id } }"
|
||||
>
|
||||
<PencilIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
|
||||
</RouterLink>
|
||||
<div
|
||||
v-if="can('delete', 'user', 'user')"
|
||||
v-if="can('delete', 'management', 'user')"
|
||||
:class="user.isOwner ? 'opacity-75 pointer-events-none' : ''"
|
||||
@click="openDeleteModal"
|
||||
>
|
||||
|
@ -57,7 +57,7 @@
|
|||
<script setup lang="ts">
|
||||
import { defineComponent, defineAsyncComponent, markRaw, type PropType } from "vue";
|
||||
import { mapState, mapActions } from "pinia";
|
||||
import type { UserViewModel } from "@/viewmodels/admin/user/user.models";
|
||||
import type { UserViewModel } from "@/viewmodels/admin/management/user.models";
|
||||
import { PencilIcon, UserGroupIcon, WrenchScrewdriverIcon, TrashIcon } from "@heroicons/vue/24/outline";
|
||||
import { useAbilityStore } from "@/stores/ability";
|
||||
import { useModalStore } from "@/stores/modal";
|
||||
|
@ -76,7 +76,7 @@ export default defineComponent({
|
|||
openDeleteModal() {
|
||||
if (this.user.isOwner) return;
|
||||
this.openModal(
|
||||
markRaw(defineAsyncComponent(() => import("@/components/admin/user/user/DeleteUserModal.vue"))),
|
||||
markRaw(defineAsyncComponent(() => import("@/components/admin/management/user/DeleteUserModal.vue"))),
|
||||
this.user.id
|
||||
);
|
||||
},
|
|
@ -38,8 +38,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 { useWebapiStore } from "@/stores/admin/user/webapi";
|
||||
import type { CreateWebapiViewModel } from "../../../../viewmodels/admin/user/webapi.models";
|
||||
import { useWebapiStore } from "@/stores/admin/management/webapi";
|
||||
import type { CreateWebapiViewModel } from "../../../../viewmodels/admin/management/webapi.models";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
|
@ -31,7 +31,7 @@ import { useModalStore } from "@/stores/modal";
|
|||
import Spinner from "@/components/Spinner.vue";
|
||||
import SuccessCheckmark from "@/components/SuccessCheckmark.vue";
|
||||
import FailureXMark from "@/components/FailureXMark.vue";
|
||||
import { useWebapiStore } from "@/stores/admin/user/webapi";
|
||||
import { useWebapiStore } from "@/stores/admin/management/webapi";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
|
@ -3,22 +3,22 @@
|
|||
<div class="bg-primary p-2 text-white flex flex-row justify-between items-center">
|
||||
<p>{{ webapi.title }} <small v-if="webapi.permissions.admin">(Admin)</small></p>
|
||||
<div class="flex flex-row">
|
||||
<div v-if="can('admin', 'user', 'webapi')" @click="openTokenViewModal">
|
||||
<div v-if="can('admin', 'management', 'webapi')" @click="openTokenViewModal">
|
||||
<FingerPrintIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
|
||||
</div>
|
||||
<RouterLink
|
||||
v-if="can('admin', 'user', 'webapi')"
|
||||
:to="{ name: 'admin-user-webapi-permission', params: { id: webapi.id } }"
|
||||
v-if="can('admin', 'management', 'webapi')"
|
||||
:to="{ name: 'admin-management-webapi-permission', params: { id: webapi.id } }"
|
||||
>
|
||||
<WrenchScrewdriverIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
|
||||
</RouterLink>
|
||||
<RouterLink
|
||||
v-if="can('update', 'user', 'webapi')"
|
||||
:to="{ name: 'admin-user-webapi-edit', params: { id: webapi.id } }"
|
||||
v-if="can('update', 'management', 'webapi')"
|
||||
:to="{ name: 'admin-management-webapi-edit', params: { id: webapi.id } }"
|
||||
>
|
||||
<PencilIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
|
||||
</RouterLink>
|
||||
<div v-if="can('delete', 'user', 'webapi')" @click="openDeleteModal">
|
||||
<div v-if="can('delete', 'management', 'webapi')" @click="openDeleteModal">
|
||||
<TrashIcon class="w-5 h-5 p-1 box-content cursor-pointer" />
|
||||
</div>
|
||||
</div>
|
||||
|
@ -74,7 +74,7 @@
|
|||
import { defineComponent, defineAsyncComponent, markRaw, type PropType } from "vue";
|
||||
import { mapState, mapActions } from "pinia";
|
||||
import { PencilIcon, WrenchScrewdriverIcon, TrashIcon, FingerPrintIcon } from "@heroicons/vue/24/outline";
|
||||
import type { WebapiViewModel } from "@/viewmodels/admin/user/webapi.models";
|
||||
import type { WebapiViewModel } from "@/viewmodels/admin/management/webapi.models";
|
||||
import { RouterLink } from "vue-router";
|
||||
import { useAbilityStore } from "@/stores/ability";
|
||||
import { useModalStore } from "@/stores/modal";
|
||||
|
@ -92,13 +92,13 @@ export default defineComponent({
|
|||
...mapActions(useModalStore, ["openModal"]),
|
||||
openTokenViewModal() {
|
||||
this.openModal(
|
||||
markRaw(defineAsyncComponent(() => import("@/components/admin/user/webapi/WebapiTokenModal.vue"))),
|
||||
markRaw(defineAsyncComponent(() => import("@/components/admin/management/webapi/WebapiTokenModal.vue"))),
|
||||
this.webapi.id
|
||||
);
|
||||
},
|
||||
openDeleteModal() {
|
||||
this.openModal(
|
||||
markRaw(defineAsyncComponent(() => import("@/components/admin/user/webapi/DeleteWebapiModal.vue"))),
|
||||
markRaw(defineAsyncComponent(() => import("@/components/admin/management/webapi/DeleteWebapiModal.vue"))),
|
||||
this.webapi.id
|
||||
);
|
||||
},
|
|
@ -21,14 +21,14 @@ import { defineComponent } from "vue";
|
|||
import { mapState, mapActions } from "pinia";
|
||||
import { RouterLink } from "vue-router";
|
||||
import { useModalStore } from "@/stores/modal";
|
||||
import { useCalendarTypeStore } from "@/stores/admin/settings/calendarType";
|
||||
import type { CalendarTypeViewModel } from "@/viewmodels/admin/settings/calendarType.models";
|
||||
import { useCalendarTypeStore } from "@/stores/admin/configuration/calendarType";
|
||||
import type { CalendarTypeViewModel } from "@/viewmodels/admin/configuration/calendarType.models";
|
||||
import { Listbox, ListboxButton, ListboxOptions, ListboxOption, ListboxLabel } from "@headlessui/vue";
|
||||
import { CheckIcon, ChevronUpDownIcon } from "@heroicons/vue/20/solid";
|
||||
import TextCopy from "@/components/TextCopy.vue";
|
||||
import { CalendarDaysIcon, InformationCircleIcon } from "@heroicons/vue/24/outline";
|
||||
import { host } from "@/serverCom";
|
||||
import { useWebapiStore } from "../../../../stores/admin/user/webapi";
|
||||
import { useWebapiStore } from "../../../../stores/admin/management/webapi";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
|
@ -27,7 +27,7 @@
|
|||
</div>
|
||||
<div class="grow"></div>
|
||||
<div
|
||||
v-if="allowPredefinedSelect && can('read', 'settings', 'query_store')"
|
||||
v-if="allowPredefinedSelect && can('read', 'configuration', 'query_store')"
|
||||
class="flex flex-row gap-2 max-lg:w-full max-lg:order-10"
|
||||
>
|
||||
<select v-model="activeQueryId" class="max-h-[34px] !py-0">
|
||||
|
@ -37,7 +37,7 @@
|
|||
</option>
|
||||
</select>
|
||||
<div
|
||||
v-if="can('create', 'settings', 'query_store')"
|
||||
v-if="can('create', 'configuration', 'query_store')"
|
||||
class="p-1 border border-gray-400 bg-gray-100 rounded-md"
|
||||
title="Abfrage speichern"
|
||||
@click="$emit('query:save')"
|
||||
|
@ -93,7 +93,7 @@ import { useQueryBuilderStore } from "@/stores/admin/club/queryBuilder";
|
|||
import { useModalStore } from "@/stores/modal";
|
||||
import Table from "./Table.vue";
|
||||
import { useAbilityStore } from "@/stores/ability";
|
||||
import { useQueryStoreStore } from "@/stores/admin/settings/queryStore";
|
||||
import { useQueryStoreStore } from "@/stores/admin/configuration/queryStore";
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
|
|
|
@ -7,15 +7,15 @@ export async function abilityAndNavUpdate(to: any, from: any, next: any) {
|
|||
const ability = useAbilityStore();
|
||||
const navigation = useNavigationStore();
|
||||
|
||||
let admin = to.meta.admin || false;
|
||||
let type = to.meta.type;
|
||||
let section = to.meta.section;
|
||||
let module = to.meta.module;
|
||||
|
||||
navigation.activeNavigation = to.name.split("-")[1];
|
||||
navigation.activeLink = to.name.split("-")[2];
|
||||
|
||||
if (ability.can(type, section, module)) {
|
||||
if ((admin && ability.isAdmin()) || ability.can(type, section, module)) {
|
||||
NProgress.done();
|
||||
navigation.activeNavigation = to.name.split("-")[1];
|
||||
navigation.activeLink = to.name.split("-")[2];
|
||||
next();
|
||||
} else {
|
||||
NProgress.done();
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { useBackupStore } from "../stores/admin/user/backup";
|
||||
import { useBackupStore } from "../stores/admin/management/backup";
|
||||
|
||||
export async function setBackupPage(to: any, from: any, next: any) {
|
||||
const backup = useBackupStore();
|
||||
|
|
|
@ -298,36 +298,36 @@ const router = createRouter({
|
|||
],
|
||||
},
|
||||
{
|
||||
path: "settings",
|
||||
name: "admin-settings",
|
||||
path: "configuration",
|
||||
name: "admin-configuration",
|
||||
component: () => import("@/views/RouterView.vue"),
|
||||
meta: { type: "read", section: "settings" },
|
||||
meta: { type: "read", section: "configuration" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
children: [
|
||||
{
|
||||
path: "",
|
||||
name: "admin-settings-default",
|
||||
name: "admin-configuration-default",
|
||||
component: () => import("@/views/admin/ViewSelect.vue"),
|
||||
meta: { type: "read", section: "settings" },
|
||||
meta: { type: "read", section: "configuration" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
},
|
||||
{
|
||||
path: "qualification",
|
||||
name: "admin-settings-qualification-route",
|
||||
name: "admin-configuration-qualification-route",
|
||||
component: () => import("@/views/RouterView.vue"),
|
||||
meta: { type: "read", section: "settings", module: "qualification" },
|
||||
meta: { type: "read", section: "configuration", module: "qualification" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
children: [
|
||||
{
|
||||
path: "",
|
||||
name: "admin-settings-qualification",
|
||||
component: () => import("@/views/admin/settings/qualification/Qualification.vue"),
|
||||
name: "admin-configuration-qualification",
|
||||
component: () => import("@/views/admin/configuration/qualification/Qualification.vue"),
|
||||
},
|
||||
{
|
||||
path: ":id/edit",
|
||||
name: "admin-settings-qualification-edit",
|
||||
component: () => import("@/views/admin/settings/qualification/QualificationEdit.vue"),
|
||||
meta: { type: "update", section: "settings", module: "qualification" },
|
||||
name: "admin-configuration-qualification-edit",
|
||||
component: () => import("@/views/admin/configuration/qualification/QualificationEdit.vue"),
|
||||
meta: { type: "update", section: "configuration", module: "qualification" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
props: true,
|
||||
},
|
||||
|
@ -335,21 +335,21 @@ const router = createRouter({
|
|||
},
|
||||
{
|
||||
path: "award",
|
||||
name: "admin-settings-award-route",
|
||||
name: "admin-configuration-award-route",
|
||||
component: () => import("@/views/RouterView.vue"),
|
||||
meta: { type: "read", section: "settings", module: "award" },
|
||||
meta: { type: "read", section: "configuration", module: "award" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
children: [
|
||||
{
|
||||
path: "",
|
||||
name: "admin-settings-award",
|
||||
component: () => import("@/views/admin/settings/award/Award.vue"),
|
||||
name: "admin-configuration-award",
|
||||
component: () => import("@/views/admin/configuration/award/Award.vue"),
|
||||
},
|
||||
{
|
||||
path: ":id/edit",
|
||||
name: "admin-settings-award-edit",
|
||||
component: () => import("@/views/admin/settings/award/AwardEdit.vue"),
|
||||
meta: { type: "update", section: "settings", module: "award" },
|
||||
name: "admin-configuration-award-edit",
|
||||
component: () => import("@/views/admin/configuration/award/AwardEdit.vue"),
|
||||
meta: { type: "update", section: "configuration", module: "award" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
props: true,
|
||||
},
|
||||
|
@ -357,23 +357,23 @@ const router = createRouter({
|
|||
},
|
||||
{
|
||||
path: "executive-position",
|
||||
name: "admin-settings-executive_position-route",
|
||||
name: "admin-configuration-executive_position-route",
|
||||
component: () => import("@/views/RouterView.vue"),
|
||||
meta: { type: "read", section: "settings", module: "executive_position" },
|
||||
meta: { type: "read", section: "configuration", module: "executive_position" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
children: [
|
||||
{
|
||||
path: "",
|
||||
name: "admin-settings-executive_position",
|
||||
component: () => import("@/views/admin/settings/executivePosition/ExecutivePosition.vue"),
|
||||
meta: { type: "read", section: "settings", module: "executive_position" },
|
||||
name: "admin-configuration-executive_position",
|
||||
component: () => import("@/views/admin/configuration/executivePosition/ExecutivePosition.vue"),
|
||||
meta: { type: "read", section: "configuration", module: "executive_position" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
},
|
||||
{
|
||||
path: ":id/edit",
|
||||
name: "admin-settings-executive_position-edit",
|
||||
component: () => import("@/views/admin/settings/executivePosition/ExecutivePositionEdit.vue"),
|
||||
meta: { type: "update", section: "settings", module: "executive_position" },
|
||||
name: "admin-configuration-executive_position-edit",
|
||||
component: () => import("@/views/admin/configuration/executivePosition/ExecutivePositionEdit.vue"),
|
||||
meta: { type: "update", section: "configuration", module: "executive_position" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
props: true,
|
||||
},
|
||||
|
@ -381,21 +381,21 @@ const router = createRouter({
|
|||
},
|
||||
{
|
||||
path: "communication-type",
|
||||
name: "admin-settings-communication_type-route",
|
||||
name: "admin-configuration-communication_type-route",
|
||||
component: () => import("@/views/RouterView.vue"),
|
||||
meta: { type: "read", section: "settings", module: "communication_type" },
|
||||
meta: { type: "read", section: "configuration", module: "communication_type" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
children: [
|
||||
{
|
||||
path: "",
|
||||
name: "admin-settings-communication_type",
|
||||
component: () => import("@/views/admin/settings/communicationType/CommunicationType.vue"),
|
||||
name: "admin-configuration-communication_type",
|
||||
component: () => import("@/views/admin/configuration/communicationType/CommunicationType.vue"),
|
||||
},
|
||||
{
|
||||
path: ":id/edit",
|
||||
name: "admin-settings-communication_type-edit",
|
||||
component: () => import("@/views/admin/settings/communicationType/CommunicationTypeEdit.vue"),
|
||||
meta: { type: "update", section: "settings", module: "communication_type" },
|
||||
name: "admin-configuration-communication_type-edit",
|
||||
component: () => import("@/views/admin/configuration/communicationType/CommunicationTypeEdit.vue"),
|
||||
meta: { type: "update", section: "configuration", module: "communication_type" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
props: true,
|
||||
},
|
||||
|
@ -403,21 +403,21 @@ const router = createRouter({
|
|||
},
|
||||
{
|
||||
path: "status",
|
||||
name: "admin-settings-membership_status-route",
|
||||
name: "admin-configuration-membership_status-route",
|
||||
component: () => import("@/views/RouterView.vue"),
|
||||
meta: { type: "read", section: "settings", module: "membership_status" },
|
||||
meta: { type: "read", section: "configuration", module: "membership_status" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
children: [
|
||||
{
|
||||
path: "",
|
||||
name: "admin-settings-membership_status",
|
||||
component: () => import("@/views/admin/settings/membershipStatus/MembershipStatus.vue"),
|
||||
name: "admin-configuration-membership_status",
|
||||
component: () => import("@/views/admin/configuration/membershipStatus/MembershipStatus.vue"),
|
||||
},
|
||||
{
|
||||
path: ":id/edit",
|
||||
name: "admin-settings-membership_status-edit",
|
||||
component: () => import("@/views/admin/settings/membershipStatus/MembershipStatusEdit.vue"),
|
||||
meta: { type: "update", section: "settings", module: "membership_status" },
|
||||
name: "admin-configuration-membership_status-edit",
|
||||
component: () => import("@/views/admin/configuration/membershipStatus/MembershipStatusEdit.vue"),
|
||||
meta: { type: "update", section: "configuration", module: "membership_status" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
props: true,
|
||||
},
|
||||
|
@ -425,21 +425,21 @@ const router = createRouter({
|
|||
},
|
||||
{
|
||||
path: "salutation",
|
||||
name: "admin-settings-salutation-route",
|
||||
name: "admin-configuration-salutation-route",
|
||||
component: () => import("@/views/RouterView.vue"),
|
||||
meta: { type: "read", section: "settings", module: "salutation" },
|
||||
meta: { type: "read", section: "configuration", module: "salutation" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
children: [
|
||||
{
|
||||
path: "",
|
||||
name: "admin-settings-salutation",
|
||||
component: () => import("@/views/admin/settings/salutation/Salutation.vue"),
|
||||
name: "admin-configuration-salutation",
|
||||
component: () => import("@/views/admin/configuration/salutation/Salutation.vue"),
|
||||
},
|
||||
{
|
||||
path: ":id/edit",
|
||||
name: "admin-settings-salutation-edit",
|
||||
component: () => import("@/views/admin/settings/salutation/SalutationEdit.vue"),
|
||||
meta: { type: "update", section: "settings", module: "salutation" },
|
||||
name: "admin-configuration-salutation-edit",
|
||||
component: () => import("@/views/admin/configuration/salutation/SalutationEdit.vue"),
|
||||
meta: { type: "update", section: "configuration", module: "salutation" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
props: true,
|
||||
},
|
||||
|
@ -447,21 +447,21 @@ const router = createRouter({
|
|||
},
|
||||
{
|
||||
path: "calendar-type",
|
||||
name: "admin-settings-calendar_type-route",
|
||||
name: "admin-configuration-calendar_type-route",
|
||||
component: () => import("@/views/RouterView.vue"),
|
||||
meta: { type: "read", section: "settings", module: "calendar_type" },
|
||||
meta: { type: "read", section: "configuration", module: "calendar_type" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
children: [
|
||||
{
|
||||
path: "",
|
||||
name: "admin-settings-calendar_type",
|
||||
component: () => import("@/views/admin/settings/calendarType/CalendarType.vue"),
|
||||
name: "admin-configuration-calendar_type",
|
||||
component: () => import("@/views/admin/configuration/calendarType/CalendarType.vue"),
|
||||
},
|
||||
{
|
||||
path: ":id/edit",
|
||||
name: "admin-settings-calendar_type-edit",
|
||||
component: () => import("@/views/admin/settings/calendarType/CalendarTypeEdit.vue"),
|
||||
meta: { type: "update", section: "settings", module: "calendar_type" },
|
||||
name: "admin-configuration-calendar_type-edit",
|
||||
component: () => import("@/views/admin/configuration/calendarType/CalendarTypeEdit.vue"),
|
||||
meta: { type: "update", section: "configuration", module: "calendar_type" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
props: true,
|
||||
},
|
||||
|
@ -469,34 +469,34 @@ const router = createRouter({
|
|||
},
|
||||
{
|
||||
path: "query-store",
|
||||
name: "admin-settings-query_store",
|
||||
component: () => import("@/views/admin/settings/queryStore/QueryStore.vue"),
|
||||
meta: { type: "read", section: "settings", module: "query_store" },
|
||||
name: "admin-configuration-query_store",
|
||||
component: () => import("@/views/admin/configuration/queryStore/QueryStore.vue"),
|
||||
meta: { type: "read", section: "configuration", module: "query_store" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
},
|
||||
{
|
||||
path: "template",
|
||||
name: "admin-settings-template-route",
|
||||
name: "admin-configuration-template-route",
|
||||
component: () => import("@/views/RouterView.vue"),
|
||||
meta: { type: "read", section: "settings", module: "template" },
|
||||
meta: { type: "read", section: "configuration", module: "template" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
children: [
|
||||
{
|
||||
path: "",
|
||||
name: "admin-settings-template",
|
||||
component: () => import("@/views/admin/settings/template/Template.vue"),
|
||||
name: "admin-configuration-template",
|
||||
component: () => import("@/views/admin/configuration/template/Template.vue"),
|
||||
},
|
||||
{
|
||||
path: "info",
|
||||
name: "admin-settings-template-info",
|
||||
component: () => import("@/views/admin/settings/template/UsageInfo.vue"),
|
||||
name: "admin-configuration-template-info",
|
||||
component: () => import("@/views/admin/configuration/template/UsageInfo.vue"),
|
||||
props: true,
|
||||
},
|
||||
{
|
||||
path: ":id/edit",
|
||||
name: "admin-settings-template-edit",
|
||||
component: () => import("@/views/admin/settings/template/TemplateEdit.vue"),
|
||||
meta: { type: "update", section: "settings", module: "template" },
|
||||
name: "admin-configuration-template-edit",
|
||||
component: () => import("@/views/admin/configuration/template/TemplateEdit.vue"),
|
||||
meta: { type: "update", section: "configuration", module: "template" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
props: true,
|
||||
},
|
||||
|
@ -504,72 +504,72 @@ const router = createRouter({
|
|||
},
|
||||
{
|
||||
path: "template-usage",
|
||||
name: "admin-settings-template_usage",
|
||||
component: () => import("@/views/admin/settings/templateUsage/TemplateUsage.vue"),
|
||||
meta: { type: "read", section: "settings", module: "template_usage" },
|
||||
name: "admin-configuration-template_usage",
|
||||
component: () => import("@/views/admin/configuration/templateUsage/TemplateUsage.vue"),
|
||||
meta: { type: "read", section: "configuration", module: "template_usage" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
},
|
||||
{
|
||||
path: "newsletter-config",
|
||||
name: "admin-settings-newsletter_config",
|
||||
component: () => import("@/views/admin/settings/newsletterConfig/NewsletterConfig.vue"),
|
||||
meta: { type: "read", section: "settings", module: "newsletter_config" },
|
||||
name: "admin-configuration-newsletter_config",
|
||||
component: () => import("@/views/admin/configuration/newsletterConfig/NewsletterConfig.vue"),
|
||||
meta: { type: "read", section: "configuration", module: "newsletter_config" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "user",
|
||||
name: "admin-user",
|
||||
path: "management",
|
||||
name: "admin-management",
|
||||
component: () => import("@/views/RouterView.vue"),
|
||||
meta: { type: "read", section: "user" },
|
||||
meta: { type: "read", section: "management" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
children: [
|
||||
{
|
||||
path: "",
|
||||
name: "admin-user-default",
|
||||
name: "admin-management-default",
|
||||
component: () => import("@/views/admin/ViewSelect.vue"),
|
||||
meta: { type: "read", section: "user" },
|
||||
meta: { type: "read", section: "management" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
},
|
||||
{
|
||||
path: "user",
|
||||
name: "admin-user-user-route",
|
||||
name: "admin-management-user-route",
|
||||
component: () => import("@/views/RouterView.vue"),
|
||||
meta: { type: "read", section: "user", module: "user" },
|
||||
meta: { type: "read", section: "management", module: "user" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
children: [
|
||||
{
|
||||
path: "",
|
||||
name: "admin-user-user",
|
||||
component: () => import("@/views/admin/user/user/User.vue"),
|
||||
name: "admin-management-user",
|
||||
component: () => import("@/views/admin/management/user/User.vue"),
|
||||
},
|
||||
{
|
||||
path: "invites",
|
||||
name: "admin-user-user-invites",
|
||||
component: () => import("@/views/admin/user/user/Invite.vue"),
|
||||
name: "admin-management-user-invites",
|
||||
component: () => import("@/views/admin/management/user/Invite.vue"),
|
||||
},
|
||||
{
|
||||
path: ":id/edit",
|
||||
name: "admin-user-user-edit",
|
||||
component: () => import("@/views/admin/user/user/UserEdit.vue"),
|
||||
meta: { type: "update", section: "user", module: "user" },
|
||||
name: "admin-management-user-edit",
|
||||
component: () => import("@/views/admin/management/user/UserEdit.vue"),
|
||||
meta: { type: "update", section: "management", module: "user" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
props: true,
|
||||
},
|
||||
{
|
||||
path: ":id/permission",
|
||||
name: "admin-user-user-permission",
|
||||
component: () => import("@/views/admin/user/user/UserEditPermission.vue"),
|
||||
meta: { type: "update", section: "user", module: "user" },
|
||||
name: "admin-management-user-permission",
|
||||
component: () => import("@/views/admin/management/user/UserEditPermission.vue"),
|
||||
meta: { type: "update", section: "management", module: "user" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
props: true,
|
||||
},
|
||||
{
|
||||
path: ":id/roles",
|
||||
name: "admin-user-user-roles",
|
||||
component: () => import("@/views/admin/user/user/UserEditRoles.vue"),
|
||||
meta: { type: "update", section: "user", module: "user" },
|
||||
name: "admin-management-user-roles",
|
||||
component: () => import("@/views/admin/management/user/UserEditRoles.vue"),
|
||||
meta: { type: "update", section: "management", module: "user" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
props: true,
|
||||
},
|
||||
|
@ -577,29 +577,29 @@ const router = createRouter({
|
|||
},
|
||||
{
|
||||
path: "role",
|
||||
name: "admin-user-role-route",
|
||||
name: "admin-management-role-route",
|
||||
component: () => import("@/views/RouterView.vue"),
|
||||
meta: { type: "read", section: "user", module: "role" },
|
||||
meta: { type: "read", section: "management", module: "role" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
children: [
|
||||
{
|
||||
path: "",
|
||||
name: "admin-user-role",
|
||||
component: () => import("@/views/admin/user/role/Role.vue"),
|
||||
name: "admin-management-role",
|
||||
component: () => import("@/views/admin/management/role/Role.vue"),
|
||||
},
|
||||
{
|
||||
path: ":id/edit",
|
||||
name: "admin-user-role-edit",
|
||||
component: () => import("@/views/admin/user/role/RoleEdit.vue"),
|
||||
meta: { type: "update", section: "user", module: "role" },
|
||||
name: "admin-management-role-edit",
|
||||
component: () => import("@/views/admin/management/role/RoleEdit.vue"),
|
||||
meta: { type: "update", section: "management", module: "role" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
props: true,
|
||||
},
|
||||
{
|
||||
path: ":id/permission",
|
||||
name: "admin-user-role-permission",
|
||||
component: () => import("@/views/admin/user/role/RoleEditPermission.vue"),
|
||||
meta: { type: "update", section: "user", module: "role" },
|
||||
name: "admin-management-role-permission",
|
||||
component: () => import("@/views/admin/management/role/RoleEditPermission.vue"),
|
||||
meta: { type: "update", section: "management", module: "role" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
props: true,
|
||||
},
|
||||
|
@ -607,29 +607,29 @@ const router = createRouter({
|
|||
},
|
||||
{
|
||||
path: "webapi",
|
||||
name: "admin-user-webapi-route",
|
||||
name: "admin-management-webapi-route",
|
||||
component: () => import("@/views/RouterView.vue"),
|
||||
meta: { type: "read", section: "user", module: "webapi" },
|
||||
meta: { type: "read", section: "management", module: "webapi" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
children: [
|
||||
{
|
||||
path: "",
|
||||
name: "admin-user-webapi",
|
||||
component: () => import("@/views/admin/user/webapi/Webapi.vue"),
|
||||
name: "admin-management-webapi",
|
||||
component: () => import("@/views/admin/management/webapi/Webapi.vue"),
|
||||
},
|
||||
{
|
||||
path: ":id/edit",
|
||||
name: "admin-user-webapi-edit",
|
||||
component: () => import("@/views/admin/user/webapi/WebapiEdit.vue"),
|
||||
meta: { type: "update", section: "user", module: "webapi" },
|
||||
name: "admin-management-webapi-edit",
|
||||
component: () => import("@/views/admin/management/webapi/WebapiEdit.vue"),
|
||||
meta: { type: "update", section: "management", module: "webapi" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
props: true,
|
||||
},
|
||||
{
|
||||
path: ":id/permission",
|
||||
name: "admin-user-webapi-permission",
|
||||
component: () => import("@/views/admin/user/webapi/WebapiEditPermission.vue"),
|
||||
meta: { type: "update", section: "user", module: "webapi" },
|
||||
name: "admin-management-webapi-permission",
|
||||
component: () => import("@/views/admin/management/webapi/WebapiEditPermission.vue"),
|
||||
meta: { type: "update", section: "management", module: "webapi" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
props: true,
|
||||
},
|
||||
|
@ -637,34 +637,36 @@ const router = createRouter({
|
|||
},
|
||||
{
|
||||
path: "backup",
|
||||
name: "admin-user-backup-route",
|
||||
component: () => import("@/views/admin/user/backup/BackupRouting.vue"),
|
||||
meta: { type: "read", section: "user", module: "backup" },
|
||||
name: "admin-management-backup-route",
|
||||
component: () => import("@/views/admin/management/backup/BackupRouting.vue"),
|
||||
meta: { type: "read", section: "management", module: "backup" },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
children: [
|
||||
{
|
||||
path: "",
|
||||
name: "admin-user-backup",
|
||||
redirect: { name: "admin-user-backup-generated" },
|
||||
name: "admin-management-backup",
|
||||
redirect: { name: "admin-management-backup-generated" },
|
||||
},
|
||||
{
|
||||
path: "generated",
|
||||
name: "admin-user-backup-generated",
|
||||
component: () => import("@/views/admin/user/backup/GeneratedBackup.vue"),
|
||||
name: "admin-management-backup-generated",
|
||||
component: () => import("@/views/admin/management/backup/GeneratedBackup.vue"),
|
||||
beforeEnter: [setBackupPage],
|
||||
},
|
||||
{
|
||||
path: "uploads",
|
||||
name: "admin-user-backup-uploaded",
|
||||
component: () => import("@/views/admin/user/backup/UploadedBackup.vue"),
|
||||
name: "admin-management-backup-uploaded",
|
||||
component: () => import("@/views/admin/management/backup/UploadedBackup.vue"),
|
||||
beforeEnter: [setBackupPage],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "version",
|
||||
name: "admin-user-version",
|
||||
component: () => import("@/views/admin/user/version/VersionDisplay.vue"),
|
||||
name: "admin-management-version",
|
||||
component: () => import("@/views/admin/management/version/VersionDisplay.vue"),
|
||||
meta: { admin: true },
|
||||
beforeEnter: [abilityAndNavUpdate],
|
||||
},
|
||||
],
|
||||
},
|
||||
|
@ -776,6 +778,7 @@ export default router;
|
|||
|
||||
declare module "vue-router" {
|
||||
interface RouteMeta {
|
||||
admin?: boolean;
|
||||
type?: PermissionType | "admin";
|
||||
section?: PermissionSection;
|
||||
module?: PermissionModule;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { defineStore } from "pinia";
|
||||
import { http } from "@/serverCom";
|
||||
import type { TableMeta } from "@/viewmodels/admin/settings/query.models";
|
||||
import type { TableMeta } from "@/viewmodels/admin/configuration/query.models";
|
||||
import type { DynamicQueryStructure, FieldType } from "@/types/dynamicQueries";
|
||||
|
||||
export const useQueryBuilderStore = defineStore("queryBuilder", {
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
import { defineStore } from "pinia";
|
||||
import type { CreateAwardViewModel, UpdateAwardViewModel, AwardViewModel } from "@/viewmodels/admin/settings/award.models";
|
||||
import type {
|
||||
CreateAwardViewModel,
|
||||
UpdateAwardViewModel,
|
||||
AwardViewModel,
|
||||
} from "@/viewmodels/admin/configuration/award.models";
|
||||
import { http } from "@/serverCom";
|
||||
import type { AxiosResponse } from "axios";
|
||||
|
|
@ -3,7 +3,7 @@ import type {
|
|||
CreateCalendarTypeViewModel,
|
||||
UpdateCalendarTypeViewModel,
|
||||
CalendarTypeViewModel,
|
||||
} from "@/viewmodels/admin/settings/calendarType.models";
|
||||
} from "@/viewmodels/admin/configuration/calendarType.models";
|
||||
import { http } from "@/serverCom";
|
||||
import type { AxiosResponse } from "axios";
|
||||
|
|
@ -3,7 +3,7 @@ import type {
|
|||
CreateCommunicationTypeViewModel,
|
||||
UpdateCommunicationTypeViewModel,
|
||||
CommunicationTypeViewModel,
|
||||
} from "@/viewmodels/admin/settings/communicationType.models";
|
||||
} from "@/viewmodels/admin/configuration/communicationType.models";
|
||||
import { http } from "@/serverCom";
|
||||
import type { AxiosResponse } from "axios";
|
||||
import type { CommunicationFieldType } from "@/types/fieldTypes";
|
|
@ -3,7 +3,7 @@ import type {
|
|||
CreateExecutivePositionViewModel,
|
||||
UpdateExecutivePositionViewModel,
|
||||
ExecutivePositionViewModel,
|
||||
} from "@/viewmodels/admin/settings/executivePosition.models";
|
||||
} from "@/viewmodels/admin/configuration/executivePosition.models";
|
||||
import { http } from "@/serverCom";
|
||||
import type { AxiosResponse } from "axios";
|
||||
|
|
@ -3,7 +3,7 @@ import type {
|
|||
CreateMembershipStatusViewModel,
|
||||
UpdateMembershipStatusViewModel,
|
||||
MembershipStatusViewModel,
|
||||
} from "@/viewmodels/admin/settings/membershipStatus.models";
|
||||
} from "@/viewmodels/admin/configuration/membershipStatus.models";
|
||||
import { http } from "@/serverCom";
|
||||
import type { AxiosResponse } from "axios";
|
||||
|
|
@ -2,7 +2,7 @@ import { defineStore } from "pinia";
|
|||
import type {
|
||||
SetNewsletterConfigViewModel,
|
||||
NewsletterConfigViewModel,
|
||||
} from "@/viewmodels/admin/settings/newsletterConfig.models";
|
||||
} from "@/viewmodels/admin/configuration/newsletterConfig.models";
|
||||
import { http } from "@/serverCom";
|
||||
import type { AxiosResponse } from "axios";
|
||||
|
|
@ -3,7 +3,7 @@ import type {
|
|||
CreateQualificationViewModel,
|
||||
UpdateQualificationViewModel,
|
||||
QualificationViewModel,
|
||||
} from "@/viewmodels/admin/settings/qualification.models";
|
||||
} from "@/viewmodels/admin/configuration/qualification.models";
|
||||
import { http } from "@/serverCom";
|
||||
import type { AxiosResponse } from "axios";
|
||||
|
|
@ -1,5 +1,9 @@
|
|||
import { defineStore } from "pinia";
|
||||
import type { CreateQueryViewModel, QueryViewModel, UpdateQueryViewModel } from "@/viewmodels/admin/settings/query.models";
|
||||
import type {
|
||||
CreateQueryViewModel,
|
||||
QueryViewModel,
|
||||
UpdateQueryViewModel,
|
||||
} from "@/viewmodels/admin/configuration/query.models";
|
||||
import { http } from "@/serverCom";
|
||||
import type { AxiosResponse } from "axios";
|
||||
import { useQueryBuilderStore } from "../club/queryBuilder";
|
||||
|
@ -34,17 +38,17 @@ export const useQueryStoreStore = defineStore("queryStore", {
|
|||
const queryBuilderStore = useQueryBuilderStore();
|
||||
const modalStore = useModalStore();
|
||||
const abilityStore = useAbilityStore();
|
||||
if (queryBuilderStore.activeQueryId != undefined && abilityStore.can("update", "settings", "query_store")) {
|
||||
if (queryBuilderStore.activeQueryId != undefined && abilityStore.can("update", "configuration", "query_store")) {
|
||||
modalStore.openModal(
|
||||
markRaw(
|
||||
defineAsyncComponent(() => import("@/components/admin/settings/queryStore/UpdateQueryStoreModal.vue"))
|
||||
defineAsyncComponent(() => import("@/components/admin/configuration/queryStore/UpdateQueryStoreModal.vue"))
|
||||
),
|
||||
queryBuilderStore.activeQueryId
|
||||
);
|
||||
} else {
|
||||
modalStore.openModal(
|
||||
markRaw(
|
||||
defineAsyncComponent(() => import("@/components/admin/settings/queryStore/CreateQueryStoreModal.vue"))
|
||||
defineAsyncComponent(() => import("@/components/admin/configuration/queryStore/CreateQueryStoreModal.vue"))
|
||||
)
|
||||
);
|
||||
}
|
|
@ -3,7 +3,7 @@ import type {
|
|||
CreateSalutationViewModel,
|
||||
UpdateSalutationViewModel,
|
||||
SalutationViewModel,
|
||||
} from "@/viewmodels/admin/settings/salutation.models";
|
||||
} from "@/viewmodels/admin/configuration/salutation.models";
|
||||
import { http } from "@/serverCom";
|
||||
import type { AxiosResponse } from "axios";
|
||||
|
|
@ -5,7 +5,7 @@ import type {
|
|||
CreateTemplateViewModel,
|
||||
TemplateViewModel,
|
||||
UpdateTemplateViewModel,
|
||||
} from "@/viewmodels/admin/settings/template.models";
|
||||
} from "@/viewmodels/admin/configuration/template.models";
|
||||
|
||||
export const useTemplateStore = defineStore("template", {
|
||||
state: () => {
|
|
@ -1,8 +1,14 @@
|
|||
import { defineStore } from "pinia";
|
||||
import { http } from "@/serverCom";
|
||||
import type { AxiosResponse } from "axios";
|
||||
import type { CreateTemplateViewModel, UpdateTemplateViewModel } from "@/viewmodels/admin/settings/template.models";
|
||||
import type { TemplateUsageViewModel, UpdateTemplateUsageViewModel } from "@/viewmodels/admin/settings/templateUsage.models";
|
||||
import type {
|
||||
CreateTemplateViewModel,
|
||||
UpdateTemplateViewModel,
|
||||
} from "@/viewmodels/admin/configuration/template.models";
|
||||
import type {
|
||||
TemplateUsageViewModel,
|
||||
UpdateTemplateUsageViewModel,
|
||||
} from "@/viewmodels/admin/configuration/templateUsage.models";
|
||||
import type { PermissionModule } from "@/types/permissionTypes";
|
||||
|
||||
export const useTemplateUsageStore = defineStore("templateUsage", {
|
|
@ -1,7 +1,7 @@
|
|||
import { defineStore } from "pinia";
|
||||
import { http } from "@/serverCom";
|
||||
import type { AxiosResponse, AxiosProgressEvent } from "axios";
|
||||
import type { BackupRestoreViewModel } from "../../../viewmodels/admin/user/backup.models";
|
||||
import type { BackupRestoreViewModel } from "../../../viewmodels/admin/management/backup.models";
|
||||
|
||||
export const useBackupStore = defineStore("backup", {
|
||||
state: () => {
|
|
@ -1,5 +1,5 @@
|
|||
import { defineStore } from "pinia";
|
||||
import type { CreateInviteViewModel, InviteViewModel } from "@/viewmodels/admin/user/invite.models";
|
||||
import type { CreateInviteViewModel, InviteViewModel } from "@/viewmodels/admin/management/invite.models";
|
||||
import { http } from "@/serverCom";
|
||||
import type { PermissionObject } from "@/types/permissionTypes";
|
||||
import type { AxiosResponse } from "axios";
|
|
@ -1,5 +1,5 @@
|
|||
import { defineStore } from "pinia";
|
||||
import type { RoleViewModel } from "@/viewmodels/admin/user/role.models";
|
||||
import type { RoleViewModel } from "@/viewmodels/admin/management/role.models";
|
||||
import { http } from "@/serverCom";
|
||||
import type { PermissionObject } from "@/types/permissionTypes";
|
||||
import type { AxiosResponse } from "axios";
|
|
@ -1,5 +1,5 @@
|
|||
import { defineStore } from "pinia";
|
||||
import type { UpdateUserViewModel, UserViewModel } from "@/viewmodels/admin/user/user.models";
|
||||
import type { UpdateUserViewModel, UserViewModel } from "@/viewmodels/admin/management/user.models";
|
||||
import { http } from "@/serverCom";
|
||||
import type { PermissionObject } from "@/types/permissionTypes";
|
||||
import type { AxiosResponse } from "axios";
|
|
@ -3,7 +3,7 @@ import type {
|
|||
CreateWebapiViewModel,
|
||||
UpdateWebapiViewModel,
|
||||
WebapiViewModel,
|
||||
} from "@/viewmodels/admin/user/webapi.models";
|
||||
} from "@/viewmodels/admin/management/webapi.models";
|
||||
import { http } from "@/serverCom";
|
||||
import type { PermissionObject } from "@/types/permissionTypes";
|
||||
import type { AxiosResponse } from "axios";
|
|
@ -1,12 +1,11 @@
|
|||
import { defineStore } from "pinia";
|
||||
import { useAbilityStore } from "@/stores/ability";
|
||||
import router from "@/router";
|
||||
import type { PermissionSection } from "../../types/permissionTypes";
|
||||
|
||||
export interface navigationModel {
|
||||
club: navigationSplitModel;
|
||||
settings: navigationSplitModel;
|
||||
user: navigationSplitModel;
|
||||
}
|
||||
export type navigationModel = {
|
||||
[key in topLevelNavigationType]: navigationSplitModel;
|
||||
};
|
||||
|
||||
export interface navigationSplitModel {
|
||||
topTitle?: string;
|
||||
|
@ -15,7 +14,7 @@ export interface navigationSplitModel {
|
|||
main: Array<navigationLinkModel>;
|
||||
}
|
||||
|
||||
export type topLevelNavigationType = "club" | "settings" | "user";
|
||||
export type topLevelNavigationType = PermissionSection;
|
||||
|
||||
export interface topLevelNavigationModel {
|
||||
key: topLevelNavigationType;
|
||||
|
@ -58,20 +57,20 @@ export const useNavigationStore = defineStore("navigation", {
|
|||
} as topLevelNavigationModel,
|
||||
]
|
||||
: []),
|
||||
...(abilityStore.canSection("read", "settings")
|
||||
...(abilityStore.canSection("read", "configuration")
|
||||
? [
|
||||
{
|
||||
key: "settings",
|
||||
title: "Einstellungen",
|
||||
key: "configuration",
|
||||
title: "Konfiguration",
|
||||
levelDefault: "salutation",
|
||||
} as topLevelNavigationModel,
|
||||
]
|
||||
: []),
|
||||
...(abilityStore.canSection("read", "user")
|
||||
...(abilityStore.canSection("read", "management")
|
||||
? [
|
||||
{
|
||||
key: "user",
|
||||
title: "Benutzer",
|
||||
key: "management",
|
||||
title: "Verwaltung",
|
||||
levelDefault: "user",
|
||||
} as topLevelNavigationModel,
|
||||
]
|
||||
|
@ -95,45 +94,49 @@ export const useNavigationStore = defineStore("navigation", {
|
|||
...(abilityStore.can("read", "club", "query") ? [{ key: "query_builder", title: "Query Builder" }] : []),
|
||||
],
|
||||
},
|
||||
settings: {
|
||||
configuration: {
|
||||
mainTitle: "Einstellungen",
|
||||
main: [
|
||||
{ key: "divider1", title: "Mitgliederdaten" },
|
||||
...(abilityStore.can("read", "settings", "salutation") ? [{ key: "salutation", title: "Anrede" }] : []),
|
||||
...(abilityStore.can("read", "settings", "award") ? [{ key: "award", title: "Auszeichnungen" }] : []),
|
||||
...(abilityStore.can("read", "settings", "communication_type")
|
||||
...(abilityStore.can("read", "configuration", "salutation")
|
||||
? [{ key: "salutation", title: "Anrede" }]
|
||||
: []),
|
||||
...(abilityStore.can("read", "configuration", "award") ? [{ key: "award", title: "Auszeichnungen" }] : []),
|
||||
...(abilityStore.can("read", "configuration", "communication_type")
|
||||
? [{ key: "communication_type", title: "Kommunikationsarten" }]
|
||||
: []),
|
||||
...(abilityStore.can("read", "settings", "membership_status")
|
||||
...(abilityStore.can("read", "configuration", "membership_status")
|
||||
? [{ key: "membership_status", title: "Mitgliedsstatus" }]
|
||||
: []),
|
||||
...(abilityStore.can("read", "settings", "qualification")
|
||||
...(abilityStore.can("read", "configuration", "qualification")
|
||||
? [{ key: "qualification", title: "Qualifikationen" }]
|
||||
: []),
|
||||
...(abilityStore.can("read", "settings", "executive_position")
|
||||
...(abilityStore.can("read", "configuration", "executive_position")
|
||||
? [{ key: "executive_position", title: "Vereinsämter" }]
|
||||
: []),
|
||||
{ key: "divider2", title: "Einstellungen" },
|
||||
...(abilityStore.can("read", "settings", "newsletter_config")
|
||||
...(abilityStore.can("read", "configuration", "newsletter_config")
|
||||
? [{ key: "newsletter_config", title: "Newsletter Konfiguration" }]
|
||||
: []),
|
||||
...(abilityStore.can("read", "settings", "template") ? [{ key: "template", title: "Templates" }] : []),
|
||||
...(abilityStore.can("read", "settings", "template_usage")
|
||||
...(abilityStore.can("read", "configuration", "template") ? [{ key: "template", title: "Templates" }] : []),
|
||||
...(abilityStore.can("read", "configuration", "template_usage")
|
||||
? [{ key: "template_usage", title: "Template-Verwendung" }]
|
||||
: []),
|
||||
...(abilityStore.can("read", "settings", "calendar_type")
|
||||
...(abilityStore.can("read", "configuration", "calendar_type")
|
||||
? [{ key: "calendar_type", title: "Terminarten" }]
|
||||
: []),
|
||||
...(abilityStore.can("read", "settings", "query") ? [{ key: "query_store", title: "Query Store" }] : []),
|
||||
...(abilityStore.can("read", "configuration", "query")
|
||||
? [{ key: "query_store", title: "Query Store" }]
|
||||
: []),
|
||||
],
|
||||
},
|
||||
user: {
|
||||
management: {
|
||||
mainTitle: "Benutzer",
|
||||
main: [
|
||||
...(abilityStore.can("read", "user", "user") ? [{ key: "user", title: "Benutzer" }] : []),
|
||||
...(abilityStore.can("read", "user", "role") ? [{ key: "role", title: "Rollen" }] : []),
|
||||
...(abilityStore.can("read", "user", "webapi") ? [{ key: "webapi", title: "Webapi-Token" }] : []),
|
||||
...(abilityStore.can("read", "user", "backup") ? [{ key: "backup", title: "Backups" }] : []),
|
||||
...(abilityStore.can("read", "management", "user") ? [{ key: "user", title: "Benutzer" }] : []),
|
||||
...(abilityStore.can("read", "management", "role") ? [{ key: "role", title: "Rollen" }] : []),
|
||||
...(abilityStore.can("read", "management", "webapi") ? [{ key: "webapi", title: "Webapi-Token" }] : []),
|
||||
...(abilityStore.can("read", "management", "backup") ? [{ key: "backup", title: "Backups" }] : []),
|
||||
...(abilityStore.isAdmin() ? [{ key: "version", title: "Version" }] : []),
|
||||
],
|
||||
},
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
export type PermissionSection = "club" | "settings" | "user";
|
||||
export type PermissionSection = "club" | "configuration" | "management";
|
||||
|
||||
export type PermissionModule =
|
||||
| "member"
|
||||
|
@ -43,7 +43,7 @@ export type SectionsAndModulesObject = {
|
|||
[section in PermissionSection]: Array<PermissionModule>;
|
||||
};
|
||||
|
||||
export const permissionSections: Array<PermissionSection> = ["club", "settings", "user"];
|
||||
export const permissionSections: Array<PermissionSection> = ["club", "configuration", "management"];
|
||||
export const permissionModules: Array<PermissionModule> = [
|
||||
"member",
|
||||
"calendar",
|
||||
|
@ -69,7 +69,7 @@ export const permissionModules: Array<PermissionModule> = [
|
|||
export const permissionTypes: Array<PermissionType> = ["read", "create", "update", "delete"];
|
||||
export const sectionsAndModules: SectionsAndModulesObject = {
|
||||
club: ["member", "calendar", "newsletter", "protocol", "query"],
|
||||
settings: [
|
||||
configuration: [
|
||||
"qualification",
|
||||
"award",
|
||||
"executive_position",
|
||||
|
@ -82,5 +82,5 @@ export const sectionsAndModules: SectionsAndModulesObject = {
|
|||
"template_usage",
|
||||
"newsletter_config",
|
||||
],
|
||||
user: ["user", "role", "webapi", "backup"],
|
||||
management: ["user", "role", "webapi", "backup"],
|
||||
};
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import type { CalendarTypeViewModel } from "../settings/calendarType.models";
|
||||
import type { CalendarTypeViewModel } from "../configuration/calendarType.models";
|
||||
|
||||
export interface CalendarViewModel {
|
||||
id: string;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import type { CommunicationTypeViewModel } from "../../settings/communicationType.models";
|
||||
import type { CommunicationTypeViewModel } from "../../configuration/communicationType.models";
|
||||
|
||||
export interface CommunicationViewModel {
|
||||
id: number;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import type { CommunicationViewModel } from "./communication.models";
|
||||
import type { MembershipViewModel } from "./membership.models";
|
||||
import type { SalutationViewModel } from "../../settings/salutation.models";
|
||||
import type { SalutationViewModel } from "../../configuration/salutation.models";
|
||||
|
||||
export interface MemberViewModel {
|
||||
id: string;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import type { QueryViewModel } from "../../settings/query.models";
|
||||
import type { QueryViewModel } from "../../configuration/query.models";
|
||||
|
||||
export interface NewsletterViewModel {
|
||||
id: number;
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue