initial 2
Some checks failed
CI / test (push) Has been cancelled

This commit is contained in:
2026-06-26 09:26:50 +01:00
parent 194330fb47
commit 3b37368e7d
213 changed files with 14688 additions and 1 deletions

View File

@@ -0,0 +1,20 @@
export type ReflectionData = {
wentWell: string;
learned: string;
improveTomorrow: string;
};
export function hasMeaningfulReflectionContent(data: ReflectionData): boolean {
return [data.wentWell, data.learned, data.improveTomorrow].some(
(field) => field.trim().length > 0
);
}
export function shouldAwardReflectionXp(
existing: ReflectionData | null | undefined,
data: ReflectionData
): boolean {
if (!hasMeaningfulReflectionContent(data)) return false;
if (!existing) return true;
return !hasMeaningfulReflectionContent(existing);
}