feat(admin): manual session create/edit form

Add the shared SessionForm component (create/edit) used by the Sessies screen.
- Create mode: worker picker (useAdminUsers), activity (useActivities), zooltype,
  pair count, start/end datetime-local, pauze, notitie; posts CreateManualSessionInput.
- Edit mode: hides the worker picker, prefills from the row session, adds a status
  select; PUTs AdminUpdateSessionInput (end_time nulled when status=active).
- Builds ISO start_time/end_time from the datetime-local values; live "gewerkt"
  preview = end - start - paused; inline error on a 400.
- Wires the form into Sessions.tsx ("+ Nieuwe registratie" -> create, pencil -> edit).

Products affected: SoleLog admin client
This commit is contained in:
Bas van Rossem
2026-06-17 22:44:06 +02:00
parent b5366413b6
commit 69b46bee04
4 changed files with 532 additions and 17 deletions

View File

@@ -577,3 +577,40 @@ body {
border-radius: 12px;
cursor: pointer;
}
/* ---- Session create/edit form ---- */
.session-form {
gap: 14px;
}
.session-field {
display: flex;
flex-direction: column;
gap: 6px;
}
.session-field select,
.session-field input,
.session-field textarea {
padding: 10px 12px;
font-size: 15px;
border: 1px solid var(--border);
border-radius: 12px;
background: #ffffff;
color: var(--text);
font-family: inherit;
}
.session-field select:focus,
.session-field input:focus,
.session-field textarea:focus {
outline: none;
border-color: var(--primary);
}
.session-preview {
margin: 0;
font-size: 15px;
color: var(--text-muted);
font-variant-numeric: tabular-nums;
}