From ab8fe0d1080c974a7511d498d1dede3fe3631a05 Mon Sep 17 00:00:00 2001 From: iamdoubz <> Date: Thu, 5 Nov 2026 16:08:41 -0600 Subject: [PATCH] Add review screen --- frontend/src/routes/Review.svelte | 296 ++++++++++++++++++++++++++++++ 1 file changed, 296 insertions(+) create mode 100644 frontend/src/routes/Review.svelte diff --git a/frontend/src/routes/Review.svelte b/frontend/src/routes/Review.svelte new file mode 100644 index 0000000..9602f1b --- /dev/null +++ b/frontend/src/routes/Review.svelte @@ -0,0 +1,296 @@ + + +{#snippet eventRow(e: CalEvent)} +
  • +
    + {#if selecting} + + {/if} + + {#if e.include} + + {:else} + + {/if} +
    + {#if editing === e.id} + (editing = null)} ondelete={remove(e.id)} /> + {/if} +
  • +{/snippet} + +{#snippet group(title: string, list: CalEvent[], note: string)} + {#if list.length} +

    {title} ({list.length})

    + {#if note}

    {note}

    {/if} + + {/if} +{/snippet} + +
    +
    +
    + {#if scan.image_keys.length} +
    + {`Page + {#if activeBox && scan.events.find((e) => e.id === active)?.page === page} +
    + {/if} +
    + {:else} +

    The photo has been deleted.

    + {/if} +
    +
    + {#if scan.image_keys.length > 1} + {#each scan.image_keys as _, i} + + {/each} + {/if} + +
    +
    + +
    +
    + + + + + + +
    + + {#if selecting} +
    +

    {selected.length} selected

    +
    + + + + + +
    +
    + {/if} + + {#if editing === 'new'} +
    +

    New event

    + s.id === scan.source_id)?.child_ids ?? [] }} + onsave={add} + oncancel={() => (editing = null)} + /> +
    + {/if} + + {#if view === 'grid'} +

    Tap a day to add an event.

    + {#each months as month} + e.include)} {colorFor} onday={addOn} /> + {/each} + {:else} + {#if !live.length && !scan.menu_items.length} +

    Nothing was found on this page. Add events by hand, or discard the scan.

    + {/if} + {@render group('Needs a look', needs, 'Each one says why. Tap to see where it came from on the photo.')} + {@render group('Updated', updated, 'Already on your calendar; publishing applies these changes.')} + {@render group('New', fresh, '')} + + {#if unchanged.length} + + {#if open.unchanged}
      {#each unchanged as e (e.id)}{@render eventRow(e)}{/each}
    {/if} + {/if} + {#if excluded.length} + + {#if open.excluded}
      {#each excluded as e (e.id)}{@render eventRow(e)}{/each}
    {/if} + {/if} + + {#if scan.menu_items.length} +

    Menu ({scan.menu_items.length} days{flaggedMenu ? `, ${flaggedMenu} need a look` : ''})

    +

    One food per line. Your kids pick lunch days on the Lunch screen after you publish.

    +
      + {#each scan.menu_items as m (m.id)} + {@const text = m.items.join('\n')} + + {/each} +
    + {/if} + {/if} +
    +
    + +