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

Welcome Greetings

Greeting Status Guide:
  • Scheduled The status will update automatically based on the configured schedule. Please refresh the page to view the most recent status.
  • Active The greeting cannot be manually switched on or off while it is in the β€œActive” period. It will automatically turn on when the schedule becomes active and automatically turn off once it reaches the expiration time.
  • Expired The greeting has passed its scheduled end time and must be rescheduled before it can be activated again.
  • Never Expires The greeting will remain active indefinitely.
@if (session('success')) @endif @if (session('error')) @endif
@forelse ($welcomeGreetings as $greeting) {{-- TITLE --}} {{-- ASSIGNMENT --}} {{-- ACTIVE --}} {{-- πŸ†• SCHEDULE --}} {{-- πŸ†• TIMEZONE --}} {{-- πŸ†• EXPIRED --}} {{-- ACTIONS --}} @empty @endforelse
No Image Title Assignment Status Active Schedule Timezone Status File Info Actions
{{ $loop->iteration }} @if ($greeting->imageExists()) {{ $greeting->alt_text ?? $greeting->title }} @else
Missing
@endif
{{ $greeting->title }} @if (!$greeting->is_active && $greeting->schedule_status !== '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
@php $shouldDisableSwitch = $greeting->schedule_status === 'active' || $greeting->assignment_summary['general'] || $greeting->isExpired; @endphp
is_active || $greeting->schedule_status === 'active') ? 'checked' : '' }} {{ $shouldDisableSwitch ? 'disabled' : '' }} onchange="updateActiveStatus({{ $greeting->id }}, this.checked)">
@if ($greeting->start_date && $greeting->expired_date) From:
{{ $greeting->start_date->format('d M Y H:i') }}
To:
{{ $greeting->expired_date->format('d M Y H:i') }}
@else - @endif
{{ $greeting->timezone->timezone ?? '-' }} @switch($greeting->schedule_status) @case('scheduled') Scheduled @break @case('active') Active @break @case('expired') Expired @break @default Never Expires @endswitch {{ $greeting->human_file_size }}
{{ pathinfo($greeting->original_filename, PATHINFO_EXTENSION) }}
{{ $greeting->created_at->format('M d, Y') }}
{{-- tombol lain --}} {{-- hidden delete form --}}
No welcome greetings found.
@endsection