补强已付无回执主动作结构锚点
This commit is contained in:
@@ -1 +1 @@
|
||||
<a @if(!empty($ariaLabel ?? '')) aria-label="{{ $ariaLabel }}" @endif class="{{ $class ?? 'btn btn-secondary btn-sm' }}" href="{{ $href ?? '#' }}">{{ $label ?? '' }}</a>
|
||||
<a @if(!empty($role ?? '')) data-role="{{ $role }}" @endif @if(!empty($ariaLabel ?? '')) aria-label="{{ $ariaLabel }}" @endif class="{{ $class ?? 'btn btn-secondary btn-sm' }}" href="{{ $href ?? '#' }}">{{ $label ?? '' }}</a>
|
||||
|
||||
@@ -1061,6 +1061,7 @@
|
||||
。建议先完成金额/状态治理(补回执/核对退款/修正状态)后,再执行批量同步订阅等工具动作。
|
||||
<div class="mt-6 actions gap-10">
|
||||
@include('admin.platform_orders._tool_anchor_button', [
|
||||
'role' => 'po-tools-paid-no-receipt-focus-batch-activate',
|
||||
'href' => '#batch-activate-subscriptions',
|
||||
'label' => '定位到批量同步订阅工具',
|
||||
'ariaLabel' => '定位到批量同步订阅工具',
|
||||
@@ -1093,6 +1094,7 @@
|
||||
当前集合为「已付无回执」且已勾选「只看可同步」。为保证收费闭环可治理,建议先补齐支付回执留痕,再执行批量同步订阅。
|
||||
<div class="mt-6 actions gap-10">
|
||||
@include('admin.platform_orders._tool_anchor_button', [
|
||||
'role' => 'po-tools-paid-no-receipt-focus-batch-activate',
|
||||
'href' => '#batch-activate-subscriptions',
|
||||
'label' => '定位到批量同步订阅工具',
|
||||
'ariaLabel' => '定位到批量同步订阅工具',
|
||||
@@ -1126,6 +1128,7 @@
|
||||
当前筛选包含「同步失败/失败原因」范围。建议先治理失败原因(修复数据或重试同步),再执行批量同步订阅等工具动作。
|
||||
<div class="mt-6 actions gap-10">
|
||||
@include('admin.platform_orders._tool_anchor_button', [
|
||||
'role' => 'po-tools-paid-no-receipt-focus-batch-activate',
|
||||
'href' => '#batch-activate-subscriptions',
|
||||
'label' => '定位到批量同步订阅工具',
|
||||
'ariaLabel' => '定位到批量同步订阅工具',
|
||||
@@ -1193,8 +1196,8 @@
|
||||
$toolGuards = $toolGuards ?? \App\Support\PlatformOrderToolsGuard::forIndex((array) ($filters ?? []));
|
||||
@endphp
|
||||
|
||||
<div class="tool-grid">
|
||||
<div class="tool-group focus-box">
|
||||
<div class="tool-grid" data-role="po-tools-grid" aria-label="平台订单工具区网格">
|
||||
<div class="tool-group focus-box" data-role="po-tools-group-export" aria-label="平台订单导出工具组">
|
||||
<div class="tool-group-title">导出</div>
|
||||
<form method="get" action="/admin/platform-orders/export" class="mb-0">
|
||||
<input type="hidden" name="download" value="1">
|
||||
@@ -1211,7 +1214,7 @@
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="tool-group focus-box" id="batch-activate-subscriptions">
|
||||
<div class="tool-group focus-box" id="batch-activate-subscriptions" data-role="po-tools-group-batch-activate-subscriptions" aria-label="平台订单批量同步订阅工具组">
|
||||
<div class="tool-group-title">批量同步订阅</div>
|
||||
@php
|
||||
$batchActivateBlocked = (bool) ($toolGuards['batch_activate_subscriptions']['blocked'] ?? false);
|
||||
@@ -1267,7 +1270,7 @@
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="tool-group focus-box">
|
||||
<div class="tool-group focus-box" data-role="po-tools-group-batch-bmpa" aria-label="平台订单批量标记支付并生效工具组">
|
||||
<div class="tool-group-title">批量标记支付并生效(BMPA)</div>
|
||||
@php
|
||||
$batchBmpaBlocked = (bool) ($toolGuards['batch_bmpa']['blocked'] ?? false);
|
||||
@@ -1322,7 +1325,7 @@
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="tool-group focus-box">
|
||||
<div class="tool-group focus-box" data-role="po-tools-group-batch-mark-activated" aria-label="平台订单批量仅标记为已生效工具组">
|
||||
<div class="tool-group-title">批量仅标记为已生效</div>
|
||||
@php
|
||||
$batchMarkActivatedBlocked = (bool) ($toolGuards['batch_mark_activated']['blocked'] ?? false);
|
||||
@@ -1380,7 +1383,7 @@
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="tool-group focus-box">
|
||||
<div class="tool-group focus-box" data-role="po-tools-group-clear-sync-errors" aria-label="平台订单清理同步失败标记工具组">
|
||||
<div class="tool-group-title">清理失败标记:同步订阅</div>
|
||||
@php
|
||||
$clearSyncBlocked = (bool) ($toolGuards['clear_sync_errors']['blocked'] ?? false);
|
||||
@@ -1428,7 +1431,7 @@
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="tool-group focus-box">
|
||||
<div class="tool-group focus-box" data-role="po-tools-group-clear-bmpa-errors" aria-label="平台订单清理批量BMPA失败标记工具组">
|
||||
<div class="tool-group-title">清理失败标记:批量 BMPA</div>
|
||||
@php
|
||||
$clearBmpaBlocked = (bool) ($toolGuards['clear_bmpa_errors']['blocked'] ?? false);
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature;
|
||||
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Tests\TestCase;
|
||||
|
||||
class AdminPlatformOrderToolsPaidNoReceiptHintPrimaryActionShouldHaveDataRoleTest 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_tools_paid_no_receipt_hint_primary_action_should_have_data_role(): void
|
||||
{
|
||||
$this->loginAsPlatformAdmin();
|
||||
|
||||
$res = $this->get('/admin/platform-orders?syncable_only=1&receipt_status=none');
|
||||
$res->assertOk();
|
||||
|
||||
$html = (string) $res->getContent();
|
||||
$this->assertStringContainsString('data-role="po-tools-paid-no-receipt-focus-batch-activate"', $html);
|
||||
$this->assertStringContainsString('定位到批量同步订阅工具', $html);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user