@extends('layouts.admin') @section('title', '알림 템플릿 관리') @section('content')

@yield('title')

등록
@php $currentTarget = request('target', ''); @endphp
전체 보기 @foreach(\App\Models\NotificationTemplate::TARGETS as $tKey => $tLabel) {{ $tLabel }} @endforeach
@slot('filters') @if(request('target')) @endif @php $notificationCategories = config('notification_categories.categories', []); // 1단 카테고리 배열을 [ '키' => '표시이름' ] 형태로 변환 $parentOptions = collect($notificationCategories)->mapWithKeys(function ($item, $key) { // $item['name']에 들어있는 한글 이름(또는 라벨)을 값으로 매핑 return [$key => $item['name']]; })->toArray(); $selectedCategory = request('category'); $currentSubcategories = ($selectedCategory && isset($notificationCategories[$selectedCategory]['subcategories'])) ? $notificationCategories[$selectedCategory]['subcategories'] : []; @endphp @endslot
@forelse($notifications as $item) @php // 채널별 배경 테마 클래스 및 아이콘 분기 처리 $screenClass = 'screen-sms'; $channelIcon = 'fa-solid fa-comment-sms'; if ($item->type === 'ALIMTALK') { $screenClass = 'screen-alimtalk'; $channelIcon = 'fa-solid fa-comment'; } elseif ($item->type === 'EMAIL') { $screenClass = 'screen-email'; $channelIcon = 'fa-solid fa-envelope-open-text'; } @endphp
{{ now()->format('H:i') }}
{{ $item->category_name }} {{ $item->subcategory_name }}
{{ $item->type }}
{{ $item->code }}
수신: @if($item->target === 'user') 일반회원 @elseif($item->target === 'shop') 뷰티샵 대표/직원 @else 시스템 최고관리자 @endif
@if($item->type === 'EMAIL')
발송자: GLOBEAU 고객센터
@endif @if($item->title)
{{ $item->type === 'EMAIL' ? '제목: ' . $item->title : '[' . $item->title . ']' }}
@endif
{{ $item->content }}
@if($item->description)
{{ $item->description }}
@endif
@empty
등록되었거나 검색 조건에 일치하는 알림 템플릿이 없습니다.
@endforelse
@if(isset($notifications) && method_exists($notifications, 'hasPages') && $notifications->hasPages())
{{ $notifications->appends(request()->query())->links('vendor.pagination.admin') }}
@endif
@endsection @push('styles') @endpush @push('scripts') @endpush