chore(admin-ui): apply list-card component to plans index
This commit is contained in:
@@ -201,18 +201,19 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card">
|
<div class="card list-card">
|
||||||
<div class="flex-between">
|
<div class="list-card-header">
|
||||||
<div>
|
<div>
|
||||||
<h3>套餐列表</h3>
|
<h3 class="list-card-title">套餐列表</h3>
|
||||||
<p class="muted muted-xs">后续将从这里进入套餐详情、授权项与订阅联动。</p>
|
<p class="muted muted-xs list-card-subtitle">后续将从这里进入套餐详情、授权项与订阅联动。</p>
|
||||||
</div>
|
</div>
|
||||||
@php
|
@php
|
||||||
$createPlanUrl = \App\Support\BackUrl::withBack('/admin/plans/create', $selfWithoutBack);
|
$createPlanUrl = \App\Support\BackUrl::withBack('/admin/plans/create', $selfWithoutBack);
|
||||||
@endphp
|
@endphp
|
||||||
<a href="{!! $createPlanUrl !!}" class="btn btn-sm">新建套餐</a>
|
<a href="{!! $createPlanUrl !!}" class="btn btn-sm">新建套餐</a>
|
||||||
</div>
|
</div>
|
||||||
<table>
|
<div class="list-card-body">
|
||||||
|
<table class="list-card-table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>ID</th>
|
<th>ID</th>
|
||||||
@@ -308,6 +309,7 @@
|
|||||||
@endforelse
|
@endforelse
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="pagination-wrap">{{ $plans->links() }}</div>
|
<div class="pagination-wrap">{{ $plans->links() }}</div>
|
||||||
|
|||||||
@@ -0,0 +1,35 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Tests\Feature;
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||||
|
use Tests\TestCase;
|
||||||
|
|
||||||
|
class AdminPlansIndexShouldUseListCardStructureTest 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_plans_index_should_use_list_card_structure(): void
|
||||||
|
{
|
||||||
|
$this->loginAsPlatformAdmin();
|
||||||
|
|
||||||
|
$response = $this->get('/admin/plans');
|
||||||
|
$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