Skip to content
Success

Changes

Summary

  1. registration: switching type must not carry the other branch's data (commit: f182d45) (details)
Commit f182d455db3a8ce7361ae7d2e691c06efffe267b by info
registration: switching type must not carry the other branch's data

Reported from real use: pick a clinic, switch to "Kurierdienst", register — and
the confirmation mail arrived as "Medizinischer Kurierdienst / Einrichtung:
Facharztklinik Hamburg / Anschrift: Martinistraße 78". There was no watcher on
form.type at all, so stoid/orgName/street/plz/city kept the clinic's values and
the courier branch submits those fields verbatim. Switching type now clears the
clinic selection, the address fields and the related errors.

Couriers may register with any address, freemail included — they are not tied to
a clinic domain and every courier registration is reviewed manually anyway. The
block stays for clinics, where the domain is what proves the registrant belongs
to the Standort they picked. Enforced on the server too, not just in the form.

The confirmation mail is now written per type: a courier is not a clinic, so it
gets its own description (orders on the phone, confirm pickup/delivery in the
app, free, manual review) and the detail row reads "Unternehmen" rather than
"Einrichtung". Both the HTML and the plain-text alternative.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
(commit: f182d45)
The file was modifiedserver/api/registration/submit.post.ts (diff)
The file was modifiedserver/utils/mail.ts (diff)
The file was modifiedapp/components/RegistrationForm.vue (diff)
The file was modifiedserver/utils/registrationValidation.ts (diff)