ModulesPrestartsFeaturesPrevious & Next Day

Previous & Next Day (Diaries & Prestarts)

A diary or prestart detail page has two buttons beside Back to Diaries / Back to Prestarts: the previous day and the next day. Each button names the day it goes to — ‹ Mon 5 Oct, Wed 7 Oct › — and hovering it shows the day in full (“Previous day: Monday 5 October 2026”). A day in another year shows its year.

Which record a button opens

The buttons step along one chain: the same project, the same supervisor and the same shift as the record on screen.

  • Previous day opens the nearest record in the chain on an earlier day.
  • Next day opens the nearest record in the chain on a later day.
  • Days with no record are skipped, so Friday’s next day is Monday when nobody wrote a diary over the weekend.
  • With no record either side, the button is disabled (“Previous day” / “Next day”).

Days are the project’s calendar days, whatever the viewer’s zone (see Dates & Times). A diary’s day is its diary date. A prestart’s day is the day its date and time fall on in the project’s zone; when a supervisor has two prestarts on one day, stepping forward lands on that day’s first and stepping back on its last.

Who sees which day

A button only ever opens a record the viewer can open:

  • Office users see the same diaries and prestarts as on the list, so the buttons skip anything outside their scope — an engineer only steps through their assigned supervisors’ records (and records those supervisors are associated on), a supervisor through their own and the ones they are associated on. A senior supervisor sees every supervisor’s records on their projects.
  • Clients (in the client portal) step through submitted, reviewed and confirmed diaries only. A draft is never offered.

Speed

The buttons load beside the record, not after it. Hovering or focusing a button loads that day’s record in the background, so the click opens it straight away. When a record is created, deleted or moved — by anyone — the buttons on an open page update on their own.

Not on mobile yet

The mobile diary and prestart screens do not have these buttons yet; the API below is ready for them.

API

MethodPathReturns
GET/v1/orgs/{orgId}/projects/{projectId}/diaries/{diaryId}/adjacent{ previous, next } — each { id, date } or null
GET/v1/orgs/{orgId}/projects/{projectId}/prestarts/{prestartId}/adjacentThe same, date being the prestart’s project-local day
GET/v1/client-portal/projects/{projectId}/diaries/{diaryId}The client diary detail carries the same pair as adjacent, settled diaries only

The two office routes sit behind the record’s own visibility check: a record the caller cannot open is a 404, and its neighbours are filtered by the same scope the list uses. Each is one query on the live-diary unique index (diaries) or the prestart indexes (prestarts), stopping at the first visible record each way.

They are separate reads from the record’s detail on purpose: every save answers with the detail, and a neighbour created or deleted elsewhere must refresh the buttons without reloading the whole record.