feat(admin): order show link to subscription show
This commit is contained in:
@@ -64,7 +64,7 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr><th style="width:160px;">订阅ID</th><td>{{ $order->siteSubscription->id }}</td></tr>
|
<tr><th style="width:160px;">订阅ID</th><td>{{ $order->siteSubscription->id }}</td></tr>
|
||||||
<tr><th>订阅号</th><td>{{ $order->siteSubscription->subscription_no }}</td></tr>
|
<tr><th>订阅号</th><td>{{ $order->siteSubscription->subscription_no }}</td></tr>
|
||||||
<tr><th>订阅管理</th><td><a href="/admin/site-subscriptions?keyword={{ urlencode($order->siteSubscription->subscription_no) }}">打开订阅管理(按订阅号筛选)</a></td></tr>
|
<tr><th>订阅管理</th><td><a href="/admin/site-subscriptions/{{ $order->siteSubscription->id }}">打开订阅详情</a></td></tr>
|
||||||
<tr><th>状态</th><td>{{ $order->siteSubscription->status }}</td></tr>
|
<tr><th>状态</th><td>{{ $order->siteSubscription->status }}</td></tr>
|
||||||
<tr><th>开始/到期</th><td>{{ optional($order->siteSubscription->starts_at)->format('Y-m-d H:i:s') ?: '-' }} / {{ optional($order->siteSubscription->ends_at)->format('Y-m-d H:i:s') ?: '-' }}</td></tr>
|
<tr><th>开始/到期</th><td>{{ optional($order->siteSubscription->starts_at)->format('Y-m-d H:i:s') ?: '-' }} / {{ optional($order->siteSubscription->ends_at)->format('Y-m-d H:i:s') ?: '-' }}</td></tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|||||||
@@ -74,6 +74,25 @@ class AdminPlatformOrderShowTest extends TestCase
|
|||||||
],
|
],
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
// 关联一个订阅,确保详情页出现“打开订阅详情”入口
|
||||||
|
$sub = \App\Models\SiteSubscription::query()->create([
|
||||||
|
'merchant_id' => $merchant->id,
|
||||||
|
'plan_id' => $plan->id,
|
||||||
|
'status' => 'activated',
|
||||||
|
'source' => 'manual',
|
||||||
|
'subscription_no' => 'SUB_SHOW_0001',
|
||||||
|
'plan_name' => $plan->name,
|
||||||
|
'billing_cycle' => $plan->billing_cycle,
|
||||||
|
'period_months' => 1,
|
||||||
|
'amount' => 10,
|
||||||
|
'starts_at' => now()->subDay(),
|
||||||
|
'ends_at' => now()->addMonth(),
|
||||||
|
'activated_at' => now()->subDay(),
|
||||||
|
]);
|
||||||
|
|
||||||
|
$order->site_subscription_id = $sub->id;
|
||||||
|
$order->save();
|
||||||
|
|
||||||
$this->get('/admin/platform-orders/' . $order->id)
|
$this->get('/admin/platform-orders/' . $order->id)
|
||||||
->assertOk()
|
->assertOk()
|
||||||
->assertSee('平台订单详情')
|
->assertSee('平台订单详情')
|
||||||
@@ -81,6 +100,8 @@ class AdminPlatformOrderShowTest extends TestCase
|
|||||||
->assertSee('标记支付并生效')
|
->assertSee('标记支付并生效')
|
||||||
->assertSee('同步订阅')
|
->assertSee('同步订阅')
|
||||||
->assertSee('订阅同步元数据')
|
->assertSee('订阅同步元数据')
|
||||||
|
->assertSee('关联订阅')
|
||||||
|
->assertSee('打开订阅详情')
|
||||||
->assertSee('审计记录')
|
->assertSee('审计记录')
|
||||||
->assertSee('清除同步失败标记');
|
->assertSee('清除同步失败标记');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user