remove payday debug and add multiple ui fixes

This commit is contained in:
JCEEE
2026-08-28 19:32:32 +01:00
parent bcdd3805d5
commit d303eda038
19 changed files with 705 additions and 697 deletions
+2 -3
View File
@@ -8,14 +8,13 @@ function resolveServerTz(tz?: string): string {
export async function getSettings(pb: any, famId: string) {
const list = await pb.collection('settings').getFullList({ filter: `famId = '${famId}'` });
const s = list?.[0] || {};
return { simulateEow: !!s.simulateEow, webhookUrl: s.webhookUrl || '' };
return { webhookUrl: s.webhookUrl || '' };
}
export async function updateSettings(pb: any, famId: string, data: Record<string, unknown>) {
const list = await pb.collection('settings').getFullList({ filter: `famId = '${famId}'` });
const existing = list?.[0];
const patch: Record<string, unknown> = {};
if (data.simulateEow !== undefined) patch.simulateEow = !!data.simulateEow;
if (data.webhookUrl !== undefined) patch.webhookUrl = String(data.webhookUrl);
let s;
if (existing) {
@@ -23,5 +22,5 @@ export async function updateSettings(pb: any, famId: string, data: Record<string
} else {
s = await pb.collection('settings').create({ famId, ...patch });
}
return { simulateEow: !!s.simulateEow, webhookUrl: s.webhookUrl || '' };
return { webhookUrl: s.webhookUrl || '' };
}