From 76b9b9ea3b2c079736608cce25d57ded55f4c089 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=90=9D=E5=8D=9C?= Date: Tue, 17 Mar 2026 13:15:20 +0800 Subject: [PATCH] ui(platform-orders): show run_id badge and clear filter link --- .../admin/platform_orders/index.blade.php | 16 +++++++++ ...chActivationRunIdBadgeShouldRenderTest.php | 34 +++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 tests/Feature/AdminPlatformOrderIndexBatchActivationRunIdBadgeShouldRenderTest.php diff --git a/resources/views/admin/platform_orders/index.blade.php b/resources/views/admin/platform_orders/index.blade.php index 618f9b6..e8120ef 100644 --- a/resources/views/admin/platform_orders/index.blade.php +++ b/resources/views/admin/platform_orders/index.blade.php @@ -499,6 +499,22 @@ +@php + $batchActivationRunId = trim((string) ($filters['batch_activation_run_id'] ?? '')); +@endphp +@if($batchActivationRunId !== '') +
+
当前批次筛选
+
+
+ 当前 run_id:{{ $batchActivationRunId }} + + 清除批次筛选 +
+
+
+@endif +

平台订单总数

diff --git a/tests/Feature/AdminPlatformOrderIndexBatchActivationRunIdBadgeShouldRenderTest.php b/tests/Feature/AdminPlatformOrderIndexBatchActivationRunIdBadgeShouldRenderTest.php new file mode 100644 index 0000000..0f39a96 --- /dev/null +++ b/tests/Feature/AdminPlatformOrderIndexBatchActivationRunIdBadgeShouldRenderTest.php @@ -0,0 +1,34 @@ +seed(); + + $this->post('/admin/login', [ + 'email' => 'platform.admin@demo.local', + 'password' => 'Platform@123456', + ])->assertRedirect('/admin'); + } + + public function test_platform_orders_page_should_render_run_id_badge_and_clear_link_when_filter_present(): void + { + $this->loginAsPlatformAdmin(); + + $res = $this->get('/admin/platform-orders?batch_activation_run_id=BAS_BADGE_0001'); + $res->assertOk(); + + $res->assertSee('当前批次筛选'); + $res->assertSee('BAS_BADGE_0001'); + $res->assertSee('清除批次筛选'); + $res->assertSee('/admin/platform-orders?batch_activation_run_id=', false); + } +}