felhasználó adatok javítása

This commit is contained in:
unknown 2022-11-19 22:35:38 +01:00
parent de6ce6aac7
commit f4ba829876
2 changed files with 5 additions and 5 deletions

View File

@ -113,8 +113,8 @@ class UserController extends Controller
round((sum(game_puzzles.hit) / count(game_puzzles.hit)) * 100, 2) as hitRatio' round((sum(game_puzzles.hit) / count(game_puzzles.hit)) * 100, 2) as hitRatio'
) )
) )
->join('games', 'users.id', '=', 'games.player') ->leftjoin('games', 'users.id', '=', 'games.player')
->join('game_puzzles', 'games.id', '=', 'game_puzzles.game_id') ->leftjoin('game_puzzles', 'games.id', '=', 'game_puzzles.game_id')
->where('users.id', $userID) ->where('users.id', $userID)
->groupBy('users.id', 'users.username', 'users.email', 'users.profile_picture', 'users.isAdmin', 'users.created_at') ->groupBy('users.id', 'users.username', 'users.email', 'users.profile_picture', 'users.isAdmin', 'users.created_at')
->get(); ->get();

View File

@ -35,15 +35,15 @@
<div class="d-flex justify-content-between text-center mt-5 mb-2"> <div class="d-flex justify-content-between text-center mt-5 mb-2">
<div> <div>
<p class="mb-2 h5">{{ $User->numberOfGames }}</p> <p class="mb-2 h5">{{ $User->numberOfGames == 0 ? 0 : $User->numberOfGames }}</p>
<p class="text-white mb-0">Játszmák száma</p> <p class="text-white mb-0">Játszmák száma</p>
</div> </div>
<div class="px-3"> <div class="px-3">
<p class="mb-2 h5">{{ $User->numberOfHits }}</p> <p class="mb-2 h5">{{ !$User->numberOfHits ? 0 : $User->numberOfHits }}</p>
<p class="text-white mb-0">Eltalált feladványok</p> <p class="text-white mb-0">Eltalált feladványok</p>
</div> </div>
<div> <div>
<p class="mb-2 h5"> {{ $User->hitRatio }} %</p> <p class="mb-2 h5"> {{ !$User->hitRatio ? 0 : $User->hitRatio }} %</p>
<p class="text-white mb-0">Találati arány</p> <p class="text-white mb-0">Találati arány</p>
</div> </div>
</div> </div>