diff --git a/resources/views/admin/platform_orders/index.blade.php b/resources/views/admin/platform_orders/index.blade.php index 4b30e7e..5fd044b 100644 --- a/resources/views/admin/platform_orders/index.blade.php +++ b/resources/views/admin/platform_orders/index.blade.php @@ -916,7 +916,19 @@
@if($batchActivateBlocked) -
提示:{{ $batchActivateBlockedReason }}
+
+
提示:{{ $batchActivateBlockedReason }}
+ @php + // 提效:被阻断时给一键跳转到「可同步订阅集合」(口径:syncable_only=1 + sync_status=unsynced)。 + $goSyncableUrl = $buildQuickFilterUrl([ + 'syncable_only' => '1', + 'sync_status' => 'unsynced', + ]); + @endphp + +
@endif
diff --git a/tests/Feature/AdminPlatformOrderIndexBatchActivateBlockedHintShouldIncludeGoSyncableLinkTest.php b/tests/Feature/AdminPlatformOrderIndexBatchActivateBlockedHintShouldIncludeGoSyncableLinkTest.php new file mode 100644 index 0000000..4bcc9c8 --- /dev/null +++ b/tests/Feature/AdminPlatformOrderIndexBatchActivateBlockedHintShouldIncludeGoSyncableLinkTest.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_syncable_only_unsynced_set(): void + { + $this->loginAsPlatformAdmin(); + + // 构造一个会触发 batch_activate_subscriptions 被阻断的筛选:未勾选 syncable_only。 + $res = $this->get('/admin/platform-orders'); + $res->assertOk(); + + $html = (string) $res->getContent(); + + $this->assertStringContainsString('data-role="batch-activate-subscriptions-blocked-hint"', $html); + $this->assertStringContainsString('切到可同步订阅集合', $html); + $this->assertStringContainsString('syncable_only=1', $html); + $this->assertStringContainsString('sync_status=unsynced', $html); + } +}