ui: index receipt/refund count links go to panels
This commit is contained in:
@@ -1765,7 +1765,8 @@
|
|||||||
@endphp
|
@endphp
|
||||||
@if($receiptCount > 0)
|
@if($receiptCount > 0)
|
||||||
@php
|
@php
|
||||||
$receiptCountShowUrl = \App\Support\BackUrl::withBackAndFragment('/admin/platform-orders/' . $order->id, $selfWithoutBack, 'add-payment-receipt');
|
// spot-check:有回执时优先直达“回执列表区”(#payment-receipts),而非“新增回执表单”。
|
||||||
|
$receiptCountShowUrl = \App\Support\BackUrl::withBackAndFragment('/admin/platform-orders/' . $order->id, $selfWithoutBack, 'payment-receipts');
|
||||||
@endphp
|
@endphp
|
||||||
<a href="{!! $receiptCountShowUrl !!}" class="muted">{{ $receiptCount }}</a>
|
<a href="{!! $receiptCountShowUrl !!}" class="muted">{{ $receiptCount }}</a>
|
||||||
@else
|
@else
|
||||||
@@ -1780,7 +1781,8 @@
|
|||||||
@endphp
|
@endphp
|
||||||
@if($refundCount > 0)
|
@if($refundCount > 0)
|
||||||
@php
|
@php
|
||||||
$refundCountShowUrl = \App\Support\BackUrl::withBackAndFragment('/admin/platform-orders/' . $order->id, $selfWithoutBack, 'add-refund-receipt');
|
// spot-check:有退款记录时优先直达“退款记录区”(#refund-receipts),而非“新增退款表单”。
|
||||||
|
$refundCountShowUrl = \App\Support\BackUrl::withBackAndFragment('/admin/platform-orders/' . $order->id, $selfWithoutBack, 'refund-receipts');
|
||||||
@endphp
|
@endphp
|
||||||
<a href="{!! $refundCountShowUrl !!}" class="muted">{{ $refundCount }}</a>
|
<a href="{!! $refundCountShowUrl !!}" class="muted">{{ $refundCount }}</a>
|
||||||
@else
|
@else
|
||||||
|
|||||||
@@ -71,13 +71,14 @@ class AdminPlatformOrderIndexReceiptRefundCountLinksContainBackTest extends Test
|
|||||||
'status' => 'pending',
|
'status' => 'pending',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
// 有回执/退款记录时:列表点击应直达“记录区”(用于 spot-check 复核),而不是“新增表单”。
|
||||||
$receiptLink = '/admin/platform-orders/' . $order->id . '?' . Arr::query([
|
$receiptLink = '/admin/platform-orders/' . $order->id . '?' . Arr::query([
|
||||||
'back' => $indexSelfWithoutBack,
|
'back' => $indexSelfWithoutBack,
|
||||||
]) . '#add-payment-receipt';
|
]) . '#payment-receipts';
|
||||||
|
|
||||||
$refundLink = '/admin/platform-orders/' . $order->id . '?' . Arr::query([
|
$refundLink = '/admin/platform-orders/' . $order->id . '?' . Arr::query([
|
||||||
'back' => $indexSelfWithoutBack,
|
'back' => $indexSelfWithoutBack,
|
||||||
]) . '#add-refund-receipt';
|
]) . '#refund-receipts';
|
||||||
|
|
||||||
$res->assertSee($receiptLink, false);
|
$res->assertSee($receiptLink, false);
|
||||||
$res->assertSee($refundLink, false);
|
$res->assertSee($refundLink, false);
|
||||||
|
|||||||
Reference in New Issue
Block a user