]> git.localhorst.tv Git - alttp.git/commitdiff
remove non-scoring tournaments from player profile trophies
authorDaniel Karbach <daniel.karbach@localhorst.tv>
Wed, 4 Feb 2026 09:52:40 +0000 (10:52 +0100)
committerDaniel Karbach <daniel.karbach@localhorst.tv>
Wed, 4 Feb 2026 09:52:40 +0000 (10:52 +0100)
app/Models/User.php
resources/js/components/users/Participation.jsx
resources/js/components/users/Profile.jsx

index 30892d65661e95db9e143cd4b7d08fde41048154..6c664a848b20eba87233aff1f1c3be00caca15fc 100644 (file)
@@ -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);
        }
index fb1b56b33a4d0051df22c0544591e50281da5982..c47f755554438a9af78848799fc713e9caa84eb1 100644 (file)
@@ -51,13 +51,15 @@ const Participation = ({ user }) => {
                                </Button>
                        </td>
                        <td>
-                               {getIcon(p)}
-                       {!p.tournament.locked && isRunner(p) ?
-                               <span title={i18n.t('participants.placementSubjectToChange')}> *</span>
-                       : null}
-                       {p.tournament.no_record ?
-                               <span title={i18n.t('tournaments.noRecord')}> †</span>
-                       : null}
+                               {p.tournament.show_scoreboard ? <>
+                                       {getIcon(p)}
+                                       {!p.tournament.locked && isRunner(p) ?
+                                               <span title={i18n.t('participants.placementSubjectToChange')}> *</span>
+                                       : null}
+                                       {p.tournament.no_record ?
+                                               <span title={i18n.t('tournaments.noRecord')}> †</span>
+                                       : null}
+                               </> : '—'}
                        </td>
                        <td>
                                {p.roles ? p.roles.map((role, index) =>
index 353f6d9c8799f2c1d6686a7bdde508e8aa25cb27..158439ee0ac1195c551890800e487444501b8c0e 100644 (file)
@@ -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 '';