From cecb0e6b27d67b9918335d2b9b7007cbaf6993a5 Mon Sep 17 00:00:00 2001 From: Daniel Karbach Date: Wed, 4 Feb 2026 10:52:40 +0100 Subject: [PATCH] remove non-scoring tournaments from player profile trophies --- app/Models/User.php | 3 +++ resources/js/components/users/Participation.jsx | 16 +++++++++------- resources/js/components/users/Profile.jsx | 2 +- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/app/Models/User.php b/app/Models/User.php index 30892d6..6c664a8 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -218,6 +218,7 @@ class User extends Authenticatable public function tournament_first() { return $this->tournaments() ->where('locked', true) + ->where('show_scoreboard', true) ->where('no_record', false) ->wherePivot('placement', 1); } @@ -225,6 +226,7 @@ class User extends Authenticatable public function tournament_second() { return $this->tournaments() ->where('locked', true) + ->where('show_scoreboard', true) ->where('no_record', false) ->wherePivot('placement', 2); } @@ -232,6 +234,7 @@ class User extends Authenticatable public function tournament_third() { return $this->tournaments() ->where('locked', true) + ->where('show_scoreboard', true) ->where('no_record', false) ->wherePivot('placement', 3); } diff --git a/resources/js/components/users/Participation.jsx b/resources/js/components/users/Participation.jsx index fb1b56b..c47f755 100644 --- a/resources/js/components/users/Participation.jsx +++ b/resources/js/components/users/Participation.jsx @@ -51,13 +51,15 @@ const Participation = ({ user }) => { - {getIcon(p)} - {!p.tournament.locked && isRunner(p) ? - * - : null} - {p.tournament.no_record ? - † - : null} + {p.tournament.show_scoreboard ? <> + {getIcon(p)} + {!p.tournament.locked && isRunner(p) ? + * + : null} + {p.tournament.no_record ? + † + : null} + : '—'} {p.roles ? p.roles.map((role, index) => diff --git a/resources/js/components/users/Profile.jsx b/resources/js/components/users/Profile.jsx index 353f6d9..158439e 100644 --- a/resources/js/components/users/Profile.jsx +++ b/resources/js/components/users/Profile.jsx @@ -10,7 +10,7 @@ import EditStreamLinkButton from './EditStreamLinkButton'; import Participation from './Participation'; import EpisodesList from '../episodes/List'; import Icon from '../common/Icon'; -import { getIcon, getTime } from '../../helpers/Result'; +import { getTime } from '../../helpers/Result'; const getQuoteSource = (result) => { if (!result || !result.round) return ''; -- 2.47.3