diff --git a/docker-compose.yml b/docker-compose.yml index 97ee8e677..e0d1e660b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,6 +5,7 @@ networks: volumes: bracket_pg_data: + services: bracket-backend: container_name: bracket-backend @@ -43,4 +44,4 @@ services: - bracket_lan restart: always volumes: - - bracket_pg_data:/var/lib/postgresql/data + - bracket_pg_data:/var/lib/postgresql diff --git a/frontend/public/locales/de/common.json b/frontend/public/locales/de/common.json index 87855bb4d..94edbf794 100644 --- a/frontend/public/locales/de/common.json +++ b/frontend/public/locales/de/common.json @@ -259,6 +259,7 @@ "tournament_title": "Turnier", "tournaments_title": "Turniere", "unarchive_tournament_button": "Turnierarchivierung aufheben", + "unplayed_matches_draw_disclaimer": "Solange das Spiel noch nicht gespielt worden ist zählt es automatisch als unentschieden", "upcoming_matches_empty_table_info": "Bevorstehende Spiele", "upload_placeholder_team": "Ziehen Sie eine Datei hierher, um sie als Teamlogo hochzuladen.", "upload_placeholder_tournament": "Ziehen Sie eine Datei hierher, um sie als Tunierlogo hochzuladen.", diff --git a/frontend/public/locales/en/common.json b/frontend/public/locales/en/common.json index 620157a64..16e20c31d 100644 --- a/frontend/public/locales/en/common.json +++ b/frontend/public/locales/en/common.json @@ -259,6 +259,7 @@ "tournament_title": "tournament", "tournaments_title": "tournaments", "unarchive_tournament_button": "Unarchive Tournament", + "unplayed_matches_draw_disclaimer": "As long as the match has not been played, it counts automatically as a draw", "upcoming_matches_empty_table_info": "upcoming matches", "upload_placeholder_team": "Drop a file here to upload as team logo.", "upload_placeholder_tournament": "Drop a file here to upload as tournament logo.", diff --git a/frontend/src/components/utils/datetime.tsx b/frontend/src/components/utils/datetime.tsx index d47c610d5..641b8c725 100644 --- a/frontend/src/components/utils/datetime.tsx +++ b/frontend/src/components/utils/datetime.tsx @@ -15,5 +15,6 @@ export function formatTime(datetime: string) { } export function compareDateTime(datetime1: string, datetime2: string) { - return parseISO(datetime1) > parseISO(datetime2); + return parseISO(datetime1).getTime() - parseISO(datetime2).getTime(); } + diff --git a/frontend/src/pages/tournaments/[id]/dashboard/index.tsx b/frontend/src/pages/tournaments/[id]/dashboard/index.tsx index 50e703ee6..bc7ec4224 100644 --- a/frontend/src/pages/tournaments/[id]/dashboard/index.tsx +++ b/frontend/src/pages/tournaments/[id]/dashboard/index.tsx @@ -133,7 +133,7 @@ export function Schedule({ .sort( (m1: any, m2: any) => compareDateTime(m1.match.start_time, m2.match.start_time) || - m1.match.court?.name.localeCompare(m2.match.court?.name) + (m1.match.court?.name || '').localeCompare(m2.match.court?.name || '') ); const rows: React.JSX.Element[] = []; diff --git a/frontend/src/pages/tournaments/[id]/dashboard/standings.tsx b/frontend/src/pages/tournaments/[id]/dashboard/standings.tsx index 58363b7dc..73ed8244b 100644 --- a/frontend/src/pages/tournaments/[id]/dashboard/standings.tsx +++ b/frontend/src/pages/tournaments/[id]/dashboard/standings.tsx @@ -84,6 +84,9 @@ export default function DashboardStandingsPage() { + + {t('unplayed_matches_draw_disclaimer')} +