From 4d13c56ff8dc7686728c9fdd0acb0814d1d46d25 Mon Sep 17 00:00:00 2001 From: renshen <1005457301@qq.com> Date: Sat, 7 Nov 2026 14:39:19 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=88=90=E6=9C=AC=E8=BF=90=E8=B4=B9?= =?UTF-8?q?=E5=BC=82=E5=B8=B8=E7=BB=A7=E6=89=BF=E9=80=80=E6=AC=BE=E7=9B=AE?= =?UTF-8?q?=E5=BD=95=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Utilities/SidebarPermissions.php | 3 ++- tests/Feature/Settings/NavigationTest.php | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/Utilities/SidebarPermissions.php b/app/Utilities/SidebarPermissions.php index 411a3065..cf73893d 100644 --- a/app/Utilities/SidebarPermissions.php +++ b/app/Utilities/SidebarPermissions.php @@ -421,10 +421,11 @@ class SidebarPermissions } } - if ($key === 'refunds') { + if ($key === 'refunds' || str_starts_with($key, 'refunds/refund-pending')) { $normalized[] = self::LEGACY_PAGE_KEYS['refunds/small-payment-work-orders']; $normalized[] = 'fee-ratio-monitoring/refund-pending'; $normalized[] = 'fee-ratio-monitoring/refund-pending/export-details'; + $normalized[] = 'fee-ratio-monitoring/cost-freight-anomaly'; } } diff --git a/tests/Feature/Settings/NavigationTest.php b/tests/Feature/Settings/NavigationTest.php index ce56d478..19c276b1 100644 --- a/tests/Feature/Settings/NavigationTest.php +++ b/tests/Feature/Settings/NavigationTest.php @@ -363,6 +363,10 @@ class NavigationTest extends FeatureTestCase 'fee-ratio-monitoring/refund-pending/export-details', SidebarPermissions::allowedKeys($this->user), ); + $this->assertContains( + 'fee-ratio-monitoring/cost-freight-anomaly', + SidebarPermissions::allowedKeys($this->user), + ); } public function testPrototypeSidebarDoesNotDuplicateOtherDirectoryPages(): void -- 2.47.2