chore(admin-ui): apply list-card component to platform orders index
This commit is contained in:
@@ -1060,9 +1060,11 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="card">
|
<div class="card list-card">
|
||||||
<div class="flex-between">
|
<div class="list-card-header">
|
||||||
<h3>平台订单列表</h3>
|
<div>
|
||||||
|
<h3 class="list-card-title">平台订单列表</h3>
|
||||||
|
</div>
|
||||||
@php
|
@php
|
||||||
// 新建平台订单:默认携带 back 回到本页自身(剔除 back query,避免嵌套)
|
// 新建平台订单:默认携带 back 回到本页自身(剔除 back query,避免嵌套)
|
||||||
// 同时:若当前列表已筛选站点/套餐/订阅ID,则预填到创建页,提高运营下单效率
|
// 同时:若当前列表已筛选站点/套餐/订阅ID,则预填到创建页,提高运营下单效率
|
||||||
@@ -1099,8 +1101,9 @@
|
|||||||
<a href="{!! $createOrderUrl !!}" class="btn btn-sm">新建平台订单</a>
|
<a href="{!! $createOrderUrl !!}" class="btn btn-sm">新建平台订单</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="list-card-body">
|
||||||
<div class="table-wrap">
|
<div class="table-wrap">
|
||||||
<table class="table-nowrap platform-orders-table {{ $isFullView ? 'is-full' : 'is-compact' }}">
|
<table class="list-card-table table-nowrap platform-orders-table {{ $isFullView ? 'is-full' : 'is-compact' }}">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>ID</th>
|
<th>ID</th>
|
||||||
@@ -1548,6 +1551,7 @@
|
|||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="pagination-wrap">{{ $orders->links() }}</div>
|
<div class="pagination-wrap">{{ $orders->links() }}</div>
|
||||||
@endsection
|
@endsection
|
||||||
|
|||||||
@@ -0,0 +1,35 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Tests\Feature;
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||||
|
use Tests\TestCase;
|
||||||
|
|
||||||
|
class AdminPlatformOrdersIndexShouldUseListCardStructureTest 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_platform_orders_index_should_use_list_card_structure(): void
|
||||||
|
{
|
||||||
|
$this->loginAsPlatformAdmin();
|
||||||
|
|
||||||
|
$response = $this->get('/admin/platform-orders');
|
||||||
|
$response->assertOk();
|
||||||
|
|
||||||
|
// 护栏:平台订单列表区域应使用统一 List Card 结构,便于全站列表页风格统一。
|
||||||
|
$response->assertSee('list-card', false);
|
||||||
|
$response->assertSee('list-card-header', false);
|
||||||
|
$response->assertSee('list-card-body', false);
|
||||||
|
$response->assertSee('list-card-table', false);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user