teszt állományok áthelyezése és szelektálása

This commit is contained in:
Roo
2026-06-05 10:50:25 +00:00
parent 18524a08f2
commit f03b5f3916
63 changed files with 633 additions and 527 deletions

View File

@@ -13,6 +13,22 @@
<!-- Content -->
<div class="relative z-10 mx-auto max-w-4xl px-4 py-8 sm:px-6 lg:px-8">
<!-- Loading Spinner -->
<div
v-if="isPageLoading"
class="flex flex-col items-center justify-center py-24"
>
<div class="flex h-16 w-16 items-center justify-center rounded-full bg-[#00E5A0]/10 mb-4">
<svg class="h-8 w-8 animate-spin text-[#00E5A0]" fill="none" viewBox="0 0 24 24">
<circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4" />
<path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z" />
</svg>
</div>
<p class="text-white/60 text-sm">Profil adatok betöltése...</p>
</div>
<!-- Profile Content (shown when not loading) -->
<template v-if="!isPageLoading">
<!-- Account Info Card -->
<div
class="relative mb-8 rounded-2xl border border-white/10 bg-black/40 p-6 backdrop-blur-xl shadow-xl shadow-black/20"
@@ -386,10 +402,14 @@
</div>
<div v-else class="text-sm space-y-1">
<p class="text-white font-medium">{{ address?.zip || '—' }} {{ address?.city || '' }}</p>
<p class="text-white font-medium">{{ address?.street_name || '' }} {{ address?.street_type || '' }} {{ address?.house_number || '' }}</p>
<p v-if="address?.stairwell || address?.floor || address?.door" class="text-white font-medium">
Lépcsőház: {{ address?.stairwell || '' }}, Emelet: {{ address?.floor || '' }}, Ajtó: {{ address?.door || '' }}
<p class="text-white font-medium">
<template v-if="authStore.user?.person?.address?.zip || authStore.user?.person?.address?.city">
{{ authStore.user?.person?.address?.zip }} {{ authStore.user?.person?.address?.city }},
</template>
{{ authStore.user?.person?.address?.street_name }} {{ authStore.user?.person?.address?.street_type }} {{ authStore.user?.person?.address?.house_number }}
</p>
<p v-if="authStore.user?.person?.address?.stairwell || authStore.user?.person?.address?.floor || authStore.user?.person?.address?.door" class="text-white font-medium">
Lépcsőház: {{ authStore.user?.person?.address?.stairwell || '' }}, Emelet: {{ authStore.user?.person?.address?.floor || '' }}, Ajtó: {{ authStore.user?.person?.address?.door || '' }}
</p>
</div>
</div>
@@ -404,6 +424,14 @@
</div>
</div>
<!-- 🩻 DIAGNOSTIC JSON DUMP -->
<div class="rounded-2xl border border-white/10 bg-black/40 p-4 mt-6 backdrop-blur-xl shadow-xl shadow-black/20">
<details>
<summary class="text-xs font-semibold text-[#00E5A0] cursor-pointer select-none mb-2">🩻 RÖNTGEN: authStore.user?.person?.address</summary>
<pre class="text-xs text-green-400 bg-black p-4 mt-2 overflow-auto rounded-lg max-h-64">{{ JSON.stringify(authStore.user?.person?.address, null, 2) }}</pre>
</details>
</div>
<!-- Back to Garage Button -->
<div class="mt-8 text-center">
<button
@@ -426,6 +454,7 @@
Vissza a Garázsba
</button>
</div>
</template>
</div>
<!-- Change Password Modal -->
@@ -530,7 +559,7 @@
</template>
<script setup lang="ts">
import { ref, reactive, computed, watch } from 'vue'
import { ref, reactive, computed, watch, onMounted } from 'vue'
import { useRouter } from 'vue-router'
import { useI18n } from 'vue-i18n'
import { useAuthStore } from '../stores/auth'
@@ -541,12 +570,26 @@ const router = useRouter()
const { t } = useI18n()
const authStore = useAuthStore()
// ── Page-level loading state ──────────────────────────────────────────
const isPageLoading = ref(true)
// ── Computed helpers ──────────────────────────────────────────────────
const person = computed(() => authStore.user?.person ?? null)
const address = computed(() => person.value?.address ?? null)
const identityDocs = computed(() => person.value?.identity_docs ?? null)
const isCityLoading = ref(false)
// ── Force-fetch fresh profile data on mount ───────────────────────────
onMounted(async () => {
try {
await authStore.fetchUser()
} catch (err) {
console.warn('ProfileView: fetchUser failed', err)
} finally {
isPageLoading.value = false
}
})
// ── Edit State ────────────────────────────────────────────────────────
const isEditing = ref(false)
const isSaving = ref(false)
@@ -646,7 +689,7 @@ watch(
zipTimeout = setTimeout(async () => {
try {
const countryCode = 'HU' // Default to HU for now
const response = await api.get('/system/zip-lookup', {
const response = await api.get('/system/parameters/zip-lookup', {
params: { country_code: countryCode, zip_code: newZip }
})
if (response.data?.city) {