update schema

This commit is contained in:
JCEEE
2026-09-25 08:24:26 +01:00
parent c070cc8053
commit edc8568cc4
2 changed files with 7 additions and 3 deletions
@@ -116,7 +116,8 @@ export const actions = {
const startDate = fd.get('startDate') as string;
if (type) data.type = type;
if (type === 'emoji') {
data.value = 0;
// 1, not 0: PB treats 0 as blank on the required `value` field.
data.value = 1;
data.emoji = (fd.get('emoji') as string) || '🎉';
} else if (fd.get('value')) data.value = parseFloat(fd.get('value') as string) || 0;
data.customName = customName || undefined;
@@ -160,7 +161,7 @@ export const actions = {
const memberId = fd.get('memberId') as string;
const name = fd.get('name') as string;
const type = fd.get('type') as string;
const value = type === 'emoji' ? 0 : (parseFloat(fd.get('value') as string) || 0);
const value = type === 'emoji' ? 1 : (parseFloat(fd.get('value') as string) || 0);
const emoji = type === 'emoji' ? ((fd.get('emoji') as string) || '🎉') : '';
const todoStart = fd.get('todoStart') as string;
const todoCompleteBy = fd.get('todoCompleteBy') as string;