refactor(site-subscriptions): reuse blocked hint component for batch mark expired

This commit is contained in:
萝卜
2026-03-17 09:54:55 +08:00
parent 28e9e3bbe8
commit 9873b1efff

View File

@@ -427,17 +427,18 @@
<div> <div>
<button class="btn btn-danger btn-sm" type="submit" @disabled(! $batchMarkExpiredEnabled) title="{{ $batchMarkExpiredReason }}">批量标记已过期(当前集合)</button> <button class="btn btn-danger btn-sm" type="submit" @disabled(! $batchMarkExpiredEnabled) title="{{ $batchMarkExpiredReason }}">批量标记已过期(当前集合)</button>
@if(! $batchMarkExpiredEnabled) @if(! $batchMarkExpiredEnabled)
<div class="adm-tool-blocked-hint" data-role="batch-mark-expired-blocked-hint">
<div>提示:{{ $batchMarkExpiredReason }}</div>
@php @php
// 提效被阻断时给一键跳转到「已过期expiry=expired」集合避免运营来回找入口。 // 提效被阻断时给一键跳转到「已过期expiry=expired」集合避免运营来回找入口。
// 说明:这里选择保留当前 ends_from/ends_to 区间(若有),避免运营还要重新输入到期范围。 // 说明:这里选择保留当前 ends_from/ends_to 区间(若有),避免运营还要重新输入到期范围。
$goExpiredUrl = $buildSelfUrl(['status' => null, 'expiry' => 'expired', 'page' => null]); $goExpiredUrl = $buildSelfUrl(['status' => null, 'expiry' => 'expired', 'page' => null]);
@endphp @endphp
<div class="mt-6 actions gap-10"> @include('admin.components.tool_blocked_hint', [
<a class="btn btn-secondary btn-sm" href="{!! $goExpiredUrl !!}">切到已过期集合</a> 'dataRole' => 'batch-mark-expired-blocked-hint',
</div> 'reason' => $batchMarkExpiredReason,
</div> 'actions' => [
['label' => '切到已过期集合', 'url' => $goExpiredUrl],
],
])
@endif @endif
</div> </div>
</form> </form>