fix auth again
This commit is contained in:
@@ -498,9 +498,7 @@
|
||||
const counts: number[] = [];
|
||||
for (let i = 0; i < 7; i++) {
|
||||
const d = addDays(weekStart, i);
|
||||
counts.push(
|
||||
weekCompletions.filter((c) => (c.date?.slice(0, 10) || c.date) === d).length
|
||||
);
|
||||
counts.push(weekCompletions.filter((c) => (c.date?.slice(0, 10) || c.date) === d).length);
|
||||
}
|
||||
return counts;
|
||||
});
|
||||
@@ -998,10 +996,18 @@
|
||||
if (optimistic) {
|
||||
famStore.applyRecord('completions', optimistic, 'delete');
|
||||
}
|
||||
const msg = e instanceof Error ? e.message : String(e);
|
||||
if (/CHORE_GONE/.test(msg)) {
|
||||
// Drop the dead card synchronously so a second tap can't re-enter
|
||||
// before the resync round-trip finishes (the repeated 400s).
|
||||
famStore.applyRecord('assigned_chores', chore, 'delete');
|
||||
console.error(
|
||||
`[diag] toggle CHORE_GONE(drop-card) member=${memberId} fam=${famId} chore=${chore.id}`
|
||||
);
|
||||
}
|
||||
try {
|
||||
await famStore.resync();
|
||||
} catch {}
|
||||
const msg = e instanceof Error ? e.message : String(e);
|
||||
showToast(
|
||||
/CHORE_GONE/.test(msg)
|
||||
? 'This chore was changed — list refreshed.'
|
||||
@@ -1231,7 +1237,12 @@
|
||||
{/if}
|
||||
</Card>
|
||||
|
||||
<Card cols={1} title="Claims" accent={hasClaimableRewards ? '#f97316' : undefined} class={hasClaimableRewards ? 'claims-card' : ''}>
|
||||
<Card
|
||||
cols={1}
|
||||
title="Claims"
|
||||
accent={hasClaimableRewards ? '#f97316' : undefined}
|
||||
class={hasClaimableRewards ? 'claims-card' : ''}
|
||||
>
|
||||
{#if claimableRewards().length === 0}
|
||||
<div class="claims-empty">
|
||||
{@html checkCircleIcon}<span>No outstanding claims</span>
|
||||
@@ -1396,12 +1407,7 @@
|
||||
{/if}
|
||||
<!-- HERO -->
|
||||
<header class="hero">
|
||||
<svg
|
||||
class="hero-bg"
|
||||
viewBox="0 0 700 120"
|
||||
preserveAspectRatio="none"
|
||||
aria-hidden="true"
|
||||
>
|
||||
<svg class="hero-bg" viewBox="0 0 700 120" preserveAspectRatio="none" aria-hidden="true">
|
||||
<polyline
|
||||
points={heroSpark.line}
|
||||
fill="none"
|
||||
@@ -1688,8 +1694,12 @@
|
||||
{/if}
|
||||
{#if inYesterday}
|
||||
<div class="yesterday-banner">
|
||||
<span>📝 Showing <b>yesterday</b> — tap anything you missed. Undo lives on today's view.</span>
|
||||
<button class="yesterday-back" onclick={() => (viewDate = 'today')}>Back to today →</button>
|
||||
<span
|
||||
>📝 Showing <b>yesterday</b> — tap anything you missed. Undo lives on today's view.</span
|
||||
>
|
||||
<button class="yesterday-back" onclick={() => (viewDate = 'today')}
|
||||
>Back to today →</button
|
||||
>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="kanban">
|
||||
@@ -1699,7 +1709,11 @@
|
||||
<p class="empty">All done!</p>
|
||||
{:else}
|
||||
{#each dailyPending as chore}
|
||||
<button class="chore" onclick={() => toggle(chore)} disabled={togglingIds.has(chore.id)}>
|
||||
<button
|
||||
class="chore"
|
||||
onclick={() => toggle(chore)}
|
||||
disabled={togglingIds.has(chore.id)}
|
||||
>
|
||||
<span class="checkbox">{@html circleIcon}</span>
|
||||
<span class="chore-name">{choreName(chore)}</span>
|
||||
<span class="chore-value">{chore.value} {chore.type}</span>
|
||||
@@ -1716,7 +1730,11 @@
|
||||
<p class="empty">All done!</p>
|
||||
{:else}
|
||||
{#each weeklyPending as chore}
|
||||
<button class="chore" onclick={() => toggle(chore)} disabled={togglingIds.has(chore.id)}>
|
||||
<button
|
||||
class="chore"
|
||||
onclick={() => toggle(chore)}
|
||||
disabled={togglingIds.has(chore.id)}
|
||||
>
|
||||
<span class="checkbox">{@html circleIcon}</span>
|
||||
<span class="chore-name">{choreName(chore)}</span>
|
||||
<span class="chore-value">{chore.value} {chore.type}</span>
|
||||
|
||||
Reference in New Issue
Block a user