Commit Graph
47 Commits
Author SHA1 Message Date
Karl Ludwig Weise 6f13926edc Fix some issues from vitest update 2026-06-03 21:10:47 +02:00
Hendrik Belitz 897b47f1a3 Merge branch '273-bug-tenantdomain-is-interpreted-inconsistently-confirm-invite-urls-are-malformed' of github.com:open-reception/appointment-booking-software into 273-bug-tenantdomain-is-interpreted-inconsistently-confirm-invite-urls-are-malformed 2026-05-30 20:53:58 +02:00
Hendrik Belitz 4a5b77fb6f Untangle invite from user. Removed redundant data fields. 2026-05-30 20:53:45 +02:00
Karl Ludwig Weise ff53c2131d Fix: User invites should only ever come for tenant domain 2026-05-30 20:42:20 +02:00
Karl Ludwig Weise bad2fe2ddb Unify confirmation emails, fixing issue #273 2026-05-29 21:26:31 +02:00
Hendrik Belitz 461925a6e4 Added tenant-specific throttling for clients 2026-05-16 18:59:50 +02:00
Karl Ludwig Weise a9a6cb75b0 Fix tests 2026-05-08 13:45:02 +02:00
Karl Ludwig Weise c74a8dfb37 Fix absences and appointments to block proper slots 2026-04-23 16:49:12 +02:00
Karl Ludwig Weise 701492e637 Fix check 2026-04-17 16:52:10 +02:00
HendrikandGitHub b3c4257ec4 214 calendar agents still appear in availableagents if they are unavailable (#220)
* Move schedule determination to full UTC. Adapt frontend to handle UTC input. Adapted tests.

* Type fix

* Respect all channels when checking whether an agent is booked.
2026-03-05 18:03:59 +01:00
HendrikandGitHub 7edd77ded0 214 calendar agents still appear in availableagents if they are unavailable (#219)
* Move schedule determination to full UTC. Adapt frontend to handle UTC input. Adapted tests.

* Type fix
2026-03-04 20:56:19 +01:00
HendrikandGitHub 166373aa85 fixed error and failing unit tests (#203) 2026-02-26 17:29:49 +01:00
513b706877 Staff: Grant access to existing clients front-end implementation -wip (#201)
* Staff: Grant access to existing clients front-end implementation -wip

* WIP

* Use correct keyhsare when decrypting tunnels for new users.

* Set ACCESS_GRANTED even when all tunnel keys are already there

* Finalized granting access to staff members

* Fix lint

* Re-added logs

---------

Co-authored-by: Karl Ludwig Weise <ludwig@ludwigweise.de>
Co-authored-by: Hendrik Belitz <hendrik@innovation-through-understanding.de>
2026-02-26 17:29:27 +01:00
Karl Ludwig WeiseandGitHub 60844d6e40 Merge pull request #186 from open-reception/feat_add_channel_staff
Optionally set staff channel associations when creating or updating a…
2026-02-08 11:46:36 +01:00
Hendrik Belitz a2fc4e4d34 Format und type fixes 2026-02-07 11:39:13 +01:00
Hendrik Belitz c5d8d174aa Optionally set staff channel associations when creating or updating a channel. 2026-01-28 17:23:46 +01:00
Karl Ludwig Weise 3f550af281 Added custom domains for tenants 2026-01-23 21:38:06 +01:00
a64afbd297 160 book appointment confirm appointment requests (#179)
* Extension of tenant schema

* Notification service

* Notification endpoints

* Format errors

* Update src/lib/server/db/tenant-schema.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/lib/server/services/notification-service.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Explicit where clause in delete notification

* Update tenant-migrations/0008_neat_swarm.sql

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Sort notifivcations by creation date. Do not explicitly check for existance in mark as read.

* Fixed tests

* Mail templates appointment cancellation

* Appointment cancellation notification texts

* Delete appointment by staff

* Deletion endpoint for staff

* My Appointments endpoint for clients

* Delete appointment by client

* Copilot review fixes

* Fixes after notification changes and updates.

* Fixed limiting errors

* Rejection email template

* Send out request, confirmed notifications, send out confirmed, denied emails.

* Fix test

* MIgration files

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-01-22 11:39:12 +01:00
e9bd83bcd2 148 provide apis for cancelling appointments staff and client wise (#164)
* Extension of tenant schema

* Notification service

* Notification endpoints

* Format errors

* Update src/lib/server/db/tenant-schema.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/lib/server/services/notification-service.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Explicit where clause in delete notification

* Update tenant-migrations/0008_neat_swarm.sql

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Sort notifivcations by creation date. Do not explicitly check for existance in mark as read.

* Fixed tests

* Mail templates appointment cancellation

* Appointment cancellation notification texts

* Delete appointment by staff

* Deletion endpoint for staff

* My Appointments endpoint for clients

* Delete appointment by client

* Copilot review fixes

* Fixes after notification changes and updates.

* Fixed limiting errors

* Fix

* Refix fix

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-01-22 11:28:35 +01:00
a6707ef081 151 bare minimum notification system (#161)
* Extension of tenant schema

* Notification service

* Notification endpoints

* Format errors

* Update src/lib/server/db/tenant-schema.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/lib/server/services/notification-service.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Explicit where clause in delete notification

* Update tenant-migrations/0008_neat_swarm.sql

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Sort notifivcations by creation date. Do not explicitly check for existance in mark as read.

* Fixed tests

* No longer store texts in notifications

* Single source of truth for notification types

* Formatting

* Fixed linting errors

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-01-13 18:05:32 +01:00
CopilotGitHubhbelcopilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>Hendrik Belitz
337fc2e70b Add throttling to challenge APIs for brute force protection (#145)
* Initial plan

* Add throttling implementation for challenge APIs

Co-authored-by: hbel <7416029+hbel@users.noreply.github.com>

* Add tests for throttling and fix linting issues

Co-authored-by: hbel <7416029+hbel@users.noreply.github.com>

* Address code review feedback - improve error handling and documentation

Co-authored-by: hbel <7416029+hbel@users.noreply.github.com>

* Consolidate throttle storage to central DB per review feedback

Co-authored-by: hbel <7416029+hbel@users.noreply.github.com>

* Fixed errors in challenge-throlle.

* Add throttling to frontend.

* incorporated Reviewer comments

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: hbel <7416029+hbel@users.noreply.github.com>
Co-authored-by: Hendrik Belitz <hendrik@innovation-through-understanding.de>
2026-01-02 13:14:40 +01:00
Karl Ludwig WeiseandGitHub 56b7d4a9b2 Feat/calendar (#129) 2025-11-19 14:42:45 +01:00
HendrikandGitHub 6a610b96b1 When client selects an appointment that does not need to be confirmed… (#133)
* When client selects an appointment that does not need to be confirmed, send out an email. Also prepared the appointment confirmation call to send out an email.

* Removed old client table. Fixed tests.

* MIgration for removed table
2025-11-17 17:04:57 +01:00
316d7ef25b Feat/book appointment (#121)
* Adding book appointment workflow -wip

* Load channels

* Added channel and agent selection

* Provide optional filter criteria for agents and channels in schedule endpoint.

Return agent info for free schedule slots.

* Select slot

* Added personal data form

* Added login and register step

* Empty PIN input when crypto fails

* Added summary and complete steps

* Format errors in otp component

* Format error in otp component

* Store staff keypairs for appointment encryption

* storeStaffKeyPair during passkey setup

* Fix lint

* Allow access to tenants for tenant admins

* Removed centralised route-based authorization.

* Use setupState from back-end

* First tenant admin is ACCESS_GRANTED.

* load local argon2 directly in central html file

* Make sure cookie is deleted on logout

* Allow WASM execution

* Staff key is base64 encoded, not hex encoded

* Fix proceeding to summary

* Fix TunnelId. Fix Appointment Date. Fix missing AgentId for Tunnel Creation call.

* Fix book appoint flow for new users

* Fix design issues

* Show only slots that have not passed

* Reimplemented ShamirsSecretSharing with Laplacian Interpolation

* Check for existing users before creating new client tunnels. Corrected base64 decoding of challenge.

* Properly deal with existing client errors (422)

* Use new shamir implementation for shard construction and key reconstruction.

* Fix lint and check

* Fix csp header test

* Fixed tests

---------

Co-authored-by: Karl Ludwig Weise <ludwig@ludwigweise.de>
Co-authored-by: Hendrik Belitz <hendrik@innovation-through-understanding.de>
2025-11-13 14:55:11 +01:00
23941e7a5e Feat/staff (#110)
* Added basic staff functions -wip

* Fix: Use proper route for staff member creation

* Fixed errors in confirm, invite and register routes.

* Also return invited staff members when getting staff members

* Updated error handling

* Allow global admin to add other global admins

* Sort staff members by name

* Added dummy implementation of granting access to staff members

* Render tenant logo, if set

* Fix delete

* Make invited but not confirmed user entries deletable.

* Added staff onboarding with passkey -wip

* Fix delete route

* Fix passkey setup flow for staff

* Fix lint

* Fix lint

* Fix some unit tests

* Updated docs

* Refactored staff-service, fixed tests

* Setup state db migrations

---------

Co-authored-by: Karl Ludwig Weise <ludwig@ludwigweise.de>
Co-authored-by: Hendrik Belitz <hendrik@innovation-through-understanding.de>
2025-10-24 13:09:52 +02:00
12be3016f4 Validate the setup state in all relevant actions. Update it according… (#119)
* Validate the setup state in all relevant actions. Update it according to the tenant's current state.

* Update src/lib/server/db/central-schema.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Fixed schema, fixed tests, incorporated review advice

* Unused variable error fixed.

* Refactored deletion methods. Fixed partial deletion test.

* Try to delete user first before deleting key shares (to make sure the transaction fails if we cannot delete the user)

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-23 17:11:23 +02:00
9c7de2a6bd 92 check entity deletion business rules (#107)
* Added conflict checks to agent and channel deletion.

* Added missing agentId to appointment requests. Fixed tests for new error behavior.

* Removed import

* Archive agents and channels instead of deleting them.

* Update src/lib/server/services/appointment-service.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-21 18:14:19 +02:00
Karl Ludwig Weise db67350f2d Move significant config to base tenant config 2025-10-13 15:25:28 +02:00
6c63ac3c80 Fetch tenant (#101)
* Fetch tenant

* Update src/routes/api/tenants/[id]/+server.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/routes/api/tenants/[id]/+server.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Column rename

* Fixed tests

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-12 15:08:32 +02:00
c292538dc2 Feat/channels (#94)
* Added channels dashboard ui

* Fix lint

* Fix tests

---------

Co-authored-by: Karl Ludwig Weise <ludwig@ludwigweise.de>
2025-10-06 13:40:24 +02:00
4572352341 Client and staff access to appointments and schedules (#90)
* Web workers for crypto functions. Crypto key storage in db.

* First prototype appointment service and api

* Basic flows für clients.

* Staff crypto

* Browser crypto functions

* Get appointments from a date range

* API docs

* Schedule API, fixed schedule errors

* Tests and bugfixes

* Formatting

* enhanced and unified Browser-Crypto-Utilities
trying to create a new tunnel when tenant has no users now results in an error.
user creation now has a confirmation state.

* Staff API, getting and updating tunnel data.

* Tests for staff endpoints
Fixed for confirmationState
Fixed tests

* Moved logic to staff service

* Moved logic to appoointment service

* calendar route for staff members. schedule route for clients.

* Fix client access to certain routes

* Update src/routes/api/tenants/[id]/staff/__tests__/staff-api.test.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/routes/api/tenants/[id]/staff/[staffId]/public-key/__tests__/public-key.test.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/routes/api/tenants/[id]/appointments/tunnels/add-staff-key-shares/+server.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Security fixes for staff-crypto key retrieval.

* LInting errors

* DB Migrations

* Removed isEncrypted property

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-05 15:49:11 +02:00
5965fada38 Make descriptions multilingual (#89)
* Make descriptions multilingual

* Format and test fixes

* Update src/lib/server/db/tenant-schema.ts

* Fix tenant-switcher to update instantly

* Fix sql migrations for description

* Add languages to tenant table

* Fix tenant schema

* Use objects for translated fields

* Fix format

* Fix lint

* Allow longer descriptions for channels

* Field Localizations are based on tenant locales not supportedLocales

* Fix agent image list preview

* Improve language tab keyboard navigation

* Fix falsy redirect after store init

---------

Co-authored-by: Karl Ludwig Weise <office@ludwigweise.de>
Co-authored-by: Karl Ludwig Weise <ludwig@ludwigweise.de>
2025-10-01 18:43:01 +02:00
Karl Ludwig WeiseandGitHub 838e724351 Feat/agents (#83) 2025-09-25 17:10:44 +02:00
HendrikandGitHub 629351d6fa Scheduling api (#68)
* Additions for agent absencies and appointments. Schedule determination.

* Scheduling tests. Agent and appointment tests.

* Absence and Agent APIs

* Linting

* Appointment API (staffing side)

* LInting and fixed tests

* Centralised permission check

* Permission refactorings, session bugfixes

* Test fixes (first part)

* Test fixes

* Fixed type

* Linting fixes

* Fixed tests

* Formatting

* Data schema changes

* Adaptions to last merges and changes

* Incorporated changes as discussed in weekly

* Test fix
2025-09-15 16:22:41 +02:00
HendrikandGitHub 22dc3e71d6 71 implemented delete tenant route (#73)
* 71 implemented delete tenant route

* Fixed test
2025-09-08 10:35:47 +02:00
Hendrik Belitz ea5a7e50ce 67 - Refactored backend errors, added additional guards for tenant creation 2025-09-07 15:51:54 +02:00
bf610cac2b Change prettier settings (#65)
Co-authored-by: Karl Ludwig Weise <ludwig@ludwigweise.de>
2025-09-01 17:47:46 +02:00
Hendrik Belitz 9abea04803 Fix user service test 2025-08-22 18:08:56 +02:00
Hendrik Belitz 92d19efc41 53 Linting errors 2025-07-25 12:21:22 +02:00
Hendrik Belitz f7437fadf9 53 Fixed formatting 2025-07-25 12:11:12 +02:00
Hendrik Belitz 6b5cc278d5 53 Type fixes, add language to user schema 2025-07-25 12:07:42 +02:00
Hendrik Belitz b717e3a59f Confirmation mail. Fixed tests. 2025-07-24 12:40:56 +02:00
Hendrik Belitz 64f339ee99 #53 fixed errors and tests 2025-07-16 15:49:55 +02:00
Hendrik Belitz 1418bb4335 #53 Tenant creation and configuration 2025-07-16 15:27:17 +02:00
Hendrik Belitz 6a3b621430 Services for agents and channels 2025-07-14 09:12:13 +02:00
Hendrik Belitz 629c94dddc Tenant creation, update and config functions 2025-07-09 14:54:29 +02:00
Hendrik Belitz 8ee744e3be Moved unit tests. createTenant now reflects UI prototype. 2025-07-09 14:05:05 +02:00