2020-06-02 23:45:25 +02:00
|
|
|
<template>
|
2022-11-23 23:49:07 +01:00
|
|
|
<div class="pb-6">
|
2023-03-15 00:08:20 +01:00
|
|
|
<div class="px-6 py-2 flex border-b border-gray-600 items-center space-x-3">
|
2023-03-14 23:27:15 +01:00
|
|
|
<f-switch v-show="hasModule('bill')" id="ausstand" @input="setFilter('ausstand', $event)" :items="getFilter('ausstand')" label="Nur Ausstände" size="sm"></f-switch>
|
|
|
|
<f-select
|
|
|
|
v-show="hasModule('bill')"
|
|
|
|
name="billKinds"
|
|
|
|
id="billKinds"
|
|
|
|
@input="setFilter('bill_kind', $event)"
|
|
|
|
:options="billKinds"
|
|
|
|
:value="getFilter('bill_kind')"
|
|
|
|
label="Rechnung"
|
|
|
|
size="sm"
|
|
|
|
></f-select>
|
|
|
|
<f-select
|
|
|
|
id="activity_id"
|
|
|
|
@input="setFilter('activity_id', $event)"
|
|
|
|
:options="filterActivities"
|
|
|
|
:value="getFilter('activity_id')"
|
|
|
|
label="Tätigkeit"
|
|
|
|
size="sm"
|
|
|
|
name="activity_id"
|
|
|
|
></f-select>
|
|
|
|
<f-select
|
|
|
|
id="subactivity_id"
|
|
|
|
@input="setFilter('subactivity_id', $event)"
|
|
|
|
:options="filterSubactivities"
|
|
|
|
:value="getFilter('subactivity_id')"
|
|
|
|
label="Untertätigkeit"
|
|
|
|
size="sm"
|
|
|
|
name="subactivity_id"
|
|
|
|
></f-select>
|
2023-03-15 00:08:20 +01:00
|
|
|
<button class="btn btn-primary label mr-2" @click.prevent="exportMembers">
|
|
|
|
<svg-sprite class="w-3 h-3 xl:mr-2" src="save"></svg-sprite>
|
|
|
|
<span class="hidden xl:inline">Exportieren</span>
|
|
|
|
</button>
|
2023-03-14 23:27:15 +01:00
|
|
|
</div>
|
2021-08-22 05:51:25 +02:00
|
|
|
|
2022-11-24 00:59:40 +01:00
|
|
|
<table cellspacing="0" cellpadding="0" border="0" class="custom-table custom-table-sm hidden md:table">
|
2021-08-22 19:31:20 +02:00
|
|
|
<thead>
|
|
|
|
<th></th>
|
|
|
|
<th>Nachname</th>
|
|
|
|
<th>Vorname</th>
|
2022-11-23 23:49:07 +01:00
|
|
|
<th class="hidden 2xl:table-cell">Ort</th>
|
2021-08-22 19:31:20 +02:00
|
|
|
<th>Tags</th>
|
2022-11-23 23:49:07 +01:00
|
|
|
<th class="hidden xl:table-cell">Alter</th>
|
|
|
|
<th class="hidden xl:table-cell" v-show="hasModule('bill')">Rechnung</th>
|
2021-11-19 00:53:19 +01:00
|
|
|
<th v-show="hasModule('bill')">Ausstand</th>
|
2021-08-22 19:31:20 +02:00
|
|
|
<th></th>
|
|
|
|
</thead>
|
2021-04-11 02:55:26 +02:00
|
|
|
|
2023-03-14 23:27:15 +01:00
|
|
|
<tr v-for="(member, index) in inner.data" :key="index">
|
2022-11-24 00:05:56 +01:00
|
|
|
<td><age-groups :member="member"></age-groups></td>
|
2021-08-22 19:31:20 +02:00
|
|
|
<td v-text="member.lastname"></td>
|
|
|
|
<td v-text="member.firstname"></td>
|
2022-11-23 23:49:07 +01:00
|
|
|
<td class="hidden 2xl:table-cell" v-text="member.full_address"></td>
|
2022-11-24 00:22:01 +01:00
|
|
|
<td><tags :member="member"></tags></td>
|
2022-11-23 23:49:07 +01:00
|
|
|
<td class="hidden xl:table-cell" v-text="member.age"></td>
|
|
|
|
<td class="hidden xl:table-cell" v-show="hasModule('bill')">
|
2022-11-24 00:59:40 +01:00
|
|
|
<v-label :value="member.bill_kind_name" fallback="kein"></v-label>
|
2021-08-22 19:31:20 +02:00
|
|
|
</td>
|
2021-11-19 00:53:19 +01:00
|
|
|
<td v-show="hasModule('bill')">
|
2022-11-24 00:59:40 +01:00
|
|
|
<v-label :value="member.pending_payment" fallback="---"></v-label>
|
2021-08-22 19:31:20 +02:00
|
|
|
</td>
|
2022-11-18 15:55:44 +01:00
|
|
|
<td>
|
2022-12-05 00:21:24 +01:00
|
|
|
<actions :member="member" @sidebar="openSidebar(index, $event)" @remove="remove(member)"></actions>
|
2021-08-22 19:31:20 +02:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
2021-04-11 02:55:26 +02:00
|
|
|
|
2022-11-24 00:59:40 +01:00
|
|
|
<div class="md:hidden p-3 grid gap-3">
|
|
|
|
<box class="relative" :heading="member.fullname" v-for="(member, index) in data.data" :key="index">
|
|
|
|
<div slot="in-title">
|
|
|
|
<age-groups class="ml-2" :member="member" icon-class="w-4 h-4"></age-groups>
|
|
|
|
</div>
|
|
|
|
<div class="text-xs text-gray-200" v-text="member.full_address"></div>
|
2022-12-05 00:21:24 +01:00
|
|
|
<div class="flex items-center mt-1 space-x-4">
|
2022-11-24 00:59:40 +01:00
|
|
|
<tags :member="member"></tags>
|
2023-03-14 23:27:15 +01:00
|
|
|
<v-label class="text-gray-100 block" v-show="hasModule('bill')" :value="member.pending_payment" fallback=""></v-label>
|
2022-11-24 00:59:40 +01:00
|
|
|
</div>
|
2023-03-14 23:27:15 +01:00
|
|
|
<actions class="mt-2" :member="member" @sidebar="openSidebar(index, $event)" @remove="remove(member)"></actions>
|
2022-11-24 00:59:40 +01:00
|
|
|
<div class="absolute right-0 top-0 h-full flex items-center mr-2">
|
2023-03-14 23:27:15 +01:00
|
|
|
<i-link :href="member.links.show" v-tooltip="`Details`"><svg-sprite src="chevron-down" class="w-6 h-6 text-teal-100 -rotate-90"></svg-sprite></i-link>
|
2022-11-24 00:59:40 +01:00
|
|
|
</div>
|
|
|
|
</box>
|
|
|
|
</div>
|
|
|
|
|
2021-04-11 02:55:26 +02:00
|
|
|
<div class="px-6">
|
2022-02-12 15:12:08 +01:00
|
|
|
<v-pages class="mt-4" :value="data.meta" :only="['data']"></v-pages>
|
2021-04-11 02:55:26 +02:00
|
|
|
</div>
|
2021-07-04 16:56:07 +02:00
|
|
|
|
|
|
|
<transition name="sidebar">
|
2022-05-13 10:33:57 +02:00
|
|
|
<member-payments
|
|
|
|
v-if="single !== null && sidebar === 'payment.index'"
|
|
|
|
@close="closeSidebar"
|
|
|
|
:subscriptions="subscriptions"
|
|
|
|
:statuses="statuses"
|
|
|
|
:value="data.data[single]"
|
|
|
|
></member-payments>
|
|
|
|
<member-memberships
|
|
|
|
v-if="single !== null && sidebar === 'membership.index'"
|
|
|
|
@close="closeSidebar"
|
2023-02-25 19:49:53 +01:00
|
|
|
:groups="data.meta.groups"
|
2022-05-13 10:33:57 +02:00
|
|
|
:activities="activities"
|
|
|
|
:subactivities="subactivities"
|
|
|
|
:value="data.data[single]"
|
|
|
|
></member-memberships>
|
2023-03-14 23:27:15 +01:00
|
|
|
<member-courses v-if="single !== null && sidebar === 'courses.index'" @close="closeSidebar" :courses="courses" :value="data.data[single]"></member-courses>
|
2021-07-04 16:56:07 +02:00
|
|
|
</transition>
|
2020-06-02 23:45:25 +02:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2022-02-12 14:47:07 +01:00
|
|
|
import MemberPayments from './MemberPayments.vue';
|
|
|
|
import MemberMemberships from './MemberMemberships.vue';
|
2022-02-12 14:28:56 +01:00
|
|
|
import MemberCourses from './MemberCourses.vue';
|
2023-03-14 23:27:15 +01:00
|
|
|
import indexHelpers from '../../mixins/indexHelpers.js';
|
2020-06-02 23:45:25 +02:00
|
|
|
|
2021-04-11 02:55:26 +02:00
|
|
|
export default {
|
2022-05-13 10:33:57 +02:00
|
|
|
data: function () {
|
2021-08-22 05:15:56 +02:00
|
|
|
return {
|
|
|
|
sidebar: null,
|
|
|
|
single: null,
|
|
|
|
};
|
|
|
|
},
|
|
|
|
|
2023-03-14 23:27:15 +01:00
|
|
|
mixins: [indexHelpers],
|
2021-08-22 04:28:11 +02:00
|
|
|
|
2022-11-24 00:05:56 +01:00
|
|
|
components: {
|
|
|
|
MemberMemberships,
|
|
|
|
MemberPayments,
|
|
|
|
MemberCourses,
|
2022-11-24 00:22:01 +01:00
|
|
|
'age-groups': () => import(/* webpackChunkName: "member" */ './AgeGroups'),
|
|
|
|
'tags': () => import(/* webpackChunkName: "member" */ './Tags'),
|
2022-12-05 00:21:24 +01:00
|
|
|
'actions': () => import(/* webpackChunkName: "member" */ './index/Actions'),
|
2022-11-24 00:05:56 +01:00
|
|
|
},
|
2021-07-04 16:56:07 +02:00
|
|
|
|
2021-07-04 19:09:59 +02:00
|
|
|
methods: {
|
2023-03-15 00:08:20 +01:00
|
|
|
exportMembers() {
|
|
|
|
window.open(`/member-export?filter=${this.filterString}`);
|
|
|
|
},
|
2021-07-04 19:09:59 +02:00
|
|
|
remove(member) {
|
|
|
|
if (window.confirm('Mitglied löschen?')) {
|
|
|
|
this.$inertia.delete(`/member/${member.id}`);
|
|
|
|
}
|
2021-08-22 05:15:56 +02:00
|
|
|
},
|
|
|
|
openSidebar(index, name) {
|
|
|
|
this.single = index;
|
|
|
|
this.sidebar = name;
|
|
|
|
},
|
|
|
|
closeSidebar() {
|
|
|
|
this.single = null;
|
|
|
|
this.sidebar = null;
|
2022-05-13 10:33:57 +02:00
|
|
|
},
|
2021-07-04 19:09:59 +02:00
|
|
|
},
|
|
|
|
|
2021-08-22 05:51:25 +02:00
|
|
|
props: {
|
2021-08-22 05:15:56 +02:00
|
|
|
subscriptions: {},
|
|
|
|
statuses: {},
|
|
|
|
paymentDefaults: {},
|
2021-08-22 05:51:25 +02:00
|
|
|
query: {},
|
|
|
|
billKinds: {},
|
2021-08-22 22:23:17 +02:00
|
|
|
activities: {},
|
|
|
|
subactivities: {},
|
2021-08-23 00:46:41 +02:00
|
|
|
filterActivities: {},
|
|
|
|
filterSubactivities: {},
|
2021-11-19 22:58:27 +01:00
|
|
|
courses: {},
|
2022-05-13 10:33:57 +02:00
|
|
|
},
|
|
|
|
};
|
2020-06-02 23:45:25 +02:00
|
|
|
</script>
|