Added Feedback section.

This commit is contained in:
2024-04-23 19:30:56 +05:00
parent 491249c8d8
commit 8c353a49b7
44 changed files with 1050 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
@section('meta_title', __('admin-sections.Feedback'))
@section('h1', __('admin-sections.Feedback'))
<x-admin.layout>
<div class="card border-0 shadow mb-4">
<div class="card-body">
<div class="table-responsive">
<table class="table table-centered table-nowrap mb-0 rounded">
<thead class="thead-light">
<tr>
<th class="border-0">{{ __('admin-sections.Project') }}</th>
<th class="border-0" style="width: 100%;">{{ __('site.attributes.message') }}</th>
<th class="border-0">{{ __('site.attributes.name') }}</th>
<th class="border-0">{{ __('site.attributes.email') }}</th>
</tr>
</thead>
<tbody>
@foreach($feedbacks as $feedback)
<tr>
<td>{{ $feedback->project->name }}</td>
<td>{!! $feedback->message !!}</td>
<td>
<p>{{ $feedback->name }}</p>
<p><strong>IP:</strong> {{ $feedback->ip }}</p>
<p><strong>UserAgent:</strong> {{ $feedback->user_agent }}</p>
</td>
<td>{{ $feedback->email }}</td>
</tr>
@endforeach
</tbody>
</table>
<div class="card-footer border-0">
{{ $feedbacks->links() }}
</div>
</div>
</div>
</div>
</x-admin.layout>

View File

@@ -0,0 +1,36 @@
@section('meta_title', __('admin-sections.Project') . ': ' . $project->name . ' - ' . __('admin-sections.Feedback'))
@section('h1', __('admin-sections.Project') . ': ' . $project->name)
<x-admin.layout>
<div class="card border-0 shadow mb-4">
<div class="card-body">
<h3 id="category" class="mb-4">{{ __('admin-sections.Feedback') }}</h3>
<div class="table-responsive">
<table class="table table-centered table-nowrap mb-0 rounded">
<thead class="thead-light">
<tr>
<th class="border-0" style="width: 100%;">{{ __('site.attributes.message') }}</th>
<th class="border-0">{{ __('site.attributes.name') }}</th>
<th class="border-0">{{ __('site.attributes.email') }}</th>
</tr>
</thead>
<tbody>
@foreach($feedbacks as $feedback)
<tr>
<td>{!! $feedback->message !!}</td>
<td>
<p>{{ $feedback->name }}</p>
<p><strong>IP:</strong> {{ $feedback->ip }}</p>
<p><strong>UserAgent:</strong> {{ $feedback->user_agent }}</p>
</td>
<td>{{ $feedback->email }}</td>
</tr>
@endforeach
</tbody>
</table>
<div class="card-footer border-0">
{{ $feedbacks->links() }}
</div>
</div>
</div>
</div>
</x-admin.layout>

View File

@@ -48,6 +48,18 @@
</td>
</tr>
@endcan
@can('viewAny', \App\Models\ProjectFeedback::class)
<tr>
<td>
<a href="{{ route('admin.projects.feedbacks.index', ['project' => $project->id]) }}" class="fw-bold">
<svg width="16" height="16" class="align-text-top" data-slot="icon" fill="none" stroke-width="1.5" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
<path stroke-linecap="round" stroke-linejoin="round" d="M8.625 12a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0H8.25m4.125 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0H12m4.125 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm0 0h-.375M21 12c0 4.556-4.03 8.25-9 8.25a9.764 9.764 0 0 1-2.555-.337A5.972 5.972 0 0 1 5.41 20.97a5.969 5.969 0 0 1-.474-.065 4.48 4.48 0 0 0 .978-2.025c.09-.457-.133-.901-.467-1.226C3.93 16.178 3 14.189 3 12c0-4.556 4.03-8.25 9-8.25s9 3.694 9 8.25Z"></path>
</svg>
{{ __('admin-sections.Feedback') }}
</a>
</td>
</tr>
@endcan
</tbody>
</table>
</div>