chore(admin-ui): subscription show related orders use list card and admin pagination
This commit is contained in:
@@ -407,10 +407,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card">
|
<div class="card list-card">
|
||||||
<h3>关联平台订单({{ $platformOrders->total() }})</h3>
|
<div class="list-card-header">
|
||||||
|
<div>
|
||||||
|
<h3 class="list-card-title">关联平台订单({{ $platformOrders->total() }})</h3>
|
||||||
|
|
||||||
<div class="mb-10">
|
<div class="mt-10">
|
||||||
<span class="muted">同步状态筛选:</span>
|
<span class="muted">同步状态筛选:</span>
|
||||||
@php
|
@php
|
||||||
$cur = $summaryStats['current_order_sync_status'] ?? '';
|
$cur = $summaryStats['current_order_sync_status'] ?? '';
|
||||||
@@ -445,8 +447,11 @@
|
|||||||
<span class="muted">(当前:{{ $cur }})</span>
|
<span class="muted">(当前:{{ $cur }})</span>
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<table>
|
<div class="list-card-body">
|
||||||
|
<table class="list-card-table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>ID</th>
|
<th>ID</th>
|
||||||
@@ -503,12 +508,13 @@
|
|||||||
</tr>
|
</tr>
|
||||||
@empty
|
@empty
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="11" class="muted">暂无关联平台订单。</td>
|
<td colspan="11" class="muted table-empty">暂无关联平台订单。</td>
|
||||||
</tr>
|
</tr>
|
||||||
@endforelse
|
@endforelse
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<div class="pagination-wrap">{{ $platformOrders->links() }}</div>
|
{{ $platformOrders->links('pagination.admin') }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endsection
|
@endsection
|
||||||
|
|||||||
@@ -0,0 +1,36 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Tests\Feature;
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||||
|
use Tests\TestCase;
|
||||||
|
|
||||||
|
class AdminSiteSubscriptionShowRelatedPlatformOrdersShouldUseListCardAndAdminPaginationTest extends TestCase
|
||||||
|
{
|
||||||
|
use RefreshDatabase;
|
||||||
|
|
||||||
|
protected function loginAsPlatformAdmin(): void
|
||||||
|
{
|
||||||
|
$this->seed();
|
||||||
|
|
||||||
|
$this->post('/admin/login', [
|
||||||
|
'email' => 'platform.admin@demo.local',
|
||||||
|
'password' => 'Platform@123456',
|
||||||
|
])->assertRedirect('/admin');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function test_admin_site_subscription_show_related_platform_orders_should_use_list_card_and_admin_pagination(): void
|
||||||
|
{
|
||||||
|
$this->loginAsPlatformAdmin();
|
||||||
|
|
||||||
|
// 护栏:订阅详情页“关联平台订单”区域必须使用统一 List Card + admin pagination。
|
||||||
|
// 说明:此处使用扫描型断言,避免依赖具体 seed 数据量/分页是否渲染。
|
||||||
|
$blade = file_get_contents(resource_path('views/admin/site_subscriptions/show.blade.php'));
|
||||||
|
$this->assertIsString($blade);
|
||||||
|
|
||||||
|
$this->assertStringContainsString('list-card', $blade);
|
||||||
|
$this->assertStringContainsString('list-card-table', $blade);
|
||||||
|
$this->assertStringContainsString("links('pagination.admin')", $blade);
|
||||||
|
$this->assertStringContainsString('table-empty', $blade);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user