优化功能
Some checks failed
Tests / PHP 8.2 (push) Has been cancelled
Tests / PHP 8.3 (push) Has been cancelled
Tests / PHP 8.4 (push) Has been cancelled

This commit is contained in:
jiangdong.cheng
2026-02-12 17:10:36 +08:00
parent 56c685b579
commit a795b2c896
29 changed files with 2155 additions and 884 deletions

View File

@@ -2,8 +2,12 @@
@section('title', '反馈管理')
@section('head')
@include('admin.partials.modern-index-head')
@endsection
@section('content')
<div class="card mb-3">
<div class="card modern-index-toolbar mb-3">
<div class="card-body">
@if(session('status'))
<div class="alert alert-success mb-3">{{ session('status') }}</div>
@@ -31,19 +35,22 @@
</div>
</form>
</div>
<div class="card-footer bg-transparent border-0 pt-0">
<div class="toolbar-meta"> {{ number_format($items->total()) }} 条反馈记录</div>
</div>
</div>
<div class="card">
<div class="card modern-index-card">
<div class="card-header">
<h3 class="card-title">用户反馈列表</h3>
<h3 class="card-title mb-0">用户反馈列表</h3>
</div>
<div class="table-responsive">
<table class="table table-vcenter card-table">
<table class="table table-vcenter card-table modern-index-table">
<thead>
<tr>
<th>ID</th>
<th>类型</th>
<th>标题</th>
<th>标题与描述</th>
<th>联系</th>
<th>状态</th>
<th>提交时间</th>
@@ -53,20 +60,28 @@
<tbody>
@forelse($items as $item)
<tr>
<td>{{ $item->id }}</td>
<td>{{ $item->feedback_type }}</td>
<td>#{{ $item->id }}</td>
<td><span class="badge bg-indigo-lt text-indigo-fg">{{ $item->feedback_type }}</span></td>
<td>
<div class="fw-semibold">{{ $item->title }}</div>
<div class="text-muted small">{{ $item->description }}</div>
<div class="modern-index-title">{{ $item->title }}</div>
<div class="modern-index-summary">{{ $item->description }}</div>
</td>
<td>{{ $item->contact ?: '-' }}</td>
<td>{{ $item->status }}</td>
<td>
@if($item->status === 'done')
<span class="status-badge status-published">done</span>
@elseif($item->status === 'reviewing')
<span class="status-badge status-review">reviewing</span>
@else
<span class="status-badge status-draft">new</span>
@endif
</td>
<td>{{ $item->created_at?->format('Y-m-d H:i') }}</td>
<td>
<form method="post" action="{{ route('admin.feedback.status', $item) }}" class="d-flex gap-2">
@csrf
@method('put')
<select class="form-select form-select-sm" name="status" style="min-width: 110px;">
<select class="form-select form-select-sm" name="status" style="min-width: 120px;">
@foreach(['new' => '新建', 'reviewing' => '处理中', 'done' => '已完成'] as $value => $label)
<option value="{{ $value }}" @selected($item->status === $value)>{{ $label }}</option>
@endforeach
@@ -77,15 +92,13 @@
</tr>
@empty
<tr>
<td colspan="7" class="text-center text-muted">暂无反馈数据</td>
<td colspan="7" class="text-center text-muted py-5">暂无反馈数据</td>
</tr>
@endforelse
</tbody>
</table>
</div>
<div class="card-body">
{{ $items->links() }}
</div>
<div class="card-footer">{{ $items->links() }}</div>
</div>
@endsection