feat(admin-ui): 订阅/套餐筛选区可折叠并记忆状态
This commit is contained in:
@@ -97,9 +97,16 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card mb-20">
|
<details class="card mb-20 collapsible" data-role="collapsible" data-storage-key="admin.plans.filters" open>
|
||||||
<h3>筛选条件</h3>
|
<summary class="collapsible-summary">
|
||||||
<form method="get" action="/admin/plans" class="grid-3">
|
<div class="flex-between items-center">
|
||||||
|
<h3 class="mb-0">筛选条件</h3>
|
||||||
|
<span class="muted muted-xs">点击收起/展开</span>
|
||||||
|
</div>
|
||||||
|
</summary>
|
||||||
|
<div class="collapsible-body">
|
||||||
|
<form method="get" action="/admin/plans" class="grid-3">
|
||||||
|
|
||||||
@if($safeBackForLinks !== '')
|
@if($safeBackForLinks !== '')
|
||||||
<input type="hidden" name="back" value="{!! $safeBackForLinks !!}">
|
<input type="hidden" name="back" value="{!! $safeBackForLinks !!}">
|
||||||
@endif
|
@endif
|
||||||
@@ -124,8 +131,9 @@
|
|||||||
<div>
|
<div>
|
||||||
<button class="btn btn-sm" type="submit">应用筛选</button>
|
<button class="btn btn-sm" type="submit">应用筛选</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
</details>
|
||||||
|
|
||||||
<div class="grid-4 mb-20">
|
<div class="grid-4 mb-20">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
|
|||||||
@@ -133,9 +133,16 @@
|
|||||||
<div class="muted muted-xs mt-6">建议:先处理“7天内到期”续费触达,再处理“已过期”补单或关闭。</div>
|
<div class="muted muted-xs mt-6">建议:先处理“7天内到期”续费触达,再处理“已过期”补单或关闭。</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card mb-20">
|
<details class="card mb-20 collapsible" data-role="collapsible" data-storage-key="admin.site_subscriptions.filters" open>
|
||||||
<h3>筛选条件</h3>
|
<summary class="collapsible-summary">
|
||||||
<form method="get" action="/admin/site-subscriptions" class="grid-4">
|
<div class="flex-between items-center">
|
||||||
|
<h3 class="mb-0">筛选条件</h3>
|
||||||
|
<span class="muted muted-xs">点击收起/展开</span>
|
||||||
|
</div>
|
||||||
|
</summary>
|
||||||
|
<div class="collapsible-body">
|
||||||
|
<form method="get" action="/admin/site-subscriptions" class="grid-4">
|
||||||
|
|
||||||
@if($safeBackForLinks !== '')
|
@if($safeBackForLinks !== '')
|
||||||
<input type="hidden" name="back" value="{!! $safeBackForLinks !!}">
|
<input type="hidden" name="back" value="{!! $safeBackForLinks !!}">
|
||||||
@endif
|
@endif
|
||||||
@@ -166,8 +173,9 @@
|
|||||||
<div>
|
<div>
|
||||||
<button class="btn btn-sm" type="submit">应用筛选</button>
|
<button class="btn btn-sm" type="submit">应用筛选</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
</details>
|
||||||
|
|
||||||
<div class="grid-4 mb-20">
|
<div class="grid-4 mb-20">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
|
|||||||
@@ -0,0 +1,36 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Tests\Feature;
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||||
|
use Tests\TestCase;
|
||||||
|
|
||||||
|
class AdminPlanIndexFilterPanelShouldBeCollapsibleTest 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_plan_index_filter_panel_should_be_collapsible(): void
|
||||||
|
{
|
||||||
|
$this->loginAsPlatformAdmin();
|
||||||
|
|
||||||
|
$res = $this->get('/admin/plans');
|
||||||
|
$res->assertOk();
|
||||||
|
|
||||||
|
$html = (string) $res->getContent();
|
||||||
|
|
||||||
|
$this->assertStringContainsString('data-role="collapsible"', $html);
|
||||||
|
$this->assertStringContainsString('data-storage-key="admin.plans.filters"', $html);
|
||||||
|
$this->assertStringContainsString('<summary', $html);
|
||||||
|
$this->assertStringContainsString('筛选条件', $html);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Tests\Feature;
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||||
|
use Tests\TestCase;
|
||||||
|
|
||||||
|
class AdminSiteSubscriptionIndexFilterPanelShouldBeCollapsibleTest 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_site_subscription_index_filter_panel_should_be_collapsible(): void
|
||||||
|
{
|
||||||
|
$this->loginAsPlatformAdmin();
|
||||||
|
|
||||||
|
$res = $this->get('/admin/site-subscriptions');
|
||||||
|
$res->assertOk();
|
||||||
|
|
||||||
|
$html = (string) $res->getContent();
|
||||||
|
|
||||||
|
$this->assertStringContainsString('data-role="collapsible"', $html);
|
||||||
|
$this->assertStringContainsString('data-storage-key="admin.site_subscriptions.filters"', $html);
|
||||||
|
$this->assertStringContainsString('<summary', $html);
|
||||||
|
$this->assertStringContainsString('筛选条件', $html);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user