diff --git a/src/App.vue b/src/App.vue index 742d483..9f417f0 100644 --- a/src/App.vue +++ b/src/App.vue @@ -27,25 +27,25 @@ -
+
-
+
Telefonkönyv
-
+
Admin
-
- +
+ @@ -58,7 +58,7 @@
-
+
@@ -156,9 +156,16 @@ const isLoadingContacts = ref(false) const editing = ref({ id: null, field: null }) const editBuffer = ref({ id: null, name: "", phone: "", address: "", note: "" }) -// ---- Segédfüggvény: GET body workaround ---- -// Browserek nem küldenek body-t GET-tel, ezért POST-tal kérjük és -// X-HTTP-Method-Override: GET fejlécet adunk hozzá. +function switchAdmin(){ + pageStatus.value = "admin" + menuSel.value = "Admin" +} + +function switchContacts(){ + pageStatus.value = "contacts" + menuSel.value = "Telefonkönyv" +} + async function getWithBody(url, bodyObj) { const res = await fetch(url, { method: 'POST', @@ -168,7 +175,6 @@ async function getWithBody(url, bodyObj) { return res } -// --- API hívások a /contacts-hoz --- async function loadContacts() { isLoadingContacts.value = true console.log(`${apiBase}/contacts`)