feat(platform-orders): 同步状态摘要卡数字支持一键跳转筛选(含测试)
This commit is contained in:
@@ -124,7 +124,11 @@
|
||||
</div>
|
||||
<div class="card">
|
||||
<h3>已同步 / 未同步</h3>
|
||||
<div class="metric-number">{{ $summaryStats['synced_orders'] ?? 0 }} / {{ $summaryStats['unsynced_orders'] ?? 0 }}</div>
|
||||
<div class="metric-number">
|
||||
<a class="link" href="{{ request()->fullUrlWithQuery(['sync_status' => 'synced', 'page' => null]) }}">{{ $summaryStats['synced_orders'] ?? 0 }}</a>
|
||||
/
|
||||
<a class="link" href="{{ request()->fullUrlWithQuery(['sync_status' => 'unsynced', 'page' => null]) }}">{{ $summaryStats['unsynced_orders'] ?? 0 }}</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<h3>同步失败数</h3>
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature;
|
||||
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Tests\TestCase;
|
||||
|
||||
class AdminPlatformOrderSyncStatusSummaryCardLinksTest extends TestCase
|
||||
{
|
||||
use RefreshDatabase;
|
||||
|
||||
protected function loginAsPlatformAdmin(): void
|
||||
{
|
||||
$this->seed();
|
||||
|
||||
$this->post('/admin/login', [
|
||||
'email' => 'platform.admin@demo.local',
|
||||
'password' => 'Platform@123456',
|
||||
])->assertRedirect('/admin');
|
||||
}
|
||||
|
||||
public function test_platform_orders_page_shows_sync_status_summary_card_links(): void
|
||||
{
|
||||
$this->loginAsPlatformAdmin();
|
||||
|
||||
$this->get('/admin/platform-orders')
|
||||
->assertOk()
|
||||
->assertSee('已同步 / 未同步')
|
||||
->assertSee('sync_status=synced')
|
||||
->assertSee('sync_status=unsynced');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user