Files
thankcard-system/resources/views/user/partials/ranking_list.blade.php
T
2026-07-06 16:07:35 +07:00

46 lines
1.8 KiB
PHP

@if(count($rankers) > 0)
@foreach($rankers as $item)
<x-ranking-item
rank="{{ $item->rank }}"
name="{{ $item->name }}"
team="{{ match((int) $item->departments) {
1 => 'Dev Team',
2 => 'HR Team',
3 => 'Sale Team',
4 => 'Board Team',
5 => 'Marketing Team',
default => 'Team'
} }}"
avatar="{{ $item->avatar ?? 'https://api.dicebear.com/7.x/notionists/svg?seed=' . urlencode($item->name) . '&backgroundColor=bfdbfe' }}"
score="{{ $item->score }}"
unit="thẻ"
:isCurrent="$item->msnv == Auth::user()->msnv"
/>
@endforeach
@if($currentUserRankItem && $currentUserRankItem->rank > 5)
<div class="my-3 border-t border-dashed border-gray-100 mx-2"></div>
<x-ranking-item
rank="{{ $currentUserRankItem->rank }}"
name="{{ $currentUserRankItem->name }}"
team="{{ match((int) $currentUserRankItem->departments) {
1 => 'Dev Team',
2 => 'HR Team',
3 => 'Sale Team',
4 => 'Board Team',
5 => 'Marketing Team',
default => 'Team'
} }}"
avatar="{{ $currentUserRankItem->avatar ?? 'https://api.dicebear.com/7.x/notionists/svg?seed=' . urlencode($currentUserRankItem->name) . '&backgroundColor=bfdbfe' }}"
score="{{ $currentUserRankItem->score }}"
unit="thẻ"
:isCurrent="true"
/>
@endif
@else
<div class="py-12 text-center">
<span class="text-[36px]">🏆</span>
<p class="text-gray-400 font-medium text-[13px] mt-2">Chưa xếp hạng cho tháng này</p>
</div>
@endif