补充平台订单快捷筛选分组锚点

This commit is contained in:
萝卜
2026-03-19 03:39:10 +08:00
parent 85540ea4a0
commit 2365afd741
2 changed files with 37 additions and 3 deletions

View File

@@ -343,7 +343,7 @@
$allUrl = \App\Support\BackUrl::withBack('/admin/platform-orders', $safeBackForLinks);
@endphp
<div class="inline-links">
<div class="inline-links" data-role="po-quickfilter-primary-group">
<a data-role="po-quickfilter-all" href="{!! $allUrl !!}" class="muted">全部</a>
<a data-role="po-quickfilter-unpaid" href="{!! $buildQuickFilterUrl(['payment_status' => 'unpaid']) !!}" class="muted">待支付</a>
<a data-role="po-quickfilter-bmpa-processable" href="{!! $buildQuickFilterUrl(['bmpa_processable_only' => '1']) !!}" class="muted">可BMPA处理</a>
@@ -355,7 +355,7 @@
<a data-role="po-quickfilter-renewal-missing-sub" href="{!! $buildQuickFilterUrl(['renewal_missing_subscription' => '1']) !!}" class="muted">续费缺订阅</a>
</div>
<div class="inline-links mt-6">
<div class="inline-links mt-6" data-role="po-quickfilter-receipt-refund-group">
<a data-role="po-quickfilter-receipt-has" href="{!! $buildQuickFilterUrl(['receipt_status' => 'has']) !!}" class="muted">有回执</a>
<a data-role="po-quickfilter-paid-no-receipt" href="{!! $buildQuickFilterUrl(['payment_status' => 'paid', 'receipt_status' => 'none']) !!}" class="muted">已付无回执</a>
<a data-role="po-quickfilter-refund-has" href="{!! $buildQuickFilterUrl(['refund_status' => 'has']) !!}" class="muted">有退款</a>
@@ -364,7 +364,7 @@
<a data-role="po-quickfilter-refunded" href="{!! $buildQuickFilterUrl(['payment_status' => 'refunded']) !!}" class="muted">已退款</a>
</div>
<div class="inline-links mt-6">
<div class="inline-links mt-6" data-role="po-quickfilter-governance-batch-group">
<a data-role="po-quickfilter-reconcile-mismatch" href="{!! $buildQuickFilterUrl(['reconcile_mismatch' => '1']) !!}" class="muted">对账不一致</a>
<a data-role="po-quickfilter-refund-inconsistent" href="{!! $buildQuickFilterUrl(['refund_inconsistent' => '1']) !!}" class="muted">退款不一致</a>
<a data-role="po-quickfilter-batch-synced-24h" href="{!! $buildQuickFilterUrl(['batch_synced_24h' => '1']) !!}" class="muted">近24小时批量同步</a>

View File

@@ -0,0 +1,34 @@
<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class AdminPlatformOrderQuickFiltersGroupsShouldHaveDataRoleTest 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_quick_filter_groups_should_have_data_role(): void
{
$this->loginAsPlatformAdmin();
$res = $this->get('/admin/platform-orders');
$res->assertOk();
$html = (string) $res->getContent();
$this->assertStringContainsString('data-role="po-quickfilter-primary-group"', $html);
$this->assertStringContainsString('data-role="po-quickfilter-receipt-refund-group"', $html);
$this->assertStringContainsString('data-role="po-quickfilter-governance-batch-group"', $html);
}
}