From 537c1e093c49e8f73c179d53224aa918795f030a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=90=9D=E5=8D=9C?= Date: Tue, 17 Mar 2026 05:49:14 +0800 Subject: [PATCH] ui(governance): add go-scope shortcuts for clear-error blocked hints --- .../admin/platform_orders/index.blade.php | 26 ++++++++++++-- ...dHintShouldIncludeGoBmpaFailedLinkTest.php | 36 +++++++++++++++++++ ...ockedHintShouldIncludeGoFailedLinkTest.php | 36 +++++++++++++++++++ 3 files changed, 96 insertions(+), 2 deletions(-) create mode 100644 tests/Feature/AdminPlatformOrderIndexClearBmpaBlockedHintShouldIncludeGoBmpaFailedLinkTest.php create mode 100644 tests/Feature/AdminPlatformOrderIndexClearSyncBlockedHintShouldIncludeGoFailedLinkTest.php diff --git a/resources/views/admin/platform_orders/index.blade.php b/resources/views/admin/platform_orders/index.blade.php index 772db32..a589174 100644 --- a/resources/views/admin/platform_orders/index.blade.php +++ b/resources/views/admin/platform_orders/index.blade.php @@ -1163,7 +1163,18 @@
@if($clearSyncBlocked) -
提示:{{ $clearSyncBlockedReason }}
+
+
提示:{{ $clearSyncBlockedReason }}
+ @php + // 提效:清理同步失败标记前必须先锁定失败集合;被阻断时给一键跳转入口。 + $goSyncFailedUrl = $buildQuickFilterUrl([ + 'sync_status' => 'failed', + ]); + @endphp + +
@endif
@@ -1219,7 +1230,18 @@
@if($clearBmpaBlocked) -
提示:{{ $clearBmpaBlockedReason }}
+
+
提示:{{ $clearBmpaBlockedReason }}
+ @php + // 提效:清理 BMPA 失败标记前必须先锁定 BMPA 失败集合;被阻断时给一键跳转入口。 + $goBmpaFailedUrl = $buildQuickFilterUrl([ + 'bmpa_failed_only' => '1', + ]); + @endphp + +
@endif
diff --git a/tests/Feature/AdminPlatformOrderIndexClearBmpaBlockedHintShouldIncludeGoBmpaFailedLinkTest.php b/tests/Feature/AdminPlatformOrderIndexClearBmpaBlockedHintShouldIncludeGoBmpaFailedLinkTest.php new file mode 100644 index 0000000..9ae82e4 --- /dev/null +++ b/tests/Feature/AdminPlatformOrderIndexClearBmpaBlockedHintShouldIncludeGoBmpaFailedLinkTest.php @@ -0,0 +1,36 @@ +seed(); + + $this->post('/admin/login', [ + 'email' => 'platform.admin@demo.local', + 'password' => 'Platform@123456', + ])->assertRedirect('/admin'); + } + + public function test_blocked_hint_should_include_link_to_bmpa_failed_set(): void + { + $this->loginAsPlatformAdmin(); + + // 构造一个会触发 clear_bmpa_errors 被阻断的筛选:不在 BMPA 失败集合。 + $res = $this->get('/admin/platform-orders'); + $res->assertOk(); + + $html = (string) $res->getContent(); + + $this->assertStringContainsString('data-role="clear-bmpa-errors-blocked-hint"', $html); + $this->assertStringContainsString('切到 BMPA 失败集合', $html); + $this->assertStringContainsString('bmpa_failed_only=1', $html); + } +} diff --git a/tests/Feature/AdminPlatformOrderIndexClearSyncBlockedHintShouldIncludeGoFailedLinkTest.php b/tests/Feature/AdminPlatformOrderIndexClearSyncBlockedHintShouldIncludeGoFailedLinkTest.php new file mode 100644 index 0000000..2ada8fa --- /dev/null +++ b/tests/Feature/AdminPlatformOrderIndexClearSyncBlockedHintShouldIncludeGoFailedLinkTest.php @@ -0,0 +1,36 @@ +seed(); + + $this->post('/admin/login', [ + 'email' => 'platform.admin@demo.local', + 'password' => 'Platform@123456', + ])->assertRedirect('/admin'); + } + + public function test_blocked_hint_should_include_link_to_sync_failed_set(): void + { + $this->loginAsPlatformAdmin(); + + // 构造一个会触发 clear_sync_errors 被阻断的筛选:不在失败集合。 + $res = $this->get('/admin/platform-orders'); + $res->assertOk(); + + $html = (string) $res->getContent(); + + $this->assertStringContainsString('data-role="clear-sync-errors-blocked-hint"', $html); + $this->assertStringContainsString('切到同步失败集合', $html); + $this->assertStringContainsString('sync_status=failed', $html); + } +}