platform_orders show: show retry activate-subscription label when sync error exists

This commit is contained in:
萝卜
2026-03-14 13:49:58 +00:00
parent 5d1912ae8a
commit fa9090f4d8
2 changed files with 80 additions and 1 deletions

View File

@@ -250,7 +250,13 @@
@endphp
<form method="post" action="/admin/platform-orders/{{ $order->id }}/activate-subscription" onsubmit="return confirm('确认同步订阅?将根据该订单创建/续期订阅');">
@csrf
<button class="btn btn-secondary btn-sm" type="submit" @disabled(! $canActivate || $alreadySynced || $syncBlockedByGovernance)>{{ $alreadySynced ? '已同步' : '同步订阅' }}</button>
@php
$hasSyncErrorMeta = (bool) ($syncError ?? false);
$activateBtnLabel = $alreadySynced
? '已同步'
: ($hasSyncErrorMeta ? '重试同步订阅' : '同步订阅');
@endphp
<button class="btn btn-secondary btn-sm" type="submit" @disabled(! $canActivate || $alreadySynced || $syncBlockedByGovernance)>{{ $activateBtnLabel }}</button>
</form>
@if($syncBlockedByGovernance)