From 4df31398246a6cf3d23dccb34f8528dcd76be88e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=90=9D=E5=8D=9C?= Date: Sun, 15 Mar 2026 00:17:20 +0000 Subject: [PATCH] Platform orders index: expand lead governance quick links --- .../admin/platform_orders/index.blade.php | 20 ++++++ ...exLeadGovernanceQuickLinksExpandedTest.php | 69 +++++++++++++++++++ 2 files changed, 89 insertions(+) create mode 100644 tests/Feature/AdminPlatformOrderIndexLeadGovernanceQuickLinksExpandedTest.php diff --git a/resources/views/admin/platform_orders/index.blade.php b/resources/views/admin/platform_orders/index.blade.php index e990714..6652788 100644 --- a/resources/views/admin/platform_orders/index.blade.php +++ b/resources/views/admin/platform_orders/index.blade.php @@ -97,9 +97,29 @@ 'status' => 'pending', ]); @endphp + @php + $leadBmpaUrl = $buildLeadGovernUrl([ + 'payment_status' => 'unpaid', + 'status' => 'pending', + ]); + + $leadSyncableUrl = $buildLeadGovernUrl([ + 'syncable_only' => '1', + 'sync_status' => null, + 'fail_only' => null, + ]); + + $leadSyncFailedUrl = $buildLeadGovernUrl([ + 'sync_status' => 'failed', + 'syncable_only' => null, + ]); + @endphp
查看待支付(该线索) 查看待生效(该线索) + 查看可BMPA处理(该线索) + 查看可同步(该线索) + 查看同步失败(该线索)
diff --git a/tests/Feature/AdminPlatformOrderIndexLeadGovernanceQuickLinksExpandedTest.php b/tests/Feature/AdminPlatformOrderIndexLeadGovernanceQuickLinksExpandedTest.php new file mode 100644 index 0000000..4106245 --- /dev/null +++ b/tests/Feature/AdminPlatformOrderIndexLeadGovernanceQuickLinksExpandedTest.php @@ -0,0 +1,69 @@ +seed(); + + $this->post('/admin/login', [ + 'email' => 'platform.admin@demo.local', + 'password' => 'Platform@123456', + ])->assertRedirect('/admin'); + } + + public function test_index_should_render_expanded_lead_governance_quick_links_when_lead_locked(): void + { + $this->loginAsPlatformAdmin(); + + $leadId = 12; + + $res = $this->get('/admin/platform-orders?' . Arr::query([ + 'lead_id' => $leadId, + ])); + $res->assertOk(); + + $res->assertSee('线索治理入口:', false); + + $unpaidUrl = '/admin/platform-orders?' . Arr::query([ + 'lead_id' => $leadId, + 'payment_status' => 'unpaid', + ]); + + $paidPendingUrl = '/admin/platform-orders?' . Arr::query([ + 'lead_id' => $leadId, + 'payment_status' => 'paid', + 'status' => 'pending', + ]); + + $bmpaUrl = '/admin/platform-orders?' . Arr::query([ + 'lead_id' => $leadId, + 'payment_status' => 'unpaid', + 'status' => 'pending', + ]); + + $syncableUrl = '/admin/platform-orders?' . Arr::query([ + 'lead_id' => $leadId, + 'syncable_only' => '1', + ]); + + $syncFailedUrl = '/admin/platform-orders?' . Arr::query([ + 'lead_id' => $leadId, + 'sync_status' => 'failed', + ]); + + $res->assertSee($unpaidUrl, false); + $res->assertSee($paidPendingUrl, false); + $res->assertSee($bmpaUrl, false); + $res->assertSee($syncableUrl, false); + $res->assertSee($syncFailedUrl, false); + } +}