@@ -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`)