{{-- resources/views/surveys/show.blade.php --}} @extends('layouts.app') @section('css') @endsection @section('js') @endsection @push('pageTitle') {{ __('labels.surveys') }} @endpush @section('content') @include('components.common.page-header', [ 'pageTitle' => __('labels.surveys'), 'actionButton' => [ 'url' => route('surveys.index'), 'text' => __('labels.back_to_list'), ], ]) {{-- News Header --}} @php $audienceColors = [ 'staff_training' => 'primary', 'customer_event' => 'info', 'both' => 'success', ]; $audienceIcons = [ 'staff_training' => 'fa-users-cog', 'customer_event' => 'fa-handshake', 'both' => 'fa-users', ]; $audienceTypes = [ 'staff_training' => __('labels.staff_training'), 'customer_event' => __('labels.customer_event'), 'both' => __('labels.both'), ]; $audienceType = $event->audience_type ?? 'both'; $audienceLabel = $audienceTypes[$audienceType]; $audienceColor = $audienceColors[$audienceType] ?? 'secondary'; $audienceIcon = $audienceIcons[$audienceType] ?? 'fa-users'; // Map types to icons and colors $typeConfig = [ 'announcements' => [ 'icon' => 'fa-bullhorn', 'color' => 'primary', 'text' => __('labels.announcements'), ], 'webinars' => [ 'icon' => 'fa-video', 'color' => 'success', 'text' => __('labels.webinars'), ], 'workshops' => [ 'icon' => 'fa-chalkboard-teacher', 'color' => 'warning', 'text' => __('labels.workshops'), ], 'other' => [ 'icon' => 'fa-ellipsis-h', 'color' => 'secondary', 'text' => __('labels.other'), ], ]; $currentType = $event->type ?? 'other'; $config = $typeConfig[$currentType] ?? $typeConfig['other']; @endphp
{{--

{{ $event->title }}

--}}

{{ $event->title }}

{{-- Quick Actions --}}
@can('update', $event) @endcan @can('delete', $event) @endcan
{{-- METADATA CARDS --}}
{{-- Audience Card --}}
{{ __('labels.audience') }}
{{ $audienceLabel }} {{-- {{ $audienceLabel }} --}}
{{ __('labels.type') }}
@php $currentType = $event->type ?? 'other'; $selectedConfig = $typeConfig[$currentType] ?? $typeConfig['other']; @endphp {{ $selectedConfig['text'] }}
{{-- Status Card --}}
{{ __('labels.status') }}
{{ $event->is_published ? __('labels.published') : __('labels.draft') }}
{{-- Type Card --}} @include('components.form.view-timeline', [ 'started_at' => $event->started_at, 'ended_at' => $event->ended_at, ])
@if ($event->description)
{{ __('labels.description') }}
{!! nl2br(e($event->description)) !!}
@endif @if (isset($event)) @include('pages.events.templates.response.submit', [ 'event' => $event ?? null, ]) @if (auth()->user()->can('viewEventResponses', $event)) @include('pages.events.templates.response.statistics', [ 'responseStats' => $event->responseStatistics() ?? null, ]) @endif @endif {{-- Attachments Section --}} @isset($event->assets) @include('components.form.file-manager.uploaded-files', [ 'readonly' => isset($readonly) && $readonly, 'assets' => $event->assets, ]) @endisset {{-- Groups Section --}} {{-- @include('components.form.view-selected-groups', [ 'groups' => $event->groups, ]) --}} {{-- Additional Metadata --}} @include('components.meta.stats',[ 'created_at' => $event->created_at ?? null, 'updated_at' => $event->updated_at ?? null, 'published_at' => $event->published_at ?? null, 'is_published' => $event->is_published ?? null, 'assetCounts' => $event->assets->count() ?? null, 'creater' => $event->author_name ?? null, ]) @endsection