Preisoptionen in Formular-Entscheidungsoptionen (Radio/Checkbox) #133
Labels
No labels
component/backend
component/docs
component/e2e
component/frontend
component/infra
component/keycloak
prio/high
prio/low
prio/medium
type/bug
type/chore
type/feature
type/refactor
type/test
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
WompSchmiede/FamilienFeierPlaner#133
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Beschreibung
Formular-Definitionen sollen bei Entscheidungsoptionen Preise unterstuetzen koennen. Dazu werden zwei neue Feld-Typen benoetigt:
Either/Or (Radio-Buttons,
type: "radio")Einzelauswahl aus mehreren Optionen mit Preisen:
Multiselection (Checkboxen,
type: "checkbox")Mehrfachauswahl mit Preisen:
Akzeptanzkriterien
radio- undcheckbox-Feldern mit bepreisten OptionenAufgaben
FormFieldOption-Schema mitlabel+priceDetailplan (aus Code-Analyse)
openapi.yaml (
backend/openapi.yaml)FormFieldOptioneintragen:formDefinition-Items in Event/CreateEvent/UpdateEvent/Template/CreateTemplate/UpdateTemplate/Invitation/FormDefinitionRequest bleibentype: object(dynamisch),FormFieldOptiondient als Struktur-DokuFormEditor (
frontend/src/lib/components/form-editor.svelte)FormFieldOptionmitlabel: string, price: number(Cent)FormField.options-Typ aendern:string | FormFieldOption[](select=string, radio/checkbox=Array)radioundcheckboxerweiternlabel-Input +price-Input (Euro, Umrechnung cents ↔ Euro)handleSave(): radio/checkbox →options: [{ label, price }](price in Cent)Gaeste-Formular (
frontend/src/routes/app/persons/[personId]/)+page.svelte:formValues-Typ vonRecord<string, string>aufRecord<string, string | string[]>aendernradio-Feld rendern: Radio-Button-Gruppe mitformatEuro(price / 100)pro Optioncheckbox-Feld rendern: Checkbox-Gruppe mit Preisangabe und dynamischer Gesamtsumme+page.server.tssaveDraft/submitFinal: FormData-Eintraege mit Mehrfachwerten alsstring[]sammelnOrganisator-Ansicht (
frontend/src/routes/app/events/[eventId]/)+page.svelteformatFormAnswers(): radio/checkbox-Preise anzeigen + GesamtsummeoverrideValues-Typ:Record<string, string | string[]>+page.server.tsoverrideForm: Checkbox-Arrays aus FormData verarbeitenTests
Keine DB-Migration
formDefinitionist JSONB, keine Schema-Aenderung noetig