Set cards as default view and restrict contact data to vorstand only

This commit is contained in:
Torsten Schulz (local)
2025-10-21 14:42:20 +02:00
parent bd677c26ae
commit 37994f39b2
21 changed files with 610 additions and 515 deletions

View File

@@ -15,7 +15,7 @@ import 'fs';
import 'path';
const members_get = defineEventHandler(async (event) => {
var _a, _b, _c, _d;
var _a, _b, _c;
try {
const token = getCookie(event, "auth_token");
if (!token) {
@@ -38,9 +38,12 @@ const members_get = defineEventHandler(async (event) => {
const processedNames = /* @__PURE__ */ new Set();
for (const member of manualMembers) {
const normalizedEmail = ((_a = member.email) == null ? void 0 : _a.toLowerCase().trim()) || "";
const normalizedName = ((_b = member.name) == null ? void 0 : _b.toLowerCase().trim()) || "";
const fullName = `${member.firstName || ""} ${member.lastName || ""}`.trim();
const normalizedName = fullName.toLowerCase();
mergedMembers.push({
...member,
name: fullName,
// Computed for display
source: "manual",
editable: true,
hasLogin: false
@@ -50,8 +53,8 @@ const members_get = defineEventHandler(async (event) => {
}
for (const user of registeredUsers) {
if (!user.active) continue;
const normalizedEmail = ((_c = user.email) == null ? void 0 : _c.toLowerCase().trim()) || "";
const normalizedName = ((_d = user.name) == null ? void 0 : _d.toLowerCase().trim()) || "";
const normalizedEmail = ((_b = user.email) == null ? void 0 : _b.toLowerCase().trim()) || "";
const normalizedName = ((_c = user.name) == null ? void 0 : _c.toLowerCase().trim()) || "";
let matchedManualIndex = -1;
if (normalizedEmail) {
matchedManualIndex = mergedMembers.findIndex(