Files
sam-manage/resources/views/fcm/partials/token-row.blade.php
권혁성 dfe97308f3 deploy: 2026-03-11 배포
- feat: MNG→SAM 자동 로그인 토큰 (LoginToken 모델 도메인 매핑)
- feat: 사용자/역할/부서 관리 개선 (Controller, Service, View)
- feat: 메뉴 관리 개선 (MenuService, menu-tree.js)
- fix: 문서 뷰어, FCM 토큰, 방화셔터 도면, 테넌트 테이블 뷰 수정
2026-03-11 02:12:51 +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>