Skip to content

feat(drivers): add driver management#14

Merged
timderes merged 13 commits intomainfrom
td/driver-management
Apr 8, 2026
Merged

feat(drivers): add driver management#14
timderes merged 13 commits intomainfrom
td/driver-management

Conversation

@timderes
Copy link
Copy Markdown
Owner

@timderes timderes commented Apr 1, 2026

No description provided.

timderes added 2 commits April 1, 2026 17:16
Add a Driver type and integrate it with the Dexie database (drivers table now typed as Driver). Add a new driver management page at /[locale]/driver (uses useLiveQuery to read drivers, DefaultLayout and static props). Add a navigation entry and icon for Drivers, and add i18n keys for "drivers" in English and German. These changes set up basic driver CRUD scaffolding and typing for future features.
Introduce driver classification logic and related resources. Adds renderer/lib/driver/getDriverClass.ts with getDriverClass and getClassFromTable to derive JKS and SKS classes from a birth date (optionally for a specified year). Adds JKS_CLASSES and SKS_CLASSES age tables to renderer/utils/constants.ts. Adds unit tests renderer/tests/functions/driver/getDriverClass.test.ts (uses fixed years for deterministic results) and a German locale file renderer/public/locales/de/driver.json. Also updates .vscode/settings.json to include "Superkartslalom".
@timderes timderes self-assigned this Apr 1, 2026
@timderes timderes added enhancement New feature or request renderer Issues related to the renderer process labels Apr 1, 2026
@timderes timderes linked an issue Apr 1, 2026 that may be closed by this pull request
16 tasks
timderes and others added 11 commits April 4, 2026 16:33
merge current main into dev branch
Allow getDriverClass to gracefully handle invalid or out-of-range birth dates by returning undefined for JKS/SKS instead of throwing. Update the function signature to return number | undefined, add validation for malformed birth years, and refactor getClassFromTable to return undefined when no matching age bucket is found. Update tests to assert the new behavior (added a case for a too-young birthDate and changed the invalid-date test to expect undefined classes). Documentation/comments and examples were also added to clarify the new behavior.
Bump Mantine packages (core, form, hooks, modals, notifications, store) to 9.0.1 and add @mantine/dates and dayjs to dependencies. Import @mantine/dates/styles.css in renderer/pages/_app.tsx and update package-lock.json to reflect the dependency changes so Mantine date components can be used.
Introduce driver management features: add a reusable PageHeader component, a DriverForm component and a useDriverForm hook to handle validation, persistence and notifications. Add a driver creation page and enhance the driver index page with listing, class badges, edit/delete actions, and navigation to the create page. Wire up Dexie live queries to load drivers and clubs, use dayjs for date formatting, and add English and German i18n files for driver-related strings.
…ne confirm modal for delete

Agent-Logs-Url: https://github.com/timderes/open-slalom/sessions/b4328017-a903-4602-b516-1e2802ef2b7a

Co-authored-by: timderes <50623315+timderes@users.noreply.github.com>
…ogging condition in DriverForm

Agent-Logs-Url: https://github.com/timderes/open-slalom/sessions/b4328017-a903-4602-b516-1e2802ef2b7a

Co-authored-by: timderes <50623315+timderes@users.noreply.github.com>
…to driver table

Agent-Logs-Url: https://github.com/timderes/open-slalom/sessions/69f1ef3b-90f1-4d45-8bed-728fdf087fe6

Co-authored-by: timderes <50623315+timderes@users.noreply.github.com>
Collapse Mantine imports in DriverDetail and tidy formatting. Reorder and consolidate JKS_CLASSES/SKS_CLASSES import in driver index, remove unused `group` fields from JKS/SKS option objects, and reformat Group/ActionIcon JSX for better readability. No functional changes intended—primarily import/formatting and minor cleanup.
…-and-scroll-area

feat(drivers): search, class filter, and column sorting for driver table
@timderes timderes closed this Apr 8, 2026
@timderes timderes reopened this Apr 8, 2026
@timderes timderes marked this pull request as ready for review April 8, 2026 15:46
@timderes timderes merged commit 43c4f6d into main Apr 8, 2026
@timderes timderes deleted the td/driver-management branch April 8, 2026 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request renderer Issues related to the renderer process

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(drivers): Add routes to create and manage drivers

2 participants