695 lines
56 KiB
JavaScript
695 lines
56 KiB
JavaScript
import { _ as __nuxt_component_0 } from "./nuxt-link-1NBbHb-h.js";
|
||
import { defineComponent, useSSRContext, ref, computed, watch, createVNode, resolveDynamicComponent, withCtx, openBlock, createBlock, createTextVNode } from "vue";
|
||
import { ssrRenderAttrs, ssrRenderList, ssrInterpolate, ssrRenderComponent, ssrRenderClass, ssrRenderVNode, ssrRenderStyle, ssrRenderAttr, ssrIncludeBooleanAttr, ssrLooseContain, ssrLooseEqual } from "vue/server-renderer";
|
||
import { useRoute, useRouter } from "vue-router";
|
||
import { d as useCookie } from "../server.mjs";
|
||
import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.js";
|
||
import "/app/node_modules/ufo/dist/index.mjs";
|
||
import "/app/node_modules/defu/dist/defu.mjs";
|
||
import "/app/node_modules/ofetch/dist/node.mjs";
|
||
import "#internal/nuxt/paths";
|
||
import "/app/node_modules/hookable/dist/index.mjs";
|
||
import "/app/node_modules/unctx/dist/index.mjs";
|
||
import "/app/node_modules/h3/dist/index.mjs";
|
||
import "pinia";
|
||
import "/app/node_modules/klona/dist/index.mjs";
|
||
import "/app/node_modules/cookie-es/dist/index.mjs";
|
||
import "/app/node_modules/destr/dist/index.mjs";
|
||
import "/app/node_modules/ohash/dist/index.mjs";
|
||
import "/app/node_modules/@unhead/vue/dist/index.mjs";
|
||
import "@vue/devtools-api";
|
||
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
||
__name: "RawDataViewer",
|
||
__ssrInlineRender: true,
|
||
props: {
|
||
data: {}
|
||
},
|
||
setup(__props) {
|
||
function isEmpty(obj) {
|
||
if (!obj || typeof obj !== "object") return true;
|
||
return Object.keys(obj).length === 0;
|
||
}
|
||
function objectKeys(obj) {
|
||
if (!obj || typeof obj !== "object") return "{ }";
|
||
const keys = Object.keys(obj);
|
||
if (keys.length === 0) return "{ üres }";
|
||
return `{ ${keys.length} kulcs }`;
|
||
}
|
||
return (_ctx, _push, _parent, _attrs) => {
|
||
const _component_RawDataViewer = _sfc_main$1;
|
||
_push(`<div${ssrRenderAttrs(_attrs)}>`);
|
||
if (!__props.data || isEmpty(__props.data)) {
|
||
_push(`<div class="text-center py-8"><svg class="w-10 h-10 mx-auto mb-3 text-slate-600" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M20 7l-8-4-8 4m16 0l-8 4m8-4v10l-8 4m0-10L4 7m8 4v10M4 7v10l8 4"></path></svg><p class="text-sm text-slate-500">Nincs nyers adat</p></div>`);
|
||
} else {
|
||
_push(`<div class="space-y-1 font-mono text-xs"><!--[-->`);
|
||
ssrRenderList(__props.data, (value, key) => {
|
||
_push(`<div class="border-b border-slate-700/50 last:border-0"><div class="flex items-start gap-3 py-2"><span class="text-indigo-400 font-semibold whitespace-nowrap min-w-[140px] flex-shrink-0">${ssrInterpolate(key)}</span><div class="flex-1 min-w-0">`);
|
||
if (value === null || value === void 0) {
|
||
_push(`<span class="text-slate-500 italic">null</span>`);
|
||
} else if (typeof value === "string") {
|
||
_push(`<span class="text-emerald-300 break-words"> "${ssrInterpolate(value)}" </span>`);
|
||
} else if (typeof value === "number" || typeof value === "boolean") {
|
||
_push(`<span class="text-amber-300">${ssrInterpolate(value)}</span>`);
|
||
} else if (Array.isArray(value)) {
|
||
_push(`<div>`);
|
||
if (value.length === 0) {
|
||
_push(`<span class="text-slate-500 italic">[]</span>`);
|
||
} else {
|
||
_push(`<details class="group"><summary class="cursor-pointer text-slate-400 hover:text-slate-300 list-none flex items-center gap-1.5"><svg class="w-3 h-3 transition-transform group-open:rotate-90" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"></path></svg><span class="text-slate-400">Array [${ssrInterpolate(value.length)}]</span></summary><div class="ml-4 mt-1 space-y-1 border-l border-slate-700 pl-3"><!--[-->`);
|
||
ssrRenderList(value, (item, idx) => {
|
||
_push(`<div class="py-1"><span class="text-slate-500 mr-2">[${ssrInterpolate(idx)}]</span>`);
|
||
if (typeof item === "object" && item !== null) {
|
||
_push(`<span class="text-slate-400">`);
|
||
_push(ssrRenderComponent(_component_RawDataViewer, { data: item }, null, _parent));
|
||
_push(`</span>`);
|
||
} else if (typeof item === "string") {
|
||
_push(`<span class="text-emerald-300">"${ssrInterpolate(item)}"</span>`);
|
||
} else {
|
||
_push(`<span class="text-amber-300">${ssrInterpolate(item)}</span>`);
|
||
}
|
||
_push(`</div>`);
|
||
});
|
||
_push(`<!--]--></div></details>`);
|
||
}
|
||
_push(`</div>`);
|
||
} else if (typeof value === "object") {
|
||
_push(`<div><details class="group"><summary class="cursor-pointer text-slate-400 hover:text-slate-300 list-none flex items-center gap-1.5"><svg class="w-3 h-3 transition-transform group-open:rotate-90" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"></path></svg><span class="text-slate-400">Object ${ssrInterpolate(objectKeys(value))}</span></summary><div class="ml-4 mt-1 border-l border-slate-700 pl-3">`);
|
||
_push(ssrRenderComponent(_component_RawDataViewer, { data: value }, null, _parent));
|
||
_push(`</div></details></div>`);
|
||
} else {
|
||
_push(`<span class="text-slate-400">${ssrInterpolate(String(value))}</span>`);
|
||
}
|
||
_push(`</div></div></div>`);
|
||
});
|
||
_push(`<!--]--></div>`);
|
||
}
|
||
_push(`</div>`);
|
||
};
|
||
}
|
||
});
|
||
const _sfc_setup$1 = _sfc_main$1.setup;
|
||
_sfc_main$1.setup = (props, ctx) => {
|
||
const ssrContext = useSSRContext();
|
||
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/RawDataViewer.vue");
|
||
return _sfc_setup$1 ? _sfc_setup$1(props, ctx) : void 0;
|
||
};
|
||
const _sfc_main = /* @__PURE__ */ defineComponent({
|
||
__name: "index",
|
||
__ssrInlineRender: true,
|
||
setup(__props) {
|
||
const route = useRoute();
|
||
useRouter();
|
||
const loading = ref(true);
|
||
const error = ref(false);
|
||
const provider = ref(null);
|
||
const actionLoading = ref(false);
|
||
ref(null);
|
||
const showRejectModal = ref(false);
|
||
const rejectReason = ref("");
|
||
const showFlagModal = ref(false);
|
||
const flagReason = ref("");
|
||
const activeTab = ref("data");
|
||
const validations = ref([]);
|
||
const validationsLoading = ref(false);
|
||
const history = ref([]);
|
||
const historyLoading = ref(false);
|
||
const statusForm = ref({
|
||
status: "pending",
|
||
validation_score: 0,
|
||
reason: ""
|
||
});
|
||
const statusLoading = ref(false);
|
||
const tabs = [
|
||
{ key: "data", label: "Adatok", icon: "svg" },
|
||
{ key: "status", label: "Státusz", icon: "svg" },
|
||
{ key: "validations", label: "Validációk", icon: "svg" },
|
||
{ key: "crawler", label: "Crawler / Nyers Adatok", icon: "svg" },
|
||
{ key: "history", label: "Előzmények", icon: "svg" }
|
||
];
|
||
const statusBannerClass = computed(() => {
|
||
switch (provider.value?.status) {
|
||
case "approved":
|
||
return "bg-emerald-500/10 border-emerald-500/30";
|
||
case "pending":
|
||
return "bg-amber-500/10 border-amber-500/30";
|
||
default:
|
||
return "bg-rose-500/10 border-rose-500/30";
|
||
}
|
||
});
|
||
const statusIconClass = computed(() => {
|
||
switch (provider.value?.status) {
|
||
case "approved":
|
||
return "bg-emerald-500/20 text-emerald-400";
|
||
case "pending":
|
||
return "bg-amber-500/20 text-amber-400";
|
||
default:
|
||
return "bg-rose-500/20 text-rose-400";
|
||
}
|
||
});
|
||
const statusTextClass = computed(() => {
|
||
switch (provider.value?.status) {
|
||
case "approved":
|
||
return "text-emerald-400";
|
||
case "pending":
|
||
return "text-amber-400";
|
||
default:
|
||
return "text-rose-400";
|
||
}
|
||
});
|
||
const statusSubtextClass = computed(() => {
|
||
switch (provider.value?.status) {
|
||
case "approved":
|
||
return "text-emerald-400/60";
|
||
case "pending":
|
||
return "text-amber-400/60";
|
||
default:
|
||
return "text-rose-400/60";
|
||
}
|
||
});
|
||
const hasOpeningHours = computed(() => {
|
||
const hours = provider.value?.opening_hours;
|
||
if (!hours || typeof hours !== "object") return false;
|
||
return DAYS.some((day) => {
|
||
const slot = hours[day.key];
|
||
return slot && typeof slot === "object" && slot.open && slot.close;
|
||
});
|
||
});
|
||
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;
|
||
});
|
||
const trustScoreBadgeClass = computed(() => {
|
||
const score = provider.value?.trust_score;
|
||
if (score === null || score === void 0) return "bg-slate-700 text-slate-400";
|
||
if (score > 80) return "bg-emerald-500/20 text-emerald-400 border border-emerald-500/30";
|
||
if (score > 50) return "bg-amber-500/20 text-amber-400 border border-amber-500/30";
|
||
return "bg-rose-500/20 text-rose-400 border border-rose-500/30";
|
||
});
|
||
const DAYS = [
|
||
{ key: "monday", label: "Hétfő" },
|
||
{ key: "tuesday", label: "Kedd" },
|
||
{ key: "wednesday", label: "Szerda" },
|
||
{ key: "thursday", label: "Csütörtök" },
|
||
{ key: "friday", label: "Péntek" },
|
||
{ key: "saturday", label: "Szombat" },
|
||
{ key: "sunday", label: "Vasárnap" }
|
||
];
|
||
function getDayHours(dayKey) {
|
||
const hours = provider.value?.opening_hours;
|
||
if (!hours || typeof hours !== "object") return null;
|
||
const slot = hours[dayKey];
|
||
if (slot && typeof slot === "object" && slot.open && slot.close) {
|
||
return { open: slot.open, close: slot.close };
|
||
}
|
||
return null;
|
||
}
|
||
function statusLabel(status) {
|
||
switch (status) {
|
||
case "approved":
|
||
return "Jóváhagyva";
|
||
case "pending":
|
||
return "Függőben";
|
||
case "rejected":
|
||
return "Elutasítva";
|
||
default:
|
||
return "Ismeretlen";
|
||
}
|
||
}
|
||
function statusDescription(status) {
|
||
switch (status) {
|
||
case "approved":
|
||
return "A szolgáltató aktív és látható a felhasználók számára.";
|
||
case "pending":
|
||
return "A szolgáltató még nem lett jóváhagyva, moderálásra vár.";
|
||
case "rejected":
|
||
return "A szolgáltató elutasításra került, nem látható a felhasználók számára.";
|
||
default:
|
||
return "";
|
||
}
|
||
}
|
||
function vehicleClassLabel(key) {
|
||
const labels = {
|
||
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) {
|
||
const labels = {
|
||
phone_verified: "Telefon igazolt",
|
||
email_verified: "Email igazolt",
|
||
address_verified: "Cím igazolt",
|
||
website_verified: "Weboldal igazolt",
|
||
manual_review: "Kézi ellenőrzés",
|
||
community_vouch: "Közösségi ajánlás",
|
||
business_hours: "Nyitvatartás ellenőrzött",
|
||
photo_evidence: "Fénykép bizonyíték"
|
||
};
|
||
return labels[type] || type;
|
||
}
|
||
function validationTypeClass(type) {
|
||
const classes = {
|
||
phone_verified: "bg-emerald-500/20 text-emerald-400",
|
||
email_verified: "bg-blue-500/20 text-blue-400",
|
||
address_verified: "bg-amber-500/20 text-amber-400",
|
||
website_verified: "bg-purple-500/20 text-purple-400",
|
||
manual_review: "bg-indigo-500/20 text-indigo-400",
|
||
community_vouch: "bg-pink-500/20 text-pink-400",
|
||
business_hours: "bg-cyan-500/20 text-cyan-400",
|
||
photo_evidence: "bg-orange-500/20 text-orange-400"
|
||
};
|
||
return classes[type] || "bg-slate-500/20 text-slate-400";
|
||
}
|
||
function historyActionLabel(action) {
|
||
const labels = {
|
||
approve: "Jóváhagyás",
|
||
reject: "Elutasítás",
|
||
restore: "Visszaállítás",
|
||
flag: "Megjelölés",
|
||
update: "Módosítás",
|
||
delete: "Törlés",
|
||
create: "Létrehozás"
|
||
};
|
||
return labels[action] || action;
|
||
}
|
||
function historyActionClass(action) {
|
||
const classes = {
|
||
approve: "bg-emerald-500/20 text-emerald-400",
|
||
reject: "bg-rose-500/20 text-rose-400",
|
||
restore: "bg-blue-500/20 text-blue-400",
|
||
flag: "bg-purple-500/20 text-purple-400",
|
||
update: "bg-amber-500/20 text-amber-400",
|
||
delete: "bg-red-500/20 text-red-400",
|
||
create: "bg-green-500/20 text-green-400"
|
||
};
|
||
return classes[action] || "bg-slate-500/20 text-slate-400";
|
||
}
|
||
function historyDotClass(action) {
|
||
const classes = {
|
||
approve: "border-emerald-500 bg-emerald-500/30",
|
||
reject: "border-rose-500 bg-rose-500/30",
|
||
restore: "border-blue-500 bg-blue-500/30",
|
||
flag: "border-purple-500 bg-purple-500/30",
|
||
update: "border-amber-500 bg-amber-500/30",
|
||
delete: "border-red-500 bg-red-500/30",
|
||
create: "border-green-500 bg-green-500/30"
|
||
};
|
||
return classes[action] || "border-slate-500 bg-slate-500/30";
|
||
}
|
||
function formatDate(dateStr) {
|
||
if (!dateStr) return "—";
|
||
try {
|
||
const d = new Date(dateStr);
|
||
return d.toLocaleDateString("hu-HU", {
|
||
year: "numeric",
|
||
month: "short",
|
||
day: "numeric",
|
||
hour: "2-digit",
|
||
minute: "2-digit"
|
||
});
|
||
} catch {
|
||
return dateStr;
|
||
}
|
||
}
|
||
function getHeaders() {
|
||
const token = useCookie("access_token").value;
|
||
const headers = { "Content-Type": "application/json" };
|
||
if (token) headers["Authorization"] = `Bearer ${token}`;
|
||
return headers;
|
||
}
|
||
async function fetchValidations() {
|
||
validationsLoading.value = true;
|
||
try {
|
||
const res = await $fetch(`/api/v1/admin/providers/${route.params.id}/validations`, {
|
||
headers: getHeaders()
|
||
});
|
||
validations.value = res || [];
|
||
} catch (err) {
|
||
console.error("Failed to fetch validations:", err);
|
||
validations.value = [];
|
||
} finally {
|
||
validationsLoading.value = false;
|
||
}
|
||
}
|
||
async function fetchHistory() {
|
||
historyLoading.value = true;
|
||
try {
|
||
const res = await $fetch(`/api/v1/admin/providers/${route.params.id}/history`, {
|
||
headers: getHeaders()
|
||
});
|
||
history.value = res || [];
|
||
} catch (err) {
|
||
console.error("Failed to fetch history:", err);
|
||
history.value = [];
|
||
} finally {
|
||
historyLoading.value = false;
|
||
}
|
||
}
|
||
function onTabChange(tab) {
|
||
if (tab === "validations" && validations.value.length === 0) {
|
||
fetchValidations();
|
||
}
|
||
if (tab === "history" && history.value.length === 0) {
|
||
fetchHistory();
|
||
}
|
||
}
|
||
watch(activeTab, onTabChange);
|
||
return (_ctx, _push, _parent, _attrs) => {
|
||
const _component_NuxtLink = __nuxt_component_0;
|
||
const _component_RawDataViewer = _sfc_main$1;
|
||
_push(`<div${ssrRenderAttrs(_attrs)} data-v-5941cb1d><div class="mb-8" data-v-5941cb1d><button class="inline-flex items-center gap-1.5 text-sm text-slate-400 hover:text-white transition mb-4" data-v-5941cb1d><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-5941cb1d><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 19l-7-7 7-7" data-v-5941cb1d></path></svg> Vissza a szolgáltatókhoz </button><h1 class="text-2xl font-bold text-white" data-v-5941cb1d>Szolgáltató részletek</h1><p class="text-slate-400 mt-1" data-v-5941cb1d>Szolgáltató #${ssrInterpolate(_ctx.$route.params.id)}</p></div>`);
|
||
if (loading.value) {
|
||
_push(`<div class="flex items-center justify-center py-20" data-v-5941cb1d><div class="text-slate-400 flex items-center gap-3" data-v-5941cb1d><svg class="w-5 h-5 animate-spin" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-5941cb1d><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15" data-v-5941cb1d></path></svg><span data-v-5941cb1d>Szolgáltató betöltése...</span></div></div>`);
|
||
} else if (error.value) {
|
||
_push(`<div class="bg-rose-500/10 border border-rose-500/30 rounded-xl p-6 mb-8" data-v-5941cb1d><p class="text-rose-400" data-v-5941cb1d>Hiba történt a szolgáltató betöltése közben.</p><button class="mt-3 text-sm text-rose-300 hover:text-rose-200 underline" data-v-5941cb1d>Újrapróbálkozás</button></div>`);
|
||
} else if (!provider.value) {
|
||
_push(`<div class="bg-slate-800 rounded-xl border border-slate-700 p-6" data-v-5941cb1d><p class="text-slate-400 text-center py-12" data-v-5941cb1d>A szolgáltató nem található.</p></div>`);
|
||
} else {
|
||
_push(`<!--[--><div class="${ssrRenderClass([statusBannerClass.value, "rounded-xl border p-4 mb-6 flex items-center gap-3"])}" data-v-5941cb1d><span class="${ssrRenderClass([statusIconClass.value, "flex-shrink-0 w-8 h-8 rounded-full flex items-center justify-center"])}" data-v-5941cb1d>`);
|
||
if (provider.value.status === "approved") {
|
||
_push(`<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-5941cb1d><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7" data-v-5941cb1d></path></svg>`);
|
||
} else if (provider.value.status === "pending") {
|
||
_push(`<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-5941cb1d><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z" data-v-5941cb1d></path></svg>`);
|
||
} else {
|
||
_push(`<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-5941cb1d><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" data-v-5941cb1d></path></svg>`);
|
||
}
|
||
_push(`</span><div data-v-5941cb1d><p class="${ssrRenderClass([statusTextClass.value, "text-sm font-medium"])}" data-v-5941cb1d>${ssrInterpolate(statusLabel(provider.value.status))}</p><p class="${ssrRenderClass([statusSubtextClass.value, "text-xs mt-0.5"])}" data-v-5941cb1d>${ssrInterpolate(statusDescription(provider.value.status))}</p></div></div><div class="border-b border-slate-700 mb-6" data-v-5941cb1d><nav class="flex gap-6 -mb-px" data-v-5941cb1d><!--[-->`);
|
||
ssrRenderList(tabs, (tab) => {
|
||
_push(`<button class="${ssrRenderClass([activeTab.value === tab.key ? "text-indigo-400 border-indigo-400" : "text-slate-400 border-transparent hover:text-slate-300", "pb-3 text-sm font-medium border-b-2 transition flex items-center gap-2"])}" data-v-5941cb1d>`);
|
||
ssrRenderVNode(_push, createVNode(resolveDynamicComponent(tab.icon), { class: "w-4 h-4" }, null), _parent);
|
||
_push(` ${ssrInterpolate(tab.label)}</button>`);
|
||
});
|
||
_push(`<!--]--></nav></div>`);
|
||
if (activeTab.value === "data") {
|
||
_push(`<div class="grid grid-cols-1 lg:grid-cols-3 gap-6" data-v-5941cb1d><div class="lg:col-span-2 space-y-6" data-v-5941cb1d><div class="bg-slate-800 rounded-xl border border-slate-700 p-6" data-v-5941cb1d><h2 class="text-lg font-semibold text-white mb-4" data-v-5941cb1d>Alapadatok</h2><dl class="grid grid-cols-1 md:grid-cols-2 gap-4" data-v-5941cb1d><div data-v-5941cb1d><dt class="text-xs text-slate-500 uppercase tracking-wider" data-v-5941cb1d>Név</dt><dd class="text-sm text-white mt-1 font-medium" data-v-5941cb1d>${ssrInterpolate(provider.value.name)}</dd></div><div data-v-5941cb1d><dt class="text-xs text-slate-500 uppercase tracking-wider" data-v-5941cb1d>Kategória</dt><dd class="text-sm text-white mt-1" data-v-5941cb1d>${ssrInterpolate(provider.value.category || "—")}</dd></div><div data-v-5941cb1d><dt class="text-xs text-slate-500 uppercase tracking-wider" data-v-5941cb1d>Forrás</dt><dd class="mt-1" data-v-5941cb1d><code class="text-sm font-mono text-amber-300 bg-amber-500/10 px-2 py-0.5 rounded" data-v-5941cb1d>${ssrInterpolate(provider.value.source)}</code></dd></div><div data-v-5941cb1d><dt class="text-xs text-slate-500 uppercase tracking-wider" data-v-5941cb1d>Validációs pontszám</dt><dd class="mt-1" data-v-5941cb1d><div class="flex items-center gap-2" data-v-5941cb1d><div class="w-24 h-2 bg-slate-700 rounded-full overflow-hidden" data-v-5941cb1d><div class="${ssrRenderClass([provider.value.validation_score >= 50 ? "bg-emerald-500" : provider.value.validation_score >= 20 ? "bg-amber-500" : "bg-slate-500", "h-full rounded-full transition-all"])}" style="${ssrRenderStyle({ width: Math.min(provider.value.validation_score, 100) + "%" })}" data-v-5941cb1d></div></div><span class="text-sm text-white font-medium" data-v-5941cb1d>${ssrInterpolate(provider.value.validation_score)}</span></div></dd></div><div data-v-5941cb1d><dt class="text-xs text-slate-500 uppercase tracking-wider" data-v-5941cb1d>Létrehozva</dt><dd class="text-sm text-white mt-1" data-v-5941cb1d>${ssrInterpolate(formatDate(provider.value.created_at))}</dd></div><div data-v-5941cb1d><dt class="text-xs text-slate-500 uppercase tracking-wider" data-v-5941cb1d>Beküldő user ID</dt><dd class="text-sm text-white mt-1" data-v-5941cb1d>${ssrInterpolate(provider.value.added_by_user_id || "—")}</dd></div></dl></div><div class="bg-slate-800 rounded-xl border border-slate-700 p-6" data-v-5941cb1d><h2 class="text-lg font-semibold text-white mb-4" data-v-5941cb1d>Cím adatok</h2><dl class="grid grid-cols-1 md:grid-cols-2 gap-4" data-v-5941cb1d><div class="md:col-span-2" data-v-5941cb1d><dt class="text-xs text-slate-500 uppercase tracking-wider" data-v-5941cb1d>Teljes cím</dt><dd class="text-sm text-white mt-1" data-v-5941cb1d>${ssrInterpolate(provider.value.address || "—")}</dd></div><div data-v-5941cb1d><dt class="text-xs text-slate-500 uppercase tracking-wider" data-v-5941cb1d>Város</dt><dd class="text-sm text-white mt-1" data-v-5941cb1d>${ssrInterpolate(provider.value.city || "—")}</dd></div><div data-v-5941cb1d><dt class="text-xs text-slate-500 uppercase tracking-wider" data-v-5941cb1d>Irányítószám</dt><dd class="text-sm text-white mt-1" data-v-5941cb1d>${ssrInterpolate(provider.value.address_zip || "—")}</dd></div><div data-v-5941cb1d><dt class="text-xs text-slate-500 uppercase tracking-wider" data-v-5941cb1d>Utca</dt><dd class="text-sm text-white mt-1" data-v-5941cb1d>${ssrInterpolate(provider.value.address_street_name || "—")}</dd></div><div data-v-5941cb1d><dt class="text-xs text-slate-500 uppercase tracking-wider" data-v-5941cb1d>Házszám</dt><dd class="text-sm text-white mt-1" data-v-5941cb1d>${ssrInterpolate(provider.value.address_house_number || "—")}</dd></div><div data-v-5941cb1d><dt class="text-xs text-slate-500 uppercase tracking-wider" data-v-5941cb1d>Plus Code</dt><dd class="text-sm text-white mt-1" data-v-5941cb1d>${ssrInterpolate(provider.value.plus_code || "—")}</dd></div></dl></div><div class="bg-slate-800 rounded-xl border border-slate-700 p-6" data-v-5941cb1d><h2 class="text-lg font-semibold text-white mb-4" data-v-5941cb1d>Elérhetőség</h2><dl class="grid grid-cols-1 md:grid-cols-2 gap-4" data-v-5941cb1d><div data-v-5941cb1d><dt class="text-xs text-slate-500 uppercase tracking-wider" data-v-5941cb1d>Telefon</dt><dd class="text-sm text-white mt-1" data-v-5941cb1d>${ssrInterpolate(provider.value.contact_phone || "—")}</dd></div><div data-v-5941cb1d><dt class="text-xs text-slate-500 uppercase tracking-wider" data-v-5941cb1d>Email</dt><dd class="text-sm text-white mt-1" data-v-5941cb1d>${ssrInterpolate(provider.value.contact_email || "—")}</dd></div><div data-v-5941cb1d><dt class="text-xs text-slate-500 uppercase tracking-wider" data-v-5941cb1d>Weboldal</dt><dd class="text-sm text-white mt-1" data-v-5941cb1d>`);
|
||
if (provider.value.website) {
|
||
_push(`<a${ssrRenderAttr("href", provider.value.website)} target="_blank" class="text-indigo-400 hover:text-indigo-300 underline" data-v-5941cb1d>${ssrInterpolate(provider.value.website)}</a>`);
|
||
} else {
|
||
_push(`<span data-v-5941cb1d>—</span>`);
|
||
}
|
||
_push(`</dd></div></dl></div><div class="bg-slate-800 rounded-xl border border-slate-700 p-6" data-v-5941cb1d><h2 class="text-lg font-semibold text-white mb-4" data-v-5941cb1d>Szolgáltatások</h2>`);
|
||
if (provider.value.category_ids && provider.value.category_ids.length > 0) {
|
||
_push(`<div class="flex flex-wrap gap-2" data-v-5941cb1d><!--[-->`);
|
||
ssrRenderList(provider.value.category_ids, (catId) => {
|
||
_push(`<span 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" data-v-5941cb1d> #${ssrInterpolate(catId)}</span>`);
|
||
});
|
||
_push(`<!--]--></div>`);
|
||
} else {
|
||
_push(`<p class="text-sm text-slate-500 italic" data-v-5941cb1d>Nincsenek kategóriák beállítva</p>`);
|
||
}
|
||
_push(`</div><div class="bg-slate-800 rounded-xl border border-slate-700 p-6" data-v-5941cb1d><h2 class="text-lg font-semibold text-white mb-4" data-v-5941cb1d>Járműosztályok</h2>`);
|
||
if (provider.value.supported_vehicle_classes && provider.value.supported_vehicle_classes.length > 0) {
|
||
_push(`<div class="flex flex-wrap gap-2" data-v-5941cb1d><!--[-->`);
|
||
ssrRenderList(provider.value.supported_vehicle_classes, (vc) => {
|
||
_push(`<span 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" data-v-5941cb1d>${ssrInterpolate(vehicleClassLabel(vc))}</span>`);
|
||
});
|
||
_push(`<!--]--></div>`);
|
||
} else {
|
||
_push(`<p class="text-sm text-slate-500 italic" data-v-5941cb1d>Nincsenek járműosztályok beállítva</p>`);
|
||
}
|
||
_push(`</div><div class="bg-slate-800 rounded-xl border border-slate-700 p-6" data-v-5941cb1d><h2 class="text-lg font-semibold text-white mb-4" data-v-5941cb1d>Specializációk</h2>`);
|
||
if (hasSpecializations.value) {
|
||
_push(`<div class="space-y-3" data-v-5941cb1d>`);
|
||
if (provider.value.specializations?.brands?.length) {
|
||
_push(`<div data-v-5941cb1d><h3 class="text-xs text-slate-500 uppercase tracking-wider mb-2" data-v-5941cb1d>Márkák</h3><div class="flex flex-wrap gap-2" data-v-5941cb1d><!--[-->`);
|
||
ssrRenderList(provider.value.specializations.brands, (brand) => {
|
||
_push(`<span 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" data-v-5941cb1d>${ssrInterpolate(brand)}</span>`);
|
||
});
|
||
_push(`<!--]--></div></div>`);
|
||
} else {
|
||
_push(`<!---->`);
|
||
}
|
||
if (provider.value.specializations?.propulsion?.length) {
|
||
_push(`<div data-v-5941cb1d><h3 class="text-xs text-slate-500 uppercase tracking-wider mb-2" data-v-5941cb1d>Hajtáslánc</h3><div class="flex flex-wrap gap-2" data-v-5941cb1d><!--[-->`);
|
||
ssrRenderList(provider.value.specializations.propulsion, (prop) => {
|
||
_push(`<span 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" data-v-5941cb1d>${ssrInterpolate(prop)}</span>`);
|
||
});
|
||
_push(`<!--]--></div></div>`);
|
||
} else {
|
||
_push(`<!---->`);
|
||
}
|
||
_push(`</div>`);
|
||
} else {
|
||
_push(`<p class="text-sm text-slate-500 italic" data-v-5941cb1d>Nincsenek specializációk beállítva</p>`);
|
||
}
|
||
_push(`</div><div class="bg-slate-800 rounded-xl border border-slate-700 p-6" data-v-5941cb1d><h2 class="text-lg font-semibold text-white mb-4" data-v-5941cb1d>Nyitvatartás</h2>`);
|
||
if (hasOpeningHours.value) {
|
||
_push(`<div class="overflow-hidden" data-v-5941cb1d><table class="w-full text-sm" data-v-5941cb1d><thead data-v-5941cb1d><tr class="border-b border-slate-700" data-v-5941cb1d><th class="text-left text-xs text-slate-500 uppercase tracking-wider pb-2 pr-4" data-v-5941cb1d>Nap</th><th class="text-left text-xs text-slate-500 uppercase tracking-wider pb-2" data-v-5941cb1d>Nyitva</th></tr></thead><tbody data-v-5941cb1d><!--[-->`);
|
||
ssrRenderList(DAYS, (day) => {
|
||
_push(`<tr class="border-b border-slate-700/50 last:border-0" data-v-5941cb1d><td class="py-2 pr-4 text-white font-medium" data-v-5941cb1d>${ssrInterpolate(day.label)}</td><td class="py-2" data-v-5941cb1d>`);
|
||
if (getDayHours(day.key)) {
|
||
_push(`<!--[--><span class="text-white" data-v-5941cb1d>${ssrInterpolate(getDayHours(day.key)?.open)}</span><span class="text-slate-500 mx-1" data-v-5941cb1d>–</span><span class="text-white" data-v-5941cb1d>${ssrInterpolate(getDayHours(day.key)?.close)}</span><!--]-->`);
|
||
} else {
|
||
_push(`<span class="text-slate-500 italic" data-v-5941cb1d>Zárva</span>`);
|
||
}
|
||
_push(`</td></tr>`);
|
||
});
|
||
_push(`<!--]--></tbody></table></div>`);
|
||
} else {
|
||
_push(`<div data-v-5941cb1d><p class="text-sm text-slate-500 italic" data-v-5941cb1d>Nincs beállítva nyitvatartás</p></div>`);
|
||
}
|
||
_push(`</div></div><div class="space-y-4" data-v-5941cb1d><div class="bg-slate-800 rounded-xl border border-slate-700 p-6" data-v-5941cb1d><h2 class="text-lg font-semibold text-white mb-4" data-v-5941cb1d>Moderációs műveletek</h2>`);
|
||
if (provider.value.status === "pending") {
|
||
_push(`<div class="space-y-3" data-v-5941cb1d><button${ssrIncludeBooleanAttr(actionLoading.value) ? " disabled" : ""} class="w-full px-4 py-3 bg-emerald-600 hover:bg-emerald-500 disabled:bg-emerald-600/50 text-white rounded-lg text-sm font-medium transition flex items-center justify-center gap-2" data-v-5941cb1d>`);
|
||
if (actionLoading.value) {
|
||
_push(`<svg class="w-4 h-4 animate-spin" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-5941cb1d><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15" data-v-5941cb1d></path></svg>`);
|
||
} else {
|
||
_push(`<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-5941cb1d><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7" data-v-5941cb1d></path></svg>`);
|
||
}
|
||
_push(` Jóváhagyás </button><button${ssrIncludeBooleanAttr(actionLoading.value) ? " disabled" : ""} class="w-full px-4 py-3 bg-rose-600/20 hover:bg-rose-600/40 disabled:opacity-50 text-rose-400 rounded-lg text-sm font-medium transition flex items-center justify-center gap-2" data-v-5941cb1d><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-5941cb1d><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" data-v-5941cb1d></path></svg> Elutasítás </button></div>`);
|
||
} else if (provider.value.status === "approved") {
|
||
_push(`<div class="space-y-3" data-v-5941cb1d>`);
|
||
_push(ssrRenderComponent(_component_NuxtLink, {
|
||
to: `/providers/${provider.value.id}/edit`,
|
||
class: "w-full px-4 py-3 bg-indigo-600 hover:bg-indigo-500 text-white rounded-lg text-sm font-medium transition flex items-center justify-center gap-2"
|
||
}, {
|
||
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
||
if (_push2) {
|
||
_push2(`<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-5941cb1d${_scopeId}><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z" data-v-5941cb1d${_scopeId}></path></svg> Szerkesztés `);
|
||
} else {
|
||
return [
|
||
(openBlock(), createBlock("svg", {
|
||
class: "w-4 h-4",
|
||
fill: "none",
|
||
stroke: "currentColor",
|
||
viewBox: "0 0 24 24"
|
||
}, [
|
||
createVNode("path", {
|
||
"stroke-linecap": "round",
|
||
"stroke-linejoin": "round",
|
||
"stroke-width": "2",
|
||
d: "M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"
|
||
})
|
||
])),
|
||
createTextVNode(" Szerkesztés ")
|
||
];
|
||
}
|
||
}),
|
||
_: 1
|
||
}, _parent));
|
||
_push(`<button${ssrIncludeBooleanAttr(actionLoading.value) ? " disabled" : ""} class="w-full px-4 py-3 bg-purple-600/20 hover:bg-purple-600/40 disabled:opacity-50 text-purple-400 rounded-lg text-sm font-medium transition flex items-center justify-center gap-2" data-v-5941cb1d><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-5941cb1d><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 21v-4m0 0V5a2 2 0 012-2h6.5l1 1H21l-3 6 3 6h-8.5l-1-1H5a2 2 0 00-2 2zm9-13.5V9" data-v-5941cb1d></path></svg> Megjelölés (Flag) </button><button${ssrIncludeBooleanAttr(actionLoading.value) ? " disabled" : ""} class="w-full px-4 py-3 bg-rose-600/20 hover:bg-rose-600/40 disabled:opacity-50 text-rose-400 rounded-lg text-sm font-medium transition flex items-center justify-center gap-2" data-v-5941cb1d><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-5941cb1d><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16" data-v-5941cb1d></path></svg> Törlés (Soft Delete) </button></div>`);
|
||
} else {
|
||
_push(`<div class="space-y-3" data-v-5941cb1d><p class="text-sm text-slate-400 text-center py-2" data-v-5941cb1d> A szolgáltató ${ssrInterpolate(provider.value.status === "rejected" ? "elutasításra" : "megjelölésre")} került. </p>`);
|
||
_push(ssrRenderComponent(_component_NuxtLink, {
|
||
to: `/providers/${provider.value.id}/edit`,
|
||
class: "w-full px-4 py-3 bg-indigo-600 hover:bg-indigo-500 text-white rounded-lg text-sm font-medium transition flex items-center justify-center gap-2"
|
||
}, {
|
||
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
||
if (_push2) {
|
||
_push2(`<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-5941cb1d${_scopeId}><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z" data-v-5941cb1d${_scopeId}></path></svg> Szerkesztés `);
|
||
} else {
|
||
return [
|
||
(openBlock(), createBlock("svg", {
|
||
class: "w-4 h-4",
|
||
fill: "none",
|
||
stroke: "currentColor",
|
||
viewBox: "0 0 24 24"
|
||
}, [
|
||
createVNode("path", {
|
||
"stroke-linecap": "round",
|
||
"stroke-linejoin": "round",
|
||
"stroke-width": "2",
|
||
d: "M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"
|
||
})
|
||
])),
|
||
createTextVNode(" Szerkesztés ")
|
||
];
|
||
}
|
||
}),
|
||
_: 1
|
||
}, _parent));
|
||
if (provider.value.status === "rejected") {
|
||
_push(`<button${ssrIncludeBooleanAttr(actionLoading.value) ? " disabled" : ""} class="w-full px-4 py-3 bg-emerald-600 hover:bg-emerald-500 disabled:bg-emerald-600/50 text-white rounded-lg text-sm font-medium transition flex items-center justify-center gap-2" data-v-5941cb1d><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-5941cb1d><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15" data-v-5941cb1d></path></svg> Visszaállítás </button>`);
|
||
} else {
|
||
_push(`<!---->`);
|
||
}
|
||
_push(`<button${ssrIncludeBooleanAttr(actionLoading.value) ? " disabled" : ""} class="w-full px-4 py-3 bg-rose-600/20 hover:bg-rose-600/40 disabled:opacity-50 text-rose-400 rounded-lg text-sm font-medium transition flex items-center justify-center gap-2" data-v-5941cb1d><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-5941cb1d><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16" data-v-5941cb1d></path></svg> Törlés </button></div>`);
|
||
}
|
||
_push(`</div>`);
|
||
if (provider.value.evidence_image_path) {
|
||
_push(`<div class="bg-slate-800 rounded-xl border border-slate-700 p-6" data-v-5941cb1d><h2 class="text-lg font-semibold text-white mb-4" data-v-5941cb1d>Bizonyíték kép</h2><img${ssrRenderAttr("src", provider.value.evidence_image_path)} alt="Evidence" class="w-full rounded-lg border border-slate-600" data-v-5941cb1d></div>`);
|
||
} else {
|
||
_push(`<!---->`);
|
||
}
|
||
_push(`</div></div>`);
|
||
} else {
|
||
_push(`<!---->`);
|
||
}
|
||
if (activeTab.value === "status") {
|
||
_push(`<div class="max-w-2xl" data-v-5941cb1d><div class="bg-slate-800 rounded-xl border border-slate-700 p-6" data-v-5941cb1d><h2 class="text-lg font-semibold text-white mb-4" data-v-5941cb1d>Státusz kezelés</h2><p class="text-sm text-slate-400 mb-6" data-v-5941cb1d>Módosítsd a szolgáltató státuszát és validációs pontszámát.</p><form data-v-5941cb1d><div class="space-y-4 mb-6" data-v-5941cb1d><div data-v-5941cb1d><label class="block text-sm font-medium text-slate-300 mb-1" data-v-5941cb1d>Státusz</label><select class="w-full px-3 py-2 bg-slate-700 border border-slate-600 rounded-lg text-white focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500 text-sm" data-v-5941cb1d><option value="pending" data-v-5941cb1d${ssrIncludeBooleanAttr(Array.isArray(statusForm.value.status) ? ssrLooseContain(statusForm.value.status, "pending") : ssrLooseEqual(statusForm.value.status, "pending")) ? " selected" : ""}>Függőben</option><option value="approved" data-v-5941cb1d${ssrIncludeBooleanAttr(Array.isArray(statusForm.value.status) ? ssrLooseContain(statusForm.value.status, "approved") : ssrLooseEqual(statusForm.value.status, "approved")) ? " selected" : ""}>Jóváhagyott</option><option value="rejected" data-v-5941cb1d${ssrIncludeBooleanAttr(Array.isArray(statusForm.value.status) ? ssrLooseContain(statusForm.value.status, "rejected") : ssrLooseEqual(statusForm.value.status, "rejected")) ? " selected" : ""}>Elutasított</option></select></div><div data-v-5941cb1d><label class="block text-sm font-medium text-slate-300 mb-1" data-v-5941cb1d> Validációs pontszám (0-100) </label><div class="flex items-center gap-3" data-v-5941cb1d><input${ssrRenderAttr("value", statusForm.value.validation_score)} type="range" min="0" max="100" class="w-full h-2 bg-slate-700 rounded-lg appearance-none cursor-pointer accent-indigo-500" data-v-5941cb1d><span class="text-sm text-white font-medium w-8 text-right" data-v-5941cb1d>${ssrInterpolate(statusForm.value.validation_score)}</span></div></div><div data-v-5941cb1d><label class="block text-sm font-medium text-slate-300 mb-1" data-v-5941cb1d>Indoklás (opcionális)</label><textarea rows="3" placeholder="Add meg a státuszváltoztatás okát..." class="w-full px-3 py-2 bg-slate-700 border border-slate-600 rounded-lg text-white placeholder-slate-500 focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500 text-sm resize-none" data-v-5941cb1d>${ssrInterpolate(statusForm.value.reason)}</textarea></div></div><div class="flex justify-end gap-3" data-v-5941cb1d><button type="button" class="px-4 py-2 text-sm text-slate-400 hover:text-white transition" data-v-5941cb1d>Mégsem</button><button type="submit"${ssrIncludeBooleanAttr(statusLoading.value) ? " disabled" : ""} class="px-4 py-2 bg-indigo-600 hover:bg-indigo-500 disabled:bg-indigo-600/50 text-white rounded-lg text-sm font-medium transition flex items-center gap-2" data-v-5941cb1d>`);
|
||
if (statusLoading.value) {
|
||
_push(`<svg class="w-4 h-4 animate-spin" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-5941cb1d><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15" data-v-5941cb1d></path></svg>`);
|
||
} else {
|
||
_push(`<!---->`);
|
||
}
|
||
_push(` Státusz mentése </button></div></form></div></div>`);
|
||
} else {
|
||
_push(`<!---->`);
|
||
}
|
||
if (activeTab.value === "validations") {
|
||
_push(`<div data-v-5941cb1d><div class="bg-slate-800 rounded-xl border border-slate-700 p-6" data-v-5941cb1d><h2 class="text-lg font-semibold text-white mb-4" data-v-5941cb1d>Gamification Validációk</h2><p class="text-sm text-slate-400 mb-6" data-v-5941cb1d>A szolgáltatóhoz tartozó gamification validációs bejegyzések listája.</p>`);
|
||
if (validationsLoading.value) {
|
||
_push(`<div class="flex items-center justify-center py-8" data-v-5941cb1d><svg class="w-5 h-5 animate-spin text-slate-400" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-5941cb1d><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15" data-v-5941cb1d></path></svg></div>`);
|
||
} else if (validations.value.length === 0) {
|
||
_push(`<div class="text-center py-8" data-v-5941cb1d><p class="text-slate-500" data-v-5941cb1d>Nincsenek validációs bejegyzések ehhez a szolgáltatóhoz.</p></div>`);
|
||
} else {
|
||
_push(`<div class="space-y-3" data-v-5941cb1d><!--[-->`);
|
||
ssrRenderList(validations.value, (v) => {
|
||
_push(`<div class="bg-slate-700/50 rounded-lg border border-slate-600 p-4" data-v-5941cb1d><div class="flex items-start justify-between gap-4" data-v-5941cb1d><div class="flex-1" data-v-5941cb1d><div class="flex items-center gap-2 mb-1" data-v-5941cb1d><span class="${ssrRenderClass([validationTypeClass(v.validation_type), "text-xs font-medium px-2 py-0.5 rounded-full"])}" data-v-5941cb1d>${ssrInterpolate(validationTypeLabel(v.validation_type))}</span><span class="text-xs text-slate-500" data-v-5941cb1d>súly: ${ssrInterpolate(v.weight)}</span></div><p class="text-sm text-slate-300" data-v-5941cb1d><span class="text-slate-400" data-v-5941cb1d>Szavazó:</span> ${ssrInterpolate(v.voter_name || `User #${v.voter_user_id}`)}</p>`);
|
||
if (v.validation_metadata?.reason) {
|
||
_push(`<p class="text-xs text-slate-500 mt-1" data-v-5941cb1d> Indoklás: ${ssrInterpolate(v.validation_metadata.reason)}</p>`);
|
||
} else {
|
||
_push(`<!---->`);
|
||
}
|
||
_push(`</div><div class="text-xs text-slate-500 whitespace-nowrap" data-v-5941cb1d>${ssrInterpolate(formatDate(v.created_at))}</div></div></div>`);
|
||
});
|
||
_push(`<!--]--></div>`);
|
||
}
|
||
_push(`</div></div>`);
|
||
} else {
|
||
_push(`<!---->`);
|
||
}
|
||
if (activeTab.value === "crawler") {
|
||
_push(`<div class="max-w-4xl" data-v-5941cb1d><div class="bg-slate-800 rounded-xl border border-slate-700 p-6" data-v-5941cb1d><h2 class="text-lg font-semibold text-white mb-4" data-v-5941cb1d>Crawler / Nyers Adatok</h2><p class="text-sm text-slate-400 mb-6" data-v-5941cb1d>A robot által begyűjtött nyers adatok és metaadatok.</p><div class="flex flex-wrap gap-3 mb-6" data-v-5941cb1d><div class="inline-flex items-center gap-1.5 px-3 py-1.5 bg-slate-700 rounded-lg text-xs font-medium" data-v-5941cb1d><span class="text-slate-400" data-v-5941cb1d>Forrás:</span><code class="text-cyan-300 font-mono" data-v-5941cb1d>${ssrInterpolate(provider.value.source || "—")}</code></div><div class="${ssrRenderClass([trustScoreBadgeClass.value, "inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium"])}" data-v-5941cb1d><span class="text-slate-400" data-v-5941cb1d>Trust Score:</span><span class="font-semibold" data-v-5941cb1d>${ssrInterpolate(provider.value.trust_score ?? "—")}</span></div></div>`);
|
||
if (provider.value.rejection_reason) {
|
||
_push(`<div class="flex items-start gap-3 p-4 mb-6 bg-rose-500/10 border border-rose-500/30 rounded-lg" data-v-5941cb1d><svg class="w-5 h-5 text-rose-400 flex-shrink-0 mt-0.5" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-5941cb1d><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L4.082 16.5c-.77.833.192 2.5 1.732 2.5z" data-v-5941cb1d></path></svg><div data-v-5941cb1d><p class="text-sm font-medium text-rose-300" data-v-5941cb1d>Elutasítás indoklása</p><p class="text-sm text-rose-200/70 mt-0.5" data-v-5941cb1d>${ssrInterpolate(provider.value.rejection_reason)}</p></div></div>`);
|
||
} else {
|
||
_push(`<!---->`);
|
||
}
|
||
_push(`<div class="mb-6" data-v-5941cb1d><h3 class="text-sm font-medium text-slate-300 mb-3" data-v-5941cb1d>Nyers adatok (raw_data)</h3><div class="bg-slate-900/50 rounded-lg border border-slate-700 p-4 overflow-x-auto" data-v-5941cb1d>`);
|
||
_push(ssrRenderComponent(_component_RawDataViewer, {
|
||
data: provider.value.raw_data
|
||
}, null, _parent));
|
||
_push(`</div></div>`);
|
||
if (provider.value.audit_trail && Object.keys(provider.value.audit_trail).length > 0) {
|
||
_push(`<div data-v-5941cb1d><h3 class="text-sm font-medium text-slate-300 mb-3" data-v-5941cb1d>Audit Trail</h3><div class="bg-slate-900/50 rounded-lg border border-slate-700 p-4 overflow-x-auto" data-v-5941cb1d>`);
|
||
_push(ssrRenderComponent(_component_RawDataViewer, {
|
||
data: provider.value.audit_trail
|
||
}, null, _parent));
|
||
_push(`</div></div>`);
|
||
} else {
|
||
_push(`<!---->`);
|
||
}
|
||
_push(`</div></div>`);
|
||
} else {
|
||
_push(`<!---->`);
|
||
}
|
||
if (activeTab.value === "history") {
|
||
_push(`<div data-v-5941cb1d><div class="bg-slate-800 rounded-xl border border-slate-700 p-6" data-v-5941cb1d><h2 class="text-lg font-semibold text-white mb-4" data-v-5941cb1d>Állapotváltoztatások előzményei</h2><p class="text-sm text-slate-400 mb-6" data-v-5941cb1d>Idővonal: ki, mikor és mit változtatott a szolgáltatóval kapcsolatban.</p>`);
|
||
if (historyLoading.value) {
|
||
_push(`<div class="flex items-center justify-center py-8" data-v-5941cb1d><svg class="w-5 h-5 animate-spin text-slate-400" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-5941cb1d><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15" data-v-5941cb1d></path></svg></div>`);
|
||
} else if (history.value.length === 0) {
|
||
_push(`<div class="text-center py-8" data-v-5941cb1d><p class="text-slate-500" data-v-5941cb1d>Nincsenek előzmények ehhez a szolgáltatóhoz.</p></div>`);
|
||
} else {
|
||
_push(`<div class="relative" data-v-5941cb1d><div class="absolute left-4 top-0 bottom-0 w-0.5 bg-slate-700" data-v-5941cb1d></div><!--[-->`);
|
||
ssrRenderList(history.value, (entry, index2) => {
|
||
_push(`<div class="relative pl-10 pb-6 last:pb-0" data-v-5941cb1d><div class="${ssrRenderClass([historyDotClass(entry.action), "absolute left-2.5 w-3 h-3 rounded-full border-2 mt-1.5"])}" data-v-5941cb1d></div><div class="bg-slate-700/50 rounded-lg border border-slate-600 p-4" data-v-5941cb1d><div class="flex items-start justify-between gap-4 mb-2" data-v-5941cb1d><div data-v-5941cb1d><span class="${ssrRenderClass([historyActionClass(entry.action), "text-xs font-medium px-2 py-0.5 rounded-full"])}" data-v-5941cb1d>${ssrInterpolate(historyActionLabel(entry.action))}</span><span class="text-xs text-slate-500 ml-2" data-v-5941cb1d> User #${ssrInterpolate(entry.user_id || "?")}</span></div><div class="text-xs text-slate-500 whitespace-nowrap" data-v-5941cb1d>${ssrInterpolate(formatDate(entry.timestamp))}</div></div>`);
|
||
if (entry.new_data) {
|
||
_push(`<div class="text-xs text-slate-400 space-y-1 mt-2" data-v-5941cb1d>`);
|
||
if (entry.new_data.old_status || entry.new_data.new_status) {
|
||
_push(`<div class="flex items-center gap-2" data-v-5941cb1d><span class="text-slate-500" data-v-5941cb1d>Státusz:</span><span class="text-rose-400" data-v-5941cb1d>${ssrInterpolate(entry.new_data.old_status || "?")}</span><svg class="w-3 h-3 text-slate-500" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-5941cb1d><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7" data-v-5941cb1d></path></svg><span class="text-emerald-400" data-v-5941cb1d>${ssrInterpolate(entry.new_data.new_status || "?")}</span></div>`);
|
||
} else {
|
||
_push(`<!---->`);
|
||
}
|
||
if (entry.new_data.reason && entry.new_data.reason !== "Admin edit") {
|
||
_push(`<div data-v-5941cb1d><span class="text-slate-500" data-v-5941cb1d>Indoklás:</span> ${ssrInterpolate(entry.new_data.reason)}</div>`);
|
||
} else {
|
||
_push(`<!---->`);
|
||
}
|
||
if (entry.new_data.changes) {
|
||
_push(`<div class="mt-2" data-v-5941cb1d><details class="text-xs" data-v-5941cb1d><summary class="text-slate-500 cursor-pointer hover:text-slate-400" data-v-5941cb1d>Részletes változások</summary><div class="mt-2 space-y-1" data-v-5941cb1d><!--[-->`);
|
||
ssrRenderList(entry.new_data.changes, (value, key) => {
|
||
_push(`<div class="flex gap-2" data-v-5941cb1d><span class="text-slate-500 w-28 flex-shrink-0" data-v-5941cb1d>${ssrInterpolate(key)}:</span><span class="text-slate-300 truncate" data-v-5941cb1d>${ssrInterpolate(value ?? "—")}</span></div>`);
|
||
});
|
||
_push(`<!--]--></div></details></div>`);
|
||
} else {
|
||
_push(`<!---->`);
|
||
}
|
||
_push(`</div>`);
|
||
} else {
|
||
_push(`<!---->`);
|
||
}
|
||
if (entry.old_data) {
|
||
_push(`<div class="mt-2" data-v-5941cb1d><details class="text-xs" data-v-5941cb1d><summary class="text-slate-500 cursor-pointer hover:text-slate-400" data-v-5941cb1d>Régi adatok</summary><div class="mt-2 space-y-1" data-v-5941cb1d><!--[-->`);
|
||
ssrRenderList(entry.old_data, (value, key) => {
|
||
_push(`<div class="flex gap-2" data-v-5941cb1d><span class="text-slate-500 w-28 flex-shrink-0" data-v-5941cb1d>${ssrInterpolate(key)}:</span><span class="text-slate-300 truncate" data-v-5941cb1d>${ssrInterpolate(value ?? "—")}</span></div>`);
|
||
});
|
||
_push(`<!--]--></div></details></div>`);
|
||
} else {
|
||
_push(`<!---->`);
|
||
}
|
||
_push(`</div></div>`);
|
||
});
|
||
_push(`<!--]--></div>`);
|
||
}
|
||
_push(`</div></div>`);
|
||
} else {
|
||
_push(`<!---->`);
|
||
}
|
||
_push(`<!--]-->`);
|
||
}
|
||
if (showRejectModal.value) {
|
||
_push(`<div class="fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm" data-v-5941cb1d><div class="bg-slate-800 rounded-xl border border-slate-700 p-6 w-full max-w-lg mx-4 shadow-2xl" data-v-5941cb1d><h2 class="text-lg font-semibold text-white mb-2" data-v-5941cb1d>Szolgáltató elutasítása</h2><p class="text-sm text-slate-400 mb-6" data-v-5941cb1d> Biztosan elutasítod a(z) <strong class="text-white" data-v-5941cb1d>${ssrInterpolate(provider.value?.name)}</strong> szolgáltatót? </p><form data-v-5941cb1d><div class="mb-4" data-v-5941cb1d><label class="block text-sm font-medium text-slate-300 mb-1" data-v-5941cb1d>Indoklás (opcionális)</label><textarea rows="3" placeholder="Add meg az elutasítás okát..." class="w-full px-3 py-2 bg-slate-700 border border-slate-600 rounded-lg text-white placeholder-slate-500 focus:outline-none focus:ring-2 focus:ring-rose-500/50 focus:border-rose-500 text-sm resize-none" data-v-5941cb1d>${ssrInterpolate(rejectReason.value)}</textarea></div><div class="flex justify-end gap-3" data-v-5941cb1d><button type="button" class="px-4 py-2 text-sm text-slate-400 hover:text-white transition" data-v-5941cb1d>Mégse</button><button type="submit"${ssrIncludeBooleanAttr(actionLoading.value) ? " disabled" : ""} class="px-4 py-2 bg-rose-600 hover:bg-rose-500 disabled:bg-rose-600/50 text-white rounded-lg text-sm font-medium transition flex items-center gap-2" data-v-5941cb1d>`);
|
||
if (actionLoading.value) {
|
||
_push(`<svg class="w-4 h-4 animate-spin" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-5941cb1d><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15" data-v-5941cb1d></path></svg>`);
|
||
} else {
|
||
_push(`<!---->`);
|
||
}
|
||
_push(` Elutasítás </button></div></form></div></div>`);
|
||
} else {
|
||
_push(`<!---->`);
|
||
}
|
||
if (showFlagModal.value) {
|
||
_push(`<div class="fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm" data-v-5941cb1d><div class="bg-slate-800 rounded-xl border border-slate-700 p-6 w-full max-w-lg mx-4 shadow-2xl" data-v-5941cb1d><h2 class="text-lg font-semibold text-white mb-2" data-v-5941cb1d>Szolgáltató megjelölése</h2><p class="text-sm text-slate-400 mb-6" data-v-5941cb1d> Biztosan megjelölöd a(z) <strong class="text-white" data-v-5941cb1d>${ssrInterpolate(provider.value?.name)}</strong> szolgáltatót? </p><form data-v-5941cb1d><div class="mb-4" data-v-5941cb1d><label class="block text-sm font-medium text-slate-300 mb-1" data-v-5941cb1d>Indoklás (opcionális)</label><textarea rows="3" placeholder="Add meg a megjelölés okát..." class="w-full px-3 py-2 bg-slate-700 border border-slate-600 rounded-lg text-white placeholder-slate-500 focus:outline-none focus:ring-2 focus:ring-purple-500/50 focus:border-purple-500 text-sm resize-none" data-v-5941cb1d>${ssrInterpolate(flagReason.value)}</textarea></div><div class="flex justify-end gap-3" data-v-5941cb1d><button type="button" class="px-4 py-2 text-sm text-slate-400 hover:text-white transition" data-v-5941cb1d>Mégse</button><button type="submit"${ssrIncludeBooleanAttr(actionLoading.value) ? " disabled" : ""} class="px-4 py-2 bg-purple-600 hover:bg-purple-500 disabled:bg-purple-600/50 text-white rounded-lg text-sm font-medium transition flex items-center gap-2" data-v-5941cb1d>`);
|
||
if (actionLoading.value) {
|
||
_push(`<svg class="w-4 h-4 animate-spin" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-5941cb1d><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15" data-v-5941cb1d></path></svg>`);
|
||
} else {
|
||
_push(`<!---->`);
|
||
}
|
||
_push(` Megjelölés </button></div></form></div></div>`);
|
||
} else {
|
||
_push(`<!---->`);
|
||
}
|
||
_push(`</div>`);
|
||
};
|
||
}
|
||
});
|
||
const _sfc_setup = _sfc_main.setup;
|
||
_sfc_main.setup = (props, ctx) => {
|
||
const ssrContext = useSSRContext();
|
||
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("pages/providers/[id]/index.vue");
|
||
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
|
||
};
|
||
const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-5941cb1d"]]);
|
||
export {
|
||
index as default
|
||
};
|
||
//# sourceMappingURL=index-DX46mH0u.js.map
|