Commit Graph
170 Commits
Author SHA1 Message Date
Hendrik Belitz 400b22a6d1 Switched email templates to the new template engine. 2026-01-07 13:36:43 +01:00
Karl Ludwig Weise 94184f2926 Added used email types to new email system 2026-01-06 09:39:26 +01:00
Karl Ludwig Weise 8d5e055c76 Changed phone description in add-personal-data-form 2025-11-24 21:47:14 +01:00
Karl Ludwig Weise 1fac1e0e2c Completed email renderer poc for appointment confirmation 2025-11-24 21:42:14 +01:00
Karl Ludwig Weise 80662c5da4 Added poc of new email renderer 2025-11-21 15:19:25 +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
8f927ba5d7 Pages for managing my account set up (#131)
Co-authored-by: Karl Ludwig Weise <ludwig@ludwigweise.de>
2025-11-12 14:30:07 +01:00
85e642fa89 Added onboarding dashboard (#128)
* Added onboarding dashboard

* Improve onboarding expericene

---------

Co-authored-by: Karl Ludwig Weise <ludwig@ludwigweise.de>
2025-11-12 14:28:35 +01:00
HendrikandGitHub 983f6c3857 Use the normal invitation flow when inviting an initial tenant admin. (#122) 2025-10-29 16:26:49 +01:00
CopilotGitHubhbelcopilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
1e311bed32 Migrate to Zod 4 (#125)
* Initial plan

* Migrate to Zod 4.1.12 and update all imports

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

* Fix test UUIDs to be RFC 4122 compliant for Zod 4

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

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: hbel <7416029+hbel@users.noreply.github.com>
2025-10-27 15:58:24 +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
604e7fdddd Added public tenant api (#115)
* Added public tenant api

* Moved public channels to their own endpoint and creator public api path

---------

Co-authored-by: Karl Ludwig Weise <ludwig@ludwigweise.de>
2025-10-21 18:22:09 +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
HendrikandGitHub 44cc5d0837 Merge pull request #102 from open-reception/feat/settings
Feat/settings
2025-10-16 09:26:00 +02:00
Hendrik Belitz 583cb56670 Names in channel update schema should be an optional property 2025-10-15 17:34:30 +02:00
Karl Ludwig Weise a56f6910e4 Update tenant store on changing settings 2025-10-15 13:35:30 +02:00
Karl Ludwig Weise 74df843077 Fix lint 2025-10-13 15:32:00 +02:00
Karl Ludwig Weise db67350f2d Move significant config to base tenant config 2025-10-13 15:25:28 +02:00
0a0703f181 Added ui to manage absences (#98)
* Added ui to manage absences

* Added test for new endpoint

---------

Co-authored-by: Karl Ludwig Weise <ludwig@ludwigweise.de>
2025-10-13 12:58:42 +02:00
Karl Ludwig Weise ce0ac25b82 Use actual data 2025-10-12 21:11:39 +02:00
Karl Ludwig Weise 436dadc903 Merge remote-tracking branch 'origin/feat/absences' into feat/settings 2025-10-12 20:32:18 +02:00
Karl Ludwig WeiseandGitHub 6b94c2d2f6 Merge branch 'main' into feat/absences 2025-10-12 20:29:54 +02:00
Karl Ludwig Weise fd3230fece Added settings form -wip 2025-10-12 20:28:28 +02:00
Karl Ludwig Weise 6dcb32ff85 Merge remote-tracking branch 'origin/main' into feat/absences 2025-10-12 15:09:11 +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
d69d0a5b73 Fix editing channels with slot templates (#97)
Co-authored-by: Karl Ludwig Weise <ludwig@ludwigweise.de>
2025-10-11 13:12:33 +02:00
Karl Ludwig Weise c4075cef71 Merge remote-tracking branch 'origin/main' into feat/absences 2025-10-10 15:37:39 +02:00
Karl Ludwig Weise f256ebaf6a Added test for new endpoint 2025-10-10 15:37:29 +02:00
Hendrik Belitz 7f1fee52d0 Removed default value (not needed, breaks typings) 2025-10-09 10:18:59 +02:00
Karl Ludwig Weise 06161d434f Added ui to manage absences 2025-10-08 21:47:59 +02:00
Hendrik Belitz b739fa0d2b Fixed db schema, removed constraints that referenced a table in another db 2025-10-07 19:43:25 +02:00
Hendrik Belitz 988707fc78 DO not reset global admin to confirmed. 2025-10-07 19:25:56 +02:00
Hendrik Belitz 179f6d2808 Added missing existance check 2025-10-07 18:37:30 +02:00
Hendrik Belitz 8ae28d283c Merge branch 'main' of github.com:open-reception/appointment-booking-software 2025-10-07 18:32:21 +02:00
Hendrik Belitz bdc157bda6 Set access-granted for global admin. 2025-10-07 18:32:13 +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
86b2b0f869 Added error page (#96)
Co-authored-by: Karl Ludwig Weise <ludwig@ludwigweise.de>
2025-10-06 11:52:11 +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
HendrikandGitHub 636ff6dd0b Fix/channel is public api (#93)
* Channel pause

* Fix tenant config GET

* Fixed test
2025-10-05 15:42:43 +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 d2cc794aec Fix: First user on setup is global admin (#91) 2025-09-30 16:37:04 +02:00
HendrikandGitHub c2e662cc15 Update new access token in session table after switching tenants. (#87)
* Update new access token in session table after switching tenants.

* Fixed session might be undefined

* Image should be nullable when creating or updating an agent or uploading tenant logos.
2025-09-26 10:57:41 +02:00
Karl Ludwig WeiseandGitHub 838e724351 Feat/agents (#83) 2025-09-25 17:10:44 +02:00
HendrikandGitHub b1a045c7f5 Bugfix/drizzle no longer uses migration hashes (#84)
* Let drizzle handle migration decisions.

* Make sure initial admin is a global admin

* Formatting
2025-09-22 15:45:14 +02:00
e486072ffa Refactor/error and api handling (#82)
* DB migrations

* Format errors in migrations

* Implemented new error and permission handling.

* Updated and fixed tests

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

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

* Update src/routes/api/tenants/[id]/agents/[agentId]/absences/[absenceId]/+server.ts

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

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

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

* Fixed test

* Added error constants

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-18 15:04:06 +02:00
ae0a54a4c4 Added more bff errors to show what is going on (#81)
* Added more bff errors to show what is going on

* Review changes

---------

Co-authored-by: Karl Ludwig Weise <ludwig@ludwigweise.de>
2025-09-15 16:23:38 +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