@extends('layouts.master', ['class' => 'mailbox']) @section('content') @component('components.card_main', [ 'title' => 'Message ' . $message->id, 'title_options' => ['centered' => true, 'h' => 'h1'], ]) @slot( 'body' )
General Information
{{$message->plant->name}}
Plant
{{$message->subPlant->name}}
Facility
{{$message->created_at_ymd_hi}}
Created At
{{$message->reason_name}}
Reason
{{$message->request_ip ?? '--'}}
Request IP
@if($message->is_complaint)
{{$message->complaint_type->name}}
Complain Type
@endif
User Information
{{$message->name ?? '--'}}
Name
{{$message->telephone ?? '--'}}
Telephone
{{$message->email ?? '--'}}
Email
{{$message->follow_up_name}}
Follow Up Required
{{$message->user_type_name}}
User Type
@if($message->other_user_type)
{{$message->other_user_type}}
Other User Type
@endif @if($message->supplier_contact)
{{$message->supplier_contact}}
Supplier Contact
@endif
{{--
{{$message->user_id ? 'Yes' : 'No'}}
User Was Authenticated?
@if($message->user_id)
{{$message->user->full_name . ' ' . $message->user->email}}
User Authenticated
@endif
--}}
Message Content
{{$message->message}}
Message Attachments
@foreach ($message->evidence as $name=>$info) @endforeach
File Download
File {{ $loop->index+1 }}
Internal views
@foreach ($message->views as $item) @endforeach
# Seen By Seen At
{{ $loop->index+1 }}
{{ $item->seen_user ? $item->seen_user->full_name : '' }}
{{ $item->seen_at }}
Follow up process

@lang('master.status'): {{$message->status_name}}

@if (Auth::user()->roles->has(Role::MAILBOX_ADMIN))
{{-- ________________ STEP 1: ANALYSIS PROCESS ________________ --}}
Analysis process
@lang('audit.step') 1
@if($message->status_id == App\Mailbox\Message::NUEVO) @if($user_is_admin)
@component('components.button', ['type'=>'send', 'id'=>'btn-to-in-revision', 'text'=>__('mailbox.to_revision_status'), 'extra_class'=>'mb-2']) @endcomponent
@component('components.button', ['type'=>'cancel', 'id'=>'btn-not-apply', 'text'=>__('mailbox.not_apply_status'), 'extra_class'=>'']) @endcomponent
@else
Wating for admin action
@endif @else @if($message->rejected_at)
Rejected by: {{$message->rejectedBy->full_name}}
Rejected at: {{$message->rejected_at_ymd_hi}}
Marked as: Follow up not applicable.
@else
Performed by: {{$message->revisionBy->full_name}}
Performed at: {{$message->revision_at_ymd_hi}}
Marked as: Follow up required.
@endif @endif
{{-- ________________ IF MARKED AS NOT APPLICABLE ________________ --}} @if($message->rejected_at)
@else
@endif
@if(!$message->rejected_at) {{-- ________________ STEP 2: REVISION PROCESS ________________ --}}
Revision process
@lang('audit.step') 2
@if($message->status_id == App\Mailbox\Message::EN_REVISION) @if($user_is_admin)
@lang('mailbox.file_size_legend')
@else
Wating for admin action
@endif @elseif($message->status_id == App\Mailbox\Message::NUEVO)
Waiting for step 1
@else
Performed by: {{$message->revisedBy->full_name}}
Performed at: {{$message->revised_at_ymd_hi}}
Action plan: {{$message->action_plan}}
Due date: {{$message->action_plan_due_date->format('y-M-d')}}
@if($message->status_id == App\Mailbox\Message::REVISADO || $message->status_id == App\Mailbox\Message::CERRADO) @if($message->action_plan_evidence_count > 0)
@foreach($message->action_plan_evidence as $name => $info) @endforeach
@endif @endif @endif
@if($message->revision_at) {{-- ________________ STEP 3: REVISION PROCESS ________________ --}}
Closing process
@lang('audit.step') 3
@if($message->status_id == App\Mailbox\Message::REVISADO) @if($user_is_admin)
@lang('mailbox.file_size_legend')
@else
Wating for admin action
@endif @elseif($message->status_id == App\Mailbox\Message::EN_REVISION)
Waiting for step 2
@else
Closed by: {{$message->closedBy->full_name}}
Closed at: {{$message->closed_at_ymd_hi}}
@if($message->status_id == App\Mailbox\Message::CERRADO) @if($message->closed_evidence_count > 0)
@foreach($message->closed_evidence as $name => $info) @endforeach
@endif @endif {{-- ________________ IF MARKED AS CLOSED ________________ --}} @if($message->closed_at)
@endif @endif
@endif @endif
@endif @endslot @endcomponent @endsection @section('plugin-scripts') {{-- CODE --}} @endsection @section('app-scripts') @endsection