platform orders: show bmpa error message in row and link to filter
This commit is contained in:
@@ -771,17 +771,41 @@
|
||||
@php
|
||||
$syncErrMsg = (string) (data_get($order->meta, 'subscription_activation_error.message') ?? '');
|
||||
$syncErrTooLong = $syncErrMsg !== '' && mb_strlen($syncErrMsg) > $SYNC_ERROR_KEYWORD_LINK_MAX_LEN;
|
||||
|
||||
$bmpaErrMsg = (string) (data_get($order->meta, 'batch_mark_paid_and_activate_error.message') ?? '');
|
||||
$bmpaErrTooLong = $bmpaErrMsg !== '' && mb_strlen($bmpaErrMsg) > $SYNC_ERROR_KEYWORD_LINK_MAX_LEN;
|
||||
|
||||
$hasAnyErr = ($syncErrMsg !== '') || ($bmpaErrMsg !== '');
|
||||
@endphp
|
||||
@if($syncErrMsg !== '')
|
||||
@if($syncErrTooLong)
|
||||
<span class="muted text-danger" title="{{ $syncErrMsg }}">{{ mb_substr($syncErrMsg, 0, $SYNC_FAILED_REASON_TRUNCATE_LEN) }}</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, $SYNC_FAILED_REASON_TRUNCATE_LEN) }}</a>
|
||||
@endif
|
||||
@else
|
||||
|
||||
@if(! $hasAnyErr)
|
||||
<span class="muted">-</span>
|
||||
@else
|
||||
@if($syncErrMsg !== '')
|
||||
<div>
|
||||
<span class="muted muted-xs">同步:</span>
|
||||
@if($syncErrTooLong)
|
||||
<span class="muted text-danger" title="{{ $syncErrMsg }}">{{ mb_substr($syncErrMsg, 0, $SYNC_FAILED_REASON_TRUNCATE_LEN) }}</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, $SYNC_FAILED_REASON_TRUNCATE_LEN) }}</a>
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if($bmpaErrMsg !== '')
|
||||
<div class="mt-6">
|
||||
<span class="muted muted-xs">BMPA:</span>
|
||||
@if($bmpaErrTooLong)
|
||||
<span class="muted text-danger" title="{{ $bmpaErrMsg }}">{{ mb_substr($bmpaErrMsg, 0, $SYNC_FAILED_REASON_TRUNCATE_LEN) }}</span>
|
||||
<div class="muted text-danger muted-xs">原因过长,请复制到筛选框</div>
|
||||
<a class="link" href="{{ request()->fullUrlWithQuery(['bmpa_failed_only' => '1', 'page' => null]) }}">进入批量标记支付失败集合</a>
|
||||
@else
|
||||
<a class="link text-danger" href="{!! request()->fullUrlWithQuery(['bmpa_error_keyword' => $bmpaErrMsg, 'page' => null]) !!}">{{ mb_substr($bmpaErrMsg, 0, $SYNC_FAILED_REASON_TRUNCATE_LEN) }}</a>
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
|
||||
Reference in New Issue
Block a user