- FCM 토큰 관리 페이지 (목록, 활성화/비활성화, 삭제) - 테스트 발송 페이지 (대상 필터, 미리보기, 발송) - 발송 이력 페이지 (필터링, 결과 확인) - FcmSender 서비스 (HTTP v1, 배치 처리) - fcm_send_logs 테이블 마이그레이션 - google/auth 패키지 추가
51 lines
2.3 KiB
PHP
51 lines
2.3 KiB
PHP
<tr id="token-row-{{ $token->id }}">
|
|
<td class="px-6 py-4 whitespace-nowrap">
|
|
<div class="text-sm font-medium text-gray-900">{{ $token->user?->name ?? '-' }}</div>
|
|
<div class="text-sm text-gray-500">{{ $token->user?->email ?? '-' }}</div>
|
|
</td>
|
|
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">{{ $token->tenant?->company_name ?? '-' }}</td>
|
|
<td class="px-6 py-4 whitespace-nowrap">
|
|
<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-6 py-4 whitespace-nowrap text-sm text-gray-500">{{ $token->device_name ?? '-' }}</td>
|
|
<td class="px-6 py-4 whitespace-nowrap">
|
|
<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-6 py-4 whitespace-nowrap">
|
|
@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-6 py-4 whitespace-nowrap text-sm text-gray-500">
|
|
{{ $token->created_at?->format('Y-m-d H:i') ?? '-' }}
|
|
</td>
|
|
<td class="px-6 py-4 whitespace-nowrap text-sm">
|
|
<button hx-post="{{ route('fcm.tokens.toggle', $token->id) }}"
|
|
hx-target="#token-row-{{ $token->id }}"
|
|
hx-swap="outerHTML"
|
|
class="text-blue-600 hover:text-blue-900 mr-3">
|
|
{{ $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="text-red-600 hover:text-red-900">
|
|
삭제
|
|
</button>
|
|
</td>
|
|
</tr>
|