@extends('admin.layouts.master') @section('content')
@include('admin.message._left_nav')
@if ($message->user_id)
{{ trans('app.important') }}: {!! trans('app.message_send_by_staff', ['user' => $message->user->getName()]) !!}
@endif

{{ trans('app.message') }}

{{ trans('app.avatar') }} @can('view', $message->customer) @if ($message->customer->id) {{ trans('app.view_detail') }} @endif @endcan

{!! $message->subject !!}

{{ $message->user_id ? trans('app.to') : trans('app.from') }}: {{ $message->customer->getName() }} @if ($message->order) {{ '<' . get_customer_email_from_order($message->order) . '>' }} @endif {{ $message->updated_at->toDayDateTimeString() }}
@if ($message->order)
{{ trans('app.order') }}: @can('view', $message->order) {{ $message->order->order_number }} @else {{ $message->order->order_number }} @endcan
@endif
@if ($message->label < \App\Models\Message::LABEL_DRAFT) @can('reply', $message) {{ trans('app.reply') }} {{ trans('app.reply_with_template') }} @endcan @if ($message->label == \App\Models\Message::LABEL_INBOX) {{ trans('app.mark_as_unread') }} @endif @can('update', $message) {{ trans('app.mark_as_spam') }} {{ trans('app.trash') }} @endcan @else @if ($message->label == \App\Models\Message::LABEL_DRAFT) {{ trans('app.open') }} @endif @if ($message->label > \App\Models\Message::LABEL_DRAFT) @can('update', $message) {{ trans('app.move_to_inbox') }} @endcan @endif @can('delete', $message) {{ trans('app.delete_permanently') }} @endcan @endif
{!! $message->message !!}
@if ($message->attachments->count()) @endif @unless ($message->label == \App\Models\Message::LABEL_DRAFT) @if ($message->replies->count()) @endif @endunless
@endsection