{@const dayFrom = new Date(day).setHours(0, 0, 0, 0)} {@const dayTo = new Date(day).setHours(23, 59, 59, 999)} {@const grouped = groupTeamData( toSlots(getAllEvents(allSlots, dayFrom, dayTo)), todos, getAllEvents(allEvents, dayFrom, dayTo), me, $calendarByIdStore )} {@const gitem = grouped.find((it) => it.user === person)} {@const planned = gitem?.mappings.reduce((it, val) => it + val.total, 0) ?? 0} {@const pevents = gitem?.events.reduce((it, val) => it + (val.dueDate - val.date), 0) ?? 0} {@const busy = gitem?.busy.slots.reduce((it, val) => it + (val.dueDate - val.date), 0) ?? 0} {@const txInfo = group(txes, persons, dayFrom, dayTo)}
{#if planned > 0}
{/if} {#if pevents > 0}
{/if} {#if busy > 0}
{/if}
{#if txInfo.add.size > 0}
{#each Array.from(txInfo.add.entries()) as add}
{add[1].count}
{/each}
{/if} {#if txInfo.change.size > 0}
{#each Array.from(txInfo.change.entries()) as change}
{change[1].count}
{/each}
{/if}