diff --git a/resources/js/app.js b/resources/js/app.js
index 26e7d93b..8560aaa6 100644
--- a/resources/js/app.js
+++ b/resources/js/app.js
@@ -51,6 +51,7 @@ createInertiaApp({
requireModules(import.meta.glob('./components/ui/*.vue'), app, 'ui');
requireModules(import.meta.glob('./components/page/*.vue', {eager: true}), app, 'page');
+ app.provide('axios', app.config.globalProperties.axios);
app.mount(el);
},
});
diff --git a/resources/js/components/page/Layout.vue b/resources/js/components/page/Layout.vue
index f23445ac..f2b578b9 100644
--- a/resources/js/components/page/Layout.vue
+++ b/resources/js/components/page/Layout.vue
@@ -3,7 +3,7 @@
-
+
diff --git a/resources/js/composables/useIndex.js b/resources/js/composables/useIndex.js
new file mode 100644
index 00000000..ad3a6f7a
--- /dev/null
+++ b/resources/js/composables/useIndex.js
@@ -0,0 +1,85 @@
+import {ref, computed} from 'vue';
+import {router} from '@inertiajs/vue3';
+
+export function useIndex(props) {
+ const rawProps = JSON.parse(JSON.stringify(props));
+ const inner = {
+ data: ref(rawProps.data),
+ meta: ref(rawProps.meta),
+ };
+
+ function toFilterString(data) {
+ return btoa(encodeURIComponent(JSON.stringify(data)));
+ }
+
+ const filterString = computed(() => toFilterString(inner.meta.value.filter));
+
+ function reload(resetPage = true) {
+ var data = {
+ filter: filterString.value,
+ page: 1,
+ };
+
+ data['page'] = resetPage ? 1 : inner.meta.value.current_page;
+
+ router.visit(window.location.pathname, {
+ data,
+ preserveState: true,
+ onSuccess: (page) => {
+ inner.data.value = page.props.data.data;
+ inner.meta.value = page.props.data.meta;
+ },
+ });
+ }
+
+ function can(permission) {
+ return inner.meta.value.can[permission];
+ }
+
+ function getFilter(value) {
+ return inner.meta.value.filter[value];
+ }
+
+ function setFilter(key, value) {
+ inner.meta.value.filter[key] = value;
+ reload();
+ }
+
+ function requestCallback(successMessage, failureMessage) {
+ return {
+ onSuccess: () => {
+ this.$success(successMessage);
+ reload(false);
+ },
+ onFailure: () => {
+ this.$error(failureMessage);
+ reload(false);
+ },
+ preserveState: true,
+ };
+ }
+
+ return {
+ data: inner.data,
+ reload,
+ can,
+ getFilter,
+ setFilter,
+ requestCallback,
+ meta: inner.meta,
+ filterString,
+ router,
+ toFilterString,
+ };
+}
+
+const indexProps = {
+ data: {
+ default: () => {
+ return {data: [], meta: {}};
+ },
+ type: Object,
+ },
+};
+
+export {indexProps};
diff --git a/resources/js/mixins/indexHelpers.js b/resources/js/mixins/indexHelpers.js
deleted file mode 100644
index 3148d654..00000000
--- a/resources/js/mixins/indexHelpers.js
+++ /dev/null
@@ -1,60 +0,0 @@
-export default {
- data: function () {
- return {
- inner: {...this.data},
- };
- },
- props: {
- data: {},
- },
- computed: {
- filterString() {
- return this.toFilterString(this.inner.meta.filter);
- },
- },
- methods: {
- toFilterString(data) {
- return btoa(encodeURIComponent(JSON.stringify(data)));
- },
- reload(resetPage = true) {
- var _self = this;
- var data = {
- filter: this.filterString,
- page: 1,
- };
-
- data['page'] = resetPage ? 1 : this.inner.meta.current_page;
-
- this.$inertia.visit(window.location.pathname, {
- data,
- preserveState: true,
- onSuccess(page) {
- _self.inner = page.props.data;
- },
- });
- },
- can(permission) {
- return this.inner.meta.can[permission];
- },
- getFilter(value) {
- return this.inner.meta.filter[value];
- },
- setFilter(key, value) {
- this.inner.meta.filter[key] = value;
- this.reload();
- },
- requestCallback(successMessage, failureMessage) {
- return {
- onSuccess: () => {
- this.$success(successMessage);
- this.reload(false);
- },
- onFailure: () => {
- this.$error(failureMessage);
- this.reload(false);
- },
- preserveState: true,
- };
- },
- },
-};
diff --git a/resources/js/views/activity/VIndex.vue b/resources/js/views/activity/VIndex.vue
index 4df9ad35..666656dd 100644
--- a/resources/js/views/activity/VIndex.vue
+++ b/resources/js/views/activity/VIndex.vue
@@ -1,14 +1,14 @@
- Tätigkeit erstellen
+ Tätigkeit erstellen
-
+
@@ -18,46 +18,39 @@
-
+
-
+
-
diff --git a/resources/js/views/maildispatcher/MaildispatcherForm.vue b/resources/js/views/maildispatcher/MaildispatcherForm.vue
index 2ea4ef76..166f6557 100644
--- a/resources/js/views/maildispatcher/MaildispatcherForm.vue
+++ b/resources/js/views/maildispatcher/MaildispatcherForm.vue
@@ -9,60 +9,60 @@
-
diff --git a/resources/js/views/mailgateway/Index.vue b/resources/js/views/mailgateway/Index.vue
index 22414a48..2d4c5d4c 100644
--- a/resources/js/views/mailgateway/Index.vue
+++ b/resources/js/views/mailgateway/Index.vue
@@ -1,44 +1,44 @@
- Neue Verbindung
+ Neue Verbindung
-
+
@@ -53,7 +53,7 @@
Aktion
-
+
@@ -65,49 +65,36 @@
>
-
+
-
+
-
diff --git a/resources/js/views/member/VIndex.vue b/resources/js/views/member/VIndex.vue
index cbd5d99d..9c103047 100644
--- a/resources/js/views/member/VIndex.vue
+++ b/resources/js/views/member/VIndex.vue
@@ -1,63 +1,63 @@
- Mitglied anlegen
- Rechnungen erstellen
- Rechnungen versenden
+ Mitglied anlegen
+ Rechnungen erstellen
+ Rechnungen versenden
-
+
Das Mitglied "{{ deleting.member.fullname }}" löschen?
Alle Zuordnungen (Ausbildungen, Rechnungen, Zahlungen, Tätigkeiten) werden ebenfalls entfernt.
-
Dieses Mitglied ist nicht in NaMi vorhanden und wird daher nur in der AdReMa gelöscht werden.
-
+ Dieses Mitglied ist nicht in NaMi vorhanden und wird daher nur in der AdReMa gelöscht werden.
+
Dieses Mitglied ist in NaMi vorhanden und wird daher in NaMi abgemeldet werden. Sofern "Datenweiterverwendung" eingeschaltet ist, wird das Mitglied auf inaktiv gesetzt.
-
-
+
+
@@ -73,19 +73,21 @@
Ort
Tags
Alter
- Rechnung
+ Rechnung
Ausstand
-
+
-
+
+
+
-
+
@@ -98,101 +100,82 @@
-
+
-
+
-