frontend admin refakctorálás
This commit is contained in:
@@ -1,4 +0,0 @@
|
||||
import style_0 from "./edit-styles-1.mjs-J0c-7dzy.js";
|
||||
export default [
|
||||
style_0
|
||||
]
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,11 +0,0 @@
|
||||
const _export_sfc = (sfc, props) => {
|
||||
const target = sfc.__vccOpts || sfc;
|
||||
for (const [key, val] of props) {
|
||||
target[key] = val;
|
||||
}
|
||||
return target;
|
||||
};
|
||||
export {
|
||||
_export_sfc as _
|
||||
};
|
||||
//# sourceMappingURL=_plugin-vue_export-helper-1tPrXgE0.js.map
|
||||
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"_plugin-vue_export-helper-1tPrXgE0.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
|
||||
@@ -1 +0,0 @@
|
||||
{"file":"_plugin-vue_export-helper-1tPrXgE0.js","mappings":";;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
|
||||
@@ -1,4 +0,0 @@
|
||||
import style_0 from "./entry-styles-3.mjs-C1rWf53M.js";
|
||||
export default [
|
||||
style_0
|
||||
]
|
||||
@@ -1,53 +0,0 @@
|
||||
import { executeAsync } from "/app/node_modules/unctx/dist/index.mjs";
|
||||
import { j as defineNuxtRouteMiddleware, d as useCookie, n as navigateTo, c as useAuthStore } from "../server.mjs";
|
||||
import "vue";
|
||||
import "/app/node_modules/ofetch/dist/node.mjs";
|
||||
import "#internal/nuxt/paths";
|
||||
import "/app/node_modules/hookable/dist/index.mjs";
|
||||
import "/app/node_modules/h3/dist/index.mjs";
|
||||
import "pinia";
|
||||
import "/app/node_modules/defu/dist/defu.mjs";
|
||||
import "vue-router";
|
||||
import "/app/node_modules/ufo/dist/index.mjs";
|
||||
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";
|
||||
import "vue/server-renderer";
|
||||
const auth = defineNuxtRouteMiddleware(async (to, from) => {
|
||||
let __temp, __restore;
|
||||
if (to.path === "/login") {
|
||||
return;
|
||||
}
|
||||
const tokenCookie = useCookie("access_token");
|
||||
if (!tokenCookie.value) {
|
||||
return navigateTo("/login");
|
||||
}
|
||||
const authStore = useAuthStore();
|
||||
if (!authStore.user) {
|
||||
try {
|
||||
;
|
||||
[__temp, __restore] = executeAsync(() => authStore.fetchUser()), await __temp, __restore();
|
||||
;
|
||||
} catch {
|
||||
authStore.logout();
|
||||
return navigateTo("/login");
|
||||
}
|
||||
}
|
||||
if (!authStore.user) {
|
||||
authStore.logout();
|
||||
return navigateTo("/login");
|
||||
}
|
||||
const allowedRoles = ["SUPERADMIN", "ADMIN", "MODERATOR", "SALES_REP", "SERVICE_MGR"];
|
||||
const userRole = (authStore.user.role || "").toUpperCase();
|
||||
if (!allowedRoles.includes(userRole)) {
|
||||
authStore.logout();
|
||||
return navigateTo("/login");
|
||||
}
|
||||
});
|
||||
export {
|
||||
auth as default
|
||||
};
|
||||
//# sourceMappingURL=auth-nNLBs3fT.js.map
|
||||
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"auth-nNLBs3fT.js","sources":["../../../../middleware/auth.ts"],"sourcesContent":["export default defineNuxtRouteMiddleware(async (to, from) => {\n // Skip auth check on the login page itself\n if (to.path === '/login') {\n return\n }\n\n // Check for the access_token cookie\n const tokenCookie = useCookie('access_token')\n if (!tokenCookie.value) {\n return navigateTo('/login')\n }\n\n // ── RBAC: Verify user role from Pinia authStore ──────────────────────\n const authStore = useAuthStore()\n\n // If the user profile hasn't been loaded yet, try to fetch it\n if (!authStore.user) {\n try {\n await authStore.fetchUser()\n } catch {\n // Token is invalid or expired — clear and redirect to login\n authStore.logout()\n return navigateTo('/login')\n }\n }\n\n // After fetch, check if user is still null (fetch failed silently)\n if (!authStore.user) {\n authStore.logout()\n return navigateTo('/login')\n }\n\n // Allowed staff roles that can access the admin panel\n const allowedRoles = ['SUPERADMIN', 'ADMIN', 'MODERATOR', 'SALES_REP', 'SERVICE_MGR']\n const userRole = (authStore.user.role || '').toUpperCase()\n\n if (!allowedRoles.includes(userRole)) {\n // Standard USER or unknown role — kick them out, clear token, redirect\n authStore.logout()\n return navigateTo('/login')\n }\n})\n"],"names":["__executeAsync"],"mappings":";;;;;;;;;;;;;;;;;;AAEE,MAAA,iCAA0B,OAAA,IAAA,SAAA;AAAA,MAAA,QAAA;AACxB,MAAA,GAAA,SAAA,UAAA;AACF;AAAA,EAGA;AACA,sBAAiB,UAAO,cAAA;AACtB,MAAA,CAAA,mBAAkB;AACpB,WAAA,WAAA,QAAA;AAAA,EAGA;AAGA,oBAAe,aAAM;AACnB,MAAA,CAAA,UAAI,MAAA;AACF,QAAA;AACF;AAAA,MAAA,CAAA,QAAQ,SAAA,IAAAA,aAAA,MAAA,UAAA,UAAA,CAAA,GAAA,MAAA,QAAA,UAAA;AAAA;AAAA,IAEN,QAAA;AACA;AACF,aAAA,WAAA,QAAA;AAAA,IACF;AAAA,EAGA;AACE,MAAA,CAAA,UAAU,MAAO;AACjB;AACF,WAAA,WAAA,QAAA;AAAA,EAGA;AACA,QAAM,eAAY,CAAA,cAAe,SAAY,aAAY,aAAA,aAAA;AAEzD,QAAK,YAAa,UAAS,KAAA,QAAW,IAAA,YAAA;AAEpC,MAAA,CAAA,aAAU,SAAO,QAAA,GAAA;AACjB;AACF,WAAA,WAAA,QAAA;AAAA,EACF;;"}
|
||||
@@ -1 +0,0 @@
|
||||
{"file":"auth-nNLBs3fT.js","mappings":";;;;;;;;;;;;;;;;;;AAEE,MAAA,iCAA0B,OAAA,IAAA,SAAA;AAAA,MAAA,QAAA;AACxB,MAAA,GAAA,SAAA,UAAA;AACF;AAAA,EAGA;AACA,sBAAiB,UAAO,cAAA;AACtB,MAAA,CAAA,mBAAkB;AACpB,WAAA,WAAA,QAAA;AAAA,EAGA;AAGA,oBAAe,aAAM;AACnB,MAAA,CAAA,UAAI,MAAA;AACF,QAAA;AACF;AAAA,MAAA,CAAA,QAAQ,SAAA,IAAAA,aAAA,MAAA,UAAA,UAAA,CAAA,GAAA,MAAA,QAAA,UAAA;AAAA;AAAA,IAEN,QAAA;AACA;AACF,aAAA,WAAA,QAAA;AAAA,IACF;AAAA,EAGA;AACE,MAAA,CAAA,UAAU,MAAO;AACjB;AACF,WAAA,WAAA,QAAA;AAAA,EAGA;AACA,QAAM,eAAY,CAAA,cAAe,SAAY,aAAY,aAAA,aAAA;AAEzD,QAAK,YAAa,UAAS,KAAA,QAAW,IAAA,YAAA;AAEpC,MAAA,CAAA,aAAU,SAAO,QAAA,GAAA;AACjB;AACF,WAAA,WAAA,QAAA;AAAA,EACF;;","names":["__executeAsync"],"sources":["../../../../middleware/auth.ts"],"sourcesContent":["export default defineNuxtRouteMiddleware(async (to, from) => {\n // Skip auth check on the login page itself\n if (to.path === '/login') {\n return\n }\n\n // Check for the access_token cookie\n const tokenCookie = useCookie('access_token')\n if (!tokenCookie.value) {\n return navigateTo('/login')\n }\n\n // ── RBAC: Verify user role from Pinia authStore ──────────────────────\n const authStore = useAuthStore()\n\n // If the user profile hasn't been loaded yet, try to fetch it\n if (!authStore.user) {\n try {\n await authStore.fetchUser()\n } catch {\n // Token is invalid or expired — clear and redirect to login\n authStore.logout()\n return navigateTo('/login')\n }\n }\n\n // After fetch, check if user is still null (fetch failed silently)\n if (!authStore.user) {\n authStore.logout()\n return navigateTo('/login')\n }\n\n // Allowed staff roles that can access the admin panel\n const allowedRoles = ['SUPERADMIN', 'ADMIN', 'MODERATOR', 'SALES_REP', 'SERVICE_MGR']\n const userRole = (authStore.user.role || '').toUpperCase()\n\n if (!allowedRoles.includes(userRole)) {\n // Standard USER or unknown role — kick them out, clear token, redirect\n authStore.logout()\n return navigateTo('/login')\n }\n})\n"],"version":3}
|
||||
@@ -1,110 +0,0 @@
|
||||
import { defineComponent, ref, reactive, unref, useSSRContext } from "vue";
|
||||
import { ssrRenderAttrs, ssrInterpolate, ssrRenderList, ssrRenderAttr, ssrIncludeBooleanAttr, ssrRenderClass } from "vue/server-renderer";
|
||||
import "/app/node_modules/hookable/dist/index.mjs";
|
||||
import "/app/node_modules/klona/dist/index.mjs";
|
||||
import { a as useI18n } from "../server.mjs";
|
||||
import "/app/node_modules/ofetch/dist/node.mjs";
|
||||
import "#internal/nuxt/paths";
|
||||
import "/app/node_modules/unctx/dist/index.mjs";
|
||||
import "/app/node_modules/h3/dist/index.mjs";
|
||||
import "pinia";
|
||||
import "/app/node_modules/defu/dist/defu.mjs";
|
||||
import "vue-router";
|
||||
import "/app/node_modules/ufo/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 = /* @__PURE__ */ defineComponent({
|
||||
__name: "badges",
|
||||
__ssrInlineRender: true,
|
||||
setup(__props) {
|
||||
const { t } = useI18n();
|
||||
const loading = ref(true);
|
||||
const error = ref(false);
|
||||
const saving = ref(false);
|
||||
const badges = ref([]);
|
||||
const showModal = ref(false);
|
||||
const showDeleteModal = ref(false);
|
||||
const editingBadge = ref(null);
|
||||
const deletingBadge = ref(null);
|
||||
ref(false);
|
||||
const toast = ref(null);
|
||||
const form = reactive({
|
||||
name: "",
|
||||
description: "",
|
||||
icon_url: ""
|
||||
});
|
||||
return (_ctx, _push, _parent, _attrs) => {
|
||||
_push(`<div${ssrRenderAttrs(_attrs)}><div class="mb-8"><h1 class="text-2xl font-bold text-white">${ssrInterpolate(unref(t)("gamification.badges.title"))}</h1><p class="text-slate-400 mt-1">${ssrInterpolate(unref(t)("gamification.badges.subtitle"))}</p></div>`);
|
||||
if (unref(loading)) {
|
||||
_push(`<div class="flex items-center justify-center py-20"><div class="text-slate-400 flex items-center gap-3"><svg class="w-5 h-5 animate-spin" fill="none" stroke="currentColor" viewBox="0 0 24 24"><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"></path></svg><span>${ssrInterpolate(unref(t)("gamification.badges.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"><p class="text-rose-400">${ssrInterpolate(unref(t)("gamification.badges.error"))}</p><button class="mt-3 text-sm text-rose-300 hover:text-rose-200 underline">${ssrInterpolate(unref(t)("gamification.badges.retry"))}</button></div>`);
|
||||
} else {
|
||||
_push(`<!--[--><div class="mb-6 flex justify-end"><button class="px-4 py-2 bg-emerald-600 hover:bg-emerald-500 text-white rounded-lg text-sm font-medium transition flex items-center gap-2"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v16m8-8H4"></path></svg> ${ssrInterpolate(unref(t)("gamification.badges.create"))}</button></div><div class="bg-slate-800 rounded-xl border border-slate-700 overflow-hidden"><table class="w-full"><thead><tr class="border-b border-slate-700"><th class="text-left px-6 py-4 text-xs font-medium text-slate-400 uppercase tracking-wider">${ssrInterpolate(unref(t)("gamification.badges.id"))}</th><th class="text-left px-6 py-4 text-xs font-medium text-slate-400 uppercase tracking-wider">${ssrInterpolate(unref(t)("gamification.badges.name"))}</th><th class="text-left px-6 py-4 text-xs font-medium text-slate-400 uppercase tracking-wider">${ssrInterpolate(unref(t)("gamification.badges.description"))}</th><th class="text-left px-6 py-4 text-xs font-medium text-slate-400 uppercase tracking-wider">${ssrInterpolate(unref(t)("gamification.badges.icon"))}</th><th class="text-right px-6 py-4 text-xs font-medium text-slate-400 uppercase tracking-wider">${ssrInterpolate(unref(t)("gamification.badges.actions"))}</th></tr></thead><tbody class="divide-y divide-slate-700/50"><!--[-->`);
|
||||
ssrRenderList(unref(badges), (badge) => {
|
||||
_push(`<tr class="hover:bg-slate-700/30 transition"><td class="px-6 py-4 text-sm text-slate-400">${ssrInterpolate(badge.id)}</td><td class="px-6 py-4"><span class="text-sm font-semibold text-white">${ssrInterpolate(badge.name)}</span></td><td class="px-6 py-4 text-sm text-slate-300 max-w-xs truncate">${ssrInterpolate(badge.description || "—")}</td><td class="px-6 py-4">`);
|
||||
if (badge.icon_url) {
|
||||
_push(`<div class="flex items-center gap-2"><img${ssrRenderAttr("src", badge.icon_url)} alt="" class="w-8 h-8 rounded-full object-cover bg-slate-700"><span class="text-xs text-slate-400 truncate max-w-[120px]">${ssrInterpolate(badge.icon_url)}</span></div>`);
|
||||
} else {
|
||||
_push(`<span class="text-sm text-slate-500">—</span>`);
|
||||
}
|
||||
_push(`</td><td class="px-6 py-4 text-right"><div class="flex items-center justify-end gap-2"><button class="p-1.5 rounded-lg text-slate-400 hover:text-white hover:bg-slate-700 transition"${ssrRenderAttr("title", unref(t)("gamification.badges.edit"))}><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><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"></path></svg></button><button class="p-1.5 rounded-lg text-slate-400 hover:text-rose-400 hover:bg-rose-500/10 transition"${ssrRenderAttr("title", unref(t)("gamification.badges.delete"))}><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><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"></path></svg></button></div></td></tr>`);
|
||||
});
|
||||
_push(`<!--]-->`);
|
||||
if (unref(badges).length === 0) {
|
||||
_push(`<tr><td colspan="5" class="px-6 py-12 text-center text-sm text-slate-500">${ssrInterpolate(unref(t)("gamification.badges.no_items"))}</td></tr>`);
|
||||
} else {
|
||||
_push(`<!---->`);
|
||||
}
|
||||
_push(`</tbody></table></div><!--]-->`);
|
||||
}
|
||||
if (unref(showModal)) {
|
||||
_push(`<div class="fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm"><div class="bg-slate-800 rounded-xl border border-slate-700 p-6 w-full max-w-lg mx-4 shadow-2xl"><h2 class="text-lg font-semibold text-white mb-6">${ssrInterpolate(unref(editingBadge) ? unref(t)("gamification.badges.edit_title") : unref(t)("gamification.badges.create_title"))}</h2><form class="space-y-4"><div><label class="block text-sm font-medium text-slate-300 mb-1">${ssrInterpolate(unref(t)("gamification.badges.name"))} <span class="text-rose-400">*</span></label><input${ssrRenderAttr("value", unref(form).name)} type="text" required maxlength="100" class="w-full px-3 py-2 bg-slate-700 border border-slate-600 rounded-lg text-sm text-white placeholder-slate-400 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-transparent"${ssrRenderAttr("placeholder", unref(t)("gamification.badges.name_placeholder"))}></div><div><label class="block text-sm font-medium text-slate-300 mb-1">${ssrInterpolate(unref(t)("gamification.badges.description"))} <span class="text-rose-400">*</span></label><textarea required maxlength="500" rows="3" class="w-full px-3 py-2 bg-slate-700 border border-slate-600 rounded-lg text-sm text-white placeholder-slate-400 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-transparent resize-none"${ssrRenderAttr("placeholder", unref(t)("gamification.badges.desc_placeholder"))}>${ssrInterpolate(unref(form).description)}</textarea></div><div><label class="block text-sm font-medium text-slate-300 mb-1">${ssrInterpolate(unref(t)("gamification.badges.icon"))}</label><input${ssrRenderAttr("value", unref(form).icon_url)} type="url" class="w-full px-3 py-2 bg-slate-700 border border-slate-600 rounded-lg text-sm text-white placeholder-slate-400 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-transparent"${ssrRenderAttr("placeholder", unref(t)("gamification.badges.icon_placeholder"))}><p class="text-xs text-slate-500 mt-1">${ssrInterpolate(unref(t)("gamification.badges.icon_hint"))}</p></div>`);
|
||||
if (unref(form).icon_url) {
|
||||
_push(`<div class="flex items-center gap-3 p-3 bg-slate-700/50 rounded-lg"><img${ssrRenderAttr("src", unref(form).icon_url)} alt="Preview" class="w-10 h-10 rounded-full object-cover bg-slate-600"><div class="text-xs text-slate-400"><span class="text-emerald-400">✔</span> ${ssrInterpolate(unref(t)("gamification.badges.icon_preview"))}</div></div>`);
|
||||
} else {
|
||||
_push(`<!---->`);
|
||||
}
|
||||
_push(`<div class="flex items-center justify-end gap-3 pt-2"><button type="button" class="px-4 py-2 text-sm font-medium text-slate-300 hover:text-white transition">${ssrInterpolate(unref(t)("gamification.badges.cancel"))}</button><button type="submit"${ssrIncludeBooleanAttr(unref(saving)) ? " disabled" : ""} class="px-4 py-2 bg-indigo-600 hover:bg-indigo-500 disabled:bg-indigo-600/50 disabled:cursor-not-allowed text-white rounded-lg text-sm font-medium transition flex items-center gap-2">`);
|
||||
if (unref(saving)) {
|
||||
_push(`<svg class="w-4 h-4 animate-spin" fill="none" stroke="currentColor" viewBox="0 0 24 24"><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"></path></svg>`);
|
||||
} else {
|
||||
_push(`<!---->`);
|
||||
}
|
||||
_push(` ${ssrInterpolate(unref(editingBadge) ? unref(t)("gamification.badges.save") : unref(t)("gamification.badges.create_btn"))}</button></div></form></div></div>`);
|
||||
} else {
|
||||
_push(`<!---->`);
|
||||
}
|
||||
if (unref(showDeleteModal)) {
|
||||
_push(`<div class="fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm"><div class="bg-slate-800 rounded-xl border border-slate-700 p-6 w-full max-w-md mx-4 shadow-2xl"><div class="flex items-center gap-3 mb-4"><div class="p-2 rounded-full bg-rose-500/10 text-rose-400"><svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24"><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"></path></svg></div><div><h2 class="text-lg font-semibold text-white">${ssrInterpolate(unref(t)("gamification.badges.delete_title"))}</h2><p class="text-sm text-slate-400 mt-1">${ssrInterpolate(unref(t)("gamification.badges.delete_confirm"))}</p></div></div><div class="bg-slate-700/50 rounded-lg p-4 mb-6"><p class="text-sm font-medium text-white">${ssrInterpolate(unref(deletingBadge)?.name)}</p><p class="text-xs text-slate-400 mt-1">${ssrInterpolate(unref(deletingBadge)?.description)}</p></div><div class="flex items-center justify-end gap-3"><button class="px-4 py-2 text-sm font-medium text-slate-300 hover:text-white transition">${ssrInterpolate(unref(t)("gamification.badges.cancel"))}</button><button${ssrIncludeBooleanAttr(unref(saving)) ? " disabled" : ""} class="px-4 py-2 bg-rose-600 hover:bg-rose-500 disabled:bg-rose-600/50 disabled:cursor-not-allowed text-white rounded-lg text-sm font-medium transition flex items-center gap-2">`);
|
||||
if (unref(saving)) {
|
||||
_push(`<svg class="w-4 h-4 animate-spin" fill="none" stroke="currentColor" viewBox="0 0 24 24"><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"></path></svg>`);
|
||||
} else {
|
||||
_push(`<!---->`);
|
||||
}
|
||||
_push(` ${ssrInterpolate(unref(t)("gamification.badges.delete_btn"))}</button></div></div></div>`);
|
||||
} else {
|
||||
_push(`<!---->`);
|
||||
}
|
||||
if (unref(toast)) {
|
||||
_push(`<div class="${ssrRenderClass([unref(toast).type === "success" ? "bg-emerald-600 text-white" : "bg-rose-600 text-white", "fixed bottom-6 right-6 z-50 px-4 py-3 rounded-lg shadow-xl text-sm font-medium transition-all duration-300"])}">${ssrInterpolate(unref(toast).message)}</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/gamification/badges.vue");
|
||||
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
|
||||
};
|
||||
export {
|
||||
_sfc_main as default
|
||||
};
|
||||
//# sourceMappingURL=badges-BJ6bQeZt.js.map
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,20 +0,0 @@
|
||||
import { mergeProps, useSSRContext } from "vue";
|
||||
import { ssrRenderAttrs, ssrRenderSlot } from "vue/server-renderer";
|
||||
import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.js";
|
||||
const _sfc_main = {};
|
||||
function _sfc_ssrRender(_ctx, _push, _parent, _attrs) {
|
||||
_push(`<div${ssrRenderAttrs(mergeProps({ class: "bg-slate-900 min-h-screen" }, _attrs))}>`);
|
||||
ssrRenderSlot(_ctx.$slots, "default", {}, null, _push, _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("layouts/blank.vue");
|
||||
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
|
||||
};
|
||||
const blank = /* @__PURE__ */ _export_sfc(_sfc_main, [["ssrRender", _sfc_ssrRender]]);
|
||||
export {
|
||||
blank as default
|
||||
};
|
||||
//# sourceMappingURL=blank-DWT4RB69.js.map
|
||||
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"blank-DWT4RB69.js","sources":["../../../../layouts/blank.vue"],"sourcesContent":["<template>\n <div class=\"bg-slate-900 min-h-screen\">\n <slot />\n </div>\n</template>\n"],"names":["_ssrRenderAttrs","_mergeProps"],"mappings":";;;;;AACO,QAAA,OAAAA,eAAAC,WAAA,EAAA,OAAM,+BAA2B,MAAA,CAAA,CAAA,GAAA;;;;;;;;;;;"}
|
||||
@@ -1 +0,0 @@
|
||||
{"file":"blank-DWT4RB69.js","mappings":";;;;;AACO,QAAA,OAAAA,eAAAC,WAAA,EAAA,OAAM,+BAA2B,MAAA,CAAA,CAAA,GAAA;;;;;;;;;;;","names":["_ssrRenderAttrs","_mergeProps"],"sources":["../../../../layouts/blank.vue"],"sourcesContent":["<template>\n <div class=\"bg-slate-900 min-h-screen\">\n <slot />\n </div>\n</template>\n"],"version":3}
|
||||
@@ -1,151 +0,0 @@
|
||||
import { defineComponent, ref, reactive, unref, useSSRContext } from "vue";
|
||||
import { ssrRenderAttrs, ssrInterpolate, ssrRenderAttr, ssrIncludeBooleanAttr, ssrLooseContain, ssrLooseEqual, ssrRenderList, ssrRenderClass } from "vue/server-renderer";
|
||||
import "/app/node_modules/hookable/dist/index.mjs";
|
||||
import "/app/node_modules/klona/dist/index.mjs";
|
||||
import { a as useI18n } from "../server.mjs";
|
||||
import "/app/node_modules/ofetch/dist/node.mjs";
|
||||
import "#internal/nuxt/paths";
|
||||
import "/app/node_modules/unctx/dist/index.mjs";
|
||||
import "/app/node_modules/h3/dist/index.mjs";
|
||||
import "pinia";
|
||||
import "/app/node_modules/defu/dist/defu.mjs";
|
||||
import "vue-router";
|
||||
import "/app/node_modules/ufo/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 = /* @__PURE__ */ defineComponent({
|
||||
__name: "competitions",
|
||||
__ssrInlineRender: true,
|
||||
setup(__props) {
|
||||
const { t } = useI18n();
|
||||
const loading = ref(true);
|
||||
const error = ref(false);
|
||||
const saving = ref(false);
|
||||
const showModal = ref(false);
|
||||
const seasons = ref([]);
|
||||
const competitions = ref([]);
|
||||
const editingCompetition = ref(null);
|
||||
const selectedSeasonId = ref(null);
|
||||
const formError = ref("");
|
||||
const rulesParseError = ref(false);
|
||||
const form = reactive({
|
||||
name: "",
|
||||
description: "",
|
||||
season_id: "",
|
||||
start_date: "",
|
||||
end_date: "",
|
||||
status: "draft",
|
||||
rulesJson: ""
|
||||
});
|
||||
function formatDate(dateStr) {
|
||||
if (!dateStr) return "";
|
||||
const d = new Date(dateStr);
|
||||
return d.toLocaleDateString("hu-HU", { year: "numeric", month: "long", day: "numeric" });
|
||||
}
|
||||
function getStatusClass(status) {
|
||||
switch (status) {
|
||||
case "active":
|
||||
return "bg-emerald-500/10 text-emerald-400 border border-emerald-500/30";
|
||||
case "draft":
|
||||
return "bg-slate-700 text-slate-400 border border-slate-600";
|
||||
case "completed":
|
||||
return "bg-blue-500/10 text-blue-400 border border-blue-500/30";
|
||||
case "cancelled":
|
||||
return "bg-rose-500/10 text-rose-400 border border-rose-500/30";
|
||||
default:
|
||||
return "bg-slate-700 text-slate-400 border border-slate-600";
|
||||
}
|
||||
}
|
||||
function getStatusLabel(status) {
|
||||
switch (status) {
|
||||
case "active":
|
||||
return t("gamification.competitions.status_active");
|
||||
case "draft":
|
||||
return t("gamification.competitions.status_draft");
|
||||
case "completed":
|
||||
return t("gamification.competitions.status_completed");
|
||||
case "cancelled":
|
||||
return t("gamification.competitions.status_cancelled");
|
||||
default:
|
||||
return status;
|
||||
}
|
||||
}
|
||||
return (_ctx, _push, _parent, _attrs) => {
|
||||
_push(`<div${ssrRenderAttrs(_attrs)}><div class="mb-8 flex items-center justify-between"><div><h1 class="text-2xl font-bold text-white">${ssrInterpolate(unref(t)("gamification.competitions.title"))}</h1><p class="text-slate-400 mt-1">${ssrInterpolate(unref(t)("gamification.competitions.subtitle"))}</p></div><button class="flex items-center gap-2 px-4 py-2 bg-indigo-600 hover:bg-indigo-500 text-white text-sm font-medium rounded-lg transition"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v16m8-8H4"></path></svg> ${ssrInterpolate(unref(t)("gamification.competitions.create"))}</button></div><div class="mb-6"><div class="flex items-center gap-3 flex-wrap"><label class="text-sm text-slate-400">${ssrInterpolate(unref(t)("gamification.competitions.season_filter"))}</label><select class="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 focus:border-transparent"><option${ssrRenderAttr("value", null)}${ssrIncludeBooleanAttr(Array.isArray(unref(selectedSeasonId)) ? ssrLooseContain(unref(selectedSeasonId), null) : ssrLooseEqual(unref(selectedSeasonId), null)) ? " selected" : ""}>${ssrInterpolate(unref(t)("gamification.competitions.all_seasons"))}</option><!--[-->`);
|
||||
ssrRenderList(unref(seasons), (s) => {
|
||||
_push(`<option${ssrRenderAttr("value", s.id)}${ssrIncludeBooleanAttr(Array.isArray(unref(selectedSeasonId)) ? ssrLooseContain(unref(selectedSeasonId), s.id) : ssrLooseEqual(unref(selectedSeasonId), s.id)) ? " selected" : ""}>${ssrInterpolate(s.name)} ${ssrInterpolate(s.is_active ? unref(t)("gamification.competitions.active_badge") : "")}</option>`);
|
||||
});
|
||||
_push(`<!--]--></select></div></div>`);
|
||||
if (unref(loading)) {
|
||||
_push(`<div class="flex items-center justify-center py-20"><div class="text-slate-400 flex items-center gap-3"><svg class="w-5 h-5 animate-spin" fill="none" stroke="currentColor" viewBox="0 0 24 24"><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"></path></svg><span>${ssrInterpolate(unref(t)("gamification.competitions.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"><p class="text-rose-400">${ssrInterpolate(unref(t)("gamification.competitions.error"))}</p><button class="mt-2 text-sm text-rose-300 hover:text-rose-200 underline">${ssrInterpolate(unref(t)("gamification.competitions.retry"))}</button></div>`);
|
||||
} else {
|
||||
_push(`<!--[-->`);
|
||||
if (unref(competitions).length === 0) {
|
||||
_push(`<div class="bg-slate-800 rounded-xl border border-slate-700 p-12 text-center"><svg class="w-12 h-12 mx-auto text-slate-600 mb-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 3h2l.4 2M7 13h10l4-8H5.4M7 13L5.4 5M7 13l-2.293 2.293c-.63.63-.184 1.707.707 1.707H17m0 0a2 2 0 100 4 2 2 0 000-4zm-8 2a2 2 0 100 4 2 2 0 000-4z"></path></svg><p class="text-slate-400">${ssrInterpolate(unref(t)("gamification.competitions.no_items"))}</p><button class="mt-4 px-4 py-2 bg-indigo-600 hover:bg-indigo-500 text-white text-sm font-medium rounded-lg transition">${ssrInterpolate(unref(t)("gamification.competitions.create_first"))}</button></div>`);
|
||||
} else {
|
||||
_push(`<div class="grid grid-cols-1 lg:grid-cols-2 gap-4"><!--[-->`);
|
||||
ssrRenderList(unref(competitions), (comp) => {
|
||||
_push(`<div class="bg-slate-800 rounded-xl border border-slate-700 p-6 hover:border-slate-600 transition"><div class="flex items-start justify-between mb-3"><div><h3 class="text-lg font-semibold text-white">${ssrInterpolate(comp.name)}</h3>`);
|
||||
if (comp.description) {
|
||||
_push(`<p class="text-sm text-slate-400 mt-1 line-clamp-2">${ssrInterpolate(comp.description)}</p>`);
|
||||
} else {
|
||||
_push(`<!---->`);
|
||||
}
|
||||
_push(`</div><span class="${ssrRenderClass([getStatusClass(comp.status), "px-2.5 py-0.5 rounded-full text-xs font-medium flex-shrink-0 ml-2"])}">${ssrInterpolate(getStatusLabel(comp.status))}</span></div><div class="space-y-2 text-sm text-slate-400 mb-4"><div class="flex items-center gap-2"><svg class="w-4 h-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"></path></svg><span>${ssrInterpolate(formatDate(comp.start_date))} → ${ssrInterpolate(formatDate(comp.end_date))}</span></div><div class="flex items-center gap-2"><svg class="w-4 h-4 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 7h.01M7 3h5c.512 0 1.024.195 1.414.586l7 7a2 2 0 010 2.828l-7 7a2 2 0 01-2.828 0l-7-7A1.994 1.994 0 013 12V7a4 4 0 014-4z"></path></svg><span>${ssrInterpolate(unref(t)("gamification.competitions.season_id_label"))} ${ssrInterpolate(comp.season_id)}</span></div></div>`);
|
||||
if (comp.rules && Object.keys(comp.rules).length > 0) {
|
||||
_push(`<div class="mb-4"><details class="text-sm"><summary class="text-indigo-400 cursor-pointer hover:text-indigo-300">${ssrInterpolate(unref(t)("gamification.competitions.view_rules"))}</summary><pre class="mt-2 p-3 bg-slate-900 rounded-lg text-xs text-slate-300 overflow-x-auto">${ssrInterpolate(JSON.stringify(comp.rules, null, 2))}</pre></details></div>`);
|
||||
} else {
|
||||
_push(`<!---->`);
|
||||
}
|
||||
_push(`<div class="flex items-center gap-2 pt-2 border-t border-slate-700/50"><button class="flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-sm text-indigo-400 hover:bg-indigo-500/10 transition"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><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"></path></svg> ${ssrInterpolate(unref(t)("gamification.competitions.edit"))}</button></div></div>`);
|
||||
});
|
||||
_push(`<!--]--></div>`);
|
||||
}
|
||||
_push(`<!--]-->`);
|
||||
}
|
||||
if (unref(showModal)) {
|
||||
_push(`<div class="fixed inset-0 z-50 flex items-center justify-center p-4"><div class="fixed inset-0 bg-black/60"></div><div class="relative bg-slate-800 rounded-xl border border-slate-700 w-full max-w-lg p-6 shadow-2xl max-h-[90vh] overflow-y-auto"><h2 class="text-lg font-semibold text-white mb-6">${ssrInterpolate(unref(editingCompetition) ? unref(t)("gamification.competitions.edit_title") : unref(t)("gamification.competitions.create_title"))}</h2><form class="space-y-4"><div><label class="block text-sm font-medium text-slate-300 mb-1">${ssrInterpolate(unref(t)("gamification.competitions.name"))}</label><input${ssrRenderAttr("value", unref(form).name)} type="text" required class="w-full px-3 py-2 bg-slate-700 border border-slate-600 rounded-lg text-white placeholder-slate-400 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-transparent"${ssrRenderAttr("placeholder", unref(t)("gamification.competitions.name_placeholder"))}></div><div><label class="block text-sm font-medium text-slate-300 mb-1">${ssrInterpolate(unref(t)("gamification.competitions.description"))}</label><textarea rows="3" class="w-full px-3 py-2 bg-slate-700 border border-slate-600 rounded-lg text-white placeholder-slate-400 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-transparent"${ssrRenderAttr("placeholder", unref(t)("gamification.competitions.desc_placeholder"))}>${ssrInterpolate(unref(form).description)}</textarea></div><div><label class="block text-sm font-medium text-slate-300 mb-1">${ssrInterpolate(unref(t)("gamification.competitions.season"))}</label><select required 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 focus:border-transparent"><option value="" disabled${ssrIncludeBooleanAttr(Array.isArray(unref(form).season_id) ? ssrLooseContain(unref(form).season_id, "") : ssrLooseEqual(unref(form).season_id, "")) ? " selected" : ""}>${ssrInterpolate(unref(t)("gamification.competitions.select_season"))}</option><!--[-->`);
|
||||
ssrRenderList(unref(seasons), (s) => {
|
||||
_push(`<option${ssrRenderAttr("value", s.id)}${ssrIncludeBooleanAttr(Array.isArray(unref(form).season_id) ? ssrLooseContain(unref(form).season_id, s.id) : ssrLooseEqual(unref(form).season_id, s.id)) ? " selected" : ""}>${ssrInterpolate(s.name)} ${ssrInterpolate(s.is_active ? unref(t)("gamification.competitions.active_badge") : "")}</option>`);
|
||||
});
|
||||
_push(`<!--]--></select></div><div><label class="block text-sm font-medium text-slate-300 mb-1">${ssrInterpolate(unref(t)("gamification.competitions.start_date"))}</label><input${ssrRenderAttr("value", unref(form).start_date)} type="date" required 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 focus:border-transparent"></div><div><label class="block text-sm font-medium text-slate-300 mb-1">${ssrInterpolate(unref(t)("gamification.competitions.end_date"))}</label><input${ssrRenderAttr("value", unref(form).end_date)} type="date" required 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 focus:border-transparent"></div><div><label class="block text-sm font-medium text-slate-300 mb-1">${ssrInterpolate(unref(t)("gamification.competitions.status"))}</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 focus:border-transparent"><option value="draft"${ssrIncludeBooleanAttr(Array.isArray(unref(form).status) ? ssrLooseContain(unref(form).status, "draft") : ssrLooseEqual(unref(form).status, "draft")) ? " selected" : ""}>${ssrInterpolate(unref(t)("gamification.competitions.status_draft"))}</option><option value="active"${ssrIncludeBooleanAttr(Array.isArray(unref(form).status) ? ssrLooseContain(unref(form).status, "active") : ssrLooseEqual(unref(form).status, "active")) ? " selected" : ""}>${ssrInterpolate(unref(t)("gamification.competitions.status_active"))}</option><option value="completed"${ssrIncludeBooleanAttr(Array.isArray(unref(form).status) ? ssrLooseContain(unref(form).status, "completed") : ssrLooseEqual(unref(form).status, "completed")) ? " selected" : ""}>${ssrInterpolate(unref(t)("gamification.competitions.status_completed"))}</option><option value="cancelled"${ssrIncludeBooleanAttr(Array.isArray(unref(form).status) ? ssrLooseContain(unref(form).status, "cancelled") : ssrLooseEqual(unref(form).status, "cancelled")) ? " selected" : ""}>${ssrInterpolate(unref(t)("gamification.competitions.status_cancelled"))}</option></select></div><div><label class="block text-sm font-medium text-slate-300 mb-1">${ssrInterpolate(unref(t)("gamification.competitions.rules"))}</label><textarea rows="5" class="w-full px-3 py-2 bg-slate-700 border border-slate-600 rounded-lg text-white placeholder-slate-400 font-mono text-xs focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-transparent"${ssrRenderAttr("placeholder", unref(t)("gamification.competitions.rules_placeholder"))}>${ssrInterpolate(unref(form).rulesJson)}</textarea>`);
|
||||
if (unref(rulesParseError)) {
|
||||
_push(`<p class="text-xs text-rose-400 mt-1">${ssrInterpolate(unref(t)("gamification.competitions.invalid_json"))}</p>`);
|
||||
} else {
|
||||
_push(`<!---->`);
|
||||
}
|
||||
_push(`</div>`);
|
||||
if (unref(formError)) {
|
||||
_push(`<div class="bg-rose-500/10 border border-rose-500/30 rounded-lg p-3"><p class="text-sm text-rose-400">${ssrInterpolate(unref(formError))}</p></div>`);
|
||||
} else {
|
||||
_push(`<!---->`);
|
||||
}
|
||||
_push(`<div class="flex items-center justify-end gap-3 pt-2"><button type="button" class="px-4 py-2 text-sm text-slate-400 hover:text-white transition">${ssrInterpolate(unref(t)("gamification.competitions.cancel"))}</button><button type="submit"${ssrIncludeBooleanAttr(unref(saving) || unref(rulesParseError)) ? " disabled" : ""} class="px-4 py-2 bg-indigo-600 hover:bg-indigo-500 disabled:bg-indigo-600/50 text-white text-sm font-medium rounded-lg transition flex items-center gap-2">`);
|
||||
if (unref(saving)) {
|
||||
_push(`<svg class="w-4 h-4 animate-spin" fill="none" stroke="currentColor" viewBox="0 0 24 24"><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"></path></svg>`);
|
||||
} else {
|
||||
_push(`<!---->`);
|
||||
}
|
||||
_push(` ${ssrInterpolate(unref(editingCompetition) ? unref(t)("gamification.competitions.save") : unref(t)("gamification.competitions.create_btn"))}</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/gamification/competitions.vue");
|
||||
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
|
||||
};
|
||||
export {
|
||||
_sfc_main as default
|
||||
};
|
||||
//# sourceMappingURL=competitions-1WDTeHdG.js.map
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,5 +0,0 @@
|
||||
const config_vue_vue_type_style_index_0_scoped_0bf5a572_lang = ".animate-slide-up[data-v-0bf5a572]{animation:slideUp-0bf5a572 .3s ease-out}@keyframes slideUp-0bf5a572{0%{opacity:0;transform:translateY(1rem)}to{opacity:1;transform:translateY(0)}}";
|
||||
export {
|
||||
config_vue_vue_type_style_index_0_scoped_0bf5a572_lang as default
|
||||
};
|
||||
//# sourceMappingURL=config-styles-1.mjs-w3nI6KxA.js.map
|
||||
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"config-styles-1.mjs-w3nI6KxA.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
||||
@@ -1 +0,0 @@
|
||||
{"file":"config-styles-1.mjs-w3nI6KxA.js","mappings":";","names":[],"sources":[],"sourcesContent":[],"version":3}
|
||||
@@ -1,4 +0,0 @@
|
||||
import style_0 from "./config-styles-1.mjs-w3nI6KxA.js";
|
||||
export default [
|
||||
style_0
|
||||
]
|
||||
@@ -1,94 +0,0 @@
|
||||
const resource = {
|
||||
"common": {
|
||||
"loading": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Načítání..." } },
|
||||
"saving": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Ukládání..." } },
|
||||
"error": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Došlo k chybě" } },
|
||||
"retry": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Opakovat" } },
|
||||
"save": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Uložit" } },
|
||||
"saving_data": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Ukládání dat..." } },
|
||||
"cancel": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Zrušit" } },
|
||||
"discard": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Zahodit" } },
|
||||
"delete": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Smazat" } },
|
||||
"delete_confirm": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Opravdu chcete smazat tuto položku?" } },
|
||||
"delete_btn": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Smazat" } },
|
||||
"delete_title": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Potvrdit Smazání" } },
|
||||
"deleted": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Úspěšně smazáno" } },
|
||||
"edit": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Upravit" } },
|
||||
"edit_title": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Upravit Položku" } },
|
||||
"create": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Vytvořit" } },
|
||||
"create_btn": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Vytvořit" } },
|
||||
"create_title": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Vytvořit Nové" } },
|
||||
"create_first": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Vytvořte svou první položku pro začátek" } },
|
||||
"search": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Hledat" } },
|
||||
"search_placeholder": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Hledat..." } },
|
||||
"filter": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Filtr" } },
|
||||
"no_results": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Nebyly nalezeny žádné výsledky" } },
|
||||
"no_results_hint": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Zkuste upravit kritéria vyhledávání nebo filtru" } },
|
||||
"no_items": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Žádné položky k dispozici" } },
|
||||
"actions": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Akce" } },
|
||||
"status": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Stav" } },
|
||||
"active": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Aktivní" } },
|
||||
"inactive": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Neaktivní" } },
|
||||
"activate": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Aktivovat" } },
|
||||
"deactivate": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Deaktivovat" } },
|
||||
"name": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Název" } },
|
||||
"name_placeholder": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Zadejte název" } },
|
||||
"description": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Popis" } },
|
||||
"desc_placeholder": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Zadejte popis" } },
|
||||
"details": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Detaily" } },
|
||||
"email": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Email" } },
|
||||
"id": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "ID" } },
|
||||
"type": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Typ" } },
|
||||
"type_corporate": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Firemní" } },
|
||||
"view": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Zobrazit" } },
|
||||
"updated": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Úspěšně aktualizováno" } },
|
||||
"save_error": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Uložení selhalo" } },
|
||||
"invalid_json": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Neplatný formát JSON" } },
|
||||
"prev": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Předchozí" } },
|
||||
"next": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Další" } },
|
||||
"none": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Žádné" } },
|
||||
"reset": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Reset" } },
|
||||
"confirm": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Potvrdit" } },
|
||||
"close": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Zavřít" } },
|
||||
"back": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Zpět" } },
|
||||
"continue": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Pokračovat" } },
|
||||
"exit": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Ukončit" } },
|
||||
"all": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Vše" } },
|
||||
"select_all": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Vybrat Vše" } },
|
||||
"deselect_all": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Odznačit Vše" } },
|
||||
"expires": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Vyprší" } },
|
||||
"created": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Vytvořeno" } },
|
||||
"start_date": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Datum Zahájení" } },
|
||||
"end_date": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Datum Ukončení" } },
|
||||
"points": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Body" } },
|
||||
"level": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Úroveň" } },
|
||||
"user": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Uživatel" } },
|
||||
"user_id": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "ID Uživatele" } },
|
||||
"services": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Služby" } },
|
||||
"discoveries": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Objevy" } },
|
||||
"restriction": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Omezení" } },
|
||||
"restriction_mild": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Mírné" } },
|
||||
"restriction_moderate": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Střední" } },
|
||||
"restriction_severe": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Přísné" } },
|
||||
"min_xp": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Min XP" } },
|
||||
"xp": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "XP" } },
|
||||
"penalty": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Trest" } },
|
||||
"feature_flags": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Funkce" } },
|
||||
"permission": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Oprávnění" } },
|
||||
"role": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Role" } },
|
||||
"domain": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Doména" } },
|
||||
"action": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Akce" } },
|
||||
"value": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Hodnota" } },
|
||||
"key": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Klíč" } },
|
||||
"enabled": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Povoleno" } },
|
||||
"disabled": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Zakázáno" } },
|
||||
"yes": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Ano" } },
|
||||
"no": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Ne" } },
|
||||
"on": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Zapnuto" } },
|
||||
"off": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Vypnuto" } }
|
||||
}
|
||||
};
|
||||
export {
|
||||
resource as default
|
||||
};
|
||||
//# sourceMappingURL=cz-CP7lYDxM.js.map
|
||||
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"cz-CP7lYDxM.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
||||
@@ -1 +0,0 @@
|
||||
{"file":"cz-CP7lYDxM.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
|
||||
@@ -1,94 +0,0 @@
|
||||
const resource = {
|
||||
"common": {
|
||||
"loading": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Wird geladen..." } },
|
||||
"saving": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Wird gespeichert..." } },
|
||||
"error": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Ein Fehler ist aufgetreten" } },
|
||||
"retry": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Wiederholen" } },
|
||||
"save": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Speichern" } },
|
||||
"saving_data": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Daten werden gespeichert..." } },
|
||||
"cancel": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Abbrechen" } },
|
||||
"discard": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Verwerfen" } },
|
||||
"delete": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Löschen" } },
|
||||
"delete_confirm": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Sind Sie sicher, dass Sie dieses Element löschen möchten?" } },
|
||||
"delete_btn": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Löschen" } },
|
||||
"delete_title": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Löschen bestätigen" } },
|
||||
"deleted": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Erfolgreich gelöscht" } },
|
||||
"edit": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Bearbeiten" } },
|
||||
"edit_title": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Element bearbeiten" } },
|
||||
"create": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Erstellen" } },
|
||||
"create_btn": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Erstellen" } },
|
||||
"create_title": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Neu erstellen" } },
|
||||
"create_first": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Erstellen Sie Ihr erstes Element, um zu beginnen" } },
|
||||
"search": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Suchen" } },
|
||||
"search_placeholder": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Suchen..." } },
|
||||
"filter": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Filter" } },
|
||||
"no_results": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Keine Ergebnisse gefunden" } },
|
||||
"no_results_hint": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Versuchen Sie, Ihre Such- oder Filterkriterien anzupassen" } },
|
||||
"no_items": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Keine Elemente verfügbar" } },
|
||||
"actions": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Aktionen" } },
|
||||
"status": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Status" } },
|
||||
"active": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Aktiv" } },
|
||||
"inactive": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Inaktiv" } },
|
||||
"activate": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Aktivieren" } },
|
||||
"deactivate": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Deaktivieren" } },
|
||||
"name": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Name" } },
|
||||
"name_placeholder": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Namen eingeben" } },
|
||||
"description": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Beschreibung" } },
|
||||
"desc_placeholder": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Beschreibung eingeben" } },
|
||||
"details": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Details" } },
|
||||
"email": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "E-Mail" } },
|
||||
"id": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "ID" } },
|
||||
"type": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Typ" } },
|
||||
"type_corporate": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Unternehmen" } },
|
||||
"view": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Ansehen" } },
|
||||
"updated": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Erfolgreich aktualisiert" } },
|
||||
"save_error": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Speichern fehlgeschlagen" } },
|
||||
"invalid_json": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Ungültiges JSON-Format" } },
|
||||
"prev": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Vorherige" } },
|
||||
"next": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Nächste" } },
|
||||
"none": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Keine" } },
|
||||
"reset": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Zurücksetzen" } },
|
||||
"confirm": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Bestätigen" } },
|
||||
"close": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Schließen" } },
|
||||
"back": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Zurück" } },
|
||||
"continue": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Fortfahren" } },
|
||||
"exit": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Beenden" } },
|
||||
"all": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Alle" } },
|
||||
"select_all": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Alle auswählen" } },
|
||||
"deselect_all": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Alle abwählen" } },
|
||||
"expires": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Läuft ab" } },
|
||||
"created": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Erstellt" } },
|
||||
"start_date": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Startdatum" } },
|
||||
"end_date": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Enddatum" } },
|
||||
"points": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Punkte" } },
|
||||
"level": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Stufe" } },
|
||||
"user": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Benutzer" } },
|
||||
"user_id": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Benutzer-ID" } },
|
||||
"services": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Dienstleistungen" } },
|
||||
"discoveries": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Entdeckungen" } },
|
||||
"restriction": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Einschränkung" } },
|
||||
"restriction_mild": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Mild" } },
|
||||
"restriction_moderate": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Moderat" } },
|
||||
"restriction_severe": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Schwer" } },
|
||||
"min_xp": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Min. XP" } },
|
||||
"xp": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "XP" } },
|
||||
"penalty": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Strafe" } },
|
||||
"feature_flags": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Funktionsschalter" } },
|
||||
"permission": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Berechtigung" } },
|
||||
"role": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Rolle" } },
|
||||
"domain": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Domäne" } },
|
||||
"action": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Aktion" } },
|
||||
"value": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Wert" } },
|
||||
"key": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Schlüssel" } },
|
||||
"enabled": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Aktiviert" } },
|
||||
"disabled": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Deaktiviert" } },
|
||||
"yes": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Ja" } },
|
||||
"no": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Nein" } },
|
||||
"on": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Ein" } },
|
||||
"off": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Aus" } }
|
||||
}
|
||||
};
|
||||
export {
|
||||
resource as default
|
||||
};
|
||||
//# sourceMappingURL=de-Cm6LRCyJ.js.map
|
||||
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"de-Cm6LRCyJ.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
||||
@@ -1 +0,0 @@
|
||||
{"file":"de-Cm6LRCyJ.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
|
||||
@@ -1,467 +0,0 @@
|
||||
import { _ as __nuxt_component_0 } from "./nuxt-link-1NBbHb-h.js";
|
||||
import { defineComponent, ref, computed, mergeProps, useSSRContext, withCtx, createVNode, toDisplayString, unref, openBlock, createBlock, createTextVNode } from "vue";
|
||||
import { ssrRenderAttrs, ssrInterpolate, ssrRenderClass, ssrRenderList, ssrRenderComponent, ssrRenderAttr, ssrRenderStyle, ssrRenderSlot } from "vue/server-renderer";
|
||||
import "/app/node_modules/klona/dist/index.mjs";
|
||||
import "/app/node_modules/hookable/dist/index.mjs";
|
||||
import { a as useI18n, b as useRouter, c as useAuthStore } from "../server.mjs";
|
||||
import { publicAssetsURL } from "#internal/nuxt/paths";
|
||||
import { useRoute } from "vue-router";
|
||||
import { u as useRegionStore } from "./region-0mvXqaMM.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 "/app/node_modules/unctx/dist/index.mjs";
|
||||
import "/app/node_modules/h3/dist/index.mjs";
|
||||
import "pinia";
|
||||
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: "LanguageSwitcher",
|
||||
__ssrInlineRender: true,
|
||||
setup(__props) {
|
||||
const { locale, locales } = useI18n();
|
||||
const dropdownOpen = ref(false);
|
||||
const dropdownRef = ref(null);
|
||||
const availableLocales = computed(() => locales.value);
|
||||
const currentLocale = computed(() => locale.value);
|
||||
const flagMap = {
|
||||
hu: "🇭🇺",
|
||||
en: "🇬🇧"
|
||||
};
|
||||
const labelMap = {
|
||||
hu: "Magyar",
|
||||
en: "English"
|
||||
};
|
||||
function flagFor(code) {
|
||||
return flagMap[code] || "🌐";
|
||||
}
|
||||
function labelFor(code) {
|
||||
return labelMap[code] || code.toUpperCase();
|
||||
}
|
||||
return (_ctx, _push, _parent, _attrs) => {
|
||||
_push(`<div${ssrRenderAttrs(mergeProps({
|
||||
class: "relative",
|
||||
ref_key: "dropdownRef",
|
||||
ref: dropdownRef
|
||||
}, _attrs))}><button class="flex items-center gap-2 px-3 py-1.5 text-xs font-medium rounded-lg transition bg-slate-700/50 hover:bg-slate-700 text-slate-300 hover:text-white border border-slate-600/50"><span class="text-base leading-none">${ssrInterpolate(flagFor(currentLocale.value))}</span><span class="hidden sm:inline">${ssrInterpolate(labelFor(currentLocale.value))}</span><svg class="${ssrRenderClass([{ "rotate-180": dropdownOpen.value }, "w-3.5 h-3.5 text-slate-400 transition-transform duration-200"])}" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path></svg></button>`);
|
||||
if (dropdownOpen.value) {
|
||||
_push(`<div class="absolute right-0 mt-2 w-44 bg-slate-800 border border-slate-700 rounded-xl shadow-xl py-1 z-50"><!--[-->`);
|
||||
ssrRenderList(availableLocales.value, (loc) => {
|
||||
_push(`<button class="${ssrRenderClass([
|
||||
loc.code === currentLocale.value ? "bg-indigo-600/20 text-indigo-300" : "text-slate-300 hover:bg-slate-700 hover:text-white",
|
||||
"flex items-center gap-3 w-full px-4 py-2.5 text-sm transition"
|
||||
])}"><span class="text-lg leading-none">${ssrInterpolate(flagFor(loc.code))}</span><span>${ssrInterpolate(loc.name)}</span>`);
|
||||
if (loc.code === currentLocale.value) {
|
||||
_push(`<span class="ml-auto text-indigo-400"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"></path></svg></span>`);
|
||||
} else {
|
||||
_push(`<!---->`);
|
||||
}
|
||||
_push(`</button>`);
|
||||
});
|
||||
_push(`<!--]--></div>`);
|
||||
} else {
|
||||
_push(`<!---->`);
|
||||
}
|
||||
_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/LanguageSwitcher.vue");
|
||||
return _sfc_setup$1 ? _sfc_setup$1(props, ctx) : void 0;
|
||||
};
|
||||
const _imports_0 = publicAssetsURL("/logo.svg");
|
||||
const _sfc_main = /* @__PURE__ */ defineComponent({
|
||||
__name: "default",
|
||||
__ssrInlineRender: true,
|
||||
setup(__props) {
|
||||
const route = useRoute();
|
||||
useRouter();
|
||||
const authStore = useAuthStore();
|
||||
useRegionStore();
|
||||
const sidebarOpen = ref(false);
|
||||
const sidebarCollapsed = ref(false);
|
||||
const dropdownOpen = ref(false);
|
||||
ref(null);
|
||||
const expandedGroups = ref(/* @__PURE__ */ new Set(["Központ"]));
|
||||
const userEmail = computed(() => authStore.userEmail || "Ismeretlen Felhasználó");
|
||||
const userInitials = computed(() => {
|
||||
const email = authStore.userEmail;
|
||||
if (!email) return "??";
|
||||
return email.split("@")[0].split(".").map((s) => s[0]).join("").toUpperCase().slice(0, 2);
|
||||
});
|
||||
const menuGroups = [
|
||||
{
|
||||
title: "Központ",
|
||||
items: [
|
||||
{
|
||||
path: "/",
|
||||
label: "Dashboard",
|
||||
icon: '<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6" /></svg>'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: "Szolgáltatók",
|
||||
items: [
|
||||
{
|
||||
label: "Szolgáltatók",
|
||||
icon: '<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4" /></svg>',
|
||||
children: [
|
||||
{
|
||||
path: "/providers",
|
||||
label: "Összes szolgáltató",
|
||||
icon: '<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16" /></svg>'
|
||||
},
|
||||
{
|
||||
path: "/providers/pending",
|
||||
label: "Jóváhagyásra váró",
|
||||
icon: '<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><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" /></svg>'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: "Felhasználók & Partnerek",
|
||||
items: [
|
||||
{
|
||||
label: "Garázsok",
|
||||
icon: '<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4" /></svg>',
|
||||
children: [
|
||||
{
|
||||
path: "/garages",
|
||||
label: "Garázsok listája",
|
||||
icon: '<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16" /></svg>'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
label: "Felhasználók",
|
||||
icon: '<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197m13.5-9a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0z" /></svg>',
|
||||
children: [
|
||||
{
|
||||
path: "/users",
|
||||
label: "Felhasználók listája",
|
||||
icon: '<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197m13.5-9a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0z" /></svg>'
|
||||
},
|
||||
{
|
||||
path: "/persons",
|
||||
label: "Személyek",
|
||||
icon: '<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z" /></svg>'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: "Pénzügyek",
|
||||
items: [
|
||||
{
|
||||
path: "/packages",
|
||||
label: "Csomagok",
|
||||
icon: '<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M20.25 7.5l-.625 10.632a2.25 2.25 0 01-2.247 2.118H6.622a2.25 2.25 0 01-2.247-2.118L3.75 7.5m8.25 3v6.75m0 0l-3-3m3 3l3-3M3.375 7.5h17.25c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125H3.375c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125z" /></svg>'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: "Gamification",
|
||||
items: [
|
||||
{
|
||||
label: "Játékmenet Beállítások",
|
||||
icon: '<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.066 2.573c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.573 1.066c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.066-2.573c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z" /><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" /></svg>',
|
||||
children: [
|
||||
{
|
||||
path: "/gamification/point-rules",
|
||||
label: "Pontszabályok",
|
||||
icon: '<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><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" /></svg>'
|
||||
},
|
||||
{
|
||||
path: "/gamification/levels",
|
||||
label: "Szintek",
|
||||
icon: '<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 7h8m0 0v8m0-8l-8 8-4-4-6 6" /></svg>'
|
||||
},
|
||||
{
|
||||
path: "/gamification/badges",
|
||||
label: "Kitüntetések",
|
||||
icon: '<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4M7.835 4.697a3.42 3.42 0 001.946-.806 3.42 3.42 0 014.438 0 3.42 3.42 0 001.946.806 3.42 3.42 0 013.138 3.138 3.42 3.42 0 00.806 1.946 3.42 3.42 0 010 4.438 3.42 3.42 0 00-.806 1.946 3.42 3.42 0 01-3.138 3.138 3.42 3.42 0 00-1.946.806 3.42 3.42 0 01-4.438 0 3.42 3.42 0 00-1.946-.806 3.42 3.42 0 01-3.138-3.138 3.42 3.42 0 00-.806-1.946 3.42 3.42 0 010-4.438 3.42 3.42 0 00.806-1.946 3.42 3.42 0 013.138-3.138z" /></svg>'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
label: "Események & Szezonok",
|
||||
icon: '<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z" /></svg>',
|
||||
children: [
|
||||
{
|
||||
path: "/gamification/seasons",
|
||||
label: "Szezonok",
|
||||
icon: '<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><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" /></svg>'
|
||||
},
|
||||
{
|
||||
path: "/gamification/competitions",
|
||||
label: "Versenyek",
|
||||
icon: '<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 3h2l.4 2M7 13h10l4-8H5.4M7 13L5.4 5M7 13l-2.293 2.293c-.63.63-.184 1.707.707 1.707H17m0 0a2 2 0 100 4 2 2 0 000-4zm-8 2a2 2 0 100 4 2 2 0 000-4z" /></svg>'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
label: "Felhasználói Adatok",
|
||||
icon: '<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0z" /></svg>',
|
||||
children: [
|
||||
{
|
||||
path: "/gamification/users",
|
||||
label: "Statisztikák",
|
||||
icon: '<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z" /></svg>'
|
||||
},
|
||||
{
|
||||
path: "/gamification/leaderboard",
|
||||
label: "Ranglista",
|
||||
icon: '<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z" /></svg>'
|
||||
},
|
||||
{
|
||||
path: "/gamification/ledger",
|
||||
label: "Pontnapló",
|
||||
icon: '<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-3 7h3m-3 4h3m-6-4h.01M9 16h.01" /></svg>'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: "/gamification",
|
||||
label: "Gamification HQ",
|
||||
icon: '<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11.049 2.927c.3-.921 1.603-.921 1.902 0l1.519 4.674a1 1 0 00.95.69h4.915c.969 0 1.371 1.24.588 1.81l-3.976 2.888a1 1 0 00-.363 1.118l1.518 4.674c.3.922-.755 1.688-1.538 1.118l-3.976-2.888a1 1 0 00-1.176 0l-3.976 2.888c-.783.57-1.838-.197-1.538-1.118l1.518-4.674a1 1 0 00-.363-1.118l-3.976-2.888c-.784-.57-.38-1.81.588-1.81h4.914a1 1 0 00.951-.69l1.519-4.674z" /></svg>'
|
||||
},
|
||||
{
|
||||
path: "/gamification/config",
|
||||
label: "Rendszer Konfig",
|
||||
icon: '<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.066 2.573c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.573 1.066c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.066-2.573c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z" /><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" /></svg>'
|
||||
},
|
||||
{
|
||||
path: "/gamification/parameters",
|
||||
label: "Rendszerparaméterek",
|
||||
icon: '<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6V4m0 2a2 2 0 100 4m0-4a2 2 0 110 4m-6 8a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4m6 6v10m6-2a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4" /></svg>'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
title: "Rendszer",
|
||||
items: [
|
||||
{
|
||||
path: "/permissions",
|
||||
label: "Jogosultságok",
|
||||
icon: '<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z" /></svg>'
|
||||
},
|
||||
{
|
||||
label: "Rendszernaplók",
|
||||
icon: '<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" /></svg>',
|
||||
children: [
|
||||
{
|
||||
path: "/",
|
||||
/* P0 HOTFIX: placeholder until /logs page is built */
|
||||
label: "Rendszernaplók",
|
||||
icon: '<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" /></svg>'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
const pageTitle = computed(() => {
|
||||
if (route.path === "/") return "Dashboard";
|
||||
if (route.path.startsWith("/permissions")) return "Jogosultság Kezelés";
|
||||
if (route.path.startsWith("/garages")) return "Garázsok";
|
||||
if (route.path.startsWith("/persons")) return "Személyek";
|
||||
if (route.path.startsWith("/users")) return "Felhasználók";
|
||||
if (route.path.startsWith("/logs")) return "Rendszernaplók";
|
||||
if (route.path.startsWith("/packages")) return "Csomagok";
|
||||
if (route.path.startsWith("/providers")) {
|
||||
if (route.path === "/providers/pending") return "Jóváhagyásra váró szolgáltatók";
|
||||
if (route.path.startsWith("/providers/")) return "Szolgáltató részletek";
|
||||
return "Szolgáltatók";
|
||||
}
|
||||
if (route.path.startsWith("/gamification")) {
|
||||
if (route.path === "/gamification") return "Gamification HQ";
|
||||
if (route.path === "/gamification/point-rules") return "Pontszabályok";
|
||||
if (route.path === "/gamification/levels") return "Szintek";
|
||||
if (route.path === "/gamification/badges") return "Kitüntetések";
|
||||
if (route.path === "/gamification/seasons") return "Szezonok";
|
||||
if (route.path === "/gamification/competitions") return "Versenyek";
|
||||
if (route.path === "/gamification/users") return "Gamification Felhasználók";
|
||||
if (route.path.startsWith("/gamification/users/")) return "Felhasználó Gamification";
|
||||
if (route.path === "/gamification/leaderboard") return "Ranglista";
|
||||
if (route.path === "/gamification/config") return "Rendszer Konfig";
|
||||
if (route.path === "/gamification/parameters") return "Rendszerparaméterek";
|
||||
if (route.path === "/gamification/ledger") return "Pontnapló";
|
||||
return "Gamification";
|
||||
}
|
||||
return "Admin Panel";
|
||||
});
|
||||
function isActive(path) {
|
||||
if (path === "/") return route.path === "/";
|
||||
return route.path.startsWith(path);
|
||||
}
|
||||
function isGroupActive(item) {
|
||||
if (!item.children) return false;
|
||||
return item.children.some((child) => isActive(child.path));
|
||||
}
|
||||
return (_ctx, _push, _parent, _attrs) => {
|
||||
const _component_NuxtLink = __nuxt_component_0;
|
||||
const _component_LanguageSwitcher = _sfc_main$1;
|
||||
_push(`<div${ssrRenderAttrs(mergeProps({ class: "min-h-screen bg-slate-900 text-white flex" }, _attrs))}>`);
|
||||
if (sidebarOpen.value) {
|
||||
_push(`<div class="fixed inset-0 bg-black/50 z-20 lg:hidden"></div>`);
|
||||
} else {
|
||||
_push(`<!---->`);
|
||||
}
|
||||
_push(`<aside class="${ssrRenderClass([
|
||||
"fixed lg:static inset-y-0 left-0 z-30 flex flex-col bg-slate-800 border-r border-slate-700 transition-all duration-300 ease-in-out overflow-hidden",
|
||||
sidebarOpen.value || !sidebarCollapsed.value ? "w-52" : "w-20"
|
||||
])}">`);
|
||||
_push(ssrRenderComponent(_component_NuxtLink, {
|
||||
to: "/",
|
||||
class: "flex items-center h-16 px-4 border-b border-slate-700 overflow-hidden hover:bg-slate-700/50 transition"
|
||||
}, {
|
||||
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
||||
if (_push2) {
|
||||
_push2(`<div class="flex items-center gap-3 min-w-0"${_scopeId}><img${ssrRenderAttr("src", _imports_0)} class="h-8 w-auto flex-shrink-0" alt="SF Logo"${_scopeId}><div class="${ssrRenderClass([sidebarOpen.value || !sidebarCollapsed.value ? "opacity-100 max-w-[200px]" : "opacity-0 max-w-0", "transition-all duration-300 ease-in-out overflow-hidden whitespace-nowrap"])}"${_scopeId}><div class="text-sm font-bold text-white leading-tight"${_scopeId}>Service Finder</div><div class="text-[10px] font-semibold uppercase tracking-wider text-indigo-400 leading-tight"${_scopeId}>Admin</div></div></div>`);
|
||||
} else {
|
||||
return [
|
||||
createVNode("div", { class: "flex items-center gap-3 min-w-0" }, [
|
||||
createVNode("img", {
|
||||
src: _imports_0,
|
||||
class: "h-8 w-auto flex-shrink-0",
|
||||
alt: "SF Logo"
|
||||
}),
|
||||
createVNode("div", {
|
||||
class: ["transition-all duration-300 ease-in-out overflow-hidden whitespace-nowrap", sidebarOpen.value || !sidebarCollapsed.value ? "opacity-100 max-w-[200px]" : "opacity-0 max-w-0"]
|
||||
}, [
|
||||
createVNode("div", { class: "text-sm font-bold text-white leading-tight" }, "Service Finder"),
|
||||
createVNode("div", { class: "text-[10px] font-semibold uppercase tracking-wider text-indigo-400 leading-tight" }, "Admin")
|
||||
], 2)
|
||||
])
|
||||
];
|
||||
}
|
||||
}),
|
||||
_: 1
|
||||
}, _parent));
|
||||
_push(`<button class="hidden lg:flex items-center justify-center h-10 mx-2 mt-2 rounded-lg text-slate-400 hover:text-white hover:bg-slate-700 transition flex-shrink-0"><svg class="${ssrRenderClass([{ "rotate-180": sidebarCollapsed.value }, "w-5 h-5 transition-transform duration-300"])}" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 19l-7-7 7-7m8 14l-7-7 7-7"></path></svg></button><nav class="flex-1 px-2 py-4 space-y-2 overflow-y-auto overflow-x-hidden"><!--[-->`);
|
||||
ssrRenderList(menuGroups, (group) => {
|
||||
_push(`<!--[--><div class="px-3 py-1 text-xs font-semibold uppercase tracking-wider text-slate-500 whitespace-nowrap overflow-hidden" style="${ssrRenderStyle(sidebarOpen.value || !sidebarCollapsed.value ? null : { display: "none" })}">${ssrInterpolate(group.title)}</div><!--[-->`);
|
||||
ssrRenderList(group.items, (item) => {
|
||||
_push(`<!--[-->`);
|
||||
if (item.children) {
|
||||
_push(`<div><button class="${ssrRenderClass([isGroupActive(item) ? "bg-indigo-600/20 text-indigo-300" : "text-slate-300 hover:bg-slate-700 hover:text-white", "flex items-center w-full gap-3 px-3 py-2.5 rounded-lg text-sm font-medium transition"])}"><span class="flex-shrink-0 w-5 h-5">${item.icon ?? ""}</span><span class="${ssrRenderClass([sidebarOpen.value || !sidebarCollapsed.value ? "opacity-100 max-w-[200px]" : "opacity-0 max-w-0", "flex-1 text-left whitespace-nowrap overflow-hidden transition-all duration-300 ease-in-out"])}">${ssrInterpolate(item.label)}</span><svg class="${ssrRenderClass([{
|
||||
"rotate-90": expandedGroups.value.has(item.label),
|
||||
"opacity-100": sidebarOpen.value || !sidebarCollapsed.value,
|
||||
"opacity-0": sidebarCollapsed.value && !sidebarOpen.value
|
||||
}, "w-4 h-4 transition-all duration-300 ease-in-out flex-shrink-0"])}" 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></button><div class="ml-2 mt-1 space-y-1 overflow-hidden transition-all duration-200" style="${ssrRenderStyle(expandedGroups.value.has(item.label) && (sidebarOpen.value || !sidebarCollapsed.value) ? null : { display: "none" })}"><!--[-->`);
|
||||
ssrRenderList(item.children, (child) => {
|
||||
_push(ssrRenderComponent(_component_NuxtLink, {
|
||||
key: child.path,
|
||||
to: child.path,
|
||||
class: ["flex items-center gap-3 px-3 py-2 rounded-lg text-sm font-medium transition", isActive(child.path) ? "bg-indigo-600 text-white" : "text-slate-400 hover:bg-slate-700 hover:text-white"],
|
||||
onClick: ($event) => sidebarOpen.value = false
|
||||
}, {
|
||||
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
||||
if (_push2) {
|
||||
_push2(`<span class="flex-shrink-0 w-4 h-4"${_scopeId}>${child.icon ?? ""}</span><span class="whitespace-nowrap overflow-hidden"${_scopeId}>${ssrInterpolate(child.label)}</span>`);
|
||||
} else {
|
||||
return [
|
||||
createVNode("span", {
|
||||
class: "flex-shrink-0 w-4 h-4",
|
||||
innerHTML: child.icon
|
||||
}, null, 8, ["innerHTML"]),
|
||||
createVNode("span", { class: "whitespace-nowrap overflow-hidden" }, toDisplayString(child.label), 1)
|
||||
];
|
||||
}
|
||||
}),
|
||||
_: 2
|
||||
}, _parent));
|
||||
});
|
||||
_push(`<!--]--></div></div>`);
|
||||
} else {
|
||||
_push(ssrRenderComponent(_component_NuxtLink, {
|
||||
to: item.path,
|
||||
class: ["flex items-center gap-3 px-3 py-2.5 rounded-lg text-sm font-medium transition", isActive(item.path) ? "bg-indigo-600 text-white" : "text-slate-300 hover:bg-slate-700 hover:text-white"],
|
||||
onClick: ($event) => sidebarOpen.value = false
|
||||
}, {
|
||||
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
||||
if (_push2) {
|
||||
_push2(`<span class="flex-shrink-0 w-5 h-5"${_scopeId}>${item.icon ?? ""}</span><span class="${ssrRenderClass([sidebarOpen.value || !sidebarCollapsed.value ? "opacity-100 max-w-[200px]" : "opacity-0 max-w-0", "whitespace-nowrap overflow-hidden transition-all duration-300 ease-in-out"])}"${_scopeId}>${ssrInterpolate(item.label)}</span>`);
|
||||
} else {
|
||||
return [
|
||||
createVNode("span", {
|
||||
class: "flex-shrink-0 w-5 h-5",
|
||||
innerHTML: item.icon
|
||||
}, null, 8, ["innerHTML"]),
|
||||
createVNode("span", {
|
||||
class: ["whitespace-nowrap overflow-hidden transition-all duration-300 ease-in-out", sidebarOpen.value || !sidebarCollapsed.value ? "opacity-100 max-w-[200px]" : "opacity-0 max-w-0"]
|
||||
}, toDisplayString(item.label), 3)
|
||||
];
|
||||
}
|
||||
}),
|
||||
_: 2
|
||||
}, _parent));
|
||||
}
|
||||
_push(`<!--]-->`);
|
||||
});
|
||||
_push(`<!--]--><!--]-->`);
|
||||
});
|
||||
_push(`<!--]--></nav><div class="p-4 border-t border-slate-700 overflow-hidden"><div class="${ssrRenderClass([sidebarOpen.value || !sidebarCollapsed.value ? "opacity-100 max-w-[200px]" : "opacity-0 max-w-0", "text-xs text-slate-500 whitespace-nowrap transition-all duration-300 ease-in-out"])}"> ServiceFinder v2.0 </div></div></aside><div class="flex-1 flex flex-col min-w-0 transition-all duration-300 ease-in-out"><header class="sticky top-0 z-10 bg-slate-800/95 backdrop-blur-sm border-b border-slate-700"><div class="flex items-center justify-between h-16 px-4 lg:px-6"><div class="flex items-center gap-3"><button class="lg:hidden p-2 rounded-lg text-slate-400 hover:text-white hover:bg-slate-700 transition"><svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16"></path></svg></button><h1 class="text-lg font-semibold text-white truncate">${ssrInterpolate(pageTitle.value)}</h1></div><div class="flex items-center gap-3">`);
|
||||
_push(ssrRenderComponent(_component_LanguageSwitcher, null, null, _parent));
|
||||
_push(`<div class="relative"><button class="flex items-center gap-2 p-1.5 rounded-lg hover:bg-slate-700 transition"><div class="w-8 h-8 rounded-full bg-indigo-600 flex items-center justify-center text-sm font-bold text-white">${ssrInterpolate(userInitials.value)}</div><span class="hidden sm:block text-sm text-slate-300">${ssrInterpolate(userEmail.value)}</span><svg class="w-4 h-4 text-slate-400" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path></svg></button>`);
|
||||
if (dropdownOpen.value) {
|
||||
_push(`<div class="absolute right-0 mt-2 w-56 bg-slate-800 border border-slate-700 rounded-xl shadow-xl py-1 z-50"><div class="px-4 py-3 border-b border-slate-700"><p class="text-sm font-medium text-white">${ssrInterpolate(userEmail.value)}</p><p class="text-xs text-slate-400 mt-0.5">${ssrInterpolate(unref(authStore).userRole === "SUPERADMIN" ? "Super Administrator" : unref(authStore).userRole || "Administrator")}</p></div>`);
|
||||
_push(ssrRenderComponent(_component_NuxtLink, {
|
||||
to: "/profile",
|
||||
class: "flex items-center gap-3 px-4 py-2.5 text-sm text-slate-300 hover:bg-slate-700 hover:text-white transition",
|
||||
onClick: ($event) => dropdownOpen.value = false
|
||||
}, {
|
||||
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
||||
if (_push2) {
|
||||
_push2(`<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"${_scopeId}><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"${_scopeId}></path></svg> Profile Settings `);
|
||||
} 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: "M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"
|
||||
})
|
||||
])),
|
||||
createTextVNode(" Profile Settings ")
|
||||
];
|
||||
}
|
||||
}),
|
||||
_: 1
|
||||
}, _parent));
|
||||
_push(`<button class="flex items-center gap-3 w-full px-4 py-2.5 text-sm text-red-400 hover:bg-slate-700 hover:text-red-300 transition"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1"></path></svg> Sign Out </button></div>`);
|
||||
} else {
|
||||
_push(`<!---->`);
|
||||
}
|
||||
_push(`</div></div></div></header><main class="flex-1 p-4 lg:p-6 overflow-auto">`);
|
||||
ssrRenderSlot(_ctx.$slots, "default", {}, null, _push, _parent);
|
||||
_push(`</main></div></div>`);
|
||||
};
|
||||
}
|
||||
});
|
||||
const _sfc_setup = _sfc_main.setup;
|
||||
_sfc_main.setup = (props, ctx) => {
|
||||
const ssrContext = useSSRContext();
|
||||
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("layouts/default.vue");
|
||||
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
|
||||
};
|
||||
export {
|
||||
_sfc_main as default
|
||||
};
|
||||
//# sourceMappingURL=default-BU4PyScw.js.map
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,503 +0,0 @@
|
||||
import { defineComponent, useSSRContext, ref, computed, watch, mergeProps, reactive, createVNode, resolveDynamicComponent } from "vue";
|
||||
import { ssrRenderAttrs, ssrRenderClass, ssrIncludeBooleanAttr, ssrInterpolate, ssrRenderList, ssrRenderComponent, ssrRenderAttr, ssrRenderVNode, ssrLooseContain } from "vue/server-renderer";
|
||||
import "/app/node_modules/klona/dist/index.mjs";
|
||||
import "/app/node_modules/hookable/dist/index.mjs";
|
||||
import "../server.mjs";
|
||||
import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.js";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
import "/app/node_modules/ofetch/dist/node.mjs";
|
||||
import "#internal/nuxt/paths";
|
||||
import "/app/node_modules/unctx/dist/index.mjs";
|
||||
import "/app/node_modules/h3/dist/index.mjs";
|
||||
import "pinia";
|
||||
import "/app/node_modules/defu/dist/defu.mjs";
|
||||
import "/app/node_modules/ufo/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$3 = /* @__PURE__ */ defineComponent({
|
||||
__name: "TreeNode",
|
||||
__ssrInlineRender: true,
|
||||
props: {
|
||||
node: {},
|
||||
selectedIds: {},
|
||||
expandedIds: {}
|
||||
},
|
||||
emits: ["toggle", "toggle-expand"],
|
||||
setup(__props) {
|
||||
return (_ctx, _push, _parent, _attrs) => {
|
||||
const _component_TreeNode = _sfc_main$3;
|
||||
_push(`<div${ssrRenderAttrs(_attrs)}><div class="flex items-center gap-2 py-1"><button class="text-slate-500 hover:text-slate-300 transition w-4 h-4 flex items-center justify-center"><svg class="${ssrRenderClass([__props.expandedIds.has(__props.node.id) ? "rotate-90" : "", "w-3 h-3 transition-transform"])}" 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></button><label class="flex items-center gap-2 cursor-pointer flex-1"><input type="checkbox"${ssrIncludeBooleanAttr(__props.selectedIds.includes(__props.node.id)) ? " checked" : ""} class="w-4 h-4 rounded border-slate-500 bg-slate-700 text-indigo-500 focus:ring-indigo-500/50"><span class="text-sm text-slate-300">${ssrInterpolate(__props.node.name_hu || __props.node.name_en || __props.node.key)}</span><span class="text-xs text-slate-500">(Szint ${ssrInterpolate(__props.node.level)})</span></label></div>`);
|
||||
if (__props.expandedIds.has(__props.node.id) && __props.node.children?.length) {
|
||||
_push(`<div class="ml-6 border-l border-slate-700 pl-3"><!--[-->`);
|
||||
ssrRenderList(__props.node.children, (child) => {
|
||||
_push(`<div>`);
|
||||
_push(ssrRenderComponent(_component_TreeNode, {
|
||||
node: child,
|
||||
"selected-ids": __props.selectedIds,
|
||||
"expanded-ids": __props.expandedIds,
|
||||
onToggle: (id) => _ctx.$emit("toggle", id),
|
||||
onToggleExpand: (id) => _ctx.$emit("toggle-expand", id)
|
||||
}, null, _parent));
|
||||
_push(`</div>`);
|
||||
});
|
||||
_push(`<!--]--></div>`);
|
||||
} else {
|
||||
_push(`<!---->`);
|
||||
}
|
||||
_push(`</div>`);
|
||||
};
|
||||
}
|
||||
});
|
||||
const _sfc_setup$3 = _sfc_main$3.setup;
|
||||
_sfc_main$3.setup = (props, ctx) => {
|
||||
const ssrContext = useSSRContext();
|
||||
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/TreeNode.vue");
|
||||
return _sfc_setup$3 ? _sfc_setup$3(props, ctx) : void 0;
|
||||
};
|
||||
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
||||
__name: "SmartLocationInput",
|
||||
__ssrInlineRender: true,
|
||||
props: {
|
||||
modelValue: { default: null },
|
||||
label: { default: "" },
|
||||
placeholder: { default: "Kezdj el gépelni (irányítószám vagy város)..." },
|
||||
minChars: { default: 2 },
|
||||
countryCode: { default: "HU" },
|
||||
debounceMs: { default: 300 }
|
||||
},
|
||||
emits: ["update:modelValue", "select"],
|
||||
setup(__props, { emit: __emit }) {
|
||||
const props = __props;
|
||||
ref(null);
|
||||
const query = ref("");
|
||||
const selectedItem = ref(props.modelValue);
|
||||
const items = ref([]);
|
||||
const searching = ref(false);
|
||||
const showDropdown = ref(false);
|
||||
const highlightedIndex = ref(0);
|
||||
const displayText = computed(() => {
|
||||
if (selectedItem.value) {
|
||||
return `${selectedItem.value.zip_code} ${selectedItem.value.city}`;
|
||||
}
|
||||
return query.value;
|
||||
});
|
||||
const filteredItems = computed(() => {
|
||||
if (!query.value || query.value.length < props.minChars) return [];
|
||||
const q = query.value.toLowerCase();
|
||||
return items.value.filter(
|
||||
(item) => item.zip_code.toLowerCase().includes(q) || item.city.toLowerCase().includes(q)
|
||||
);
|
||||
});
|
||||
watch(
|
||||
() => props.modelValue,
|
||||
(val) => {
|
||||
selectedItem.value = val;
|
||||
}
|
||||
);
|
||||
return (_ctx, _push, _parent, _attrs) => {
|
||||
_push(`<div${ssrRenderAttrs(mergeProps({ class: "relative" }, _attrs))} data-v-b43e13ca>`);
|
||||
if (__props.label) {
|
||||
_push(`<label class="block text-sm font-medium text-slate-300 mb-1" data-v-b43e13ca>${ssrInterpolate(__props.label)}</label>`);
|
||||
} else {
|
||||
_push(`<!---->`);
|
||||
}
|
||||
_push(`<div class="relative" data-v-b43e13ca><input${ssrRenderAttr("value", displayText.value)}${ssrRenderAttr("placeholder", __props.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" data-v-b43e13ca>`);
|
||||
if (searching.value) {
|
||||
_push(`<svg class="absolute right-3 top-1/2 -translate-y-1/2 w-4 h-4 animate-spin text-slate-400" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-b43e13ca><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-b43e13ca></path></svg>`);
|
||||
} else {
|
||||
_push(`<!---->`);
|
||||
}
|
||||
if (selectedItem.value && !searching.value) {
|
||||
_push(`<button class="absolute right-3 top-1/2 -translate-y-1/2 text-slate-500 hover:text-white transition" type="button" data-v-b43e13ca><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-b43e13ca><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" data-v-b43e13ca></path></svg></button>`);
|
||||
} else {
|
||||
_push(`<!---->`);
|
||||
}
|
||||
_push(`</div>`);
|
||||
if (showDropdown.value && filteredItems.value.length > 0) {
|
||||
_push(`<div class="absolute z-50 mt-1 w-full bg-slate-800 border border-slate-600 rounded-lg shadow-xl max-h-60 overflow-y-auto" data-v-b43e13ca><!--[-->`);
|
||||
ssrRenderList(filteredItems.value, (item, index) => {
|
||||
_push(`<button class="${ssrRenderClass([index === highlightedIndex.value ? "bg-indigo-500/20 text-white" : "text-slate-300 hover:bg-slate-700", "w-full text-left px-3 py-2 text-sm transition flex items-center gap-2"])}" data-v-b43e13ca><span class="font-mono text-indigo-400" data-v-b43e13ca>${ssrInterpolate(item.zip_code)}</span><span data-v-b43e13ca>${ssrInterpolate(item.city)}</span><span class="text-xs text-slate-500 ml-auto" data-v-b43e13ca>${ssrInterpolate(item.country_code)}</span></button>`);
|
||||
});
|
||||
_push(`<!--]--></div>`);
|
||||
} else {
|
||||
_push(`<!---->`);
|
||||
}
|
||||
if (showDropdown.value && query.value.length >= __props.minChars && filteredItems.value.length === 0 && !searching.value) {
|
||||
_push(`<div class="absolute z-50 mt-1 w-full bg-slate-800 border border-slate-600 rounded-lg shadow-xl p-3 text-sm text-slate-400" data-v-b43e13ca> Nincs találat </div>`);
|
||||
} else {
|
||||
_push(`<!---->`);
|
||||
}
|
||||
_push(`</div>`);
|
||||
};
|
||||
}
|
||||
});
|
||||
const _sfc_setup$2 = _sfc_main$2.setup;
|
||||
_sfc_main$2.setup = (props, ctx) => {
|
||||
const ssrContext = useSSRContext();
|
||||
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/SmartLocationInput.vue");
|
||||
return _sfc_setup$2 ? _sfc_setup$2(props, ctx) : void 0;
|
||||
};
|
||||
const __nuxt_component_0 = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-b43e13ca"]]);
|
||||
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
||||
__name: "SharedAddressForm",
|
||||
__ssrInlineRender: true,
|
||||
props: {
|
||||
modelValue: { default: () => ({
|
||||
zip: null,
|
||||
city: null,
|
||||
street_name: null,
|
||||
street_type: null,
|
||||
house_number: null,
|
||||
stairwell: null,
|
||||
floor: null,
|
||||
door: null,
|
||||
parcel_id: null,
|
||||
full_address_text: null,
|
||||
latitude: null,
|
||||
longitude: null
|
||||
}) }
|
||||
},
|
||||
emits: ["update:modelValue"],
|
||||
setup(__props, { emit: __emit }) {
|
||||
const props = __props;
|
||||
const emit = __emit;
|
||||
const selectedLocation = computed(() => {
|
||||
if (props.modelValue?.zip && props.modelValue?.city) {
|
||||
return {
|
||||
id: 0,
|
||||
// We don't have the DB id here, but SmartLocationInput handles this
|
||||
zip_code: props.modelValue.zip,
|
||||
city: props.modelValue.city,
|
||||
country_code: "HU"
|
||||
};
|
||||
}
|
||||
return null;
|
||||
});
|
||||
function onLocationSelected(location) {
|
||||
const updated = { ...props.modelValue };
|
||||
if (location) {
|
||||
updated.zip = location.zip_code;
|
||||
updated.city = location.city;
|
||||
} else {
|
||||
updated.zip = null;
|
||||
updated.city = null;
|
||||
}
|
||||
emit("update:modelValue", updated);
|
||||
}
|
||||
return (_ctx, _push, _parent, _attrs) => {
|
||||
const _component_SmartLocationInput = __nuxt_component_0;
|
||||
_push(`<div${ssrRenderAttrs(_attrs)}><div class="bg-slate-800 rounded-xl border border-slate-700 p-6 mb-6"><h2 class="text-lg font-semibold text-white mb-4">Cím adatok</h2><div class="grid grid-cols-1 md:grid-cols-2 gap-4"><div class="md:col-span-2">`);
|
||||
_push(ssrRenderComponent(_component_SmartLocationInput, {
|
||||
"model-value": selectedLocation.value,
|
||||
"onUpdate:modelValue": onLocationSelected,
|
||||
label: "Irányítószám / Város",
|
||||
placeholder: "Kezdj el gépelni (pl. 1011 vagy Budapest)..."
|
||||
}, null, _parent));
|
||||
_push(`</div><div><label class="block text-sm font-medium text-slate-300 mb-1">Utca neve</label><input${ssrRenderAttr("value", __props.modelValue.street_name)} placeholder="pl. Egressy" 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"></div><div><label class="block text-sm font-medium text-slate-300 mb-1">Közterület jellege</label><select${ssrRenderAttr("value", __props.modelValue.street_type)} 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"><option value="">Válassz...</option><option value="utca">utca</option><option value="út">út</option><option value="tér">tér</option><option value="körút">körút</option><option value="sugárút">sugárút</option><option value="köz">köz</option><option value="sétány">sétány</option><option value="lakópark">lakópark</option><option value="liget">liget</option><option value="erdő">erdő</option><option value="dűlő">dűlő</option><option value="major">major</option><option value="puszta">puszta</option><option value="sziget">sziget</option><option value="telep">telep</option></select></div><div><label class="block text-sm font-medium text-slate-300 mb-1">Házszám</label><input${ssrRenderAttr("value", __props.modelValue.house_number)} placeholder="pl. 4/b" 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"></div><div><label class="block text-sm font-medium text-slate-300 mb-1">Lépcsőház</label><input${ssrRenderAttr("value", __props.modelValue.stairwell)} placeholder="pl. 1" 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"></div><div><label class="block text-sm font-medium text-slate-300 mb-1">Emelet</label><input${ssrRenderAttr("value", __props.modelValue.floor)} placeholder="pl. 3" 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"></div><div><label class="block text-sm font-medium text-slate-300 mb-1">Ajtó</label><input${ssrRenderAttr("value", __props.modelValue.door)} placeholder="pl. A" 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"></div><div><label class="block text-sm font-medium text-slate-300 mb-1">Helyrajzi szám (hrsz)</label><input${ssrRenderAttr("value", __props.modelValue.parcel_id)} placeholder="pl. 12345/6" 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"></div></div></div></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/SharedAddressForm.vue");
|
||||
return _sfc_setup$1 ? _sfc_setup$1(props, ctx) : void 0;
|
||||
};
|
||||
const _sfc_main = /* @__PURE__ */ defineComponent({
|
||||
__name: "edit",
|
||||
__ssrInlineRender: true,
|
||||
setup(__props) {
|
||||
const VEHICLE_CLASSES = [
|
||||
{ key: "car", label: "Személyautó" },
|
||||
{ key: "motorcycle", label: "Motorkerékpár" },
|
||||
{ key: "truck", label: "Teherautó" },
|
||||
{ key: "hgv", label: "Nehézgépjármű (HGV)" },
|
||||
{ key: "light_commercial", label: "Kishaszonjármű" },
|
||||
{ key: "personal", label: "Személyes" },
|
||||
{ key: "boat", label: "Csónak/Vízi" },
|
||||
{ key: "other", label: "Egyéb" }
|
||||
];
|
||||
const route = useRoute();
|
||||
useRouter();
|
||||
computed(() => Number(route.params.id));
|
||||
const loading = ref(true);
|
||||
const error = ref(false);
|
||||
const provider = ref(null);
|
||||
const saveLoading = ref(false);
|
||||
const toast = ref(null);
|
||||
const activeTab = ref("basic");
|
||||
const tabs = [
|
||||
{ key: "basic", label: "Alapadatok & Kapcsolat", icon: "svg" },
|
||||
{ key: "matrix", label: "Szolgáltatások & Járművek", icon: "svg" },
|
||||
{ key: "location", label: "Helyszín & Lokáció", icon: "svg" },
|
||||
{ key: "hours", label: "Nyitvatartás", icon: "svg" }
|
||||
];
|
||||
const categoryTree = ref([]);
|
||||
const treeLoading = ref(false);
|
||||
const expandedNodes = ref(/* @__PURE__ */ new Set());
|
||||
const brandInput = ref("");
|
||||
const propulsionInput = ref("");
|
||||
const form = reactive({
|
||||
name: "",
|
||||
address: "",
|
||||
city: "",
|
||||
address_zip: "",
|
||||
address_street_name: "",
|
||||
address_street_type: "",
|
||||
address_house_number: "",
|
||||
plus_code: "",
|
||||
contact_phone: "",
|
||||
contact_email: "",
|
||||
website: "",
|
||||
category: "",
|
||||
category_ids: [],
|
||||
supported_vehicle_classes: [],
|
||||
specializations: {
|
||||
brands: [],
|
||||
propulsion: []
|
||||
},
|
||||
opening_hours: {},
|
||||
is_always_open: false,
|
||||
// Nested address object matching AddressIn schema (used by SharedAddressForm)
|
||||
address: {
|
||||
zip: "",
|
||||
city: "",
|
||||
street_name: "",
|
||||
street_type: "",
|
||||
house_number: "",
|
||||
stairwell: "",
|
||||
floor: "",
|
||||
door: "",
|
||||
parcel_id: "",
|
||||
full_address_text: "",
|
||||
latitude: null,
|
||||
longitude: null
|
||||
}
|
||||
});
|
||||
const hasChanges = computed(() => {
|
||||
if (!provider.value) return false;
|
||||
const p = provider.value;
|
||||
if (form.name !== (p.name || "")) return true;
|
||||
if (form.address !== (p.address || "")) return true;
|
||||
if (form.plus_code !== (p.plus_code || "")) return true;
|
||||
if (form.address.zip !== (p.address_zip || "")) return true;
|
||||
if (form.address.city !== (p.city || "")) return true;
|
||||
if (form.address.street_name !== (p.address_street_name || "")) return true;
|
||||
if (form.address.street_type !== (p.address_street_type || "")) return true;
|
||||
if (form.address.house_number !== (p.address_house_number || "")) return true;
|
||||
if (form.contact_phone !== (p.contact_phone || "")) return true;
|
||||
if (form.contact_email !== (p.contact_email || "")) return true;
|
||||
if (form.website !== (p.website || "")) return true;
|
||||
if (form.category !== (p.category || "")) return true;
|
||||
const sortedFormCategories = [...form.category_ids].sort();
|
||||
const sortedOrigCategories = [...p.category_ids || []].sort();
|
||||
if (JSON.stringify(sortedFormCategories) !== JSON.stringify(sortedOrigCategories)) return true;
|
||||
const sortedFormClasses = [...form.supported_vehicle_classes].sort();
|
||||
const sortedOrigClasses = [...p.supported_vehicle_classes || []].sort();
|
||||
if (JSON.stringify(sortedFormClasses) !== JSON.stringify(sortedOrigClasses)) return true;
|
||||
const normalizeSpec = (spec) => ({
|
||||
brands: Array.isArray(spec?.brands) ? [...spec.brands].sort() : [],
|
||||
propulsion: Array.isArray(spec?.propulsion) ? [...spec.propulsion].sort() : []
|
||||
});
|
||||
if (JSON.stringify(normalizeSpec(form.specializations)) !== JSON.stringify(normalizeSpec(p.specializations))) return true;
|
||||
const DAYS2 = ["monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday"];
|
||||
const normalizeHours = (hours) => {
|
||||
const result = {};
|
||||
const daysSource = hours?.days || hours;
|
||||
for (const day of DAYS2) {
|
||||
const slot = daysSource?.[day];
|
||||
if (slot && typeof slot === "object" && slot.open && slot.close) {
|
||||
result[day] = { open: slot.open, close: slot.close };
|
||||
} else {
|
||||
result[day] = null;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
};
|
||||
if (JSON.stringify(normalizeHours(form.opening_hours)) !== JSON.stringify(normalizeHours(p.opening_hours))) return true;
|
||||
if (form.is_always_open !== (p.opening_hours?.always_open === true)) return true;
|
||||
return false;
|
||||
});
|
||||
function findCategoryById(id, nodes) {
|
||||
for (const node of nodes) {
|
||||
if (node.id === id) return node;
|
||||
if (node.children?.length) {
|
||||
const found = findCategoryById(id, node.children);
|
||||
if (found) return found;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
function getCategoryName(id) {
|
||||
const node = findCategoryById(id, categoryTree.value);
|
||||
if (!node) return `#${id}`;
|
||||
return node.name_hu || node.name_en || node.key;
|
||||
}
|
||||
function toggleCategory(id) {
|
||||
const idx = form.category_ids.indexOf(id);
|
||||
if (idx >= 0) {
|
||||
form.category_ids.splice(idx, 1);
|
||||
} else {
|
||||
form.category_ids.push(id);
|
||||
}
|
||||
}
|
||||
function toggleTreeNode(id) {
|
||||
const newSet = new Set(expandedNodes.value);
|
||||
if (newSet.has(id)) {
|
||||
newSet.delete(id);
|
||||
} else {
|
||||
newSet.add(id);
|
||||
}
|
||||
expandedNodes.value = newSet;
|
||||
}
|
||||
function isCategorySelected(id) {
|
||||
return form.category_ids.includes(id);
|
||||
}
|
||||
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" }
|
||||
];
|
||||
return (_ctx, _push, _parent, _attrs) => {
|
||||
const _component_TreeNode = _sfc_main$3;
|
||||
const _component_SharedAddressForm = _sfc_main$1;
|
||||
_push(`<div${ssrRenderAttrs(_attrs)} data-v-ab22d560><div class="mb-8" data-v-ab22d560><button class="inline-flex items-center gap-1.5 text-sm text-slate-400 hover:text-white transition mb-4" data-v-ab22d560><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-ab22d560><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 19l-7-7 7-7" data-v-ab22d560></path></svg> Vissza a szolgáltatóhoz </button><h1 class="text-2xl font-bold text-white" data-v-ab22d560>Szolgáltató szerkesztése</h1><p class="text-slate-400 mt-1" data-v-ab22d560>Szolgáltató #${ssrInterpolate(_ctx.$route.params.id)}</p></div>`);
|
||||
if (loading.value) {
|
||||
_push(`<div class="flex items-center justify-center py-20" data-v-ab22d560><div class="text-slate-400 flex items-center gap-3" data-v-ab22d560><svg class="w-5 h-5 animate-spin" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-ab22d560><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-ab22d560></path></svg><span data-v-ab22d560>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-ab22d560><p class="text-rose-400" data-v-ab22d560>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-ab22d560>Ú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-ab22d560><p class="text-slate-400 text-center py-12" data-v-ab22d560>A szolgáltató nem található.</p></div>`);
|
||||
} else {
|
||||
_push(`<!--[--><div class="border-b border-slate-700 mb-6" data-v-ab22d560><nav class="flex gap-6 -mb-px" data-v-ab22d560><!--[-->`);
|
||||
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-ab22d560>`);
|
||||
ssrRenderVNode(_push, createVNode(resolveDynamicComponent(tab.icon), { class: "w-4 h-4" }, null), _parent);
|
||||
_push(` ${ssrInterpolate(tab.label)}</button>`);
|
||||
});
|
||||
_push(`<!--]--></nav></div>`);
|
||||
if (activeTab.value === "basic") {
|
||||
_push(`<div class="max-w-3xl" data-v-ab22d560><form data-v-ab22d560><div class="bg-slate-800 rounded-xl border border-slate-700 p-6 mb-6" data-v-ab22d560><h2 class="text-lg font-semibold text-white mb-4" data-v-ab22d560>Alapadatok</h2><div class="grid grid-cols-1 md:grid-cols-2 gap-4" data-v-ab22d560><div class="md:col-span-2" data-v-ab22d560><label class="block text-sm font-medium text-slate-300 mb-1" data-v-ab22d560>Név *</label><input${ssrRenderAttr("value", form.name)} required 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" data-v-ab22d560></div><div data-v-ab22d560><label class="block text-sm font-medium text-slate-300 mb-1" data-v-ab22d560>Kategória</label><input${ssrRenderAttr("value", form.category)} placeholder="pl. Autószerviz, Gumiszerviz" 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" data-v-ab22d560></div><div data-v-ab22d560><label class="block text-sm font-medium text-slate-300 mb-1" data-v-ab22d560>Forrás</label><div class="w-full px-3 py-2 bg-slate-700/50 border border-slate-600 rounded-lg text-slate-400 text-sm" data-v-ab22d560>${ssrInterpolate(provider.value.source)}</div></div></div></div><div class="bg-slate-800 rounded-xl border border-slate-700 p-6 mb-6" data-v-ab22d560><h2 class="text-lg font-semibold text-white mb-4" data-v-ab22d560>Elérhetőség</h2><div class="grid grid-cols-1 md:grid-cols-2 gap-4" data-v-ab22d560><div data-v-ab22d560><label class="block text-sm font-medium text-slate-300 mb-1" data-v-ab22d560>Telefon</label><input${ssrRenderAttr("value", form.contact_phone)} placeholder="+36 30 123 4567" 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" data-v-ab22d560></div><div data-v-ab22d560><label class="block text-sm font-medium text-slate-300 mb-1" data-v-ab22d560>Email</label><input${ssrRenderAttr("value", form.contact_email)} type="email" placeholder="info@example.com" 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" data-v-ab22d560></div><div class="md:col-span-2" data-v-ab22d560><label class="block text-sm font-medium text-slate-300 mb-1" data-v-ab22d560>Weboldal</label><input${ssrRenderAttr("value", form.website)} placeholder="https://..." 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" data-v-ab22d560></div></div></div></form></div>`);
|
||||
} else {
|
||||
_push(`<!---->`);
|
||||
}
|
||||
if (activeTab.value === "matrix") {
|
||||
_push(`<div class="max-w-4xl" data-v-ab22d560><div class="bg-slate-800 rounded-xl border border-slate-700 p-6 mb-6" data-v-ab22d560><h2 class="text-lg font-semibold text-white mb-2" data-v-ab22d560>3D Képesség Mátrix</h2><p class="text-sm text-slate-400 mb-6" data-v-ab22d560> Állítsd be, hogy a szolgáltató milyen járműosztályokhoz, szolgáltatási kategóriákhoz és specializációkhoz tartozik. </p><div class="mb-8" data-v-ab22d560><h3 class="text-md font-medium text-white mb-3 flex items-center gap-2" data-v-ab22d560><span class="w-6 h-6 rounded-full bg-indigo-500/20 text-indigo-400 flex items-center justify-center text-xs font-bold" data-v-ab22d560>A</span> Járműosztályok (Vehicle Classes) </h3><p class="text-xs text-slate-500 mb-3" data-v-ab22d560>Mely járműtípusokat szervizeli a szolgáltató?</p><div class="grid grid-cols-2 md:grid-cols-4 gap-3" data-v-ab22d560><!--[-->`);
|
||||
ssrRenderList(VEHICLE_CLASSES, (vc) => {
|
||||
_push(`<label class="${ssrRenderClass([form.supported_vehicle_classes.includes(vc.key) ? "bg-indigo-500/10 border-indigo-500/40 text-indigo-300" : "bg-slate-700/50 border-slate-600 hover:border-slate-500 text-slate-300", "flex items-center gap-3 p-3 rounded-lg border cursor-pointer transition"])}" data-v-ab22d560><input type="checkbox"${ssrRenderAttr("value", vc.key)}${ssrIncludeBooleanAttr(form.supported_vehicle_classes.includes(vc.key)) ? " checked" : ""} class="w-4 h-4 rounded border-slate-500 bg-slate-700 text-indigo-500 focus:ring-indigo-500/50" data-v-ab22d560><span class="text-sm" data-v-ab22d560>${ssrInterpolate(vc.label)}</span></label>`);
|
||||
});
|
||||
_push(`<!--]--></div></div><div class="mb-8" data-v-ab22d560><h3 class="text-md font-medium text-white mb-3 flex items-center gap-2" data-v-ab22d560><span class="w-6 h-6 rounded-full bg-emerald-500/20 text-emerald-400 flex items-center justify-center text-xs font-bold" data-v-ab22d560>B</span> Szolgáltatási Kategóriák (Expertise Tags) </h3><p class="text-xs text-slate-500 mb-3" data-v-ab22d560>Válaszd ki a szolgáltatóhoz tartozó kategóriákat a hierarchikus fából.</p>`);
|
||||
if (treeLoading.value) {
|
||||
_push(`<div class="flex items-center gap-2 text-sm text-slate-400 py-4" data-v-ab22d560><svg class="w-4 h-4 animate-spin" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-ab22d560><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-ab22d560></path></svg><span data-v-ab22d560>Kategóriák betöltése...</span></div>`);
|
||||
} else {
|
||||
_push(`<div class="space-y-1 max-h-96 overflow-y-auto pr-2" data-v-ab22d560><!--[-->`);
|
||||
ssrRenderList(categoryTree.value, (node) => {
|
||||
_push(`<div class="ml-0" data-v-ab22d560><div class="flex items-center gap-2 py-1" data-v-ab22d560><button class="text-slate-500 hover:text-slate-300 transition w-4 h-4 flex items-center justify-center" data-v-ab22d560><svg class="${ssrRenderClass([expandedNodes.value.has(node.id) ? "rotate-90" : "", "w-3 h-3 transition-transform"])}" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-ab22d560><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7" data-v-ab22d560></path></svg></button><label class="flex items-center gap-2 cursor-pointer flex-1" data-v-ab22d560><input type="checkbox"${ssrIncludeBooleanAttr(isCategorySelected(node.id)) ? " checked" : ""} class="w-4 h-4 rounded border-slate-500 bg-slate-700 text-indigo-500 focus:ring-indigo-500/50" data-v-ab22d560><span class="text-sm font-medium text-white" data-v-ab22d560>${ssrInterpolate(node.name_hu || node.name_en || node.key)}</span><span class="text-xs text-slate-500" data-v-ab22d560>(Szint ${ssrInterpolate(node.level)})</span></label></div>`);
|
||||
if (expandedNodes.value.has(node.id) && node.children?.length) {
|
||||
_push(`<div class="ml-6 border-l border-slate-700 pl-3" data-v-ab22d560><!--[-->`);
|
||||
ssrRenderList(node.children, (child) => {
|
||||
_push(`<div data-v-ab22d560>`);
|
||||
_push(ssrRenderComponent(_component_TreeNode, {
|
||||
node: child,
|
||||
"selected-ids": form.category_ids,
|
||||
"expanded-ids": expandedNodes.value,
|
||||
onToggle: toggleCategory,
|
||||
onToggleExpand: toggleTreeNode
|
||||
}, null, _parent));
|
||||
_push(`</div>`);
|
||||
});
|
||||
_push(`<!--]--></div>`);
|
||||
} else {
|
||||
_push(`<!---->`);
|
||||
}
|
||||
_push(`</div>`);
|
||||
});
|
||||
_push(`<!--]--></div>`);
|
||||
}
|
||||
if (form.category_ids.length > 0) {
|
||||
_push(`<div class="mt-4 flex flex-wrap gap-2" data-v-ab22d560><!--[-->`);
|
||||
ssrRenderList(form.category_ids, (id) => {
|
||||
_push(`<span class="inline-flex items-center gap-1 px-2 py-1 bg-indigo-500/10 text-indigo-300 rounded-full text-xs" data-v-ab22d560>${ssrInterpolate(getCategoryName(id))} <button class="hover:text-white transition" data-v-ab22d560><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-ab22d560><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" data-v-ab22d560></path></svg></button></span>`);
|
||||
});
|
||||
_push(`<!--]--></div>`);
|
||||
} else {
|
||||
_push(`<!---->`);
|
||||
}
|
||||
_push(`</div><div class="mb-4" data-v-ab22d560><h3 class="text-md font-medium text-white mb-3 flex items-center gap-2" data-v-ab22d560><span class="w-6 h-6 rounded-full bg-amber-500/20 text-amber-400 flex items-center justify-center text-xs font-bold" data-v-ab22d560>C</span> Specializációk </h3><p class="text-xs text-slate-500 mb-3" data-v-ab22d560>Adj meg speciális márkákat, hajtáslánc típusokat vagy egyéb címkéket.</p><div class="grid grid-cols-1 md:grid-cols-2 gap-6" data-v-ab22d560><div data-v-ab22d560><label class="block text-sm font-medium text-slate-300 mb-1" data-v-ab22d560>Márkák (Brands)</label><div class="flex flex-wrap gap-2 mb-2" data-v-ab22d560><!--[-->`);
|
||||
ssrRenderList(form.specializations.brands, (brand, idx) => {
|
||||
_push(`<span class="inline-flex items-center gap-1 px-2 py-1 bg-amber-500/10 text-amber-300 rounded-full text-xs" data-v-ab22d560>${ssrInterpolate(brand)} <button class="hover:text-white transition" data-v-ab22d560><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-ab22d560><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" data-v-ab22d560></path></svg></button></span>`);
|
||||
});
|
||||
_push(`<!--]--></div><div class="flex gap-2" data-v-ab22d560><input${ssrRenderAttr("value", brandInput.value)} placeholder="pl. Volvo, Scania" class="flex-1 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" data-v-ab22d560><button${ssrIncludeBooleanAttr(!brandInput.value.trim()) ? " disabled" : ""} class="px-3 py-2 bg-indigo-600 hover:bg-indigo-500 disabled:bg-indigo-600/50 text-white rounded-lg text-sm transition" data-v-ab22d560> Hozzáad </button></div></div><div data-v-ab22d560><label class="block text-sm font-medium text-slate-300 mb-1" data-v-ab22d560>Hajtáslánc (Propulsion)</label><div class="flex flex-wrap gap-2 mb-2" data-v-ab22d560><!--[-->`);
|
||||
ssrRenderList(form.specializations.propulsion, (prop, idx) => {
|
||||
_push(`<span class="inline-flex items-center gap-1 px-2 py-1 bg-emerald-500/10 text-emerald-300 rounded-full text-xs" data-v-ab22d560>${ssrInterpolate(prop)} <button class="hover:text-white transition" data-v-ab22d560><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-ab22d560><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" data-v-ab22d560></path></svg></button></span>`);
|
||||
});
|
||||
_push(`<!--]--></div><div class="flex gap-2" data-v-ab22d560><input${ssrRenderAttr("value", propulsionInput.value)} placeholder="pl. EV, Hybrid, Diesel" class="flex-1 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" data-v-ab22d560><button${ssrIncludeBooleanAttr(!propulsionInput.value.trim()) ? " disabled" : ""} class="px-3 py-2 bg-indigo-600 hover:bg-indigo-500 disabled:bg-indigo-600/50 text-white rounded-lg text-sm transition" data-v-ab22d560> Hozzáad </button></div></div></div></div></div></div>`);
|
||||
} else {
|
||||
_push(`<!---->`);
|
||||
}
|
||||
if (activeTab.value === "location") {
|
||||
_push(`<div class="max-w-3xl" data-v-ab22d560><form data-v-ab22d560>`);
|
||||
_push(ssrRenderComponent(_component_SharedAddressForm, {
|
||||
modelValue: form.address,
|
||||
"onUpdate:modelValue": ($event) => form.address = $event
|
||||
}, null, _parent));
|
||||
_push(`<div class="bg-slate-800 rounded-xl border border-slate-700 p-6 mb-6" data-v-ab22d560><h2 class="text-lg font-semibold text-white mb-4" data-v-ab22d560>További helyszín adatok</h2><div class="grid grid-cols-1 md:grid-cols-2 gap-4" data-v-ab22d560><div class="md:col-span-2" data-v-ab22d560><label class="block text-sm font-medium text-slate-300 mb-1" data-v-ab22d560>Teljes cím szövege</label><input${ssrRenderAttr("value", form.address.full_address_text)} placeholder="Teljes cím szövege" 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" data-v-ab22d560></div><div class="md:col-span-2" data-v-ab22d560><label class="block text-sm font-medium text-slate-300 mb-1" data-v-ab22d560>Plus Code</label><input${ssrRenderAttr("value", form.plus_code)} placeholder="8FVC9X8V+XV" 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" data-v-ab22d560></div></div></div></form></div>`);
|
||||
} else {
|
||||
_push(`<!---->`);
|
||||
}
|
||||
if (activeTab.value === "hours") {
|
||||
_push(`<div class="max-w-3xl" data-v-ab22d560><div class="bg-slate-800 rounded-xl border border-slate-700 p-6 mb-6" data-v-ab22d560><h2 class="text-lg font-semibold text-white mb-2" data-v-ab22d560>Nyitvatartás</h2><p class="text-sm text-slate-400 mb-6" data-v-ab22d560> Állítsd be a szolgáltató nyitvatartási idejét napokra bontva. </p><div class="mb-6 p-4 rounded-lg border bg-indigo-500/5 border-indigo-500/20" data-v-ab22d560><label class="flex items-center gap-3 cursor-pointer" data-v-ab22d560><input type="checkbox"${ssrIncludeBooleanAttr(Array.isArray(form.is_always_open) ? ssrLooseContain(form.is_always_open, null) : form.is_always_open) ? " checked" : ""} class="w-5 h-5 rounded border-slate-500 bg-slate-700 text-indigo-500 focus:ring-indigo-500/50" data-v-ab22d560><div data-v-ab22d560><span class="text-sm font-medium text-white" data-v-ab22d560>Folyamatos (0-24) nyitvatartás</span><p class="text-xs text-slate-400 mt-0.5" data-v-ab22d560>A szolgáltató a hét minden napján 0-24 óráig nyitva van</p></div></label></div><div class="${ssrRenderClass([{ "opacity-50 pointer-events-none": form.is_always_open }, "flex flex-wrap gap-2 mb-6"])}" data-v-ab22d560><button class="px-3 py-1.5 text-xs font-medium rounded-lg border border-emerald-600/30 text-emerald-400 hover:bg-emerald-600/10 transition" data-v-ab22d560> 24/7 Folyamatos nyitvatartás </button><button class="px-3 py-1.5 text-xs font-medium rounded-lg border border-indigo-600/30 text-indigo-400 hover:bg-indigo-600/10" data-v-ab22d560> Hétköznapok másolása (Hétfő → K-P) </button><button class="px-3 py-1.5 text-xs font-medium rounded-lg border border-rose-600/30 text-rose-400 hover:bg-rose-600/10" data-v-ab22d560> Összes törlése </button></div><div class="${ssrRenderClass([{ "opacity-50 pointer-events-none": form.is_always_open }, "space-y-3"])}" data-v-ab22d560><!--[-->`);
|
||||
ssrRenderList(DAYS, (day) => {
|
||||
_push(`<div class="${ssrRenderClass([form.opening_hours[day.key] ? "bg-indigo-500/5 border-indigo-500/20" : "bg-slate-700/30 border-slate-600", "flex items-center gap-4 p-4 rounded-lg border"])}" data-v-ab22d560><label class="flex items-center gap-2 w-36 flex-shrink-0 cursor-pointer" data-v-ab22d560><input type="checkbox"${ssrIncludeBooleanAttr(!!form.opening_hours[day.key]) ? " checked" : ""}${ssrIncludeBooleanAttr(form.is_always_open) ? " disabled" : ""} class="w-4 h-4 rounded border-slate-500 bg-slate-700 text-indigo-500 focus:ring-indigo-500/50" data-v-ab22d560><span class="text-sm font-medium text-white" data-v-ab22d560>${ssrInterpolate(day.label)}</span></label>`);
|
||||
if (form.opening_hours[day.key]) {
|
||||
_push(`<div class="flex items-center gap-2" data-v-ab22d560><input type="time"${ssrRenderAttr("value", form.opening_hours[day.key]?.open || "08:00")}${ssrIncludeBooleanAttr(form.is_always_open) ? " disabled" : ""} class="w-28 px-2 py-1.5 bg-slate-700 border border-slate-600 rounded-lg text-white text-sm focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500 disabled:opacity-50" data-v-ab22d560><span class="text-slate-500 text-sm" data-v-ab22d560>–</span><input type="time"${ssrRenderAttr("value", form.opening_hours[day.key]?.close || "17:00")}${ssrIncludeBooleanAttr(form.is_always_open) ? " disabled" : ""} class="w-28 px-2 py-1.5 bg-slate-700 border border-slate-600 rounded-lg text-white text-sm focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500 disabled:opacity-50" data-v-ab22d560></div>`);
|
||||
} else {
|
||||
_push(`<span class="text-sm text-slate-500 italic" data-v-ab22d560>Zárva</span>`);
|
||||
}
|
||||
_push(`</div>`);
|
||||
});
|
||||
_push(`<!--]--></div></div></div>`);
|
||||
} else {
|
||||
_push(`<!---->`);
|
||||
}
|
||||
_push(`<div class="sticky bottom-0 bg-slate-900/90 backdrop-blur-sm border-t border-slate-700 -mx-6 px-6 py-4 mt-8" data-v-ab22d560><div class="flex items-center justify-between max-w-4xl" data-v-ab22d560><div class="text-sm text-slate-400" data-v-ab22d560>`);
|
||||
if (hasChanges.value) {
|
||||
_push(`<span class="text-amber-400" data-v-ab22d560>● Módosítások el nem mentve</span>`);
|
||||
} else {
|
||||
_push(`<span class="text-slate-500" data-v-ab22d560>Nincs változás</span>`);
|
||||
}
|
||||
_push(`</div><div class="flex gap-3" data-v-ab22d560><button class="px-4 py-2 text-sm text-slate-400 hover:text-white transition" data-v-ab22d560> Mégse </button><button${ssrIncludeBooleanAttr(saveLoading.value || !hasChanges.value) ? " disabled" : ""} class="px-6 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-ab22d560>`);
|
||||
if (saveLoading.value) {
|
||||
_push(`<svg class="w-4 h-4 animate-spin" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-ab22d560><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-ab22d560></path></svg>`);
|
||||
} else {
|
||||
_push(`<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-ab22d560><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7" data-v-ab22d560></path></svg>`);
|
||||
}
|
||||
_push(` Mentés </button></div></div></div><!--]-->`);
|
||||
}
|
||||
if (toast.value) {
|
||||
_push(`<div class="${ssrRenderClass([toast.value.type === "success" ? "bg-emerald-600 text-white" : "bg-rose-600 text-white", "fixed top-4 right-4 z-50 px-4 py-3 rounded-lg shadow-xl text-sm font-medium transition-all duration-300"])}" data-v-ab22d560>${ssrInterpolate(toast.value.message)}</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]/edit.vue");
|
||||
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
|
||||
};
|
||||
const edit = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-ab22d560"]]);
|
||||
export {
|
||||
edit as default
|
||||
};
|
||||
//# sourceMappingURL=edit-ZNmjSMhu.js.map
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,5 +0,0 @@
|
||||
const SmartLocationInput_vue_vue_type_style_index_0_scoped_b43e13ca_lang = ".overflow-y-auto[data-v-b43e13ca]::-webkit-scrollbar{width:6px}.overflow-y-auto[data-v-b43e13ca]::-webkit-scrollbar-track{background:transparent}.overflow-y-auto[data-v-b43e13ca]::-webkit-scrollbar-thumb{background-color:#64748b80;border-radius:3px}";
|
||||
export {
|
||||
SmartLocationInput_vue_vue_type_style_index_0_scoped_b43e13ca_lang as default
|
||||
};
|
||||
//# sourceMappingURL=edit-styles-1.mjs-J0c-7dzy.js.map
|
||||
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"edit-styles-1.mjs-J0c-7dzy.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
||||
@@ -1 +0,0 @@
|
||||
{"file":"edit-styles-1.mjs-J0c-7dzy.js","mappings":";","names":[],"sources":[],"sourcesContent":[],"version":3}
|
||||
@@ -1,5 +0,0 @@
|
||||
const edit_vue_vue_type_style_index_0_scoped_ab22d560_lang = ".overflow-y-auto[data-v-ab22d560]::-webkit-scrollbar{width:6px}.overflow-y-auto[data-v-ab22d560]::-webkit-scrollbar-track{background:transparent}.overflow-y-auto[data-v-ab22d560]::-webkit-scrollbar-thumb{background-color:#64748b80;border-radius:3px}.overflow-y-auto[data-v-ab22d560]::-webkit-scrollbar-thumb:hover{background-color:#64748bb3}";
|
||||
export {
|
||||
edit_vue_vue_type_style_index_0_scoped_ab22d560_lang as default
|
||||
};
|
||||
//# sourceMappingURL=edit-styles-2.mjs-BLAWo_jb.js.map
|
||||
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"edit-styles-2.mjs-BLAWo_jb.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
||||
@@ -1 +0,0 @@
|
||||
{"file":"edit-styles-2.mjs-BLAWo_jb.js","mappings":";","names":[],"sources":[],"sourcesContent":[],"version":3}
|
||||
@@ -1,6 +0,0 @@
|
||||
import style_0 from "./edit-styles-1.mjs-J0c-7dzy.js";
|
||||
import style_1 from "./edit-styles-2.mjs-BLAWo_jb.js";
|
||||
export default [
|
||||
style_0,
|
||||
style_1
|
||||
]
|
||||
@@ -1,94 +0,0 @@
|
||||
const resource = {
|
||||
"common": {
|
||||
"loading": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Loading..." } },
|
||||
"saving": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Saving..." } },
|
||||
"error": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "An error occurred" } },
|
||||
"retry": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Retry" } },
|
||||
"save": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Save" } },
|
||||
"saving_data": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Saving data..." } },
|
||||
"cancel": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Cancel" } },
|
||||
"discard": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Discard" } },
|
||||
"delete": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Delete" } },
|
||||
"delete_confirm": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Are you sure you want to delete this item?" } },
|
||||
"delete_btn": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Delete" } },
|
||||
"delete_title": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Confirm Deletion" } },
|
||||
"deleted": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Deleted successfully" } },
|
||||
"edit": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Edit" } },
|
||||
"edit_title": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Edit Item" } },
|
||||
"create": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Create" } },
|
||||
"create_btn": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Create" } },
|
||||
"create_title": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Create New" } },
|
||||
"create_first": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Create your first item to get started" } },
|
||||
"search": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Search" } },
|
||||
"search_placeholder": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Search..." } },
|
||||
"filter": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Filter" } },
|
||||
"no_results": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "No results found" } },
|
||||
"no_results_hint": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Try adjusting your search or filter criteria" } },
|
||||
"no_items": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "No items available" } },
|
||||
"actions": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Actions" } },
|
||||
"status": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Status" } },
|
||||
"active": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Active" } },
|
||||
"inactive": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Inactive" } },
|
||||
"activate": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Activate" } },
|
||||
"deactivate": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Deactivate" } },
|
||||
"name": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Name" } },
|
||||
"name_placeholder": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Enter name" } },
|
||||
"description": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Description" } },
|
||||
"desc_placeholder": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Enter description" } },
|
||||
"details": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Details" } },
|
||||
"email": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Email" } },
|
||||
"id": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "ID" } },
|
||||
"type": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Type" } },
|
||||
"type_corporate": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Corporate" } },
|
||||
"view": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "View" } },
|
||||
"updated": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Updated successfully" } },
|
||||
"save_error": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Failed to save" } },
|
||||
"invalid_json": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Invalid JSON format" } },
|
||||
"prev": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Previous" } },
|
||||
"next": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Next" } },
|
||||
"none": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "None" } },
|
||||
"reset": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Reset" } },
|
||||
"confirm": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Confirm" } },
|
||||
"close": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Close" } },
|
||||
"back": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Back" } },
|
||||
"continue": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Continue" } },
|
||||
"exit": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Exit" } },
|
||||
"all": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "All" } },
|
||||
"select_all": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Select All" } },
|
||||
"deselect_all": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Deselect All" } },
|
||||
"expires": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Expires" } },
|
||||
"created": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Created" } },
|
||||
"start_date": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Start Date" } },
|
||||
"end_date": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "End Date" } },
|
||||
"points": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Points" } },
|
||||
"level": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Level" } },
|
||||
"user": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "User" } },
|
||||
"user_id": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "User ID" } },
|
||||
"services": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Services" } },
|
||||
"discoveries": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Discoveries" } },
|
||||
"restriction": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Restriction" } },
|
||||
"restriction_mild": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Mild" } },
|
||||
"restriction_moderate": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Moderate" } },
|
||||
"restriction_severe": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Severe" } },
|
||||
"min_xp": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Min XP" } },
|
||||
"xp": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "XP" } },
|
||||
"penalty": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Penalty" } },
|
||||
"feature_flags": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Feature Flags" } },
|
||||
"permission": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Permission" } },
|
||||
"role": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Role" } },
|
||||
"domain": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Domain" } },
|
||||
"action": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Action" } },
|
||||
"value": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Value" } },
|
||||
"key": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Key" } },
|
||||
"enabled": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Enabled" } },
|
||||
"disabled": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Disabled" } },
|
||||
"yes": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Yes" } },
|
||||
"no": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "No" } },
|
||||
"on": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "On" } },
|
||||
"off": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Off" } }
|
||||
}
|
||||
};
|
||||
export {
|
||||
resource as default
|
||||
};
|
||||
//# sourceMappingURL=en-BsD3FKYP.js.map
|
||||
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"en-BsD3FKYP.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
||||
@@ -1 +0,0 @@
|
||||
{"file":"en-BsD3FKYP.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"entry-styles-1.mjs-BSzsbuA-.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
||||
@@ -1 +0,0 @@
|
||||
{"file":"entry-styles-1.mjs-BSzsbuA-.js","mappings":";","names":[],"sources":[],"sourcesContent":[],"version":3}
|
||||
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"entry-styles-2.mjs-6hMhRapZ.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
||||
@@ -1 +0,0 @@
|
||||
{"file":"entry-styles-2.mjs-6hMhRapZ.js","mappings":";","names":[],"sources":[],"sourcesContent":[],"version":3}
|
||||
@@ -1,5 +0,0 @@
|
||||
const app_vue_vue_type_style_index_0_lang = "body{margin:0;padding:0}";
|
||||
export {
|
||||
app_vue_vue_type_style_index_0_lang as default
|
||||
};
|
||||
//# sourceMappingURL=entry-styles-3.mjs-C1rWf53M.js.map
|
||||
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"entry-styles-3.mjs-C1rWf53M.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
||||
@@ -1 +0,0 @@
|
||||
{"file":"entry-styles-3.mjs-C1rWf53M.js","mappings":";","names":[],"sources":[],"sourcesContent":[],"version":3}
|
||||
@@ -1,8 +0,0 @@
|
||||
import style_0 from "./entry-styles-1.mjs-BSzsbuA-.js";
|
||||
import style_1 from "./entry-styles-2.mjs-6hMhRapZ.js";
|
||||
import style_2 from "./entry-styles-3.mjs-C1rWf53M.js";
|
||||
export default [
|
||||
style_0,
|
||||
style_1,
|
||||
style_2
|
||||
]
|
||||
@@ -1,97 +0,0 @@
|
||||
import { _ as __nuxt_component_0 } from "./nuxt-link-1NBbHb-h.js";
|
||||
import { mergeProps, withCtx, createTextVNode, toDisplayString, useSSRContext } from "vue";
|
||||
import { ssrRenderAttrs, ssrInterpolate, ssrRenderComponent } from "vue/server-renderer";
|
||||
import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.js";
|
||||
import { u as useHead } from "../server.mjs";
|
||||
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 "vue-router";
|
||||
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 = {
|
||||
__name: "error-404",
|
||||
__ssrInlineRender: true,
|
||||
props: {
|
||||
appName: {
|
||||
type: String,
|
||||
default: "Nuxt"
|
||||
},
|
||||
version: {
|
||||
type: String,
|
||||
default: ""
|
||||
},
|
||||
status: {
|
||||
type: Number,
|
||||
default: 404
|
||||
},
|
||||
statusText: {
|
||||
type: String,
|
||||
default: "Not Found"
|
||||
},
|
||||
description: {
|
||||
type: String,
|
||||
default: "Sorry, the page you are looking for could not be found."
|
||||
},
|
||||
backHome: {
|
||||
type: String,
|
||||
default: "Go back home"
|
||||
}
|
||||
},
|
||||
setup(__props) {
|
||||
const props = __props;
|
||||
useHead({
|
||||
title: `${props.status} - ${props.statusText} | ${props.appName}`,
|
||||
script: [
|
||||
{
|
||||
innerHTML: `!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))r(e);new MutationObserver(e=>{for(const o of e)if("childList"===o.type)for(const e of o.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&r(e)}).observe(document,{childList:!0,subtree:!0})}function r(e){if(e.ep)return;e.ep=!0;const r=function(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?r.credentials="include":"anonymous"===e.crossOrigin?r.credentials="omit":r.credentials="same-origin",r}(e);fetch(e.href,r)}}();`
|
||||
}
|
||||
],
|
||||
style: [
|
||||
{
|
||||
innerHTML: `*,:after,:before{border-color:var(--un-default-border-color,#e5e7eb);border-style:solid;border-width:0;box-sizing:border-box}:after,:before{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}h1{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}h1,p{margin:0}*,:after,:before{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }`
|
||||
}
|
||||
]
|
||||
});
|
||||
return (_ctx, _push, _parent, _attrs) => {
|
||||
const _component_NuxtLink = __nuxt_component_0;
|
||||
_push(`<div${ssrRenderAttrs(mergeProps({ class: "antialiased bg-white dark:bg-black dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-black" }, _attrs))} data-v-1bd9e11a><div class="fixed left-0 right-0 spotlight z-10" data-v-1bd9e11a></div><div class="max-w-520px text-center z-20" data-v-1bd9e11a><h1 class="font-medium mb-8 sm:text-10xl text-8xl" data-v-1bd9e11a>${ssrInterpolate(__props.status)}</h1><p class="font-light leading-tight mb-16 px-8 sm:px-0 sm:text-4xl text-xl" data-v-1bd9e11a>${ssrInterpolate(__props.description)}</p><div class="flex items-center justify-center w-full" data-v-1bd9e11a>`);
|
||||
_push(ssrRenderComponent(_component_NuxtLink, {
|
||||
to: "/",
|
||||
class: "cursor-pointer gradient-border px-4 py-2 sm:px-6 sm:py-3 sm:text-xl text-md"
|
||||
}, {
|
||||
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
||||
if (_push2) {
|
||||
_push2(`${ssrInterpolate(__props.backHome)}`);
|
||||
} else {
|
||||
return [
|
||||
createTextVNode(toDisplayString(__props.backHome), 1)
|
||||
];
|
||||
}
|
||||
}),
|
||||
_: 1
|
||||
}, _parent));
|
||||
_push(`</div></div></div>`);
|
||||
};
|
||||
}
|
||||
};
|
||||
const _sfc_setup = _sfc_main.setup;
|
||||
_sfc_main.setup = (props, ctx) => {
|
||||
const ssrContext = useSSRContext();
|
||||
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("node_modules/nuxt/dist/app/components/error-404.vue");
|
||||
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
|
||||
};
|
||||
const error404 = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-1bd9e11a"]]);
|
||||
export {
|
||||
error404 as default
|
||||
};
|
||||
//# sourceMappingURL=error-404-BFLCmfEK.js.map
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,5 +0,0 @@
|
||||
const error404_vue_vue_type_style_index_0_scoped_1bd9e11a_lang = '.spotlight[data-v-1bd9e11a]{background:linear-gradient(45deg,#00dc82,#36e4da 50%,#0047e1);bottom:-30vh;filter:blur(20vh);height:40vh}.gradient-border[data-v-1bd9e11a]{-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border-radius:.5rem;position:relative}@media(prefers-color-scheme:light){.gradient-border[data-v-1bd9e11a]{background-color:#ffffff4d}.gradient-border[data-v-1bd9e11a]:before{background:linear-gradient(90deg,#e2e2e2,#e2e2e2 25%,#00dc82,#36e4da 75%,#0047e1)}}@media(prefers-color-scheme:dark){.gradient-border[data-v-1bd9e11a]{background-color:#1414144d}.gradient-border[data-v-1bd9e11a]:before{background:linear-gradient(90deg,#303030,#303030 25%,#00dc82,#36e4da 75%,#0047e1)}}.gradient-border[data-v-1bd9e11a]:before{background-size:400% auto;border-radius:.5rem;content:"";inset:0;-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask-composite:exclude;opacity:.5;padding:2px;position:absolute;transition:background-position .3s ease-in-out,opacity .2s ease-in-out;width:100%}.gradient-border[data-v-1bd9e11a]:hover:before{background-position:-50% 0;opacity:1}.fixed[data-v-1bd9e11a]{position:fixed}.left-0[data-v-1bd9e11a]{left:0}.right-0[data-v-1bd9e11a]{right:0}.z-10[data-v-1bd9e11a]{z-index:10}.z-20[data-v-1bd9e11a]{z-index:20}.grid[data-v-1bd9e11a]{display:grid}.mb-16[data-v-1bd9e11a]{margin-bottom:4rem}.mb-8[data-v-1bd9e11a]{margin-bottom:2rem}.max-w-520px[data-v-1bd9e11a]{max-width:520px}.min-h-screen[data-v-1bd9e11a]{min-height:100vh}.w-full[data-v-1bd9e11a]{width:100%}.flex[data-v-1bd9e11a]{display:flex}.cursor-pointer[data-v-1bd9e11a]{cursor:pointer}.place-content-center[data-v-1bd9e11a]{place-content:center}.items-center[data-v-1bd9e11a]{align-items:center}.justify-center[data-v-1bd9e11a]{justify-content:center}.overflow-hidden[data-v-1bd9e11a]{overflow:hidden}.bg-white[data-v-1bd9e11a]{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity))}.px-4[data-v-1bd9e11a]{padding-left:1rem;padding-right:1rem}.px-8[data-v-1bd9e11a]{padding-left:2rem;padding-right:2rem}.py-2[data-v-1bd9e11a]{padding-bottom:.5rem;padding-top:.5rem}.text-center[data-v-1bd9e11a]{text-align:center}.text-8xl[data-v-1bd9e11a]{font-size:6rem;line-height:1}.text-xl[data-v-1bd9e11a]{font-size:1.25rem;line-height:1.75rem}.text-black[data-v-1bd9e11a]{--un-text-opacity:1;color:rgb(0 0 0/var(--un-text-opacity))}.font-light[data-v-1bd9e11a]{font-weight:300}.font-medium[data-v-1bd9e11a]{font-weight:500}.leading-tight[data-v-1bd9e11a]{line-height:1.25}.font-sans[data-v-1bd9e11a]{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.antialiased[data-v-1bd9e11a]{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media(prefers-color-scheme:dark){.dark\\:bg-black[data-v-1bd9e11a]{--un-bg-opacity:1;background-color:rgb(0 0 0/var(--un-bg-opacity))}.dark\\:text-white[data-v-1bd9e11a]{--un-text-opacity:1;color:rgb(255 255 255/var(--un-text-opacity))}}@media(min-width:640px){.sm\\:px-0[data-v-1bd9e11a]{padding-left:0;padding-right:0}.sm\\:px-6[data-v-1bd9e11a]{padding-left:1.5rem;padding-right:1.5rem}.sm\\:py-3[data-v-1bd9e11a]{padding-bottom:.75rem;padding-top:.75rem}.sm\\:text-4xl[data-v-1bd9e11a]{font-size:2.25rem;line-height:2.5rem}.sm\\:text-xl[data-v-1bd9e11a]{font-size:1.25rem;line-height:1.75rem}}';
|
||||
export {
|
||||
error404_vue_vue_type_style_index_0_scoped_1bd9e11a_lang as default
|
||||
};
|
||||
//# sourceMappingURL=error-404-styles-1.mjs-COQ9lBg6.js.map
|
||||
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"error-404-styles-1.mjs-COQ9lBg6.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
||||
@@ -1 +0,0 @@
|
||||
{"file":"error-404-styles-1.mjs-COQ9lBg6.js","mappings":";","names":[],"sources":[],"sourcesContent":[],"version":3}
|
||||
@@ -1,4 +0,0 @@
|
||||
import style_0 from "./error-404-styles-1.mjs-COQ9lBg6.js";
|
||||
export default [
|
||||
style_0
|
||||
]
|
||||
@@ -1,75 +0,0 @@
|
||||
import { mergeProps, useSSRContext } from "vue";
|
||||
import { ssrRenderAttrs, ssrInterpolate } from "vue/server-renderer";
|
||||
import { _ as _export_sfc } from "./_plugin-vue_export-helper-1tPrXgE0.js";
|
||||
import { u as useHead } from "../server.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/defu/dist/defu.mjs";
|
||||
import "vue-router";
|
||||
import "/app/node_modules/ufo/dist/index.mjs";
|
||||
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 = {
|
||||
__name: "error-500",
|
||||
__ssrInlineRender: true,
|
||||
props: {
|
||||
appName: {
|
||||
type: String,
|
||||
default: "Nuxt"
|
||||
},
|
||||
version: {
|
||||
type: String,
|
||||
default: ""
|
||||
},
|
||||
status: {
|
||||
type: Number,
|
||||
default: 500
|
||||
},
|
||||
statusText: {
|
||||
type: String,
|
||||
default: "Server error"
|
||||
},
|
||||
description: {
|
||||
type: String,
|
||||
default: "This page is temporarily unavailable."
|
||||
}
|
||||
},
|
||||
setup(__props) {
|
||||
const props = __props;
|
||||
useHead({
|
||||
title: `${props.status} - ${props.statusText} | ${props.appName}`,
|
||||
script: [
|
||||
{
|
||||
innerHTML: `!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))r(e);new MutationObserver(e=>{for(const o of e)if("childList"===o.type)for(const e of o.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&r(e)}).observe(document,{childList:!0,subtree:!0})}function r(e){if(e.ep)return;e.ep=!0;const r=function(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?r.credentials="include":"anonymous"===e.crossOrigin?r.credentials="omit":r.credentials="same-origin",r}(e);fetch(e.href,r)}}();`
|
||||
}
|
||||
],
|
||||
style: [
|
||||
{
|
||||
innerHTML: `*,:after,:before{border-color:var(--un-default-border-color,#e5e7eb);border-style:solid;border-width:0;box-sizing:border-box}:after,:before{--un-content:""}html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}h1{font-size:inherit;font-weight:inherit}h1,p{margin:0}*,:after,:before{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 transparent;--un-ring-shadow:0 0 transparent;--un-shadow-inset: ;--un-shadow:0 0 transparent;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgba(147,197,253,.5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }`
|
||||
}
|
||||
]
|
||||
});
|
||||
return (_ctx, _push, _parent, _attrs) => {
|
||||
_push(`<div${ssrRenderAttrs(mergeProps({ class: "antialiased bg-white dark:bg-black dark:text-white font-sans grid min-h-screen overflow-hidden place-content-center text-black" }, _attrs))} data-v-a01dd0ba><div class="-bottom-1/2 fixed h-1/2 left-0 right-0 spotlight" data-v-a01dd0ba></div><div class="max-w-520px text-center" data-v-a01dd0ba><h1 class="font-medium mb-8 sm:text-10xl text-8xl" data-v-a01dd0ba>${ssrInterpolate(__props.status)}</h1><p class="font-light leading-tight mb-16 px-8 sm:px-0 sm:text-4xl text-xl" data-v-a01dd0ba>${ssrInterpolate(__props.description)}</p></div></div>`);
|
||||
};
|
||||
}
|
||||
};
|
||||
const _sfc_setup = _sfc_main.setup;
|
||||
_sfc_main.setup = (props, ctx) => {
|
||||
const ssrContext = useSSRContext();
|
||||
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("node_modules/nuxt/dist/app/components/error-500.vue");
|
||||
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
|
||||
};
|
||||
const error500 = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-a01dd0ba"]]);
|
||||
export {
|
||||
error500 as default
|
||||
};
|
||||
//# sourceMappingURL=error-500-DfEH3Z64.js.map
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,5 +0,0 @@
|
||||
const error500_vue_vue_type_style_index_0_scoped_a01dd0ba_lang = ".spotlight[data-v-a01dd0ba]{background:linear-gradient(45deg,#00dc82,#36e4da 50%,#0047e1);filter:blur(20vh)}.fixed[data-v-a01dd0ba]{position:fixed}.-bottom-1\\/2[data-v-a01dd0ba]{bottom:-50%}.left-0[data-v-a01dd0ba]{left:0}.right-0[data-v-a01dd0ba]{right:0}.grid[data-v-a01dd0ba]{display:grid}.mb-16[data-v-a01dd0ba]{margin-bottom:4rem}.mb-8[data-v-a01dd0ba]{margin-bottom:2rem}.h-1\\/2[data-v-a01dd0ba]{height:50%}.max-w-520px[data-v-a01dd0ba]{max-width:520px}.min-h-screen[data-v-a01dd0ba]{min-height:100vh}.place-content-center[data-v-a01dd0ba]{place-content:center}.overflow-hidden[data-v-a01dd0ba]{overflow:hidden}.bg-white[data-v-a01dd0ba]{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity))}.px-8[data-v-a01dd0ba]{padding-left:2rem;padding-right:2rem}.text-center[data-v-a01dd0ba]{text-align:center}.text-8xl[data-v-a01dd0ba]{font-size:6rem;line-height:1}.text-xl[data-v-a01dd0ba]{font-size:1.25rem;line-height:1.75rem}.text-black[data-v-a01dd0ba]{--un-text-opacity:1;color:rgb(0 0 0/var(--un-text-opacity))}.font-light[data-v-a01dd0ba]{font-weight:300}.font-medium[data-v-a01dd0ba]{font-weight:500}.leading-tight[data-v-a01dd0ba]{line-height:1.25}.font-sans[data-v-a01dd0ba]{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.antialiased[data-v-a01dd0ba]{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@media(prefers-color-scheme:dark){.dark\\:bg-black[data-v-a01dd0ba]{--un-bg-opacity:1;background-color:rgb(0 0 0/var(--un-bg-opacity))}.dark\\:text-white[data-v-a01dd0ba]{--un-text-opacity:1;color:rgb(255 255 255/var(--un-text-opacity))}}@media(min-width:640px){.sm\\:px-0[data-v-a01dd0ba]{padding-left:0;padding-right:0}.sm\\:text-4xl[data-v-a01dd0ba]{font-size:2.25rem;line-height:2.5rem}}";
|
||||
export {
|
||||
error500_vue_vue_type_style_index_0_scoped_a01dd0ba_lang as default
|
||||
};
|
||||
//# sourceMappingURL=error-500-styles-1.mjs-C0glhSuM.js.map
|
||||
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"error-500-styles-1.mjs-C0glhSuM.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
||||
@@ -1 +0,0 @@
|
||||
{"file":"error-500-styles-1.mjs-C0glhSuM.js","mappings":";","names":[],"sources":[],"sourcesContent":[],"version":3}
|
||||
@@ -1,4 +0,0 @@
|
||||
import style_0 from "./error-500-styles-1.mjs-C0glhSuM.js";
|
||||
export default [
|
||||
style_0
|
||||
]
|
||||
@@ -1,94 +0,0 @@
|
||||
const resource = {
|
||||
"common": {
|
||||
"loading": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Chargement..." } },
|
||||
"saving": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Enregistrement..." } },
|
||||
"error": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Une erreur est survenue" } },
|
||||
"retry": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Réessayer" } },
|
||||
"save": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Enregistrer" } },
|
||||
"saving_data": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Enregistrement des données..." } },
|
||||
"cancel": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Annuler" } },
|
||||
"discard": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Abandonner" } },
|
||||
"delete": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Supprimer" } },
|
||||
"delete_confirm": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Êtes-vous sûr de vouloir supprimer cet élément ?" } },
|
||||
"delete_btn": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Supprimer" } },
|
||||
"delete_title": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Confirmer la suppression" } },
|
||||
"deleted": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Supprimé avec succès" } },
|
||||
"edit": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Modifier" } },
|
||||
"edit_title": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Modifier l'élément" } },
|
||||
"create": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Créer" } },
|
||||
"create_btn": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Créer" } },
|
||||
"create_title": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Créer nouveau" } },
|
||||
"create_first": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Créez votre premier élément pour commencer" } },
|
||||
"search": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Rechercher" } },
|
||||
"search_placeholder": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Rechercher..." } },
|
||||
"filter": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Filtrer" } },
|
||||
"no_results": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Aucun résultat trouvé" } },
|
||||
"no_results_hint": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Essayez d'ajuster vos critères de recherche ou de filtre" } },
|
||||
"no_items": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Aucun élément disponible" } },
|
||||
"actions": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Actions" } },
|
||||
"status": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Statut" } },
|
||||
"active": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Actif" } },
|
||||
"inactive": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Inactif" } },
|
||||
"activate": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Activer" } },
|
||||
"deactivate": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Désactiver" } },
|
||||
"name": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Nom" } },
|
||||
"name_placeholder": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Entrez le nom" } },
|
||||
"description": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Description" } },
|
||||
"desc_placeholder": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Entrez la description" } },
|
||||
"details": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Détails" } },
|
||||
"email": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "E-mail" } },
|
||||
"id": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "ID" } },
|
||||
"type": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Type" } },
|
||||
"type_corporate": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Entreprise" } },
|
||||
"view": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Voir" } },
|
||||
"updated": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Mis à jour avec succès" } },
|
||||
"save_error": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Échec de l'enregistrement" } },
|
||||
"invalid_json": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Format JSON invalide" } },
|
||||
"prev": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Précédent" } },
|
||||
"next": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Suivant" } },
|
||||
"none": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Aucun" } },
|
||||
"reset": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Réinitialiser" } },
|
||||
"confirm": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Confirmer" } },
|
||||
"close": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Fermer" } },
|
||||
"back": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Retour" } },
|
||||
"continue": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Continuer" } },
|
||||
"exit": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Quitter" } },
|
||||
"all": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Tout" } },
|
||||
"select_all": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Tout sélectionner" } },
|
||||
"deselect_all": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Tout désélectionner" } },
|
||||
"expires": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Expire" } },
|
||||
"created": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Créé" } },
|
||||
"start_date": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Date de début" } },
|
||||
"end_date": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Date de fin" } },
|
||||
"points": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Points" } },
|
||||
"level": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Niveau" } },
|
||||
"user": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Utilisateur" } },
|
||||
"user_id": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "ID utilisateur" } },
|
||||
"services": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Services" } },
|
||||
"discoveries": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Découvertes" } },
|
||||
"restriction": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Restriction" } },
|
||||
"restriction_mild": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Légère" } },
|
||||
"restriction_moderate": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Modérée" } },
|
||||
"restriction_severe": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Sévère" } },
|
||||
"min_xp": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "XP min" } },
|
||||
"xp": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "XP" } },
|
||||
"penalty": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Pénalité" } },
|
||||
"feature_flags": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Indicateurs de fonctionnalités" } },
|
||||
"permission": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Permission" } },
|
||||
"role": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Rôle" } },
|
||||
"domain": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Domaine" } },
|
||||
"action": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Action" } },
|
||||
"value": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Valeur" } },
|
||||
"key": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Clé" } },
|
||||
"enabled": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Activé" } },
|
||||
"disabled": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Désactivé" } },
|
||||
"yes": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Oui" } },
|
||||
"no": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Non" } },
|
||||
"on": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "On" } },
|
||||
"off": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Off" } }
|
||||
}
|
||||
};
|
||||
export {
|
||||
resource as default
|
||||
};
|
||||
//# sourceMappingURL=fr-Dw19bH13.js.map
|
||||
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"fr-Dw19bH13.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
||||
@@ -1 +0,0 @@
|
||||
{"file":"fr-Dw19bH13.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
|
||||
@@ -1,94 +0,0 @@
|
||||
const resource = {
|
||||
"common": {
|
||||
"loading": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Betöltés..." } },
|
||||
"saving": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Mentés..." } },
|
||||
"error": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Hiba történt" } },
|
||||
"retry": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Újra" } },
|
||||
"save": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Mentés" } },
|
||||
"saving_data": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Adatok mentése..." } },
|
||||
"cancel": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Mégsem" } },
|
||||
"discard": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Elvetés" } },
|
||||
"delete": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Törlés" } },
|
||||
"delete_confirm": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Biztosan törölni szeretnéd ezt az elemet?" } },
|
||||
"delete_btn": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Törlés" } },
|
||||
"delete_title": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Törlés Megerősítése" } },
|
||||
"deleted": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Sikeresen törölve" } },
|
||||
"edit": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Szerkesztés" } },
|
||||
"edit_title": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Elem Szerkesztése" } },
|
||||
"create": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Létrehozás" } },
|
||||
"create_btn": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Létrehozás" } },
|
||||
"create_title": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Új Létrehozása" } },
|
||||
"create_first": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Hozd létre az első elemet a kezdéshez" } },
|
||||
"search": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Keresés" } },
|
||||
"search_placeholder": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Keresés..." } },
|
||||
"filter": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Szűrés" } },
|
||||
"no_results": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Nincs találat" } },
|
||||
"no_results_hint": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Próbáld módosítani a keresési vagy szűrési feltételeket" } },
|
||||
"no_items": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Nincsenek elemek" } },
|
||||
"actions": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Műveletek" } },
|
||||
"status": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Státusz" } },
|
||||
"active": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Aktív" } },
|
||||
"inactive": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Inaktív" } },
|
||||
"activate": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Aktiválás" } },
|
||||
"deactivate": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Deaktiválás" } },
|
||||
"name": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Név" } },
|
||||
"name_placeholder": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Add meg a nevet" } },
|
||||
"description": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Leírás" } },
|
||||
"desc_placeholder": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Add meg a leírást" } },
|
||||
"details": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Részletek" } },
|
||||
"email": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "E-mail" } },
|
||||
"id": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Azonosító" } },
|
||||
"type": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Típus" } },
|
||||
"type_corporate": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Vállalati" } },
|
||||
"view": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Megtekintés" } },
|
||||
"updated": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Sikeresen frissítve" } },
|
||||
"save_error": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Sikertelen mentés" } },
|
||||
"invalid_json": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Érvénytelen JSON formátum" } },
|
||||
"prev": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Előző" } },
|
||||
"next": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Következő" } },
|
||||
"none": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Nincs" } },
|
||||
"reset": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Visszaállítás" } },
|
||||
"confirm": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Megerősítés" } },
|
||||
"close": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Bezárás" } },
|
||||
"back": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Vissza" } },
|
||||
"continue": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Tovább" } },
|
||||
"exit": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Kilépés" } },
|
||||
"all": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Minden" } },
|
||||
"select_all": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Összes kiválasztása" } },
|
||||
"deselect_all": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Összes elrejtése" } },
|
||||
"expires": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Lejárat" } },
|
||||
"created": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Létrehozva" } },
|
||||
"start_date": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Kezdő Dátum" } },
|
||||
"end_date": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Befejező Dátum" } },
|
||||
"points": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Pontok" } },
|
||||
"level": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Szint" } },
|
||||
"user": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Felhasználó" } },
|
||||
"user_id": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Felhasználó Azonosító" } },
|
||||
"services": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Szolgáltatások" } },
|
||||
"discoveries": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Felfedezések" } },
|
||||
"restriction": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Korlátozás" } },
|
||||
"restriction_mild": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Enyhe" } },
|
||||
"restriction_moderate": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Mérsékelt" } },
|
||||
"restriction_severe": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Súlyos" } },
|
||||
"min_xp": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Min XP" } },
|
||||
"xp": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "XP" } },
|
||||
"penalty": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Büntetés" } },
|
||||
"feature_flags": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Funkció Kapcsolók" } },
|
||||
"permission": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Engedély" } },
|
||||
"role": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Szerepkör" } },
|
||||
"domain": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Tartomány" } },
|
||||
"action": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Művelet" } },
|
||||
"value": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Érték" } },
|
||||
"key": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Kulcs" } },
|
||||
"enabled": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Bekapcsolva" } },
|
||||
"disabled": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Kikapcsolva" } },
|
||||
"yes": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Igen" } },
|
||||
"no": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Nem" } },
|
||||
"on": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Be" } },
|
||||
"off": { "t": 0, "b": { "t": 2, "i": [{ "t": 3 }], "s": "Ki" } }
|
||||
}
|
||||
};
|
||||
export {
|
||||
resource as default
|
||||
};
|
||||
//# sourceMappingURL=hu-CfkgEs2T.js.map
|
||||
@@ -1 +0,0 @@
|
||||
{"version":3,"file":"hu-CfkgEs2T.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
||||
@@ -1 +0,0 @@
|
||||
{"file":"hu-CfkgEs2T.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
|
||||
@@ -1,126 +0,0 @@
|
||||
import { _ as __nuxt_component_0 } from "./nuxt-link-1NBbHb-h.js";
|
||||
import { defineComponent, ref, unref, withCtx, createTextVNode, toDisplayString, openBlock, createBlock, createVNode, useSSRContext } from "vue";
|
||||
import { ssrRenderAttrs, ssrInterpolate, ssrIncludeBooleanAttr, ssrLooseContain, ssrLooseEqual, ssrRenderList, ssrRenderAttr, ssrRenderComponent, ssrRenderClass } from "vue/server-renderer";
|
||||
import "/app/node_modules/hookable/dist/index.mjs";
|
||||
import { u as useFormatter } from "./useFormatter-hycy3urM.js";
|
||||
import "/app/node_modules/klona/dist/index.mjs";
|
||||
import { a as useI18n } from "../server.mjs";
|
||||
import "/app/node_modules/ufo/dist/index.mjs";
|
||||
import "/app/node_modules/defu/dist/defu.mjs";
|
||||
import "./region-0mvXqaMM.js";
|
||||
import "pinia";
|
||||
import "/app/node_modules/ofetch/dist/node.mjs";
|
||||
import "#internal/nuxt/paths";
|
||||
import "/app/node_modules/unctx/dist/index.mjs";
|
||||
import "/app/node_modules/h3/dist/index.mjs";
|
||||
import "vue-router";
|
||||
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 = /* @__PURE__ */ defineComponent({
|
||||
__name: "index",
|
||||
__ssrInlineRender: true,
|
||||
setup(__props) {
|
||||
const { t } = useI18n();
|
||||
const { formatNumber, formatDate } = useFormatter();
|
||||
const loading = ref(false);
|
||||
const error = ref(false);
|
||||
const users = ref([]);
|
||||
const totalCount = ref(0);
|
||||
const offset = ref(0);
|
||||
const limit = ref(50);
|
||||
const filters = ref({
|
||||
level: "",
|
||||
min_xp: null,
|
||||
max_xp: null,
|
||||
has_penalty: ""
|
||||
});
|
||||
function restrictionLabel(level) {
|
||||
switch (level) {
|
||||
case 1:
|
||||
return t("gamification.users.restriction_mild");
|
||||
case 2:
|
||||
return t("gamification.users.restriction_moderate");
|
||||
case 3:
|
||||
return t("gamification.users.restriction_severe");
|
||||
default:
|
||||
return `${level}. ${t("gamification.users.restriction_level")}`;
|
||||
}
|
||||
}
|
||||
return (_ctx, _push, _parent, _attrs) => {
|
||||
const _component_NuxtLink = __nuxt_component_0;
|
||||
_push(`<div${ssrRenderAttrs(_attrs)}><div class="mb-8"><h1 class="text-2xl font-bold text-white">${ssrInterpolate(unref(t)("gamification.users.title"))}</h1><p class="text-slate-400 mt-1">${ssrInterpolate(unref(t)("gamification.users.subtitle"))}</p></div><div class="bg-slate-800 rounded-xl border border-slate-700 p-4 mb-6"><div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4"><div><label class="block text-xs font-medium text-slate-400 mb-1.5 uppercase tracking-wider">${ssrInterpolate(unref(t)("gamification.users.filter_level"))}</label><select class="w-full bg-slate-700 border border-slate-600 rounded-lg px-3 py-2 text-sm text-white focus:ring-2 focus:ring-indigo-500 focus:border-transparent"><option value=""${ssrIncludeBooleanAttr(Array.isArray(unref(filters).level) ? ssrLooseContain(unref(filters).level, "") : ssrLooseEqual(unref(filters).level, "")) ? " selected" : ""}>${ssrInterpolate(unref(t)("gamification.users.all_levels"))}</option><!--[-->`);
|
||||
ssrRenderList(20, (lvl) => {
|
||||
_push(`<option${ssrRenderAttr("value", lvl)}${ssrIncludeBooleanAttr(Array.isArray(unref(filters).level) ? ssrLooseContain(unref(filters).level, lvl) : ssrLooseEqual(unref(filters).level, lvl)) ? " selected" : ""}>${ssrInterpolate(lvl)}. ${ssrInterpolate(unref(t)("gamification.users.level_suffix"))}</option>`);
|
||||
});
|
||||
_push(`<!--]--></select></div><div><label class="block text-xs font-medium text-slate-400 mb-1.5 uppercase tracking-wider">${ssrInterpolate(unref(t)("gamification.users.filter_min_xp"))}</label><input${ssrRenderAttr("value", unref(filters).min_xp)} type="number" min="0" placeholder="0" class="w-full bg-slate-700 border border-slate-600 rounded-lg px-3 py-2 text-sm text-white focus:ring-2 focus:ring-indigo-500 focus:border-transparent"></div><div><label class="block text-xs font-medium text-slate-400 mb-1.5 uppercase tracking-wider">${ssrInterpolate(unref(t)("gamification.users.filter_max_xp"))}</label><input${ssrRenderAttr("value", unref(filters).max_xp)} type="number" min="0" placeholder="100000" class="w-full bg-slate-700 border border-slate-600 rounded-lg px-3 py-2 text-sm text-white focus:ring-2 focus:ring-indigo-500 focus:border-transparent"></div><div><label class="block text-xs font-medium text-slate-400 mb-1.5 uppercase tracking-wider">${ssrInterpolate(unref(t)("gamification.users.filter_penalty"))}</label><select class="w-full bg-slate-700 border border-slate-600 rounded-lg px-3 py-2 text-sm text-white focus:ring-2 focus:ring-indigo-500 focus:border-transparent"><option value=""${ssrIncludeBooleanAttr(Array.isArray(unref(filters).has_penalty) ? ssrLooseContain(unref(filters).has_penalty, "") : ssrLooseEqual(unref(filters).has_penalty, "")) ? " selected" : ""}>${ssrInterpolate(unref(t)("gamification.users.penalty_any"))}</option><option${ssrRenderAttr("value", true)}${ssrIncludeBooleanAttr(Array.isArray(unref(filters).has_penalty) ? ssrLooseContain(unref(filters).has_penalty, true) : ssrLooseEqual(unref(filters).has_penalty, true)) ? " selected" : ""}>${ssrInterpolate(unref(t)("gamification.users.penalty_only"))}</option><option${ssrRenderAttr("value", false)}${ssrIncludeBooleanAttr(Array.isArray(unref(filters).has_penalty) ? ssrLooseContain(unref(filters).has_penalty, false) : ssrLooseEqual(unref(filters).has_penalty, false)) ? " selected" : ""}>${ssrInterpolate(unref(t)("gamification.users.penalty_none"))}</option></select></div></div><div class="flex items-center gap-3 mt-4 pt-4 border-t border-slate-700/50"><button class="px-4 py-2 bg-indigo-600 hover:bg-indigo-500 text-white text-sm font-medium rounded-lg transition">${ssrInterpolate(unref(t)("gamification.users.filter_apply"))}</button><button class="px-4 py-2 bg-slate-700 hover:bg-slate-600 text-slate-300 text-sm font-medium rounded-lg transition">${ssrInterpolate(unref(t)("gamification.users.filter_reset"))}</button><span class="text-xs text-slate-500 ml-auto">${ssrInterpolate(unref(t)("gamification.users.total_count", { count: unref(totalCount) }))}</span></div></div>`);
|
||||
if (unref(loading)) {
|
||||
_push(`<div class="flex items-center justify-center py-20"><div class="text-slate-400 flex items-center gap-3"><svg class="w-5 h-5 animate-spin" fill="none" stroke="currentColor" viewBox="0 0 24 24"><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"></path></svg><span>${ssrInterpolate(unref(t)("gamification.users.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"><p class="text-rose-400">${ssrInterpolate(unref(t)("gamification.users.load_error"))}</p><button class="mt-3 text-sm text-rose-300 hover:text-rose-200 underline">${ssrInterpolate(unref(t)("gamification.users.retry"))}</button></div>`);
|
||||
} else if (unref(users).length === 0) {
|
||||
_push(`<div class="bg-slate-800 rounded-xl border border-slate-700 p-6"><p class="text-slate-400 text-center py-12">${ssrInterpolate(unref(t)("gamification.users.empty"))}</p></div>`);
|
||||
} else {
|
||||
_push(`<div class="bg-slate-800 rounded-xl border border-slate-700 overflow-hidden"><div class="overflow-x-auto"><table class="w-full"><thead><tr class="border-b border-slate-700"><th class="text-left px-4 py-3 text-xs font-medium text-slate-400 uppercase tracking-wider">${ssrInterpolate(unref(t)("gamification.users.col_user_id"))}</th><th class="text-left px-4 py-3 text-xs font-medium text-slate-400 uppercase tracking-wider">${ssrInterpolate(unref(t)("gamification.users.col_xp"))}</th><th class="text-left px-4 py-3 text-xs font-medium text-slate-400 uppercase tracking-wider">${ssrInterpolate(unref(t)("gamification.users.col_level"))}</th><th class="text-left px-4 py-3 text-xs font-medium text-slate-400 uppercase tracking-wider">${ssrInterpolate(unref(t)("gamification.users.col_points"))}</th><th class="text-left px-4 py-3 text-xs font-medium text-slate-400 uppercase tracking-wider">${ssrInterpolate(unref(t)("gamification.users.col_penalty"))}</th><th class="text-left px-4 py-3 text-xs font-medium text-slate-400 uppercase tracking-wider">${ssrInterpolate(unref(t)("gamification.users.col_restriction"))}</th><th class="text-left px-4 py-3 text-xs font-medium text-slate-400 uppercase tracking-wider">${ssrInterpolate(unref(t)("gamification.users.col_services"))}</th><th class="text-left px-4 py-3 text-xs font-medium text-slate-400 uppercase tracking-wider">${ssrInterpolate(unref(t)("gamification.users.col_discoveries"))}</th><th class="text-left px-4 py-3 text-xs font-medium text-slate-400 uppercase tracking-wider">${ssrInterpolate(unref(t)("gamification.users.col_updated"))}</th><th class="text-right px-4 py-3 text-xs font-medium text-slate-400 uppercase tracking-wider">${ssrInterpolate(unref(t)("gamification.users.col_actions"))}</th></tr></thead><tbody class="divide-y divide-slate-700/50"><!--[-->`);
|
||||
ssrRenderList(unref(users), (user) => {
|
||||
_push(`<tr class="hover:bg-slate-700/30 transition"><td class="px-4 py-3 text-sm text-white font-mono">#${ssrInterpolate(user.user_id)}</td><td class="px-4 py-3 text-sm text-white">${ssrInterpolate(unref(formatNumber)(user.total_xp))}</td><td class="px-4 py-3"><span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-indigo-500/10 text-indigo-400 border border-indigo-500/20">${ssrInterpolate(user.current_level)}</span></td><td class="px-4 py-3 text-sm text-slate-300">${ssrInterpolate(unref(formatNumber)(user.total_points))}</td><td class="px-4 py-3">`);
|
||||
if (user.penalty_points > 0) {
|
||||
_push(`<span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-rose-500/10 text-rose-400 border border-rose-500/20"> -${ssrInterpolate(user.penalty_points)}</span>`);
|
||||
} else {
|
||||
_push(`<span class="text-sm text-slate-500">—</span>`);
|
||||
}
|
||||
_push(`</td><td class="px-4 py-3">`);
|
||||
if (user.restriction_level > 0) {
|
||||
_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 border border-amber-500/20">${ssrInterpolate(restrictionLabel(user.restriction_level))}</span>`);
|
||||
} else {
|
||||
_push(`<span class="text-sm text-slate-500">${ssrInterpolate(unref(t)("gamification.users.none"))}</span>`);
|
||||
}
|
||||
_push(`</td><td class="px-4 py-3 text-sm text-slate-300">${ssrInterpolate(user.services_submitted)}</td><td class="px-4 py-3 text-sm text-slate-300">${ssrInterpolate(user.places_discovered)}</td><td class="px-4 py-3 text-sm text-slate-500">${ssrInterpolate(user.updated_at ? unref(formatDate)(user.updated_at) : "—")}</td><td class="px-4 py-3 text-right">`);
|
||||
_push(ssrRenderComponent(_component_NuxtLink, {
|
||||
to: `/gamification/users/${user.user_id}`,
|
||||
class: "inline-flex items-center gap-1.5 px-3 py-1.5 bg-indigo-600/10 hover:bg-indigo-600/20 text-indigo-400 text-xs font-medium rounded-lg transition"
|
||||
}, {
|
||||
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
||||
if (_push2) {
|
||||
_push2(`${ssrInterpolate(unref(t)("gamification.users.details"))} <svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"${_scopeId}><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7"${_scopeId}></path></svg>`);
|
||||
} else {
|
||||
return [
|
||||
createTextVNode(toDisplayString(unref(t)("gamification.users.details")) + " ", 1),
|
||||
(openBlock(), createBlock("svg", {
|
||||
class: "w-3.5 h-3.5",
|
||||
fill: "none",
|
||||
stroke: "currentColor",
|
||||
viewBox: "0 0 24 24"
|
||||
}, [
|
||||
createVNode("path", {
|
||||
"stroke-linecap": "round",
|
||||
"stroke-linejoin": "round",
|
||||
"stroke-width": "2",
|
||||
d: "M9 5l7 7-7 7"
|
||||
})
|
||||
]))
|
||||
];
|
||||
}
|
||||
}),
|
||||
_: 2
|
||||
}, _parent));
|
||||
_push(`</td></tr>`);
|
||||
});
|
||||
_push(`<!--]--></tbody></table></div><div class="flex items-center justify-between px-4 py-3 border-t border-slate-700"><button${ssrIncludeBooleanAttr(unref(offset) === 0) ? " disabled" : ""} class="${ssrRenderClass([unref(offset) === 0 ? "text-slate-600 cursor-not-allowed" : "text-slate-300 hover:bg-slate-700", "px-3 py-1.5 text-sm rounded-lg transition"])}">${ssrInterpolate(unref(t)("gamification.users.prev"))}</button><span class="text-sm text-slate-500">${ssrInterpolate(unref(offset) + 1)}–${ssrInterpolate(Math.min(unref(offset) + unref(limit), unref(totalCount)))} / ${ssrInterpolate(unref(totalCount))}</span><button${ssrIncludeBooleanAttr(unref(offset) + unref(limit) >= unref(totalCount)) ? " disabled" : ""} class="${ssrRenderClass([unref(offset) + unref(limit) >= unref(totalCount) ? "text-slate-600 cursor-not-allowed" : "text-slate-300 hover:bg-slate-700", "px-3 py-1.5 text-sm rounded-lg transition"])}">${ssrInterpolate(unref(t)("gamification.users.next"))}</button></div></div>`);
|
||||
}
|
||||
_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/gamification/users/index.vue");
|
||||
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
|
||||
};
|
||||
export {
|
||||
_sfc_main as default
|
||||
};
|
||||
//# sourceMappingURL=index-B4tBHEvj.js.map
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,270 +0,0 @@
|
||||
import { defineComponent, ref, computed, reactive, unref, useSSRContext } from "vue";
|
||||
import { ssrRenderAttrs, ssrInterpolate, ssrRenderClass, ssrRenderList, ssrRenderAttr, ssrIncludeBooleanAttr, ssrLooseEqual, ssrLooseContain } from "vue/server-renderer";
|
||||
import { u as useRegionStore } from "./region-0mvXqaMM.js";
|
||||
import { u as useFormatter } from "./useFormatter-hycy3urM.js";
|
||||
import "/app/node_modules/hookable/dist/index.mjs";
|
||||
import "/app/node_modules/klona/dist/index.mjs";
|
||||
import "../server.mjs";
|
||||
import "pinia";
|
||||
import "/app/node_modules/ofetch/dist/node.mjs";
|
||||
import "#internal/nuxt/paths";
|
||||
import "/app/node_modules/unctx/dist/index.mjs";
|
||||
import "/app/node_modules/h3/dist/index.mjs";
|
||||
import "/app/node_modules/defu/dist/defu.mjs";
|
||||
import "vue-router";
|
||||
import "/app/node_modules/ufo/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 = /* @__PURE__ */ defineComponent({
|
||||
__name: "index",
|
||||
__ssrInlineRender: true,
|
||||
setup(__props) {
|
||||
const regionStore = useRegionStore();
|
||||
const { formatCurrency } = useFormatter();
|
||||
const tabs = [
|
||||
{ key: "basic", label: "📋 Basic Info" },
|
||||
{ key: "pricing", label: "💰 Pricing" },
|
||||
{ key: "features", label: "⚡ Features" }
|
||||
];
|
||||
const activeTab = ref("basic");
|
||||
const activeTabLabel = computed(() => {
|
||||
const tab = tabs.find((t) => t.key === activeTab.value);
|
||||
return tab ? tab.label : "";
|
||||
});
|
||||
const listTab = ref("base");
|
||||
const basePackages = computed(() => packages.value.filter((p) => p.rules?.type !== "addon"));
|
||||
const addonPackages = computed(() => packages.value.filter((p) => p.rules?.type === "addon"));
|
||||
const packages = ref([]);
|
||||
const loading = ref(true);
|
||||
const error = ref(null);
|
||||
const showModal = ref(false);
|
||||
const showDeleteConfirm = ref(false);
|
||||
const editingPackage = ref(null);
|
||||
const deletingPackage = ref(null);
|
||||
const isCreating = ref(false);
|
||||
const saving = ref(false);
|
||||
const saveNotification = ref(null);
|
||||
const featureCapabilitiesError = ref(null);
|
||||
const selectedAddZoneCode = ref("");
|
||||
const availableRegionsToAdd = computed(() => {
|
||||
return regionStore.regions.filter((r) => {
|
||||
return r.country_code !== "DEFAULT" && !form.pricing_zones[r.country_code];
|
||||
});
|
||||
});
|
||||
const calcNetPrice = ref(0);
|
||||
const calcVatRate = ref(27);
|
||||
const calcCurrency = ref("EUR");
|
||||
const defaultForm = {
|
||||
name: "",
|
||||
display_name: "",
|
||||
type: "private",
|
||||
tier_level: 0,
|
||||
monthly_price: 0,
|
||||
yearly_price: 0,
|
||||
currency: "EUR",
|
||||
max_vehicles: 1,
|
||||
max_garages: 1,
|
||||
max_users: 1,
|
||||
monthly_free_credits: 0,
|
||||
max_cost_category_depth: 3,
|
||||
advanced_reports: false,
|
||||
export_data: false,
|
||||
subtitle: "",
|
||||
badge: "",
|
||||
is_custom: false,
|
||||
is_default_fallback: false,
|
||||
trial_days_on_signup: 0,
|
||||
feature_capabilities_json: '{\n "ai_analysis": false,\n "priority_support": false,\n "api_access": false\n}',
|
||||
pricing_zones: {}
|
||||
};
|
||||
const form = reactive({ ...defaultForm });
|
||||
function getZonePrice(countryCode, period) {
|
||||
const zone = form.pricing_zones[countryCode];
|
||||
if (!zone) return 0;
|
||||
return period === "monthly" ? zone.monthly_price : zone.yearly_price;
|
||||
}
|
||||
function getZoneCreditPrice(countryCode) {
|
||||
const zone = form.pricing_zones[countryCode];
|
||||
if (!zone) return 0;
|
||||
return zone.credit_price ?? 0;
|
||||
}
|
||||
function getZoneCurrency(countryCode) {
|
||||
const zone = form.pricing_zones[countryCode];
|
||||
if (!zone) return "EUR";
|
||||
return zone.currency;
|
||||
}
|
||||
function getDisplayName(pkg) {
|
||||
return pkg.rules?.display_name || pkg.name;
|
||||
}
|
||||
function getDescription(pkg) {
|
||||
return pkg.rules?.marketing?.subtitle || pkg.rules?.marketing?.badge || "";
|
||||
}
|
||||
function getFormattedPrice(pkg) {
|
||||
const zones = pkg.rules?.pricing_zones;
|
||||
const pricing = pkg.rules?.pricing;
|
||||
if (zones && zones["DEFAULT"]) {
|
||||
const p = zones["DEFAULT"];
|
||||
const currency = p.currency === "HUF" ? "Ft" : "€";
|
||||
return `${p.monthly_price} ${currency}`;
|
||||
}
|
||||
if (pricing) {
|
||||
const currency = pricing.currency === "HUF" ? "Ft" : "€";
|
||||
return `${pricing.monthly_price} ${currency}`;
|
||||
}
|
||||
return "—";
|
||||
}
|
||||
function getAllowance(pkg, key) {
|
||||
const allowances = pkg.rules?.allowances;
|
||||
if (!allowances) return "—";
|
||||
return allowances[key] ?? "—";
|
||||
}
|
||||
function getTierColorClass(level) {
|
||||
if (level >= 2) return "bg-purple-500/10 text-purple-400";
|
||||
if (level >= 1) return "bg-amber-500/10 text-amber-400";
|
||||
return "bg-slate-500/10 text-slate-400";
|
||||
}
|
||||
function getTierIcon(level) {
|
||||
if (level >= 2) return "🏢";
|
||||
if (level >= 1) return "⭐";
|
||||
return "🔓";
|
||||
}
|
||||
return (_ctx, _push, _parent, _attrs) => {
|
||||
_push(`<div${ssrRenderAttrs(_attrs)}><div class="mb-8 flex items-center justify-between"><div><h1 class="text-2xl font-bold text-white">${ssrInterpolate(_ctx.$t("packages.title"))}</h1><p class="text-slate-400 mt-1">${ssrInterpolate(_ctx.$t("packages.subtitle"))}</p></div><button class="px-5 py-2.5 bg-emerald-600 hover:bg-emerald-500 text-white font-medium rounded-lg transition text-sm flex items-center gap-2"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v16m8-8H4"></path></svg> ${ssrInterpolate(_ctx.$t("packages.create_new"))}</button></div>`);
|
||||
if (loading.value) {
|
||||
_push(`<div class="flex items-center justify-center py-20"><div class="flex flex-col items-center gap-3"><svg class="animate-spin h-8 w-8 text-indigo-400" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle><path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"></path></svg><span class="text-slate-400 text-sm">${ssrInterpolate(_ctx.$t("common.loading"))}</span></div></div>`);
|
||||
} else if (error.value) {
|
||||
_push(`<div class="bg-red-900/30 border border-red-700 rounded-xl p-6 text-center"><p class="text-red-300 mb-3">${ssrInterpolate(error.value)}</p><button class="px-4 py-2 bg-red-700 hover:bg-red-600 text-white rounded-lg transition text-sm">${ssrInterpolate(_ctx.$t("common.retry"))}</button></div>`);
|
||||
} else if (packages.value.length === 0) {
|
||||
_push(`<div class="bg-slate-800/50 border border-slate-700 rounded-xl p-12 text-center"><svg class="w-16 h-16 mx-auto text-slate-600 mb-4" 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><h3 class="text-lg font-medium text-slate-300 mb-2">${ssrInterpolate(_ctx.$t("packages.no_packages"))}</h3><p class="text-slate-500 mb-6">${ssrInterpolate(_ctx.$t("packages.no_packages_desc"))}</p><button class="px-5 py-2.5 bg-emerald-600 hover:bg-emerald-500 text-white font-medium rounded-lg transition text-sm">${ssrInterpolate(_ctx.$t("common.create_first"))}</button></div>`);
|
||||
} else {
|
||||
_push(`<div class="space-y-6 mb-8"><div class="mb-6"><div class="flex gap-2 border-b border-slate-700"><button class="${ssrRenderClass([listTab.value === "base" ? "border-indigo-500 text-indigo-300" : "border-transparent text-slate-400 hover:text-slate-200 hover:border-slate-500", "px-5 py-3 text-sm font-medium border-b-2 transition"])}"><span class="flex items-center gap-2"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M20 7l-8-4-8 4m16 0l-8 4m8-4v10l-8 4m0-10L4 7m8 4v10M4 7v10l8 4"></path></svg> Alapcsomagok </span></button><button class="${ssrRenderClass([listTab.value === "addon" ? "border-amber-500 text-amber-300" : "border-transparent text-slate-400 hover:text-slate-200 hover:border-slate-500", "px-5 py-3 text-sm font-medium border-b-2 transition"])}"><span class="flex items-center gap-2"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v3m0 0v3m0-3h3m-3 0H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg> Kiegészítők </span></button></div></div><div class="grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-6"><!--[-->`);
|
||||
ssrRenderList(listTab.value === "base" ? basePackages.value : addonPackages.value, (pkg) => {
|
||||
_push(`<div class="bg-slate-800 rounded-xl border border-slate-700 p-6 flex flex-col transition-all hover:border-slate-600"><div class="flex items-center justify-between mb-4"><div class="flex items-center gap-3"><div class="${ssrRenderClass([getTierColorClass(pkg.tier_level), "p-2 rounded-lg"])}"><span class="w-5 h-5 text-lg">${getTierIcon(pkg.tier_level) ?? ""}</span></div><div><h2 class="text-lg font-semibold text-white">${ssrInterpolate(getDisplayName(pkg))}</h2><span class="text-xs text-slate-500 font-mono">${ssrInterpolate(pkg.name)}</span></div></div><div class="flex items-center gap-1.5 flex-wrap">`);
|
||||
if (pkg.tier_level >= 1) {
|
||||
_push(`<span class="px-2 py-0.5 text-xs font-semibold rounded-full bg-indigo-500/20 text-indigo-300">${ssrInterpolate(_ctx.$t("packages.popular"))}</span>`);
|
||||
} else {
|
||||
_push(`<!---->`);
|
||||
}
|
||||
if (pkg.is_default_fallback) {
|
||||
_push(`<span class="px-2 py-0.5 text-xs font-semibold rounded-full bg-amber-500/20 text-amber-300" title="Default fallback package for expired subscriptions"> 🔒 ${ssrInterpolate(_ctx.$t("packages.fallback_badge"))}</span>`);
|
||||
} else {
|
||||
_push(`<!---->`);
|
||||
}
|
||||
if (pkg.trial_days_on_signup > 0) {
|
||||
_push(`<span class="px-2 py-0.5 text-xs font-semibold rounded-full bg-emerald-500/20 text-emerald-300"${ssrRenderAttr("title", `${pkg.trial_days_on_signup} days trial on signup`)}> 🎯 ${ssrInterpolate(_ctx.$t("packages.trial_badge"))}: ${ssrInterpolate(pkg.trial_days_on_signup)}d </span>`);
|
||||
} else {
|
||||
_push(`<!---->`);
|
||||
}
|
||||
_push(`</div></div><div class="mb-4"><span class="text-3xl font-bold text-white">${ssrInterpolate(getFormattedPrice(pkg))}</span><span class="text-sm text-slate-400 ml-1">/ ${ssrInterpolate(_ctx.$t("packages.month"))}</span></div><p class="text-sm text-slate-400 mb-4 flex-1">${ssrInterpolate(getDescription(pkg))}</p><div class="border-t border-slate-700 pt-4 mb-4"><h3 class="text-xs font-semibold uppercase tracking-wider text-slate-500 mb-3">${ssrInterpolate(_ctx.$t("packages.allowances"))}</h3><div class="space-y-2"><div class="flex items-center justify-between text-sm"><span class="text-slate-400">${ssrInterpolate(_ctx.$t("packages.max_vehicles"))}</span><span class="text-slate-200 font-medium">${ssrInterpolate(getAllowance(pkg, "max_vehicles"))}</span></div><div class="flex items-center justify-between text-sm"><span class="text-slate-400">${ssrInterpolate(_ctx.$t("packages.max_garages"))}</span><span class="text-slate-200 font-medium">${ssrInterpolate(getAllowance(pkg, "max_garages"))}</span></div><div class="flex items-center justify-between text-sm"><span class="text-slate-400">${ssrInterpolate(_ctx.$t("packages.max_users"))}</span><span class="text-slate-200 font-medium">${ssrInterpolate(getAllowance(pkg, "max_users"))}</span></div><div class="flex items-center justify-between text-sm"><span class="text-slate-400">${ssrInterpolate(_ctx.$t("packages.monthly_credits"))}</span><span class="text-slate-200 font-medium">${ssrInterpolate(getAllowance(pkg, "monthly_free_credits"))}</span></div></div></div><div class="mb-4"><span class="text-xs text-slate-500">${ssrInterpolate(_ctx.$t("packages.tier_level"))}: </span><span class="text-xs font-mono text-slate-400">${ssrInterpolate(pkg.tier_level)}</span></div><div class="flex gap-2"><button class="flex-1 px-4 py-2.5 bg-indigo-600 hover:bg-indigo-500 text-white font-medium rounded-lg transition text-sm">${ssrInterpolate(_ctx.$t("common.edit"))}</button><button class="px-3 py-2.5 bg-emerald-700 hover:bg-emerald-600 text-emerald-200 rounded-lg transition"${ssrRenderAttr("title", _ctx.$t("packages.duplicate"))}><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg></button><button class="px-3 py-2.5 bg-red-700 hover:bg-red-600 text-red-200 rounded-lg transition"${ssrRenderAttr("title", _ctx.$t("common.delete"))}><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><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"></path></svg></button></div></div>`);
|
||||
});
|
||||
_push(`<!--]--></div></div>`);
|
||||
}
|
||||
if (showModal.value) {
|
||||
_push(`<div class="fixed inset-0 z-50 flex items-center justify-center bg-black/60"><div class="bg-slate-800 border border-slate-700 rounded-xl w-full max-w-3xl mx-4 shadow-2xl max-h-[90vh] flex flex-col"><div class="flex items-center justify-between px-6 py-4 border-b border-slate-700"><h3 class="text-lg font-semibold text-white">${ssrInterpolate(isCreating.value ? _ctx.$t("common.create_title") : _ctx.$t("common.edit_title") + ": " + getDisplayName(editingPackage.value))}</h3><button class="p-1 rounded-lg text-slate-400 hover:text-white hover:bg-slate-700 transition"><svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg></button></div><div class="px-6 pt-4 pb-2 mb-6"><div class="bg-slate-700/40 border border-slate-600 rounded-xl p-4"><label class="block text-sm font-semibold text-slate-200 mb-3">${ssrInterpolate(_ctx.$t("packages.form_type"))}</label><div class="flex gap-4"><label class="${ssrRenderClass([form.type === "base" || form.type === "private" || form.type === "corporate" ? "border-indigo-500 bg-indigo-500/10" : "border-slate-600 bg-slate-700/50 hover:border-slate-500", "flex-1 flex items-center gap-3 px-4 py-3 rounded-lg border-2 cursor-pointer transition"])}"><input type="radio" name="packageType" value="private"${ssrIncludeBooleanAttr(ssrLooseEqual(form.type, "private")) ? " checked" : ""} class="sr-only"><div class="${ssrRenderClass([form.type === "private" || form.type === "corporate" || form.type === "base" ? "border-indigo-500" : "border-slate-500", "w-5 h-5 rounded-full border-2 flex items-center justify-center flex-shrink-0"])}">`);
|
||||
if (form.type === "private" || form.type === "corporate" || form.type === "base") {
|
||||
_push(`<div class="w-2.5 h-2.5 rounded-full bg-indigo-500"></div>`);
|
||||
} else {
|
||||
_push(`<!---->`);
|
||||
}
|
||||
_push(`</div><div><span class="text-sm font-medium text-white">📦 Alapcsomag (Base Tier)</span><p class="text-xs text-slate-400 mt-0.5">Teljes jogú csomag járművekkel, garázsokkal, felhasználókkal</p></div></label><label class="${ssrRenderClass([form.type === "addon" ? "border-amber-500 bg-amber-500/10" : "border-slate-600 bg-slate-700/50 hover:border-slate-500", "flex-1 flex items-center gap-3 px-4 py-3 rounded-lg border-2 cursor-pointer transition"])}"><input type="radio" name="packageType" value="addon"${ssrIncludeBooleanAttr(ssrLooseEqual(form.type, "addon")) ? " checked" : ""} class="sr-only"><div class="${ssrRenderClass([form.type === "addon" ? "border-amber-500" : "border-slate-500", "w-5 h-5 rounded-full border-2 flex items-center justify-center flex-shrink-0"])}">`);
|
||||
if (form.type === "addon") {
|
||||
_push(`<div class="w-2.5 h-2.5 rounded-full bg-amber-500"></div>`);
|
||||
} else {
|
||||
_push(`<!---->`);
|
||||
}
|
||||
_push(`</div><div><span class="text-sm font-medium text-white">➕ Kiegészítő (Add-on)</span><p class="text-xs text-slate-400 mt-0.5">Kiegészítő modul meglévő csomaghoz, korlátozott opciókkal</p></div></label></div></div></div><div class="flex border-b border-slate-700 px-6"><!--[-->`);
|
||||
ssrRenderList(tabs, (tab) => {
|
||||
_push(`<button class="${ssrRenderClass([activeTab.value === tab.key ? "border-indigo-500 text-indigo-300" : "border-transparent text-slate-400 hover:text-slate-200 hover:border-slate-500", "px-4 py-3 text-sm font-medium border-b-2 transition"])}">${ssrInterpolate(tab.label)}</button>`);
|
||||
});
|
||||
_push(`<!--]--></div><div class="flex-1 overflow-y-auto px-6 py-5">`);
|
||||
if (activeTab.value === "basic") {
|
||||
_push(`<div class="space-y-4"><div><label class="block text-sm font-medium text-slate-300 mb-1">${ssrInterpolate(_ctx.$t("packages.form_name"))}</label><input${ssrRenderAttr("value", form.name)} type="text" class="w-full px-3 py-2 bg-slate-700 border border-slate-600 rounded-lg text-white text-sm focus:ring-2 focus:ring-indigo-500 focus:border-transparent"${ssrRenderAttr("placeholder", _ctx.$t("packages.form_name_placeholder"))}></div><div><label class="block text-sm font-medium text-slate-300 mb-1">${ssrInterpolate(_ctx.$t("packages.form_display_name"))}</label><input${ssrRenderAttr("value", form.display_name)} type="text" class="w-full px-3 py-2 bg-slate-700 border border-slate-600 rounded-lg text-white text-sm focus:ring-2 focus:ring-indigo-500 focus:border-transparent"${ssrRenderAttr("placeholder", _ctx.$t("packages.form_display_name_placeholder"))}></div>`);
|
||||
if (form.type !== "addon") {
|
||||
_push(`<div><label class="block text-sm font-medium text-slate-300 mb-1">${ssrInterpolate(_ctx.$t("packages.form_tier_level"))}</label><input${ssrRenderAttr("value", form.tier_level)} type="number" min="0" max="10" class="w-full px-3 py-2 bg-slate-700 border border-slate-600 rounded-lg text-white text-sm focus:ring-2 focus:ring-indigo-500 focus:border-transparent"><p class="text-xs text-slate-500 mt-1">${ssrInterpolate(_ctx.$t("packages.form_tier_level_hint"))}</p></div>`);
|
||||
} else {
|
||||
_push(`<!---->`);
|
||||
}
|
||||
if (form.type !== "addon") {
|
||||
_push(`<div class="grid grid-cols-2 gap-4"><div><label class="block text-sm font-medium text-slate-300 mb-1">${ssrInterpolate(_ctx.$t("packages.form_subtitle"))}</label><input${ssrRenderAttr("value", form.subtitle)} type="text" class="w-full px-3 py-2 bg-slate-700 border border-slate-600 rounded-lg text-white text-sm focus:ring-2 focus:ring-indigo-500 focus:border-transparent"${ssrRenderAttr("placeholder", _ctx.$t("packages.form_subtitle_placeholder"))}></div><div><label class="block text-sm font-medium text-slate-300 mb-1">${ssrInterpolate(_ctx.$t("packages.form_badge"))}</label><input${ssrRenderAttr("value", form.badge)} type="text" class="w-full px-3 py-2 bg-slate-700 border border-slate-600 rounded-lg text-white text-sm focus:ring-2 focus:ring-indigo-500 focus:border-transparent"${ssrRenderAttr("placeholder", _ctx.$t("packages.form_badge_placeholder"))}></div></div>`);
|
||||
} else {
|
||||
_push(`<!---->`);
|
||||
}
|
||||
_push(`<div class="flex items-center gap-3"><input${ssrIncludeBooleanAttr(Array.isArray(form.is_custom) ? ssrLooseContain(form.is_custom, null) : form.is_custom) ? " checked" : ""} type="checkbox" id="is_custom" class="rounded bg-slate-700 border-slate-600 text-indigo-600 focus:ring-indigo-500"><label for="is_custom" class="text-sm text-slate-300">${ssrInterpolate(_ctx.$t("packages.form_is_custom"))}</label></div>`);
|
||||
if (form.type !== "addon") {
|
||||
_push(`<div class="border-t border-slate-700 pt-4"><h4 class="text-sm font-semibold text-slate-300 mb-3">${ssrInterpolate(_ctx.$t("packages.singleton_rules"))}</h4><div class="space-y-4"><div class="flex items-center gap-3"><input${ssrIncludeBooleanAttr(Array.isArray(form.is_default_fallback) ? ssrLooseContain(form.is_default_fallback, null) : form.is_default_fallback) ? " checked" : ""} type="checkbox" id="is_default_fallback" class="rounded bg-slate-700 border-slate-600 text-amber-500 focus:ring-amber-500"><label for="is_default_fallback" class="text-sm text-slate-300">${ssrInterpolate(_ctx.$t("packages.form_is_default_fallback"))}</label></div><div><label class="block text-sm text-slate-300 mb-1">${ssrInterpolate(_ctx.$t("packages.form_trial_days"))}</label><input${ssrRenderAttr("value", form.trial_days_on_signup)} type="number" min="0" max="365" class="w-full px-3 py-2 bg-slate-700 border border-slate-600 rounded-lg text-white text-sm focus:ring-2 focus:ring-emerald-500 focus:border-transparent"><p class="text-xs text-slate-500 mt-1">${ssrInterpolate(_ctx.$t("packages.form_trial_days_hint"))}</p></div></div></div>`);
|
||||
} else {
|
||||
_push(`<!---->`);
|
||||
}
|
||||
_push(`</div>`);
|
||||
} else {
|
||||
_push(`<!---->`);
|
||||
}
|
||||
if (activeTab.value === "pricing") {
|
||||
_push(`<div class="space-y-6"><div><h4 class="text-sm font-semibold text-slate-300 mb-3">${ssrInterpolate(_ctx.$t("packages.per_region_pricing"))}</h4><div class="overflow-x-auto"><table class="w-full text-sm"><thead><tr class="border-b border-slate-700"><th class="text-left py-2 px-3 text-slate-400 font-medium">Region</th><th class="text-left py-2 px-3 text-slate-400 font-medium">${ssrInterpolate(_ctx.$t("packages.form_monthly_price"))}</th><th class="text-left py-2 px-3 text-slate-400 font-medium">${ssrInterpolate(_ctx.$t("packages.form_yearly_price"))}</th><th class="text-left py-2 px-3 text-slate-400 font-medium">Kredit Ár</th><th class="text-left py-2 px-3 text-slate-400 font-medium">${ssrInterpolate(_ctx.$t("packages.form_currency"))}</th><th class="text-left py-2 px-3 text-slate-400 font-medium"></th></tr></thead><tbody><!--[-->`);
|
||||
ssrRenderList(unref(regionStore).regions, (region) => {
|
||||
_push(`<tr class="border-b border-slate-700/50"><td class="py-2 px-3 text-slate-200 font-medium"><span class="inline-flex items-center gap-1.5"><span>${ssrInterpolate(region.country_code)}</span><span class="text-xs text-slate-500">(${ssrInterpolate(region.currency)}, ${ssrInterpolate(region.default_vat_rate)}% VAT)</span></span></td><td class="py-2 px-3"><input${ssrRenderAttr("value", getZonePrice(region.country_code, "monthly"))} type="number" step="0.01" min="0" class="w-full px-2 py-1.5 bg-slate-700 border border-slate-600 rounded-lg text-white text-sm focus:ring-2 focus:ring-indigo-500 focus:border-transparent"></td><td class="py-2 px-3"><input${ssrRenderAttr("value", getZonePrice(region.country_code, "yearly"))} type="number" step="0.01" min="0" class="w-full px-2 py-1.5 bg-slate-700 border border-slate-600 rounded-lg text-white text-sm focus:ring-2 focus:ring-indigo-500 focus:border-transparent"></td><td class="py-2 px-3"><input${ssrRenderAttr("value", getZoneCreditPrice(region.country_code))} type="number" step="0.01" min="0" class="w-full px-2 py-1.5 bg-slate-700 border border-slate-600 rounded-lg text-white text-sm focus:ring-2 focus:ring-indigo-500 focus:border-transparent"></td><td class="py-2 px-3"><input${ssrRenderAttr("value", getZoneCurrency(region.country_code))} type="text" maxlength="3" class="w-full px-2 py-1.5 bg-slate-700 border border-slate-600 rounded-lg text-white text-sm focus:ring-2 focus:ring-indigo-500 focus:border-transparent uppercase"></td><td class="py-2 px-3 text-center"><div class="flex items-center gap-1"><button class="p-1.5 rounded-lg text-emerald-400 hover:text-emerald-300 hover:bg-emerald-500/10 transition"${ssrRenderAttr("title", "Apply DEFAULT pricing to " + region.country_code)}><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z"></path></svg></button><button class="p-1.5 rounded-lg text-red-400 hover:text-red-300 hover:bg-red-500/10 transition"${ssrRenderAttr("title", "Remove " + region.country_code)}><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><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"></path></svg></button></div></td></tr>`);
|
||||
});
|
||||
_push(`<!--]--></tbody></table></div><div class="flex items-center gap-3 mt-4"><select class="px-3 py-2 bg-slate-700 border border-slate-600 rounded-lg text-white text-sm focus:ring-2 focus:ring-indigo-500 focus:border-transparent"><option value="" disabled${ssrIncludeBooleanAttr(Array.isArray(selectedAddZoneCode.value) ? ssrLooseContain(selectedAddZoneCode.value, "") : ssrLooseEqual(selectedAddZoneCode.value, "")) ? " selected" : ""}>${ssrInterpolate(_ctx.$t("packages.add_zone_select"))}</option><!--[-->`);
|
||||
ssrRenderList(availableRegionsToAdd.value, (region) => {
|
||||
_push(`<option${ssrRenderAttr("value", region.country_code)}${ssrIncludeBooleanAttr(Array.isArray(selectedAddZoneCode.value) ? ssrLooseContain(selectedAddZoneCode.value, region.country_code) : ssrLooseEqual(selectedAddZoneCode.value, region.country_code)) ? " selected" : ""}>${ssrInterpolate(region.country_code)} — ${ssrInterpolate(region.name)} (${ssrInterpolate(region.currency)}, ${ssrInterpolate(region.default_vat_rate)}% VAT) </option>`);
|
||||
});
|
||||
_push(`<!--]--></select><button${ssrIncludeBooleanAttr(!selectedAddZoneCode.value) ? " disabled" : ""} class="px-4 py-2 bg-indigo-600 hover:bg-indigo-500 disabled:bg-slate-600 disabled:cursor-not-allowed text-white text-sm font-medium rounded-lg transition flex items-center gap-2"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v16m8-8H4"></path></svg> ${ssrInterpolate(_ctx.$t("packages.add_zone"))}</button></div></div><div class="border-t border-slate-700 pt-5"><h4 class="text-sm font-semibold text-slate-300 mb-3">🧮 ${ssrInterpolate(_ctx.$t("packages.smart_calculator"))}</h4><div class="bg-slate-700/30 rounded-xl p-4 space-y-4"><div class="grid grid-cols-3 gap-4"><div><label class="block text-xs text-slate-400 mb-1">${ssrInterpolate(_ctx.$t("packages.calc_net_price"))}</label><input${ssrRenderAttr("value", calcNetPrice.value)} type="number" step="0.01" min="0" class="w-full px-3 py-2 bg-slate-700 border border-slate-600 rounded-lg text-white text-sm focus:ring-2 focus:ring-emerald-500 focus:border-transparent" placeholder="0.00"></div><div><label class="block text-xs text-slate-400 mb-1">${ssrInterpolate(_ctx.$t("packages.calc_vat_rate"))}</label><select class="w-full px-3 py-2 bg-slate-700 border border-slate-600 rounded-lg text-white text-sm focus:ring-2 focus:ring-emerald-500 focus:border-transparent"><!--[-->`);
|
||||
ssrRenderList(unref(regionStore).regions, (region) => {
|
||||
_push(`<option${ssrRenderAttr("value", region.default_vat_rate)}${ssrIncludeBooleanAttr(Array.isArray(calcVatRate.value) ? ssrLooseContain(calcVatRate.value, region.default_vat_rate) : ssrLooseEqual(calcVatRate.value, region.default_vat_rate)) ? " selected" : ""}>${ssrInterpolate(region.country_code)} — ${ssrInterpolate(region.default_vat_rate)}% </option>`);
|
||||
});
|
||||
_push(`<!--]--></select></div><div><label class="block text-xs text-slate-400 mb-1">${ssrInterpolate(_ctx.$t("packages.calc_currency"))}</label><select class="w-full px-3 py-2 bg-slate-700 border border-slate-600 rounded-lg text-white text-sm focus:ring-2 focus:ring-emerald-500 focus:border-transparent"><!--[-->`);
|
||||
ssrRenderList(unref(regionStore).regions, (region) => {
|
||||
_push(`<option${ssrRenderAttr("value", region.currency)}${ssrIncludeBooleanAttr(Array.isArray(calcCurrency.value) ? ssrLooseContain(calcCurrency.value, region.currency) : ssrLooseEqual(calcCurrency.value, region.currency)) ? " selected" : ""}>${ssrInterpolate(region.currency)} (${ssrInterpolate(region.country_code)}) </option>`);
|
||||
});
|
||||
_push(`<!--]--></select></div></div><div class="grid grid-cols-3 gap-4 pt-2"><div class="bg-slate-800 rounded-lg p-3 text-center"><p class="text-xs text-slate-400 mb-1">${ssrInterpolate(_ctx.$t("packages.calc_net"))}</p><p class="text-lg font-bold text-white">${ssrInterpolate(unref(formatCurrency)(calcNetPrice.value, calcCurrency.value))}</p></div><div class="bg-slate-800 rounded-lg p-3 text-center"><p class="text-xs text-slate-400 mb-1">${ssrInterpolate(_ctx.$t("packages.calc_vat"))} (${ssrInterpolate(calcVatRate.value)}%)</p><p class="text-lg font-bold text-amber-400">${ssrInterpolate(unref(formatCurrency)(calcNetPrice.value * (calcVatRate.value / 100), calcCurrency.value))}</p></div><div class="bg-slate-800 rounded-lg p-3 text-center ring-2 ring-emerald-500/50"><p class="text-xs text-slate-400 mb-1">${ssrInterpolate(_ctx.$t("packages.calc_gross"))}</p><p class="text-lg font-bold text-emerald-400">${ssrInterpolate(unref(formatCurrency)(calcNetPrice.value * (1 + calcVatRate.value / 100), calcCurrency.value))}</p></div></div><div class="flex justify-end pt-1"><button class="px-4 py-2 bg-emerald-600 hover:bg-emerald-500 text-white text-sm font-medium rounded-lg transition flex items-center gap-2"><svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z"></path></svg> ${ssrInterpolate(_ctx.$t("packages.calc_apply"))}</button></div></div></div></div>`);
|
||||
} else {
|
||||
_push(`<!---->`);
|
||||
}
|
||||
if (activeTab.value === "features") {
|
||||
_push(`<div class="space-y-5"><div><h4 class="text-sm font-semibold text-slate-300 mb-3">${ssrInterpolate(_ctx.$t("packages.allowances"))}</h4><div class="grid grid-cols-3 gap-4"><div><label class="block text-xs text-slate-400 mb-1">${ssrInterpolate(_ctx.$t("packages.max_vehicles"))}</label><input${ssrRenderAttr("value", form.max_vehicles)} type="number" min="0" class="w-full px-3 py-2 bg-slate-700 border border-slate-600 rounded-lg text-white text-sm focus:ring-2 focus:ring-indigo-500 focus:border-transparent"></div><div><label class="block text-xs text-slate-400 mb-1">${ssrInterpolate(_ctx.$t("packages.max_garages"))}</label><input${ssrRenderAttr("value", form.max_garages)} type="number" min="0" class="w-full px-3 py-2 bg-slate-700 border border-slate-600 rounded-lg text-white text-sm focus:ring-2 focus:ring-indigo-500 focus:border-transparent"></div><div><label class="block text-xs text-slate-400 mb-1">${ssrInterpolate(_ctx.$t("packages.max_users"))}</label><input${ssrRenderAttr("value", form.max_users)} type="number" min="1" class="w-full px-3 py-2 bg-slate-700 border border-slate-600 rounded-lg text-white text-sm focus:ring-2 focus:ring-indigo-500 focus:border-transparent"></div><div><label class="block text-xs text-slate-400 mb-1">${ssrInterpolate(_ctx.$t("packages.monthly_credits"))}</label><input${ssrRenderAttr("value", form.monthly_free_credits)} type="number" min="0" class="w-full px-3 py-2 bg-slate-700 border border-slate-600 rounded-lg text-white text-sm focus:ring-2 focus:ring-indigo-500 focus:border-transparent"></div></div></div><div class="border-t border-slate-700 pt-4"><h4 class="text-sm font-semibold text-slate-300 mb-3">SaaS Allowances</h4><div class="grid grid-cols-3 gap-4"><div><label class="block text-xs text-slate-400 mb-1">Költségkategória mélység (max_cost_category_depth)</label><input${ssrRenderAttr("value", form.max_cost_category_depth)} type="number" min="0" max="10" class="w-full px-3 py-2 bg-slate-700 border border-slate-600 rounded-lg text-white text-sm focus:ring-2 focus:ring-indigo-500 focus:border-transparent"></div><div><label class="block text-xs text-slate-400 mb-1">Statisztika (advanced_reports)</label><div class="flex items-center h-[38px]"><label class="relative inline-flex items-center cursor-pointer"><input${ssrIncludeBooleanAttr(Array.isArray(form.advanced_reports) ? ssrLooseContain(form.advanced_reports, null) : form.advanced_reports) ? " checked" : ""} type="checkbox" class="sr-only peer"><div class="w-11 h-6 bg-slate-600 peer-focus:outline-none peer-focus:ring-2 peer-focus:ring-indigo-500 rounded-full peer peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-indigo-600"></div><span class="ms-3 text-sm text-slate-300">${ssrInterpolate(form.advanced_reports ? "Enabled" : "Disabled")}</span></label></div></div><div><label class="block text-xs text-slate-400 mb-1">PDF/CSV Export (export_data)</label><div class="flex items-center h-[38px]"><label class="relative inline-flex items-center cursor-pointer"><input${ssrIncludeBooleanAttr(Array.isArray(form.export_data) ? ssrLooseContain(form.export_data, null) : form.export_data) ? " checked" : ""} type="checkbox" class="sr-only peer"><div class="w-11 h-6 bg-slate-600 peer-focus:outline-none peer-focus:ring-2 peer-focus:ring-indigo-500 rounded-full peer peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-indigo-600"></div><span class="ms-3 text-sm text-slate-300">${ssrInterpolate(form.export_data ? "Enabled" : "Disabled")}</span></label></div></div></div></div><div class="border-t border-slate-700 pt-4"><h4 class="text-sm font-semibold text-slate-300 mb-3">${ssrInterpolate(_ctx.$t("packages.feature_capabilities"))}</h4><textarea rows="8" class="w-full px-3 py-2 bg-slate-700 border border-slate-600 rounded-lg text-white text-sm font-mono focus:ring-2 focus:ring-indigo-500 focus:border-transparent" placeholder="{\\n "ai_analysis": true,\\n "priority_support": false,\\n "api_access": true\\n}">${ssrInterpolate(form.feature_capabilities_json)}</textarea><p class="text-xs text-slate-500 mt-1">${ssrInterpolate(_ctx.$t("packages.feature_capabilities_hint"))}</p>`);
|
||||
if (featureCapabilitiesError.value) {
|
||||
_push(`<p class="text-xs text-red-400 mt-1">${ssrInterpolate(featureCapabilitiesError.value)}</p>`);
|
||||
} else {
|
||||
_push(`<!---->`);
|
||||
}
|
||||
_push(`</div></div>`);
|
||||
} else {
|
||||
_push(`<!---->`);
|
||||
}
|
||||
_push(`</div><div class="flex items-center justify-between px-6 py-4 border-t border-slate-700"><div class="text-xs text-slate-500">${ssrInterpolate(activeTabLabel.value)}</div><div class="flex items-center gap-3"><button class="px-4 py-2 text-sm text-slate-400 hover:text-white transition">${ssrInterpolate(_ctx.$t("common.cancel"))}</button><button${ssrIncludeBooleanAttr(saving.value) ? " disabled" : ""} class="px-6 py-2 bg-emerald-600 hover:bg-emerald-500 disabled:bg-slate-600 disabled:cursor-not-allowed text-white font-medium rounded-lg transition text-sm flex items-center gap-2">`);
|
||||
if (saving.value) {
|
||||
_push(`<svg class="animate-spin h-4 w-4" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle><path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"></path></svg>`);
|
||||
} else {
|
||||
_push(`<!---->`);
|
||||
}
|
||||
_push(` ${ssrInterpolate(isCreating.value ? _ctx.$t("common.create") : _ctx.$t("common.save"))}</button></div></div></div></div>`);
|
||||
} else {
|
||||
_push(`<!---->`);
|
||||
}
|
||||
if (showDeleteConfirm.value && deletingPackage.value) {
|
||||
_push(`<div class="fixed inset-0 z-50 flex items-center justify-center bg-black/60"><div class="bg-slate-800 border border-slate-700 rounded-xl w-full max-w-md mx-4 p-6 shadow-2xl"><h3 class="text-lg font-semibold text-white mb-2">${ssrInterpolate(_ctx.$t("common.delete_title"))}</h3><p class="text-slate-400 text-sm mb-6">${ssrInterpolate(_ctx.$t("packages.delete_confirm", { name: getDisplayName(deletingPackage.value) }))}</p><div class="flex items-center justify-end gap-3"><button class="px-4 py-2 text-sm text-slate-400 hover:text-white transition">${ssrInterpolate(_ctx.$t("common.cancel"))}</button><button${ssrIncludeBooleanAttr(saving.value) ? " disabled" : ""} class="px-6 py-2 bg-red-600 hover:bg-red-500 disabled:bg-slate-600 disabled:cursor-not-allowed text-white font-medium rounded-lg transition text-sm">${ssrInterpolate(_ctx.$t("common.delete_btn"))}</button></div></div></div>`);
|
||||
} else {
|
||||
_push(`<!---->`);
|
||||
}
|
||||
if (saveNotification.value) {
|
||||
_push(`<div class="${ssrRenderClass([saveNotification.value.type === "success" ? "bg-emerald-600 text-white" : "bg-red-600 text-white", "fixed bottom-6 right-6 px-5 py-3 rounded-xl shadow-xl text-sm font-medium z-50"])}">${ssrInterpolate(saveNotification.value.message)}</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/packages/index.vue");
|
||||
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
|
||||
};
|
||||
export {
|
||||
_sfc_main as default
|
||||
};
|
||||
//# sourceMappingURL=index-BOjUVIK8.js.map
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,266 +0,0 @@
|
||||
import { _ as __nuxt_component_0 } from "./nuxt-link-1NBbHb-h.js";
|
||||
import { defineComponent, ref, watch, computed, withCtx, createTextVNode, toDisplayString, useSSRContext } from "vue";
|
||||
import { ssrRenderAttrs, ssrInterpolate, ssrRenderAttr, ssrIncludeBooleanAttr, ssrLooseContain, ssrLooseEqual, ssrRenderList, ssrRenderClass, ssrRenderComponent } from "vue/server-renderer";
|
||||
import "/app/node_modules/hookable/dist/index.mjs";
|
||||
import { d as useCookie } from "../server.mjs";
|
||||
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/unctx/dist/index.mjs";
|
||||
import "/app/node_modules/h3/dist/index.mjs";
|
||||
import "pinia";
|
||||
import "vue-router";
|
||||
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 = /* @__PURE__ */ defineComponent({
|
||||
__name: "index",
|
||||
__ssrInlineRender: true,
|
||||
setup(__props) {
|
||||
const loading = ref(true);
|
||||
const error = ref(null);
|
||||
const garages = ref([]);
|
||||
const availableTiers = ref([]);
|
||||
const searchQuery = ref("");
|
||||
const filterType = ref("all");
|
||||
const selectedPackage = ref("all");
|
||||
const availableTierNames = ref([]);
|
||||
const showSubscriptionModal = ref(false);
|
||||
const selectedGarage = ref(null);
|
||||
const selectedTierId = ref("");
|
||||
const customExpiresAt = ref("");
|
||||
const saving = ref(false);
|
||||
const saveError = ref(null);
|
||||
const saveNotification = ref(null);
|
||||
let searchDebounceTimer = null;
|
||||
function debouncedFetchGarages() {
|
||||
if (searchDebounceTimer) {
|
||||
clearTimeout(searchDebounceTimer);
|
||||
}
|
||||
searchDebounceTimer = setTimeout(() => {
|
||||
fetchGarages();
|
||||
}, 400);
|
||||
}
|
||||
watch(searchQuery, () => {
|
||||
debouncedFetchGarages();
|
||||
});
|
||||
watch(filterType, () => {
|
||||
fetchGarages();
|
||||
});
|
||||
watch(selectedPackage, () => {
|
||||
fetchGarages();
|
||||
});
|
||||
const globalTotalCount = ref(0);
|
||||
const globalIndividualCount = ref(0);
|
||||
const globalCorporateCount = ref(0);
|
||||
const isFilterActive = computed(() => {
|
||||
return searchQuery.value !== "" || filterType.value !== "all" || selectedPackage.value !== "all";
|
||||
});
|
||||
watch(garages, (newGarages) => {
|
||||
const currentSet = new Set(availableTierNames.value);
|
||||
for (const g of newGarages) {
|
||||
if (g.subscription_tier_name) {
|
||||
currentSet.add(g.subscription_tier_name);
|
||||
}
|
||||
}
|
||||
availableTierNames.value = Array.from(currentSet).sort();
|
||||
}, { immediate: true, deep: true });
|
||||
const filteredGarages = computed(() => garages.value);
|
||||
function getAuthHeaders() {
|
||||
const tokenCookie = useCookie("access_token");
|
||||
const token = tokenCookie.value;
|
||||
return token ? { Authorization: `Bearer ${token}` } : {};
|
||||
}
|
||||
async function fetchGarages() {
|
||||
loading.value = true;
|
||||
error.value = null;
|
||||
try {
|
||||
const params = { limit: 200 };
|
||||
if (searchQuery.value) {
|
||||
params.search_term = searchQuery.value;
|
||||
}
|
||||
if (filterType.value !== "all") {
|
||||
params.org_type_filter = filterType.value;
|
||||
}
|
||||
if (selectedPackage.value !== "all") {
|
||||
params.tier_name_filter = selectedPackage.value;
|
||||
}
|
||||
const response = await $fetch("/api/v1/admin/organizations", {
|
||||
params,
|
||||
headers: getAuthHeaders()
|
||||
});
|
||||
garages.value = response.garages;
|
||||
if (!isFilterActive.value) {
|
||||
globalTotalCount.value = response.total;
|
||||
globalIndividualCount.value = garages.value.filter((g) => g.org_type === "individual").length;
|
||||
globalCorporateCount.value = garages.value.filter((g) => g.org_type !== "individual").length;
|
||||
}
|
||||
} catch (err) {
|
||||
console.error("[Garages] Failed to fetch garages:", err);
|
||||
error.value = err?.data?.detail || err?.message || "Failed to load garages";
|
||||
} finally {
|
||||
loading.value = false;
|
||||
}
|
||||
}
|
||||
function garageDisplayName(garage) {
|
||||
return garage.display_name || garage.name || garage.full_name;
|
||||
}
|
||||
function getInitials(name) {
|
||||
return name.split(" ").map((w) => w.charAt(0)).join("").toUpperCase().slice(0, 2);
|
||||
}
|
||||
function getInitialsColor(name) {
|
||||
const colors = [
|
||||
"bg-amber-600",
|
||||
"bg-purple-600",
|
||||
"bg-slate-600",
|
||||
"bg-indigo-600",
|
||||
"bg-emerald-600",
|
||||
"bg-rose-600",
|
||||
"bg-cyan-600",
|
||||
"bg-orange-600",
|
||||
"bg-teal-600"
|
||||
];
|
||||
let hash = 0;
|
||||
for (let i = 0; i < name.length; i++) {
|
||||
hash = name.charCodeAt(i) + ((hash << 5) - hash);
|
||||
}
|
||||
return colors[Math.abs(hash) % colors.length];
|
||||
}
|
||||
function statusBadgeClass(status) {
|
||||
if (status === "active") return "bg-emerald-500/10 text-emerald-400";
|
||||
if (status === "suspended") return "bg-red-500/10 text-red-400";
|
||||
if (status === "pending_verification") return "bg-amber-500/10 text-amber-400";
|
||||
return "bg-slate-500/10 text-slate-400";
|
||||
}
|
||||
function statusDotClass(status) {
|
||||
if (status === "active") return "bg-emerald-400";
|
||||
if (status === "suspended") return "bg-red-400";
|
||||
if (status === "pending_verification") return "bg-amber-400";
|
||||
return "bg-slate-400";
|
||||
}
|
||||
function statusLabel(status) {
|
||||
if (status === "active") return "Aktív";
|
||||
if (status === "suspended") return "Felfüggesztve";
|
||||
if (status === "pending_verification") return "Függőben";
|
||||
return "Inaktív";
|
||||
}
|
||||
function tierBadgeClass(tierName) {
|
||||
const name = tierName.toLowerCase();
|
||||
if (name.includes("enterprise") || name.includes("vip") || name.includes("corp")) return "bg-purple-500/20 text-purple-300";
|
||||
if (name.includes("premium") || name.includes("pro")) return "bg-amber-500/20 text-amber-300";
|
||||
return "bg-slate-500/20 text-slate-300";
|
||||
}
|
||||
function formatDate(dateStr) {
|
||||
try {
|
||||
const d = new Date(dateStr);
|
||||
return d.toLocaleDateString("hu-HU", {
|
||||
year: "numeric",
|
||||
month: "short",
|
||||
day: "numeric"
|
||||
});
|
||||
} catch {
|
||||
return dateStr;
|
||||
}
|
||||
}
|
||||
return (_ctx, _push, _parent, _attrs) => {
|
||||
const _component_NuxtLink = __nuxt_component_0;
|
||||
_push(`<div${ssrRenderAttrs(_attrs)}><div class="mb-8"><h1 class="text-2xl font-bold text-white">${ssrInterpolate(_ctx.$t("garages.title"))}</h1><p class="text-slate-400 mt-1">${ssrInterpolate(_ctx.$t("garages.subtitle"))}</p></div><div class="flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4 mb-6"><div class="relative flex-1 max-w-md"><svg class="absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-500" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path></svg><input${ssrRenderAttr("value", searchQuery.value)} type="text"${ssrRenderAttr("placeholder", _ctx.$t("common.search_placeholder"))} class="w-full pl-10 pr-4 py-2.5 bg-slate-800 border border-slate-700 rounded-lg text-sm text-white placeholder-slate-500 focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500 transition"></div><div class="flex items-center gap-2"><select class="px-3 py-2.5 bg-slate-800 border border-slate-700 rounded-lg text-sm text-slate-300 focus:outline-none focus:ring-2 focus:ring-indigo-500/50 transition"><option value="all"${ssrIncludeBooleanAttr(Array.isArray(filterType.value) ? ssrLooseContain(filterType.value, "all") : ssrLooseEqual(filterType.value, "all")) ? " selected" : ""}>${ssrInterpolate(_ctx.$t("garages.all_types"))}</option><option value="individual"${ssrIncludeBooleanAttr(Array.isArray(filterType.value) ? ssrLooseContain(filterType.value, "individual") : ssrLooseEqual(filterType.value, "individual")) ? " selected" : ""}>${ssrInterpolate(_ctx.$t("garages.type_individual"))}</option><option value="corporate"${ssrIncludeBooleanAttr(Array.isArray(filterType.value) ? ssrLooseContain(filterType.value, "corporate") : ssrLooseEqual(filterType.value, "corporate")) ? " selected" : ""}>${ssrInterpolate(_ctx.$t("common.type_corporate"))}</option></select><select class="px-3 py-2.5 bg-slate-800 border border-slate-700 rounded-lg text-sm text-slate-300 focus:outline-none focus:ring-2 focus:ring-indigo-500/50 transition"><option value="all"${ssrIncludeBooleanAttr(Array.isArray(selectedPackage.value) ? ssrLooseContain(selectedPackage.value, "all") : ssrLooseEqual(selectedPackage.value, "all")) ? " selected" : ""}>${ssrInterpolate(_ctx.$t("garages.all_tiers"))}</option><!--[-->`);
|
||||
ssrRenderList(availableTierNames.value, (tier) => {
|
||||
_push(`<option${ssrRenderAttr("value", tier)}${ssrIncludeBooleanAttr(Array.isArray(selectedPackage.value) ? ssrLooseContain(selectedPackage.value, tier) : ssrLooseEqual(selectedPackage.value, tier)) ? " selected" : ""}>${ssrInterpolate(tier)}</option>`);
|
||||
});
|
||||
_push(`<!--]--></select></div></div>`);
|
||||
if (loading.value) {
|
||||
_push(`<div class="flex items-center justify-center py-20"><div class="flex flex-col items-center gap-3"><svg class="w-8 h-8 text-indigo-400 animate-spin" fill="none" viewBox="0 0 24 24"><circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle><path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"></path></svg><p class="text-slate-400 text-sm">${ssrInterpolate(_ctx.$t("common.loading"))}</p></div></div>`);
|
||||
} else if (error.value) {
|
||||
_push(`<div class="flex flex-col items-center justify-center py-20 text-center"><svg class="w-12 h-12 text-red-500 mb-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" 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"></path></svg><p class="text-red-400 text-sm mb-2">${ssrInterpolate(error.value)}</p><button class="px-4 py-2 text-sm bg-indigo-600/20 text-indigo-300 hover:bg-indigo-600/30 rounded-lg transition">${ssrInterpolate(_ctx.$t("common.retry"))}</button></div>`);
|
||||
} else {
|
||||
_push(`<!--[--><div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4 mb-8"><div class="bg-slate-800 rounded-xl border border-slate-700 p-4"><div class="flex items-center gap-3"><div class="p-2 rounded-lg bg-indigo-500/10 text-indigo-400"><svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4"></path></svg></div><div><p class="text-xs text-slate-400 uppercase tracking-wider">${ssrInterpolate(_ctx.$t("garages.total_garages"))}</p><p class="text-2xl font-bold text-white">${ssrInterpolate(globalTotalCount.value)}</p></div></div></div><div class="bg-slate-800 rounded-xl border border-slate-700 p-4"><div class="flex items-center gap-3"><div class="p-2 rounded-lg bg-emerald-500/10 text-emerald-400"><svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"></path></svg></div><div><p class="text-xs text-slate-400 uppercase tracking-wider">${ssrInterpolate(_ctx.$t("garages.private_garages"))}</p><p class="text-2xl font-bold text-emerald-400">${ssrInterpolate(globalIndividualCount.value)}</p></div></div></div><div class="bg-slate-800 rounded-xl border border-slate-700 p-4"><div class="flex items-center gap-3"><div class="p-2 rounded-lg bg-amber-500/10 text-amber-400"><svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4"></path></svg></div><div><p class="text-xs text-slate-400 uppercase tracking-wider">${ssrInterpolate(_ctx.$t("garages.corporate_garages"))}</p><p class="text-2xl font-bold text-amber-400">${ssrInterpolate(globalCorporateCount.value)}</p></div></div></div></div>`);
|
||||
if (isFilterActive.value) {
|
||||
_push(`<div class="mb-4 text-xs text-slate-500"> Szűrt találat: <span class="text-slate-300 font-semibold">${ssrInterpolate(garages.value.length)}</span> db </div>`);
|
||||
} else {
|
||||
_push(`<!---->`);
|
||||
}
|
||||
_push(`<div class="bg-slate-800/50 border border-slate-700 rounded-xl overflow-hidden"><div class="overflow-x-auto"><table class="w-full text-sm"><thead><tr class="border-b border-slate-700 bg-slate-800/80"><th class="text-left py-3.5 px-4 text-xs font-semibold uppercase tracking-wider text-slate-400">ID</th><th class="text-left py-3.5 px-4 text-xs font-semibold uppercase tracking-wider text-slate-400">${ssrInterpolate(_ctx.$t("garages.company_name"))}</th><th class="text-left py-3.5 px-4 text-xs font-semibold uppercase tracking-wider text-slate-400">${ssrInterpolate(_ctx.$t("common.status"))}</th><th class="text-left py-3.5 px-4 text-xs font-semibold uppercase tracking-wider text-slate-400">${ssrInterpolate(_ctx.$t("garages.current_package"))}</th><th class="text-left py-3.5 px-4 text-xs font-semibold uppercase tracking-wider text-slate-400">${ssrInterpolate(_ctx.$t("garages.expiration_date"))}</th><th class="text-left py-3.5 px-4 text-xs font-semibold uppercase tracking-wider text-slate-400">${ssrInterpolate(_ctx.$t("common.actions"))}</th></tr></thead><tbody><!--[-->`);
|
||||
ssrRenderList(filteredGarages.value, (garage) => {
|
||||
_push(`<tr class="border-b border-slate-700/50 hover:bg-slate-700/30 transition"><td class="py-3.5 px-4 text-slate-400 font-mono text-xs">${ssrInterpolate(garage.id)}</td><td class="py-3.5 px-4"><div class="flex items-center gap-3"><div class="${ssrRenderClass([getInitialsColor(garageDisplayName(garage)), "w-8 h-8 rounded-lg flex items-center justify-center text-sm font-bold text-white"])}">${ssrInterpolate(getInitials(garageDisplayName(garage)))}</div><div>`);
|
||||
_push(ssrRenderComponent(_component_NuxtLink, {
|
||||
to: "/garages/" + garage.id,
|
||||
class: "text-sm font-medium text-white hover:underline cursor-pointer hover:text-indigo-400 transition-colors"
|
||||
}, {
|
||||
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
||||
if (_push2) {
|
||||
_push2(`${ssrInterpolate(garageDisplayName(garage))}`);
|
||||
} else {
|
||||
return [
|
||||
createTextVNode(toDisplayString(garageDisplayName(garage)), 1)
|
||||
];
|
||||
}
|
||||
}),
|
||||
_: 2
|
||||
}, _parent));
|
||||
_push(`<p class="text-xs text-slate-500">${ssrInterpolate(garage.city || "—")} · ${ssrInterpolate(garage.member_count)} ${ssrInterpolate(_ctx.$t("garages.members"))}</p></div></div></td><td class="py-3.5 px-4"><span class="${ssrRenderClass([statusBadgeClass(garage.status), "inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium"])}"><span class="${ssrRenderClass([statusDotClass(garage.status), "w-1.5 h-1.5 rounded-full mr-1.5"])}"></span> ${ssrInterpolate(statusLabel(garage.status))}</span></td><td class="py-3.5 px-4"><span class="${ssrRenderClass([tierBadgeClass(garage.subscription_tier_name), "px-2.5 py-0.5 rounded-full text-xs font-medium"])}">${ssrInterpolate(garage.subscription_tier_name)}</span></td><td class="py-3.5 px-4">`);
|
||||
if (garage.subscription_expires_at) {
|
||||
_push(`<span class="text-slate-300 text-xs">${ssrInterpolate(formatDate(garage.subscription_expires_at))}</span>`);
|
||||
} else {
|
||||
_push(`<span class="text-slate-500 text-xs italic">${ssrInterpolate(_ctx.$t("garages.indefinite"))}</span>`);
|
||||
}
|
||||
_push(`</td><td class="py-3.5 px-4"><div class="flex items-center gap-2"><button class="px-3 py-1.5 text-xs font-medium bg-slate-600/20 text-slate-300 hover:bg-slate-600/30 rounded-lg transition"${ssrRenderAttr("title", _ctx.$t("garages.view_details"))}>${ssrInterpolate(_ctx.$t("garages.view_details"))}</button><button class="px-3 py-1.5 text-xs font-medium bg-indigo-600/20 text-indigo-300 hover:bg-indigo-600/30 rounded-lg transition">${ssrInterpolate(_ctx.$t("garages.manage_subscription"))}</button><button class="${ssrRenderClass([garage.is_active ? "bg-red-500/10 text-red-300 hover:bg-red-500/20" : "bg-emerald-500/10 text-emerald-300 hover:bg-emerald-500/20", "px-3 py-1.5 text-xs font-medium rounded-lg transition"])}">${ssrInterpolate(garage.is_active ? _ctx.$t("common.deactivate") : _ctx.$t("common.activate"))}</button></div></td></tr>`);
|
||||
});
|
||||
_push(`<!--]--></tbody></table></div>`);
|
||||
if (filteredGarages.value.length === 0 && !loading.value) {
|
||||
_push(`<div class="flex flex-col items-center justify-center py-16 text-center"><svg class="w-12 h-12 text-slate-600 mb-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4"></path></svg><p class="text-slate-400 text-sm">${ssrInterpolate(_ctx.$t("common.no_results"))}</p></div>`);
|
||||
} else {
|
||||
_push(`<!---->`);
|
||||
}
|
||||
_push(`</div><!--]-->`);
|
||||
}
|
||||
if (showSubscriptionModal.value) {
|
||||
_push(`<div class="fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm"><div class="bg-slate-800 border border-slate-700 rounded-2xl shadow-2xl w-full max-w-lg mx-4 overflow-hidden"><div class="px-6 py-4 border-b border-slate-700 flex items-center justify-between"><div><h3 class="text-lg font-semibold text-white">${ssrInterpolate(_ctx.$t("garages.manage_subscription"))}</h3><p class="text-sm text-slate-400 mt-0.5">${ssrInterpolate(selectedGarage.value ? garageDisplayName(selectedGarage.value) : "")}</p></div><button class="p-1.5 rounded-lg text-slate-400 hover:text-white hover:bg-slate-700 transition"><svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg></button></div><div class="px-6 py-5 space-y-5"><div class="bg-slate-900/50 rounded-xl p-4 border border-slate-700/50"><p class="text-xs text-slate-500 uppercase tracking-wider mb-1">${ssrInterpolate(_ctx.$t("garages.current_package"))}</p><p class="text-sm font-medium text-white">${ssrInterpolate(selectedGarage.value?.subscription_tier_name || _ctx.$t("garages.free_fallback"))}</p>`);
|
||||
if (selectedGarage.value?.subscription_expires_at) {
|
||||
_push(`<p class="text-xs text-slate-400 mt-1">${ssrInterpolate(_ctx.$t("common.expires"))}: ${ssrInterpolate(formatDate(selectedGarage.value.subscription_expires_at))}</p>`);
|
||||
} else {
|
||||
_push(`<!---->`);
|
||||
}
|
||||
_push(`</div><div><label class="block text-sm font-medium text-slate-300 mb-2">${ssrInterpolate(_ctx.$t("garages.select_package"))}</label><select class="w-full px-3 py-2.5 bg-slate-900 border border-slate-700 rounded-lg text-sm text-white focus:outline-none focus:ring-2 focus:ring-indigo-500/50 transition"><option value="" disabled${ssrIncludeBooleanAttr(Array.isArray(selectedTierId.value) ? ssrLooseContain(selectedTierId.value, "") : ssrLooseEqual(selectedTierId.value, "")) ? " selected" : ""}>${ssrInterpolate(_ctx.$t("garages.select_package_placeholder"))}</option><!--[-->`);
|
||||
ssrRenderList(availableTiers.value, (tier) => {
|
||||
_push(`<option${ssrRenderAttr("value", tier.id)}${ssrIncludeBooleanAttr(Array.isArray(selectedTierId.value) ? ssrLooseContain(selectedTierId.value, tier.id) : ssrLooseEqual(selectedTierId.value, tier.id)) ? " selected" : ""}>${ssrInterpolate(tier.name)} (Level ${ssrInterpolate(tier.tier_level)}) </option>`);
|
||||
});
|
||||
_push(`<!--]--></select></div><div><label class="block text-sm font-medium text-slate-300 mb-2">${ssrInterpolate(_ctx.$t("garages.custom_expiration"))} <span class="text-xs text-slate-500 ml-1">(${ssrInterpolate(_ctx.$t("garages.optional"))})</span></label><input${ssrRenderAttr("value", customExpiresAt.value)} type="datetime-local" class="w-full px-3 py-2.5 bg-slate-900 border border-slate-700 rounded-lg text-sm text-white focus:outline-none focus:ring-2 focus:ring-indigo-500/50 transition"><p class="text-xs text-slate-500 mt-1.5">${ssrInterpolate(_ctx.$t("garages.custom_expiration_hint"))}</p></div>`);
|
||||
if (saveError.value) {
|
||||
_push(`<div class="bg-red-500/10 border border-red-500/20 rounded-lg px-4 py-3"><p class="text-sm text-red-400">${ssrInterpolate(saveError.value)}</p></div>`);
|
||||
} else {
|
||||
_push(`<!---->`);
|
||||
}
|
||||
_push(`</div><div class="px-6 py-4 border-t border-slate-700 flex items-center justify-end gap-3"><button class="px-4 py-2 text-sm font-medium text-slate-300 hover:text-white transition">${ssrInterpolate(_ctx.$t("common.cancel"))}</button><button${ssrIncludeBooleanAttr(saving.value || !selectedTierId.value) ? " disabled" : ""} class="${ssrRenderClass([saving.value ? "bg-indigo-600/50 text-indigo-200 cursor-wait" : "bg-indigo-600 text-white hover:bg-indigo-500", "px-5 py-2 text-sm font-medium rounded-lg transition disabled:opacity-50 disabled:cursor-not-allowed"])}">`);
|
||||
if (saving.value) {
|
||||
_push(`<span class="flex items-center gap-2"><svg class="w-4 h-4 animate-spin" fill="none" viewBox="0 0 24 24"><circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle><path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"></path></svg> ${ssrInterpolate(_ctx.$t("common.saving"))}</span>`);
|
||||
} else {
|
||||
_push(`<span>${ssrInterpolate(_ctx.$t("common.save"))}</span>`);
|
||||
}
|
||||
_push(`</button></div></div></div>`);
|
||||
} else {
|
||||
_push(`<!---->`);
|
||||
}
|
||||
if (saveNotification.value) {
|
||||
_push(`<div class="${ssrRenderClass([saveNotification.value.type === "success" ? "bg-emerald-600 text-white" : "bg-red-600 text-white", "fixed bottom-6 right-6 px-5 py-3 rounded-xl shadow-xl text-sm font-medium z-50"])}">${ssrInterpolate(saveNotification.value.message)}</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/garages/index.vue");
|
||||
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
|
||||
};
|
||||
export {
|
||||
_sfc_main as default
|
||||
};
|
||||
//# sourceMappingURL=index-Bi2XSDbq.js.map
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1011
frontend_admin/.nuxt/dist/server/_nuxt/index-CKl-ge5n.js
vendored
1011
frontend_admin/.nuxt/dist/server/_nuxt/index-CKl-ge5n.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,212 +0,0 @@
|
||||
import { defineComponent, ref, computed, unref, useSSRContext } from "vue";
|
||||
import { ssrRenderAttrs, ssrInterpolate, ssrRenderClass, ssrRenderList, ssrIncludeBooleanAttr, ssrRenderAttr } from "vue/server-renderer";
|
||||
import "/app/node_modules/hookable/dist/index.mjs";
|
||||
import "/app/node_modules/klona/dist/index.mjs";
|
||||
import { a as useI18n } from "../server.mjs";
|
||||
import "/app/node_modules/ofetch/dist/node.mjs";
|
||||
import "#internal/nuxt/paths";
|
||||
import "/app/node_modules/unctx/dist/index.mjs";
|
||||
import "/app/node_modules/h3/dist/index.mjs";
|
||||
import "pinia";
|
||||
import "/app/node_modules/defu/dist/defu.mjs";
|
||||
import "vue-router";
|
||||
import "/app/node_modules/ufo/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 = /* @__PURE__ */ defineComponent({
|
||||
__name: "index",
|
||||
__ssrInlineRender: true,
|
||||
setup(__props) {
|
||||
const { t: $t } = useI18n();
|
||||
const loading = ref(true);
|
||||
const error = ref(null);
|
||||
const roles = ref([]);
|
||||
const permissions = ref([]);
|
||||
const activeDomain = ref("__all__");
|
||||
const filteredRoleIds = ref(/* @__PURE__ */ new Set());
|
||||
const modifiedRoles = ref(/* @__PURE__ */ new Map());
|
||||
ref(/* @__PURE__ */ new Map());
|
||||
const saveNotification = ref(null);
|
||||
const domainOptions = computed(() => {
|
||||
const domains = new Set(permissions.value.map((p) => p.domain));
|
||||
const options = [
|
||||
{ value: "__all__", label: $t("permissions.all_domains") }
|
||||
];
|
||||
for (const domain of Array.from(domains).sort()) {
|
||||
options.push({ value: domain, label: domain.charAt(0).toUpperCase() + domain.slice(1) });
|
||||
}
|
||||
return options;
|
||||
});
|
||||
const filteredDomains = computed(() => {
|
||||
const domains = new Set(permissions.value.map((p) => p.domain));
|
||||
const sorted = Array.from(domains).sort();
|
||||
if (activeDomain.value === "__all__") return sorted;
|
||||
return sorted.filter((d) => d === activeDomain.value);
|
||||
});
|
||||
const filteredPermissions = computed(() => {
|
||||
if (activeDomain.value === "__all__") return permissions.value;
|
||||
return permissions.value.filter((p) => p.domain === activeDomain.value);
|
||||
});
|
||||
const filteredRoles = computed(() => {
|
||||
if (filteredRoleIds.value.size === 0) return roles.value;
|
||||
return roles.value.filter((r) => filteredRoleIds.value.has(r.id));
|
||||
});
|
||||
const hasModifications = computed(() => {
|
||||
return modifiedRoles.value.size > 0;
|
||||
});
|
||||
function roleHeaderClass(role) {
|
||||
if (role.rank >= 100) return "bg-purple-500/20 text-purple-300";
|
||||
if (role.rank >= 80) return "bg-indigo-500/20 text-indigo-300";
|
||||
if (role.rank >= 50) return "bg-cyan-500/20 text-cyan-300";
|
||||
return "bg-slate-500/20 text-slate-300";
|
||||
}
|
||||
function domainColorClass(domain) {
|
||||
const colorMap = {
|
||||
fleet: "text-emerald-400",
|
||||
user: "text-sky-400",
|
||||
finance: "text-amber-400",
|
||||
permissions: "text-purple-400",
|
||||
system: "text-rose-400",
|
||||
service: "text-teal-400",
|
||||
organization: "text-orange-400",
|
||||
vehicle: "text-cyan-400",
|
||||
subscription: "text-pink-400",
|
||||
moderation: "text-violet-400"
|
||||
};
|
||||
return colorMap[domain] || "text-slate-400";
|
||||
}
|
||||
function getCellClass(role, perm) {
|
||||
if (isRoleLocked(role)) {
|
||||
return isPermEnabled(role.id, perm.id) ? "bg-purple-900/10" : "bg-purple-900/5";
|
||||
}
|
||||
if (isPermEnabled(role.id, perm.id)) return "bg-emerald-900/10";
|
||||
return "";
|
||||
}
|
||||
function formatPermissionLabel(perm) {
|
||||
return perm.code.replace(/:/g, " ").replace(/\b\w/g, (c) => c.toUpperCase());
|
||||
}
|
||||
function getToggleClass(role, perm) {
|
||||
const enabled = isPermEnabled(role.id, perm.id);
|
||||
const locked = isRoleLocked(role);
|
||||
const baseClasses = "peer-focus:outline-none peer-focus:ring-2";
|
||||
if (locked) {
|
||||
if (enabled) {
|
||||
return `${baseClasses} bg-emerald-600 peer-focus:ring-emerald-500/50 after:translate-x-full after:border-white`;
|
||||
}
|
||||
return `${baseClasses} bg-slate-600`;
|
||||
}
|
||||
if (enabled) {
|
||||
return `${baseClasses} bg-emerald-600 peer-focus:ring-emerald-500/50 peer-checked:after:translate-x-full peer-checked:after:border-white`;
|
||||
}
|
||||
return `${baseClasses} bg-slate-600 peer-focus:ring-indigo-500/50 peer-checked:after:translate-x-full peer-checked:after:border-white peer-checked:bg-indigo-600`;
|
||||
}
|
||||
function getDomainPermissions(domain) {
|
||||
return filteredPermissions.value.filter((p) => p.domain === domain);
|
||||
}
|
||||
function isPermEnabled(roleId, permissionId) {
|
||||
if (modifiedRoles.value.has(roleId)) {
|
||||
const rolePerms = modifiedRoles.value.get(roleId);
|
||||
return rolePerms.has(permissionId);
|
||||
}
|
||||
const role = roles.value.find((r) => r.id === roleId);
|
||||
return role ? role.permission_ids.includes(permissionId) : false;
|
||||
}
|
||||
function isRoleLocked(role) {
|
||||
return role.is_system && role.rank >= 100;
|
||||
}
|
||||
return (_ctx, _push, _parent, _attrs) => {
|
||||
_push(`<div${ssrRenderAttrs(_attrs)}><div class="mb-8"><h1 class="text-2xl font-bold text-white">${ssrInterpolate(unref($t)("permissions.title"))}</h1><p class="text-slate-400 mt-1">${ssrInterpolate(unref($t)("permissions.subtitle"))}</p></div>`);
|
||||
if (loading.value) {
|
||||
_push(`<div class="flex items-center justify-center py-20"><svg class="animate-spin h-8 w-8 text-indigo-400" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"><circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle><path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"></path></svg><span class="ml-3 text-slate-400">${ssrInterpolate(unref($t)("common.loading"))}</span></div>`);
|
||||
} else if (error.value) {
|
||||
_push(`<div class="bg-red-500/10 border border-red-500/20 rounded-xl p-6 mb-8"><div class="flex items-center gap-3"><svg class="w-6 h-6 text-red-400 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg><div><h3 class="text-red-300 font-medium">${ssrInterpolate(unref($t)("permissions.error_title"))}</h3><p class="text-red-400/80 text-sm mt-1">${ssrInterpolate(error.value)}</p></div></div><button class="mt-4 px-4 py-2 text-sm bg-red-600 hover:bg-red-500 text-white rounded-lg transition">${ssrInterpolate(unref($t)("common.retry"))}</button></div>`);
|
||||
} else {
|
||||
_push(`<!--[-->`);
|
||||
if (saveNotification.value) {
|
||||
_push(`<div class="${ssrRenderClass([saveNotification.value.type === "success" ? "bg-emerald-500/10 border border-emerald-500/20 text-emerald-300" : "bg-red-500/10 border border-red-500/20 text-red-300", "mb-6 px-4 py-3 rounded-lg text-sm font-medium"])}">${ssrInterpolate(saveNotification.value.message)}</div>`);
|
||||
} else {
|
||||
_push(`<!---->`);
|
||||
}
|
||||
_push(`<div class="bg-slate-800/60 border border-slate-700 rounded-xl p-4 mb-6"><div class="flex flex-col sm:flex-row sm:items-center gap-4"><div class="flex-1"><label class="block text-xs font-semibold uppercase tracking-wider text-slate-400 mb-2">${ssrInterpolate(unref($t)("permissions.domain_filter"))}</label><div class="flex flex-wrap gap-1.5"><!--[-->`);
|
||||
ssrRenderList(domainOptions.value, (domain) => {
|
||||
_push(`<button class="${ssrRenderClass([activeDomain.value === domain.value ? "bg-indigo-600 text-white shadow-sm" : "bg-slate-700/60 text-slate-400 hover:bg-slate-700 hover:text-white", "px-3 py-1.5 text-xs font-medium rounded-lg transition"])}">${ssrInterpolate(domain.label)}</button>`);
|
||||
});
|
||||
_push(`<!--]--></div></div><div class="flex-1"><label class="block text-xs font-semibold uppercase tracking-wider text-slate-400 mb-2">${ssrInterpolate(unref($t)("permissions.role_filter"))}</label><div class="flex flex-wrap gap-1.5"><!--[-->`);
|
||||
ssrRenderList(roles.value, (role) => {
|
||||
_push(`<button class="${ssrRenderClass([filteredRoleIds.value.has(role.id) ? role.rank >= 100 ? "bg-purple-600/30 text-purple-300 border border-purple-500/30" : "bg-indigo-600/30 text-indigo-300 border border-indigo-500/30" : "bg-slate-700/60 text-slate-500 hover:bg-slate-700 hover:text-slate-300 border border-transparent", "px-3 py-1.5 text-xs font-medium rounded-lg transition flex items-center gap-1.5"])}">`);
|
||||
if (filteredRoleIds.value.has(role.id)) {
|
||||
_push(`<svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="3" d="M5 13l4 4L19 7"></path></svg>`);
|
||||
} else {
|
||||
_push(`<!---->`);
|
||||
}
|
||||
_push(`<span>${ssrInterpolate(role.name)}</span></button>`);
|
||||
});
|
||||
_push(`<!--]--></div><div class="mt-2 flex gap-2"><button class="text-xs text-indigo-400 hover:text-indigo-300 transition">${ssrInterpolate(unref($t)("common.select_all"))}</button><button class="text-xs text-slate-500 hover:text-slate-400 transition">${ssrInterpolate(unref($t)("common.deselect_all"))}</button></div></div></div></div>`);
|
||||
if (hasModifications.value) {
|
||||
_push(`<div class="sticky top-0 z-20 -mx-4 px-4 py-3 bg-slate-800/95 backdrop-blur-sm border-b border-slate-700 mb-4 flex items-center gap-3 rounded-t-xl"><button class="px-6 py-2.5 bg-emerald-600 hover:bg-emerald-500 text-white font-semibold rounded-lg shadow-lg shadow-emerald-600/20 transition-all hover:scale-[1.02] active:scale-[0.98] flex items-center gap-2"><svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 7H5a2 2 0 00-2 2v9a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-3m-1 4l-3 3m0 0l-3-3m3 3V4"></path></svg> ${ssrInterpolate(unref($t)("permissions.save_changes"))}</button><button class="px-4 py-2.5 bg-slate-700 hover:bg-slate-600 text-slate-300 font-medium rounded-lg transition">${ssrInterpolate(unref($t)("common.discard"))}</button><span class="text-sm text-slate-400 ml-auto">${ssrInterpolate(unref($t)("permissions.modified_count", { count: modifiedRoles.value.size }))}</span></div>`);
|
||||
} else {
|
||||
_push(`<!---->`);
|
||||
}
|
||||
_push(`<div class="overflow-x-auto rounded-xl border border-slate-700 bg-slate-800/40"><table class="w-full text-sm"><thead><tr class="border-b border-slate-700"><th class="sticky left-0 z-10 bg-slate-800/95 min-w-[200px] p-3 text-left"><div class="flex items-center gap-2"><svg class="w-4 h-4 text-slate-500" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"></path></svg><span class="text-xs font-semibold uppercase tracking-wider text-slate-400">${ssrInterpolate(unref($t)("common.permission"))}</span></div></th><!--[-->`);
|
||||
ssrRenderList(filteredRoles.value, (role) => {
|
||||
_push(`<th class="${ssrRenderClass([role.rank >= 100 ? "bg-purple-900/10" : "", "min-w-[120px] p-3 text-center border-l border-slate-700"])}"><div class="flex flex-col items-center gap-1"><span class="${ssrRenderClass([roleHeaderClass(role), "text-xs font-semibold px-2 py-0.5 rounded-full"])}">${ssrInterpolate(role.name)}</span><span class="text-[10px] text-slate-500">Rank ${ssrInterpolate(role.rank)}</span>`);
|
||||
if (role.is_system) {
|
||||
_push(`<span class="text-[10px] text-indigo-400">system</span>`);
|
||||
} else {
|
||||
_push(`<!---->`);
|
||||
}
|
||||
_push(`</div></th>`);
|
||||
});
|
||||
_push(`<!--]--></tr></thead><tbody><!--[-->`);
|
||||
ssrRenderList(filteredDomains.value, (domain) => {
|
||||
_push(`<!--[--><tr class="border-b border-slate-700/50"><td colspan="1" class="${ssrRenderClass([domainColorClass(domain), "sticky left-0 z-10 bg-slate-800/95 px-3 py-2 text-xs font-bold uppercase tracking-wider"])}"><div class="flex items-center gap-2"><span>${ssrInterpolate(domain)}</span><span class="text-[10px] text-slate-500 font-normal normal-case"> (${ssrInterpolate(getDomainPermissions(domain).length)}) </span></div></td><!--[-->`);
|
||||
ssrRenderList(filteredRoles.value, (role) => {
|
||||
_push(`<td class="border-l border-slate-700/50 bg-slate-800/60 px-3 py-2"></td>`);
|
||||
});
|
||||
_push(`<!--]--></tr><!--[-->`);
|
||||
ssrRenderList(getDomainPermissions(domain), (perm) => {
|
||||
_push(`<tr class="border-b border-slate-700/30 hover:bg-slate-700/20 transition"><td class="sticky left-0 z-10 bg-slate-800/95 p-3 border-r border-slate-700/50"><div class="flex flex-col min-w-0 max-w-[200px]"><span class="text-sm text-slate-200 truncate font-medium">${ssrInterpolate(formatPermissionLabel(perm))}</span><span class="text-xs text-slate-500 truncate font-mono">${ssrInterpolate(perm.code)}</span>`);
|
||||
if (perm.description) {
|
||||
_push(`<span class="text-[11px] text-slate-500 truncate mt-0.5">${ssrInterpolate(perm.description)}</span>`);
|
||||
} else {
|
||||
_push(`<!---->`);
|
||||
}
|
||||
_push(`</div></td><!--[-->`);
|
||||
ssrRenderList(filteredRoles.value, (role) => {
|
||||
_push(`<td class="${ssrRenderClass([getCellClass(role, perm), "p-3 text-center border-l border-slate-700/30"])}"><label class="${ssrRenderClass([isRoleLocked(role) ? "cursor-not-allowed" : "cursor-pointer", "relative inline-flex items-center justify-center"])}"><input type="checkbox"${ssrIncludeBooleanAttr(isPermEnabled(role.id, perm.id)) ? " checked" : ""} class="sr-only peer"${ssrIncludeBooleanAttr(isRoleLocked(role)) ? " disabled" : ""}><div class="${ssrRenderClass([getToggleClass(role, perm), "w-9 h-5 rounded-full transition-all duration-200 after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-slate-300 after:border after:rounded-full after:h-4 after:w-4 after:transition-all after:duration-200"])}"></div></label></td>`);
|
||||
});
|
||||
_push(`<!--]--></tr>`);
|
||||
});
|
||||
_push(`<!--]--><!--]-->`);
|
||||
});
|
||||
_push(`<!--]-->`);
|
||||
if (filteredPermissions.value.length === 0) {
|
||||
_push(`<tr><td${ssrRenderAttr("colspan", filteredRoles.value.length + 1)} class="p-8 text-center text-slate-500 text-sm">${ssrInterpolate(unref($t)("permissions.no_permissions"))}</td></tr>`);
|
||||
} else {
|
||||
_push(`<!---->`);
|
||||
}
|
||||
_push(`</tbody></table></div>`);
|
||||
if (hasModifications.value) {
|
||||
_push(`<div class="mt-6 flex items-center gap-3 pb-8"><button class="px-6 py-2.5 bg-emerald-600 hover:bg-emerald-500 text-white font-semibold rounded-lg shadow-lg shadow-emerald-600/20 transition-all hover:scale-[1.02] active:scale-[0.98] flex items-center gap-2"><svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 7H5a2 2 0 00-2 2v9a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-3m-1 4l-3 3m0 0l-3-3m3 3V4"></path></svg> ${ssrInterpolate(unref($t)("permissions.save_changes"))}</button><button class="px-4 py-2.5 bg-slate-700 hover:bg-slate-600 text-slate-300 font-medium rounded-lg transition">${ssrInterpolate(unref($t)("common.discard"))}</button><span class="text-sm text-slate-400">${ssrInterpolate(unref($t)("permissions.modified_count", { count: modifiedRoles.value.size }))}</span></div>`);
|
||||
} else {
|
||||
_push(`<!---->`);
|
||||
}
|
||||
_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/permissions/index.vue");
|
||||
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
|
||||
};
|
||||
export {
|
||||
_sfc_main as default
|
||||
};
|
||||
//# sourceMappingURL=index-CQNxIjHJ.js.map
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,239 +0,0 @@
|
||||
import { _ as __nuxt_component_0 } from "./nuxt-link-1NBbHb-h.js";
|
||||
import { defineComponent, computed, ref, watch, withCtx, createTextVNode, toDisplayString, useSSRContext } from "vue";
|
||||
import { ssrRenderAttrs, ssrInterpolate, ssrRenderAttr, ssrIncludeBooleanAttr, ssrLooseContain, ssrLooseEqual, ssrRenderList, ssrRenderComponent, ssrRenderClass } from "vue/server-renderer";
|
||||
import { useRouter } from "vue-router";
|
||||
import { c as useAuthStore, d as useCookie } from "../server.mjs";
|
||||
import "/app/node_modules/hookable/dist/index.mjs";
|
||||
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/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 = /* @__PURE__ */ defineComponent({
|
||||
__name: "index",
|
||||
__ssrInlineRender: true,
|
||||
setup(__props) {
|
||||
const router = useRouter();
|
||||
const auth = useAuthStore();
|
||||
const canViewPersons = computed(() => {
|
||||
if (auth.isAdmin) return true;
|
||||
return !!auth.user?.system_capabilities?.["persons:view"];
|
||||
});
|
||||
computed(() => {
|
||||
if (auth.isAdmin) return true;
|
||||
return !!auth.user?.system_capabilities?.["persons:edit"];
|
||||
});
|
||||
computed(() => {
|
||||
if (auth.isAdmin) return true;
|
||||
return !!auth.user?.system_capabilities?.["persons:merge"];
|
||||
});
|
||||
if (!canViewPersons.value && !auth.isAdmin) {
|
||||
router.push("/");
|
||||
}
|
||||
const loading = ref(true);
|
||||
const error = ref(null);
|
||||
const persons = ref([]);
|
||||
const totalCount = ref(0);
|
||||
const skip = ref(0);
|
||||
const limit = ref(50);
|
||||
const searchQuery = ref("");
|
||||
const ghostFilter = ref("all");
|
||||
const activeFilter = ref("all");
|
||||
const hasUserFilter = ref("all");
|
||||
const mergedFilter = ref("all");
|
||||
const notification = ref(null);
|
||||
const activeCount = computed(() => persons.value.filter((p) => p.is_active).length);
|
||||
const ghostCount = computed(() => persons.value.filter((p) => p.is_ghost).length);
|
||||
const mergedCount = computed(() => persons.value.filter((p) => p.merged_into_id).length);
|
||||
let searchDebounceTimer = null;
|
||||
function debouncedFetchPersons() {
|
||||
if (searchDebounceTimer) {
|
||||
clearTimeout(searchDebounceTimer);
|
||||
}
|
||||
searchDebounceTimer = setTimeout(() => {
|
||||
skip.value = 0;
|
||||
fetchPersons();
|
||||
}, 400);
|
||||
}
|
||||
watch(searchQuery, () => {
|
||||
debouncedFetchPersons();
|
||||
});
|
||||
watch([ghostFilter, activeFilter, hasUserFilter, mergedFilter], () => {
|
||||
skip.value = 0;
|
||||
fetchPersons();
|
||||
});
|
||||
const isFilterActive = computed(() => {
|
||||
return searchQuery.value !== "" || ghostFilter.value !== "all" || activeFilter.value !== "all" || hasUserFilter.value !== "all" || mergedFilter.value !== "all";
|
||||
});
|
||||
function getAuthHeaders() {
|
||||
const tokenCookie = useCookie("access_token");
|
||||
const token = tokenCookie.value;
|
||||
return token ? { Authorization: `Bearer ${token}` } : {};
|
||||
}
|
||||
async function fetchPersons() {
|
||||
loading.value = true;
|
||||
error.value = null;
|
||||
try {
|
||||
const params = { skip: skip.value, limit: limit.value };
|
||||
if (searchQuery.value) {
|
||||
params.search = searchQuery.value;
|
||||
}
|
||||
if (ghostFilter.value !== "all") {
|
||||
params.is_ghost = ghostFilter.value === "yes";
|
||||
}
|
||||
if (activeFilter.value !== "all") {
|
||||
params.is_active = activeFilter.value === "active";
|
||||
}
|
||||
if (hasUserFilter.value !== "all") {
|
||||
params.has_user = hasUserFilter.value === "yes";
|
||||
}
|
||||
if (mergedFilter.value !== "all") {
|
||||
params.is_merged = mergedFilter.value === "yes";
|
||||
}
|
||||
const response = await $fetch("/api/v1/admin/persons", {
|
||||
params,
|
||||
headers: getAuthHeaders()
|
||||
});
|
||||
persons.value = response.items;
|
||||
totalCount.value = response.total;
|
||||
} catch (err) {
|
||||
console.error("[Persons] Failed to fetch persons:", err);
|
||||
error.value = err?.data?.detail || err?.message || "Failed to load persons";
|
||||
} finally {
|
||||
loading.value = false;
|
||||
}
|
||||
}
|
||||
function roleBadgeClass(role) {
|
||||
const r = (role || "").toLowerCase();
|
||||
if (r === "superadmin") return "bg-purple-500/20 text-purple-300";
|
||||
if (r === "admin") return "bg-indigo-500/20 text-indigo-300";
|
||||
if (r === "staff") return "bg-cyan-500/20 text-cyan-300";
|
||||
return "bg-slate-500/20 text-slate-300";
|
||||
}
|
||||
function formatDate(dateStr) {
|
||||
if (!dateStr) return "—";
|
||||
try {
|
||||
const d = new Date(dateStr);
|
||||
return d.toLocaleDateString("hu-HU", {
|
||||
year: "numeric",
|
||||
month: "short",
|
||||
day: "numeric"
|
||||
});
|
||||
} catch {
|
||||
return dateStr;
|
||||
}
|
||||
}
|
||||
return (_ctx, _push, _parent, _attrs) => {
|
||||
const _component_NuxtLink = __nuxt_component_0;
|
||||
_push(`<div${ssrRenderAttrs(_attrs)}><div class="mb-8"><h1 class="text-2xl font-bold text-white">${ssrInterpolate(_ctx.$t("persons.title"))}</h1><p class="text-slate-400 mt-1">${ssrInterpolate(_ctx.$t("persons.subtitle"))}</p></div><div class="flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4 mb-6"><div class="relative flex-1 max-w-md"><svg class="absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-slate-500" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"></path></svg><input${ssrRenderAttr("value", searchQuery.value)} type="text"${ssrRenderAttr("placeholder", _ctx.$t("persons.search_placeholder"))} class="w-full pl-10 pr-4 py-2.5 bg-slate-800 border border-slate-700 rounded-lg text-sm text-white placeholder-slate-500 focus:outline-none focus:ring-2 focus:ring-indigo-500/50 focus:border-indigo-500 transition"></div><div class="flex items-center gap-2 flex-wrap"><select class="px-3 py-2.5 bg-slate-800 border border-slate-700 rounded-lg text-sm text-slate-300 focus:outline-none focus:ring-2 focus:ring-indigo-500/50 transition"><option value="all"${ssrIncludeBooleanAttr(Array.isArray(ghostFilter.value) ? ssrLooseContain(ghostFilter.value, "all") : ssrLooseEqual(ghostFilter.value, "all")) ? " selected" : ""}>${ssrInterpolate(_ctx.$t("persons.all_ghost_statuses"))}</option><option value="no"${ssrIncludeBooleanAttr(Array.isArray(ghostFilter.value) ? ssrLooseContain(ghostFilter.value, "no") : ssrLooseEqual(ghostFilter.value, "no")) ? " selected" : ""}>${ssrInterpolate(_ctx.$t("persons.ghost_no"))}</option><option value="yes"${ssrIncludeBooleanAttr(Array.isArray(ghostFilter.value) ? ssrLooseContain(ghostFilter.value, "yes") : ssrLooseEqual(ghostFilter.value, "yes")) ? " selected" : ""}>${ssrInterpolate(_ctx.$t("persons.ghost_yes"))}</option></select><select class="px-3 py-2.5 bg-slate-800 border border-slate-700 rounded-lg text-sm text-slate-300 focus:outline-none focus:ring-2 focus:ring-indigo-500/50 transition"><option value="all"${ssrIncludeBooleanAttr(Array.isArray(activeFilter.value) ? ssrLooseContain(activeFilter.value, "all") : ssrLooseEqual(activeFilter.value, "all")) ? " selected" : ""}>${ssrInterpolate(_ctx.$t("persons.all_active_statuses"))}</option><option value="active"${ssrIncludeBooleanAttr(Array.isArray(activeFilter.value) ? ssrLooseContain(activeFilter.value, "active") : ssrLooseEqual(activeFilter.value, "active")) ? " selected" : ""}>${ssrInterpolate(_ctx.$t("persons.active_yes"))}</option><option value="inactive"${ssrIncludeBooleanAttr(Array.isArray(activeFilter.value) ? ssrLooseContain(activeFilter.value, "inactive") : ssrLooseEqual(activeFilter.value, "inactive")) ? " selected" : ""}>${ssrInterpolate(_ctx.$t("persons.active_no"))}</option></select><select class="px-3 py-2.5 bg-slate-800 border border-slate-700 rounded-lg text-sm text-slate-300 focus:outline-none focus:ring-2 focus:ring-indigo-500/50 transition"><option value="all"${ssrIncludeBooleanAttr(Array.isArray(hasUserFilter.value) ? ssrLooseContain(hasUserFilter.value, "all") : ssrLooseEqual(hasUserFilter.value, "all")) ? " selected" : ""}>${ssrInterpolate(_ctx.$t("persons.all_user_statuses"))}</option><option value="yes"${ssrIncludeBooleanAttr(Array.isArray(hasUserFilter.value) ? ssrLooseContain(hasUserFilter.value, "yes") : ssrLooseEqual(hasUserFilter.value, "yes")) ? " selected" : ""}>${ssrInterpolate(_ctx.$t("persons.has_user_yes"))}</option><option value="no"${ssrIncludeBooleanAttr(Array.isArray(hasUserFilter.value) ? ssrLooseContain(hasUserFilter.value, "no") : ssrLooseEqual(hasUserFilter.value, "no")) ? " selected" : ""}>${ssrInterpolate(_ctx.$t("persons.has_user_no"))}</option></select><select class="px-3 py-2.5 bg-slate-800 border border-slate-700 rounded-lg text-sm text-slate-300 focus:outline-none focus:ring-2 focus:ring-indigo-500/50 transition"><option value="all"${ssrIncludeBooleanAttr(Array.isArray(mergedFilter.value) ? ssrLooseContain(mergedFilter.value, "all") : ssrLooseEqual(mergedFilter.value, "all")) ? " selected" : ""}>${ssrInterpolate(_ctx.$t("persons.all_merged_statuses"))}</option><option value="no"${ssrIncludeBooleanAttr(Array.isArray(mergedFilter.value) ? ssrLooseContain(mergedFilter.value, "no") : ssrLooseEqual(mergedFilter.value, "no")) ? " selected" : ""}>${ssrInterpolate(_ctx.$t("persons.merged_no"))}</option><option value="yes"${ssrIncludeBooleanAttr(Array.isArray(mergedFilter.value) ? ssrLooseContain(mergedFilter.value, "yes") : ssrLooseEqual(mergedFilter.value, "yes")) ? " selected" : ""}>${ssrInterpolate(_ctx.$t("persons.merged_yes"))}</option></select></div></div>`);
|
||||
if (loading.value) {
|
||||
_push(`<div class="flex items-center justify-center py-20"><div class="flex flex-col items-center gap-3"><svg class="w-8 h-8 text-indigo-400 animate-spin" fill="none" viewBox="0 0 24 24"><circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle><path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"></path></svg><p class="text-slate-400 text-sm">${ssrInterpolate(_ctx.$t("persons.loading"))}</p></div></div>`);
|
||||
} else if (error.value) {
|
||||
_push(`<div class="flex flex-col items-center justify-center py-20 text-center"><svg class="w-12 h-12 text-red-500 mb-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" 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"></path></svg><p class="text-red-400 text-sm mb-2">${ssrInterpolate(error.value)}</p><button class="px-4 py-2 text-sm bg-indigo-600/20 text-indigo-300 hover:bg-indigo-600/30 rounded-lg transition">${ssrInterpolate(_ctx.$t("persons.retry"))}</button></div>`);
|
||||
} else {
|
||||
_push(`<!--[--><div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4 mb-8"><div class="bg-slate-800 rounded-xl border border-slate-700 p-4"><div class="flex items-center gap-3"><div class="p-2 rounded-lg bg-indigo-500/10 text-indigo-400"><svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0z"></path></svg></div><div><p class="text-xs text-slate-400 uppercase tracking-wider">${ssrInterpolate(_ctx.$t("persons.total_persons"))}</p><p class="text-2xl font-bold text-white">${ssrInterpolate(totalCount.value)}</p></div></div></div><div class="bg-slate-800 rounded-xl border border-slate-700 p-4"><div class="flex items-center gap-3"><div class="p-2 rounded-lg bg-emerald-500/10 text-emerald-400"><svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><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"></path></svg></div><div><p class="text-xs text-slate-400 uppercase tracking-wider">${ssrInterpolate(_ctx.$t("persons.active_persons"))}</p><p class="text-2xl font-bold text-emerald-400">${ssrInterpolate(activeCount.value)}</p></div></div></div><div class="bg-slate-800 rounded-xl border border-slate-700 p-4"><div class="flex items-center gap-3"><div class="p-2 rounded-lg bg-amber-500/10 text-amber-400"><svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M18.364 18.364A9 9 0 005.636 5.636m12.728 12.728A9 9 0 015.636 5.636m12.728 12.728L5.636 5.636"></path></svg></div><div><p class="text-xs text-slate-400 uppercase tracking-wider">${ssrInterpolate(_ctx.$t("persons.ghost_persons"))}</p><p class="text-2xl font-bold text-amber-400">${ssrInterpolate(ghostCount.value)}</p></div></div></div><div class="bg-slate-800 rounded-xl border border-slate-700 p-4"><div class="flex items-center gap-3"><div class="p-2 rounded-lg bg-red-500/10 text-red-400"><svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><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"></path></svg></div><div><p class="text-xs text-slate-400 uppercase tracking-wider">${ssrInterpolate(_ctx.$t("persons.merged_persons"))}</p><p class="text-2xl font-bold text-red-400">${ssrInterpolate(mergedCount.value)}</p></div></div></div></div>`);
|
||||
if (isFilterActive.value) {
|
||||
_push(`<div class="mb-4 text-xs text-slate-500">${ssrInterpolate(_ctx.$t("persons.filtered_results"))}: <span class="text-slate-300 font-semibold">${ssrInterpolate(persons.value.length)}</span> / ${ssrInterpolate(totalCount.value)} db </div>`);
|
||||
} else {
|
||||
_push(`<!---->`);
|
||||
}
|
||||
_push(`<div class="bg-slate-800/50 border border-slate-700 rounded-xl overflow-hidden"><div class="overflow-x-auto"><table class="w-full text-sm"><thead><tr class="border-b border-slate-700 bg-slate-800/80"><th class="text-left py-3.5 px-4 text-xs font-semibold uppercase tracking-wider text-slate-400">ID</th><th class="text-left py-3.5 px-4 text-xs font-semibold uppercase tracking-wider text-slate-400">${ssrInterpolate(_ctx.$t("persons.name"))}</th><th class="text-left py-3.5 px-4 text-xs font-semibold uppercase tracking-wider text-slate-400">${ssrInterpolate(_ctx.$t("persons.phone"))}</th><th class="text-left py-3.5 px-4 text-xs font-semibold uppercase tracking-wider text-slate-400">${ssrInterpolate(_ctx.$t("persons.birth_date"))}</th><th class="text-left py-3.5 px-4 text-xs font-semibold uppercase tracking-wider text-slate-400">${ssrInterpolate(_ctx.$t("persons.status"))}</th><th class="text-left py-3.5 px-4 text-xs font-semibold uppercase tracking-wider text-slate-400">${ssrInterpolate(_ctx.$t("persons.users_count"))}</th><th class="text-left py-3.5 px-4 text-xs font-semibold uppercase tracking-wider text-slate-400">${ssrInterpolate(_ctx.$t("persons.active_user"))}</th><th class="text-left py-3.5 px-4 text-xs font-semibold uppercase tracking-wider text-slate-400">${ssrInterpolate(_ctx.$t("persons.address"))}</th><th class="text-left py-3.5 px-4 text-xs font-semibold uppercase tracking-wider text-slate-400">${ssrInterpolate(_ctx.$t("persons.actions"))}</th></tr></thead><tbody><!--[-->`);
|
||||
ssrRenderList(persons.value, (person) => {
|
||||
_push(`<tr class="border-b border-slate-700/50 hover:bg-slate-700/30 transition"><td class="py-3.5 px-4 text-slate-400 font-mono text-xs">${ssrInterpolate(person.id)}</td><td class="py-3.5 px-4">`);
|
||||
_push(ssrRenderComponent(_component_NuxtLink, {
|
||||
to: "/persons/" + person.id,
|
||||
class: "text-sm font-medium text-white hover:underline cursor-pointer hover:text-indigo-400 transition-colors"
|
||||
}, {
|
||||
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
||||
if (_push2) {
|
||||
_push2(`${ssrInterpolate(person.last_name)} ${ssrInterpolate(person.first_name)}`);
|
||||
} else {
|
||||
return [
|
||||
createTextVNode(toDisplayString(person.last_name) + " " + toDisplayString(person.first_name), 1)
|
||||
];
|
||||
}
|
||||
}),
|
||||
_: 2
|
||||
}, _parent));
|
||||
_push(`</td><td class="py-3.5 px-4 text-slate-300">${ssrInterpolate(person.phone || "—")}</td><td class="py-3.5 px-4 text-slate-300 text-xs">${ssrInterpolate(formatDate(person.birth_date))}</td><td class="py-3.5 px-4"><div class="flex flex-wrap gap-1"><span class="${ssrRenderClass([person.is_active ? "bg-emerald-500/10 text-emerald-400" : "bg-amber-500/10 text-amber-400", "inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium"])}"><span class="${ssrRenderClass([person.is_active ? "bg-emerald-400" : "bg-amber-400", "w-1.5 h-1.5 rounded-full mr-1.5"])}"></span> ${ssrInterpolate(person.is_active ? _ctx.$t("persons.active") : _ctx.$t("persons.inactive"))}</span>`);
|
||||
if (person.is_ghost) {
|
||||
_push(`<span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-purple-500/20 text-purple-300">${ssrInterpolate(_ctx.$t("persons.ghost"))}</span>`);
|
||||
} else {
|
||||
_push(`<!---->`);
|
||||
}
|
||||
if (person.merged_into_id) {
|
||||
_push(`<span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-red-500/20 text-red-300">${ssrInterpolate(_ctx.$t("persons.merged"))}</span>`);
|
||||
} else {
|
||||
_push(`<!---->`);
|
||||
}
|
||||
_push(`</div></td><td class="py-3.5 px-4"><span class="text-slate-300">${ssrInterpolate(person.users_count)}</span></td><td class="py-3.5 px-4">`);
|
||||
if (person.active_user) {
|
||||
_push(`<div><p class="text-slate-300 text-xs">${ssrInterpolate(person.active_user.email)}</p><span class="${ssrRenderClass([roleBadgeClass(person.active_user.role), "inline-flex items-center px-2 py-0.5 rounded-full text-xs font-medium"])}">${ssrInterpolate(person.active_user.role)}</span></div>`);
|
||||
} else {
|
||||
_push(`<span class="text-slate-500">—</span>`);
|
||||
}
|
||||
_push(`</td><td class="py-3.5 px-4">`);
|
||||
if (person.address) {
|
||||
_push(`<span class="text-slate-300 text-xs">${ssrInterpolate(person.address.full_address_text || person.address.address_city + ", " + person.address.address_street_name + " " + (person.address.address_house_number || ""))}</span>`);
|
||||
} else {
|
||||
_push(`<span class="text-slate-500">—</span>`);
|
||||
}
|
||||
_push(`</td><td class="py-3.5 px-4"><div class="flex items-center gap-2">`);
|
||||
_push(ssrRenderComponent(_component_NuxtLink, {
|
||||
to: "/persons/" + person.id,
|
||||
class: "px-3 py-1.5 text-xs font-medium bg-slate-600/20 text-slate-300 hover:bg-slate-600/30 rounded-lg transition"
|
||||
}, {
|
||||
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
||||
if (_push2) {
|
||||
_push2(`${ssrInterpolate(_ctx.$t("persons.view"))}`);
|
||||
} else {
|
||||
return [
|
||||
createTextVNode(toDisplayString(_ctx.$t("persons.view")), 1)
|
||||
];
|
||||
}
|
||||
}),
|
||||
_: 2
|
||||
}, _parent));
|
||||
_push(`</div></td></tr>`);
|
||||
});
|
||||
_push(`<!--]--></tbody></table></div>`);
|
||||
if (persons.value.length === 0 && !loading.value) {
|
||||
_push(`<div class="flex flex-col items-center justify-center py-16 text-center"><svg class="w-12 h-12 text-slate-600 mb-4" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0z"></path></svg><p class="text-slate-400 text-sm">${ssrInterpolate(_ctx.$t("persons.no_results"))}</p></div>`);
|
||||
} else {
|
||||
_push(`<!---->`);
|
||||
}
|
||||
_push(`</div>`);
|
||||
if (totalCount.value > limit.value) {
|
||||
_push(`<div class="flex items-center justify-between mt-6"><p class="text-xs text-slate-500">${ssrInterpolate(_ctx.$t("persons.showing"))} ${ssrInterpolate(skip.value + 1)}–${ssrInterpolate(Math.min(skip.value + limit.value, totalCount.value))} / ${ssrInterpolate(totalCount.value)}</p><div class="flex items-center gap-2"><button${ssrIncludeBooleanAttr(skip.value === 0) ? " disabled" : ""} class="${ssrRenderClass([skip.value > 0 ? "bg-slate-700 text-slate-300 hover:bg-slate-600" : "bg-slate-800 text-slate-600", "px-3 py-1.5 text-xs font-medium rounded-lg transition disabled:opacity-30 disabled:cursor-not-allowed"])}">${ssrInterpolate(_ctx.$t("persons.prev"))}</button><button${ssrIncludeBooleanAttr(skip.value + limit.value >= totalCount.value) ? " disabled" : ""} class="${ssrRenderClass([skip.value + limit.value < totalCount.value ? "bg-slate-700 text-slate-300 hover:bg-slate-600" : "bg-slate-800 text-slate-600", "px-3 py-1.5 text-xs font-medium rounded-lg transition disabled:opacity-30 disabled:cursor-not-allowed"])}">${ssrInterpolate(_ctx.$t("persons.next"))}</button></div></div>`);
|
||||
} else {
|
||||
_push(`<!---->`);
|
||||
}
|
||||
_push(`<!--]-->`);
|
||||
}
|
||||
if (notification.value) {
|
||||
_push(`<div class="${ssrRenderClass([notification.value.type === "success" ? "bg-emerald-600 text-white" : "bg-red-600 text-white", "fixed bottom-6 right-6 px-5 py-3 rounded-xl shadow-xl text-sm font-medium z-50"])}">${ssrInterpolate(notification.value.message)}</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/persons/index.vue");
|
||||
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
|
||||
};
|
||||
export {
|
||||
_sfc_main as default
|
||||
};
|
||||
//# sourceMappingURL=index-CncnskcL.js.map
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user