@extends('layouts.app') @push('pageTitle') {{ __('labels.events') }} @endpush @push('css') @endpush @section('content')
@include('components.datatable.custom-search', [ 'tableId' => 'datatable-main', 'actionButton' => Auth::user()->can('create', \App\Models\Event::class) ? [ 'text' => __('labels.new_event'), 'url' => route('events.create'), ] : null, 'optionButtons' => [ [ 'class' => 'btn-info', 'type' => 'link', 'text' => __('labels.calender'), 'icon' => 'fa-solid fa-calendar', 'url' => route('events.index',[ 'show' => 'calender', 'my-events' => request()->query('my-events'), ]) ] ] ]) @include('components.common.flush-message')
@foreach ($listresults as $index => $item) @php // Get user's response $userResponse = $item->responses->firstWhere('user_id', auth()->id()); $hasResponded = !is_null($userResponse); // Response colors mapping $responseColors = [ 'accepted' => 'success', 'rejected' => 'danger', 'maybe' => 'warning' ]; // Priority icons mapping $priorityIcons = [ 'high' => 'fa-flag text-danger', 'medium' => 'fa-flag text-warning', 'low' => 'fa-flag text-info' ]; // Audience type mapping with translation $audienceTypes = [ 'staff_training' => __('labels.staff_training'), 'customer_event' => __('labels.customer_event'), 'both' => __('labels.both'), ]; // Audience colors and icons $audienceColors = [ 'staff_training' => 'primary', 'customer_event' => 'info', 'both' => 'success' ]; $audienceIcons = [ 'staff_training' => 'fa-users-cog', 'customer_event' => 'fa-handshake', 'both' => 'fa-users' ]; @endphp @endforeach
@endsection @push('js') @endpush