diff --git a/app/Http/Controllers/Agent/helpdesk/TicketController.php b/app/Http/Controllers/Agent/helpdesk/TicketController.php
index 722f1495b..40a477ac8 100644
--- a/app/Http/Controllers/Agent/helpdesk/TicketController.php
+++ b/app/Http/Controllers/Agent/helpdesk/TicketController.php
@@ -1124,23 +1124,28 @@ class TicketController extends Controller
$ticket->source = $source;
$ticket_status = $this->checkUserVerificationStatus();
//dd($ticket_status);
- if ($ticket_status == 0) {
- //check if user active then allow ticket creation else create unverified ticket
- if ($user_status->active == 1) {
- if ($status == null) {
- $ticket->status = 1;
- } else {
- $ticket->status = $status;
- }
- } else {
- $ticket->status = 6;
- }
+ // if ($ticket_status == 0) {
+ // //check if user active then allow ticket creation else create unverified ticket
+ // if ($user_status->active == 1) {
+ // if ($status == null) {
+ // $ticket->status = 1;
+ // } else {
+ // $ticket->status = $status;
+ // }
+ // } else {
+ // $ticket->status = 6;
+ // }
+ // } else {
+ // if ($status == null) {
+ // $ticket->status = 1;
+ // } else {
+ // $ticket->status = $status;
+ // }
+ // }
+ if ($status == null) {
+ $ticket->status = 1;
} else {
- if ($status == null) {
- $ticket->status = 1;
- } else {
- $ticket->status = $status;
- }
+ $ticket->status = $status;
}
$ticket->save();
@@ -1459,59 +1464,63 @@ class TicketController extends Controller
*/
public function assign($id)
{
+ $ticket_array = [];
+ if (strpos($id, ',') !== false) {
+ $ticket_array = explode(',', $id);
+ } else {
+ array_push($ticket_array, $id);
+ }
$UserEmail = Input::get('assign_to');
$assign_to = explode('_', $UserEmail);
- $ticket = Tickets::where('id', '=', $id)->first();
+ $user_detail = null;
+ foreach ($ticket_array as $id) {
+ $ticket = Tickets::where('id', '=', $id)->first();
+ if ($assign_to[0] == 'team') {
+ $ticket->team_id = $assign_to[1];
+ $team_detail = Teams::where('id', '=', $assign_to[1])->first();
+ $assignee = $team_detail->name;
+ $ticket_number = $ticket->ticket_number;
+ $ticket->save();
+ $ticket_thread = Ticket_Thread::where('ticket_id', '=', $id)->first();
+ $ticket_subject = $ticket_thread->title;
+ $thread = new Ticket_Thread();
+ $thread->ticket_id = $ticket->id;
+ $thread->user_id = Auth::user()->id;
+ $thread->is_internal = 1;
+ $thread->body = 'This Ticket has been assigned to '.$assignee;
+ $thread->save();
+ } elseif ($assign_to[0] == 'user') {
+ $ticket->assigned_to = $assign_to[1];
+ if ($user_detail === null) {
+ $user_detail = User::where('id', '=', $assign_to[1])->first();
+ $assignee = $user_detail->first_name.' '.$user_detail->last_name;
+ }
+ $company = $this->company();
+ $system = $this->system();
+ $ticket_number = $ticket->ticket_number;
+ $ticket->save();
+ $data = [
+ 'id' => $id,
+ ];
+ \Event::fire('ticket-assignment', [$data]);
+ $ticket_thread = Ticket_Thread::where('ticket_id', '=', $id)->first();
+ $ticket_subject = $ticket_thread->title;
+ $thread = new Ticket_Thread();
+ $thread->ticket_id = $ticket->id;
+ $thread->user_id = Auth::user()->id;
+ $thread->is_internal = 1;
+ $thread->body = 'This Ticket has been assigned to '.$assignee;
+ $thread->save();
- if ($assign_to[0] == 'team') {
- $ticket->team_id = $assign_to[1];
- $team_detail = Teams::where('id', '=', $assign_to[1])->first();
- $assignee = $team_detail->name;
-
- $ticket_number = $ticket->ticket_number;
- $ticket->save();
-
- $ticket_thread = Ticket_Thread::where('ticket_id', '=', $id)->first();
- $ticket_subject = $ticket_thread->title;
-
- $thread = new Ticket_Thread();
- $thread->ticket_id = $ticket->id;
- $thread->user_id = Auth::user()->id;
- $thread->is_internal = 1;
- $thread->body = 'This Ticket has been assigned to '.$assignee;
- $thread->save();
- } elseif ($assign_to[0] == 'user') {
- $ticket->assigned_to = $assign_to[1];
- $user_detail = User::where('id', '=', $assign_to[1])->first();
- $assignee = $user_detail->first_name.' '.$user_detail->last_name;
-
- $company = $this->company();
- $system = $this->system();
-
- $ticket_number = $ticket->ticket_number;
- $ticket->save();
- $data = [
- 'id' => $id,
- ];
- \Event::fire('ticket-assignment', [$data]);
- $ticket_thread = Ticket_Thread::where('ticket_id', '=', $id)->first();
- $ticket_subject = $ticket_thread->title;
-
- $thread = new Ticket_Thread();
- $thread->ticket_id = $ticket->id;
- $thread->user_id = Auth::user()->id;
- $thread->is_internal = 1;
- $thread->body = 'This Ticket has been assigned to '.$assignee;
- $thread->save();
-
- $agent = $user_detail->first_name;
- $agent_email = $user_detail->email;
- $ticket_link = route('ticket.thread', $id);
- $master = Auth::user()->first_name.' '.Auth::user()->last_name;
- try {
- $this->PhpMailController->sendmail($from = $this->PhpMailController->mailfrom('0', $ticket->dept_id), $to = ['name' => $agent, 'email' => $agent_email], $message = ['subject' => $ticket_subject.'[#'.$ticket_number.']', 'scenario' => 'assign-ticket'], $template_variables = ['ticket_agent_name' => $agent, 'ticket_number' => $ticket_number, 'ticket_assigner' => $master, 'ticket_link' => $ticket_link]);
- } catch (\Exception $e) {
- return 0;
+ $agent = $user_detail->first_name;
+ $agent_email = $user_detail->email;
+ $ticket_link = route('ticket.thread', $id);
+ $master = Auth::user()->first_name.' '.Auth::user()->last_name;
+ try {
+ $this->PhpMailController->sendmail($from = $this->PhpMailController->mailfrom('0', $ticket->dept_id), $to = ['name' => $agent, 'email' => $agent_email], $message = ['subject' => $ticket_subject.'[#'.$ticket_number.']', 'scenario' => 'assign-ticket'], $template_variables = ['ticket_agent_name' => $agent, 'ticket_number' => $ticket_number, 'ticket_assigner' => $master, 'ticket_link' => $ticket_link]);
+ } catch (\Exception $e) {
+ return 0;
+ }
}
}
@@ -2537,7 +2546,8 @@ class TicketController extends Controller
return $prio;
})
->addColumn('from', function ($ticket) {
- $from = DB::table('users')->select('user_name', 'first_name', 'last_name')->where('id', '=', $ticket->user_id)->first();
+ $verify = CommonSettings::select('status')->where('option_name', '=', 'send_otp')->first();
+ $from = DB::table('users')->select('user_name', 'first_name', 'last_name', 'active')->where('id', '=', $ticket->user_id)->first();
$url = route('user.show', $ticket->user_id);
$name = '';
if ($from) {
@@ -2547,8 +2557,14 @@ class TicketController extends Controller
$name = $from->user_name;
}
}
+ $color = '';
+ if ($verify->status == 1 || $verify->status == '1') {
+ if ($from->active == 0 || $from->active == '0') {
+ $color = "";
+ }
+ }
- return "user_name).'''.Lang::get('lang.see-profile2')."'>".ucfirst(str_limit($name, 30)).'';
+ return "user_name).'''.Lang::get('lang.see-profile2')."'>".ucfirst(str_limit($name, 30)).' '.$color.'';
})
// ->addColumn('Last Replier', function ($ticket) {
// $TicketData = Ticket_Thread::where('ticket_id', '=', $ticket->id)->where('is_internal', '=', 0)->max('id');
diff --git a/app/Http/Controllers/Agent/helpdesk/UserController.php b/app/Http/Controllers/Agent/helpdesk/UserController.php
index 538842d04..c291fb4ee 100644
--- a/app/Http/Controllers/Agent/helpdesk/UserController.php
+++ b/app/Http/Controllers/Agent/helpdesk/UserController.php
@@ -734,7 +734,7 @@ class UserController extends Controller
return redirect('profile-edit')->with('success1', Lang::get('lang.password_updated_sucessfully'));
} catch (Exception $e) {
- return redirect('profile-edit')->with('fails', $e->getMessage());
+ return redirect('profile-edit')->with('fails1', $e->getMessage());
}
} else {
return redirect('profile-edit')->with('fails1', Lang::get('lang.password_was_not_updated_incorrect_old_password'));
@@ -1003,4 +1003,19 @@ class UserController extends Controller
return $message;
}
}
+
+ /**
+ * @category function to get user details and show in select field
+ *
+ * @param null
+ *
+ * @return data
+ */
+ public function getAgentDetails()
+ {
+ $users = User::where('role', '<>', 'user')->where('active', '=', 1)->get();
+ foreach ($users as $user) {
+ echo "';
+ }
+ }
}
diff --git a/app/Http/Controllers/Client/helpdesk/FormController.php b/app/Http/Controllers/Client/helpdesk/FormController.php
index 98d29e3b0..15de23f29 100644
--- a/app/Http/Controllers/Client/helpdesk/FormController.php
+++ b/app/Http/Controllers/Client/helpdesk/FormController.php
@@ -146,7 +146,7 @@ class FormController extends Controller
*/
public function postedForm(User $user, ClientRequest $request, Ticket $ticket_settings, Ticket_source $ticket_source, Ticket_attachments $ta, CountryCode $code)
{
- $form_extras = $request->except('Name', 'Phone', 'Email', 'Subject', 'Details', 'helptopic', '_wysihtml5_mode', '_token', 'mobile', 'Code');
+ $form_extras = $request->except('Name', 'Phone', 'Email', 'Subject', 'Details', 'helptopic', '_wysihtml5_mode', '_token', 'mobile', 'Code', 'priority');
$name = $request->input('Name');
$phone = $request->input('Phone');
if ($request->input('Email')) {
@@ -179,7 +179,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();
+ $user_priority = CommonSettings::select('status')->where('option_name', '=', 'user_priority')->first();
if (!($request->input('priority'))) {
$priority = $default_priority->priority_id;
} else {
diff --git a/app/Http/routes.php b/app/Http/routes.php
index 3071be0b7..687311ec4 100644
--- a/app/Http/routes.php
+++ b/app/Http/routes.php
@@ -724,6 +724,8 @@ Route::group(['middleware' => ['web']], function () {
// route to get the data on change
Route::post('help-topic-report/{date1}/{date2}/{id}', ['as' => 'report.helptopic', 'uses' => 'Agent\helpdesk\ReportController@chartdataHelptopic']); /* To show dashboard pages */
Route::post('help-topic-pdf', ['as' => 'help.topic.pdf', 'uses' => 'Agent\helpdesk\ReportController@helptopicPdf']);
+ // Route to get details of agents
+ Route::post('get-agents', ['as' => 'get-agents', 'uses' => 'Agent\helpdesk\UserController@getAgentDetails']);
});
/*
diff --git a/app/Model/helpdesk/Ticket/Ticket_Form_Data.php b/app/Model/helpdesk/Ticket/Ticket_Form_Data.php
index 26472aee9..5726c21f8 100644
--- a/app/Model/helpdesk/Ticket/Ticket_Form_Data.php
+++ b/app/Model/helpdesk/Ticket/Ticket_Form_Data.php
@@ -4,8 +4,39 @@ namespace App\Model\helpdesk\Ticket;
use App\BaseModel;
-class Ticket_Form_Data extends BaseModel
-{
+class Ticket_Form_Data extends BaseModel {
+
protected $table = 'ticket_form_data';
protected $fillable = ['id', 'ticket_id', 'title', 'content', 'created_at', 'updated_at'];
+
+ public function getFieldKeyLabel() {
+ $value = $this->attributes['title'];
+ $fields = new \App\Model\helpdesk\Form\Fields();
+ $field = $fields->where('name', $value)->first();
+ if ($field) {
+ $value = $field->label;
+ }
+ return $value;
+ }
+
+ public function isHidden(){
+ $check = false;
+ $value = $this->attributes['title'];
+ $fields = new \App\Model\helpdesk\Form\Fields();
+ $field = $fields->where('name', $value)->first();
+ if ($field && $field->type=='hidden') {
+ $check = true;
+ }
+ return $check;
+ }
+
+ public function getHidden(){
+ $value = $this->attributes['title'];
+ $fields = new \App\Model\helpdesk\Form\Fields();
+ $field = $fields->where('name', $value)->first();
+ if ($field && $field->type=='hidden') {
+ return $field->label;
+ }
+ }
+
}
diff --git a/resources/lang/en/lang.php b/resources/lang/en/lang.php
index fe2f19a0a..21a5b0868 100644
--- a/resources/lang/en/lang.php
+++ b/resources/lang/en/lang.php
@@ -1549,5 +1549,6 @@ return [
/*********** Updated 3-12-2016 **********/
'activate' => 'Activate',
'system-email-not-configured' => 'We are unable to process email request as the system has no configured email for sending mails. Please contact and report system admin.',
-
+ 'assign-ticket' => 'Assign tickets',
+ 'updated-internal-note' => 'Your note has been added successfully',
];
diff --git a/resources/views/themes/default1/agent/helpdesk/approval/approval_index.blade.php b/resources/views/themes/default1/agent/helpdesk/approval/approval_index.blade.php
deleted file mode 100644
index 93fad90de..000000000
--- a/resources/views/themes/default1/agent/helpdesk/approval/approval_index.blade.php
+++ /dev/null
@@ -1,427 +0,0 @@
-@extends('themes.default1.agent.layout.agent')
-
-@section('Tickets')
-class="active"
-@stop
-
-@section('ticket-bar')
-active
-@stop
-
-@section('approvel')
-class="active"
-@stop
-
-@section('PageHeader')
-
{{Lang::get('lang.approval_tickets')}}
-@stop
-@section('content')
-role == 'agent') {
- $dept = App\Model\helpdesk\Agent\Department::where('id', '=', Auth::user()->primary_dpt)->first();
- $tickets = App\Model\helpdesk\Ticket\Tickets::whereIn('status', array(1, 7))->where('dept_id', '=', $dept->id)->orderBy('id', 'DESC')->paginate(20);
-} else {
- $tickets = App\Model\helpdesk\Ticket\Tickets::whereIn('status', array(1, 7))->orderBy('id', 'DESC')->paginate(20);
-}
-?>
-
-
-
-
-
- @if(Session::has('success'))
-
-
-
- {{Session::get('success')}}
-
- @endif
-
- @if(Session::has('fails'))
-
- {!! Lang::get('lang.alert') !!}!
-
- {{Session::get('fails')}}
-
- @endif
- {!! Form::open(['id'=>'modalpopup', 'route'=>'select_all','method'=>'post']) !!}
-
-
- @if(Auth::user()->role == 'admin')
-
- {{--
--}}
-
-
-
- @endif
-
-
-
-
- {!! Datatable::table()
- ->addColumn(
- "",
- Lang::get('lang.subject'),
- Lang::get('lang.ticket_id'),
- Lang::get('lang.priority'),
- Lang::get('lang.from'),
- Lang::get('lang.assigned_to'),
- Lang::get('lang.last_activity'))
- ->setUrl(route('get.approval.ticket'))
-
- ->setOrder(array(6=>'desc'))
- ->setClass('table table-hover table-bordered table-striped')
- ->setCallbacks("fnCreatedRow", 'function( nRow, aData, iDataIndex ) {
- var str = aData[3];
- if(str.search("#000") == -1) {
- $("td", nRow).css({"background-color":"#F3F3F3", "font-weight":"600", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px #F3F3F3"});
- $("td", nRow).mouseenter(function(){
- $("td", nRow).css({"background-color":"#DEDFE0", "font-weight":"600", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px #DEDFE0"});
- });
- $("td", nRow).mouseleave(function(){
- $("td", nRow).css({"background-color":"#F3F3F3", "font-weight":"600", "border-bottom":"solid 0.5px #ddd","border-right":"solid 0.5px #F3F3F3"});
- });
- } else {
- $("td", nRow).css({"background-color":"white", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px white"});
- $("td", nRow).mouseenter(function(){
- $("td", nRow).css({"background-color":"#DEDFE0", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px #DEDFE0"});
- });
- $("td", nRow).mouseleave(function(){
- $("td", nRow).css({"background-color":"white", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px white"});
- });
- }
- }')
- ->render();!!}
-
-
- {!! Form::close() !!}
-
-
-
-
-
-
-
-
-
-
-
-
-
-

-
-
-
-
-
-
-
-
-
{!! Lang::get('lang.alert') !!}!
-
-
-
-
-
{!! Lang::get('lang.alert') !!}!
-
-
-
-
-
-
-
-
- {!! Form::open(['id'=>'merge-form','method' => 'PATCH'] )!!}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-@stop
\ No newline at end of file
diff --git a/resources/views/themes/default1/agent/helpdesk/dept-ticket/inprogress.blade.php b/resources/views/themes/default1/agent/helpdesk/dept-ticket/inprogress.blade.php
index 0b6c4b237..51833b9e9 100644
--- a/resources/views/themes/default1/agent/helpdesk/dept-ticket/inprogress.blade.php
+++ b/resources/views/themes/default1/agent/helpdesk/dept-ticket/inprogress.blade.php
@@ -63,6 +63,7 @@ if (Auth::user()->role == 'agent') {
+
@@ -107,7 +108,40 @@ if (Auth::user()->role == 'agent') {
{!! Form::close() !!}
-
+
+
+
+
+
+
+
+
+
+

+
+
+
+
+
+ {!! Form::open(['id'=>'assign-form','method' => 'PATCH'] )!!}
+
+
+
+
+
+
+
+
+
+
+
@@ -228,12 +262,14 @@ if (Auth::user()->role == 'agent') {
t_id = $('.selectval').map(function() {
return $(this).val();
}).get();
+ showAssign(t_id);
// alert(checkboxValues);
} else {
//Check all checkboxes
$("input[type='checkbox']", ".mailbox-messages").iCheck("check");
// alert('Hallo');
t_id = [];
+ showAssign(t_id);
}
$(this).data("clicks", !clicks);
@@ -419,12 +455,53 @@ if (Auth::user()->role == 'agent') {
return false;
});
+ $('#AssignTickets').on('show.bs.modal', function() {
+ $.ajax({
+ type: "POST",
+ url: "{{route('get-agents')}}",
+ dataType: "html",
+ beforeSend: function() {
+ $("#assign_body").hide();
+ $("#assign_loader").show();
+ },
+ success: function(data) {
+ $("#assign_loader").hide();
+ $("#assign_body").show();
+ $('#select-assign-agent').html(data);
+ }
+ });
+ });
+
+ // Assign a ticket
+ $('#assign-form').on('submit', function() {
+ $.ajax({
+ type: "POST",
+ url: "../ticket/assign/"+t_id,
+ dataType: "html",
+ data: $(this).serialize(),
+ beforeSend: function() {
+ $("#assign_body").hide();
+ $("#assign_loader").show();
+ },
+ success: function(response) {
+ if (response == 1)
+ {
+ location.reload();
+ var message = "Success!";
+ $("#alert11").show();
+ $('#message-success1').html(message);
+ setInterval(function(){$("#dismiss11").trigger("click"); }, 2000);
+ }
+ $("#assign_body").show();
+ $("#assign_loader").hide();
+ $("#dismis4").trigger("click");
+ }
+ })
+ return false;
+ });
+
});
-
-
-
-
function someFunction(id) {
if (document.getElementById(id).checked) {
t_id.push(id);
@@ -441,7 +518,16 @@ if (Auth::user()->role == 'agent') {
t_id.splice(index, 1);
// alert(t_id);
}
+ showAssign(t_id);
}
+ function showAssign(t_id)
+ {
+ if (t_id.length >= 1) {
+ $('#assign_Ticket').css('display', 'inline');
+ } else {
+ $('#assign_Ticket').css('display', 'none');
+ }
+ }
@stop
\ No newline at end of file
diff --git a/resources/views/themes/default1/agent/helpdesk/dept-ticket/open.blade.php b/resources/views/themes/default1/agent/helpdesk/dept-ticket/open.blade.php
index fa91cec63..d719ae067 100644
--- a/resources/views/themes/default1/agent/helpdesk/dept-ticket/open.blade.php
+++ b/resources/views/themes/default1/agent/helpdesk/dept-ticket/open.blade.php
@@ -61,6 +61,7 @@ if (Auth::user()->role == 'admin') {
+
@@ -171,6 +172,42 @@ if (Auth::user()->role == 'admin') {
+
+
+
+
+
+
+
+
+
+
+

+
+
+
+
+
+ {!! Form::open(['id'=>'assign-form','method' => 'PATCH'] )!!}
+
+
+
+
+
+
+
+
+
+
+
+
@@ -226,12 +263,14 @@ if (Auth::user()->role == 'admin') {
t_id = $('.selectval').map(function() {
return $(this).val();
}).get();
+ showAssign(t_id);
// alert(checkboxValues);
} else {
//Check all checkboxes
$("input[type='checkbox']", ".mailbox-messages").iCheck("check");
// alert('Hallo');
t_id = [];
+ showAssign(t_id);
}
$(this).data("clicks", !clicks);
@@ -417,12 +456,53 @@ if (Auth::user()->role == 'admin') {
return false;
});
+ $('#AssignTickets').on('show.bs.modal', function() {
+ $.ajax({
+ type: "POST",
+ url: "{{route('get-agents')}}",
+ dataType: "html",
+ beforeSend: function() {
+ $("#assign_body").hide();
+ $("#assign_loader").show();
+ },
+ success: function(data) {
+ $("#assign_loader").hide();
+ $("#assign_body").show();
+ $('#select-assign-agent').html(data);
+ }
+ });
+ });
+
+ // Assign a ticket
+ $('#assign-form').on('submit', function() {
+ $.ajax({
+ type: "POST",
+ url: "../ticket/assign/"+t_id,
+ dataType: "html",
+ data: $(this).serialize(),
+ beforeSend: function() {
+ $("#assign_body").hide();
+ $("#assign_loader").show();
+ },
+ success: function(response) {
+ if (response == 1)
+ {
+ location.reload();
+ var message = "Success!";
+ $("#alert11").show();
+ $('#message-success1').html(message);
+ setInterval(function(){$("#dismiss11").trigger("click"); }, 2000);
+ }
+ $("#assign_body").show();
+ $("#assign_loader").hide();
+ $("#dismis4").trigger("click");
+ }
+ })
+ return false;
+ });
+
});
-
-
-
-
function someFunction(id) {
if (document.getElementById(id).checked) {
t_id.push(id);
@@ -439,7 +519,16 @@ if (Auth::user()->role == 'admin') {
t_id.splice(index, 1);
// alert(t_id);
}
+ showAssign(t_id);
}
+ function showAssign(t_id)
+ {
+ if (t_id.length >= 1) {
+ $('#assign_Ticket').css('display', 'inline');
+ } else {
+ $('#assign_Ticket').css('display', 'none');
+ }
+ }
@stop
\ No newline at end of file
diff --git a/resources/views/themes/default1/agent/helpdesk/followup/followup.blade.php b/resources/views/themes/default1/agent/helpdesk/followup/followup.blade.php
deleted file mode 100644
index ad39e9044..000000000
--- a/resources/views/themes/default1/agent/helpdesk/followup/followup.blade.php
+++ /dev/null
@@ -1,427 +0,0 @@
-@extends('themes.default1.agent.layout.agent')
-
-@section('Tickets')
-class="active"
-@stop
-
-@section('ticket-bar')
-active
-@stop
-
-@section('followup')
-class="active"
-@stop
-
-@section('PageHeader')
-
{{Lang::get('lang.followup_tickets')}}
-@stop
-@section('content')
-role == 'agent') {
- $dept = App\Model\helpdesk\Agent\Department::where('id', '=', Auth::user()->primary_dpt)->first();
- $tickets = App\Model\helpdesk\Ticket\Tickets::where('follow_up','=','1')->where('dept_id', '=', $dept->id)->orderBy('id', 'DESC')->paginate(20);
-} else {
- $tickets = App\Model\helpdesk\Ticket\Tickets::where('follow_up','=','1')->orderBy('id', 'DESC')->paginate(20);
-}
-?>
-
-
-
-
-
- @if(Session::has('success'))
-
-
-
- {{Session::get('success')}}
-
- @endif
-
- @if(Session::has('fails'))
-
- {!! Lang::get('lang.alert') !!}!
-
- {{Session::get('fails')}}
-
- @endif
- {!! Form::open(['id'=>'modalpopup', 'route'=>'select_all','method'=>'post']) !!}
-
-
- @if(Auth::user()->role == 'admin')
-
- {{--
--}}
-
-
-
- @endif
-
-
-
-
- {!! Datatable::table()
- ->addColumn(
- "",
- Lang::get('lang.subject'),
- Lang::get('lang.ticket_id'),
- Lang::get('lang.priority'),
- Lang::get('lang.from'),
- Lang::get('lang.assigned_to'),
- Lang::get('lang.last_activity'))
- ->setUrl(route('get.followup.ticket'))
-
- ->setOrder(array(6=>'desc'))
- ->setClass('table table-hover table-bordered table-striped')
- ->setCallbacks("fnCreatedRow", 'function( nRow, aData, iDataIndex ) {
- var str = aData[3];
- if(str.search("#000") == -1) {
- $("td", nRow).css({"background-color":"#F3F3F3", "font-weight":"600", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px #F3F3F3"});
- $("td", nRow).mouseenter(function(){
- $("td", nRow).css({"background-color":"#DEDFE0", "font-weight":"600", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px #DEDFE0"});
- });
- $("td", nRow).mouseleave(function(){
- $("td", nRow).css({"background-color":"#F3F3F3", "font-weight":"600", "border-bottom":"solid 0.5px #ddd","border-right":"solid 0.5px #F3F3F3"});
- });
- } else {
- $("td", nRow).css({"background-color":"white", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px white"});
- $("td", nRow).mouseenter(function(){
- $("td", nRow).css({"background-color":"#DEDFE0", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px #DEDFE0"});
- });
- $("td", nRow).mouseleave(function(){
- $("td", nRow).css({"background-color":"white", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px white"});
- });
- }
- }')
- ->render();!!}
-
-
- {!! Form::close() !!}
-
-
-
-
-
-
-
-
-
-
-
-
-
-

-
-
-
-
-
-
-
-
-
{!! Lang::get('lang.alert') !!}!
-
-
-
-
-
{!! Lang::get('lang.alert') !!}!
-
-
-
-
-
-
-
-
- {!! Form::open(['id'=>'merge-form','method' => 'PATCH'] )!!}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-@stop
\ No newline at end of file
diff --git a/resources/views/themes/default1/agent/helpdesk/ticket/answered.blade.php b/resources/views/themes/default1/agent/helpdesk/ticket/answered.blade.php
index 0e6043b03..2a7da48f7 100644
--- a/resources/views/themes/default1/agent/helpdesk/ticket/answered.blade.php
+++ b/resources/views/themes/default1/agent/helpdesk/ticket/answered.blade.php
@@ -59,6 +59,7 @@ if (Auth::user()->role == 'agent') {
+
@@ -124,12 +125,12 @@ if (Auth::user()->role == 'agent') {
-
{!! Lang::get('lag.alert') !!}!
+
{!! Lang::get('lang.alert') !!}!
-
{!! Lang::get('lag.alert') !!}!
+
{!! Lang::get('lang.alert') !!}!
@@ -164,6 +165,40 @@ if (Auth::user()->role == 'agent') {
+
+
+
+
+
+
+
+
+
+

+
+
+
+
+
+ {!! Form::open(['id'=>'assign-form','method' => 'PATCH'] )!!}
+
+
+
+
+
+
+
+
+
+
+
@@ -217,11 +252,13 @@ if (Auth::user()->role == 'agent') {
return $(this).val();
}).get();
// alert(checkboxValues);
+ showAssign(t_id)
} else {
//Check all checkboxes
$("input[type='checkbox']", ".mailbox-messages").iCheck("check");
// alert('Hallo');
t_id = [];
+ showAssign(t_id)
}
$(this).data("clicks", !clicks);
});
@@ -384,6 +421,51 @@ if (Auth::user()->role == 'agent') {
})
return false;
});
+
+ $('#AssignTickets').on('show.bs.modal', function() {
+ $.ajax({
+ type: "POST",
+ url: "{{route('get-agents')}}",
+ dataType: "html",
+ beforeSend: function() {
+ $("#assign_body").hide();
+ $("#assign_loader").show();
+ },
+ success: function(data) {
+ $("#assign_loader").hide();
+ $("#assign_body").show();
+ $('#select-assign-agent').html(data);
+ }
+ });
+ });
+
+ // Assign a ticket
+ $('#assign-form').on('submit', function() {
+ $.ajax({
+ type: "POST",
+ url: "../ticket/assign/"+t_id,
+ dataType: "html",
+ data: $(this).serialize(),
+ beforeSend: function() {
+ $("#assign_body").hide();
+ $("#assign_loader").show();
+ },
+ success: function(response) {
+ if (response == 1)
+ {
+ location.reload();
+ var message = "Success!";
+ $("#alert11").show();
+ $('#message-success1').html(message);
+ setInterval(function(){$("#dismiss11").trigger("click"); }, 2000);
+ }
+ $("#assign_body").show();
+ $("#assign_loader").hide();
+ $("#dismis4").trigger("click");
+ }
+ })
+ return false;
+ });
});
function someFunction(id) {
@@ -402,6 +484,16 @@ if (Auth::user()->role == 'agent') {
t_id.splice(index, 1);
// alert(t_id);
}
+ showAssign(t_id);
+ }
+
+ function showAssign(t_id)
+ {
+ if (t_id.length >= 1) {
+ $('#assign_Ticket').css('display', 'inline');
+ } else {
+ $('#assign_Ticket').css('display', 'none');
+ }
}
@stop
\ No newline at end of file
diff --git a/resources/views/themes/default1/agent/helpdesk/ticket/assigned.blade.php b/resources/views/themes/default1/agent/helpdesk/ticket/assigned.blade.php
index 51489ec33..c437550e8 100644
--- a/resources/views/themes/default1/agent/helpdesk/ticket/assigned.blade.php
+++ b/resources/views/themes/default1/agent/helpdesk/ticket/assigned.blade.php
@@ -54,6 +54,8 @@ if (Auth::user()->role == 'agent') {
+
+
@@ -161,7 +163,41 @@ if (Auth::user()->role == 'agent') {
-
+
+
+
+
+
+
+
+
+
+
+

+
+
+
+
+
+ {!! Form::open(['id'=>'assign-form','method' => 'PATCH'] )!!}
+
+
+
+
+
+
+
+
+
+
+
@@ -217,6 +253,7 @@ if (Auth::user()->role == 'agent') {
return $(this).val();
}).get();
// alert(checkboxValues);
+ showAssign(t_id);
} else {
//Check all checkboxes
$("input[type='checkbox']", ".mailbox-messages").iCheck("check");
@@ -224,6 +261,7 @@ if (Auth::user()->role == 'agent') {
t_id = [];
}
$(this).data("clicks", !clicks);
+ showAssign(t_id);
});
@@ -399,6 +437,51 @@ if (Auth::user()->role == 'agent') {
})
return false;
});
+ $('#AssignTickets').on('show.bs.modal', function() {
+ $.ajax({
+ type: "POST",
+ url: "{{route('get-agents')}}",
+ dataType: "html",
+ beforeSend: function() {
+ $("#assign_body").hide();
+ $("#assign_loader").show();
+ },
+ success: function(data) {
+ $("#assign_loader").hide();
+ $("#assign_body").show();
+ $('#select-assign-agent').html(data);
+ }
+ });
+ });
+
+ // Assign a ticket
+ $('#assign-form').on('submit', function() {
+ $.ajax({
+ type: "POST",
+ url: "../ticket/assign/"+t_id,
+ dataType: "html",
+ data: $(this).serialize(),
+ beforeSend: function() {
+ $("#assign_body").hide();
+ $("#assign_loader").show();
+ },
+ success: function(response) {
+ if (response == 1)
+ {
+ location.reload();
+ var message = "Success!";
+ $("#alert11").show();
+ $('#message-success1').html(message);
+ setInterval(function(){$("#dismiss11").trigger("click"); }, 2000);
+ }
+ $("#assign_body").show();
+ $("#assign_loader").hide();
+ $("#dismis4").trigger("click");
+ }
+ })
+ return false;
+ });
+
});
function someFunction(id) {
@@ -417,6 +500,16 @@ if (Auth::user()->role == 'agent') {
t_id.splice(index, 1);
// alert(t_id);
}
+ showAssign(t_id);
+ }
+
+ function showAssign(t_id)
+ {
+ if (t_id.length >= 1) {
+ $('#assign_Ticket').css('display', 'inline');
+ } else {
+ $('#assign_Ticket').css('display', 'none');
+ }
}
@stop
\ No newline at end of file
diff --git a/resources/views/themes/default1/agent/helpdesk/ticket/duetodayticket.blade.php b/resources/views/themes/default1/agent/helpdesk/ticket/duetodayticket.blade.php
index cfe396204..f07f9bebc 100644
--- a/resources/views/themes/default1/agent/helpdesk/ticket/duetodayticket.blade.php
+++ b/resources/views/themes/default1/agent/helpdesk/ticket/duetodayticket.blade.php
@@ -69,6 +69,7 @@ if (Auth::user()->role == 'agent') {
+
@@ -176,7 +177,41 @@ if (Auth::user()->role == 'agent') {
-
+
+
+
+
+
+
+
+
+
+
+

+
+
+
+
+
+ {!! Form::open(['id'=>'assign-form','method' => 'PATCH'] )!!}
+
+
+
+
+
+
+
+
+
+
+
@@ -229,12 +264,14 @@ if (Auth::user()->role == 'agent') {
t_id = $('.selectval').map(function() {
return $(this).val();
}).get();
+ showAssign(t_id);
// alert(checkboxValues);
} else {
//Check all checkboxes
$("input[type='checkbox']", ".mailbox-messages").iCheck("check");
// alert('Hallo');
t_id = [];
+ showAssign(t_id);
}
$(this).data("clicks", !clicks);
});
@@ -398,6 +435,51 @@ if (Auth::user()->role == 'agent') {
})
return false;
});
+ $('#AssignTickets').on('show.bs.modal', function() {
+ $.ajax({
+ type: "POST",
+ url: "{{route('get-agents')}}",
+ dataType: "html",
+ beforeSend: function() {
+ $("#assign_body").hide();
+ $("#assign_loader").show();
+ },
+ success: function(data) {
+ $("#assign_loader").hide();
+ $("#assign_body").show();
+ $('#select-assign-agent').html(data);
+ }
+ });
+ });
+
+ // Assign a ticket
+ $('#assign-form').on('submit', function() {
+ $.ajax({
+ type: "POST",
+ url: "../ticket/assign/"+t_id,
+ dataType: "html",
+ data: $(this).serialize(),
+ beforeSend: function() {
+ $("#assign_body").hide();
+ $("#assign_loader").show();
+ },
+ success: function(response) {
+ if (response == 1)
+ {
+ location.reload();
+ var message = "Success!";
+ $("#alert11").show();
+ $('#message-success1').html(message);
+ setInterval(function(){$("#dismiss11").trigger("click"); }, 2000);
+ }
+ $("#assign_body").show();
+ $("#assign_loader").hide();
+ $("#dismis4").trigger("click");
+ }
+ })
+ return false;
+ });
+
});
function someFunction(id) {
@@ -416,6 +498,16 @@ if (Auth::user()->role == 'agent') {
t_id.splice(index, 1);
// alert(t_id);
}
+ showAssign(t_id);
+ }
+
+ function showAssign(t_id)
+ {
+ if (t_id.length >= 1) {
+ $('#assign_Ticket').css('display', 'inline');
+ } else {
+ $('#assign_Ticket').css('display', 'none');
+ }
}
@stop
\ No newline at end of file
diff --git a/resources/views/themes/default1/agent/helpdesk/ticket/inbox.blade.php b/resources/views/themes/default1/agent/helpdesk/ticket/inbox.blade.php
index 3c61dfcbd..f0ea3c71f 100644
--- a/resources/views/themes/default1/agent/helpdesk/ticket/inbox.blade.php
+++ b/resources/views/themes/default1/agent/helpdesk/ticket/inbox.blade.php
@@ -58,6 +58,7 @@ if (Auth::user()->role == 'agent') {
{{--@endif--}}
+
@@ -166,6 +167,42 @@ if (Auth::user()->role == 'agent') {
+
+
+
+
+
+
+
+
+
+
+

+
+
+
+
+
+ {!! Form::open(['id'=>'assign-form','method' => 'PATCH'] )!!}
+
+
+
+
+
+
+
+
+
+
+
+
@@ -221,11 +258,13 @@ if (Auth::user()->role == 'agent') {
return $(this).val();
}).get();
// alert(checkboxValues);
+ showAssign(t_id);
} else {
//Check all checkboxes
$("input[type='checkbox']", ".mailbox-messages").iCheck("check");
// alert('Hallo');
t_id = [];
+ showAssign(t_id);
}
$(this).data("clicks", !clicks);
@@ -405,6 +444,52 @@ if (Auth::user()->role == 'agent') {
})
return false;
});
+
+ $('#AssignTickets').on('show.bs.modal', function() {
+ $.ajax({
+ type: "POST",
+ url: "{{route('get-agents')}}",
+ dataType: "html",
+ beforeSend: function() {
+ $("#assign_body").hide();
+ $("#assign_loader").show();
+ },
+ success: function(data) {
+ $("#assign_loader").hide();
+ $("#assign_body").show();
+ $('#select-assign-agent').html(data);
+ }
+ });
+ });
+
+ // Assign a ticket
+ $('#assign-form').on('submit', function() {
+ $.ajax({
+ type: "POST",
+ url: "../ticket/assign/"+t_id,
+ dataType: "html",
+ data: $(this).serialize(),
+ beforeSend: function() {
+ $("#assign_body").hide();
+ $("#assign_loader").show();
+ },
+ success: function(response) {
+ if (response == 1)
+ {
+ location.reload();
+ var message = "Success!";
+ $("#alert11").show();
+ $('#message-success1').html(message);
+ setInterval(function(){$("#dismiss11").trigger("click"); }, 2000);
+ }
+ $("#assign_body").show();
+ $("#assign_loader").hide();
+ $("#dismis4").trigger("click");
+ }
+ })
+ return false;
+ });
+
});
function someFunction(id) {
@@ -423,6 +508,16 @@ if (Auth::user()->role == 'agent') {
t_id.splice(index, 1);
// alert(t_id);
}
+ showAssign(t_id);
+ }
+
+ function showAssign(t_id)
+ {
+ if (t_id.length >= 1) {
+ $('#assign_Ticket').css('display', 'inline');
+ } else {
+ $('#assign_Ticket').css('display', 'none');
+ }
}
@stop
\ No newline at end of file
diff --git a/resources/views/themes/default1/agent/helpdesk/ticket/myticket.blade.php b/resources/views/themes/default1/agent/helpdesk/ticket/myticket.blade.php
index 91f21b467..e7582b092 100644
--- a/resources/views/themes/default1/agent/helpdesk/ticket/myticket.blade.php
+++ b/resources/views/themes/default1/agent/helpdesk/ticket/myticket.blade.php
@@ -55,6 +55,7 @@ if (Auth::user()->role == 'agent') {
+
@@ -164,6 +165,41 @@ if (Auth::user()->role == 'agent') {
+
+
+
+
+
+
+
+
+
+
+

+
+
+
+
+
+ {!! Form::open(['id'=>'assign-form','method' => 'PATCH'] )!!}
+
+
+
+
+
+
+
+
+
+
+
@@ -221,12 +257,14 @@ if (Auth::user()->role == 'agent') {
t_id = $('.selectval').map(function() {
return $(this).val();
}).get();
+ showAssign(t_id);
// alert(checkboxValues);
} else {
//Check all checkboxes
$("input[type='checkbox']", ".mailbox-messages").iCheck("check");
// alert('Hallo');
t_id = [];
+ showAssign(t_id);
}
$(this).data("clicks", !clicks);
@@ -414,6 +452,95 @@ if (Auth::user()->role == 'agent') {
return false;
});
+ $('#AssignTickets').on('show.bs.modal', function() {
+ $.ajax({
+ type: "POST",
+ url: "{{route('get-agents')}}",
+ dataType: "html",
+ beforeSend: function() {
+ $("#assign_body").hide();
+ $("#assign_loader").show();
+ },
+ success: function(data) {
+ $("#assign_loader").hide();
+ $("#assign_body").show();
+ $('#select-assign-agent').html(data);
+ }
+ });
+ });
+
+ // Assign a ticket
+ $('#assign-form').on('submit', function() {
+ $.ajax({
+ type: "POST",
+ url: "../ticket/assign/"+t_id,
+ dataType: "html",
+ data: $(this).serialize(),
+ beforeSend: function() {
+ $("#assign_body").hide();
+ $("#assign_loader").show();
+ },
+ success: function(response) {
+ if (response == 1)
+ {
+ location.reload();
+ var message = "Success!";
+ $("#alert11").show();
+ $('#message-success1').html(message);
+ setInterval(function(){$("#dismiss11").trigger("click"); }, 2000);
+ }
+ $("#assign_body").show();
+ $("#assign_loader").hide();
+ $("#dismis4").trigger("click");
+ }
+ })
+ return false;
+ });
+ $('#AssignTickets').on('show.bs.modal', function() {
+ $.ajax({
+ type: "POST",
+ url: "{{route('get-agents')}}",
+ dataType: "html",
+ beforeSend: function() {
+ $("#assign_body").hide();
+ $("#assign_loader").show();
+ },
+ success: function(data) {
+ $("#assign_loader").hide();
+ $("#assign_body").show();
+ $('#select-assign-agent').html(data);
+ }
+ });
+ });
+
+ // Assign a ticket
+ $('#assign-form').on('submit', function() {
+ $.ajax({
+ type: "POST",
+ url: "../ticket/assign/"+t_id,
+ dataType: "html",
+ data: $(this).serialize(),
+ beforeSend: function() {
+ $("#assign_body").hide();
+ $("#assign_loader").show();
+ },
+ success: function(response) {
+ if (response == 1)
+ {
+ location.reload();
+ var message = "Success!";
+ $("#alert11").show();
+ $('#message-success1').html(message);
+ setInterval(function(){$("#dismiss11").trigger("click"); }, 2000);
+ }
+ $("#assign_body").show();
+ $("#assign_loader").hide();
+ $("#dismis4").trigger("click");
+ }
+ })
+ return false;
+ });
+
});
@@ -436,6 +563,16 @@ if (Auth::user()->role == 'agent') {
t_id.splice(index, 1);
// alert(t_id);
}
+ showAssign(t_id);
+ }
+
+ function showAssign(t_id)
+ {
+ if (t_id.length >= 1) {
+ $('#assign_Ticket').css('display', 'inline');
+ } else {
+ $('#assign_Ticket').css('display', 'none');
+ }
}
diff --git a/resources/views/themes/default1/agent/helpdesk/ticket/open.blade.php b/resources/views/themes/default1/agent/helpdesk/ticket/open.blade.php
index d426ff63e..3da56047f 100644
--- a/resources/views/themes/default1/agent/helpdesk/ticket/open.blade.php
+++ b/resources/views/themes/default1/agent/helpdesk/ticket/open.blade.php
@@ -60,6 +60,7 @@ if (Auth::user()->role == 'agent') {
+
@@ -167,7 +168,41 @@ if (Auth::user()->role == 'agent') {
-
+
+
+
+
+
+
+
+
+
+
+

+
+
+
+
+
+ {!! Form::open(['id'=>'assign-form','method' => 'PATCH'] )!!}
+
+
+
+
+
+
+
+
+
+
+
@@ -220,12 +255,14 @@ if (Auth::user()->role == 'agent') {
t_id = $('.selectval').map(function() {
return $(this).val();
}).get();
+ showAssign(t_id);
// alert(checkboxValues);
} else {
//Check all checkboxes
$("input[type='checkbox']", ".mailbox-messages").iCheck("check");
// alert('Hallo');
t_id = [];
+ showAssign(t_id);
}
$(this).data("clicks", !clicks);
});
@@ -389,6 +426,50 @@ if (Auth::user()->role == 'agent') {
})
return false;
});
+ $('#AssignTickets').on('show.bs.modal', function() {
+ $.ajax({
+ type: "POST",
+ url: "{{route('get-agents')}}",
+ dataType: "html",
+ beforeSend: function() {
+ $("#assign_body").hide();
+ $("#assign_loader").show();
+ },
+ success: function(data) {
+ $("#assign_loader").hide();
+ $("#assign_body").show();
+ $('#select-assign-agent').html(data);
+ }
+ });
+ });
+
+ // Assign a ticket
+ $('#assign-form').on('submit', function() {
+ $.ajax({
+ type: "POST",
+ url: "../ticket/assign/"+t_id,
+ dataType: "html",
+ data: $(this).serialize(),
+ beforeSend: function() {
+ $("#assign_body").hide();
+ $("#assign_loader").show();
+ },
+ success: function(response) {
+ if (response == 1)
+ {
+ location.reload();
+ var message = "Success!";
+ $("#alert11").show();
+ $('#message-success1').html(message);
+ setInterval(function(){$("#dismiss11").trigger("click"); }, 2000);
+ }
+ $("#assign_body").show();
+ $("#assign_loader").hide();
+ $("#dismis4").trigger("click");
+ }
+ })
+ return false;
+ });
});
function someFunction(id) {
@@ -407,6 +488,15 @@ if (Auth::user()->role == 'agent') {
t_id.splice(index, 1);
// alert(t_id);
}
+ showAssign(t_id);
+ }
+ function showAssign(t_id)
+ {
+ if (t_id.length >= 1) {
+ $('#assign_Ticket').css('display', 'inline');
+ } else {
+ $('#assign_Ticket').css('display', 'none');
+ }
}
@stop
\ No newline at end of file
diff --git a/resources/views/themes/default1/agent/helpdesk/ticket/overdue.blade.php b/resources/views/themes/default1/agent/helpdesk/ticket/overdue.blade.php
index 1e001a05f..ab3a506c9 100644
--- a/resources/views/themes/default1/agent/helpdesk/ticket/overdue.blade.php
+++ b/resources/views/themes/default1/agent/helpdesk/ticket/overdue.blade.php
@@ -74,6 +74,7 @@ if ($i == 0) {
+
@@ -181,7 +182,41 @@ if ($i == 0) {
-
+
+
+
+
+
+
+
+
+
+
+

+
+
+
+
+
+ {!! Form::open(['id'=>'assign-form','method' => 'PATCH'] )!!}
+
+
+
+
+
+
+
+
+
+
+
@@ -236,12 +271,14 @@ if ($i == 0) {
t_id = $('.selectval').map(function() {
return $(this).val();
}).get();
+ showAssign(t_id);
// alert(checkboxValues);
} else {
//Check all checkboxes
$("input[type='checkbox']", ".mailbox-messages").iCheck("check");
// alert('Hallo');
t_id = [];
+ showAssign(t_id);
}
$(this).data("clicks", !clicks);
@@ -434,6 +471,50 @@ if ($i == 0) {
return false;
});
+ $('#AssignTickets').on('show.bs.modal', function() {
+ $.ajax({
+ type: "POST",
+ url: "{{route('get-agents')}}",
+ dataType: "html",
+ beforeSend: function() {
+ $("#assign_body").hide();
+ $("#assign_loader").show();
+ },
+ success: function(data) {
+ $("#assign_loader").hide();
+ $("#assign_body").show();
+ $('#select-assign-agent').html(data);
+ }
+ });
+ });
+
+ // Assign a ticket
+ $('#assign-form').on('submit', function() {
+ $.ajax({
+ type: "POST",
+ url: "../ticket/assign/"+t_id,
+ dataType: "html",
+ data: $(this).serialize(),
+ beforeSend: function() {
+ $("#assign_body").hide();
+ $("#assign_loader").show();
+ },
+ success: function(response) {
+ if (response == 1)
+ {
+ location.reload();
+ var message = "Success!";
+ $("#alert11").show();
+ $('#message-success1').html(message);
+ setInterval(function(){$("#dismiss11").trigger("click"); }, 2000);
+ }
+ $("#assign_body").show();
+ $("#assign_loader").hide();
+ $("#dismis4").trigger("click");
+ }
+ })
+ return false;
+ });
});
@@ -453,6 +534,15 @@ if ($i == 0) {
t_id.splice(index, 1);
// alert(t_id);
}
+ showAssign(t_id);
+ }
+ function showAssign(t_id)
+ {
+ if (t_id.length >= 1) {
+ $('#assign_Ticket').css('display', 'inline');
+ } else {
+ $('#assign_Ticket').css('display', 'none');
+ }
}
diff --git a/resources/views/themes/default1/agent/helpdesk/ticket/timeline.blade.php b/resources/views/themes/default1/agent/helpdesk/ticket/timeline.blade.php
index 57fe06ee1..8ace9ca26 100644
--- a/resources/views/themes/default1/agent/helpdesk/ticket/timeline.blade.php
+++ b/resources/views/themes/default1/agent/helpdesk/ticket/timeline.blade.php
@@ -1733,7 +1733,7 @@ alert(h+20);
{
$("#refresh1").load("../thread/{{$tickets->id}} #refresh1");
// $("#t4").load("../thread/{{$tickets->id}} #t4");
- var message = "{!! Lang::get('lang.you_have_successfully_replied_to_your_ticket') !!}";
+ var message = "{!! Lang::get('lang.updated-internal-note') !!}";
$("#alert21").show();
$('#message-success2').html(message);
setInterval(function(){$("#alert21").hide(); }, 4000);
diff --git a/resources/views/themes/default1/agent/helpdesk/ticket/unassigned.blade.php b/resources/views/themes/default1/agent/helpdesk/ticket/unassigned.blade.php
index 9b3a7432d..c1d980e1f 100644
--- a/resources/views/themes/default1/agent/helpdesk/ticket/unassigned.blade.php
+++ b/resources/views/themes/default1/agent/helpdesk/ticket/unassigned.blade.php
@@ -56,6 +56,7 @@ if (Auth::user()->role == 'agent') {
+
@@ -165,7 +166,41 @@ if (Auth::user()->role == 'agent') {
-
+
+
+
+
+
+
+
+
+
+
+

+
+
+
+
+
+ {!! Form::open(['id'=>'assign-form','method' => 'PATCH'] )!!}
+
+
+
+
+
+
+
+
+
+
+
@@ -220,12 +255,14 @@ if (Auth::user()->role == 'agent') {
t_id = $('.selectval').map(function() {
return $(this).val();
}).get();
+ showAssign(t_id);
// alert(checkboxValues);
} else {
//Check all checkboxes
$("input[type='checkbox']", ".mailbox-messages").iCheck("check");
// alert('Hallo');
t_id = [];
+ showAssign(t_id);
}
$(this).data("clicks", !clicks);
@@ -408,6 +445,52 @@ if (Auth::user()->role == 'agent') {
return false;
});
+
+ $('#AssignTickets').on('show.bs.modal', function() {
+ $.ajax({
+ type: "POST",
+ url: "{{route('get-agents')}}",
+ dataType: "html",
+ beforeSend: function() {
+ $("#assign_body").hide();
+ $("#assign_loader").show();
+ },
+ success: function(data) {
+ $("#assign_loader").hide();
+ $("#assign_body").show();
+ $('#select-assign-agent').html(data);
+ }
+ });
+ });
+
+ // Assign a ticket
+ $('#assign-form').on('submit', function() {
+ $.ajax({
+ type: "POST",
+ url: "../ticket/assign/"+t_id,
+ dataType: "html",
+ data: $(this).serialize(),
+ beforeSend: function() {
+ $("#assign_body").hide();
+ $("#assign_loader").show();
+ },
+ success: function(response) {
+ if (response == 1)
+ {
+ location.reload();
+ var message = "Success!";
+ $("#alert11").show();
+ $('#message-success1').html(message);
+ setInterval(function(){$("#dismiss11").trigger("click"); }, 2000);
+ }
+ $("#assign_body").show();
+ $("#assign_loader").hide();
+ $("#dismis4").trigger("click");
+ }
+ })
+ return false;
+ });
+
});
function someFunction(id) {
@@ -426,7 +509,16 @@ if (Auth::user()->role == 'agent') {
t_id.splice(index, 1);
// alert(t_id);
}
+ showAssign(t_id);
}
+ function showAssign(t_id)
+ {
+ if (t_id.length >= 1) {
+ $('#assign_Ticket').css('display', 'inline');
+ } else {
+ $('#assign_Ticket').css('display', 'none');
+ }
+ }
@stop
\ No newline at end of file
diff --git a/resources/views/themes/default1/agent/helpdesk/user/profile-edit.blade.php b/resources/views/themes/default1/agent/helpdesk/user/profile-edit.blade.php
index df6e26c88..994944025 100644
--- a/resources/views/themes/default1/agent/helpdesk/user/profile-edit.blade.php
+++ b/resources/views/themes/default1/agent/helpdesk/user/profile-edit.blade.php
@@ -161,21 +161,21 @@ class="active"
{!! Form::label('old_password',Lang::get('lang.old_password')) !!} *
- {!! Form::password('old_password',['placeholder'=>Lang::get('lang.old_password'),'class' => 'form-control']) !!}
+ {!! Form::password('old_password',['class' => 'form-control']) !!}
{!! $errors->first('old_password', ':message') !!}
{!! Form::label('new_password',Lang::get('lang.new_password')) !!} *
- {!! Form::password('new_password',['placeholder'=>Lang::get('lang.new_password'),'class' => 'form-control']) !!}
+ {!! Form::password('new_password',['class' => 'form-control']) !!}
{!! $errors->first('new_password', ':message') !!}
{!! Form::label('confirm_password',Lang::get('lang.confirm_password')) !!} *
- {!! Form::password('confirm_password',['placeholder'=>Lang::get('lang.confirm_password'),'class' => 'form-control']) !!}
+ {!! Form::password('confirm_password',['class' => 'form-control']) !!}
{!! $errors->first('confirm_password', ':message') !!}
diff --git a/resources/views/themes/default1/agent/layout/agent.blade.php b/resources/views/themes/default1/agent/layout/agent.blade.php
index 66b78f5cb..f6b038195 100644
--- a/resources/views/themes/default1/agent/layout/agent.blade.php
+++ b/resources/views/themes/default1/agent/layout/agent.blade.php
@@ -594,4 +594,17 @@
@yield('FooterInclude')