{t('view.upcoming')}

{#each [['list', t('view.list')], ['week', t('view.week')], ['calendar', t('view.month')]] as [value, label]} {/each}
{#if upcomingView.mode === 'calendar'} {:else if upcomingView.mode === 'week'} {:else} {#each days as day (day.date)} {@const tasks = live(day.date)}
onDragOver(e, day.date)} ondragleave={() => (over = null)} ondrop={(e) => onDrop(e, day.date)} >

{heading(day.date)}

{#if tasks.length} {#each tasks as task (task.id)}
startDrag(e, TASK, task.id)} ondragend={() => (over = null)} >
{/each} {:else}

—

{/if}
{/each} {/if}