Compare commits

..

No commits in common. "634a13b4dd1a5fedb088cb0856327b81b861dae7" and "9f0516ad557cd125ea5ef9fcfdaae9b877ff4400" have entirely different histories.

10 changed files with 27 additions and 107 deletions

13
package-lock.json generated
View File

@ -27,7 +27,6 @@
"pusher-js": "^8.3.0", "pusher-js": "^8.3.0",
"svg-sprite": "^2.0.2", "svg-sprite": "^2.0.2",
"typescript-eslint": "^8.34.0", "typescript-eslint": "^8.34.0",
"uuid": "^11.1.0",
"vite": "^4.5.2", "vite": "^4.5.2",
"vue": "^3.3.4", "vue": "^3.3.4",
"vue-toastification": "^2.0.0-rc.5", "vue-toastification": "^2.0.0-rc.5",
@ -4831,18 +4830,6 @@
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="
}, },
"node_modules/uuid": {
"version": "11.1.0",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-11.1.0.tgz",
"integrity": "sha512-0/A9rDy9P7cJ+8w1c9WD9V//9Wj15Ce2MPz8Ri6032usz+NfePxx5AcN3bN+r6ZL6jEo066/yNYB3tn4pQEx+A==",
"funding": [
"https://github.com/sponsors/broofa",
"https://github.com/sponsors/ctavan"
],
"bin": {
"uuid": "dist/esm/bin/uuid"
}
},
"node_modules/vinyl": { "node_modules/vinyl": {
"version": "2.2.1", "version": "2.2.1",
"resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.2.1.tgz", "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.2.1.tgz",

View File

@ -44,7 +44,6 @@
"pusher-js": "^8.3.0", "pusher-js": "^8.3.0",
"svg-sprite": "^2.0.2", "svg-sprite": "^2.0.2",
"typescript-eslint": "^8.34.0", "typescript-eslint": "^8.34.0",
"uuid": "^11.1.0",
"vite": "^4.5.2", "vite": "^4.5.2",
"vue": "^3.3.4", "vue": "^3.3.4",
"vue-toastification": "^2.0.0-rc.5", "vue-toastification": "^2.0.0-rc.5",

View File

@ -25,7 +25,6 @@ declare module 'vue' {
PageFullLayout: typeof import('@/components/page/FullLayout.vue')['default'] PageFullLayout: typeof import('@/components/page/FullLayout.vue')['default']
PageHeader: typeof import('@/components/page/Header.vue')['default'] PageHeader: typeof import('@/components/page/Header.vue')['default']
PageLayout: typeof import('@/components/page/Layout.vue')['default'] PageLayout: typeof import('@/components/page/Layout.vue')['default']
PagePopups: typeof import('@/components/page/Popups.vue')['default']
PageSearchModal: typeof import('@/components/page/SearchModal.vue')['default'] PageSearchModal: typeof import('@/components/page/SearchModal.vue')['default']
PageTitle: typeof import('@/components/page/Title.vue')['default'] PageTitle: typeof import('@/components/page/Title.vue')['default']
PageToolbarButton: typeof import('@/components/page/ToolbarButton.vue')['default'] PageToolbarButton: typeof import('@/components/page/ToolbarButton.vue')['default']

View File

@ -1,18 +0,0 @@
<template>
<div>
<ui-popup v-for="(popup, index) in swal.popups" :key="index" :heading="popup.title">
<div class="space-y-4 mt-4">
<div v-text="popup.body" />
<div class="space-x-4">
<ui-button type="button" class="btn-danger" @click.prevent="popup.resolve(popup.id)">{{ popup.confirmButton }}</ui-button>
<ui-button type="button" class="btn-success" @click.prevent="popup.reject(popup.id)">{{ popup.cancelButton }}</ui-button>
</div>
</div>
</ui-popup>
</div>
</template>
<script lang="ts" setup>
import useSwal from '@/stores/swalStore.ts';
const swal = useSwal();
</script>

View File

@ -1,22 +1,24 @@
<template> <template>
<button v-bind="$attrs" class="btn btn-primary relative group"> <button v-bind="$attrs" class="btn btn-primary relative group">
<div :class="{hidden: !isLoading, flex: isLoading}" class="absolute items-center top-0 h-full left-0 ml-2"> <div :class="{hidden: !isLoading, flex: isLoading}" class="absolute items-center top-0 h-full left-0 ml-2">
<ui-spinner class="border-primary-400 w-6 h-6 group-hover:border-primary-200" /> <ui-spinner class="border-primary-400 w-6 h-6 group-hover:border-primary-200"></ui-spinner>
</div> </div>
<slot /> <slot></slot>
</button> </button>
</template> </template>
<script> <script>
import {menuStore} from '../../stores/menuStore.js';
export default { export default {
data: function () {
return {};
},
props: { props: {
isLoading: { isLoading: {
type: Boolean, type: Boolean,
default: false, default: false,
}, },
}, },
data: function () {
return {};
},
}; };
</script> </script>

View File

@ -1,22 +1,23 @@
<template> <template>
<div class="fixed z-40 top-0 left-0 w-full h-full flex items-center justify-center p-6 bg-black/60 backdrop-blur-sm"> <div class="fixed z-40 top-0 left-0 w-full h-full flex items-center justify-center p-6 bg-black/60 backdrop-blur-sm">
<div class="relative rounded-lg p-8 bg-zinc-800 shadow-2xl shadow-black border border-zinc-700 border-solid w-full max-h-full flex flex-col overflow-auto" <div
class="relative rounded-lg p-8 bg-zinc-800 shadow-2xl shadow-black border border-zinc-700 border-solid w-full max-h-full flex flex-col overflow-auto"
:class="full ? 'h-full' : innerWidth" :class="full ? 'h-full' : innerWidth"
> >
<div class="absolute top-0 right-0 mt-6 mr-6 flex space-x-6"> <div class="absolute top-0 right-0 mt-6 mr-6 flex space-x-6">
<slot name="actions" /> <slot name="actions"></slot>
<a href="#" @click.prevent="$emit('close')"> <a href="#" @click.prevent="$emit('close')">
<ui-sprite src="close" class="text-zinc-400 w-6 h-6" /> <ui-sprite src="close" class="text-zinc-400 w-6 h-6"></ui-sprite>
</a> </a>
</div> </div>
<h3 v-if="heading" class="font-semibold text-primary-200 text-xl" v-html="heading" /> <h3 v-if="heading" class="font-semibold text-primary-200 text-xl" v-html="heading"></h3>
<div class="text-primary-100 group is-popup grow flex flex-col"> <div class="text-primary-100 group is-popup grow flex flex-col">
<suspense> <suspense>
<div> <div>
<slot /> <slot></slot>
</div> </div>
<template #fallback> <template #fallback>
<ui-loading /> <ui-loading></ui-loading>
</template> </template>
</suspense> </suspense>
</div> </div>

View File

@ -1,8 +1,9 @@
<template> <template>
<v-notification class="fixed z-40 right-0 bottom-0 mb-3 mr-3" /> <v-notification class="fixed z-40 right-0 bottom-0 mb-3 mr-3"></v-notification>
<!-- ******************************** Sidebar ******************************** --> <!-- ******************************** Sidebar ******************************** -->
<div class="fixed z-40 bg-gray-800 p-6 w-56 top-0 h-screen border-r border-gray-600 border-solid flex flex-col justify-between transition-all" <div
class="fixed z-40 bg-gray-800 p-6 w-56 top-0 h-screen border-r border-gray-600 border-solid flex flex-col justify-between transition-all"
:class="{ :class="{
'-left-[14rem]': !menuStore.isShifted, '-left-[14rem]': !menuStore.isShifted,
'left-0': menuStore.isShifted, 'left-0': menuStore.isShifted,
@ -28,15 +29,13 @@
<v-link icon="logout" href="/logout" @click.prevent="$inertia.post('/logout')">Abmelden</v-link> <v-link icon="logout" href="/logout" @click.prevent="$inertia.post('/logout')">Abmelden</v-link>
</div> </div>
<a v-if="menuStore.hideable" href="#" class="absolute right-0 top-0 mr-2 mt-2" @click.prevent="menuStore.hide()"> <a v-if="menuStore.hideable" href="#" class="absolute right-0 top-0 mr-2 mt-2" @click.prevent="menuStore.hide()">
<ui-sprite src="close" class="w-5 h-5 text-gray-300" /> <ui-sprite src="close" class="w-5 h-5 text-gray-300"></ui-sprite>
</a> </a>
</div> </div>
<page-popups /> <slot></slot>
<slot /> <page-search-modal v-if="searchVisible" @close="searchVisible = false"></page-search-modal>
<page-search-modal v-if="searchVisible" @close="searchVisible = false" />
</template> </template>
<script> <script>

View File

@ -1,46 +0,0 @@
import { defineStore } from 'pinia';
import { v4 as uuidv4 } from 'uuid';
interface Popup {
id: string;
title: string;
body: string;
confirmButton: string;
cancelButton: string;
resolve: (id: string) => void;
reject: (id: string) => void;
}
export default defineStore('swal', {
state: () => ({
popups: [] as Popup[],
}),
actions: {
confirm(title: string, body: string): Promise<void> {
return new Promise((resolve, reject) => {
new Promise<string>((resolve, reject) => {
this.popups.push({
title,
body,
confirmButton: 'Okay',
cancelButton: 'Abbrechen',
resolve,
reject,
id: uuidv4(),
});
}).then((id) => {
this.remove(id);
resolve();
}).catch((id) => {
this.remove(id);
reject();
});
});
},
remove(id: string) {
this.popups = this.popups.filter(p => p.id !== id);
}
},
});

View File

@ -198,7 +198,6 @@ import Participants from './Participants.vue';
import Conditions from './Conditions.vue'; import Conditions from './Conditions.vue';
import ConditionsForm from './ConditionsForm.vue'; import ConditionsForm from './ConditionsForm.vue';
import { useToast } from 'vue-toastification'; import { useToast } from 'vue-toastification';
import useSwal from '@/stores/swalStore.ts';
const props = defineProps(indexProps); const props = defineProps(indexProps);
const { meta, data, reloadPage, reload, create, single, edit, cancel, submit, remove, getFilter, setFilter } = useIndex(props.data, 'form'); const { meta, data, reloadPage, reload, create, single, edit, cancel, submit, remove, getFilter, setFilter } = useIndex(props.data, 'form');
@ -213,7 +212,6 @@ const active = ref(0);
const activeMailTab = ref(0); const activeMailTab = ref(0);
const tabs = [{ title: 'Allgemeines' }, { title: 'Beschreibung' }, { title: 'Formular' }, { title: 'Bestätigungs-E-Mail' }, { title: 'Export' }, { title: 'Prävention' }]; const tabs = [{ title: 'Allgemeines' }, { title: 'Beschreibung' }, { title: 'Formular' }, { title: 'Bestätigungs-E-Mail' }, { title: 'Export' }, { title: 'Prävention' }];
const mailTabs = [{ title: 'vor Daten' }, { title: 'nach Daten' }]; const mailTabs = [{ title: 'vor Daten' }, { title: 'nach Daten' }];
const swal = useSwal();
const allFields = computed(() => { const allFields = computed(() => {
if (!single.value) { if (!single.value) {
@ -231,7 +229,6 @@ const allFields = computed(() => {
}); });
async function onCopy(form) { async function onCopy(form) {
await swal.confirm('Diese Veranstaltung kopieren?', 'Nach dem Kopieren wird die Veranstaltung auf inaktiv gesetzt. Bitte aktiviere den Filter "inaktive zeigen", um die kopierte Veranstaltung zu sehen.');
await axios.post(form.links.copy, {}); await axios.post(form.links.copy, {});
reload(false); reload(false);
} }