From 3f2f66b65ef058491871a7b73b3c26749ebb592b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=90=9D=E5=8D=9C?= Date: Sat, 14 Mar 2026 22:21:29 +0000 Subject: [PATCH] feat(plans): add cross links in summary cards --- resources/views/admin/plans/index.blade.php | 9 +++++ ...minPlanIndexSummaryCardsCrossLinksTest.php | 35 +++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 tests/Feature/AdminPlanIndexSummaryCardsCrossLinksTest.php diff --git a/resources/views/admin/plans/index.blade.php b/resources/views/admin/plans/index.blade.php index a43902f..2981966 100644 --- a/resources/views/admin/plans/index.blade.php +++ b/resources/views/admin/plans/index.blade.php @@ -139,18 +139,27 @@
{{ $summaryStats['active_plans'] ?? 0 }}
+
+ 查看停用套餐 +

月付套餐

+

年付套餐

+

关联订阅总量

diff --git a/tests/Feature/AdminPlanIndexSummaryCardsCrossLinksTest.php b/tests/Feature/AdminPlanIndexSummaryCardsCrossLinksTest.php new file mode 100644 index 0000000..9b42af0 --- /dev/null +++ b/tests/Feature/AdminPlanIndexSummaryCardsCrossLinksTest.php @@ -0,0 +1,35 @@ +seed(); + + $this->post('/admin/login', [ + 'email' => 'platform.admin@demo.local', + 'password' => 'Platform@123456', + ])->assertRedirect('/admin'); + } + + public function test_summary_cards_should_have_cross_links_for_quick_navigation(): void + { + $this->loginAsPlatformAdmin(); + + $this->get('/admin/plans') + ->assertOk() + ->assertSee('查看停用套餐') + ->assertSee('查看年付套餐') + ->assertSee('查看月付套餐') + ->assertSee('status=inactive', false) + ->assertSee('billing_cycle=monthly', false) + ->assertSee('billing_cycle=yearly', false); + } +}