# A weekly timesheet for an agency

The screen answers where one person's week went: projects down, days across, the time in hours and minutes, and totals on both edges for whoever asks on Friday. Empty cells are a quiet dash, so the filled ones stand out, and today's column is shaded. On a phone the same week becomes a list of days, because a table never scrolls sideways there.

Checked 2 December 2026. By Bohuslav Poláček. https://meadowstack.com/screens/timesheet/

*Luke Hayes's week 48, 23 to 29 November 2026, rendered from the kit's components with the demo's hours: the table, or a list of days in a narrow frame.*

A live screen, rendered from the kit's components on the page: https://meadowstack.com/screens/timesheet/

Open it in the live demo: https://meadowstack.com/demo/?lang=en#/brightpath/cas/vykaz?jako=bp-lukas

From the example app [An app for a studio or agency](https://meadowstack.com/examples/agency-capacity-planning/).

## What the screen shows

- **The header**: "Timesheet" with the week beside it, "Week 48, 23 Nov to 29 Nov", and View, which switches between the timer, the timesheet and the calendar of the same hours. View carries a dot because the timer is the default.
- **The week buttons**: previous, "This week" and next, as the one row above the table. The week lives in the address (`?tyden=2026-11-23`), so a sheet can be linked, and "This week" is disabled while the current week is on screen.
- **The table**: one row per project with time that week, the client in ink, the project in grey and its identity dot; one 80px column per day, right-aligned in tabular figures; the row's total at the right edge, the day's total at the foot and the week's in the corner, 36:45 here. Today's column is shaded.
- **Empty cells**: a quiet dash, which a screen reader hears as 0:00. The filled cells stand out without any colour.
- **On a phone**: below 768px the table gives way to a list of days, each with its total and the projects under it, then the week's total. Nothing scrolls sideways.

## Why the sheet is read, not typed

The sheet has no inputs. Time is tracked with the timer, one bar that says what you work on and for whom and then starts, and the calendar draws the same entries block by block. The sheet adds those entries up per project and day, so the three views of a week can never disagree.

Every value goes through one formatter: hours and minutes, the way people read time, in tabular figures so the columns line up. A project without time that week has no row at all, and a day without time keeps its column with a dash, so the week always reads Monday to Sunday.

## What AI tools get wrong here

Asked for a timesheet, a code generator draws a spreadsheet: an input in every cell, 0:00 in every empty one, and a table that scrolls sideways on a phone. Three things go missing:

- **One source for the hours.** A grid of inputs beside a timer keeps two records of the same week, and they drift apart. In Meadowstack the sheet is computed from the time entries the timer writes and the calendar draws.
- **Quiet emptiness.** A sheet full of zeros hides the few numbers that matter. An empty cell is a dash in the subtle grey with 0:00 for a screen reader, and the totals are set in medium weight.
- **No sideways scrolling on a phone.** The kit's rule is that a table never scrolls sideways there. Seven day columns cannot fit 390px, so the same rows become a list of days: the table carries `max-md:hidden`, the list `md:hidden`. For tables with more columns, [DataTable](https://meadowstack.com/components/data-table/) hides the less important ones with `hideOnMobile` and folds their values into a visible cell.

## Who sees it

Everyone at the studio tracks their own time and sees the project budgets, a studio that shows the numbers to the people who spend them. A client's guest sees neither. The sheet shows the signed-in person's own week, so the demo link signs in as Luke Hayes to open his. The rules are one function asked through `can()` by the pages and again by the api ([permissions](https://meadowstack.com/patterns/permissions/)). The same people's weeks ahead are planned in the [capacity plan](https://meadowstack.com/screens/capacity-planning/).

## How the sheet is added up

*The demo builds the sheet from the time entries: seconds per project and day, rows only for projects with time, a total for each day and the week, and the quiet dash that a screen reader still hears as 0:00.*

From `apps/demo/src/modules/time/pages/timesheet.tsx` in the Meadowstack repository:

```tsx
const cell = (projectId: string, day: Date) =>
  entries
    .filter((entry) => entry.projectId === projectId && dayKey(entry.start) === dayKey(day))
    .reduce((sum, entry) => sum + entrySeconds(entry), 0);
const rows = projects
  .map((project) => ({ project, values: days.map((day) => cell(project.id, day)) }))
  .filter((row) => row.values.some(Boolean));
const dayTotals = days.map((_, index) => rows.reduce((sum, row) => sum + row.values[index]!, 0));
const total = dayTotals.reduce((sum, value) => sum + value, 0);
const today = days.findIndex((day) => dayKey(day) === dayKey(now));
const value = (seconds: number) =>
  seconds ? (
    formatDuration(seconds)
  ) : (
    <>
      <span aria-hidden="true" className="text-fg-muted">
        –
      </span>
      <span className="sr-only">0:00</span>
    </>
  );
```

## Where else the index screen type runs

*The example apps that render index screens like this one, read from the demo's source when the site was built.*

| Example app | Modules | Side panel first | Decision card | History |
| --- | --- | --- | --- | --- |
| [An app for a packaging and print company](https://meadowstack.com/examples/packaging-print-production/) | 5 | Yes | Yes | Yes |
| [An app for a studio or agency](https://meadowstack.com/examples/agency-capacity-planning/) | 5 | Yes | Yes | Yes |
| [An app for a haulage company](https://meadowstack.com/examples/haulage-dispatch-planning/) | 4 | Yes | No | Yes |
| [An app for a roastery with an online shop](https://meadowstack.com/examples/coffee-roastery-production/) | 5 | Yes | No | Yes |
| [An app for a sports club](https://meadowstack.com/examples/sports-club-court-bookings/) | 5 | Yes | Yes | Yes |
| [An app for a construction company](https://meadowstack.com/examples/construction-site-management/) | 8 | Yes | Yes | Yes |
| [An app for an accounting office](https://meadowstack.com/examples/accounting-office-documents/) | 4 | Yes | Yes | Yes |
| [An app for restaurants and venues](https://meadowstack.com/examples/restaurant-staff-rota/) | 5 | Yes | Yes | Yes |
| [An app for one person](https://meadowstack.com/examples/personal-app-for-a-creator/) | 4 | Yes | No | Yes |

Read from the demo's source when the site was built: 9 of 9 example apps render a <Screen archetype="index">. Side panel first means RecordPeek, the decision card ApprovalPanel, the history AuditTimeline.

## Questions

### Can hours be typed straight into the timesheet?

No. The sheet adds up the time entries the timer records, so the timer, the sheet and the calendar always agree about a week.

### How does the timesheet show a day without time?

As a quiet dash in each cell and in the day's total, which a screen reader hears as 0:00. The days with time stand out without any colour.

### Why is time written as 6:45 and not as a decimal?

Hours and minutes are how people read time. Every value goes through one formatter in tabular figures, so the columns line up and can be compared.

### How does the timesheet work on a phone?

Below 768px the table becomes a list of days with their totals and the projects under each, then the week's total. Nothing scrolls sideways.

### Can a week be linked?

Yes. The week lives in the address as the date of its Monday, so a link opens the same week, and This week brings back the current one.

## Related

- [An app for a studio or agency](https://meadowstack.com/examples/agency-capacity-planning/) (Example app)
- [A kanban task board for an agency's client work](https://meadowstack.com/screens/task-board/) (Screens)
- [A resource capacity plan for an agency](https://meadowstack.com/screens/capacity-planning/) (Screens)
- [AsyncState: every data view has four states](https://meadowstack.com/components/async-state/) (Components)
- [DataTable: the table of every list](https://meadowstack.com/components/data-table/) (Components)
- [FilterBar: the one row above a list](https://meadowstack.com/components/filter-bar/) (Components)
