refactor(platform-orders): extract blocked hint component for tool actions
This commit is contained in:
@@ -875,19 +875,20 @@
|
||||
<div class="mt-6">
|
||||
<button class="btn btn-sm" type="submit" @disabled($batchActivateBlocked) title="{{ $batchActivateBlockedReason }}">批量同步订阅(当前筛选范围)</button>
|
||||
@if($batchActivateBlocked)
|
||||
<div class="adm-tool-blocked-hint" data-role="batch-activate-subscriptions-blocked-hint">
|
||||
<div>提示:{{ $batchActivateBlockedReason }}</div>
|
||||
@php
|
||||
// 提效:被阻断时给一键跳转到「可同步订阅集合」(口径:syncable_only=1 + sync_status=unsynced)。
|
||||
$goSyncableUrl = $buildQuickFilterUrl([
|
||||
'syncable_only' => '1',
|
||||
'sync_status' => 'unsynced',
|
||||
]);
|
||||
@endphp
|
||||
<div class="mt-6 actions gap-10">
|
||||
<a class="btn btn-secondary btn-sm" href="{!! $goSyncableUrl !!}">切到可同步订阅集合</a>
|
||||
</div>
|
||||
</div>
|
||||
@php
|
||||
// 提效:被阻断时给一键跳转到「可同步订阅集合」(口径:syncable_only=1 + sync_status=unsynced)。
|
||||
$goSyncableUrl = $buildQuickFilterUrl([
|
||||
'syncable_only' => '1',
|
||||
'sync_status' => 'unsynced',
|
||||
]);
|
||||
@endphp
|
||||
@include('admin.components.tool_blocked_hint', [
|
||||
'dataRole' => 'batch-activate-subscriptions-blocked-hint',
|
||||
'reason' => $batchActivateBlockedReason,
|
||||
'actions' => [
|
||||
['label' => '切到可同步订阅集合', 'url' => $goSyncableUrl],
|
||||
],
|
||||
])
|
||||
@endif
|
||||
</div>
|
||||
</form>
|
||||
@@ -931,19 +932,20 @@
|
||||
<div class="mt-6">
|
||||
<button class="btn btn-sm" type="submit" @disabled($batchBmpaBlocked) title="{{ $batchBmpaBlockedReason }}">批量标记支付并生效(含订阅同步)(当前筛选范围)</button>
|
||||
@if($batchBmpaBlocked)
|
||||
<div class="adm-tool-blocked-hint" data-role="batch-bmpa-blocked-hint">
|
||||
<div>提示:{{ $batchBmpaBlockedReason }}</div>
|
||||
@php
|
||||
// 提效:被阻断时给一键跳转到「可BMPA处理集合」(口径:pending + unpaid)。
|
||||
$goBmpaProcessableUrl = $buildQuickFilterUrl([
|
||||
'status' => 'pending',
|
||||
'payment_status' => 'unpaid',
|
||||
]);
|
||||
@endphp
|
||||
<div class="mt-6 actions gap-10">
|
||||
<a class="btn btn-secondary btn-sm" href="{!! $goBmpaProcessableUrl !!}">切到可BMPA处理集合</a>
|
||||
</div>
|
||||
</div>
|
||||
@php
|
||||
// 提效:被阻断时给一键跳转到「可BMPA处理集合」(口径:pending + unpaid)。
|
||||
$goBmpaProcessableUrl = $buildQuickFilterUrl([
|
||||
'status' => 'pending',
|
||||
'payment_status' => 'unpaid',
|
||||
]);
|
||||
@endphp
|
||||
@include('admin.components.tool_blocked_hint', [
|
||||
'dataRole' => 'batch-bmpa-blocked-hint',
|
||||
'reason' => $batchBmpaBlockedReason,
|
||||
'actions' => [
|
||||
['label' => '切到可BMPA处理集合', 'url' => $goBmpaProcessableUrl],
|
||||
],
|
||||
])
|
||||
@endif
|
||||
</div>
|
||||
</form>
|
||||
@@ -987,21 +989,22 @@
|
||||
<div class="mt-6">
|
||||
<button class="btn btn-sm" type="submit" @disabled($batchMarkActivatedBlocked) title="{{ $batchMarkActivatedBlockedReason }}">批量仅标记为已生效(当前筛选范围)</button>
|
||||
@if($batchMarkActivatedBlocked)
|
||||
<div class="adm-tool-blocked-hint" data-role="batch-mark-activated-blocked-hint">
|
||||
<div>提示:{{ $batchMarkActivatedBlockedReason }}</div>
|
||||
@php
|
||||
// 提效:当被阻断时给一键跳转到“待生效集合”的入口(口径:paid + pending + sync_status=unsynced)。
|
||||
// 说明:使用快捷筛选构造器,保留上下文(站点/套餐/订阅/keyword/lead/时间范围/back),并自动清空 page 与工具型开关。
|
||||
$goPaidPendingUnsyncedUrl = $buildQuickFilterUrl([
|
||||
'payment_status' => 'paid',
|
||||
'status' => 'pending',
|
||||
'sync_status' => 'unsynced',
|
||||
]);
|
||||
@endphp
|
||||
<div class="mt-6 actions gap-10">
|
||||
<a class="btn btn-secondary btn-sm" href="{!! $goPaidPendingUnsyncedUrl !!}">切到待生效集合</a>
|
||||
</div>
|
||||
</div>
|
||||
@php
|
||||
// 提效:当被阻断时给一键跳转到“待生效集合”的入口(口径:paid + pending + sync_status=unsynced)。
|
||||
// 说明:使用快捷筛选构造器,保留上下文(站点/套餐/订阅/keyword/lead/时间范围/back),并自动清空 page 与工具型开关。
|
||||
$goPaidPendingUnsyncedUrl = $buildQuickFilterUrl([
|
||||
'payment_status' => 'paid',
|
||||
'status' => 'pending',
|
||||
'sync_status' => 'unsynced',
|
||||
]);
|
||||
@endphp
|
||||
@include('admin.components.tool_blocked_hint', [
|
||||
'dataRole' => 'batch-mark-activated-blocked-hint',
|
||||
'reason' => $batchMarkActivatedBlockedReason,
|
||||
'actions' => [
|
||||
['label' => '切到待生效集合', 'url' => $goPaidPendingUnsyncedUrl],
|
||||
],
|
||||
])
|
||||
@endif
|
||||
</div>
|
||||
</form>
|
||||
@@ -1037,18 +1040,19 @@
|
||||
<div class="mt-6">
|
||||
<button class="btn btn-danger btn-sm" type="submit" @disabled($clearSyncBlocked) title="{{ $clearSyncBlockedReason }}">清除同步失败标记(当前筛选范围)</button>
|
||||
@if($clearSyncBlocked)
|
||||
<div class="adm-tool-blocked-hint" data-role="clear-sync-errors-blocked-hint">
|
||||
<div>提示:{{ $clearSyncBlockedReason }}</div>
|
||||
@php
|
||||
// 提效:清理同步失败标记前必须先锁定失败集合;被阻断时给一键跳转入口。
|
||||
$goSyncFailedUrl = $buildQuickFilterUrl([
|
||||
'sync_status' => 'failed',
|
||||
]);
|
||||
@endphp
|
||||
<div class="mt-6 actions gap-10">
|
||||
<a class="btn btn-secondary btn-sm" href="{!! $goSyncFailedUrl !!}">切到同步失败集合</a>
|
||||
</div>
|
||||
</div>
|
||||
@php
|
||||
// 提效:清理同步失败标记前必须先锁定失败集合;被阻断时给一键跳转入口。
|
||||
$goSyncFailedUrl = $buildQuickFilterUrl([
|
||||
'sync_status' => 'failed',
|
||||
]);
|
||||
@endphp
|
||||
@include('admin.components.tool_blocked_hint', [
|
||||
'dataRole' => 'clear-sync-errors-blocked-hint',
|
||||
'reason' => $clearSyncBlockedReason,
|
||||
'actions' => [
|
||||
['label' => '切到同步失败集合', 'url' => $goSyncFailedUrl],
|
||||
],
|
||||
])
|
||||
@endif
|
||||
</div>
|
||||
</form>
|
||||
@@ -1083,18 +1087,19 @@
|
||||
<div class="mt-6">
|
||||
<button class="btn btn-danger btn-sm" type="submit" @disabled($clearBmpaBlocked) title="{{ $clearBmpaBlockedReason }}">清除批量标记支付失败标记(当前筛选范围)</button>
|
||||
@if($clearBmpaBlocked)
|
||||
<div class="adm-tool-blocked-hint" data-role="clear-bmpa-errors-blocked-hint">
|
||||
<div>提示:{{ $clearBmpaBlockedReason }}</div>
|
||||
@php
|
||||
// 提效:清理 BMPA 失败标记前必须先锁定 BMPA 失败集合;被阻断时给一键跳转入口。
|
||||
$goBmpaFailedUrl = $buildQuickFilterUrl([
|
||||
'bmpa_failed_only' => '1',
|
||||
]);
|
||||
@endphp
|
||||
<div class="mt-6 actions gap-10">
|
||||
<a class="btn btn-secondary btn-sm" href="{!! $goBmpaFailedUrl !!}">切到 BMPA 失败集合</a>
|
||||
</div>
|
||||
</div>
|
||||
@php
|
||||
// 提效:清理 BMPA 失败标记前必须先锁定 BMPA 失败集合;被阻断时给一键跳转入口。
|
||||
$goBmpaFailedUrl = $buildQuickFilterUrl([
|
||||
'bmpa_failed_only' => '1',
|
||||
]);
|
||||
@endphp
|
||||
@include('admin.components.tool_blocked_hint', [
|
||||
'dataRole' => 'clear-bmpa-errors-blocked-hint',
|
||||
'reason' => $clearBmpaBlockedReason,
|
||||
'actions' => [
|
||||
['label' => '切到 BMPA 失败集合', 'url' => $goBmpaFailedUrl],
|
||||
],
|
||||
])
|
||||
@endif
|
||||
</div>
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user