Files
sam-manage/resources/views/fcm/partials/token-row.blade.php
권혁성 a55ec09cd9 fix: [admin] 테이블 컬럼 정렬 및 뱃지 버튼 UI 통일
- departments, roles, tenants, fcm/tokens 테이블 정렬 통일
- th 가운데 정렬, td 텍스트 컬럼 좌측, 단일값 컬럼 가운데
- fcm 토큰 행 뱃지 스타일 버튼 적용

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 01:18:05 +09:00

63 lines
3.2 KiB
PHP

<tr id="token-row-{{ $token->id }}" class="{{ !$token->is_active ? 'bg-red-50' : '' }}">
<td class="px-3 py-4 whitespace-nowrap text-left">
<div class="text-sm font-medium {{ !$token->is_active ? 'text-gray-500' : 'text-gray-900' }}">{{ $token->user?->name ?? '-' }}</div>
<div class="text-sm text-gray-500">{{ $token->user?->email ?? '-' }}</div>
</td>
<td class="px-3 py-4 whitespace-nowrap text-sm text-gray-500 text-left">{{ $token->tenant?->company_name ?? '-' }}</td>
<td class="px-3 py-4 whitespace-nowrap text-center">
<span class="px-2 py-1 text-xs rounded-full
@if($token->platform === 'android') bg-green-100 text-green-800
@elseif($token->platform === 'ios') bg-blue-100 text-blue-800
@else bg-purple-100 text-purple-800
@endif">
{{ $token->platform }}
</span>
</td>
<td class="px-3 py-4 whitespace-nowrap text-left">
<div class="text-sm text-gray-900" title="{{ $token->device_name }}">{{ $token->parsed_device_name }}</div>
<div class="text-xs text-gray-500">
@if($token->parsed_os_version)
{{ $token->parsed_os_version }}
@endif
@if($token->app_version)
@if($token->parsed_os_version) · @endif
App v{{ $token->app_version }}
@endif
</div>
</td>
<td class="px-3 py-4 whitespace-nowrap text-left">
<div class="text-xs text-gray-500 font-mono truncate max-w-[150px]" title="{{ $token->token }}">
{{ Str::limit($token->token, 30) }}
</div>
</td>
<td class="px-3 py-4 whitespace-nowrap text-center">
@if($token->is_active)
<span class="px-2 py-1 text-xs rounded-full bg-green-100 text-green-800">활성</span>
@else
<span class="px-2 py-1 text-xs rounded-full bg-red-100 text-red-800">비활성</span>
@endif
@if($token->last_error)
<div class="text-xs text-red-500 mt-1">{{ $token->last_error }}</div>
@endif
</td>
<td class="px-3 py-4 whitespace-nowrap text-sm text-gray-500 text-center">
{{ $token->created_at?->format('Y-m-d H:i') ?? '-' }}
</td>
<td class="px-3 py-4 whitespace-nowrap text-center">
<div class="inline-flex gap-1">
<button hx-post="{{ route('fcm.tokens.toggle', $token->id) }}"
hx-target="#token-row-{{ $token->id }}"
hx-swap="outerHTML"
class="px-2.5 py-1 text-xs font-medium rounded {{ $token->is_active ? 'bg-yellow-100 text-yellow-700 hover:bg-yellow-200' : 'bg-green-100 text-green-700 hover:bg-green-200' }} transition text-center">
{{ $token->is_active ? '비활성화' : '활성화' }}
</button>
<button hx-delete="{{ route('fcm.tokens.delete', $token->id) }}"
hx-target="#token-row-{{ $token->id }}"
hx-swap="outerHTML swap:1s"
hx-confirm="토큰을 삭제하시겠습니까?"
class="px-2.5 py-1 text-xs font-medium rounded bg-red-100 text-red-700 hover:bg-red-200 transition text-center">
삭제
</button>
</div>
</td>
</tr>