{allTimePts.toLocaleString()} points all time £{allTimeCash.toFixed(2)} cash earned all time
{tileMembers} members
{tilePts} points this week
£{tileMoney.toFixed(2)} cash this week
{tileChores} this week
{allTimeChores} total all time
{#if !summary?.summaries?.length}

No data yet this week

{:else}
{#each summary.summaries as s} {@const m = members.find((m2: any) => m2.id === s.memberId)} {@const wkTotal = weeklyPotentialFor(s.memberId)} {@const wkDone = s.choresCompleted || 0} {@const wkPct = wkTotal > 0 ? Math.min(100, Math.round((wkDone / wkTotal) * 100)) : 0} {@const tdTotal = todayPotentialFor(s.memberId)} {@const tdDone = todayDone(s)} {@const tdPct = tdTotal > 0 ? Math.min(100, Math.round((tdDone / tdTotal) * 100)) : 0} {@const scPot = dailyPointsPotential(s.memberId)} {@const scVal = avgDailyPointsFor(s)} {@const scPct = scPot > 0 ? Math.min(100, Math.round((scVal / scPot) * 100)) : 0}
{s.memberName} {#if m} Kanban → {/if}
{tdPct}%
Today
{wkPct}%
Week
{scPct}%
Avg/day
Points {s.pointsEarned}
Cash £{Number(s.moneyEarned || 0).toFixed(2)}
Done {wkDone}/{wkTotal}
{/each}
{/if}
{#if distinctTrendWeeks() === 0}

No weekly data yet

{:else}
{/if}