From bebf2312e5c135be3f331a5e0974bd27cef83999 Mon Sep 17 00:00:00 2001 From: Dominik Myszkowski Date: Mon, 30 Nov 2026 15:34:16 +0100 Subject: [PATCH 1/2] feat(questions): phone intake-question type, stored in E.164 (#260) A 'phone' question renders a tel input on the booking page and the widget. validateAnswersCore normalises the answer to E.164 and keeps what the attendee typed in booking_answers.raw_value (exposed on GET /v1/bookings/{id}/answers). normalizePhoneAnswer: must pass validPhone; an explicit + or 00 prefix wins (+44 is never rewritten, "(0)" after it is dropped); otherwise the question's default_country_code is prepended after dropping a national trunk 0 (kept for +39/+378/+379); extensions are refused; 8-15 digits. A number that can't be normalised, or a national one without a default code, is refused with err_invalid_phone, never stored as typed. Same path for the page, widget, MCP and the assistant. No special attendee_phone field. Migration 00078 rebuilds event_type_questions to widen the type CHECK and add default_country_code, with foreign_keys off: booking_answers references it ON DELETE CASCADE, so a rebuild with them on would delete every answer (a test pins that both answers survive and the cascade still works). Down turns phone questions into text ones. Admin: the Phone number type and a default country code field in the questions panel (en/fr). Duplication copies the code. --- CHANGELOG.md | 9 + docs/ARCHITECTURE.md | 2 + frontend/src/lib/api.ts | 5 +- .../event-types/QuestionsPanel.svelte | 30 ++- frontend/src/lib/i18n/en.json | 5 +- frontend/src/lib/i18n/fr.json | 5 +- internal/booking/booking.go | 3 + internal/booking/service.go | 6 +- .../migrations/00078_phone_question_type.sql | 46 +++++ internal/db/phone_question_migration_test.go | 122 +++++++++++ internal/handler/book.go | 7 +- internal/handler/embed.js | 9 + internal/handler/event_type_duplicate.go | 11 +- internal/handler/phone_answer.go | 86 ++++++++ internal/handler/phone_answer_test.go | 56 ++++++ internal/handler/phone_question_test.go | 190 ++++++++++++++++++ internal/handler/question_handler.go | 109 ++++++++-- internal/handler/templates/book.html | 5 + internal/i18n/locales/de-x-neutral.json | 1 + internal/i18n/locales/de.json | 1 + internal/i18n/locales/el.json | 1 + internal/i18n/locales/en.json | 1 + internal/i18n/locales/es.json | 1 + internal/i18n/locales/fr-CA.json | 1 + internal/i18n/locales/fr.json | 1 + internal/i18n/locales/it.json | 1 + internal/i18n/locales/nl.json | 1 + internal/i18n/locales/pl.json | 1 + internal/i18n/locales/pt.json | 1 + internal/i18n/locales/sv.json | 1 + 30 files changed, 678 insertions(+), 40 deletions(-) create mode 100644 internal/db/migrations/00078_phone_question_type.sql create mode 100644 internal/db/phone_question_migration_test.go create mode 100644 internal/handler/phone_answer.go create mode 100644 internal/handler/phone_answer_test.go create mode 100644 internal/handler/phone_question_test.go diff --git a/CHANGELOG.md b/CHANGELOG.md index 1149229b..4a778222 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -49,6 +49,15 @@ exact tag (`ghcr.io/calnode/calnode:0.1.0`) if you need stability between upgrad and an informal one would be wrong for everyone else. `de` is unchanged and stays formal. The variant is never offered in the language switcher or matched from `Accept-Language`; select it with `?lang=de-x-neutral` or ``. +- **Phone-number intake questions.** A new question type, Phone number, renders a `tel` + input on the booking page and the widget, and stores the answer in international format + (E.164, `+48600100200`) with what the attendee typed kept alongside (`raw_value` on + `GET /v1/bookings/{id}/answers`). Each question can set a default country code, applied + only to numbers typed without one: `600 100 200` becomes `+48600100200`, while + `+44 20 7946 0958` keeps its own country. A number that can't be normalised is refused + with a message naming the question, never stored as typed. Migration `00078` rebuilds + `event_type_questions` to accept the new type (existing questions and answers are kept) + and adds the two columns. ### Fixed diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index 599c7672..c627597f 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -411,6 +411,8 @@ New public and assistant bookings recheck selected external calendars before com Google Meet and Teams event types can opt into `allow_phone_call`. Their booking page and widget then accept an optional `phone` value. A valid number selects a telephone appointment; leaving it empty preserves video. The booking stores its own location type so management pages, calendar retries, and paid confirmation do not generate a video link for a telephone appointment. Event duplication preserves the setting. +Intake questions of type **`phone`** (migration 00078, #260) collect a number that is safe to hand on as is (SMS gateway, CRM, dialler). `validateAnswersCore` stores it in **E.164** (`+48600100200`) via `normalizePhoneAnswer`, keeping what the attendee typed in `booking_answers.raw_value` when it differs (exposed as `raw_value` on `GET /v1/bookings/{id}/answers`). The rules: the input must pass the same lenient `validPhone` as the phone location; an explicit `+` or `00` prefix wins, so `+44` is never rewritten to the default (a `(0)` after it is dropped); otherwise the question's `default_country_code` is prepended after dropping a national trunk `0` (kept for the Italian numbering plan, `+39`/`+378`/`+379`); extensions are refused (no E.164 form); the result must be 8-15 digits. A number that can't be normalised, or a national one on a question without a default code, is **refused** with `err_invalid_phone` rather than stored as typed. This is a shape check, not a numbering-plan validator. Because it runs in `validateAnswersCore`, the booking page, the widget, MCP and the assistant all get the same result. Webhooks and the answers endpoint carry the E.164 value; there is deliberately no special top-level `attendee_phone`. Both surfaces with a form render a `tel` input (`book.html`, `embed.js`); the manage page has no intake form. + The `phone_outbound` location type ("we'll call you") is the outbound counterpart: the host calls the attendee. The event type carries no number (`validateLocation` requires none); the booking page and widget show a required `phone` field instead, and `CreateBooking` refuses a missing or invalid number with HTTP 400 rather than falling back to another meeting type. A valid number is stored exactly like the `allow_phone_call` path (`bookings.location_type = "phone"`, `location_value = "tel:"`), so calendar events, emails, webhooks and the manage page treat it as an ordinary telephone appointment. The manage page needs no field of its own: a reschedule keeps the booking's stored number. The shared booking core (`createBookingForSlug`) refuses these event types, because the assistant and MCP cannot collect the number, and the booking page and widget hide the assistant for them. `internal/booking/service.go` (transactions) + `internal/handler/booking_handler.go` diff --git a/frontend/src/lib/api.ts b/frontend/src/lib/api.ts index cd6c8723..71baa197 100644 --- a/frontend/src/lib/api.ts +++ b/frontend/src/lib/api.ts @@ -97,10 +97,13 @@ export type Question = { id: string; event_type_id: string; label: string; - type: 'text' | 'select' | 'checkbox'; + type: 'text' | 'select' | 'checkbox' | 'phone'; options?: string[]; required: boolean; position: number; + /** Phone questions: prepended to a number typed without an international prefix + * ("+48"). The answer is stored in E.164. */ + default_country_code?: string; }; export type Booking = { diff --git a/frontend/src/lib/components/event-types/QuestionsPanel.svelte b/frontend/src/lib/components/event-types/QuestionsPanel.svelte index 8036ff9b..cb9d9280 100644 --- a/frontend/src/lib/components/event-types/QuestionsPanel.svelte +++ b/frontend/src/lib/components/event-types/QuestionsPanel.svelte @@ -18,18 +18,19 @@ { value: 'text', label: $t('eventTypeEditor.questions.types.text') }, { value: 'checkbox', label: $t('eventTypeEditor.questions.types.checkbox') }, { value: 'select', label: $t('eventTypeEditor.questions.types.select') }, + { value: 'phone', label: $t('eventTypeEditor.questions.types.phone') }, ]); let questions: Question[] = $state([]); let qLoading = $state(true); - let qForm = $state({ label: '', type: 'text' as 'text'|'select'|'checkbox', options: '', required: false }); + let qForm = $state({ label: '', type: 'text' as 'text'|'select'|'checkbox'|'phone', options: '', required: false, country: '' }); let qAdding = $state(false); let editingQId = $state(null); let deleteQOpen = $state(false); let pendingQ = $state(null); - let editQForm = $state({ label: '', type: 'text' as 'text'|'select'|'checkbox', options: '', required: false }); + let editQForm = $state({ label: '', type: 'text' as 'text'|'select'|'checkbox'|'phone', options: '', required: false, country: '' }); let qSaving = $state(false); async function loadQuestions() { @@ -67,8 +68,9 @@ type: qForm.type, options: qForm.type === 'select' ? optionsArray(qForm.options) : undefined, required: qForm.required, + default_country_code: qForm.type === 'phone' ? qForm.country.trim() : undefined, }); - qForm = { label: '', type: 'text', options: '', required: false }; + qForm = { label: '', type: 'text', options: '', required: false, country: '' }; await loadQuestions(); } catch (e: any) { toast.error(e.message || tr('eventTypeEditor.questions.error.add')); @@ -79,7 +81,7 @@ function startEditQ(q: Question) { editingQId = q.id; - editQForm = { label: q.label, type: q.type, options: (q.options ?? []).join('\n'), required: q.required }; + editQForm = { label: q.label, type: q.type, options: (q.options ?? []).join('\n'), required: q.required, country: q.default_country_code ?? '' }; } function cancelEditQ() { editingQId = null; } @@ -96,6 +98,8 @@ type: editQForm.type, options: editQForm.type === 'select' ? optionsArray(editQForm.options) : [], required: editQForm.required, + // '' clears it; the server ignores it for any type but phone. + default_country_code: editQForm.type === 'phone' ? editQForm.country.trim() : '', }); editingQId = null; await loadQuestions(); @@ -167,7 +171,7 @@
- { if (v) editQForm.type = v as 'text'|'select'|'checkbox'; }}> + { if (v) editQForm.type = v as 'text'|'select'|'checkbox'|'phone'; }}> {QUESTION_TYPES.find((t) => t.value === editQForm.type)?.label ?? $t('common.select')} @@ -183,6 +187,12 @@ diff --git a/internal/i18n/locales/de-x-neutral.json b/internal/i18n/locales/de-x-neutral.json index 42941bee..9e5135c0 100644 --- a/internal/i18n/locales/de-x-neutral.json +++ b/internal/i18n/locales/de-x-neutral.json @@ -149,6 +149,7 @@ "err_booking_limit": "Die maximale Anzahl anstehender Buchungen für diesen Termin ist bereits erreicht. Bitte eine bestehende Buchung stornieren oder warten, bis eine vorüber ist.", "err_email_throttled": "Zu viele Buchungen von dieser E-Mail-Adresse in letzter Zeit. Bitte später erneut versuchen.", "err_required_field": "Pflichtfeld %q fehlt", + "err_invalid_phone": "ungültige Telefonnummer für %q: mit Ländervorwahl eingeben, z. B. +49 30 1234567", "err_required_checkbox": "%q muss angekreuzt werden", "err_invalid_option": "ungültige Option für %[1]q: %[2]q ist keine zulässige Auswahl", "assistant_unavailable": "Der Buchungsassistent ist derzeit nicht verfügbar. Bitte einen Termin im Kalender unten wählen.", diff --git a/internal/i18n/locales/de.json b/internal/i18n/locales/de.json index c41e28dd..ef5c1fbe 100644 --- a/internal/i18n/locales/de.json +++ b/internal/i18n/locales/de.json @@ -149,6 +149,7 @@ "err_booking_limit": "Sie haben bereits die maximale Anzahl anstehender Buchungen für diesen Termin erreicht. Bitte stornieren Sie eine bestehende Buchung oder warten Sie, bis eine vorüber ist.", "err_email_throttled": "Zu viele Buchungen von dieser E-Mail-Adresse in letzter Zeit. Bitte versuchen Sie es später erneut.", "err_required_field": "Pflichtfeld %q fehlt", + "err_invalid_phone": "ungültige Telefonnummer für %q: bitte mit Ländervorwahl eingeben, z. B. +49 30 1234567", "err_required_checkbox": "%q muss angekreuzt werden", "err_invalid_option": "ungültige Option für %[1]q: %[2]q ist keine zulässige Auswahl", "assistant_unavailable": "Der Buchungsassistent ist derzeit nicht verfügbar. Bitte wählen Sie einen Termin im Kalender unten.", diff --git a/internal/i18n/locales/el.json b/internal/i18n/locales/el.json index e81cfc1f..40187455 100644 --- a/internal/i18n/locales/el.json +++ b/internal/i18n/locales/el.json @@ -155,6 +155,7 @@ "err_booking_limit": "Έχετε τον μέγιστο επιτρεπτό αριθμό επερχόμενων κρατήσεων για αυτόν τον τύπο ραντεβού. Παρακαλούμε ακυρώστε μια υπάρχουσα κράτηση ή περιμένετε μέχρι κάποια να περάσει πριν ξανακάνετε κράτηση.", "err_email_throttled": "Έχουν γίνει υπερβολικά πολλές κρατήσεις για αυτή τη διεύθυνση email πρόσφατα. Παρακαλούμε δοκιμάστε ξανά.", "err_required_field": "Το υποχρεωτικό πεδίο %q δεν έχει συμπληρωθεί", + "err_invalid_phone": "μη έγκυρος αριθμός τηλεφώνου για το %q: εισαγάγετέ τον με τον κωδικό χώρας, π.χ. +30 210 1234567", "err_required_checkbox": "%q πρέπει να έχει επιλεγεί", "err_invalid_option": "μη έγκυρη επιλογή για %[1]q: Το %[2]q δεν είναι έγκυρη επιλογή", diff --git a/internal/i18n/locales/en.json b/internal/i18n/locales/en.json index b268bdec..7eee9813 100644 --- a/internal/i18n/locales/en.json +++ b/internal/i18n/locales/en.json @@ -156,6 +156,7 @@ "err_booking_limit": "You already have the maximum number of upcoming bookings for this event. Please cancel an existing booking or wait until one has passed before booking again.", "err_email_throttled": "Too many bookings from this email address recently. Please try again later.", "err_required_field": "required field %q is missing", + "err_invalid_phone": "invalid phone number for %q: enter it with the country code, e.g. +44 20 7946 0958", "err_required_checkbox": "%q must be checked", "err_invalid_option": "invalid option for %[1]q: %[2]q is not an allowed choice", diff --git a/internal/i18n/locales/es.json b/internal/i18n/locales/es.json index 896b898f..99175a9b 100644 --- a/internal/i18n/locales/es.json +++ b/internal/i18n/locales/es.json @@ -155,6 +155,7 @@ "err_booking_limit": "Ya tienes el número máximo de reservas próximas para este evento. Cancela una reserva existente o espera a que pase alguna antes de volver a reservar.", "err_email_throttled": "Demasiadas reservas desde esta dirección de correo recientemente. Inténtalo de nuevo más tarde.", "err_required_field": "falta el campo obligatorio %q", + "err_invalid_phone": "número de teléfono no válido en %q: introdúcelo con el prefijo del país, p. ej. +34 600 100 200", "err_required_checkbox": "Debes marcar %q", "err_invalid_option": "opción no válida para %[1]q: %[2]q no es una opción permitida", diff --git a/internal/i18n/locales/fr-CA.json b/internal/i18n/locales/fr-CA.json index 41143791..38077c72 100644 --- a/internal/i18n/locales/fr-CA.json +++ b/internal/i18n/locales/fr-CA.json @@ -149,6 +149,7 @@ "err_booking_limit": "Vous avez déjà atteint le nombre maximum de réservations à venir pour cet événement. Annulez une réservation existante ou attendez qu'elle soit passée avant d'en créer une nouvelle.", "err_email_throttled": "Trop de réservations récentes depuis cette adresse courriel. Veuillez réessayer plus tard.", "err_required_field": "le champ obligatoire %q est manquant", + "err_invalid_phone": "numéro de téléphone non valide pour %q : entrez-le avec l'indicatif du pays, p. ex. +1 514 555 0123", "err_required_checkbox": "%q doit être coché", "err_invalid_option": "option non valide pour %[1]q : %[2]q n'est pas un choix autorisé", "assistant_unavailable": "L'assistant de réservation n'est pas disponible pour le moment. Choisissez un créneau dans le calendrier ci-dessous.", diff --git a/internal/i18n/locales/fr.json b/internal/i18n/locales/fr.json index 7d79319d..38b208f5 100644 --- a/internal/i18n/locales/fr.json +++ b/internal/i18n/locales/fr.json @@ -149,6 +149,7 @@ "err_booking_limit": "Vous avez déjà atteint le nombre maximum de réservations à venir pour cet événement. Annulez une réservation existante ou attendez qu'elle soit passée avant d'en créer une nouvelle.", "err_email_throttled": "Trop de réservations récentes depuis cette adresse e-mail. Veuillez réessayer plus tard.", "err_required_field": "le champ obligatoire %q est manquant", + "err_invalid_phone": "numéro de téléphone non valide pour %q : saisissez-le avec l'indicatif du pays, p. ex. +33 6 12 34 56 78", "err_required_checkbox": "%q doit être coché", "err_invalid_option": "option non valide pour %[1]q : %[2]q n'est pas un choix autorisé", "assistant_unavailable": "L'assistant de réservation n'est pas disponible pour le moment. Choisissez un créneau dans le calendrier ci-dessous.", diff --git a/internal/i18n/locales/it.json b/internal/i18n/locales/it.json index afeddd0c..ede281d4 100644 --- a/internal/i18n/locales/it.json +++ b/internal/i18n/locales/it.json @@ -149,6 +149,7 @@ "err_booking_limit": "Hai già raggiunto il numero massimo di prenotazioni future per questo evento. Annulla una prenotazione esistente o attendi che sia passata prima di crearne un'altra.", "err_email_throttled": "Troppe prenotazioni recenti da questo indirizzo email. Riprova più tardi.", "err_required_field": "manca il campo obbligatorio %q", + "err_invalid_phone": "numero di telefono non valido per %q: inseriscilo con il prefisso internazionale, ad es. +39 06 1234 5678", "err_required_checkbox": "%q deve essere selezionato", "err_invalid_option": "opzione non valida per %[1]q: %[2]q non è una scelta consentita", "assistant_unavailable": "L'assistente di prenotazione non è disponibile al momento. Scelga un orario dal calendario qui sotto.", diff --git a/internal/i18n/locales/nl.json b/internal/i18n/locales/nl.json index b3e730c3..afa33fa5 100644 --- a/internal/i18n/locales/nl.json +++ b/internal/i18n/locales/nl.json @@ -149,6 +149,7 @@ "err_booking_limit": "Je hebt al het maximale aantal komende boekingen voor dit evenement bereikt. Annuleer een bestaande boeking of wacht tot die voorbij is voordat je een nieuwe maakt.", "err_email_throttled": "Te veel recente boekingen vanaf dit e-mailadres. Probeer het later opnieuw.", "err_required_field": "verplicht veld %q ontbreekt", + "err_invalid_phone": "ongeldig telefoonnummer voor %q: vul het in met de landcode, bijv. +31 20 123 4567", "err_required_checkbox": "%q moet aangevinkt zijn", "err_invalid_option": "ongeldige optie voor %[1]q: %[2]q is geen toegestane keuze", "assistant_unavailable": "De boekingsassistent is momenteel niet beschikbaar. Kies een tijd in de agenda hieronder.", diff --git a/internal/i18n/locales/pl.json b/internal/i18n/locales/pl.json index d7e95fcc..0190ea52 100644 --- a/internal/i18n/locales/pl.json +++ b/internal/i18n/locales/pl.json @@ -150,6 +150,7 @@ "err_booking_limit": "Masz już maksymalną liczbę nadchodzących rezerwacji dla tego wydarzenia. Anuluj istniejącą rezerwację lub poczekaj na jej zakończenie przed kolejną rezerwacją.", "err_email_throttled": "Z tego adresu e-mail dokonywano ostatnio zbyt wielu rezerwacji. Spróbuj ponownie później.", "err_required_field": "wymagane pole %q nie zostało wypełnione", + "err_invalid_phone": "nieprawidłowy numer telefonu w polu %q: wpisz go z numerem kierunkowym kraju, np. +48 600 100 200", "err_required_checkbox": "pole %q musi zostać zaznaczone", "err_invalid_option": "nieprawidłowa opcja dla %[1]q: %[2]q nie jest dozwolonym wyborem", "assistant_unavailable": "Asystent rezerwacji jest w tej chwili niedostępny — wybierz termin z poniższego kalendarza.", diff --git a/internal/i18n/locales/pt.json b/internal/i18n/locales/pt.json index dc860ede..09d476bf 100644 --- a/internal/i18n/locales/pt.json +++ b/internal/i18n/locales/pt.json @@ -149,6 +149,7 @@ "err_booking_limit": "Já atingiu o número máximo de marcações futuras para este evento. Cancele uma marcação existente ou aguarde que passe antes de criar outra.", "err_email_throttled": "Demasiadas marcações recentes a partir deste endereço de e-mail. Tente novamente mais tarde.", "err_required_field": "falta o campo obrigatório %q", + "err_invalid_phone": "número de telefone inválido em %q: introduza-o com o indicativo do país, p. ex. +351 912 345 678", "err_required_checkbox": "%q tem de ser selecionado", "err_invalid_option": "opção inválida para %[1]q: %[2]q não é uma escolha permitida", "assistant_unavailable": "O assistente de marcações não está disponível de momento. Escolha um horário no calendário abaixo.", diff --git a/internal/i18n/locales/sv.json b/internal/i18n/locales/sv.json index c2927d67..5ef1430e 100644 --- a/internal/i18n/locales/sv.json +++ b/internal/i18n/locales/sv.json @@ -149,6 +149,7 @@ "err_booking_limit": "Du har redan nått det högsta antalet kommande bokningar för det här evenemanget. Avboka en befintlig bokning eller vänta tills den har passerat innan du gör en ny.", "err_email_throttled": "För många bokningar från den här e-postadressen på kort tid. Försök igen senare.", "err_required_field": "obligatoriskt fält %q saknas", + "err_invalid_phone": "ogiltigt telefonnummer för %q: ange det med landsnummer, t.ex. +46 8 123 456 78", "err_required_checkbox": "%q måste vara ikryssat", "err_invalid_option": "ogiltigt alternativ för %[1]q: %[2]q är inte ett tillåtet val", "assistant_unavailable": "Bokningsassistenten är inte tillgänglig just nu. Välj en tid i kalendern nedan.", From 422fc736fbf5f54ba6c7c10ede16d4293ccb5380 Mon Sep 17 00:00:00 2001 From: Dominik Myszkowski Date: Tue, 1 Dec 2026 10:03:21 +0100 Subject: [PATCH 2/2] fix(questions): drop (0) after a 00 prefix too; ask for the country code only when it is missing "(0)" was dropped only after +, and only as "(0)" or "( 0 )": 0044 (0)20 7946 0958 normalised to +4402079460958. It is now dropped after either international prefix, whatever the spacing in the brackets. The refusal always asked for the country code, also on a question with a default, where the code is applied and the number itself is the problem. err_phone_country_code now covers a national number with no default, and err_invalid_phone says to check the number and leave out an extension. --- docs/ARCHITECTURE.md | 2 +- internal/handler/phone_answer.go | 18 +++++++++++++++--- internal/handler/phone_answer_test.go | 3 +++ internal/handler/phone_question_test.go | 9 +++++++-- internal/handler/question_handler.go | 9 ++++++++- internal/i18n/locales/de-x-neutral.json | 3 ++- internal/i18n/locales/de.json | 3 ++- internal/i18n/locales/el.json | 3 ++- internal/i18n/locales/en.json | 3 ++- internal/i18n/locales/es.json | 3 ++- internal/i18n/locales/fr-CA.json | 3 ++- internal/i18n/locales/fr.json | 3 ++- internal/i18n/locales/it.json | 3 ++- internal/i18n/locales/nl.json | 3 ++- internal/i18n/locales/pl.json | 3 ++- internal/i18n/locales/pt.json | 3 ++- internal/i18n/locales/sv.json | 3 ++- 17 files changed, 58 insertions(+), 19 deletions(-) diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index c627597f..a34a1e39 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -411,7 +411,7 @@ New public and assistant bookings recheck selected external calendars before com Google Meet and Teams event types can opt into `allow_phone_call`. Their booking page and widget then accept an optional `phone` value. A valid number selects a telephone appointment; leaving it empty preserves video. The booking stores its own location type so management pages, calendar retries, and paid confirmation do not generate a video link for a telephone appointment. Event duplication preserves the setting. -Intake questions of type **`phone`** (migration 00078, #260) collect a number that is safe to hand on as is (SMS gateway, CRM, dialler). `validateAnswersCore` stores it in **E.164** (`+48600100200`) via `normalizePhoneAnswer`, keeping what the attendee typed in `booking_answers.raw_value` when it differs (exposed as `raw_value` on `GET /v1/bookings/{id}/answers`). The rules: the input must pass the same lenient `validPhone` as the phone location; an explicit `+` or `00` prefix wins, so `+44` is never rewritten to the default (a `(0)` after it is dropped); otherwise the question's `default_country_code` is prepended after dropping a national trunk `0` (kept for the Italian numbering plan, `+39`/`+378`/`+379`); extensions are refused (no E.164 form); the result must be 8-15 digits. A number that can't be normalised, or a national one on a question without a default code, is **refused** with `err_invalid_phone` rather than stored as typed. This is a shape check, not a numbering-plan validator. Because it runs in `validateAnswersCore`, the booking page, the widget, MCP and the assistant all get the same result. Webhooks and the answers endpoint carry the E.164 value; there is deliberately no special top-level `attendee_phone`. Both surfaces with a form render a `tel` input (`book.html`, `embed.js`); the manage page has no intake form. +Intake questions of type **`phone`** (migration 00078, #260) collect a number that is safe to hand on as is (SMS gateway, CRM, dialler). `validateAnswersCore` stores it in **E.164** (`+48600100200`) via `normalizePhoneAnswer`, keeping what the attendee typed in `booking_answers.raw_value` when it differs (exposed as `raw_value` on `GET /v1/bookings/{id}/answers`). The rules: the input must pass the same lenient `validPhone` as the phone location; an explicit `+` or `00` prefix wins, so `+44` is never rewritten to the default (a `(0)` after it, `+44 (0)20` or `0044 (0)20`, is dropped); otherwise the question's `default_country_code` is prepended after dropping a national trunk `0` (kept for the Italian numbering plan, `+39`/`+378`/`+379`); extensions are refused (no E.164 form); the result must be 8-15 digits. A number that can't be normalised, or a national one on a question without a default code, is **refused** rather than stored as typed: with `err_phone_country_code` when the country code is what's missing (a national number, no default), otherwise `err_invalid_phone`. This is a shape check, not a numbering-plan validator. Because it runs in `validateAnswersCore`, the booking page, the widget, MCP and the assistant all get the same result. Webhooks and the answers endpoint carry the E.164 value; there is deliberately no special top-level `attendee_phone`. Both surfaces with a form render a `tel` input (`book.html`, `embed.js`); the manage page has no intake form. The `phone_outbound` location type ("we'll call you") is the outbound counterpart: the host calls the attendee. The event type carries no number (`validateLocation` requires none); the booking page and widget show a required `phone` field instead, and `CreateBooking` refuses a missing or invalid number with HTTP 400 rather than falling back to another meeting type. A valid number is stored exactly like the `allow_phone_call` path (`bookings.location_type = "phone"`, `location_value = "tel:"`), so calendar events, emails, webhooks and the manage page treat it as an ordinary telephone appointment. The manage page needs no field of its own: a reschedule keeps the booking's stored number. The shared booking core (`createBookingForSlug`) refuses these event types, because the assistant and MCP cannot collect the number, and the booking page and widget hide the assistant for them. diff --git a/internal/handler/phone_answer.go b/internal/handler/phone_answer.go index 8f09f9df..d4ef0bb6 100644 --- a/internal/handler/phone_answer.go +++ b/internal/handler/phone_answer.go @@ -33,13 +33,25 @@ func normalizeCountryCode(raw string) (code string, ok bool) { // 0 after the country code (the Italian numbering plan: +39 06 ..., shared by San Marino // and Vatican City). Everywhere else a leading 0 written nationally is the trunk prefix // and is dropped: 020 7946 0958 with +44 is +442079460958. +// trunkZeroInParens is a "(0)" written after an international prefix, as in +// +44 (0)20 ... or 0044 ( 0 )20 ...: the national trunk prefix, not part of the number. +var trunkZeroInParens = regexp.MustCompile(`\(\s*0\s*\)`) + +// hasInternationalPrefix reports whether a typed number starts with + or 00, i.e. +// carries its own country code. +func hasInternationalPrefix(v string) bool { + v = strings.TrimSpace(v) + return strings.HasPrefix(v, "+") || strings.HasPrefix(v, "00") +} + var trunkZeroIsPartOfNumber = map[string]bool{"39": true, "378": true, "379": true} // normalizePhoneAnswer turns what an attendee typed into E.164, or reports that it can't. // // - It must pass validPhone, the same lenient check the phone location uses. // - An explicit international prefix (+ or 00) wins: +44 is never rewritten to the -// default country. "(0)" written after it, as in +44 (0)20 ..., is dropped. +// default country. "(0)" written after it, as in +44 (0)20 ... or 0044 (0)20 ..., +// is dropped, whatever the spacing inside the brackets. // - Without one, defaultCC is prepended, after dropping a national trunk 0 (see // trunkZeroIsPartOfNumber). Without a defaultCC there is nothing to normalise // against, so the number is refused. @@ -55,8 +67,8 @@ func normalizePhoneAnswer(raw, defaultCC string) (string, bool) { return "", false } international := strings.HasPrefix(v, "+") - if international { - v = strings.ReplaceAll(strings.ReplaceAll(v, "(0)", ""), "( 0 )", "") + if hasInternationalPrefix(v) { + v = trunkZeroInParens.ReplaceAllString(v, "") } var b strings.Builder for _, r := range v { diff --git a/internal/handler/phone_answer_test.go b/internal/handler/phone_answer_test.go index ddce186f..4a2965fb 100644 --- a/internal/handler/phone_answer_test.go +++ b/internal/handler/phone_answer_test.go @@ -13,6 +13,9 @@ func TestNormalizePhoneAnswer(t *testing.T) { {"0044 20 7946 0958", "+48", "+442079460958"}, // "(0)" after the country code is the national trunk prefix, not part of it. {"+44 (0)20 7946 0958", "", "+442079460958"}, + {"0044 (0)20 7946 0958", "+48", "+442079460958"}, + {"+44 ( 0)20 7946 0958", "", "+442079460958"}, + {"+44( 0 )20 7946 0958", "", "+442079460958"}, // A national trunk 0 is dropped before the default country code... {"020 7946 0958", "+44", "+442079460958"}, // ...except where it belongs to the number (Italian numbering plan). diff --git a/internal/handler/phone_question_test.go b/internal/handler/phone_question_test.go index e2b87dca..33966659 100644 --- a/internal/handler/phone_question_test.go +++ b/internal/handler/phone_question_test.go @@ -126,6 +126,10 @@ func TestPhoneQuestion_answerIsNormalised(t *testing.T) { if rec.Code != http.StatusBadRequest || !strings.Contains(rec.Body.String(), "Your phone") { t.Errorf("sent %q: %d — %s; want 400 naming the question", bad, rec.Code, rec.Body.String()) } + // The question has a default code, so asking for one would not help. + if strings.Contains(rec.Body.String(), "country code") { + t.Errorf("sent %q: %s; the country code is already applied, the message must not ask for it", bad, rec.Body.String()) + } } if rec := bookWithAnswer(t, h, slug, "2027-07-05T10:00:00Z", "blank@example.com", answer(" ")); rec.Code != http.StatusBadRequest { t.Errorf("a required phone question left blank should be 400, got %d", rec.Code) @@ -143,8 +147,9 @@ func TestPhoneQuestion_noDefaultCountryNeedsPrefix(t *testing.T) { json.Unmarshal(rec.Body.Bytes(), &q) //nolint:errcheck if rec := bookWithAnswer(t, h, slug, "2027-05-03T10:00:00Z", "a@example.com", - fmt.Sprintf(`[{"question_id":%q,"value":"600 100 200"}]`, q.ID)); rec.Code != http.StatusBadRequest { - t.Errorf("national number without a default: %d; want 400", rec.Code) + fmt.Sprintf(`[{"question_id":%q,"value":"600 100 200"}]`, q.ID)); rec.Code != http.StatusBadRequest || + !strings.Contains(rec.Body.String(), "country code") { + t.Errorf("national number without a default: %d — %s; want 400 asking for the country code", rec.Code, rec.Body.String()) } if rec := bookWithAnswer(t, h, slug, "2027-05-03T11:00:00Z", "b@example.com", fmt.Sprintf(`[{"question_id":%q,"value":"+48 600 100 200"}]`, q.ID)); rec.Code != http.StatusCreated { diff --git a/internal/handler/question_handler.go b/internal/handler/question_handler.go index 7f80954d..1302a94b 100644 --- a/internal/handler/question_handler.go +++ b/internal/handler/question_handler.go @@ -610,7 +610,14 @@ func (h *Handler) validateAnswersCore(ctx context.Context, eventTypeID string, r } e164, ok := normalizePhoneAnswer(raw, q.cc) if !ok { - return nil, &answerError{loc.Tf("err_invalid_phone", q.label)} + // Asking for the country code helps only when it is what's missing: a + // national number on a question without a default. Otherwise the code is + // there (typed or applied) and the number itself is the problem. + key := "err_invalid_phone" + if q.cc == "" && !hasInternationalPrefix(raw) { + key = "err_phone_country_code" + } + return nil, &answerError{loc.Tf(key, q.label)} } rawValue := raw if rawValue == e164 { diff --git a/internal/i18n/locales/de-x-neutral.json b/internal/i18n/locales/de-x-neutral.json index 9e5135c0..2254785d 100644 --- a/internal/i18n/locales/de-x-neutral.json +++ b/internal/i18n/locales/de-x-neutral.json @@ -149,7 +149,8 @@ "err_booking_limit": "Die maximale Anzahl anstehender Buchungen für diesen Termin ist bereits erreicht. Bitte eine bestehende Buchung stornieren oder warten, bis eine vorüber ist.", "err_email_throttled": "Zu viele Buchungen von dieser E-Mail-Adresse in letzter Zeit. Bitte später erneut versuchen.", "err_required_field": "Pflichtfeld %q fehlt", - "err_invalid_phone": "ungültige Telefonnummer für %q: mit Ländervorwahl eingeben, z. B. +49 30 1234567", + "err_invalid_phone": "ungültige Telefonnummer für %q: Nummer prüfen und ohne Durchwahl eingeben", + "err_phone_country_code": "ungültige Telefonnummer für %q: mit Ländervorwahl eingeben, z. B. +49 30 1234567", "err_required_checkbox": "%q muss angekreuzt werden", "err_invalid_option": "ungültige Option für %[1]q: %[2]q ist keine zulässige Auswahl", "assistant_unavailable": "Der Buchungsassistent ist derzeit nicht verfügbar. Bitte einen Termin im Kalender unten wählen.", diff --git a/internal/i18n/locales/de.json b/internal/i18n/locales/de.json index ef5c1fbe..cae6b930 100644 --- a/internal/i18n/locales/de.json +++ b/internal/i18n/locales/de.json @@ -149,7 +149,8 @@ "err_booking_limit": "Sie haben bereits die maximale Anzahl anstehender Buchungen für diesen Termin erreicht. Bitte stornieren Sie eine bestehende Buchung oder warten Sie, bis eine vorüber ist.", "err_email_throttled": "Zu viele Buchungen von dieser E-Mail-Adresse in letzter Zeit. Bitte versuchen Sie es später erneut.", "err_required_field": "Pflichtfeld %q fehlt", - "err_invalid_phone": "ungültige Telefonnummer für %q: bitte mit Ländervorwahl eingeben, z. B. +49 30 1234567", + "err_invalid_phone": "ungültige Telefonnummer für %q: bitte die Nummer prüfen und ohne Durchwahl eingeben", + "err_phone_country_code": "ungültige Telefonnummer für %q: bitte mit Ländervorwahl eingeben, z. B. +49 30 1234567", "err_required_checkbox": "%q muss angekreuzt werden", "err_invalid_option": "ungültige Option für %[1]q: %[2]q ist keine zulässige Auswahl", "assistant_unavailable": "Der Buchungsassistent ist derzeit nicht verfügbar. Bitte wählen Sie einen Termin im Kalender unten.", diff --git a/internal/i18n/locales/el.json b/internal/i18n/locales/el.json index 40187455..0161a001 100644 --- a/internal/i18n/locales/el.json +++ b/internal/i18n/locales/el.json @@ -155,7 +155,8 @@ "err_booking_limit": "Έχετε τον μέγιστο επιτρεπτό αριθμό επερχόμενων κρατήσεων για αυτόν τον τύπο ραντεβού. Παρακαλούμε ακυρώστε μια υπάρχουσα κράτηση ή περιμένετε μέχρι κάποια να περάσει πριν ξανακάνετε κράτηση.", "err_email_throttled": "Έχουν γίνει υπερβολικά πολλές κρατήσεις για αυτή τη διεύθυνση email πρόσφατα. Παρακαλούμε δοκιμάστε ξανά.", "err_required_field": "Το υποχρεωτικό πεδίο %q δεν έχει συμπληρωθεί", - "err_invalid_phone": "μη έγκυρος αριθμός τηλεφώνου για το %q: εισαγάγετέ τον με τον κωδικό χώρας, π.χ. +30 210 1234567", + "err_invalid_phone": "μη έγκυρος αριθμός τηλεφώνου για το %q: ελέγξτε τον αριθμό και παραλείψτε τυχόν εσωτερικό", + "err_phone_country_code": "μη έγκυρος αριθμός τηλεφώνου για το %q: εισαγάγετέ τον με τον κωδικό χώρας, π.χ. +30 210 1234567", "err_required_checkbox": "%q πρέπει να έχει επιλεγεί", "err_invalid_option": "μη έγκυρη επιλογή για %[1]q: Το %[2]q δεν είναι έγκυρη επιλογή", diff --git a/internal/i18n/locales/en.json b/internal/i18n/locales/en.json index 7eee9813..878d96bb 100644 --- a/internal/i18n/locales/en.json +++ b/internal/i18n/locales/en.json @@ -156,7 +156,8 @@ "err_booking_limit": "You already have the maximum number of upcoming bookings for this event. Please cancel an existing booking or wait until one has passed before booking again.", "err_email_throttled": "Too many bookings from this email address recently. Please try again later.", "err_required_field": "required field %q is missing", - "err_invalid_phone": "invalid phone number for %q: enter it with the country code, e.g. +44 20 7946 0958", + "err_invalid_phone": "invalid phone number for %q: check the number and leave out any extension", + "err_phone_country_code": "invalid phone number for %q: enter it with the country code, e.g. +44 20 7946 0958", "err_required_checkbox": "%q must be checked", "err_invalid_option": "invalid option for %[1]q: %[2]q is not an allowed choice", diff --git a/internal/i18n/locales/es.json b/internal/i18n/locales/es.json index 99175a9b..f1b356c1 100644 --- a/internal/i18n/locales/es.json +++ b/internal/i18n/locales/es.json @@ -155,7 +155,8 @@ "err_booking_limit": "Ya tienes el número máximo de reservas próximas para este evento. Cancela una reserva existente o espera a que pase alguna antes de volver a reservar.", "err_email_throttled": "Demasiadas reservas desde esta dirección de correo recientemente. Inténtalo de nuevo más tarde.", "err_required_field": "falta el campo obligatorio %q", - "err_invalid_phone": "número de teléfono no válido en %q: introdúcelo con el prefijo del país, p. ej. +34 600 100 200", + "err_invalid_phone": "número de teléfono no válido en %q: revisa el número y omite la extensión", + "err_phone_country_code": "número de teléfono no válido en %q: introdúcelo con el prefijo del país, p. ej. +34 600 100 200", "err_required_checkbox": "Debes marcar %q", "err_invalid_option": "opción no válida para %[1]q: %[2]q no es una opción permitida", diff --git a/internal/i18n/locales/fr-CA.json b/internal/i18n/locales/fr-CA.json index 38077c72..937d1293 100644 --- a/internal/i18n/locales/fr-CA.json +++ b/internal/i18n/locales/fr-CA.json @@ -149,7 +149,8 @@ "err_booking_limit": "Vous avez déjà atteint le nombre maximum de réservations à venir pour cet événement. Annulez une réservation existante ou attendez qu'elle soit passée avant d'en créer une nouvelle.", "err_email_throttled": "Trop de réservations récentes depuis cette adresse courriel. Veuillez réessayer plus tard.", "err_required_field": "le champ obligatoire %q est manquant", - "err_invalid_phone": "numéro de téléphone non valide pour %q : entrez-le avec l'indicatif du pays, p. ex. +1 514 555 0123", + "err_invalid_phone": "numéro de téléphone non valide pour %q : vérifiez le numéro et omettez le poste", + "err_phone_country_code": "numéro de téléphone non valide pour %q : entrez-le avec l'indicatif du pays, p. ex. +1 514 555 0123", "err_required_checkbox": "%q doit être coché", "err_invalid_option": "option non valide pour %[1]q : %[2]q n'est pas un choix autorisé", "assistant_unavailable": "L'assistant de réservation n'est pas disponible pour le moment. Choisissez un créneau dans le calendrier ci-dessous.", diff --git a/internal/i18n/locales/fr.json b/internal/i18n/locales/fr.json index 38b208f5..9daeec94 100644 --- a/internal/i18n/locales/fr.json +++ b/internal/i18n/locales/fr.json @@ -149,7 +149,8 @@ "err_booking_limit": "Vous avez déjà atteint le nombre maximum de réservations à venir pour cet événement. Annulez une réservation existante ou attendez qu'elle soit passée avant d'en créer une nouvelle.", "err_email_throttled": "Trop de réservations récentes depuis cette adresse e-mail. Veuillez réessayer plus tard.", "err_required_field": "le champ obligatoire %q est manquant", - "err_invalid_phone": "numéro de téléphone non valide pour %q : saisissez-le avec l'indicatif du pays, p. ex. +33 6 12 34 56 78", + "err_invalid_phone": "numéro de téléphone non valide pour %q : vérifiez le numéro et omettez le poste", + "err_phone_country_code": "numéro de téléphone non valide pour %q : saisissez-le avec l'indicatif du pays, p. ex. +33 6 12 34 56 78", "err_required_checkbox": "%q doit être coché", "err_invalid_option": "option non valide pour %[1]q : %[2]q n'est pas un choix autorisé", "assistant_unavailable": "L'assistant de réservation n'est pas disponible pour le moment. Choisissez un créneau dans le calendrier ci-dessous.", diff --git a/internal/i18n/locales/it.json b/internal/i18n/locales/it.json index ede281d4..aa35a7c7 100644 --- a/internal/i18n/locales/it.json +++ b/internal/i18n/locales/it.json @@ -149,7 +149,8 @@ "err_booking_limit": "Hai già raggiunto il numero massimo di prenotazioni future per questo evento. Annulla una prenotazione esistente o attendi che sia passata prima di crearne un'altra.", "err_email_throttled": "Troppe prenotazioni recenti da questo indirizzo email. Riprova più tardi.", "err_required_field": "manca il campo obbligatorio %q", - "err_invalid_phone": "numero di telefono non valido per %q: inseriscilo con il prefisso internazionale, ad es. +39 06 1234 5678", + "err_invalid_phone": "numero di telefono non valido per %q: controlla il numero e ometti l'interno", + "err_phone_country_code": "numero di telefono non valido per %q: inseriscilo con il prefisso internazionale, ad es. +39 06 1234 5678", "err_required_checkbox": "%q deve essere selezionato", "err_invalid_option": "opzione non valida per %[1]q: %[2]q non è una scelta consentita", "assistant_unavailable": "L'assistente di prenotazione non è disponibile al momento. Scelga un orario dal calendario qui sotto.", diff --git a/internal/i18n/locales/nl.json b/internal/i18n/locales/nl.json index afa33fa5..57f34596 100644 --- a/internal/i18n/locales/nl.json +++ b/internal/i18n/locales/nl.json @@ -149,7 +149,8 @@ "err_booking_limit": "Je hebt al het maximale aantal komende boekingen voor dit evenement bereikt. Annuleer een bestaande boeking of wacht tot die voorbij is voordat je een nieuwe maakt.", "err_email_throttled": "Te veel recente boekingen vanaf dit e-mailadres. Probeer het later opnieuw.", "err_required_field": "verplicht veld %q ontbreekt", - "err_invalid_phone": "ongeldig telefoonnummer voor %q: vul het in met de landcode, bijv. +31 20 123 4567", + "err_invalid_phone": "ongeldig telefoonnummer voor %q: controleer het nummer en laat een toestelnummer weg", + "err_phone_country_code": "ongeldig telefoonnummer voor %q: vul het in met de landcode, bijv. +31 20 123 4567", "err_required_checkbox": "%q moet aangevinkt zijn", "err_invalid_option": "ongeldige optie voor %[1]q: %[2]q is geen toegestane keuze", "assistant_unavailable": "De boekingsassistent is momenteel niet beschikbaar. Kies een tijd in de agenda hieronder.", diff --git a/internal/i18n/locales/pl.json b/internal/i18n/locales/pl.json index 0190ea52..302f4ac0 100644 --- a/internal/i18n/locales/pl.json +++ b/internal/i18n/locales/pl.json @@ -150,7 +150,8 @@ "err_booking_limit": "Masz już maksymalną liczbę nadchodzących rezerwacji dla tego wydarzenia. Anuluj istniejącą rezerwację lub poczekaj na jej zakończenie przed kolejną rezerwacją.", "err_email_throttled": "Z tego adresu e-mail dokonywano ostatnio zbyt wielu rezerwacji. Spróbuj ponownie później.", "err_required_field": "wymagane pole %q nie zostało wypełnione", - "err_invalid_phone": "nieprawidłowy numer telefonu w polu %q: wpisz go z numerem kierunkowym kraju, np. +48 600 100 200", + "err_invalid_phone": "nieprawidłowy numer telefonu w polu %q: sprawdź numer i wpisz go bez numeru wewnętrznego", + "err_phone_country_code": "nieprawidłowy numer telefonu w polu %q: wpisz go z numerem kierunkowym kraju, np. +48 600 100 200", "err_required_checkbox": "pole %q musi zostać zaznaczone", "err_invalid_option": "nieprawidłowa opcja dla %[1]q: %[2]q nie jest dozwolonym wyborem", "assistant_unavailable": "Asystent rezerwacji jest w tej chwili niedostępny — wybierz termin z poniższego kalendarza.", diff --git a/internal/i18n/locales/pt.json b/internal/i18n/locales/pt.json index 09d476bf..1870186c 100644 --- a/internal/i18n/locales/pt.json +++ b/internal/i18n/locales/pt.json @@ -149,7 +149,8 @@ "err_booking_limit": "Já atingiu o número máximo de marcações futuras para este evento. Cancele uma marcação existente ou aguarde que passe antes de criar outra.", "err_email_throttled": "Demasiadas marcações recentes a partir deste endereço de e-mail. Tente novamente mais tarde.", "err_required_field": "falta o campo obrigatório %q", - "err_invalid_phone": "número de telefone inválido em %q: introduza-o com o indicativo do país, p. ex. +351 912 345 678", + "err_invalid_phone": "número de telefone inválido em %q: verifique o número e omita a extensão", + "err_phone_country_code": "número de telefone inválido em %q: introduza-o com o indicativo do país, p. ex. +351 912 345 678", "err_required_checkbox": "%q tem de ser selecionado", "err_invalid_option": "opção inválida para %[1]q: %[2]q não é uma escolha permitida", "assistant_unavailable": "O assistente de marcações não está disponível de momento. Escolha um horário no calendário abaixo.", diff --git a/internal/i18n/locales/sv.json b/internal/i18n/locales/sv.json index 5ef1430e..4f27bcda 100644 --- a/internal/i18n/locales/sv.json +++ b/internal/i18n/locales/sv.json @@ -149,7 +149,8 @@ "err_booking_limit": "Du har redan nått det högsta antalet kommande bokningar för det här evenemanget. Avboka en befintlig bokning eller vänta tills den har passerat innan du gör en ny.", "err_email_throttled": "För många bokningar från den här e-postadressen på kort tid. Försök igen senare.", "err_required_field": "obligatoriskt fält %q saknas", - "err_invalid_phone": "ogiltigt telefonnummer för %q: ange det med landsnummer, t.ex. +46 8 123 456 78", + "err_invalid_phone": "ogiltigt telefonnummer för %q: kontrollera numret och utelämna eventuell anknytning", + "err_phone_country_code": "ogiltigt telefonnummer för %q: ange det med landsnummer, t.ex. +46 8 123 456 78", "err_required_checkbox": "%q måste vara ikryssat", "err_invalid_option": "ogiltigt alternativ för %[1]q: %[2]q är inte ett tillåtet val", "assistant_unavailable": "Bokningsassistenten är inte tillgänglig just nu. Välj en tid i kalendern nedan.",