Files
chatroom/resources/views/admin/marriages/claim-detail.blade.php
T

95 lines
4.9 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{{--
文件功能:婚礼红包领取明细页
@author ChatRoom Laravel
@version 1.0.0
--}}
@extends('admin.layouts.app')
@section('title', '婚礼红包明细')
@section('content')
@php require resource_path('views/admin/partials/list-theme.php'); @endphp
<div class="{{ $adminListPageClass }}">
<div class="{{ $adminListHeaderCardClass }}">
<div class="flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between">
<div>
<h2 class="{{ $adminListHeaderTitleClass }}">🎁 红包领取明细</h2>
<p class="{{ $adminListHeaderSubtitleClass }}">
{{ $ceremony->marriage?->user?->username }} × {{ $ceremony->marriage?->partner?->username }}
{{ $ceremony->tier?->icon }} {{ $ceremony->tier?->name ?? '婚礼' }}
· 总额 <strong class="text-amber-600">{{ number_format($ceremony->total_amount) }} </strong>
</p>
</div>
<a href="{{ route('admin.marriages.ceremonies') }}" class="{{ $adminListSecondaryButtonClass }}">返回婚礼列表</a>
</div>
</div>
<div class="grid grid-cols-1 gap-4 md:grid-cols-3">
<div class="{{ $adminListCardClass }} p-4 text-center">
<div class="text-2xl font-bold text-indigo-600">{{ $ceremony->online_count ?? 0 }}</div>
<div class="mt-1 text-xs text-gray-500">在线人数</div>
</div>
<div class="{{ $adminListCardClass }} p-4 text-center">
<div class="text-2xl font-bold text-green-600">{{ $ceremony->claimed_count }}</div>
<div class="mt-1 text-xs text-gray-500">已领取人数</div>
</div>
<div class="{{ $adminListCardClass }} p-4 text-center">
<div class="text-2xl font-bold text-amber-600">{{ number_format($ceremony->claimed_amount) }}</div>
<div class="mt-1 text-xs text-gray-500">已领取金额</div>
</div>
</div>
<div class="{{ $adminListCardClass }}">
<div class="{{ $adminListSectionHeadClass }}">
<div>
<h3 class="{{ $adminListSectionTitleClass }}">领取明细</h3>
<p class="{{ $adminListSectionDescClass }}">明细表头、正文、状态徽章与分页统一到后台列表页样式。</p>
</div>
</div>
<div class="{{ $adminListTableWrapClass }}">
<table class="{{ $adminListTableClass }}">
<thead>
<tr class="{{ $adminListTableHeadRowClass }}">
<th class="{{ $adminListTableHeadCellClass }}">用户</th>
<th class="{{ $adminListTableHeadCellClass }} text-center">分配金额</th>
<th class="{{ $adminListTableHeadCellClass }} text-center">状态</th>
<th class="{{ $adminListTableHeadCellClass }}">领取时间</th>
</tr>
</thead>
<tbody class="{{ $adminListTableBodyClass }}">
@forelse ($claims as $claim)
<tr class="{{ $adminListTableRowClass }}">
<td class="px-4 py-3 {{ $adminListPrimaryTextClass }}">{{ $claim->user?->username }}</td>
<td class="px-4 py-3 text-center font-semibold text-amber-600">
{{ number_format($claim->amount) }}
</td>
<td class="px-4 py-3 text-center">
@if ($claim->claimed)
<span class="{{ $adminListBadgeBaseClass }} border-green-200 bg-green-100 text-green-700"> 已领取</span>
@else
<span class="{{ $adminListBadgeBaseClass }} border-gray-200 bg-gray-100 text-gray-500">未领取</span>
@endif
</td>
<td class="px-4 py-3 {{ $adminListSecondaryTextClass }}">
{{ $claim->claimed_at?->format('H:i:s') ?? '—' }}
</td>
</tr>
@empty
<tr>
<td colspan="4" class="{{ $adminListEmptyClass }}">暂无领取记录</td>
</tr>
@endforelse
</tbody>
</table>
</div>
@if ($claims->hasPages())
<div class="{{ $adminListPaginationClass }}">{{ $claims->links() }}</div>
@endif
</div>
</div>
@endsection