platform_orders show: show retry activate-subscription label when sync error exists
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user