refaktor címtár
This commit is contained in:
@@ -178,6 +178,70 @@
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<!-- Services (Categories) -->
|
||||
<div class="bg-slate-800 rounded-xl border border-slate-700 p-6">
|
||||
<h2 class="text-lg font-semibold text-white mb-4">Szolgáltatások</h2>
|
||||
<div v-if="provider.category_ids && provider.category_ids.length > 0" class="flex flex-wrap gap-2">
|
||||
<span
|
||||
v-for="catId in provider.category_ids"
|
||||
:key="catId"
|
||||
class="inline-flex items-center gap-1 px-3 py-1.5 bg-indigo-500/10 text-indigo-300 rounded-full text-xs font-medium"
|
||||
>
|
||||
#{{ catId }}
|
||||
</span>
|
||||
</div>
|
||||
<p v-else class="text-sm text-slate-500 italic">Nincsenek kategóriák beállítva</p>
|
||||
</div>
|
||||
|
||||
<!-- Vehicle Classes -->
|
||||
<div class="bg-slate-800 rounded-xl border border-slate-700 p-6">
|
||||
<h2 class="text-lg font-semibold text-white mb-4">Járműosztályok</h2>
|
||||
<div v-if="provider.supported_vehicle_classes && provider.supported_vehicle_classes.length > 0" class="flex flex-wrap gap-2">
|
||||
<span
|
||||
v-for="vc in provider.supported_vehicle_classes"
|
||||
:key="vc"
|
||||
class="inline-flex items-center gap-1 px-3 py-1.5 bg-emerald-500/10 text-emerald-300 rounded-full text-xs font-medium"
|
||||
>
|
||||
{{ vehicleClassLabel(vc) }}
|
||||
</span>
|
||||
</div>
|
||||
<p v-else class="text-sm text-slate-500 italic">Nincsenek járműosztályok beállítva</p>
|
||||
</div>
|
||||
|
||||
<!-- Specializations -->
|
||||
<div class="bg-slate-800 rounded-xl border border-slate-700 p-6">
|
||||
<h2 class="text-lg font-semibold text-white mb-4">Specializációk</h2>
|
||||
<div v-if="hasSpecializations" class="space-y-3">
|
||||
<!-- Brands -->
|
||||
<div v-if="provider.specializations?.brands?.length">
|
||||
<h3 class="text-xs text-slate-500 uppercase tracking-wider mb-2">Márkák</h3>
|
||||
<div class="flex flex-wrap gap-2">
|
||||
<span
|
||||
v-for="brand in provider.specializations.brands"
|
||||
:key="brand"
|
||||
class="inline-flex items-center gap-1 px-3 py-1.5 bg-amber-500/10 text-amber-300 rounded-full text-xs font-medium"
|
||||
>
|
||||
{{ brand }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Propulsion -->
|
||||
<div v-if="provider.specializations?.propulsion?.length">
|
||||
<h3 class="text-xs text-slate-500 uppercase tracking-wider mb-2">Hajtáslánc</h3>
|
||||
<div class="flex flex-wrap gap-2">
|
||||
<span
|
||||
v-for="prop in provider.specializations.propulsion"
|
||||
:key="prop"
|
||||
class="inline-flex items-center gap-1 px-3 py-1.5 bg-cyan-500/10 text-cyan-300 rounded-full text-xs font-medium"
|
||||
>
|
||||
{{ prop }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<p v-else class="text-sm text-slate-500 italic">Nincsenek specializációk beállítva</p>
|
||||
</div>
|
||||
|
||||
<!-- Opening Hours -->
|
||||
<div class="bg-slate-800 rounded-xl border border-slate-700 p-6">
|
||||
<h2 class="text-lg font-semibold text-white mb-4">Nyitvatartás</h2>
|
||||
@@ -694,6 +758,16 @@ const hasOpeningHours = computed(() => {
|
||||
})
|
||||
})
|
||||
|
||||
/**
|
||||
* Returns true if the provider has any specializations (brands or propulsion).
|
||||
*/
|
||||
const hasSpecializations = computed(() => {
|
||||
const spec = provider.value?.specializations
|
||||
if (!spec || typeof spec !== 'object') return false
|
||||
return (Array.isArray(spec.brands) && spec.brands.length > 0) ||
|
||||
(Array.isArray(spec.propulsion) && spec.propulsion.length > 0)
|
||||
})
|
||||
|
||||
// ── DAYS constant ──────────────────────────────────────
|
||||
const DAYS = [
|
||||
{ key: 'monday', label: 'Hétfő' },
|
||||
@@ -737,6 +811,23 @@ function statusDescription(status: string): string {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Maps vehicle class keys to Hungarian labels.
|
||||
*/
|
||||
function vehicleClassLabel(key: string): string {
|
||||
const labels: Record<string, string> = {
|
||||
car: 'Személyautó',
|
||||
motorcycle: 'Motorkerékpár',
|
||||
truck: 'Teherautó',
|
||||
hgv: 'Nehézgépjármű (HGV)',
|
||||
light_commercial: 'Kishaszonjármű',
|
||||
personal: 'Személyes',
|
||||
boat: 'Csónak/Vízi',
|
||||
other: 'Egyéb',
|
||||
}
|
||||
return labels[key] || key
|
||||
}
|
||||
|
||||
function validationTypeLabel(type: string): string {
|
||||
const labels: Record<string, string> = {
|
||||
phone_verified: 'Telefon igazolt',
|
||||
|
||||
Reference in New Issue
Block a user