docs(dashboard): 治理风险mini bars增加口径说明并加护栏

This commit is contained in:
萝卜
2026-03-17 19:28:59 +08:00
parent 78424a213d
commit 4e973b7337
2 changed files with 39 additions and 0 deletions

View File

@@ -390,6 +390,7 @@
<div class="mt-10" data-role="dashboard-po-governance-bars">
<div class="muted muted-xs">治理风险占比(相对平台订单总量 {{ $poTotal }}</div>
<div class="muted muted-xs">口径说明:同步失败=meta.subscription_activation_error.message 存在BMPA失败=meta.batch_mark_paid_and_activate_error.message 存在;无回执=已支付但缺 payment_receipts对账不一致=回执汇总金额与 paid_amount 不一致;退款不一致=退款汇总与退款状态不一致;续费缺订阅=renewal site_subscription_id 为空。</div>
@include('admin.components.mini_bar_row', [
'class' => 'mt-6',

View File

@@ -0,0 +1,38 @@
<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class AdminDashboardPlatformOrderGovernanceBarsShouldExplainMetricsTest 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_dashboard_should_render_platform_order_governance_explanation_text(): void
{
$this->loginAsPlatformAdmin();
$res = $this->get('/admin');
$res->assertOk();
$res->assertSee('治理风险占比');
$res->assertSee('口径说明');
$res->assertSee('同步失败=meta.subscription_activation_error.message');
$res->assertSee('BMPA失败=meta.batch_mark_paid_and_activate_error.message');
$res->assertSee('无回执=已支付但缺 payment_receipts');
$res->assertSee('对账不一致=回执汇总金额与 paid_amount 不一致');
$res->assertSee('退款不一致=退款汇总与退款状态不一致');
$res->assertSee('续费缺订阅=renewal 但 site_subscription_id 为空');
}
}