UrgentCard
An urgent request, in the client's Inbox thread and in owner chat: who, what, why in their words, the time Okami worked out with a button to Accept each, Decline, and by when; then how it went.
States
The red wash of what needs a person while it's asked; quiet once it's answered or expired. Only the member it's for, the owner and managers see the buttons.
Asked, yours to answer
Urgent: Eva, Haircut
“My wedding is at noon tomorrow”
Okami worked out 08:00 or 18:00 on Tuesday 3. 11. with Kelso, just outside their hours. Nothing is booked until someone accepts.
Answer by 11:30, or Okami tells the client it couldn't be arranged.
Asked, someone else's
Urgent: Eva, Haircut
“My wedding is at noon tomorrow”
Okami worked out 08:00 or 18:00 on Tuesday 3. 11. with Kelso, just outside their hours. Nothing is booked until someone accepts.
Waiting for Kelso's answer.
Accepted
Urgent: Eva, Haircut
“My wedding is at noon tomorrow”
Accepted: booked at 08:00.
Declined
Urgent: Eva, Haircut
“My wedding is at noon tomorrow”
Declined. Eva was told, with the next free time.
No answer in time
Urgent: Eva, Haircut
“My wedding is at noon tomorrow”
No answer in time. Eva was told, with the next free time.
import { UrgentCard } from "@/components/shared/urgent-card";
<UrgentCard
view={request}
labels={labels}
onAnswer={(answer) => answerUrgentAction({ requestId: request.id, ...answer })}
/>Guidelines
- One button per proposed time, saying the time: Accept books exactly that, outside the member's hours, and leaves their hours as they are.
- Nothing is booked until someone accepts; the card says so, and by when Okami tells the client it couldn't be arranged.
- The reason is the client's own words, quoted, never Okami's summary of them.
API
| Prop | Type | Default | Description |
|---|---|---|---|
| view | UrgentView | — | The request as lib/urgent/view.ts reads it: status, who, what, why, the times, by when, whether this reader may answer. |
| labels | UrgentCardLabels | — | The card's words in the reader's language; the dashboard's UrgentCard fills them from Dashboard.urgent. |
| onAnswer | (answer) => void | — | { accept: true, startISO } for one of the times, or { accept: false }. |
| busy | boolean | false | While an answer is on its way: the buttons wait. |