707 lines
68 KiB
JavaScript
707 lines
68 KiB
JavaScript
import { _ as __nuxt_component_0 } from './nuxt-link-1NBbHb-h.mjs';
|
|
import { u as useCategories, _ as _sfc_main$1 } from './useCategories-CDBFMe6d.mjs';
|
|
import { defineComponent, ref, computed, watch, createVNode, resolveDynamicComponent, unref, withCtx, openBlock, createBlock, createTextVNode, toDisplayString, useSSRContext } from 'vue';
|
|
import { ssrRenderAttrs, ssrInterpolate, ssrRenderClass, ssrRenderList, ssrRenderVNode, ssrRenderStyle, ssrRenderAttr, ssrRenderComponent, ssrIncludeBooleanAttr, ssrLooseContain, ssrLooseEqual, ssrRenderTeleport } from 'vue/server-renderer';
|
|
import { useRoute, useRouter } from 'vue-router';
|
|
import { a as useI18n, d as useCookie } from './server.mjs';
|
|
import { _ as _export_sfc } from './_plugin-vue_export-helper-1tPrXgE0.mjs';
|
|
import '../nitro/nitro.mjs';
|
|
import 'node:http';
|
|
import 'node:https';
|
|
import 'node:events';
|
|
import 'node:buffer';
|
|
import 'node:fs';
|
|
import 'node:path';
|
|
import 'node:crypto';
|
|
import 'node:url';
|
|
import 'pinia';
|
|
import '../routes/renderer.mjs';
|
|
import 'vue-bundle-renderer/runtime';
|
|
import 'unhead/server';
|
|
import 'devalue';
|
|
import 'unhead/utils';
|
|
import 'unhead/plugins';
|
|
|
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
__name: "index",
|
|
__ssrInlineRender: true,
|
|
setup(__props) {
|
|
const { t } = useI18n();
|
|
const route = useRoute();
|
|
useRouter();
|
|
const { getCategoryName } = useCategories();
|
|
const loading = ref(true);
|
|
const error = ref(false);
|
|
const provider = ref(null);
|
|
const actionLoading = ref(false);
|
|
const isRawDataDrawerOpen = ref(false);
|
|
const drawerWidth = ref(512);
|
|
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: "providers.detail_tab_data", icon: "svg" },
|
|
{ key: "status", label: "providers.detail_tab_status", icon: "svg" },
|
|
{ key: "validations", label: "providers.detail_tab_validations", icon: "svg" },
|
|
{ key: "crawler", label: "providers.detail_tab_crawler", icon: "svg" },
|
|
{ key: "history", label: "providers.detail_tab_history", icon: "svg" }
|
|
];
|
|
const statusBannerClass = computed(() => {
|
|
var _a;
|
|
switch ((_a = provider.value) == null ? void 0 : _a.status) {
|
|
case "approved":
|
|
return "bg-emerald-500/10 border-emerald-500/30";
|
|
case "pending":
|
|
return "bg-amber-500/10 border-amber-500/30";
|
|
case "research_in_progress":
|
|
return "bg-blue-500/10 border-blue-500/30";
|
|
default:
|
|
return "bg-rose-500/10 border-rose-500/30";
|
|
}
|
|
});
|
|
const statusIconClass = computed(() => {
|
|
var _a;
|
|
switch ((_a = provider.value) == null ? void 0 : _a.status) {
|
|
case "approved":
|
|
return "bg-emerald-500/20 text-emerald-400";
|
|
case "pending":
|
|
return "bg-amber-500/20 text-amber-400";
|
|
case "research_in_progress":
|
|
return "bg-blue-500/20 text-blue-400";
|
|
default:
|
|
return "bg-rose-500/20 text-rose-400";
|
|
}
|
|
});
|
|
const statusTextClass = computed(() => {
|
|
var _a;
|
|
switch ((_a = provider.value) == null ? void 0 : _a.status) {
|
|
case "approved":
|
|
return "text-emerald-400";
|
|
case "pending":
|
|
return "text-amber-400";
|
|
case "research_in_progress":
|
|
return "text-blue-400";
|
|
default:
|
|
return "text-rose-400";
|
|
}
|
|
});
|
|
const statusSubtextClass = computed(() => {
|
|
var _a;
|
|
switch ((_a = provider.value) == null ? void 0 : _a.status) {
|
|
case "approved":
|
|
return "text-emerald-400/60";
|
|
case "pending":
|
|
return "text-amber-400/60";
|
|
case "research_in_progress":
|
|
return "text-blue-400/60";
|
|
default:
|
|
return "text-rose-400/60";
|
|
}
|
|
});
|
|
const hasOpeningHours = computed(() => {
|
|
var _a;
|
|
const hours = (_a = provider.value) == null ? void 0 : _a.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(() => {
|
|
var _a;
|
|
const spec = (_a = provider.value) == null ? void 0 : _a.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(() => {
|
|
var _a;
|
|
const score = (_a = provider.value) == null ? void 0 : _a.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: "providers.detail_day_monday" },
|
|
{ key: "tuesday", label: "providers.detail_day_tuesday" },
|
|
{ key: "wednesday", label: "providers.detail_day_wednesday" },
|
|
{ key: "thursday", label: "providers.detail_day_thursday" },
|
|
{ key: "friday", label: "providers.detail_day_friday" },
|
|
{ key: "saturday", label: "providers.detail_day_saturday" },
|
|
{ key: "sunday", label: "providers.detail_day_sunday" }
|
|
];
|
|
function getDayHours(dayKey) {
|
|
var _a;
|
|
const hours = (_a = provider.value) == null ? void 0 : _a.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 "providers.detail_status_approved";
|
|
case "pending":
|
|
return "providers.detail_status_pending";
|
|
case "research_in_progress":
|
|
return "providers.detail_status_research";
|
|
case "rejected":
|
|
return "providers.detail_status_rejected";
|
|
default:
|
|
return "providers.detail_status_unknown";
|
|
}
|
|
}
|
|
function statusDescription(status) {
|
|
switch (status) {
|
|
case "approved":
|
|
return "providers.detail_status_desc_approved";
|
|
case "pending":
|
|
return "providers.detail_status_desc_pending";
|
|
case "research_in_progress":
|
|
return "providers.detail_status_desc_research";
|
|
case "rejected":
|
|
return "providers.detail_status_desc_rejected";
|
|
default:
|
|
return "";
|
|
}
|
|
}
|
|
function vehicleClassLabel(key) {
|
|
const labels = {
|
|
car: "providers.detail_vehicle_class_car",
|
|
motorcycle: "providers.detail_vehicle_class_motorcycle",
|
|
truck: "providers.detail_vehicle_class_truck",
|
|
hgv: "providers.detail_vehicle_class_hgv",
|
|
light_commercial: "providers.detail_vehicle_class_light_commercial",
|
|
personal: "providers.detail_vehicle_class_personal",
|
|
boat: "providers.detail_vehicle_class_boat",
|
|
other: "providers.detail_vehicle_class_other"
|
|
};
|
|
return labels[key] || key;
|
|
}
|
|
function validationTypeLabel(type) {
|
|
const labels = {
|
|
phone_verified: "providers.detail_validation_type_phone_verified",
|
|
email_verified: "providers.detail_validation_type_email_verified",
|
|
address_verified: "providers.detail_validation_type_address_verified",
|
|
website_verified: "providers.detail_validation_type_website_verified",
|
|
manual_review: "providers.detail_validation_type_manual_review",
|
|
community_vouch: "providers.detail_validation_type_community_vouch",
|
|
business_hours: "providers.detail_validation_type_business_hours",
|
|
photo_evidence: "providers.detail_validation_type_photo_evidence"
|
|
};
|
|
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: "providers.detail_history_action_approve",
|
|
reject: "providers.detail_history_action_reject",
|
|
restore: "providers.detail_history_action_restore",
|
|
flag: "providers.detail_history_action_flag",
|
|
update: "providers.detail_history_action_update",
|
|
delete: "providers.detail_history_action_delete",
|
|
create: "providers.detail_history_action_create"
|
|
};
|
|
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 "\u2014";
|
|
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) => {
|
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
|
|
const _component_NuxtLink = __nuxt_component_0;
|
|
const _component_RawDataViewer = _sfc_main$1;
|
|
_push(`<div${ssrRenderAttrs(_attrs)} data-v-c3cb1099><div class="mb-8" data-v-c3cb1099><button class="inline-flex items-center gap-1.5 text-sm text-slate-400 hover:text-white transition mb-4" data-v-c3cb1099><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-c3cb1099><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 19l-7-7 7-7" data-v-c3cb1099></path></svg> ${ssrInterpolate(_ctx.$t("providers.detail_back"))}</button><h1 class="text-2xl font-bold text-white" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.provider_detail"))}</h1><p class="text-slate-400 mt-1" data-v-c3cb1099>${ssrInterpolate(((_a = provider.value) == null ? void 0 : _a.name) || _ctx.$t("providers.detail_provider_number", { id: _ctx.$route.params.id }))}</p></div>`);
|
|
if (loading.value) {
|
|
_push(`<div class="flex items-center justify-center py-20" data-v-c3cb1099><div class="text-slate-400 flex items-center gap-3" data-v-c3cb1099><svg class="w-5 h-5 animate-spin" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-c3cb1099><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-c3cb1099></path></svg><span data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_loading"))}</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-c3cb1099><p class="text-rose-400" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.error"))}</p><button class="mt-3 text-sm text-rose-300 hover:text-rose-200 underline" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.retry"))}</button></div>`);
|
|
} else if (!provider.value) {
|
|
_push(`<div class="bg-slate-800 rounded-xl border border-slate-700 p-6" data-v-c3cb1099><p class="text-slate-400 text-center py-12" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_not_found"))}</p></div>`);
|
|
} else {
|
|
_push(`<!--[--><div class="${ssrRenderClass([statusBannerClass.value, "rounded-xl border p-4 mb-6 flex items-center gap-3"])}" data-v-c3cb1099><span class="${ssrRenderClass([statusIconClass.value, "flex-shrink-0 w-8 h-8 rounded-full flex items-center justify-center"])}" data-v-c3cb1099>`);
|
|
if (provider.value.status === "approved") {
|
|
_push(`<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-c3cb1099><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7" data-v-c3cb1099></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-c3cb1099><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-c3cb1099></path></svg>`);
|
|
} else {
|
|
_push(`<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-c3cb1099><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" data-v-c3cb1099></path></svg>`);
|
|
}
|
|
_push(`</span><div data-v-c3cb1099><p class="${ssrRenderClass([statusTextClass.value, "text-sm font-medium"])}" data-v-c3cb1099>${ssrInterpolate(_ctx.$t(statusLabel(provider.value.status)))}</p><p class="${ssrRenderClass([statusSubtextClass.value, "text-xs mt-0.5"])}" data-v-c3cb1099>${ssrInterpolate(_ctx.$t(statusDescription(provider.value.status)))}</p></div></div><div class="border-b border-slate-700 mb-6 flex items-center justify-between" data-v-c3cb1099><nav class="flex gap-6 -mb-px" data-v-c3cb1099><!--[-->`);
|
|
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-c3cb1099>`);
|
|
ssrRenderVNode(_push, createVNode(resolveDynamicComponent(tab.icon), { class: "w-4 h-4" }, null), _parent);
|
|
_push(` ${ssrInterpolate(_ctx.$t(tab.label))}</button>`);
|
|
});
|
|
_push(`<!--]--></nav><button class="${ssrRenderClass([isRawDataDrawerOpen.value ? "bg-indigo-600 text-white shadow-lg shadow-indigo-500/25" : "bg-slate-700 text-slate-300 hover:bg-slate-600 hover:text-white", "flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium rounded-lg transition"])}" data-v-c3cb1099><svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-c3cb1099><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9.75 17L9 20l-1 1h8l-1-1-.75-3M3 13h18M5 17h14a2 2 0 002-2V5a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z" data-v-c3cb1099></path></svg> \u{1F916} ${ssrInterpolate(_ctx.$t("providers.detail_raw_data"))}</button></div>`);
|
|
if (activeTab.value === "data") {
|
|
_push(`<div class="grid grid-cols-1 lg:grid-cols-3 gap-6" data-v-c3cb1099><div class="lg:col-span-2 space-y-6" data-v-c3cb1099><div class="bg-slate-800 rounded-xl border border-slate-700 p-6" data-v-c3cb1099><h2 class="text-lg font-semibold text-white mb-4" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_section_basic"))}</h2><dl class="grid grid-cols-1 md:grid-cols-2 gap-4" data-v-c3cb1099><div data-v-c3cb1099><dt class="text-xs text-slate-500 uppercase tracking-wider" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_field_name"))}</dt><dd class="text-sm text-white mt-1 font-medium" data-v-c3cb1099>${ssrInterpolate(provider.value.name)}</dd></div><div data-v-c3cb1099><dt class="text-xs text-slate-500 uppercase tracking-wider" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_field_category"))}</dt><dd class="text-sm text-white mt-1" data-v-c3cb1099>${ssrInterpolate(provider.value.category || "\u2014")}</dd></div><div data-v-c3cb1099><dt class="text-xs text-slate-500 uppercase tracking-wider" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_field_source"))}</dt><dd class="mt-1" data-v-c3cb1099><code class="text-sm font-mono text-amber-300 bg-amber-500/10 px-2 py-0.5 rounded" data-v-c3cb1099>${ssrInterpolate(provider.value.source)}</code></dd></div><div data-v-c3cb1099><dt class="text-xs text-slate-500 uppercase tracking-wider" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_field_validation_score"))}</dt><dd class="mt-1" data-v-c3cb1099><div class="flex items-center gap-2" data-v-c3cb1099><div class="w-24 h-2 bg-slate-700 rounded-full overflow-hidden" data-v-c3cb1099><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-c3cb1099></div></div><span class="text-sm text-white font-medium" data-v-c3cb1099>${ssrInterpolate(provider.value.validation_score)}</span></div></dd></div><div data-v-c3cb1099><dt class="text-xs text-slate-500 uppercase tracking-wider" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_field_created"))}</dt><dd class="text-sm text-white mt-1" data-v-c3cb1099>${ssrInterpolate(formatDate(provider.value.created_at))}</dd></div><div data-v-c3cb1099><dt class="text-xs text-slate-500 uppercase tracking-wider" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_field_submitted_by"))}</dt><dd class="text-sm text-white mt-1" data-v-c3cb1099>${ssrInterpolate(provider.value.added_by_user_id || "\u2014")}</dd></div></dl></div><div class="bg-slate-800 rounded-xl border border-slate-700 p-6" data-v-c3cb1099><h2 class="text-lg font-semibold text-white mb-4" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_section_address"))}</h2><dl class="grid grid-cols-1 md:grid-cols-2 gap-4" data-v-c3cb1099><div class="md:col-span-2" data-v-c3cb1099><dt class="text-xs text-slate-500 uppercase tracking-wider" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_field_full_address"))}</dt><dd class="text-sm text-white mt-1" data-v-c3cb1099>${ssrInterpolate(provider.value.address_detail ? `${[provider.value.address_detail.zip, provider.value.address_detail.city, provider.value.address_detail.street_name, provider.value.address_detail.street_type, provider.value.address_detail.house_number].filter(Boolean).join(" ")}`.trim() || provider.value.address_detail.full_address_text || "\u2014" : "\u2014")}</dd></div><div data-v-c3cb1099><dt class="text-xs text-slate-500 uppercase tracking-wider" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_field_city"))}</dt><dd class="text-sm text-white mt-1" data-v-c3cb1099>${ssrInterpolate(((_b = provider.value.address_detail) == null ? void 0 : _b.city) || "\u2014")}</dd></div><div data-v-c3cb1099><dt class="text-xs text-slate-500 uppercase tracking-wider" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_field_zip"))}</dt><dd class="text-sm text-white mt-1" data-v-c3cb1099>${ssrInterpolate(((_c = provider.value.address_detail) == null ? void 0 : _c.zip) || "\u2014")}</dd></div><div data-v-c3cb1099><dt class="text-xs text-slate-500 uppercase tracking-wider" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_field_street"))}</dt><dd class="text-sm text-white mt-1" data-v-c3cb1099>${ssrInterpolate([(_d = provider.value.address_detail) == null ? void 0 : _d.street_name, (_e = provider.value.address_detail) == null ? void 0 : _e.street_type].filter(Boolean).join(" ") || "\u2014")}</dd></div><div data-v-c3cb1099><dt class="text-xs text-slate-500 uppercase tracking-wider" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_field_house_number"))}</dt><dd class="text-sm text-white mt-1" data-v-c3cb1099>${ssrInterpolate(((_f = provider.value.address_detail) == null ? void 0 : _f.house_number) || "\u2014")}</dd></div><div data-v-c3cb1099><dt class="text-xs text-slate-500 uppercase tracking-wider" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_field_plus_code"))}</dt><dd class="text-sm text-white mt-1" data-v-c3cb1099>${ssrInterpolate(provider.value.plus_code || "\u2014")}</dd></div></dl></div><div class="bg-slate-800 rounded-xl border border-slate-700 p-6" data-v-c3cb1099><h2 class="text-lg font-semibold text-white mb-4" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_section_contact"))}</h2><dl class="grid grid-cols-1 md:grid-cols-2 gap-4" data-v-c3cb1099><div data-v-c3cb1099><dt class="text-xs text-slate-500 uppercase tracking-wider" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_field_phone"))}</dt><dd class="text-sm text-white mt-1" data-v-c3cb1099>${ssrInterpolate(provider.value.contact_phone || "\u2014")}</dd></div><div data-v-c3cb1099><dt class="text-xs text-slate-500 uppercase tracking-wider" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_field_email"))}</dt><dd class="text-sm text-white mt-1" data-v-c3cb1099>${ssrInterpolate(provider.value.contact_email || "\u2014")}</dd></div><div data-v-c3cb1099><dt class="text-xs text-slate-500 uppercase tracking-wider" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_field_website"))}</dt><dd class="text-sm text-white mt-1" data-v-c3cb1099>`);
|
|
if (provider.value.website) {
|
|
_push(`<a${ssrRenderAttr("href", provider.value.website)} target="_blank" class="text-indigo-400 hover:text-indigo-300 underline" data-v-c3cb1099>${ssrInterpolate(provider.value.website)}</a>`);
|
|
} else {
|
|
_push(`<span data-v-c3cb1099>\u2014</span>`);
|
|
}
|
|
_push(`</dd></div></dl></div><div class="bg-slate-800 rounded-xl border border-slate-700 p-6" data-v-c3cb1099><h2 class="text-lg font-semibold text-white mb-4" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_section_services"))}</h2>`);
|
|
if (provider.value.category_ids && provider.value.category_ids.length > 0) {
|
|
_push(`<div class="flex flex-wrap gap-2" data-v-c3cb1099><!--[-->`);
|
|
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-c3cb1099>${ssrInterpolate(unref(getCategoryName)(catId))}</span>`);
|
|
});
|
|
_push(`<!--]--></div>`);
|
|
} else {
|
|
_push(`<p class="text-sm text-slate-500 italic" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_no_categories"))}</p>`);
|
|
}
|
|
_push(`</div><div class="bg-slate-800 rounded-xl border border-slate-700 p-6" data-v-c3cb1099><h2 class="text-lg font-semibold text-white mb-4" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_section_vehicle_classes"))}</h2>`);
|
|
if (provider.value.supported_vehicle_classes && provider.value.supported_vehicle_classes.length > 0) {
|
|
_push(`<div class="flex flex-wrap gap-2" data-v-c3cb1099><!--[-->`);
|
|
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-c3cb1099>${ssrInterpolate(_ctx.$t(vehicleClassLabel(vc)))}</span>`);
|
|
});
|
|
_push(`<!--]--></div>`);
|
|
} else {
|
|
_push(`<p class="text-sm text-slate-500 italic" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_no_vehicle_classes"))}</p>`);
|
|
}
|
|
_push(`</div><div class="bg-slate-800 rounded-xl border border-slate-700 p-6" data-v-c3cb1099><h2 class="text-lg font-semibold text-white mb-4" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_section_specializations"))}</h2>`);
|
|
if (hasSpecializations.value) {
|
|
_push(`<div class="space-y-3" data-v-c3cb1099>`);
|
|
if ((_h = (_g = provider.value.specializations) == null ? void 0 : _g.brands) == null ? void 0 : _h.length) {
|
|
_push(`<div data-v-c3cb1099><h3 class="text-xs text-slate-500 uppercase tracking-wider mb-2" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_specialization_brands"))}</h3><div class="flex flex-wrap gap-2" data-v-c3cb1099><!--[-->`);
|
|
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-c3cb1099>${ssrInterpolate(brand)}</span>`);
|
|
});
|
|
_push(`<!--]--></div></div>`);
|
|
} else {
|
|
_push(`<!---->`);
|
|
}
|
|
if ((_j = (_i = provider.value.specializations) == null ? void 0 : _i.propulsion) == null ? void 0 : _j.length) {
|
|
_push(`<div data-v-c3cb1099><h3 class="text-xs text-slate-500 uppercase tracking-wider mb-2" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_specialization_propulsion"))}</h3><div class="flex flex-wrap gap-2" data-v-c3cb1099><!--[-->`);
|
|
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-c3cb1099>${ssrInterpolate(prop)}</span>`);
|
|
});
|
|
_push(`<!--]--></div></div>`);
|
|
} else {
|
|
_push(`<!---->`);
|
|
}
|
|
_push(`</div>`);
|
|
} else {
|
|
_push(`<p class="text-sm text-slate-500 italic" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_no_specializations"))}</p>`);
|
|
}
|
|
_push(`</div><div class="bg-slate-800 rounded-xl border border-slate-700 p-6" data-v-c3cb1099><h2 class="text-lg font-semibold text-white mb-4" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_section_opening_hours"))}</h2>`);
|
|
if (hasOpeningHours.value) {
|
|
_push(`<div class="overflow-hidden" data-v-c3cb1099><table class="w-full text-sm" data-v-c3cb1099><thead data-v-c3cb1099><tr class="border-b border-slate-700" data-v-c3cb1099><th class="text-left text-xs text-slate-500 uppercase tracking-wider pb-2 pr-4" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_day_label"))}</th><th class="text-left text-xs text-slate-500 uppercase tracking-wider pb-2" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_hours_label"))}</th></tr></thead><tbody data-v-c3cb1099><!--[-->`);
|
|
ssrRenderList(DAYS, (day) => {
|
|
var _a2, _b2;
|
|
_push(`<tr class="border-b border-slate-700/50 last:border-0" data-v-c3cb1099><td class="py-2 pr-4 text-white font-medium" data-v-c3cb1099>${ssrInterpolate(_ctx.$t(day.label))}</td><td class="py-2" data-v-c3cb1099>`);
|
|
if (getDayHours(day.key)) {
|
|
_push(`<!--[--><span class="text-white" data-v-c3cb1099>${ssrInterpolate((_a2 = getDayHours(day.key)) == null ? void 0 : _a2.open)}</span><span class="text-slate-500 mx-1" data-v-c3cb1099>\u2013</span><span class="text-white" data-v-c3cb1099>${ssrInterpolate((_b2 = getDayHours(day.key)) == null ? void 0 : _b2.close)}</span><!--]-->`);
|
|
} else {
|
|
_push(`<span class="text-slate-500 italic" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_closed"))}</span>`);
|
|
}
|
|
_push(`</td></tr>`);
|
|
});
|
|
_push(`<!--]--></tbody></table></div>`);
|
|
} else {
|
|
_push(`<div data-v-c3cb1099><p class="text-sm text-slate-500 italic" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_no_opening_hours"))}</p></div>`);
|
|
}
|
|
_push(`</div></div><div class="space-y-4" data-v-c3cb1099><div class="bg-slate-800 rounded-xl border border-slate-700 p-6" data-v-c3cb1099><h2 class="text-lg font-semibold text-white mb-4" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_section_moderation"))}</h2>`);
|
|
if (provider.value.status === "pending" || provider.value.status === "research_in_progress") {
|
|
_push(`<div class="space-y-3" data-v-c3cb1099>`);
|
|
_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-c3cb1099${_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-c3cb1099${_scopeId}></path></svg> ${ssrInterpolate(_ctx.$t("providers.detail_edit"))}`);
|
|
} 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(" " + toDisplayString(_ctx.$t("providers.detail_edit")), 1)
|
|
];
|
|
}
|
|
}),
|
|
_: 1
|
|
}, _parent));
|
|
_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-c3cb1099>`);
|
|
if (actionLoading.value) {
|
|
_push(`<svg class="w-4 h-4 animate-spin" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-c3cb1099><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-c3cb1099></path></svg>`);
|
|
} else {
|
|
_push(`<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-c3cb1099><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7" data-v-c3cb1099></path></svg>`);
|
|
}
|
|
_push(` ${ssrInterpolate(_ctx.$t("providers.detail_approve"))}</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-c3cb1099><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-c3cb1099><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" data-v-c3cb1099></path></svg> ${ssrInterpolate(_ctx.$t("providers.detail_reject"))}</button></div>`);
|
|
} else if (provider.value.status === "approved") {
|
|
_push(`<div class="space-y-3" data-v-c3cb1099>`);
|
|
_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-c3cb1099${_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-c3cb1099${_scopeId}></path></svg> ${ssrInterpolate(_ctx.$t("providers.detail_edit"))}`);
|
|
} 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(" " + toDisplayString(_ctx.$t("providers.detail_edit")), 1)
|
|
];
|
|
}
|
|
}),
|
|
_: 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-c3cb1099><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-c3cb1099><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-c3cb1099></path></svg> ${ssrInterpolate(_ctx.$t("providers.detail_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-c3cb1099><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-c3cb1099><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-c3cb1099></path></svg> ${ssrInterpolate(_ctx.$t("providers.detail_delete"))}</button></div>`);
|
|
} else {
|
|
_push(`<div class="space-y-3" data-v-c3cb1099><p class="text-sm text-slate-400 text-center py-2" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_status_rejected_or_flagged", { action: provider.value.status === "rejected" ? _ctx.$t("providers.detail_status_rejected_text") : _ctx.$t("providers.detail_status_flagged_text") }))}</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-c3cb1099${_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-c3cb1099${_scopeId}></path></svg> ${ssrInterpolate(_ctx.$t("providers.detail_edit"))}`);
|
|
} 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(" " + toDisplayString(_ctx.$t("providers.detail_edit")), 1)
|
|
];
|
|
}
|
|
}),
|
|
_: 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-c3cb1099><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-c3cb1099><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-c3cb1099></path></svg> ${ssrInterpolate(_ctx.$t("providers.detail_restore"))}</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-c3cb1099><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-c3cb1099><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-c3cb1099></path></svg> ${ssrInterpolate(_ctx.$t("providers.detail_delete"))}</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-c3cb1099><h2 class="text-lg font-semibold text-white mb-4" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_section_evidence"))}</h2><img${ssrRenderAttr("src", provider.value.evidence_image_path)}${ssrRenderAttr("alt", _ctx.$t("providers.detail_section_evidence"))} class="w-full rounded-lg border border-slate-600" data-v-c3cb1099></div>`);
|
|
} else {
|
|
_push(`<!---->`);
|
|
}
|
|
_push(`</div></div>`);
|
|
} else {
|
|
_push(`<!---->`);
|
|
}
|
|
if (activeTab.value === "status") {
|
|
_push(`<div class="max-w-2xl" data-v-c3cb1099><div class="bg-slate-800 rounded-xl border border-slate-700 p-6" data-v-c3cb1099><h2 class="text-lg font-semibold text-white mb-4" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_section_status_management"))}</h2><p class="text-sm text-slate-400 mb-6" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_status_form_desc"))}</p><form data-v-c3cb1099><div class="space-y-4 mb-6" data-v-c3cb1099><div data-v-c3cb1099><label class="block text-sm font-medium text-slate-300 mb-1" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_status_form_label"))}</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-c3cb1099><option value="pending" data-v-c3cb1099${ssrIncludeBooleanAttr(Array.isArray(statusForm.value.status) ? ssrLooseContain(statusForm.value.status, "pending") : ssrLooseEqual(statusForm.value.status, "pending")) ? " selected" : ""}>${ssrInterpolate(_ctx.$t("providers.detail_status_pending"))}</option><option value="approved" data-v-c3cb1099${ssrIncludeBooleanAttr(Array.isArray(statusForm.value.status) ? ssrLooseContain(statusForm.value.status, "approved") : ssrLooseEqual(statusForm.value.status, "approved")) ? " selected" : ""}>${ssrInterpolate(_ctx.$t("providers.detail_status_approved"))}</option><option value="rejected" data-v-c3cb1099${ssrIncludeBooleanAttr(Array.isArray(statusForm.value.status) ? ssrLooseContain(statusForm.value.status, "rejected") : ssrLooseEqual(statusForm.value.status, "rejected")) ? " selected" : ""}>${ssrInterpolate(_ctx.$t("providers.detail_status_rejected"))}</option></select></div><div data-v-c3cb1099><label class="block text-sm font-medium text-slate-300 mb-1" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_status_form_score"))}</label><div class="flex items-center gap-3" data-v-c3cb1099><input${ssrRenderAttr("value", statusForm.value.validation_score)} type="number" min="0" max="100" class="w-full px-3 py-2 bg-slate-700 border border-slate-600 rounded-lg text-white text-sm focus:outline-none focus:ring-2 focus:ring-indigo-500/50" data-v-c3cb1099></div></div><div data-v-c3cb1099><label class="block text-sm font-medium text-slate-300 mb-1" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_status_form_reason"))}</label><textarea rows="3"${ssrRenderAttr("placeholder", _ctx.$t("providers.detail_status_form_reason_placeholder"))} 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-c3cb1099>${ssrInterpolate(statusForm.value.reason)}</textarea></div></div><div class="flex justify-end gap-3" data-v-c3cb1099><button type="button" class="px-4 py-2 text-sm text-slate-400 hover:text-white transition" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_status_form_cancel"))}</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-c3cb1099>`);
|
|
if (statusLoading.value) {
|
|
_push(`<svg class="w-4 h-4 animate-spin" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-c3cb1099><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-c3cb1099></path></svg>`);
|
|
} else {
|
|
_push(`<!---->`);
|
|
}
|
|
_push(` ${ssrInterpolate(_ctx.$t("providers.detail_status_form_save"))}</button></div></form></div></div>`);
|
|
} else {
|
|
_push(`<!---->`);
|
|
}
|
|
if (activeTab.value === "validations") {
|
|
_push(`<div data-v-c3cb1099><div class="bg-slate-800 rounded-xl border border-slate-700 p-6 mb-6" data-v-c3cb1099><div class="flex items-center justify-between mb-4" data-v-c3cb1099><h2 class="text-lg font-semibold text-white" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_section_validation_score"))}</h2><span class="${ssrRenderClass([provider.value.validation_score >= 80 ? "bg-emerald-500/20 text-emerald-400" : provider.value.validation_score >= 50 ? "bg-amber-500/20 text-amber-400" : "bg-rose-500/20 text-rose-400", "text-xs font-medium px-2.5 py-1 rounded-full"])}" data-v-c3cb1099>${ssrInterpolate(provider.value.validation_score >= 80 ? _ctx.$t("providers.detail_validation_score_excellent") : provider.value.validation_score >= 50 ? _ctx.$t("providers.detail_validation_score_medium") : _ctx.$t("providers.detail_validation_score_weak"))}</span></div><div class="flex items-center gap-6" data-v-c3cb1099><div class="relative w-24 h-24 flex-shrink-0" data-v-c3cb1099><svg class="w-24 h-24 -rotate-90" viewBox="0 0 36 36" data-v-c3cb1099><circle cx="18" cy="18" r="15.5" fill="none" stroke="currentColor" stroke-width="3" class="text-slate-700" data-v-c3cb1099></circle><circle cx="18" cy="18" r="15.5" fill="none" stroke="currentColor" stroke-width="3"${ssrRenderAttr("stroke-dasharray", 100)}${ssrRenderAttr("stroke-dashoffset", 100 - Math.min(provider.value.validation_score, 100))} class="${ssrRenderClass([provider.value.validation_score >= 80 ? "text-emerald-500" : provider.value.validation_score >= 50 ? "text-amber-500" : "text-rose-500", "transition-all duration-1000 ease-out"])}" stroke-linecap="round" data-v-c3cb1099></circle></svg><span class="absolute inset-0 flex items-center justify-center text-2xl font-bold text-white" data-v-c3cb1099>${ssrInterpolate(provider.value.validation_score)}</span></div><div class="space-y-2" data-v-c3cb1099><div class="flex items-center gap-2" data-v-c3cb1099><div class="w-32 h-2.5 bg-slate-700 rounded-full overflow-hidden" data-v-c3cb1099><div class="${ssrRenderClass([provider.value.validation_score >= 80 ? "bg-emerald-500" : provider.value.validation_score >= 50 ? "bg-amber-500" : "bg-rose-500", "h-full rounded-full transition-all"])}" style="${ssrRenderStyle({ width: Math.min(provider.value.validation_score, 100) + "%" })}" data-v-c3cb1099></div></div><span class="text-sm text-slate-400" data-v-c3cb1099>/ 100</span></div><p class="text-xs text-slate-500" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_validation_score_desc"))}</p></div></div></div><div class="bg-slate-800 rounded-xl border border-slate-700 p-6" data-v-c3cb1099><h2 class="text-lg font-semibold text-white mb-4" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_section_gamification_validations"))}</h2><p class="text-sm text-slate-400 mb-6" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_validation_list_desc"))}</p>`);
|
|
if (validationsLoading.value) {
|
|
_push(`<div class="flex items-center justify-center py-8" data-v-c3cb1099><svg class="w-5 h-5 animate-spin text-slate-400" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-c3cb1099><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-c3cb1099></path></svg></div>`);
|
|
} else if (validations.value.length === 0) {
|
|
_push(`<div class="text-center py-8" data-v-c3cb1099><p class="text-slate-500" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_validation_no_entries"))}</p></div>`);
|
|
} else {
|
|
_push(`<div class="space-y-3" data-v-c3cb1099><!--[-->`);
|
|
ssrRenderList(validations.value, (v) => {
|
|
var _a2;
|
|
_push(`<div class="bg-slate-700/50 rounded-lg border border-slate-600 p-4" data-v-c3cb1099><div class="flex items-start justify-between gap-4" data-v-c3cb1099><div class="flex-1" data-v-c3cb1099><div class="flex items-center gap-2 mb-1" data-v-c3cb1099><span class="${ssrRenderClass([validationTypeClass(v.validation_type), "text-xs font-medium px-2 py-0.5 rounded-full"])}" data-v-c3cb1099>${ssrInterpolate(validationTypeLabel(v.validation_type))}</span><span class="text-xs text-slate-500" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_validation_weight"))}: ${ssrInterpolate(v.weight)}</span></div><p class="text-sm text-slate-300" data-v-c3cb1099><span class="text-slate-400" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_validation_voter"))}:</span> ${ssrInterpolate(v.voter_name || `User #${v.voter_user_id}`)}</p>`);
|
|
if ((_a2 = v.validation_metadata) == null ? void 0 : _a2.reason) {
|
|
_push(`<p class="text-xs text-slate-500 mt-1" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_validation_reason"))}: ${ssrInterpolate(v.validation_metadata.reason)}</p>`);
|
|
} else {
|
|
_push(`<!---->`);
|
|
}
|
|
_push(`</div><div class="text-xs text-slate-500 whitespace-nowrap" data-v-c3cb1099>${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-c3cb1099><div class="bg-slate-800 rounded-xl border border-slate-700 p-6" data-v-c3cb1099><h2 class="text-lg font-semibold text-white mb-4" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_section_crawler_data"))}</h2><p class="text-sm text-slate-400 mb-6" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_crawler_desc"))}</p><div class="flex flex-wrap gap-3 mb-6" data-v-c3cb1099><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-c3cb1099><span class="text-slate-400" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_crawler_source"))}:</span><code class="text-cyan-300 font-mono" data-v-c3cb1099>${ssrInterpolate(provider.value.source || "\u2014")}</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-c3cb1099><span class="text-slate-400" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_crawler_trust_score"))}:</span><span class="font-semibold" data-v-c3cb1099>${ssrInterpolate((_k = provider.value.trust_score) != null ? _k : "\u2014")}</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-c3cb1099><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-c3cb1099><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-c3cb1099></path></svg><div data-v-c3cb1099><p class="text-sm font-medium text-rose-300" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_crawler_rejection_reason_title"))}</p><p class="text-sm text-rose-200/70 mt-0.5" data-v-c3cb1099>${ssrInterpolate(provider.value.rejection_reason)}</p></div></div>`);
|
|
} else {
|
|
_push(`<!---->`);
|
|
}
|
|
_push(`<div class="mb-6" data-v-c3cb1099><h3 class="text-sm font-medium text-slate-300 mb-3" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_crawler_raw_data"))}</h3><div class="bg-slate-900/50 rounded-lg border border-slate-700 p-4 overflow-x-auto" data-v-c3cb1099>`);
|
|
_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-c3cb1099><h3 class="text-sm font-medium text-slate-300 mb-3" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_crawler_audit_trail"))}</h3><div class="bg-slate-900/50 rounded-lg border border-slate-700 p-4 overflow-x-auto" data-v-c3cb1099>`);
|
|
_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-c3cb1099><div class="bg-slate-800 rounded-xl border border-slate-700 p-6" data-v-c3cb1099><h2 class="text-lg font-semibold text-white mb-4" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_section_history"))}</h2><p class="text-sm text-slate-400 mb-6" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_history_desc"))}</p>`);
|
|
if (historyLoading.value) {
|
|
_push(`<div class="flex items-center justify-center py-8" data-v-c3cb1099><svg class="w-5 h-5 animate-spin text-slate-400" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-c3cb1099><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-c3cb1099></path></svg></div>`);
|
|
} else if (history.value.length === 0) {
|
|
_push(`<div class="text-center py-8" data-v-c3cb1099><p class="text-slate-500" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_history_no_entries"))}</p></div>`);
|
|
} else {
|
|
_push(`<div class="relative" data-v-c3cb1099><div class="absolute left-4 top-0 bottom-0 w-0.5 bg-slate-700" data-v-c3cb1099></div><!--[-->`);
|
|
ssrRenderList(history.value, (entry, index2) => {
|
|
_push(`<div class="relative pl-10 pb-6 last:pb-0" data-v-c3cb1099><div class="${ssrRenderClass([historyDotClass(entry.action), "absolute left-2.5 w-3 h-3 rounded-full border-2 mt-1.5"])}" data-v-c3cb1099></div><div class="bg-slate-700/50 rounded-lg border border-slate-600 p-4" data-v-c3cb1099><div class="flex items-start justify-between gap-4 mb-2" data-v-c3cb1099><div data-v-c3cb1099><span class="${ssrRenderClass([historyActionClass(entry.action), "text-xs font-medium px-2 py-0.5 rounded-full"])}" data-v-c3cb1099>${ssrInterpolate(historyActionLabel(entry.action))}</span><span class="text-xs text-slate-500 ml-2" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_history_user"))} #${ssrInterpolate(entry.user_id || "?")}</span></div><div class="text-xs text-slate-500 whitespace-nowrap" data-v-c3cb1099>${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-c3cb1099>`);
|
|
if (entry.new_data.old_status || entry.new_data.new_status) {
|
|
_push(`<div class="flex items-center gap-2" data-v-c3cb1099><span class="text-slate-500" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_history_status"))}:</span><span class="text-rose-400" data-v-c3cb1099>${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-c3cb1099><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7" data-v-c3cb1099></path></svg><span class="text-emerald-400" data-v-c3cb1099>${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-c3cb1099><span class="text-slate-500" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_history_reason"))}:</span> ${ssrInterpolate(entry.new_data.reason)}</div>`);
|
|
} else {
|
|
_push(`<!---->`);
|
|
}
|
|
if (entry.new_data.changes) {
|
|
_push(`<div class="mt-2" data-v-c3cb1099><details class="text-xs" data-v-c3cb1099><summary class="text-slate-500 cursor-pointer hover:text-slate-400" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_history_detailed_changes"))}</summary><div class="mt-2 space-y-1" data-v-c3cb1099><!--[-->`);
|
|
ssrRenderList(entry.new_data.changes, (value, key) => {
|
|
_push(`<div class="flex gap-2" data-v-c3cb1099><span class="text-slate-500 w-28 flex-shrink-0" data-v-c3cb1099>${ssrInterpolate(key)}:</span><span class="text-slate-300 truncate" data-v-c3cb1099>${ssrInterpolate(value != null ? value : "\u2014")}</span></div>`);
|
|
});
|
|
_push(`<!--]--></div></details></div>`);
|
|
} else {
|
|
_push(`<!---->`);
|
|
}
|
|
_push(`</div>`);
|
|
} else {
|
|
_push(`<!---->`);
|
|
}
|
|
if (entry.old_data) {
|
|
_push(`<div class="mt-2" data-v-c3cb1099><details class="text-xs" data-v-c3cb1099><summary class="text-slate-500 cursor-pointer hover:text-slate-400" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_history_old_data"))}</summary><div class="mt-2 space-y-1" data-v-c3cb1099><!--[-->`);
|
|
ssrRenderList(entry.old_data, (value, key) => {
|
|
_push(`<div class="flex gap-2" data-v-c3cb1099><span class="text-slate-500 w-28 flex-shrink-0" data-v-c3cb1099>${ssrInterpolate(key)}:</span><span class="text-slate-300 truncate" data-v-c3cb1099>${ssrInterpolate(value != null ? value : "\u2014")}</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-c3cb1099><div class="bg-slate-800 rounded-xl border border-slate-700 p-6 w-full max-w-lg mx-4 shadow-2xl" data-v-c3cb1099><h2 class="text-lg font-semibold text-white mb-2" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.reject_modal_title"))}</h2><p class="text-sm text-slate-400 mb-6" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.reject_modal_body", { name: (_l = provider.value) == null ? void 0 : _l.name }))}</p><form data-v-c3cb1099><div class="mb-4" data-v-c3cb1099><label class="block text-sm font-medium text-slate-300 mb-1" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.reject_reason_label"))}</label><textarea rows="3"${ssrRenderAttr("placeholder", _ctx.$t("providers.reject_reason_placeholder"))} 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-c3cb1099>${ssrInterpolate(rejectReason.value)}</textarea></div><div class="flex justify-end gap-3" data-v-c3cb1099><button type="button" class="px-4 py-2 text-sm text-slate-400 hover:text-white transition" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("common.cancel"))}</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-c3cb1099>`);
|
|
if (actionLoading.value) {
|
|
_push(`<svg class="w-4 h-4 animate-spin" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-c3cb1099><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-c3cb1099></path></svg>`);
|
|
} else {
|
|
_push(`<!---->`);
|
|
}
|
|
_push(` ${ssrInterpolate(_ctx.$t("providers.reject"))}</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-c3cb1099><div class="bg-slate-800 rounded-xl border border-slate-700 p-6 w-full max-w-lg mx-4 shadow-2xl" data-v-c3cb1099><h2 class="text-lg font-semibold text-white mb-2" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_flag_modal_title"))}</h2><p class="text-sm text-slate-400 mb-6" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_flag_modal_body", { name: (_m = provider.value) == null ? void 0 : _m.name }))}</p><form data-v-c3cb1099><div class="mb-4" data-v-c3cb1099><label class="block text-sm font-medium text-slate-300 mb-1" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_flag_reason_label"))}</label><textarea rows="3"${ssrRenderAttr("placeholder", _ctx.$t("providers.detail_flag_reason_placeholder"))} 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-c3cb1099>${ssrInterpolate(flagReason.value)}</textarea></div><div class="flex justify-end gap-3" data-v-c3cb1099><button type="button" class="px-4 py-2 text-sm text-slate-400 hover:text-white transition" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("common.cancel"))}</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-c3cb1099>`);
|
|
if (actionLoading.value) {
|
|
_push(`<svg class="w-4 h-4 animate-spin" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-c3cb1099><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-c3cb1099></path></svg>`);
|
|
} else {
|
|
_push(`<!---->`);
|
|
}
|
|
_push(` ${ssrInterpolate(_ctx.$t("providers.detail_flag_submit"))}</button></div></form></div></div>`);
|
|
} else {
|
|
_push(`<!---->`);
|
|
}
|
|
ssrRenderTeleport(_push, (_push2) => {
|
|
var _a2, _b2, _c2, _d2, _e2, _f2, _g2;
|
|
if (isRawDataDrawerOpen.value) {
|
|
_push2(`<div class="fixed inset-y-0 right-0 bg-slate-900 border-l border-slate-700 shadow-2xl z-40 overflow-y-auto" style="${ssrRenderStyle({ width: drawerWidth.value + "px", minWidth: "320px", maxWidth: "80vw" })}" data-v-c3cb1099><div class="absolute left-0 top-0 bottom-0 w-2 cursor-col-resize hover:bg-primary-500/50 active:bg-primary-500/70 transition-colors z-50 group" data-v-c3cb1099><div class="absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 w-0.5 h-8 rounded-full bg-slate-600 group-hover:bg-primary-400 transition-colors" data-v-c3cb1099></div></div><div class="sticky top-0 z-10 bg-slate-900/95 backdrop-blur-sm border-b border-slate-700 px-6 py-4 flex items-center justify-between" data-v-c3cb1099><div class="flex items-center gap-2" data-v-c3cb1099><svg class="w-5 h-5 text-indigo-400" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-c3cb1099><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9.75 17L9 20l-1 1h8l-1-1-.75-3M3 13h18M5 17h14a2 2 0 002-2V5a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z" data-v-c3cb1099></path></svg><h2 class="text-lg font-semibold text-white" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_raw_data"))}</h2></div><button class="p-1.5 rounded-lg text-slate-400 hover:text-white hover:bg-slate-700 transition" data-v-c3cb1099><svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-c3cb1099><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" data-v-c3cb1099></path></svg></button></div><div class="p-6 space-y-6" data-v-c3cb1099><div class="flex flex-wrap gap-3" data-v-c3cb1099><div class="inline-flex items-center gap-1.5 px-3 py-1.5 bg-slate-800 rounded-lg text-xs font-medium" data-v-c3cb1099><span class="text-slate-400" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_crawler_source"))}:</span><code class="text-cyan-300 font-mono" data-v-c3cb1099>${ssrInterpolate(((_a2 = provider.value) == null ? void 0 : _a2.source) || "\u2014")}</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-c3cb1099><span class="text-slate-400" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_crawler_trust_score"))}:</span><span class="font-semibold" data-v-c3cb1099>${ssrInterpolate((_c2 = (_b2 = provider.value) == null ? void 0 : _b2.trust_score) != null ? _c2 : "\u2014")}</span></div></div><div data-v-c3cb1099><h3 class="text-sm font-medium text-slate-300 mb-3" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_crawler_raw_data"))}</h3><div class="bg-slate-800/50 rounded-lg border border-slate-700 p-4 overflow-x-auto" data-v-c3cb1099>`);
|
|
_push2(ssrRenderComponent(_component_RawDataViewer, {
|
|
data: (_d2 = provider.value) == null ? void 0 : _d2.raw_data
|
|
}, null, _parent));
|
|
_push2(`</div></div>`);
|
|
if (((_e2 = provider.value) == null ? void 0 : _e2.audit_trail) && Object.keys(provider.value.audit_trail).length > 0) {
|
|
_push2(`<div data-v-c3cb1099><h3 class="text-sm font-medium text-slate-300 mb-3" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_crawler_audit_trail"))}</h3><div class="bg-slate-800/50 rounded-lg border border-slate-700 p-4 overflow-x-auto" data-v-c3cb1099>`);
|
|
_push2(ssrRenderComponent(_component_RawDataViewer, {
|
|
data: (_f2 = provider.value) == null ? void 0 : _f2.audit_trail
|
|
}, null, _parent));
|
|
_push2(`</div></div>`);
|
|
} else {
|
|
_push2(`<!---->`);
|
|
}
|
|
if ((_g2 = provider.value) == null ? void 0 : _g2.rejection_reason) {
|
|
_push2(`<div class="flex items-start gap-3 p-4 bg-rose-500/10 border border-rose-500/30 rounded-lg" data-v-c3cb1099><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-c3cb1099><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-c3cb1099></path></svg><div data-v-c3cb1099><p class="text-sm font-medium text-rose-300" data-v-c3cb1099>${ssrInterpolate(_ctx.$t("providers.detail_crawler_rejection_reason_title"))}</p><p class="text-sm text-rose-200/70 mt-0.5" data-v-c3cb1099>${ssrInterpolate(provider.value.rejection_reason)}</p></div></div>`);
|
|
} else {
|
|
_push2(`<!---->`);
|
|
}
|
|
_push2(`</div></div>`);
|
|
} else {
|
|
_push2(`<!---->`);
|
|
}
|
|
}, "body", false, _parent);
|
|
_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-c3cb1099"]]);
|
|
|
|
export { index as default };
|
|
//# sourceMappingURL=index-DiOIWxtg.mjs.map
|