Away Mode

Talent availability status on Z Link pages

What is Away Mode?

Away mode lets talent set a temporary availability status with an optional message. When active, an away banner is displayed on their public Z Link page. Away mode is informational only — it does not block offer creation.

How It Works

Setting Away Mode

Endpoint: PUT /api/account/away

Auth: Required (account owner)

Request body:

FieldTypeDescription
awayUntilISO date string or nullWhen the talent returns. null clears away mode.
awayMessagestring or nullOptional message shown on Z Link

Validation:

  • awayUntil must be a valid ISO date string when provided
  • awayMessage is trimmed; empty strings become null

Implementation: apps/zooly-app/app/api/account/away/route.ts

Database

Two columns on the account table:

ColumnTypeDescription
away_untiltimestamptzWhen the talent returns (null = not away)
away_messagetextOptional message

The setAwayMode(id, awayUntil, awayMessage) function in packages/db/src/access/account.ts explicitly sets both fields, supporting null values to clear away mode. This is separate from updateAccount which strips null values.

The public Z Link page at apps/zooly-app/app/(pages)/z/[handle]/page.tsx checks:

  • If account.awayUntil exists and is in the future, the away banner is shown
  • The banner displays the return date and the awayMessage (if set)
  • Offers can still be submitted — the banner is informational only

Key Files

FileRole
apps/zooly-app/app/api/account/away/route.tsAPI endpoint
packages/db/src/access/account.tssetAwayMode access function
apps/zooly-app/app/(pages)/z/[handle]/page.tsxZ Link away banner display
packages/types/src/types/Account.tsawayUntil and awayMessage type fields
  • Offers System — offers can still be created while talent is away