平台订单列表:治理提示块改用 CSS 组件样式并加护栏测试
This commit is contained in:
@@ -480,8 +480,10 @@
|
|||||||
@endphp
|
@endphp
|
||||||
|
|
||||||
@if($hasReconcileMismatchFilter || $hasRefundInconsistentFilter)
|
@if($hasReconcileMismatchFilter || $hasRefundInconsistentFilter)
|
||||||
<div class="muted text-danger mb-10">
|
<div class="card governance-block mb-10">
|
||||||
提示:当前筛选包含
|
<div class="muted text-danger governance-block-title"><strong>工具动作治理提示</strong></div>
|
||||||
|
<div class="muted governance-block-body">
|
||||||
|
当前筛选包含
|
||||||
@if($hasReconcileMismatchFilter)
|
@if($hasReconcileMismatchFilter)
|
||||||
<a class="link" href="{{ request()->fullUrlWithQuery(['reconcile_mismatch' => '1', 'page' => null]) }}">对账不一致</a>
|
<a class="link" href="{{ request()->fullUrlWithQuery(['reconcile_mismatch' => '1', 'page' => null]) }}">对账不一致</a>
|
||||||
@endif
|
@endif
|
||||||
@@ -493,31 +495,41 @@
|
|||||||
@endif
|
@endif
|
||||||
。建议先完成金额/状态治理(补回执/核对退款/修正状态)后,再执行批量同步订阅等工具动作。
|
。建议先完成金额/状态治理(补回执/核对退款/修正状态)后,再执行批量同步订阅等工具动作。
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
@if($hasSyncableOnlyFilter)
|
@if($hasSyncableOnlyFilter)
|
||||||
<div class="muted text-danger mb-10">
|
<div class="card governance-block mb-10">
|
||||||
注意:当前同时勾选了「只看可同步」—— 这类订单会被批量同步订阅命中。若仍存在对账/退款异常,建议先进入治理集合处理完毕,再回到可同步集合执行批量同步。
|
<div class="muted text-danger governance-block-title"><strong>提示</strong></div>
|
||||||
|
<div class="muted governance-block-body">
|
||||||
|
当前同时勾选了「只看可同步」—— 这类订单会被批量同步订阅命中。若仍存在对账/退款异常,建议先进入治理集合处理完毕,再回到可同步集合执行批量同步。
|
||||||
<a class="link" href="{{ request()->fullUrlWithQuery(['syncable_only' => null, 'page' => null]) }}">先去治理(取消只看可同步)</a>
|
<a class="link" href="{{ request()->fullUrlWithQuery(['syncable_only' => null, 'page' => null]) }}">先去治理(取消只看可同步)</a>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
@endif
|
@endif
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@if($hasSyncFailedFilter)
|
@if($hasSyncFailedFilter)
|
||||||
<div class="muted text-danger mb-10">
|
<div class="card governance-block mb-10">
|
||||||
提示:当前筛选包含「同步失败/失败原因」范围。建议先治理失败原因(修复数据或重试同步),再执行批量同步订阅等工具动作。
|
<div class="muted text-danger governance-block-title"><strong>同步失败治理提示</strong></div>
|
||||||
|
<div class="muted governance-block-body">
|
||||||
|
当前筛选包含「同步失败/失败原因」范围。建议先治理失败原因(修复数据或重试同步),再执行批量同步订阅等工具动作。
|
||||||
<a class="link" href="{{ request()->fullUrlWithQuery(['sync_status' => 'failed', 'page' => null]) }}">进入同步失败集合</a>
|
<a class="link" href="{{ request()->fullUrlWithQuery(['sync_status' => 'failed', 'page' => null]) }}">进入同步失败集合</a>
|
||||||
<span class="muted">|</span>
|
<span class="muted">|</span>
|
||||||
<a class="link" href="{{ request()->fullUrlWithQuery(['syncable_only' => '1', 'page' => null]) }}">切到只看可同步(用于批量重试同步)</a>
|
<a class="link" href="{{ request()->fullUrlWithQuery(['syncable_only' => '1', 'page' => null]) }}">切到只看可同步(用于批量重试同步)</a>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@if($hasBmpaFailedFilter)
|
@if($hasBmpaFailedFilter)
|
||||||
<div class="muted text-danger mb-10">
|
<div class="card governance-block mb-10">
|
||||||
提示:当前筛选包含「批量标记支付并生效失败/失败原因」范围。建议先补齐回执/核对退款/修正状态后,再切到 pending+unpaid 集合重试批量标记支付。
|
<div class="muted text-danger governance-block-title"><strong>BMPA 失败治理提示</strong></div>
|
||||||
|
<div class="muted governance-block-body">
|
||||||
|
当前筛选包含「批量标记支付并生效失败/失败原因」范围。建议先补齐回执/核对退款/修正状态后,再切到 pending+unpaid 集合重试批量标记支付。
|
||||||
<a class="link" href="{{ request()->fullUrlWithQuery(['bmpa_failed_only' => '1', 'page' => null]) }}">进入批量标记支付失败集合</a>
|
<a class="link" href="{{ request()->fullUrlWithQuery(['bmpa_failed_only' => '1', 'page' => null]) }}">进入批量标记支付失败集合</a>
|
||||||
<span class="muted">|</span>
|
<span class="muted">|</span>
|
||||||
<a class="link" href="{{ request()->fullUrlWithQuery(['status' => 'pending', 'payment_status' => 'unpaid', 'page' => null]) }}">切到 pending+unpaid(用于重试)</a>
|
<a class="link" href="{{ request()->fullUrlWithQuery(['status' => 'pending', 'payment_status' => 'unpaid', 'page' => null]) }}">切到 pending+unpaid(用于重试)</a>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
<form method="get" action="/admin/platform-orders/export" class="mb-10">
|
<form method="get" action="/admin/platform-orders/export" class="mb-10">
|
||||||
|
|||||||
@@ -0,0 +1,38 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Tests\Feature;
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||||
|
use Tests\TestCase;
|
||||||
|
|
||||||
|
class AdminPlatformOrderIndexGovernanceBlocksUseCssComponentTest 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_index_should_render_governance_blocks_with_css_component_class_when_filters_present(): void
|
||||||
|
{
|
||||||
|
$this->loginAsPlatformAdmin();
|
||||||
|
|
||||||
|
$res = $this->get('/admin/platform-orders?reconcile_mismatch=1&syncable_only=1&sync_status=failed&bmpa_failed_only=1');
|
||||||
|
$res->assertOk();
|
||||||
|
|
||||||
|
// 只要命中任一治理提示,页面应使用治理组件 class(避免再次写回 inline style)
|
||||||
|
$res->assertSee('governance-block', false);
|
||||||
|
$res->assertSee('governance-block-title', false);
|
||||||
|
$res->assertSee('governance-block-body', false);
|
||||||
|
|
||||||
|
$res->assertSee('工具动作治理提示', false);
|
||||||
|
$res->assertSee('同步失败治理提示', false);
|
||||||
|
$res->assertSee('BMPA 失败治理提示', false);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user