@extends("admin.layouts.app") @section("title", __("admin.ticket_escalation_rules")) @section("content")
@if(($rules ?? collect())->isEmpty())
{{ __('admin.ticket_escalation.no_rules') }}
@else @foreach($rules as $rule) {{-- Edit Rule Modal --}} @endforeach
{{ __('common.table.name') }}{{ __('admin.ticket_escalation.time_threshold') }}{{ __('admin.ticket_escalation.departments') }}{{ __('admin.ticket_escalation.priorities') }}{{ __('admin.ticket_escalation.assign_to') }}{{ __('admin.ticket_escalation.new_priority') }}{{ __('common.table.actions') }}
{{ $rule->name }} {{ $rule->time_elapsed }} min @php $deptNames = []; if (is_array($rule->departments) && count($rule->departments) > 0) { $deptNames = \App\Models\TicketDepartment::whereIn("id", $rule->departments)->pluck("name")->toArray(); } @endphp {{ $deptNames ? implode(", ", $deptNames) : __("admin.tax.all") }} @if(is_array($rule->priorities) && count($rule->priorities) > 0) @foreach($rule->priorities as $p) {{ $p }} @endforeach @else All @endif @if($rule->flag_to) @php $admin = \App\Models\Admin::find($rule->flag_to); @endphp {{ $admin ? $admin->first_name . " " . $admin->last_name : "Admin #" . $rule->flag_to }} @else - @endif {{ $rule->new_priority ?? "-" }}
@csrf @method("DELETE")
@endif
{{ __('admin.ticket_escalation.info_text') }}
{{-- Add Rule Modal --}} @endsection