@extends('layouts.app') @section('content')
@include('partials.header') @include('partials.sidebar')

Welcome Greetings

@if (session('success')) @endif @if (session('error')) @endif
@forelse ($welcomeGreetings as $greeting) @empty @endforelse
Image Title Assignment Status Active File Info Actions
@if ($greeting->imageExists()) {{ $greeting->alt_text ?? $greeting->title }} @else
Missing
@endif
{{ $greeting->title }} @if (!$greeting->is_active) (Inactive) @endif @if ($greeting->assignment_summary['general']) All Rooms @elseif ($greeting->assignment_summary['personal_rooms']->count() > 0) {{ $greeting->assignment_summary['personal_rooms']->count() }} Room(s)
{{ Str::limit($greeting->assignment_summary['personal_rooms']->pluck('room')->join(', '), 50) }}
@else Not Assigned @endif
is_active ? 'checked' : '' }} {{ $greeting->assignment_summary['general'] ? 'disabled' : '' }} onchange="updateActiveStatus({{ $greeting->id }}, this.checked)">
{{ $greeting->human_file_size }}
{{ pathinfo($greeting->original_filename, PATHINFO_EXTENSION) }}
{{ $greeting->created_at->format('M d, Y') }}
@csrf @method('DELETE')
No welcome greetings found.
@endsection