Skip to content

171 bug fixes#173

Open
lukazuljevic wants to merge 5 commits into
mainfrom
171-bug-fixes
Open

171 bug fixes#173
lukazuljevic wants to merge 5 commits into
mainfrom
171-bug-fixes

Conversation

@lukazuljevic

@lukazuljevic lukazuljevic commented Jul 2, 2026

Copy link
Copy Markdown
Member
  • 1. standings math counts unplayed and knockout matches as 0-0 draws - every scheduled match awards +1 point and +1 "played" to both teams
  • 2 the public standings page (apps/app GroupsPage) fetches GET /group?tournamentId=, which returns raw teams with no stats - the table renders blank UT/GR/B columns and unsorted teams
  • 3 every consumer of useCloseComponent registers its own window-level Escape listener, so one Escape press closes every stacked layer at once (e.g. nested delete-confirmation + TeamFormModal → unsaved batch player edits silently lost)
  • 4 "Dodaj novu ekipu" from a group card on admin GroupsPage discards the group id - the team is created unassigned and is not put into a group
  • 5 editing a match event and selecting "Nepoznat netko" sets playerId: undefined, which JSON serialization drops from the PATCH - the old player silently stays
  • 6 Live timer: notify viewers when a match is activated or ended. Activating a match and "Kraj utakmice" reset the server-side timer, but the SSE stream only emitted on admin timer syncs, anyone watching the public site kept a ticking clock indefinitely after the match ended. The match service now pushes the reset state to all stream subscribers, so viewers' clocks stop immediately.
    Match events: make score update on delete atomic. Deleting a goal event wrote an absolute score computed from a read taken before the transaction, so an in-flight event create/update against the same match could be silently overwritten, leaving Match.homeGoals/awayGoals permanently out of sync with the events (the Math.max(0, …) clamp hid the drift). Delete now uses the same atomic increment/decrement pattern as event create and update, inside the same transaction.

@lukazuljevic lukazuljevic requested review from ninom5 and tsiklic1 July 2, 2026 09:18
@lukazuljevic lukazuljevic linked an issue Jul 2, 2026 that may be closed by this pull request
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.

bug fixes

1 participant