Skip to content

feat: Verkäufer ohne Artikel anschreiben und abmelden, Verkäufer nach Postleitzahl eingrenzen (#304) - #311

Open
Garaz08 wants to merge 13 commits into
developmentfrom
feat/postal-codes-sellers-without-items-304
Open

Garaz08 wants to merge 13 commits into
developmentfrom
feat/postal-codes-sellers-without-items-304

Conversation

@Garaz08

@Garaz08 Garaz08 commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

Closes #304

Verkäufer aus der Region (features.allowedPostalCodes, postalCodeCountry)

  • Präfixe (89, 7322) für ein Land. joinEvent prüft die PLZ aus dem Profil (join.postalCode nennt die erlaubten Bereiche; ohne PLZ join.postalCodeMissing). Ältere Profile mit „Deutschland“ statt DE zählen mit, ohne Land gilt Deutschland
  • Einladungen, der Zugangscode und das Team umgehen die Prüfung. Wer schon angemeldet ist, bleibt. Verkäufer ohne Konto (vor Ort) sind nicht betroffen
  • Gespeichert wird kurz: 89 deckt 890 ab, höchstens 500 Präfixe

Karte im Wizard („Mitmachen“) und in den Einstellungen

  • Eigene Karte „Nur Verkäufer aus der Region“: Land wählen, Mittelpunkt Basar (aus der PLZ im Schritt „Termin & Ort“) oder Mein Standort (Geolocation, blauer Punkt), Umkreis-Regler 0–150 km, Gebiete per Klick/Tippen an- und abwählen, feinere PLZ eintippen. Beim Einschalten ist sofort ein 20-km-Kreis um den Basar gewählt
  • Drei kleine Schritte oben erklären den Ablauf, unten ein Satz, was das für Verkäufer heißt. Chips mit den gespeicherten Präfixen, ganze Regionen werden zusammengefasst
  • Reines SVG ohne Kacheln von Dritten, lädt nur bei Bedarf (DE ≈ 190 kB gzip). Gebiete der ersten drei Ziffern: DE aus OpenStreetMap (ODbL), AT/CH/LI/LU als Voronoi-Zellen aus GeoNames (CC BY). Daten und Skript in scripts/postal-areas
  • Vorschau „So steht dein Basar in der Liste“, Zusammenfassung und Einstellungsübersicht zeigen die Region

Für Verkäufer

  • Basarseite, Basarliste und Anmeldedialog: „Nur aus PLZ 89…, 7322…“. Bedingungen: „Nur für Verkäufer aus der Region …“ mit Erklärung
  • Wer nicht passt, sieht vor dem Anmelden warum und dass eine Einladung oder der Zugangscode hilft

Verkäufer ohne Artikel

  • Nachrichten: neue Zielgruppe „Nur Verkäufer ohne angemeldete Artikel“ mit Anzahl (Migration 0038)
  • Verkäuferverwaltung: Tab „Ohne Artikel“ mit Zahl, darüber „Erinnern“ (Nachricht mit dieser Zielgruppe) und „Alle abmelden“ mit Rückfrage und optionaler Nachricht
  • Abmelden gibt den Platz frei, erneute Anmeldung bleibt möglich (anders als der Ausschluss aus Veranstalter steuern die Teilnahme: Anmeldung schließen, Verkäufer ausschließen, Artikel ablehnen #252). Abgelehnte Artikel bleiben wie beim eigenen Abmelden. Nicht betroffen: Team, Ausgeschlossene, vor Ort angelegte Verkäufer
  • Rechte: nur Veranstalter (und Admins), Helfer sehen nur die Liste
  • Wer gleichzeitig einen Artikel anmeldet, bleibt: beide Transaktionen sind serialisierbar, eine wird wiederholt

Tests

  • API (regional_sellers.rs): PLZ-Prüfung inkl. Land und fehlender PLZ, Einladung/Zugangscode/Helfer umgehen sie, Speichern und Validieren, Zielgruppe, Sammel-Abmeldung mit Rechten, Platz, Mail und erneuter Anmeldung, gleichzeitiges Anmelden von Artikeln
  • Vitest: PLZ-Helfer, Kartenlogik (Projektion, Umkreis, Zusammenfassen), Karte (Klick vs. Ziehen, Hover, Zoom), Region-Formular (Umkreis, Standort, Eingabe, Land), Anmeldedialog, Bedingungen, Abmelden
  • Playwright: Region in den Einstellungen setzen → Verkäufer von woanders wird mit Erklärung abgewiesen
  • Lokal grün: cargo test, clippy -D warnings, fmt, Vitest (848, Branches 80,7 %), tsc -b, lint, Playwright (Chromium, 44/44)

🤖 Generated with Claude Code

Garaz08 and others added 2 commits November 20, 2026 17:51
…he backend (#304)

- New audience "withoutItems" for messages to sellers, the seller list marks them, and
  eventSeller.removeSellersWithoutItems unregisters them all at once (organizer only),
  with an optional message. Unlike an exclusion they may join again; who announces an
  item meanwhile stays (serializable transactions, tested concurrently).
- features.allowedPostalCodes / postalCodeCountry: only sellers whose postal code starts
  with a prefix, in that country, join on their own. Invitations, the access code and the
  team pass it; walk-in sellers never join. Saved short ("89" covers "890").

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- In the step "Mitmachen" and the settings: a map of the postal code areas of one
  country (plain SVG, no map tiles). A radius around the bazaar or the organizer's own
  location chooses areas, a tap adds or removes single ones, longer prefixes can be typed.
  Whole regions are stored short. Data and build script in scripts/postal-areas.
- Sellers see the region on the bazaar page, in the list, in the conditions and before
  registering; who is from elsewhere learns why and that an invitation helps.
- Seller list: filter "Ohne Artikel" with reminder (message preset to them) and
  "Alle abmelden" with confirmation and optional message.

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

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

🚀 Review-App

https://review-311.bazarpro.de

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

Stand: adfebcf · 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-311-mail.bazarpro.de (Benutzer review, Passwort aus dem Secret REVIEW_MAIL_PASSWORD)

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

- Dragging moves the map at once; it is drawn anew when it comes to rest
- Two fingers zoom; Ctrl or Cmd with the wheel zooms, the plain wheel scrolls the page
- The area tooltip follows the mouse without re-rendering the map
- Labels are placed on a grid so each check only looks at nearby boxes
- Tests cover drag, two-finger zoom and wheel zoom
- Show the region as a switch row among the registration settings, with its explanation in an info tip
- Put country, centre, map, radius and chosen areas into one compact block
- Replace the step hints and summary sentence with the area count and the chosen codes
- Update the unit and e2e tests to the new texts and elements
- Bazaar regions store prefixes per country, e.g. {"DE": ["88"], "AT": ["69"]}, so a region can cross a border
- Replaces the single postalCodeCountry; the API now takes allowedPostalCodes as a map per country
- The postal code map draws all countries at once with keyed areas, and the tooltip names the country
- Registration texts, seller rules and the backend check list each country's prefixes
- Load sellers without items once in get_vendors_for_event, not for every vendor load
- Remove sellers leaving an event with one DELETE each for sellers and roles, then touch them in a loop
- Add notify_users and enqueue_many: one query loads all recipients, one insert queues all mails
- join_event loads the user profile once for the region and fixed seller data checks
- Map areas carry a bounding box "b" (boxes.py, written by build.py) so nearby areas are found without reading every path
- Add events.region_map_image_id (migration 0039) and accept regionMapImage in create and edit; clearRegionMapImage removes it
- Purge and delete the region picture with the event's other files in retention, and keep it out of orphan file cleanup
- Name the largest places of each postal code area and the towns on the postal code maps (scripts/postal-areas/places.py, built from GeoNames cities1000)
Garaz08 and others added 2 commits November 21, 2026 07:13
- Registration text says "Nur aus der Region" where a map exists; codes move to the map caption
- Event cards, public page and registration dialog pass the codes to RegionMapTip
- Demo kids, ski and book bazaars get a region and its picture
…e test (#304)

Saving the region now draws a map of it, so the public page shows "Nur aus der Region"
with the map and its codes on hover, and the join dialog points to the map.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Reject postal code and country changes while a region bazaar the seller joined is not over (profile.postalCodeFixed)
- Add users.isMyPostalCodeFixed so the profile form shows the lock and explains it
- Warn in the join dialog that the postal code counts and stays once registered
- Name the region in the conditions and link it to its map, instead of listing codes twice
- Cover the lock, its release after the bazaar, and the dialog text in tests
- Record admitted_by_region on event_sellers (migration 0040) when the region lets a seller in
- Keep the postal code fixed only for those sellers; access code, invitation, team and excluded sellers stay free
- Make isMyPostalCodeFixed read the bazaars it depends on, so organizer changes update it live
- Cap postal codes in messages at 12, then show "+N" as the app does
- Draw the region circle once a stored region loads (EditEventRegion)
- InfoTip: depend on whether a trigger exists, not on the node, which is new on every render
- Show "Karte ansehen" next to the region text; it opens the map large with the postal codes
- Show a small map preview in the seller conditions; a tap enlarges it
- Replace RegionMapTip with RegionMap and drop the trigger and width options from InfoTip
…dialog (#304)

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

This branch was successfully deployed

1 active deployment
review — adfebcf4 Deployed Nov 21, 2026 by Garaz08 via deploy-review #768
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