diff --git a/resources/views/admin/dashboard.blade.php b/resources/views/admin/dashboard.blade.php index b6e6100..5444851 100644 --- a/resources/views/admin/dashboard.blade.php +++ b/resources/views/admin/dashboard.blade.php @@ -22,6 +22,28 @@ + +
+

收费工作台

+
聚焦收费闭环的日常治理入口:订单 → 订阅 → 套餐。
+ +
+ 进入平台订单 + 进入订阅管理 + 进入套餐管理 +
+ +
+
快捷筛选:
+ +
+
+
站点
{{ $stats['merchants'] }}
管理员
{{ $stats['admins'] }}
diff --git a/tests/Feature/AdminDashboardBillingWorkbenchLinksTest.php b/tests/Feature/AdminDashboardBillingWorkbenchLinksTest.php new file mode 100644 index 0000000..a442334 --- /dev/null +++ b/tests/Feature/AdminDashboardBillingWorkbenchLinksTest.php @@ -0,0 +1,39 @@ +seed(); + + $this->post('/admin/login', [ + 'email' => 'platform.admin@demo.local', + 'password' => 'Platform@123456', + ])->assertRedirect('/admin'); + } + + public function test_dashboard_should_render_billing_workbench_links(): void + { + $this->loginAsPlatformAdmin(); + + $res = $this->get('/admin'); + $res->assertOk(); + + $res->assertSee('收费工作台'); + $res->assertSee('href="/admin/platform-orders"', false); + $res->assertSee('进入平台订单'); + + $res->assertSee('href="/admin/site-subscriptions"', false); + $res->assertSee('进入订阅管理'); + + $res->assertSee('href="/admin/plans"', false); + $res->assertSee('进入套餐管理'); + } +} diff --git a/tests/Feature/AdminDashboardBillingWorkbenchQuickLinksTest.php b/tests/Feature/AdminDashboardBillingWorkbenchQuickLinksTest.php new file mode 100644 index 0000000..8e65f0a --- /dev/null +++ b/tests/Feature/AdminDashboardBillingWorkbenchQuickLinksTest.php @@ -0,0 +1,43 @@ +seed(); + + $this->post('/admin/login', [ + 'email' => 'platform.admin@demo.local', + 'password' => 'Platform@123456', + ])->assertRedirect('/admin'); + } + + public function test_dashboard_should_render_billing_workbench_quick_links(): void + { + $this->loginAsPlatformAdmin(); + + $res = $this->get('/admin'); + $res->assertOk(); + + $res->assertSee('快捷筛选'); + + $res->assertSee('href="/admin/platform-orders?payment_status=unpaid&status=pending"', false); + $res->assertSee('待支付'); + + $res->assertSee('href="/admin/platform-orders?payment_status=paid&status=pending"', false); + $res->assertSee('待生效'); + + $res->assertSee('href="/admin/platform-orders?syncable_only=1"', false); + $res->assertSee('可同步'); + + $res->assertSee('href="/admin/platform-orders?sync_status=failed"', false); + $res->assertSee('同步失败'); + } +}