From d6d3b9f331887bf80f3c6fa02c8e338bf0eb5d0f Mon Sep 17 00:00:00 2001 From: renshen <1005457301@qq.com> Date: Thu, 6 Aug 2026 17:16:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=AE=A2=E5=8D=95=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E4=B8=80=E7=BA=A7=E5=AF=BC=E8=88=AA=20(#15)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 新增订单数据一级导航,并覆盖工作区路由和导航顺序。 Co-authored-by: renshen <1005457301@qq.com> Co-committed-by: renshen <1005457301@qq.com> --- config/business_navigation.php | 6 ++++++ tests/Feature/Business/PagesTest.php | 13 +++++++++++++ tests/Feature/Settings/NavigationTest.php | 19 +++++++++++++++++++ 3 files changed, 38 insertions(+) diff --git a/config/business_navigation.php b/config/business_navigation.php index 134ff684..bb961f39 100644 --- a/config/business_navigation.php +++ b/config/business_navigation.php @@ -167,6 +167,12 @@ return [ ['slug' => 'supplier-payables-report', 'title' => '供应商应付表'], ], ], + [ + 'slug' => 'order-data', + 'title' => '订单数据', + 'icon' => 'receipt_long', + 'pages' => [], + ], [ 'slug' => 'courier-payables', 'title' => '快递应付', diff --git a/tests/Feature/Business/PagesTest.php b/tests/Feature/Business/PagesTest.php index e62026a9..754ab8b0 100644 --- a/tests/Feature/Business/PagesTest.php +++ b/tests/Feature/Business/PagesTest.php @@ -42,6 +42,19 @@ class PagesTest extends FeatureTestCase ->assertDontSee('class="business-blank-page"', false); } + public function testOrderDataSectionOpensThroughTheSharedWorkspaceRoute() + { + $this->user->attachPermission( + Permission::where('name', 'read-admin-panel')->firstOrFail() + ); + + $this->loginAs() + ->get(route('business.pages.show', ['section' => 'order-data'])) + ->assertOk() + ->assertSeeText('订单数据') + ->assertSeeText('该页面暂未配置数据表,敬请期待。'); + } + public function testPaperMaterialPagesRenderAsSeparateTables() { $this->user->attachPermission( diff --git a/tests/Feature/Settings/NavigationTest.php b/tests/Feature/Settings/NavigationTest.php index ff475352..035808d2 100644 --- a/tests/Feature/Settings/NavigationTest.php +++ b/tests/Feature/Settings/NavigationTest.php @@ -42,4 +42,23 @@ class NavigationTest extends FeatureTestCase $this->assertSame('企业设立', $companyRegistration['title']); } + public function testOrderDataIsConfiguredAsStandaloneSectionBetweenPayablesMenus() + { + $navigation = BusinessNavigation::all(); + $slugs = array_column($navigation, 'slug'); + + $supplierIndex = array_search('supplier-payables', $slugs, true); + $orderIndex = array_search('order-data', $slugs, true); + $courierIndex = array_search('courier-payables', $slugs, true); + $orderData = $navigation[$orderIndex] ?? null; + + $this->assertNotFalse($supplierIndex); + $this->assertNotFalse($orderIndex); + $this->assertNotFalse($courierIndex); + $this->assertGreaterThan($supplierIndex, $orderIndex); + $this->assertLessThan($courierIndex, $orderIndex); + $this->assertSame('订单数据', $orderData['title']); + $this->assertSame([], $orderData['pages']); + } + }