Skip to content

feat(fees): Gebührengruppen für Mitglieder, Helfer und andere Gruppen (#302) - #309

Merged
Garaz08 merged 10 commits into
developmentfrom
feat/fee-groups-302
Nov 20, 2026
Merged

Garaz08 merged 10 commits into
developmentfrom
feat/fee-groups-302

Conversation

@Garaz08

@Garaz08 Garaz08 commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Closes #302

Gebührengruppen (features.feeGroups)

  • Jede Gruppe hat eigene Gebühren statt eines Rabatts: Provision, Annahmegebühr (leer = keine), Gebühren-Deckel und Artikel pro Verkäufer (leer = wie Basar), dazu ein Hinweis zum Nachweis
  • Gemeinsame Regeln in Rust (fee_groups.rs) und TS (src/shared/feeGroups.ts): Wer zu mehreren Gruppen gehört, zahlt die günstigste (Provision, dann Annahmegebühr, dann Deckel)
  • Migration 0036: event_sellers.fee_group_id, fee_group_decided_at/by, fee_group_label (Gruppe bei der Auszahlung)

Wer gehört dazu

  • Selbstauskunft: Der Verkäufer wählt die Gruppe bei der Anmeldung und kann sie bis zum ersten angenommenen Artikel ändern. Bevor das Team sie bestätigt oder entfernt hat, lässt sich kein Artikel annehmen (feeGroup.unconfirmed), also wird niemand ungeprüft abgerechnet. Bestätigen oder Entfernen dürfen alle mit dem Recht „Annahme“
  • Helfer: Gilt automatisch, solange jemand die Helferrolle hat. Der Veranstalter kann in der Verkäuferliste zusätzlich jeden Verkäufer von Hand einer Gruppe zuordnen, z. B. Helfer ohne Rechte
  • Ändert sich die Gruppe eines Verkäufers (Rolle, Zuordnung, Entscheidung), werden seine Verkäufe bis zur Auszahlung neu gebucht. Im Direktverkauf gleicht die Auszahlung Unterschiede zur schon bezahlten Provision aus

Oberfläche

  • Einstellungen und Wizard „Was kostet es die Verkäufer?“: aufklappbare Gruppenzeilen mit Kurzinfo, dazu Vorschau, Zusammenfassung und Einstellungsübersicht
  • Bedingungen: „Eigene Gebühren für“ mit „5 % Provision statt 10 %“ und dem Nachweis. Anmeldedialog mit Gruppenwahl. Registrierte Verkäufer sehen ihre Gruppe und deren Status auf der Basarseite
  • Annahme: Prüfkasten wie bei der Ausweisprüfung mit Bestätigen/Entfernen, „Alle annehmen“ wartet darauf
  • Verkäuferliste: Badge, Tab „Gruppen“ mit Zahl der offenen Prüfungen, Menü zum Zuordnen
  • Kasse (auch offline): Provision je Verkäufer. Abrechnung, Meine Verkäufe und Export (CSV-Spalte, im PDF hinter dem Namen) zeigen die Gruppe

Fee-Lock

Nach den ersten Anmeldungen werden Gruppen nur günstiger: Sie können nicht entfernt und nicht anders zugeordnet werden, die Artikelgrenze geht nur nach oben. Während des Basars ist alles fest

Demo

Kita-Basar mit einer Helfergruppe (0 %, 60 Artikel), Skibasar mit „Vereinsmitglieder“ (5 %, Nachweis Mitgliedsausweis)

Tests

  • API: Selbstauskunft und Annahme-Sperre, ohne Nachweis gelten die normalen Gebühren, Wahl nur bis zur Annahme, Helfer per Rolle mit Neubuchung, Zuordnung nur durch Veranstalter, Artikelgrenze, Prüfung beim Speichern, Fee-Lock. Dazu Unit-Tests
  • Vitest: feeGroups, describeFeeGroups, Provision je Gruppe an der Kasse, Export-Spalte
  • Playwright: Gruppe anlegen → Anmeldung mit Selbstauskunft → Bestätigung bei der Annahme
  • src/tests/helpers/profile.ts: „Land“ ist inzwischen eine Auswahl, der Helfer speicherte die Adresse daher nie
  • Lokal grün: cargo test, clippy, fmt, Vitest, tsc, lint, Playwright (Chromium, 43/43)

🤖 Generated with Claude Code

Garaz08 and others added 2 commits November 18, 2026 22:05
…in the backend (#302)

Groups in features.feeGroups with own commission, intake fee, fee cap and item
limit. Self-declared groups are checked at the intake before the first item can
be accepted; helpers are in their group by role, the organizer puts others in by
hand. Cash desk, settlement, payout, export and item limit use the seller's fees;
a group change books the seller's sales anew. Fee lock: groups only get cheaper.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e and seller list (#302)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…#302)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

🚀 Review-App

https://review-309.bazarpro.de

Modus: platform (wie bazarpro.de). Self-Hosting testen: Label review:single setzen.

Stand: 53b31e2 · Demo-Daten aus dem Seed, alle Konten mit Passwort 123456:

Rolle Konto
Admin admin@bazarpro.de
Veranstalter user1@bazarpro.de
Verkäufer seller@bazarpro.de
Käufer kaeufer1@bazarpro.de, kaeufer2@bazarpro.de

Laufendes Event mit allen Funktionen: Fahrradbörse Bürgerhalle (alle Funktionen).

📬 Alle Mails der Review-App: https://review-309-mail.bazarpro.de (Benutzer review, Passwort aus dem Secret REVIEW_MAIL_PASSWORD)

Die Review-App wird beim Schließen des Pull Requests entfernt.

…p's advantages (#302)

- A draft saved on the server turned empty number fields into null, which the
  form refused when continuing: they are left out now, and older drafts lose
  their nulls when restored
- Every change of the wizard waits in this browser; "continue later" moved
  from the bottom bar to the header, so the bar is one row on phones
- Conditions, preview, summary and the editor name only what a group changes
  against the bazaar, e.g. just "up to 40 items"
- Fee group fields read better on phones: shorter labels and choices

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… the fee group (#302)

- Dialogs and confirm dialogs stop at the screen height and scroll, e.g. the
  intake with ID check and fee group check on a phone
- "Accept" stays disabled until the fee group is confirmed or removed
- A proof hint with its own full stop no longer ends in two
- Wizard tests start without the draft an earlier test left in the browser

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Limit fee groups to 4 per bazaar (was 10) in backend, app and German/English messages
- Seller list: a group dropdown replaces the Groups tab and shows pending self-declarations per group
- Seller header: the group chip opens the choice; paid-out sellers only see the group
- Drop the "cheapest fees" hint, since each seller is in at most one group
- Tests: backend cap check, badge menu behaviour, and the e2e flow for the new filter
- Add the "manual" assignment: only the organizer puts sellers in, sellers cannot choose or see it as a choice
- Allow at most one helper group per bazaar, in the backend (event.feeGroupHelpersTwice) and in the editor
- Show manual groups in the seller conditions as "Vergibt der Veranstalter"
- Show assignment errors in the group editor
Garaz08 and others added 2 commits November 20, 2026 12:55
- Self-declared groups not yet checked by the team do not apply: bookings, item limit and settlement use the bazaar's fees until the team confirms the group
- Removing a helper role or excluding a helper re-books their sales under the fees that now apply
- Store the commission percent with each payout (migration 0037), so settled rates stay fixed when settings change; expose it as commissionPercent on vendors and in my sales
- Direct sales: the payout holds the difference when the commission changed since the sale, negative if the seller owes it, positive if they get it back
- Helpers at the intake may only decide groups still to be checked; organizer-assigned groups need an organizer
A change still waiting for the 600 ms autosave could save the draft again
after 'Konto anlegen und Basar erstellen', without the submitted mark, so
the bazaar was not created after the sign-up. Made the wizard test fail
on busy CI runners.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Replace the fee group chip in the seller header and the icon buttons in the seller list with a "Gebührengruppe zuordnen" submenu in the seller's "…" menu
- Show the header badge as display only; the submenu is organizer-only and hidden once the seller is paid out
- Remove the per-row helper permission button from the seller list; the helper edit stays in the "…" menu
- Update the component tests and the fee group e2e spec for the new menu path
@Garaz08
Garaz08 merged commit 240515e into development Nov 20, 2026
14 checks passed

This branch was successfully deployed

1 active deployment
review — 53b31e28 Deployed Nov 20, 2026 by Garaz08 via deploy-review #751
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant