- 任命/撤销事件增加 type 字段区分类型 - 任命:全屏礼花 + 紫色弹窗 + 紫色系统消息 - 撤销:灰色弹窗 + 灰色系统消息,无礼花 - 消息分发:操作者/被操作者显示在私聊面板,其他人显示在公屏 - 系统消息加随机鼓励语(各5条轮换) - ChatStateService 修复 Redis key 前缀扫描问题(getAllActiveRoomIds) - 用户名片折叠优化:管理员视野、职务履历均可折叠 - 管理操作 + 职务操作合并为「🔧 管理操作」折叠区 - 悄悄话改为「🎁 送礼物」按钮,礼物面板内联展开
63 lines
3.1 KiB
PHP
63 lines
3.1 KiB
PHP
{{--
|
||
文件功能:历史任职记录页面
|
||
展示所有已撤销的职务记录(is_active=false),含任命人和撤销人信息
|
||
|
||
@author ChatRoom Laravel
|
||
@version 1.0.0
|
||
--}}
|
||
|
||
@extends('admin.layouts.app')
|
||
|
||
@section('title', '历史任职记录')
|
||
|
||
@section('content')
|
||
<div class="mb-6">
|
||
<a href="{{ route('admin.appointments.index') }}" class="text-sm text-indigo-600 hover:underline">← 返回任命管理</a>
|
||
<h2 class="text-lg font-bold text-gray-800 mt-2">历史任职记录</h2>
|
||
<p class="text-sm text-gray-500 mt-1">已撤销的职务记录(共 {{ $history->total() }} 条)</p>
|
||
</div>
|
||
|
||
<div class="bg-white rounded-xl shadow-sm border overflow-hidden">
|
||
<table class="w-full text-sm">
|
||
<thead class="bg-gray-50 text-gray-600 text-xs">
|
||
<tr>
|
||
<th class="px-4 py-3 text-left">用户</th>
|
||
<th class="px-4 py-3 text-left">职务</th>
|
||
<th class="px-4 py-3 text-left">任命人</th>
|
||
<th class="px-4 py-3 text-center">任命时间</th>
|
||
<th class="px-4 py-3 text-left">撤销人</th>
|
||
<th class="px-4 py-3 text-center">撤销时间</th>
|
||
<th class="px-4 py-3 text-center">在职天数</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody class="divide-y divide-gray-100">
|
||
@forelse ($history as $up)
|
||
<tr class="hover:bg-gray-50">
|
||
<td class="px-4 py-3 font-bold text-gray-800">{{ $up->user->username }}</td>
|
||
<td class="px-4 py-3">
|
||
<span class="mr-1">{{ $up->position->icon }}</span>
|
||
<span style="color: {{ $up->position->department->color }}">{{ $up->position->name }}</span>
|
||
<span class="text-xs text-gray-400 ml-1">{{ $up->position->department->name }}</span>
|
||
</td>
|
||
<td class="px-4 py-3 text-gray-500">{{ $up->appointedBy?->username ?? '系统' }}</td>
|
||
<td class="px-4 py-3 text-center text-gray-500 text-xs">{{ $up->appointed_at->format('Y-m-d') }}
|
||
</td>
|
||
<td class="px-4 py-3 text-gray-500">{{ $up->revokedBy?->username ?? '系统' }}</td>
|
||
<td class="px-4 py-3 text-center text-gray-500 text-xs">
|
||
{{ $up->revoked_at?->format('Y-m-d') ?? '—' }}</td>
|
||
<td class="px-4 py-3 text-center">
|
||
<span class="text-xs bg-gray-100 text-gray-600 px-2 py-0.5 rounded">{{ $up->duration_days }}
|
||
天</span>
|
||
</td>
|
||
</tr>
|
||
@empty
|
||
<tr>
|
||
<td colspan="7" class="px-4 py-12 text-center text-gray-400">暂无历史记录</td>
|
||
</tr>
|
||
@endforelse
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<div class="mt-4">{{ $history->links() }}</div>
|
||
@endsection
|