Commit Graph

41 Commits

Author SHA1 Message Date
beo3000 0ae9ef291e fix select non did not work:
Das Problem liegt in OnParametersSetAsync(). Wenn SelectNone() aufgerufen wird:

  1. _selectedIds wird geleert
  2. NotifySelectionChanged() benachrichtigt Parent
  3. Parent aktualisiert Parameter → OnParametersSetAsync() wird erneut aufgerufen
  4. Auto-select Logik Zeile 103-106 wählt alle wieder aus!

  Fix: Auto-select nur beim ersten Laden ausführen:

Behoben. Das _initialized Flag verhindert nun, dass die Auto-Select-Logik bei jedem Parameter-Update läuft - nur noch beim ersten Laden der Komponente.
2026-01-06 19:33:30 +01:00
beo3000 e2ee3e6afe added club-terminology
Angepasst:
  - Club.cs - Navigation Property Terminologies
  - AppDbContext.cs - DbSet ClubTerminologies
  - DependencyInjection.cs - Service-Registrierung
  - NavMenu.razor - Menüpunkt "Begriffe" unter Stammdaten

  Migration: AddClubTerminology erstellt und angewandt.

  Nutzung im Code:
  @inject IClubTerminologyService Terms

  // In Component:
  var term = await Terms.GetTermAsync(TermKey.Gutter);  // "Gosse" oder Default "Pudel"

  Neue Keys einfach in TermKey.cs hinzufügen + Default in ClubTerminologyService.Defaults.
2026-01-06 18:41:16 +01:00
beo3000 ebc00d6773 fix FoxHunt -> 21 Points for fox to win 2026-01-05 21:41:08 +01:00
beo3000 caeb1a8e8b added Team-Support
Features:
  - Beliebig viele Teams
  - Editierbare Team-Namen
  - "Zufällig verteilen" Button
  - Warnung bei ungleichen Team-Größen
  - Validierung bei Required-Modus
2026-01-05 21:07:22 +01:00
beo3000 4d584e98af refactorings 2026-01-05 19:07:15 +01:00
beo3000 8987fc34b5 dev foxhunt 2026-01-05 15:27:51 +01:00
beo3000 187a7e14c8 dev foxhunt 2026-01-05 15:02:53 +01:00
beo3000 29fa9c5e84 fox hunt part1 2026-01-04 21:24:30 +01:00
beo3000 587b92409d added ParticipantsMode.FreeToChoose:
Neue Datei erstellt:
  - src/Koogle.Web/Components/Game/PlayerSelectorDialog.razor - Dialog zur manuellen Spielerauswahl

  Geändert:
  - src/Koogle.Web/Components/Pages/Days/DayDetails.razor:863-891 - ShowPlayerSelector implementiert

  Funktionsweise:
  1. Bei ParticipantsMode.FreeToChoose zeigt GameInputPanel.razor:23-32 den Button "Spieler wechseln"
  2. Der neue Dialog listet alle Spieler aus Participants.PlayerIds
  3. Bei DeathBox werden ausgeschiedene Spieler standardmäßig ausgeblendet (Toggle verfügbar)
  4. Bei Spielerauswahl wird SetCurrentPlayerAction dispatcht

  Features:
  - Aktueller Spieler ist markiert (grün)
  - Ausgeschiedene Spieler sind durchgestrichen mit "Ausgeschieden"-Badge
  - Optional können ausgeschiedene Spieler eingeblendet werden (falls nötig)
  - Funktioniert mit allen Game-Typen (DeathBox, Shit, Training)
2026-01-03 10:28:13 +01:00
beo3000 a3a5c288a1 added giftype NoWood 2025-12-30 17:43:10 +01:00
beo3000 752523fe78 added gif-Feature:
Summary of Changes:

  Phase 1-3 (Domain/Infrastructure/Application):
  - ThrowEventType enum with Strike, Circle, Bell, Gutter flags
  - ClubGif, ClubGifRating, GifSubmissionToken entities
  - EF configurations with proper indexes
  - ClubGifRepository with weighted random selection
  - MediaStorageService for file storage (wwwroot/club-media/{LoginName}/gifs/)
  - ClubGifService with rating system and auto-disable at -5 threshold

  Phase 4-5 (Admin UI & Playback):
  - Admin page at /club/{ClubId}/admin/gifs with Upload, Import, Edit, Token management
  - QR code generation for submission tokens
  - GifPlayer component with overlay, rating buttons, and dismiss
  - Fluxor state management (GifState, actions, reducers, effects)

  Phase 6 (Anonymous Submission):
  - Public page at /gif/submit/{Token} with EmptyLayout
  - Token validation and file upload

  Phase 7 (Game Integration + Migration):
  - Database migration AddClubGifFeature applied
  - GameEffects.TriggerGifForEventsAsync triggers GIFs on special throws
  - SignalR broadcast via BroadcastGifTriggeredAsync to all clients
  - DayDetails.razor includes GifPlayer and handles SignalR GIF events

  Key Features:

  - GIFs play on Strike (alle 9), Circle (Kranz), Bell (Glocke), Gutter (Rinne)
  - Weighted random selection based on ratings
  - Real-time sync across all connected clients via SignalR
  - Thumbs up/down rating with auto-disable at -5
  - Max file size: 20MB, Video duration: 15s
  - Supports GIF, MP4, WebM formats
2025-12-30 14:57:06 +01:00
beo3000 0e4e1530ed added LoginName for Clubs 2025-12-30 11:57:01 +01:00
beo3000 21130895d4 add statistics:
Erfasste Metriken:
  - ThrowCount, PinCount, ClearedCount, GutterCount, CircleCount, StrikeCount, BellCount

  Widget zeigt:
  - Jahres-Übersicht (Spiele, Würfe, Kegel, Durchschnitt)
  - Top 5 Kegler Rangliste
  - Monatstrend-Tabelle
2025-12-29 15:27:25 +01:00
beo3000 7795c3064f fix deathbox handling 2025-12-28 22:43:21 +01:00
beo3000 f75b08d98d fix Gutte in Decrease-Mode 2025-12-28 21:51:35 +01:00
beo3000 62000e1291 fix PlayerOrder DeathBox 2025-12-28 21:42:13 +01:00
beo3000 cafd38519f add deathbox 2025-12-28 21:25:04 +01:00
beo3000 b8bd1b0939 fix ShitGameLogic 2025-12-28 17:23:10 +01:00
beo3000 22fbb79801 added GameAction Framework 2025-12-28 08:34:23 +01:00
beo3000 82c6c2d91d mod layout 2025-12-27 22:54:51 +01:00
beo3000 37b8fc0e8d add: IsCleared 2025-12-27 22:46:54 +01:00
beo3000 03364291aa fix undo/redo handling 2025-12-27 21:46:20 +01:00
beo3000 191fb3db3f fix undo/redo handling 2025-12-27 20:51:03 +01:00
beo3000 0a7fb1f0af del UndoButton 2025-12-27 19:31:44 +01:00
beo3000 ea08ff9a5b fix throwhandle:
Zusammenfassung der Fixes:

  1. Fix 1 (HandlePinClick und HandleNumberClick): _hasModifiedPins = true wird jetzt VOR dem Dispatch gesetzt, um zu verhindern, dass OnGameStateChanged den Before-State während der Pin-Modifikation überschreibt.
  2. Fix 2 (ConfirmThrow): Nach dem Dispatch wird explizit CaptureBeforeThrowState() aufgerufen. Das ist der wichtigste Fix:
    - Nach RecordThrowAction Dispatch sind alle Reducer/Effects durchgelaufen
    - Der State ist bereits mit den neuen Pin-Zuständen aktualisiert
    - _beforeThrowState wird mit dem NEUEN Zustand für den nächsten Wurf erfasst

  Vorher wurde _beforeThrowState nie nach einem Wurf aktualisiert (weil _hasModifiedPins zum falschen Zeitpunkt gesetzt war), sodass beim zweiten Wurf der stale Before-State verwendet wurde.
2025-12-27 19:14:36 +01:00
beo3000 e50b13f092 add undo/redo 2025-12-27 18:23:24 +01:00
beo3000 48b96cec0c fix gutter 2025-12-27 16:59:07 +01:00
beo3000 c10329c468 fix: use DayState.AvailablePersons in game boards
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 14:51:39 +01:00
beo3000 f297317b71 call gamelogic 2025-12-27 14:39:15 +01:00
beo3000 c33a6f9d91 add ThrowTimer 2025-12-27 14:18:45 +01:00
beo3000 5db650f2b2 fix "kein Holz" 2025-12-27 14:07:35 +01:00
beo3000 061ba4dbdb fix decrease mode 2025-12-27 14:01:32 +01:00
beo3000 aa8cf4d83a refactoring gameinput 2025-12-27 13:42:32 +01:00
beo3000 92dfb47a08 refactoring GameSetup 2025-12-27 13:15:18 +01:00
beo3000 f1880f08a8 save setup model 2025-12-27 11:45:19 +01:00
beo3000 e436ee2754 Complete phase H8: Undo functionality (unbegrenzt)
- Add UndoButton.razor as reusable component
- Refactor GameInputPanel to use UndoButton component
- Enhance GameEffects with proper UndoThrowAction handler
- IState injection for state access in effects

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 09:11:40 +01:00
beo3000 23a1008a31 Complete phase H7: DayDetails Tabs Integration
- GameBoardPanel: Dynamic board component rendering
- CompletedGamesList: Shows game history for day
- DayDetails: 3 tabs (Details/Eingabe/Tafel) + Start/End Game buttons

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 08:33:34 +01:00
beo3000 5afc8fd251 Complete phase H6: Game Setup Dialog
- GameTypeSelector: Select game type from registry
- ParticipantSelector: Multi-select participants from day
- CommonSetupOptions: ThrowMode, ThrowsPerRound, ParticipantsMode
- GameSetupDialog: Full setup wizard with DynamicComponent

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 08:24:52 +01:00
beo3000 264f91d543 Complete phase H5: Scheiss-Spiel + Trigger-Integration
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 08:16:22 +01:00
beo3000 8824162cd9 Add Training Game (Phase H4)
- TrainingGameDefinition with game type metadata
- TrainingGameModel + TrainingPlayerStats for stats tracking
- TrainingGameLogicService implementing game logic
- TrainingSetup.razor for config (ThrowMode, ThrowsPerRound, ParticipantsMode)
- TrainingBoard.razor showing player stats table with totals/averages
- Game type registration in Program.cs

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 14:49:26 +01:00
beo3000 8067ff3cf4 Add Pin Input Components (Phase H2)
- Pin.razor: clickable pin with Standing/Fallen/Disabled states
- PinPanel.razor: 9-pin layout in classic bowling configuration
- NumberPanel.razor: quick-entry 0-9, bell toggle, throw confirm
- ThrowPanel.razor: gutter buttons, throw counters, mode display
- GameInputPanel.razor: orchestrates all panels, handles throw logic
- ThrowResult.cs: throw result record with strike/circle detection

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 14:29:19 +01:00