A driver record that says what expires next
A driver opens as a record titled by name, with the tractor and its plate as the eyebrow and what the driver is doing now beside it. The side column starts with the one thing to do next, here the ADR certificate that ends in 24 days, then the phone, the infringements and the history. The content holds the driving left against 9, 56 and 90 hours, the five documents with their ends and the driver card's downloads.
By Bohuslav PoláčekChecked
What the record shows
- The header: the driver's name as the title, the tractor and its plate as a small eyebrow, and what the driver is doing now as a glyph and a word: Driving.
- The next step: the first thing that needs doing, with its button. For Jeremy Newton it is the ADR certificate, so the card says that without it there are no dangerous goods, and Record renewal opens the date of the new one.
- Driving hours: three meters of the driving left today, this week and in two weeks, read from the tachograph at a named time, and the deadlines that follow: the next break, the latest start of the daily and the weekly rest.
- Documents: the driving licence C+E, the Driver CPC with its periodic training, the driver card, the D4 medical and the ADR certificate, each with its end and the rule it renews by.
- Card downloads: the last one, the next due date and the downloads before, with Download the card remotely through the truck's telematics.
- Infringements and history: what the last download found, waiting for the driver, and every download and change with who made it.
When something turns to a warning
The same rules feed the drivers list's Attention pill (11 of the 24 drivers on 2 December) and the record's next step. Expired and overdue are danger, the rest a warning, and a driver with none of these is quiet: the next step then says the documents are valid and when the card was last downloaded.
| What | Warns | Danger |
|---|---|---|
| A document's end | 30 days before | once it has expired |
| The driver card's download, every 28 days | 7 days before it falls due | once it is overdue |
| Driving left for a driver on duty | under an hour left | |
| A planned trip the driver's hours rule out | always, with Re-plan in Freight |
Days left are counted from the app's clock, never typed, and the documents that are fine stay plain text: colour goes only to what needs doing.
The rules behind it
It is a record screen, one of the kit's 9 screen types (the record pattern). From the drivers list it opens beside the list first (the record side panel) and the corner button expands it to this page; both use one view component. From 1024px the next step heads the side column, and on a phone it comes before the name.
The next step is a card, never a coloured banner. A document's state is a glyph beside its words, "in 24 days" (StatusLabel), never a pill, and the history entries are labels without a subject: "Card downloaded" and who did it (AuditTimeline).
What AI coding tools get wrong here
Asked for a driver page, a coding tool draws every document as a table row with a red or green pill, puts "expires soon" in a banner across the page and types the 30 days into each component, so the list and the record soon disagree. Here the thresholds are constants in one file (DOCUMENT_WARN_DAYS, CARD_WARN_DAYS, HOURS_WARN), the one thing to do becomes the next step with its own button, and everything else stays quiet.
The history names a machine as a machine: a download by the telematics shows the download icon and "Telematics" (actorKind: "system"), not the initials of a person who does not exist. Who sees what is a rule, not a hidden button: the fleet technician runs card downloads but never reads a driver's documents.
When a document starts to warn
export type DocumentState = "valid" | "soon" | "expired";
/** Days before the end when a document starts to warn (the brief's 30 days). */
export const DOCUMENT_WARN_DAYS = 30;
/** Days before a card download falls due when it starts to warn. */
export const CARD_WARN_DAYS = 7;
/** Days before a vehicle unit download falls due when it starts to warn. */
export const UNIT_WARN_DAYS = 14;
/** Driving left below which a driver on duty needs dispatch's eye. */
export const HOURS_WARN = 60 * MINUTE;
export function documentState(daysLeft: number): DocumentState {
if (daysLeft < 0) return "expired";
return daysLeft <= DOCUMENT_WARN_DAYS ? "soon" : "valid";
}Who sees which part
const rules: Record<string, string[]> = {
// A driver's record: everyone's for dispatch and the director, one's own for a driver.
"driver.read": ["dispatcher", "manager", "driver"],
// The list of all 24 drivers.
"driver.all": ["dispatcher", "manager"],
"driver.documents": ["dispatcher", "manager"],
"driver.tachograph": ["dispatcher", "manager", "mechanic"],
"driver.download": ["dispatcher", "manager", "mechanic"],
// The three-day "co kdyby" plan is a sandbox: nothing is saved, so a driver may try their own.
"driver.plan": ["dispatcher", "manager", "driver"],
"driver.infringement.read": ["dispatcher", "manager", "driver"],
"driver.infringement.discuss": ["dispatcher", "manager"],
"driver.infringement.acknowledge": ["driver"],
};Questions
Does the record warn before a document expires?
Yes. A document turns to a warning 30 days before its end and to danger once it has expired. The first of them becomes the next step at the top of the side column, with the action that fixes it, such as Record renewal.
How often must the driver card be downloaded?
At least every 28 days under Regulation (EU) No 581/2010. The record shows the last download and the next due date, quiet until 7 days before it, and dispatch can read the card remotely through the truck's telematics.
Who can see a driver's documents?
Dispatch and the director. The fleet technician runs card downloads but does not read documents, a driver sees their own hours and infringements, and billing and the warehouse do not see the module at all.
What happens to an infringement found in a download?
It lands on the driver's record and in the history. Dispatch talks it through with the driver, and the driver then confirms they have read it; until then it waits for the driver.
Where does the next step go on a phone?
Above the driver's name. From 1024px it heads the side column beside the record.
Related
- An app for a haulage companyExample app
- A lot record that traces one step back and one step forwardScreens
- A site diary day, prefilled and signed by the right personScreens
- A fleet cost report that ranks every truckScreens
- A month close that knows what each step waits forScreens
- A time-off request waiting for a decisionScreens
Two ways
Build it yourself, or have it built
Build it yourself
Build your app on the framework
Get the codebase these apps stand on and build yours with Claude Code, Cursor or Codex.
One payment, lifetime updates
Get the frameworkHave it built
Have us build your app
Tell us how your team works. We plan the app with you and build it on the same framework at a fixed price.
After launch, Care keeps it improving, from €99 a month.
from €1,990
Describe your app