diff --git a/src/views/adminpanel/Events.vue b/src/views/adminpanel/Events.vue index 41837f6..f21d5a9 100644 --- a/src/views/adminpanel/Events.vue +++ b/src/views/adminpanel/Events.vue @@ -2,13 +2,39 @@ import AdminNavbar from "../../components/admin/AdminNavbar.vue"; import { useRoute } from "vue-router"; import { ref } from "vue"; +import RitzenbergenLib from "../../ritzenbergenlib.ts"; +import InputP from "../../components/admin/InputP.vue"; const route = useRoute(); const token = ref(route.params.token); +async function submit(myevent) { + const url = new URL( + RitzenbergenLib.RitzenbergenLib.api("/admin/events/editEvent.php") + ); + return fetch(url, { + headers: { + Authorization: "Bearer " + token.value, + }, + body: JSON.stringify(myevent), + method: "POST" + }); +} +const events = ref([]); +async function getEvents() { + return fetch(RitzenbergenLib.RitzenbergenLib.api("/get_events.php")) + .then((res) => res.json()) + .then((res) => { + events.value = res; + console.log(events.value); + return res; + }); +} + +getEvents(); @@ -18,9 +44,85 @@ const token = ref(route.params.token); Events + + + + Name + Datum + Typ + Inhalt + Link + Foto + Minitext + Formular + + + + + + + + + + + + + + Link + Markdown + Download-Link + HTML + Fotos + + + + + + + + + + + + + + + + + + testformular-2 + + + + Speichern + + + +