feat(admin): 待生效入口锁定 unsynced(与仪表盘计数口径一致)

This commit is contained in:
萝卜
2026-03-15 20:11:31 +08:00
parent 3484402ea8
commit 573c1997a6
3 changed files with 4 additions and 3 deletions

View File

@@ -19,7 +19,8 @@
$platformOrdersQuickLinks = [
'unpaid_pending' => \App\Support\BackUrl::withBack('/admin/platform-orders?payment_status=unpaid&status=pending', $safeBackForLinks),
'paid_pending' => \App\Support\BackUrl::withBack('/admin/platform-orders?payment_status=paid&status=pending', $safeBackForLinks),
// 待生效:paid + pending,并显式锁定 sync_status=unsynced排除同步失败等异常单
'paid_pending' => \App\Support\BackUrl::withBack('/admin/platform-orders?payment_status=paid&status=pending&sync_status=unsynced', $safeBackForLinks),
'syncable_only' => \App\Support\BackUrl::withBack('/admin/platform-orders?syncable_only=1', $safeBackForLinks),
'sync_failed' => \App\Support\BackUrl::withBack('/admin/platform-orders?sync_status=failed', $safeBackForLinks),
];

View File

@@ -29,7 +29,7 @@ class AdminDashboardBillingWorkbenchQuickLinksShouldUseBackUrlTest extends TestC
// 期望:链接里带 back=%2Fadmin%2Fplans 且 & 不被 escape 成 &
$res->assertSee('href="/admin/platform-orders?payment_status=unpaid&status=pending&back=%2Fadmin%2Fplans"', false);
$res->assertSee('href="/admin/platform-orders?payment_status=paid&status=pending&back=%2Fadmin%2Fplans"', false);
$res->assertSee('href="/admin/platform-orders?payment_status=paid&status=pending&sync_status=unsynced&back=%2Fadmin%2Fplans"', false);
$res->assertSee('href="/admin/platform-orders?syncable_only=1&back=%2Fadmin%2Fplans"', false);
$res->assertSee('href="/admin/platform-orders?sync_status=failed&back=%2Fadmin%2Fplans"', false);

View File

@@ -31,7 +31,7 @@ class AdminDashboardBillingWorkbenchQuickLinksTest extends TestCase
$res->assertSee('href="/admin/platform-orders?payment_status=unpaid&status=pending"', false);
$res->assertSee('待支付');
$res->assertSee('href="/admin/platform-orders?payment_status=paid&status=pending"', false);
$res->assertSee('href="/admin/platform-orders?payment_status=paid&status=pending&sync_status=unsynced"', false);
$res->assertSee('待生效');
$res->assertSee('href="/admin/platform-orders?syncable_only=1"', false);