refactor(subscriptions): use BackUrl::withBack for links on index
This commit is contained in:
@@ -158,7 +158,6 @@
|
|||||||
@php
|
@php
|
||||||
$q = [
|
$q = [
|
||||||
'order_type' => 'renewal',
|
'order_type' => 'renewal',
|
||||||
'back' => $selfWithoutBack,
|
|
||||||
];
|
];
|
||||||
if ((int) ($filters['merchant_id'] ?? 0) > 0) {
|
if ((int) ($filters['merchant_id'] ?? 0) > 0) {
|
||||||
$q['merchant_id'] = (int) $filters['merchant_id'];
|
$q['merchant_id'] = (int) $filters['merchant_id'];
|
||||||
@@ -166,7 +165,7 @@
|
|||||||
if ((int) ($filters['plan_id'] ?? 0) > 0) {
|
if ((int) ($filters['plan_id'] ?? 0) > 0) {
|
||||||
$q['plan_id'] = (int) $filters['plan_id'];
|
$q['plan_id'] = (int) $filters['plan_id'];
|
||||||
}
|
}
|
||||||
$createOrderFromSubIndexUrl = '/admin/platform-orders/create?' . \Illuminate\Support\Arr::query($q);
|
$createOrderFromSubIndexUrl = \App\Support\BackUrl::withBack('/admin/platform-orders/create?' . \Illuminate\Support\Arr::query($q), $selfWithoutBack);
|
||||||
@endphp
|
@endphp
|
||||||
<a class="btn btn-sm" href="{!! $createOrderFromSubIndexUrl !!}">创建续费订单(带当前筛选)</a>
|
<a class="btn btn-sm" href="{!! $createOrderFromSubIndexUrl !!}">创建续费订单(带当前筛选)</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -199,9 +198,7 @@
|
|||||||
<td>{{ $subscription->id }}</td>
|
<td>{{ $subscription->id }}</td>
|
||||||
<td>
|
<td>
|
||||||
@php
|
@php
|
||||||
$subShowUrl = '/admin/site-subscriptions/' . $subscription->id . '?' . \Illuminate\Support\Arr::query([
|
$subShowUrl = \App\Support\BackUrl::withBack('/admin/site-subscriptions/' . $subscription->id, $back);
|
||||||
'back' => $back,
|
|
||||||
]);
|
|
||||||
@endphp
|
@endphp
|
||||||
<a href="{!! $subShowUrl !!}">{{ $subscription->subscription_no }}</a>
|
<a href="{!! $subShowUrl !!}">{{ $subscription->subscription_no }}</a>
|
||||||
@php
|
@php
|
||||||
@@ -211,7 +208,6 @@
|
|||||||
'site_subscription_id' => $subscription->id,
|
'site_subscription_id' => $subscription->id,
|
||||||
'quantity' => 1,
|
'quantity' => 1,
|
||||||
'remark' => $remarkPrefix . $subscription->subscription_no,
|
'remark' => $remarkPrefix . $subscription->subscription_no,
|
||||||
'back' => $back,
|
|
||||||
];
|
];
|
||||||
if ((int) ($subscription->merchant_id ?? 0) > 0) {
|
if ((int) ($subscription->merchant_id ?? 0) > 0) {
|
||||||
$q['merchant_id'] = (int) $subscription->merchant_id;
|
$q['merchant_id'] = (int) $subscription->merchant_id;
|
||||||
@@ -219,7 +215,7 @@
|
|||||||
if ((int) ($subscription->plan_id ?? 0) > 0) {
|
if ((int) ($subscription->plan_id ?? 0) > 0) {
|
||||||
$q['plan_id'] = (int) $subscription->plan_id;
|
$q['plan_id'] = (int) $subscription->plan_id;
|
||||||
}
|
}
|
||||||
$renewOrderUrl = '/admin/platform-orders/create?' . \Illuminate\Support\Arr::query($q);
|
$renewOrderUrl = \App\Support\BackUrl::withBack('/admin/platform-orders/create?' . \Illuminate\Support\Arr::query($q), $back);
|
||||||
@endphp
|
@endphp
|
||||||
<div class="mt-4">
|
<div class="mt-4">
|
||||||
<a class="btn btn-secondary btn-sm" href="{!! $renewOrderUrl !!}">续费下单</a>
|
<a class="btn btn-secondary btn-sm" href="{!! $renewOrderUrl !!}">续费下单</a>
|
||||||
|
|||||||
Reference in New Issue
Block a user