From 5e87214d986cfce7b504301fb46cc0b135b1da5a Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Thu, 10 Oct 2024 02:04:12 -0600 Subject: [PATCH] Update admin message views --- resources/views/admin/messages/home.blade.php | 118 +++++++--- resources/views/admin/messages/show.blade.php | 203 ++++++++++++++---- 2 files changed, 252 insertions(+), 69 deletions(-) diff --git a/resources/views/admin/messages/home.blade.php b/resources/views/admin/messages/home.blade.php index ee0b86e6e..2484b85d0 100644 --- a/resources/views/admin/messages/home.blade.php +++ b/resources/views/admin/messages/home.blade.php @@ -1,36 +1,94 @@ @extends('admin.partial.template-full') @section('section') -
-

Messages

+
+
+
+
+
+

Messages

+
+
+
+
+
+
-
-
- - - - - - - - - - - @foreach($messages as $msg) - - - - - - - @endforeach - -
#UserMessageCreated
- - {{$msg->id}} - - {{$msg->user->username}}{{str_limit($msg->message, 40)}}{{$msg->created_at->diffForHumans()}}
+
+ @if (session('status')) +
+
+ {{ session('status') }} +
+
+ @endif +
+ +
+
+
+ + + + + + + + + + + @foreach($messages as $msg) + + + + + + + @endforeach + +
#UserMessageCreated
+ + {{$msg->id}} + + {{$msg->user->username}}{{str_limit($msg->message, 40)}}{{$msg->created_at->diffForHumans()}}
+
+
+ {{$messages->links()}} +
+
-{{$messages->links()}} -@endsection \ No newline at end of file +@endsection + +@push('scripts') + +@endpush diff --git a/resources/views/admin/messages/show.blade.php b/resources/views/admin/messages/show.blade.php index a86372e15..952d78208 100644 --- a/resources/views/admin/messages/show.blade.php +++ b/resources/views/admin/messages/show.blade.php @@ -4,56 +4,155 @@
# {{$message->id}}
-
Message
-
- @if($message->read_at) - Read - @else - - @endif -
+
Contact Form Message
+
-
+
-
- -
- @if($message->response_requested) -

Response Requested

- @endif -

Sent {{$message->created_at->diffForHumans()}}

+
+
+
+
+ @if($message->responded_at) +
+
+
Admin Response Sent
+
+ + {{$message->responded_at->diffForHumans()}} + +
+
+
+ @endif + +
+
+
Status
+ @if($message->read_at == null) +
Open
+ @else +
Closed
+ @endif +
+
+
+
+
Response Requested
+ @if($message->response_requested == 1) +
Yes
+ @else +
No
+ @endif +
+
+ +
+
+
Created
+
+ + {{$message->created_at->diffForHumans()}} + +
+
+
+ + @if($message->user && $message->user->last_active_at) +
+
+
User Last Active
+
+ + {{$message->user->last_active_at->diffForHumans()}} + +
+
+
+ @endif + + @if(!$message->read_at) +
+ +
+ @endif +
+
-
- -
-
-
- -
-
@{{$message->user->username}}
- {{$message->user->email}} + +
+
+
+
+
+
+ +
+
@{{$message->user->username}}
+ {{$message->user->email}} +
+
-
-
-
-

{{$message->message}}

+
+

Message Body

+

{{$message->message}}

+ +
+

Admin Reply:

+ + @if($message->responded_at) +

{{$message->response}}

+ @else +
+ @csrf +
+ + @if ($errors->any()) + @foreach ($errors->all() as $error) +

+ {{ $error }} +

+ @endforeach + @endif +
+
+
+ + +
+ +
+ + 0/500 + +
+
+
+ @endif +
+
-
- {{-- @if($message->responded_at == null) - -
- @endif - --}} -
- @endsection @push('scripts') +@if($message->responded_at == null) -@endpush \ No newline at end of file +@endif +@endpush