frontend admin refakctorálás

This commit is contained in:
Roo
2026-07-08 08:03:57 +00:00
parent 07b59032ce
commit 2e0abc62a7
455 changed files with 14428 additions and 21651 deletions

View File

@@ -0,0 +1,170 @@
import { _ as __nuxt_component_0 } from './nuxt-link-1NBbHb-h.mjs';
import { defineComponent, ref, unref, withCtx, createTextVNode, toDisplayString, openBlock, createBlock, createVNode, useSSRContext } from 'vue';
import { ssrRenderAttrs, ssrInterpolate, ssrRenderList, ssrRenderComponent, ssrIncludeBooleanAttr, ssrRenderAttr } from 'vue/server-renderer';
import { u as useFormatter } from './useFormatter-hycy3urM.mjs';
import { a as useI18n } 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 'vue-router';
import 'node:url';
import './region-0mvXqaMM.mjs';
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: "pending",
__ssrInlineRender: true,
setup(__props) {
const { t } = useI18n();
const { formatDate } = useFormatter();
const loading = ref(true);
const error = ref(false);
const providers = ref([]);
const toast = ref("");
const actionLoading = ref(null);
const showRejectModal = ref(false);
const rejectingProvider = ref(null);
const rejectReason = ref("");
const rejectLoading = ref(false);
return (_ctx, _push, _parent, _attrs) => {
var _a;
const _component_NuxtLink = __nuxt_component_0;
_push(`<div${ssrRenderAttrs(_attrs)} data-v-7dd923ab><div class="mb-8" data-v-7dd923ab><h1 class="text-2xl font-bold text-white" data-v-7dd923ab>${ssrInterpolate(_ctx.$t("providers.pending_title"))}</h1><p class="text-slate-400 mt-1" data-v-7dd923ab>${ssrInterpolate(_ctx.$t("providers.pending_subtitle"))}</p></div>`);
if (unref(loading)) {
_push(`<div class="flex items-center justify-center py-20" data-v-7dd923ab><div class="text-slate-400 flex items-center gap-3" data-v-7dd923ab><svg class="w-5 h-5 animate-spin" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-7dd923ab><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-7dd923ab></path></svg><span data-v-7dd923ab>${ssrInterpolate(_ctx.$t("providers.pending_loading"))}</span></div></div>`);
} else if (unref(error)) {
_push(`<div class="bg-rose-500/10 border border-rose-500/30 rounded-xl p-6 mb-8" data-v-7dd923ab><p class="text-rose-400" data-v-7dd923ab>${ssrInterpolate(_ctx.$t("providers.error"))}</p><button class="mt-3 text-sm text-rose-300 hover:text-rose-200 underline" data-v-7dd923ab>${ssrInterpolate(_ctx.$t("providers.retry"))}</button></div>`);
} else {
_push(`<div class="space-y-4" data-v-7dd923ab><!--[-->`);
ssrRenderList(unref(providers), (provider) => {
_push(`<div class="bg-slate-800 rounded-xl border border-slate-700 p-6 hover:border-amber-500/30 transition" data-v-7dd923ab><div class="flex items-start justify-between gap-4" data-v-7dd923ab><div class="flex-1 min-w-0" data-v-7dd923ab><div class="flex items-center gap-3 mb-2" data-v-7dd923ab>`);
_push(ssrRenderComponent(_component_NuxtLink, {
to: `/providers/${provider.id}`,
class: "text-lg font-semibold text-blue-400 hover:text-blue-300 hover:underline cursor-pointer transition-colors truncate"
}, {
default: withCtx((_, _push2, _parent2, _scopeId) => {
if (_push2) {
_push2(`${ssrInterpolate(provider.name)}`);
} else {
return [
createTextVNode(toDisplayString(provider.name), 1)
];
}
}),
_: 2
}, _parent));
_push(`<span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-amber-500/10 text-amber-400" data-v-7dd923ab>${ssrInterpolate(_ctx.$t("providers.status_pending"))}</span><code class="text-xs font-mono text-slate-400 bg-slate-700/50 px-2 py-0.5 rounded" data-v-7dd923ab>${ssrInterpolate(provider.source)}</code></div><div class="grid grid-cols-2 gap-x-8 gap-y-2 text-sm" data-v-7dd923ab>`);
if (provider.address) {
_push(`<div class="text-slate-300" data-v-7dd923ab><span class="text-slate-500" data-v-7dd923ab>${ssrInterpolate(_ctx.$t("providers.label_address"))}</span> ${ssrInterpolate(provider.address)}</div>`);
} else {
_push(`<!---->`);
}
if (provider.city) {
_push(`<div class="text-slate-300" data-v-7dd923ab><span class="text-slate-500" data-v-7dd923ab>${ssrInterpolate(_ctx.$t("providers.label_city"))}</span> ${ssrInterpolate(provider.city)}</div>`);
} else {
_push(`<!---->`);
}
if (provider.category) {
_push(`<div class="text-slate-300" data-v-7dd923ab><span class="text-slate-500" data-v-7dd923ab>${ssrInterpolate(_ctx.$t("providers.label_category"))}</span> ${ssrInterpolate(provider.category)}</div>`);
} else {
_push(`<!---->`);
}
_push(`<div class="text-slate-300" data-v-7dd923ab><span class="text-slate-500" data-v-7dd923ab>${ssrInterpolate(_ctx.$t("providers.label_validation_score"))}</span><span class="text-amber-400 font-medium ml-1" data-v-7dd923ab>${ssrInterpolate(provider.validation_score)}</span></div>`);
if (provider.created_at) {
_push(`<div class="text-slate-300" data-v-7dd923ab><span class="text-slate-500" data-v-7dd923ab>${ssrInterpolate(_ctx.$t("providers.label_submitted"))}</span> ${ssrInterpolate(unref(formatDate)(provider.created_at))}</div>`);
} else {
_push(`<!---->`);
}
_push(`</div></div><div class="flex flex-col gap-2 flex-shrink-0" data-v-7dd923ab><button${ssrIncludeBooleanAttr(unref(actionLoading) === provider.id) ? " disabled" : ""} class="px-4 py-2 bg-emerald-600 hover:bg-emerald-500 disabled:bg-emerald-600/50 text-white rounded-lg text-sm font-medium transition flex items-center gap-2" data-v-7dd923ab>`);
if (unref(actionLoading) === provider.id) {
_push(`<svg class="w-4 h-4 animate-spin" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-7dd923ab><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-7dd923ab></path></svg>`);
} else {
_push(`<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-7dd923ab><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7" data-v-7dd923ab></path></svg>`);
}
_push(` ${ssrInterpolate(_ctx.$t("providers.approve"))}</button><button${ssrIncludeBooleanAttr(unref(actionLoading) === provider.id) ? " disabled" : ""} class="px-4 py-2 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 gap-2" data-v-7dd923ab><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-7dd923ab><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" data-v-7dd923ab></path></svg> ${ssrInterpolate(_ctx.$t("providers.reject"))}</button>`);
_push(ssrRenderComponent(_component_NuxtLink, {
to: `/providers/${provider.id}`,
class: "px-4 py-2 bg-slate-700 hover:bg-slate-600 text-slate-300 rounded-lg text-sm font-medium transition flex items-center gap-2 text-center"
}, {
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-7dd923ab${_scopeId}><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" data-v-7dd923ab${_scopeId}></path><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z" data-v-7dd923ab${_scopeId}></path></svg> ${ssrInterpolate(_ctx.$t("providers.details"))}`);
} 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: "M15 12a3 3 0 11-6 0 3 3 0 016 0z"
}),
createVNode("path", {
"stroke-linecap": "round",
"stroke-linejoin": "round",
"stroke-width": "2",
d: "M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"
})
])),
createTextVNode(" " + toDisplayString(_ctx.$t("providers.details")), 1)
];
}
}),
_: 2
}, _parent));
_push(`</div></div></div>`);
});
_push(`<!--]-->`);
if (unref(providers).length === 0) {
_push(`<div class="bg-slate-800 rounded-xl border border-slate-700 p-12 text-center" data-v-7dd923ab><svg class="w-12 h-12 mx-auto text-slate-600 mb-4" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-7dd923ab><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z" data-v-7dd923ab></path></svg><h3 class="text-lg font-medium text-slate-400 mb-1" data-v-7dd923ab>${ssrInterpolate(_ctx.$t("providers.no_pending"))}</h3><p class="text-sm text-slate-500" data-v-7dd923ab>${ssrInterpolate(_ctx.$t("providers.no_pending_subtitle"))}</p></div>`);
} else {
_push(`<!---->`);
}
_push(`</div>`);
}
if (unref(showRejectModal)) {
_push(`<div class="fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm" data-v-7dd923ab><div class="bg-slate-800 rounded-xl border border-slate-700 p-6 w-full max-w-lg mx-4 shadow-2xl" data-v-7dd923ab><h2 class="text-lg font-semibold text-white mb-2" data-v-7dd923ab>${ssrInterpolate(_ctx.$t("providers.reject_modal_title"))}</h2><p class="text-sm text-slate-400 mb-6" data-v-7dd923ab>${ssrInterpolate(_ctx.$t("providers.reject_modal_body", { name: (_a = unref(rejectingProvider)) == null ? void 0 : _a.name }))}</p><form data-v-7dd923ab><div class="mb-4" data-v-7dd923ab><label class="block text-sm font-medium text-slate-300 mb-1" data-v-7dd923ab>${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-7dd923ab>${ssrInterpolate(unref(rejectReason))}</textarea></div><div class="flex justify-end gap-3" data-v-7dd923ab><button type="button" class="px-4 py-2 text-sm text-slate-400 hover:text-white transition" data-v-7dd923ab>${ssrInterpolate(_ctx.$t("common.cancel"))}</button><button type="submit"${ssrIncludeBooleanAttr(unref(rejectLoading)) ? " 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-7dd923ab>`);
if (unref(rejectLoading)) {
_push(`<svg class="w-4 h-4 animate-spin" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-7dd923ab><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-7dd923ab></path></svg>`);
} else {
_push(`<!---->`);
}
_push(` ${ssrInterpolate(_ctx.$t("providers.reject"))}</button></div></form></div></div>`);
} else {
_push(`<!---->`);
}
if (unref(toast)) {
_push(`<div class="fixed bottom-6 right-6 z-50 bg-emerald-600 text-white px-4 py-3 rounded-lg shadow-lg text-sm flex items-center gap-2 animate-slide-up" data-v-7dd923ab><svg class="w-4 h-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-7dd923ab><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z" data-v-7dd923ab></path></svg> ${ssrInterpolate(unref(toast))}</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/pending.vue");
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
};
const pending = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-7dd923ab"]]);
export { pending as default };
//# sourceMappingURL=pending-CHKQ0AcT.mjs.map