From 3e2e0ad04669345e420ab717a4cebacc1ae494ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=90=9D=E5=8D=9C?= Date: Tue, 17 Mar 2026 05:46:57 +0800 Subject: [PATCH] ui(governance): add go-processable shortcut in batch bmpa blocked hint --- .../admin/platform_orders/index.blade.php | 14 ++++++- ...HintShouldIncludeGoProcessableLinkTest.php | 37 +++++++++++++++++++ 2 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 tests/Feature/AdminPlatformOrderIndexBatchBmpaBlockedHintShouldIncludeGoProcessableLinkTest.php diff --git a/resources/views/admin/platform_orders/index.blade.php b/resources/views/admin/platform_orders/index.blade.php index 5fd044b..772db32 100644 --- a/resources/views/admin/platform_orders/index.blade.php +++ b/resources/views/admin/platform_orders/index.blade.php @@ -1015,7 +1015,19 @@
@if($batchBmpaBlocked) -
提示:{{ $batchBmpaBlockedReason }}
+
+
提示:{{ $batchBmpaBlockedReason }}
+ @php + // 提效:被阻断时给一键跳转到「可BMPA处理集合」(口径:pending + unpaid)。 + $goBmpaProcessableUrl = $buildQuickFilterUrl([ + 'status' => 'pending', + 'payment_status' => 'unpaid', + ]); + @endphp + +
@endif
diff --git a/tests/Feature/AdminPlatformOrderIndexBatchBmpaBlockedHintShouldIncludeGoProcessableLinkTest.php b/tests/Feature/AdminPlatformOrderIndexBatchBmpaBlockedHintShouldIncludeGoProcessableLinkTest.php new file mode 100644 index 0000000..577483b --- /dev/null +++ b/tests/Feature/AdminPlatformOrderIndexBatchBmpaBlockedHintShouldIncludeGoProcessableLinkTest.php @@ -0,0 +1,37 @@ +seed(); + + $this->post('/admin/login', [ + 'email' => 'platform.admin@demo.local', + 'password' => 'Platform@123456', + ])->assertRedirect('/admin'); + } + + public function test_blocked_hint_should_include_link_to_pending_unpaid_set(): void + { + $this->loginAsPlatformAdmin(); + + // 构造一个会触发 batch_bmpa 被阻断的筛选:不给 pending+unpaid。 + $res = $this->get('/admin/platform-orders'); + $res->assertOk(); + + $html = (string) $res->getContent(); + + $this->assertStringContainsString('data-role="batch-bmpa-blocked-hint"', $html); + $this->assertStringContainsString('切到可BMPA处理集合', $html); + $this->assertStringContainsString('status=pending', $html); + $this->assertStringContainsString('payment_status=unpaid', $html); + } +}