From 7b4da30342f3e1d320b723a2690c6255c3c47a3c Mon Sep 17 00:00:00 2001 From: Ryan Prather Date: Fri, 10 Jan 2025 14:54:22 +0000 Subject: [PATCH] add default const to simplify setting and resetting the list --- src/Libs/NavList.php | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/src/Libs/NavList.php b/src/Libs/NavList.php index 8984099..092b5e2 100644 --- a/src/Libs/NavList.php +++ b/src/Libs/NavList.php @@ -4,20 +4,23 @@ namespace App\Libs; class NavList { + public const DEFAULT = 'nav-link text-dark'; + public const LIST = [ - 'admin_dashboard' => 'nav-link text-dark', - 'user_dashboard' => 'nav-link text-dark', - 'profile' => 'nav-link text-dark', - 'user_list' => 'nav-link text-dark', - 'staff_dashboard' => 'nav-link text-dark', - 'case_list' => 'nav-link text-dark', - 'add_user' => 'nav-link text-dark', - 'referral_sources' => 'nav-link text-dark', - 'case_notes' => 'nav-link text-dark', - 'community_resources' => 'nav-link text-dark', - 'my_cases' => 'nav-link text-dark', - 'staff_notes' => 'nav-link text-dark', - 'case_itinerary' => 'nav-link text-dark', + 'admin_dashboard' => self::DEFAULT, + 'user_dashboard' => self::DEFAULT, + 'profile' => self::DEFAULT, + 'user_list' => self::DEFAULT, + 'staff_dashboard' => self::DEFAULT, + 'case_list' => self::DEFAULT, + 'add_user' => self::DEFAULT, + 'referral_sources' => self::DEFAULT, + 'case_notes' => self::DEFAULT, + 'community_resources' => self::DEFAULT, + 'my_cases' => self::DEFAULT, + 'staff_notes' => self::DEFAULT, + 'case_itinerary' => self::DEFAULT, + 'company_nav' => self::DEFAULT, ]; public const PRESENT_LINK = 'nav-link text-white active bg-gradient-dark';