diff --git a/resources/views/admin/platform_orders/index.blade.php b/resources/views/admin/platform_orders/index.blade.php index de67b3c..4b30e7e 100644 --- a/resources/views/admin/platform_orders/index.blade.php +++ b/resources/views/admin/platform_orders/index.blade.php @@ -1068,7 +1068,21 @@
@if($batchMarkActivatedBlocked) -
提示:{{ $batchMarkActivatedBlockedReason }}
+
+
提示:{{ $batchMarkActivatedBlockedReason }}
+ @php + // 提效:当被阻断时给一键跳转到“待生效集合”的入口(口径:paid + pending + sync_status=unsynced)。 + // 说明:使用快捷筛选构造器,保留上下文(站点/套餐/订阅/keyword/lead/时间范围/back),并自动清空 page 与工具型开关。 + $goPaidPendingUnsyncedUrl = $buildQuickFilterUrl([ + 'payment_status' => 'paid', + 'status' => 'pending', + 'sync_status' => 'unsynced', + ]); + @endphp + +
@endif
diff --git a/tests/Feature/AdminPlatformOrderIndexBatchMarkActivatedBlockedHintShouldIncludeGoPendingLinkTest.php b/tests/Feature/AdminPlatformOrderIndexBatchMarkActivatedBlockedHintShouldIncludeGoPendingLinkTest.php new file mode 100644 index 0000000..f19d7d8 --- /dev/null +++ b/tests/Feature/AdminPlatformOrderIndexBatchMarkActivatedBlockedHintShouldIncludeGoPendingLinkTest.php @@ -0,0 +1,38 @@ +seed(); + + $this->post('/admin/login', [ + 'email' => 'platform.admin@demo.local', + 'password' => 'Platform@123456', + ])->assertRedirect('/admin'); + } + + public function test_blocked_hint_should_include_link_to_paid_pending_unsynced_set(): void + { + $this->loginAsPlatformAdmin(); + + // 构造一个会触发 batch_mark_activated 被阻断的筛选:缺少 sync_status=unsynced。 + $res = $this->get('/admin/platform-orders?payment_status=paid&status=pending'); + $res->assertOk(); + + $html = (string) $res->getContent(); + + $this->assertStringContainsString('data-role="batch-mark-activated-blocked-hint"', $html); + $this->assertStringContainsString('切到待生效集合', $html); + $this->assertStringContainsString('payment_status=paid', $html); + $this->assertStringContainsString('status=pending', $html); + $this->assertStringContainsString('sync_status=unsynced', $html); + } +}