From 20f9331fda953e3c16efc300c5b24b6749c92916 Mon Sep 17 00:00:00 2001 From: 1day2die Date: Wed, 3 Aug 2022 11:32:38 +0200 Subject: [PATCH] enable/disable Ticketsystem --- app/Classes/Settings/Misc.php | 4 +++- .../views/admin/settings/tabs/misc.blade.php | 17 ++++++++++++++++- resources/views/layouts/main.blade.php | 4 +++- routes/web.php | 12 +++++++----- 4 files changed, 29 insertions(+), 8 deletions(-) diff --git a/app/Classes/Settings/Misc.php b/app/Classes/Settings/Misc.php index 415a0615..30c4b848 100644 --- a/app/Classes/Settings/Misc.php +++ b/app/Classes/Settings/Misc.php @@ -42,6 +42,7 @@ class Misc 'referral_allowed' => 'nullable|string', 'referral_percentage' => 'nullable|numeric', 'referral_mode' => 'nullable|string', + 'ticket_enabled' => 'nullable|string', ]); if ($validator->fails()) { @@ -78,7 +79,8 @@ class Misc "SETTINGS::REFERRAL::REWARD" => "referral_reward", "SETTINGS::REFERRAL::ALLOWED" => "referral_allowed", "SETTINGS::REFERRAL:MODE" => "referral_mode", - "SETTINGS::REFERRAL:PERCENTAGE" => "referral_percentage" + "SETTINGS::REFERRAL:PERCENTAGE" => "referral_percentage", + "SETTINGS::TICKET:ENABLED" => "ticket_enabled" ]; diff --git a/resources/views/admin/settings/tabs/misc.blade.php b/resources/views/admin/settings/tabs/misc.blade.php index 08a8f508..70b30839 100644 --- a/resources/views/admin/settings/tabs/misc.blade.php +++ b/resources/views/admin/settings/tabs/misc.blade.php @@ -187,7 +187,7 @@
-

Referral

+

Referral System

@@ -249,6 +249,21 @@ @endif>{{ __("Clients") }}
+
+
+

Ticket System

+
+
+
+
+
+ + +
+
+
diff --git a/resources/views/layouts/main.blade.php b/resources/views/layouts/main.blade.php index 3ed0457a..5a7f4ade 100644 --- a/resources/views/layouts/main.blade.php +++ b/resources/views/layouts/main.blade.php @@ -225,14 +225,16 @@ @endif + @if(config("SETTINGS::TICKET:ENABLED")) + @endif - @if (Auth::user()->role == 'admin' || Auth::user()->role == 'moderator') + @if ((Auth::user()->role == 'admin' || Auth::user()->role == 'moderator') && config("SETTINGS::TICKET:ENABLED"))