Add smart member list with manual+login merge and duplicate detection
This commit is contained in:
215
.output/server/chunks/build/index-DUWe6TYg.mjs
Normal file
215
.output/server/chunks/build/index-DUWe6TYg.mjs
Normal file
@@ -0,0 +1,215 @@
|
||||
import { _ as __nuxt_component_0$1 } from './server.mjs';
|
||||
import { mergeProps, withCtx, unref, createVNode, createTextVNode, ref, useSSRContext } from 'vue';
|
||||
import { ssrRenderAttrs, ssrRenderComponent, ssrRenderList, ssrInterpolate, ssrRenderClass, ssrRenderAttr } from 'vue/server-renderer';
|
||||
import { Users, BarChart } from 'lucide-vue-next';
|
||||
import { u as useHead } from './composables-CK-Mp9jS.mjs';
|
||||
import '../nitro/nitro.mjs';
|
||||
import 'node:http';
|
||||
import 'node:https';
|
||||
import 'node:events';
|
||||
import 'node:buffer';
|
||||
import 'node:fs';
|
||||
import 'node:path';
|
||||
import 'node:crypto';
|
||||
import 'node:url';
|
||||
import '../routes/renderer.mjs';
|
||||
import 'vue-bundle-renderer/runtime';
|
||||
import 'unhead/server';
|
||||
import 'devalue';
|
||||
import 'unhead/utils';
|
||||
import 'pinia';
|
||||
import 'vue-router';
|
||||
|
||||
const _sfc_main$1 = {
|
||||
__name: "MannschaftenUebersicht",
|
||||
__ssrInlineRender: true,
|
||||
setup(__props) {
|
||||
const mannschaften = ref([]);
|
||||
const getSpielerListe = (mannschaft) => {
|
||||
if (!mannschaft.spieler) return [];
|
||||
return mannschaft.spieler.split(";").map((s) => s.trim()).filter((s) => s !== "");
|
||||
};
|
||||
const formatDate = (dateString) => {
|
||||
if (!dateString) return "";
|
||||
if (/^\d{2}\.\d{2}\.\d{4}$/.test(dateString)) {
|
||||
return dateString;
|
||||
}
|
||||
const date = new Date(dateString);
|
||||
if (isNaN(date.getTime())) {
|
||||
return dateString;
|
||||
}
|
||||
return date.toLocaleDateString("de-DE", {
|
||||
day: "2-digit",
|
||||
month: "2-digit",
|
||||
year: "numeric"
|
||||
});
|
||||
};
|
||||
return (_ctx, _push, _parent, _attrs) => {
|
||||
_push(`<div${ssrRenderAttrs(_attrs)}>`);
|
||||
if (mannschaften.value.length > 0) {
|
||||
_push(`<div class="space-y-8"><!--[-->`);
|
||||
ssrRenderList(mannschaften.value, (mannschaft, index) => {
|
||||
_push(`<div class="bg-white rounded-xl shadow-lg border border-gray-100 overflow-hidden"><div class="bg-gradient-to-r from-primary-600 to-primary-700 p-6"><h2 class="text-2xl font-display font-bold text-white mb-2">${ssrInterpolate(mannschaft.mannschaft)}</h2><p class="text-primary-100 text-lg">${ssrInterpolate(mannschaft.liga)}</p></div><div class="p-6"><div class="grid md:grid-cols-2 gap-6 mb-6"><div class="space-y-3"><div class="flex items-center space-x-3"><div class="w-2 h-2 bg-primary-600 rounded-full"></div><span class="text-gray-600">Staffelleiter:</span><span class="font-semibold text-gray-900">${ssrInterpolate(mannschaft.staffelleiter)}</span></div><div class="flex items-center space-x-3"><div class="w-2 h-2 bg-primary-600 rounded-full"></div><span class="text-gray-600">Telefon:</span><span class="font-semibold text-gray-900">${ssrInterpolate(mannschaft.telefon)}</span></div></div><div class="space-y-3"><div class="flex items-center space-x-3"><div class="w-2 h-2 bg-primary-600 rounded-full"></div><span class="text-gray-600">Heimspieltag:</span><span class="font-semibold text-gray-900">${ssrInterpolate(mannschaft.heimspieltag)}</span></div><div class="flex items-center space-x-3"><div class="w-2 h-2 bg-primary-600 rounded-full"></div><span class="text-gray-600">Spielsystem:</span><span class="font-semibold text-gray-900">${ssrInterpolate(mannschaft.spielsystem)}</span></div></div></div><div class="border-t border-gray-200 pt-6"><h3 class="text-xl font-semibold text-gray-900 mb-4"> Mannschaftsaufstellung Saison 2025/26 (Hinrunde) </h3><div class="grid sm:grid-cols-2 lg:grid-cols-4 gap-4"><!--[-->`);
|
||||
ssrRenderList(getSpielerListe(mannschaft), (spieler, spielerIndex) => {
|
||||
_push(`<div class="${ssrRenderClass([spieler === mannschaft.mannschaftsfuehrer ? "ring-2 ring-primary-500 bg-primary-50" : "", "bg-gray-50 rounded-lg p-4 text-center"])}"><div class="font-semibold text-gray-900">${ssrInterpolate(spieler)}</div>`);
|
||||
if (spieler === mannschaft.mannschaftsfuehrer) {
|
||||
_push(`<div class="text-xs text-primary-600 font-medium mt-1"> Mannschaftsführer </div>`);
|
||||
} else {
|
||||
_push(`<!---->`);
|
||||
}
|
||||
_push(`</div>`);
|
||||
});
|
||||
_push(`<!--]--></div></div><div class="border-t border-gray-200 pt-6 mt-6"><div class="text-center">`);
|
||||
if (mannschaft.weitere_informationen_link && mannschaft.weitere_informationen_link !== "") {
|
||||
_push(`<a${ssrRenderAttr("href", mannschaft.weitere_informationen_link)} target="_blank" class="inline-flex items-center px-6 py-3 bg-primary-600 hover:bg-primary-700 text-white font-semibold rounded-lg transition-colors">`);
|
||||
_push(ssrRenderComponent(unref(BarChart), {
|
||||
size: 20,
|
||||
class: "mr-2"
|
||||
}, null, _parent));
|
||||
_push(` Weitere Informationen </a>`);
|
||||
} else {
|
||||
_push(`<!---->`);
|
||||
}
|
||||
_push(`</div></div><div class="border-t border-gray-200 pt-4 mt-6"><p class="text-sm text-gray-500 text-center"> Zuletzt aktualisiert am: ${ssrInterpolate(formatDate(mannschaft.letzte_aktualisierung))}</p></div></div></div>`);
|
||||
});
|
||||
_push(`<!--]--></div>`);
|
||||
} else {
|
||||
_push(`<div class="text-center py-12 bg-gray-50 rounded-xl">`);
|
||||
_push(ssrRenderComponent(unref(Users), {
|
||||
size: 48,
|
||||
class: "text-gray-400 mx-auto mb-4"
|
||||
}, null, _parent));
|
||||
_push(`<p class="text-gray-600">Keine Mannschaftsdaten geladen</p></div>`);
|
||||
}
|
||||
_push(`</div>`);
|
||||
};
|
||||
}
|
||||
};
|
||||
const _sfc_setup$1 = _sfc_main$1.setup;
|
||||
_sfc_main$1.setup = (props, ctx) => {
|
||||
const ssrContext = useSSRContext();
|
||||
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/MannschaftenUebersicht.vue");
|
||||
return _sfc_setup$1 ? _sfc_setup$1(props, ctx) : void 0;
|
||||
};
|
||||
const _sfc_main = {
|
||||
__name: "index",
|
||||
__ssrInlineRender: true,
|
||||
setup(__props) {
|
||||
useHead({
|
||||
title: "Mannschaften - Harheimer TC"
|
||||
});
|
||||
return (_ctx, _push, _parent, _attrs) => {
|
||||
const _component_NuxtLink = __nuxt_component_0$1;
|
||||
_push(`<div${ssrRenderAttrs(mergeProps({ class: "min-h-full py-16 bg-gray-50" }, _attrs))}><div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8"><h1 class="text-4xl sm:text-5xl font-display font-bold text-gray-900 mb-6"> Unsere Mannschaften </h1><div class="w-24 h-1 bg-primary-600 mb-8"></div><p class="text-xl text-gray-600 mb-12"> Unsere aktiven Mannschaften in der Saison 2025/26 </p>`);
|
||||
_push(ssrRenderComponent(_sfc_main$1, null, null, _parent));
|
||||
_push(`<div class="mt-16"><h2 class="text-3xl font-display font-bold text-gray-900 mb-8 text-center"> Weitere Informationen </h2><div class="grid md:grid-cols-3 gap-8">`);
|
||||
_push(ssrRenderComponent(_component_NuxtLink, {
|
||||
to: "/mannschaften/herren",
|
||||
class: "group bg-white p-8 rounded-xl shadow-lg hover:shadow-2xl transition-all border border-gray-100 hover:border-primary-600"
|
||||
}, {
|
||||
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
||||
if (_push2) {
|
||||
_push2(`<div class="w-16 h-16 bg-gradient-to-br from-primary-500 to-primary-700 rounded-xl flex items-center justify-center mb-4 group-hover:scale-110 transition-transform"${_scopeId}>`);
|
||||
_push2(ssrRenderComponent(unref(Users), {
|
||||
size: 32,
|
||||
class: "text-white"
|
||||
}, null, _parent2, _scopeId));
|
||||
_push2(`</div><h3 class="text-2xl font-display font-bold text-gray-900 mb-2 group-hover:text-primary-600 transition-colors"${_scopeId}> Herren </h3><p class="text-gray-600"${_scopeId}> 3 Mannschaften in verschiedenen Ligen </p>`);
|
||||
} else {
|
||||
return [
|
||||
createVNode("div", { class: "w-16 h-16 bg-gradient-to-br from-primary-500 to-primary-700 rounded-xl flex items-center justify-center mb-4 group-hover:scale-110 transition-transform" }, [
|
||||
createVNode(unref(Users), {
|
||||
size: 32,
|
||||
class: "text-white"
|
||||
})
|
||||
]),
|
||||
createVNode("h3", { class: "text-2xl font-display font-bold text-gray-900 mb-2 group-hover:text-primary-600 transition-colors" }, " Herren "),
|
||||
createVNode("p", { class: "text-gray-600" }, " 3 Mannschaften in verschiedenen Ligen ")
|
||||
];
|
||||
}
|
||||
}),
|
||||
_: 1
|
||||
}, _parent));
|
||||
_push(ssrRenderComponent(_component_NuxtLink, {
|
||||
to: "/mannschaften/damen",
|
||||
class: "group bg-white p-8 rounded-xl shadow-lg hover:shadow-2xl transition-all border border-gray-100 hover:border-primary-600"
|
||||
}, {
|
||||
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
||||
if (_push2) {
|
||||
_push2(`<div class="w-16 h-16 bg-gradient-to-br from-primary-500 to-primary-700 rounded-xl flex items-center justify-center mb-4 group-hover:scale-110 transition-transform"${_scopeId}>`);
|
||||
_push2(ssrRenderComponent(unref(Users), {
|
||||
size: 32,
|
||||
class: "text-white"
|
||||
}, null, _parent2, _scopeId));
|
||||
_push2(`</div><h3 class="text-2xl font-display font-bold text-gray-900 mb-2 group-hover:text-primary-600 transition-colors"${_scopeId}> Damen </h3><p class="text-gray-600"${_scopeId}> 1 Mannschaft in der Bezirksliga </p>`);
|
||||
} else {
|
||||
return [
|
||||
createVNode("div", { class: "w-16 h-16 bg-gradient-to-br from-primary-500 to-primary-700 rounded-xl flex items-center justify-center mb-4 group-hover:scale-110 transition-transform" }, [
|
||||
createVNode(unref(Users), {
|
||||
size: 32,
|
||||
class: "text-white"
|
||||
})
|
||||
]),
|
||||
createVNode("h3", { class: "text-2xl font-display font-bold text-gray-900 mb-2 group-hover:text-primary-600 transition-colors" }, " Damen "),
|
||||
createVNode("p", { class: "text-gray-600" }, " 1 Mannschaft in der Bezirksliga ")
|
||||
];
|
||||
}
|
||||
}),
|
||||
_: 1
|
||||
}, _parent));
|
||||
_push(ssrRenderComponent(_component_NuxtLink, {
|
||||
to: "/mannschaften/jugend",
|
||||
class: "group bg-white p-8 rounded-xl shadow-lg hover:shadow-2xl transition-all border border-gray-100 hover:border-primary-600"
|
||||
}, {
|
||||
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
||||
if (_push2) {
|
||||
_push2(`<div class="w-16 h-16 bg-gradient-to-br from-primary-500 to-primary-700 rounded-xl flex items-center justify-center mb-4 group-hover:scale-110 transition-transform"${_scopeId}>`);
|
||||
_push2(ssrRenderComponent(unref(Users), {
|
||||
size: 32,
|
||||
class: "text-white"
|
||||
}, null, _parent2, _scopeId));
|
||||
_push2(`</div><h3 class="text-2xl font-display font-bold text-gray-900 mb-2 group-hover:text-primary-600 transition-colors"${_scopeId}> Jugend </h3><p class="text-gray-600"${_scopeId}> 2 Jugendmannschaften </p>`);
|
||||
} else {
|
||||
return [
|
||||
createVNode("div", { class: "w-16 h-16 bg-gradient-to-br from-primary-500 to-primary-700 rounded-xl flex items-center justify-center mb-4 group-hover:scale-110 transition-transform" }, [
|
||||
createVNode(unref(Users), {
|
||||
size: 32,
|
||||
class: "text-white"
|
||||
})
|
||||
]),
|
||||
createVNode("h3", { class: "text-2xl font-display font-bold text-gray-900 mb-2 group-hover:text-primary-600 transition-colors" }, " Jugend "),
|
||||
createVNode("p", { class: "text-gray-600" }, " 2 Jugendmannschaften ")
|
||||
];
|
||||
}
|
||||
}),
|
||||
_: 1
|
||||
}, _parent));
|
||||
_push(`</div><div class="mt-12 bg-primary-50 p-8 rounded-xl border border-primary-100"><h3 class="text-2xl font-display font-bold text-gray-900 mb-4"> Spielpläne & Ergebnisse </h3><p class="text-gray-600 mb-6"> Alle aktuellen Spielpläne und Ergebnisse unserer Mannschaften finden Sie hier. </p>`);
|
||||
_push(ssrRenderComponent(_component_NuxtLink, {
|
||||
to: "/mannschaften/spielplaene",
|
||||
class: "inline-flex items-center px-6 py-3 bg-primary-600 hover:bg-primary-700 text-white font-semibold rounded-lg transition-colors"
|
||||
}, {
|
||||
default: withCtx((_, _push2, _parent2, _scopeId) => {
|
||||
if (_push2) {
|
||||
_push2(` Zu den Spielplänen `);
|
||||
} else {
|
||||
return [
|
||||
createTextVNode(" Zu den Spielplänen ")
|
||||
];
|
||||
}
|
||||
}),
|
||||
_: 1
|
||||
}, _parent));
|
||||
_push(`</div></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("pages/mannschaften/index.vue");
|
||||
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
|
||||
};
|
||||
|
||||
export { _sfc_main as default };
|
||||
//# sourceMappingURL=index-DUWe6TYg.mjs.map
|
||||
Reference in New Issue
Block a user