@extends('layouts.app') @section('title', __('messages.response_templates')) @section('styles') @include('admin.partials.tickets_datatable_theme') @endsection @section('content') @php $templatesPayload = $templates->mapWithKeys(function ($template) { return [ $template->ID => [ 'id' => $template->ID, 'update_url' => route('admin.response-templates.update', $template->ID), 'title' => $template->title_translations, 'body' => $template->body_translations, ], ]; }); @endphp

{{ __('messages.response_templates') }}

{{ __('messages.dt_subtitle_response_templates') }}

[USER], [SITE_NAME], [ADMIN_NAME], [FIRST_NAME]
[LAST_NAME], [STAFF_FIRST_NAME], [STAFF_LAST_NAME]
@foreach ($templates as $template) @php $titleTr = $template->title_translations; $bodyTr = $template->body_translations; $hasEn = trim((string) ($bodyTr['en'] ?? '')) !== '' ? 1 : 0; $hasAr = trim((string) ($bodyTr['ar'] ?? '')) !== '' ? 1 : 0; @endphp @endforeach
ID {{ __('messages.title_fr') }} {{ __('messages.content_fr') }} EN AR {{ __('messages.actions') }} has_en has_ar
{{ $template->ID }} {{ $titleTr['fr'] ?? $template->getLocalizedTitle('fr') }} {{ \Illuminate\Support\Str::limit(strip_tags($bodyTr['fr'] ?? ''), 120) }} {{ $hasEn ? __('messages.yes') : __('messages.no') }} {{ $hasAr ? __('messages.yes') : __('messages.no') }}
@csrf @method('DELETE')
{{ $hasEn }} {{ $hasAr }}
@endsection @section('scripts') @endsection