平台订单:同步失败原因过长时不生成筛选链接
This commit is contained in:
@@ -245,11 +245,24 @@
|
||||
@endphp
|
||||
<div>
|
||||
@if($reason !== '' && $reason !== '(空)')
|
||||
@php $reasonText = mb_substr($reason, 0, 60); @endphp
|
||||
<a class="link" title="{{ $reason }}" href="{!! request()->fullUrlWithQuery(['sync_error_keyword' => $reason, 'sync_status' => 'failed', 'page' => null]) !!}">{{ $reasonText }}</a>
|
||||
<span class="muted">({{ $count }})</span>
|
||||
<span class="muted">|</span>
|
||||
<a class="link" href="{!! request()->fullUrlWithQuery(['sync_error_keyword' => $reason, 'sync_status' => null, 'syncable_only' => '1', 'page' => null]) !!}">切到可同步重试</a>
|
||||
@php
|
||||
$reasonText = mb_substr($reason, 0, 60);
|
||||
$reasonTooLong = mb_strlen($reason) > 200;
|
||||
@endphp
|
||||
|
||||
@if($reasonTooLong)
|
||||
<span class="muted" title="{{ $reason }}">{{ $reasonText }}</span>
|
||||
<span class="muted">({{ $count }})</span>
|
||||
<span class="muted">|</span>
|
||||
<span class="muted">原因过长,请复制到筛选框</span>
|
||||
<span class="muted">|</span>
|
||||
<a class="link" href="{{ request()->fullUrlWithQuery(['sync_status' => 'failed', 'page' => null]) }}">进入同步失败集合</a>
|
||||
@else
|
||||
<a class="link" title="{{ $reason }}" href="{!! request()->fullUrlWithQuery(['sync_error_keyword' => $reason, 'sync_status' => 'failed', 'page' => null]) !!}">{{ $reasonText }}</a>
|
||||
<span class="muted">({{ $count }})</span>
|
||||
<span class="muted">|</span>
|
||||
<a class="link" href="{!! request()->fullUrlWithQuery(['sync_error_keyword' => $reason, 'sync_status' => null, 'syncable_only' => '1', 'page' => null]) !!}">切到可同步重试</a>
|
||||
@endif
|
||||
@else
|
||||
<span class="muted">(空原因)</span>
|
||||
<span class="muted">({{ $count }})</span>
|
||||
@@ -582,9 +595,18 @@
|
||||
<td>{{ optional($order->siteSubscription?->ends_at)->format('Y-m-d H:i:s') ?: '-' }}</td>
|
||||
<td>{{ data_get($order->meta, 'subscription_activation.synced_at') ?: '-' }}</td>
|
||||
<td>
|
||||
@php $syncErrMsg = (string) (data_get($order->meta, 'subscription_activation_error.message') ?? ''); @endphp
|
||||
@php
|
||||
$syncErrMsg = (string) (data_get($order->meta, 'subscription_activation_error.message') ?? '');
|
||||
$syncErrTooLong = $syncErrMsg !== '' && mb_strlen($syncErrMsg) > 200;
|
||||
@endphp
|
||||
@if($syncErrMsg !== '')
|
||||
<a class="link text-danger" href="{!! request()->fullUrlWithQuery(['sync_error_keyword' => $syncErrMsg, 'sync_status' => 'failed', 'page' => null]) !!}">{{ mb_substr($syncErrMsg, 0, 60) }}</a>
|
||||
@if($syncErrTooLong)
|
||||
<span class="muted text-danger" title="{{ $syncErrMsg }}">{{ mb_substr($syncErrMsg, 0, 60) }}</span>
|
||||
<div class="muted text-danger muted-xs">原因过长,请复制到筛选框</div>
|
||||
<a class="link" href="{{ request()->fullUrlWithQuery(['sync_status' => 'failed', 'page' => null]) }}">进入同步失败集合</a>
|
||||
@else
|
||||
<a class="link text-danger" href="{!! request()->fullUrlWithQuery(['sync_error_keyword' => $syncErrMsg, 'sync_status' => 'failed', 'page' => null]) !!}">{{ mb_substr($syncErrMsg, 0, 60) }}</a>
|
||||
@endif
|
||||
@else
|
||||
<span class="muted">-</span>
|
||||
@endif
|
||||
|
||||
Reference in New Issue
Block a user