diff --git a/app/Http/Controllers/Admin/helpdesk/EmailsController.php b/app/Http/Controllers/Admin/helpdesk/EmailsController.php index 3563a808a..9aa4ef100 100644 --- a/app/Http/Controllers/Admin/helpdesk/EmailsController.php +++ b/app/Http/Controllers/Admin/helpdesk/EmailsController.php @@ -76,8 +76,8 @@ class EmailsController extends Controller $departments = $department->get(); // fetch all the helptopics from the helptopic table $helps = $help->get(); - // fetch all the types of priority from the ticket_priority table - $priority = $ticket_priority->get(); + // fetch all the types of active priority from the ticket_priority table + $priority = $ticket_priority->where('status', '=', 1)->get(); // fetch all the types of mailbox protocols from the mailbox_protocols table $mailbox_protocols = $mailbox_protocol->get(); @@ -319,8 +319,8 @@ class EmailsController extends Controller $count = $email->count(); // get all the helptopic $helps = $help->get(); - // get all the priority - $priority = $ticket_priority->get(); + // get all active the priority + $priority = $ticket_priority->where('status', '=', 1)->get(); // get all the mailbox protocols $mailbox_protocols = $mailbox_protocol->get(); diff --git a/app/Http/Controllers/Client/helpdesk/FormController.php b/app/Http/Controllers/Client/helpdesk/FormController.php index a4b4d42c6..98d29e3b0 100644 --- a/app/Http/Controllers/Client/helpdesk/FormController.php +++ b/app/Http/Controllers/Client/helpdesk/FormController.php @@ -180,7 +180,7 @@ class FormController extends Controller // $priority = $ticket_settings->first()->priority; $default_priority = Ticket_Priority::where('is_default', '=', 1)->first(); $user_priority = CommonSettings::where('id', '=', 6)->first(); - if ($user_priority->status == 0) { + if (!($request->input('priority'))) { $priority = $default_priority->priority_id; } else { $priority = $request->input('priority'); diff --git a/database/seeds/DatabaseSeeder.php b/database/seeds/DatabaseSeeder.php index 56ea71ecd..00f12934c 100644 --- a/database/seeds/DatabaseSeeder.php +++ b/database/seeds/DatabaseSeeder.php @@ -278,7 +278,7 @@ class DatabaseSeeder extends Seeder Company::create(['id' => '1']); Email::create(['id' => '1', 'template' => 'default', 'email_fetching' => '1', 'notification_cron' => '1', 'all_emails' => '1', 'email_collaborator' => '1', 'attachment' => '1']); Responder::create(['id' => '1', 'new_ticket' => '1', 'agent_new_ticket' => '1']); - // System::create(array('id' => '1', 'status' => '1', 'department' => '1', 'date_time_format' => '1', 'time_zone' => '32')); + System::create(['id' => '1', 'status' => '1', 'department' => '1', 'date_time_format' => '1', 'time_zone' => '32']); Ticket::create(['num_format' => '$$$$-####-####', 'num_sequence' => 'sequence', 'collision_avoid' => '2', 'priority' => '1', 'sla' => '2', 'help_topic' => '1', 'status' => '1']); /* Ticket source */ Ticket_source::create(['name' => 'web', 'value' => 'Web']); @@ -2025,12 +2025,12 @@ class DatabaseSeeder extends Seeder /* * All the common settings will be listed here */ - CommonSettings::create(['id' => '1', 'option_name' => 'ticket_token_time_duration', 'option_value' => '1']); - CommonSettings::create(['id' => '2', 'option_name' => 'enable_rtl', 'option_value' => '']); - CommonSettings::create(['id' => '3', 'option_name' => 'user_set_ticket_status', 'status' => 1]); - CommonSettings::create(['id' => '4', 'option_name' => 'send_otp', 'status' => 0]); - CommonSettings::create(['id' => '5', 'option_name' => 'email_mandatory', 'status' => 1]); - CommonSettings::create(['id' => '6', 'option_name' => 'user_priority', 'status' => 0]); + CommonSettings::create(['option_name' => 'ticket_token_time_duration', 'option_value' => '1']); + CommonSettings::create(['option_name' => 'enable_rtl', 'option_value' => '']); + CommonSettings::create(['option_name' => 'user_set_ticket_status', 'status' => 1]); + CommonSettings::create(['option_name' => 'send_otp', 'status' => 0]); + CommonSettings::create(['option_name' => 'email_mandatory', 'status' => 1]); + CommonSettings::create(['option_name' => 'user_priority', 'status' => 0]); /* * Ratings diff --git a/resources/views/themes/default1/admin/helpdesk/manage/ticket_priority/index.blade.php b/resources/views/themes/default1/admin/helpdesk/manage/ticket_priority/index.blade.php index b683a63ae..9f4c47e8a 100644 --- a/resources/views/themes/default1/admin/helpdesk/manage/ticket_priority/index.blade.php +++ b/resources/views/themes/default1/admin/helpdesk/manage/ticket_priority/index.blade.php @@ -55,8 +55,9 @@ class="active" -
+ + {!! Lang::get('lang.current') !!}{!! Lang::get('lang.user_priority_status') !!} @@ -88,10 +89,10 @@ class="active"
-