update v1.0.7.9 R.C.
This is a Release Candidate. We are still testing.
This commit is contained in:
@@ -17,7 +17,24 @@ class="active"
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
|
||||
<!-- check whether success or not -->
|
||||
{{-- Success message --}}
|
||||
@if(Session::has('success'))
|
||||
<div class="alert alert-success alert-dismissable">
|
||||
<i class="fa fa-check-circle"></i>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('success')}}
|
||||
</div>
|
||||
@endif
|
||||
{{-- failure message --}}
|
||||
@if(Session::has('fails'))
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<i class="fa fa-ban"></i>
|
||||
<b>{!! Lang::get('lang.alert') !!}!</b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('fails')}}
|
||||
</div>
|
||||
@endif
|
||||
<link type="text/css" href="{{asset("lb-faveo/css/bootstrap-datetimepicker4.7.14.min.css")}}" rel="stylesheet">
|
||||
{{-- <script src="{{asset("lb-faveo/dist/js/bootstrap-datetimepicker4.7.14.min.js")}}" type="text/javascript"></script> --}}
|
||||
<div class="row">
|
||||
@@ -169,17 +186,18 @@ class="active"
|
||||
{!! Form::label('filter', 'Filter:',['class' => 'lead']) !!}<br>
|
||||
<input type="submit" class="btn btn-primary">
|
||||
</div>
|
||||
<div class="col-sm-7">
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-1"></div>
|
||||
<div class="col-sm-2" style="margin-bottom:-20px;">
|
||||
<label class="lead">{!! Lang::get('lang.Legend') !!}:</label>
|
||||
<div class="row">
|
||||
<style>
|
||||
#legend-holder { border: 1px solid #ccc; float: left; width: 25px; height: 25px; margin: 1px; }
|
||||
</style>
|
||||
<div class="col-md-4"><span id="legend-holder" style="background-color: #6C96DF;"></span> <span class="lead"> <span id="total-created-tickets" ></span> {!! Lang::get('lang.tickets') !!} {!! Lang::get('lang.created') !!}</span></div>
|
||||
<div class="col-md-4"><span id="legend-holder" style="background-color: #6DC5B2;"></span> <span class="lead"> <span id="total-reopen-tickets" class="lead"></span> {!! Lang::get('lang.tickets') !!} {!! Lang::get('lang.reopen') !!}</span></div>
|
||||
<div class="col-md-4"><span id="legend-holder" style="background-color: #E3B870;"></span> <span class="lead"> <span id="total-closed-tickets" class="lead"></span> {!! Lang::get('lang.tickets') !!} {!! Lang::get('lang.closed') !!}</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<style>
|
||||
#legend-holder { border: 1px solid #ccc; float: left; width: 25px; height: 25px; margin: 1px; }
|
||||
</style>
|
||||
<div class="col-md-3"><span id="legend-holder" style="background-color: #6C96DF;"></span> <span class="lead"> <span id="total-created-tickets" ></span> {!! Lang::get('lang.tickets') !!} {!! Lang::get('lang.created') !!}</span></div>
|
||||
<div class="col-md-3"><span id="legend-holder" style="background-color: #6DC5B2;"></span> <span class="lead"> <span id="total-reopen-tickets" class="lead"></span> {!! Lang::get('lang.tickets') !!} {!! Lang::get('lang.reopen') !!}</span></div>
|
||||
<div class="col-md-3"><span id="legend-holder" style="background-color: #E3B870;"></span> <span class="lead"> <span id="total-closed-tickets" class="lead"></span> {!! Lang::get('lang.tickets') !!} {!! Lang::get('lang.closed') !!}</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -21,16 +21,15 @@ class="active"
|
||||
$date_time_format = UTC::getDateTimeFormat();
|
||||
$dept = App\Model\helpdesk\Agent\Department::where('name','=',$id)->first();
|
||||
if(Auth::user()->role == 'agent') {
|
||||
|
||||
$tickets = App\Model\helpdesk\Ticket\Tickets::where('status','=','2')->where('dept_id','=',$dept->id)->orderBy('id', 'DESC')->paginate(20);
|
||||
$tickets = App\Model\helpdesk\Ticket\Tickets::where('status','=','2')->where('status','=','3')->where('dept_id','=',$dept->id)->orderBy('id', 'DESC')->paginate(20);
|
||||
} else {
|
||||
$tickets = App\Model\helpdesk\Ticket\Tickets::where('status','=','2')->where('dept_id','=',$dept->id)->orderBy('id', 'DESC')->paginate(20);
|
||||
$tickets = App\Model\helpdesk\Ticket\Tickets::where('status','=','2')->where('status','=','3')->where('dept_id','=',$dept->id)->orderBy('id', 'DESC')->paginate(20);
|
||||
}
|
||||
?>
|
||||
<!-- Main content -->
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{!! Lang::get('lang.open') !!} </h3> <small id="title_refresh">{!! $tickets->total() !!} {!! Lang::get('lang.tickets') !!}</small>
|
||||
<h3 class="box-title">{!! $dept->name !!} / {!! Lang::get('lang.closed') !!} </h3> <small id="title_refresh">{!! $tickets->total() !!} {!! Lang::get('lang.tickets') !!}</small>
|
||||
<div class="box-tools pull-right">
|
||||
<div class="has-feedback">
|
||||
|
||||
@@ -63,6 +62,7 @@ $dept = App\Model\helpdesk\Agent\Department::where('name','=',$id)->first();
|
||||
<input type="submit" class="submit btn btn-default text-blue btn-sm" id="close" name="submit" value="{!! Lang::get('lang.open') !!}">
|
||||
<!-- <button type="button" class="btn btn-sm btn-default text-green" id="Edit_Ticket" data-toggle="modal" data-target="#MergeTickets"><i class="fa fa-code-fork"> </i> {!! Lang::get('lang.merge') !!}</button>
|
||||
--> </div>
|
||||
<p><p/>
|
||||
<div class="mailbox-messages" id="refresh">
|
||||
<p style="display:none;text-align:center; position:fixed; margin-left:40%;margin-top:-70px;" id="show" class="text-red"><b>{!! Lang::get('lang.loading') !!}...</b></p>
|
||||
<!-- table -->
|
||||
@@ -76,37 +76,7 @@ $dept = App\Model\helpdesk\Agent\Department::where('name','=',$id)->first();
|
||||
Lang::get('lang.assigned_to'),
|
||||
Lang::get('lang.last_activity'))
|
||||
->setUrl(route('get.dept.close', $dept->id))
|
||||
->setOptions('aoColumnDefs',array(
|
||||
array(
|
||||
'render' => "function ( data, type, row ) {
|
||||
var t = row[6].split(/[- :,/ :,. /]/);
|
||||
var d = new Date(t[0], t[1]-1, t[2], t[3], t[4], t[5]);
|
||||
<!-- -->
|
||||
var dtf= '$date_time_format';
|
||||
if(dtf==1) {
|
||||
dtf = 'D/MMM/YYYY hh:mm:ss A';
|
||||
} else if(dtf==2) {
|
||||
dtf = 'D MMM, YYYY hh:mm:ss A';
|
||||
} else if(dtf==3) {
|
||||
dtf = 'D-MMM-YYYY hh:mm:ss A';
|
||||
} else if(dtf==4) {
|
||||
dtf = 'MMM/D/YYYY hh:mm:ss A';
|
||||
} else if(dtf==5) {
|
||||
dtf = 'MMM D, YYYY hh:mm:ss A';
|
||||
} else if(dtf==6) {
|
||||
dtf = 'MMM-D-YYYY hh:mm:ss A';
|
||||
} else if(dtf==7) {
|
||||
dtf = 'YYYY/MMM/D hh:mm:ss A';
|
||||
} else if(dtf==8) {
|
||||
dtf = 'YYYY, MMM D hh:mm:ss A';
|
||||
} else if(dtf==9) {
|
||||
dtf = 'YYYY-MMM-D hh:mm:ss A';
|
||||
}
|
||||
return moment(d).format(dtf);
|
||||
<!-- //return d; -->
|
||||
}",
|
||||
'aTargets' => array(6))
|
||||
))
|
||||
|
||||
->setOrder(array(6=>'desc'))
|
||||
->setClass('table table-hover table-bordered table-striped')
|
||||
->setCallbacks("fnRowCallback",'function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) {
|
||||
|
||||
@@ -21,17 +21,17 @@ class="active"
|
||||
<?php
|
||||
$date_time_format = UTC::getDateTimeFormat();
|
||||
$dept = App\Model\helpdesk\Agent\Department::where('name', '=', $id)->first();
|
||||
if (Auth::user()->role == 'agent') {
|
||||
|
||||
$tickets = App\Model\helpdesk\Ticket\Tickets::where('status', '=', '1')->where('assigned_to', '>', 0)->where('dept_id', '=', $dept->id)->orderBy('id', 'DESC')->paginate(20);
|
||||
if (Auth::user()->role == 'agent') {
|
||||
$tickets = App\Model\helpdesk\Ticket\Tickets::where('status', '=', '1')->where('assigned_to', '>', 0)
|
||||
->where('dept_id', '=', $dept->id)->orderBy('id', 'DESC')->count();
|
||||
} else {
|
||||
$tickets = App\Model\helpdesk\Ticket\Tickets::where('status', '=', '1')->where('assigned_to', '>', 0)->where('dept_id', '=', $dept->id)->orderBy('id', 'DESC')->paginate(20);
|
||||
$tickets = App\Model\helpdesk\Ticket\Tickets::where('status', '=', '1')->where('assigned_to', '>', 0)->where('dept_id', '=', $dept->id)->orderBy('id', 'DESC')->count();
|
||||
}
|
||||
?>
|
||||
<!-- Main content -->
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{!! Lang::get('lang.inprogress') !!} </h3> <small id="title_refresh">{!! $tickets->total() !!} {!! Lang::get('lang.tickets') !!}</small>
|
||||
<h3 class="box-title">{!! $dept->name !!} / {!! Lang::get('lang.assigned') !!} </h3> <small id="title_refresh">{!! $tickets !!} {!! Lang::get('lang.tickets') !!}</small>
|
||||
<div class="box-tools pull-right">
|
||||
<div class="has-feedback">
|
||||
|
||||
@@ -64,6 +64,7 @@ if (Auth::user()->role == 'agent') {
|
||||
<input type="submit" class="submit btn btn-default text-yellow btn-sm" id="close" name="submit" value="{!! Lang::get('lang.close') !!}">
|
||||
<button type="button" class="btn btn-sm btn-default text-green" id="Edit_Ticket" data-toggle="modal" data-target="#MergeTickets"><i class="fa fa-code-fork"> </i> {!! Lang::get('lang.merge') !!}</button>
|
||||
</div>
|
||||
<p><p/>
|
||||
<div class="mailbox-messages" id="refresh">
|
||||
<p style="display:none;text-align:center; position:fixed; margin-left:40%;margin-top:-70px;" id="show" class="text-red"><b>{!! Lang::get('lang.loading') !!}...</b></p>
|
||||
<!-- table -->
|
||||
@@ -77,37 +78,7 @@ if (Auth::user()->role == 'agent') {
|
||||
Lang::get('lang.assigned_to'),
|
||||
Lang::get('lang.last_activity'))
|
||||
->setUrl(route('get.dept.inprocess', $dept->id))
|
||||
->setOptions('aoColumnDefs',array(
|
||||
array(
|
||||
'render' => "function ( data, type, row ) {
|
||||
var t = row[6].split(/[- :,/ :,. /]/);
|
||||
var d = new Date(t[0], t[1]-1, t[2], t[3], t[4], t[5]);
|
||||
<!-- -->
|
||||
var dtf= '$date_time_format';
|
||||
if(dtf==1) {
|
||||
dtf = 'D/MMM/YYYY hh:mm:ss A';
|
||||
} else if(dtf==2) {
|
||||
dtf = 'D MMM, YYYY hh:mm:ss A';
|
||||
} else if(dtf==3) {
|
||||
dtf = 'D-MMM-YYYY hh:mm:ss A';
|
||||
} else if(dtf==4) {
|
||||
dtf = 'MMM/D/YYYY hh:mm:ss A';
|
||||
} else if(dtf==5) {
|
||||
dtf = 'MMM D, YYYY hh:mm:ss A';
|
||||
} else if(dtf==6) {
|
||||
dtf = 'MMM-D-YYYY hh:mm:ss A';
|
||||
} else if(dtf==7) {
|
||||
dtf = 'YYYY/MMM/D hh:mm:ss A';
|
||||
} else if(dtf==8) {
|
||||
dtf = 'YYYY, MMM D hh:mm:ss A';
|
||||
} else if(dtf==9) {
|
||||
dtf = 'YYYY-MMM-D hh:mm:ss A';
|
||||
}
|
||||
return moment(d).format(dtf);
|
||||
<!-- //return d; -->
|
||||
}",
|
||||
'aTargets' => array(6))
|
||||
))
|
||||
|
||||
->setOrder(array(6=>'desc'))
|
||||
->setClass('table table-hover table-bordered table-striped')
|
||||
->setCallbacks("fnRowCallback",'function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) {
|
||||
|
||||
@@ -20,19 +20,19 @@ class="active"
|
||||
<?php
|
||||
$date_time_format = UTC::getDateTimeFormat();
|
||||
$dept = App\Model\helpdesk\Agent\Department::where('name','=',$id)->first();
|
||||
if(Auth::user()->role == 'agent') {
|
||||
$tickets = App\Model\helpdesk\Ticket\Tickets::where('status','=','1')->where('isanswered','=', 0)->where('dept_id','=',$dept->id)->orderBy('id', 'DESC')->paginate(20);
|
||||
} else {
|
||||
$tickets = App\Model\helpdesk\Ticket\Tickets::where('status','=','1')->where('isanswered','=', 0)->where('dept_id','=',$dept->id)->orderBy('id', 'DESC')->paginate(20);
|
||||
}
|
||||
if (Auth::user()->role == 'admin') {
|
||||
$tickets = App\Model\helpdesk\Ticket\Tickets::where('status', '=', 1)->where('isanswered', '=', 0)->where('dept_id', '=', $dept->id)->count();
|
||||
} else {
|
||||
$dept = App\Model\helpdesk\Agent\Department::where('id', '=', Auth::user()->primary_dpt)->first();
|
||||
$tickets = App\Model\helpdesk\Ticket\Tickets::where('status', '=', 1)->where('isanswered', '=', 0)->where('dept_id', '=', $dept->id)->count();
|
||||
}
|
||||
?>
|
||||
<!-- Main content -->
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{!! Lang::get('lang.open') !!} </h3> <small id="title_refresh">{!! $tickets->total() !!} {!! Lang::get('lang.tickets') !!}</small>
|
||||
<h3 class="box-title">{!! $dept->name !!} / {!! Lang::get('lang.open') !!} <small id="title_refresh">{!! $tickets !!} {!! Lang::get('lang.tickets') !!}</small></h3>
|
||||
<div class="box-tools pull-right">
|
||||
<div class="has-feedback">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- /.box-header -->
|
||||
@@ -62,6 +62,7 @@ $dept = App\Model\helpdesk\Agent\Department::where('name','=',$id)->first();
|
||||
<input type="submit" class="submit btn btn-default text-yellow btn-sm" id="close" name="submit" value="{!! Lang::get('lang.close') !!}">
|
||||
<button type="button" class="btn btn-sm btn-default text-green" id="Edit_Ticket" data-toggle="modal" data-target="#MergeTickets"><i class="fa fa-code-fork"> </i> {!! Lang::get('lang.merge') !!}</button>
|
||||
</div>
|
||||
<p><p/>
|
||||
<div class="mailbox-messages" id="refresh">
|
||||
<p style="display:none;text-align:center; position:fixed; margin-left:40%;margin-top:-70px;" id="show" class="text-red"><b>{!! Lang::get('lang.loading') !!}...</b></p>
|
||||
<!-- table -->
|
||||
@@ -75,37 +76,7 @@ $dept = App\Model\helpdesk\Agent\Department::where('name','=',$id)->first();
|
||||
Lang::get('lang.assigned_to'),
|
||||
Lang::get('lang.last_activity'))
|
||||
->setUrl(route('get.dept.open', $dept->id))
|
||||
->setOptions('aoColumnDefs',array(
|
||||
array(
|
||||
'render' => "function ( data, type, row ) {
|
||||
var t = row[6].split(/[- :,/ :,. /]/);
|
||||
var d = new Date(t[0], t[1]-1, t[2], t[3], t[4], t[5]);
|
||||
<!-- -->
|
||||
var dtf= '$date_time_format';
|
||||
if(dtf==1) {
|
||||
dtf = 'D/MMM/YYYY hh:mm:ss A';
|
||||
} else if(dtf==2) {
|
||||
dtf = 'D MMM, YYYY hh:mm:ss A';
|
||||
} else if(dtf==3) {
|
||||
dtf = 'D-MMM-YYYY hh:mm:ss A';
|
||||
} else if(dtf==4) {
|
||||
dtf = 'MMM/D/YYYY hh:mm:ss A';
|
||||
} else if(dtf==5) {
|
||||
dtf = 'MMM D, YYYY hh:mm:ss A';
|
||||
} else if(dtf==6) {
|
||||
dtf = 'MMM-D-YYYY hh:mm:ss A';
|
||||
} else if(dtf==7) {
|
||||
dtf = 'YYYY/MMM/D hh:mm:ss A';
|
||||
} else if(dtf==8) {
|
||||
dtf = 'YYYY, MMM D hh:mm:ss A';
|
||||
} else if(dtf==9) {
|
||||
dtf = 'YYYY-MMM-D hh:mm:ss A';
|
||||
}
|
||||
return moment(d).format(dtf);
|
||||
<!-- //return d; -->
|
||||
}",
|
||||
'aTargets' => array(6))
|
||||
))
|
||||
|
||||
->setOrder(array(6=>'desc'))
|
||||
->setClass('table table-hover table-bordered table-striped')
|
||||
->setCallbacks("fnRowCallback",'function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) {
|
||||
|
||||
@@ -49,16 +49,16 @@ class="active"
|
||||
<div class="box-footer no-padding">
|
||||
<ul class="nav nav-stacked">
|
||||
@if($orgs->phone)<li><a>
|
||||
<b>{!! Lang::get('lang.phone') !!}</b>
|
||||
<span class="pull-right"> {{$orgs->phone}}</span></a></li>@endif
|
||||
<b>{!! Lang::get('lang.phone') !!}</b>
|
||||
<span class="pull-right"> {{$orgs->phone}}</span></a></li>@endif
|
||||
@if($orgs->address)<li><a>
|
||||
<b>{!! Lang::get('lang.address') !!}</b>
|
||||
<br/> <center>{!! $orgs->address !!}</center></a></li>@endif
|
||||
<b>{!! Lang::get('lang.address') !!}</b>
|
||||
<br/> <center>{!! $orgs->address !!}</center></a></li>@endif
|
||||
@if($orgs->internal_notes)<li><a>
|
||||
<b>{!! Lang::get('lang.internal_notes') !!}</b>
|
||||
<br/> <center>{!! $orgs->internal_notes !!}</center></a></li>@endif
|
||||
<b>{!! Lang::get('lang.internal_notes') !!}</b>
|
||||
<br/> <center>{!! $orgs->internal_notes !!}</center></a></li>@endif
|
||||
</ul>
|
||||
<button data-toggle="modal" data-target="#assign_head" id="button_select" class="btn btn-primary btn-flat btn-block">{!! Lang::get('lang.select_department_manager') !!}</button>
|
||||
<button data-toggle="modal" data-target="#assign_head" id="button_select" class="btn btn-primary btn-flat btn-block">{!! Lang::get('lang.select_organization_manager') !!}</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="refresh1">
|
||||
@@ -130,13 +130,9 @@ class="active"
|
||||
foreach ($user_orga_relations as $user_orga_relation) {
|
||||
$user_orga_relation_id[] = $user_orga_relation->user_id;
|
||||
}
|
||||
// dd($user_orga_relation_id);
|
||||
// $models = \App\Model\helpdesk\Ticket\Tickets::whereIn('user_id', $user_orga_relation_id)->get();
|
||||
|
||||
$open = count(\App\Model\helpdesk\Ticket\Tickets::whereIn('user_id', $user_orga_relation_id)->where('status', '=', '1')->get());
|
||||
$counted = count(\App\Model\helpdesk\Ticket\Tickets::whereIn('user_id', $user_orga_relation_id)->where('status', '=', '2')->get());
|
||||
$deleted = count(\App\Model\helpdesk\Ticket\Tickets::whereIn('user_id', $user_orga_relation_id)->where('status', '=', '5')->get());
|
||||
// dd($open);
|
||||
?>
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs">
|
||||
@@ -245,7 +241,7 @@ class="active"
|
||||
@if($attach > 0) <i class="fa fa-paperclip"></i>@endif</td>
|
||||
<td class="mailbox-Id"><a href="{!! route('ticket.thread',[$ticket->id]) !!}" title="{!! $title->title !!}">#{!! $ticket->ticket_number !!}</a></td>
|
||||
<?php $priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('priority_id', '=', $ticket->priority_id)->first(); ?>
|
||||
<td class="mailbox-priority"><spam class="btn btn-{{$priority->priority_color}} btn-xs">{{$priority->priority}}</spam></td>
|
||||
<td class="mailbox-priority">@if($priority != null)<spam class="btn btn-{{$priority->priority_color}} btn-xs">{{$priority->priority}}</spam>@endif</td>
|
||||
<?php $from = App\User::where('id', '=', $ticket->user_id)->first(); ?>
|
||||
<td class="mailbox-last-reply" style="color:{!! $rep !!}">{!! $username !!}</td>
|
||||
<td>{!! $assigned !!}</td>
|
||||
@@ -363,7 +359,7 @@ class="active"
|
||||
@if($attach > 0) <i class="fa fa-paperclip"></i>@endif</td>
|
||||
<td class="mailbox-Id"><a href="{!! route('ticket.thread',[$ticket->id]) !!}" title="{!! $title->title !!}">#{!! $ticket->ticket_number !!}</a></td>
|
||||
<?php $priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('priority_id', '=', $ticket->priority_id)->first(); ?>
|
||||
<td class="mailbox-priority"><spam class="btn btn-{{$priority->priority_color}} btn-xs">{{$priority->priority}}</spam></td>
|
||||
<td class="mailbox-priority">@if($priority != null)<spam class="btn btn-{{$priority->priority_color}} btn-xs">{{$priority->priority}}</spam>@endif</td>
|
||||
<?php $from = App\User::where('id', '=', $ticket->user_id)->first(); ?>
|
||||
<td class="mailbox-last-reply" style="color:{!! $rep !!}">{!! $username !!}</td>
|
||||
<td>{!! $assigned !!}</td>
|
||||
@@ -485,7 +481,7 @@ class="active"
|
||||
@if($attach > 0) <i class="fa fa-paperclip"></i>@endif</td>
|
||||
<td class="mailbox-Id"><a href="{!! route('ticket.thread',[$ticket->id]) !!}" title="{!! $title->title !!}">#{!! $ticket->ticket_number !!}</a></td>
|
||||
<?php $priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('priority_id', '=', $ticket->priority_id)->first(); ?>
|
||||
<td class="mailbox-priority"><spam class="btn btn-{{$priority->priority_color}} btn-xs">{{$priority->priority}}</spam></td>
|
||||
<td class="mailbox-priority">@if($priority != null)<spam class="btn btn-{{$priority->priority_color}} btn-xs">{{$priority->priority}}</spam>@endif</td>
|
||||
<?php $from = App\User::where('id', '=', $ticket->user_id)->first(); ?>
|
||||
<td class="mailbox-last-reply" style="color:{!! $rep !!}">{!! $username !!}</td>
|
||||
<td>{!! $assigned !!}</td>
|
||||
|
||||
@@ -60,6 +60,7 @@ if (Auth::user()->role == 'agent') {
|
||||
<input type="submit" class="submit btn btn-default text-yellow btn-sm" id="close" name="submit" value="{!! Lang::get('lang.close') !!}">
|
||||
<button type="button" class="btn btn-sm btn-default text-green" id="Edit_Ticket" data-toggle="modal" data-target="#MergeTickets"><i class="fa fa-code-fork"> </i> {!! Lang::get('lang.merge') !!}</button>
|
||||
<!--</div>-->
|
||||
<p><p/>
|
||||
<div class="mailbox-messages" id="refresh">
|
||||
<p style="display:none;text-align:center; position:fixed; margin-left:40%;margin-top:-70px;" id="show" class="text-red"><b>{!! Lang::get('lang.loading') !!}...</b></p>
|
||||
<!-- table -->
|
||||
@@ -73,37 +74,7 @@ if (Auth::user()->role == 'agent') {
|
||||
Lang::get('lang.assigned_to'),
|
||||
Lang::get('lang.last_activity'))
|
||||
->setUrl(route('get.answered.ticket'))
|
||||
->setOptions('aoColumnDefs',array(
|
||||
array(
|
||||
'render' => "function ( data, type, row ) {
|
||||
var t = row[6].split(/[- :,/ :,. /]/);
|
||||
var d = new Date(t[0], t[1]-1, t[2], t[3], t[4], t[5]);
|
||||
<!-- -->
|
||||
var dtf= '$date_time_format';
|
||||
if(dtf==1) {
|
||||
dtf = 'D/MMM/YYYY hh:mm:ss A';
|
||||
} else if(dtf==2) {
|
||||
dtf = 'D MMM, YYYY hh:mm:ss A';
|
||||
} else if(dtf==3) {
|
||||
dtf = 'D-MMM-YYYY hh:mm:ss A';
|
||||
} else if(dtf==4) {
|
||||
dtf = 'MMM/D/YYYY hh:mm:ss A';
|
||||
} else if(dtf==5) {
|
||||
dtf = 'MMM D, YYYY hh:mm:ss A';
|
||||
} else if(dtf==6) {
|
||||
dtf = 'MMM-D-YYYY hh:mm:ss A';
|
||||
} else if(dtf==7) {
|
||||
dtf = 'YYYY/MMM/D hh:mm:ss A';
|
||||
} else if(dtf==8) {
|
||||
dtf = 'YYYY, MMM D hh:mm:ss A';
|
||||
} else if(dtf==9) {
|
||||
dtf = 'YYYY-MMM-D hh:mm:ss A';
|
||||
}
|
||||
return moment(d).format(dtf);
|
||||
<!-- //return d; -->
|
||||
}",
|
||||
'aTargets' => array(6))
|
||||
))
|
||||
|
||||
->setOrder(array(6=>'desc'))
|
||||
->setClass('table table-hover table-bordered table-striped')
|
||||
->setCallbacks("fnRowCallback",'function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) {
|
||||
|
||||
@@ -55,6 +55,7 @@ if (Auth::user()->role == 'agent') {
|
||||
<input type="submit" class="submit btn btn-default text-yellow btn-sm" id="close" name="submit" value="{!! Lang::get('lang.close') !!}">
|
||||
<button type="button" class="btn btn-sm btn-default text-green" id="Edit_Ticket" data-toggle="modal" data-target="#MergeTickets"><i class="fa fa-code-fork"> </i> {!! Lang::get('lang.merge') !!}</button>
|
||||
<!--</div>-->
|
||||
<p><p/>
|
||||
<div class="mailbox-messages" id="refresh">
|
||||
<p style="display:none;text-align:center; position:fixed; margin-left:40%;margin-top:-70px;" id="show" class="text-red"><b>{!! Lang::get('lang.loading') !!}...</b></p>
|
||||
<!-- table -->
|
||||
@@ -68,37 +69,7 @@ if (Auth::user()->role == 'agent') {
|
||||
Lang::get('lang.assigned_to'),
|
||||
Lang::get('lang.last_activity'))
|
||||
->setUrl(route('get.assigned.ticket'))
|
||||
->setOptions('aoColumnDefs',array(
|
||||
array(
|
||||
'render' => "function ( data, type, row ) {
|
||||
var t = row[6].split(/[- :,/ :,. /]/);
|
||||
var d = new Date(t[0], t[1]-1, t[2], t[3], t[4], t[5]);
|
||||
<!-- -->
|
||||
var dtf= '$date_time_format';
|
||||
if(dtf==1) {
|
||||
dtf = 'D/MMM/YYYY hh:mm:ss A';
|
||||
} else if(dtf==2) {
|
||||
dtf = 'D MMM, YYYY hh:mm:ss A';
|
||||
} else if(dtf==3) {
|
||||
dtf = 'D-MMM-YYYY hh:mm:ss A';
|
||||
} else if(dtf==4) {
|
||||
dtf = 'MMM/D/YYYY hh:mm:ss A';
|
||||
} else if(dtf==5) {
|
||||
dtf = 'MMM D, YYYY hh:mm:ss A';
|
||||
} else if(dtf==6) {
|
||||
dtf = 'MMM-D-YYYY hh:mm:ss A';
|
||||
} else if(dtf==7) {
|
||||
dtf = 'YYYY/MMM/D hh:mm:ss A';
|
||||
} else if(dtf==8) {
|
||||
dtf = 'YYYY, MMM D hh:mm:ss A';
|
||||
} else if(dtf==9) {
|
||||
dtf = 'YYYY-MMM-D hh:mm:ss A';
|
||||
}
|
||||
return moment(d).format(dtf);
|
||||
<!-- //return d; -->
|
||||
}",
|
||||
'aTargets' => array(6))
|
||||
))
|
||||
|
||||
->setOrder(array(6=>'desc'))
|
||||
->setClass('table table-hover table-bordered table-striped')
|
||||
->setCallbacks("fnRowCallback",'function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) {
|
||||
|
||||
@@ -55,6 +55,7 @@ if (Auth::user()->role == 'agent') {
|
||||
<input type="submit" class="btn btn-default text-orange btn-sm" name="submit" id="delete" value="{!! Lang::get('lang.delete') !!}">
|
||||
<input type="submit" class="btn btn-default text-blue btn-sm" name="submit" id="close" value="{!! Lang::get('lang.open') !!}">
|
||||
<!--</div>-->
|
||||
<p><p/>
|
||||
<div class="mailbox-messages" id="refresh">
|
||||
<p style="display:none;text-align:center; position:fixed; margin-left:40%;margin-top:-70px;" id="show" class="text-red"><b>{!! Lang::get('lang.loading') !!}...</b></p>
|
||||
<!-- table -->
|
||||
@@ -68,37 +69,7 @@ if (Auth::user()->role == 'agent') {
|
||||
Lang::get('lang.assigned_to'),
|
||||
Lang::get('lang.last_activity'))
|
||||
->setUrl(route('get.closed.ticket'))
|
||||
->setOptions('aoColumnDefs',array(
|
||||
array(
|
||||
'render' => "function ( data, type, row ) {
|
||||
var t = row[6].split(/[- :,/ :,. /]/);
|
||||
var d = new Date(t[0], t[1]-1, t[2], t[3], t[4], t[5]);
|
||||
<!-- -->
|
||||
var dtf= '$date_time_format';
|
||||
if(dtf==1) {
|
||||
dtf = 'D/MMM/YYYY hh:mm:ss A';
|
||||
} else if(dtf==2) {
|
||||
dtf = 'D MMM, YYYY hh:mm:ss A';
|
||||
} else if(dtf==3) {
|
||||
dtf = 'D-MMM-YYYY hh:mm:ss A';
|
||||
} else if(dtf==4) {
|
||||
dtf = 'MMM/D/YYYY hh:mm:ss A';
|
||||
} else if(dtf==5) {
|
||||
dtf = 'MMM D, YYYY hh:mm:ss A';
|
||||
} else if(dtf==6) {
|
||||
dtf = 'MMM-D-YYYY hh:mm:ss A';
|
||||
} else if(dtf==7) {
|
||||
dtf = 'YYYY/MMM/D hh:mm:ss A';
|
||||
} else if(dtf==8) {
|
||||
dtf = 'YYYY, MMM D hh:mm:ss A';
|
||||
} else if(dtf==9) {
|
||||
dtf = 'YYYY-MMM-D hh:mm:ss A';
|
||||
}
|
||||
return moment(d).format(dtf);
|
||||
<!-- //return d; -->
|
||||
}",
|
||||
'aTargets' => array(6))
|
||||
))
|
||||
|
||||
->setOrder(array(6=>'desc'))
|
||||
->setClass('table table-hover table-bordered table-striped')
|
||||
->setCallbacks("fnRowCallback",'function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) {
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
$term=$_GET["term"];
|
||||
$users = app\User::where('email', 'LIKE', '%'.$term.'%')->where('active', '=', 1)->get();
|
||||
$json=array();
|
||||
foreach ($users as $user) {
|
||||
$json[] = array(
|
||||
'value'=> $user["email"],
|
||||
'label'=>'Name: '.$user["first_name"] .' '.$user["last_name"].' | '.('Email: <'.$user["email"].'>'),
|
||||
'email' =>$user["email"],
|
||||
'user_name' =>$user["user_name"],
|
||||
'first_name' =>$user["first_name"],
|
||||
'last_name' =>$user["last_name"],
|
||||
'country_code' =>$user["country_code"],
|
||||
'mobile' =>$user["mobile"],
|
||||
'phone_number' =>$user["phone_number"]
|
||||
);
|
||||
}
|
||||
echo json_encode($json);
|
||||
@@ -56,6 +56,7 @@ if (Auth::user()->role == 'agent') {
|
||||
<input type="submit" class="submit btn btn-default text-yellow btn-sm" id="close" name="submit" value="{!! Lang::get('lang.close') !!}">
|
||||
<button type="button" class="btn btn-sm btn-default text-green" id="Edit_Ticket" data-toggle="modal" data-target="#MergeTickets"><i class="fa fa-code-fork"> </i> {!! Lang::get('lang.merge') !!}</button>
|
||||
<!--</div>-->
|
||||
<p><p/>
|
||||
<div class="mailbox-messages" id="refresh">
|
||||
<!--datatable-->
|
||||
{!! Datatable::table()
|
||||
@@ -68,37 +69,7 @@ if (Auth::user()->role == 'agent') {
|
||||
Lang::get('lang.assigned_to'),
|
||||
Lang::get('lang.last_activity'))
|
||||
->setUrl(route('get.inbox.ticket'))
|
||||
->setOptions('aoColumnDefs',array(
|
||||
array(
|
||||
'render' => "function ( data, type, row ) {
|
||||
var t = row[6].split(/[- :,/ :,. /]/);
|
||||
var d = new Date(t[0], t[1]-1, t[2], t[3], t[4], t[5]);
|
||||
<!-- -->
|
||||
var dtf= '$date_time_format';
|
||||
if(dtf==1) {
|
||||
dtf = 'D/MMM/YYYY hh:mm:ss A';
|
||||
} else if(dtf==2) {
|
||||
dtf = 'D MMM, YYYY hh:mm:ss A';
|
||||
} else if(dtf==3) {
|
||||
dtf = 'D-MMM-YYYY hh:mm:ss A';
|
||||
} else if(dtf==4) {
|
||||
dtf = 'MMM/D/YYYY hh:mm:ss A';
|
||||
} else if(dtf==5) {
|
||||
dtf = 'MMM D, YYYY hh:mm:ss A';
|
||||
} else if(dtf==6) {
|
||||
dtf = 'MMM-D-YYYY hh:mm:ss A';
|
||||
} else if(dtf==7) {
|
||||
dtf = 'YYYY/MMM/D hh:mm:ss A';
|
||||
} else if(dtf==8) {
|
||||
dtf = 'YYYY, MMM D hh:mm:ss A';
|
||||
} else if(dtf==9) {
|
||||
dtf = 'YYYY-MMM-D hh:mm:ss A';
|
||||
}
|
||||
return moment(d).format(dtf);
|
||||
<!-- //return d; -->
|
||||
}",
|
||||
'aTargets' => array(6))
|
||||
))
|
||||
|
||||
->setOrder(array(6=>'desc'))
|
||||
->setClass('table table-hover table-bordered table-striped')
|
||||
->setCallbacks("fnCreatedRow", 'function( nRow, aData, iDataIndex ) {
|
||||
|
||||
@@ -56,6 +56,7 @@ if (Auth::user()->role == 'agent') {
|
||||
<input type="submit" class="submit btn btn-default text-yellow btn-sm" id="close" name="submit" value="{!! Lang::get('lang.close') !!}">
|
||||
<button type="button" class="btn btn-sm btn-default text-green" id="Edit_Ticket" data-toggle="modal" data-target="#MergeTickets"><i class="fa fa-code-fork"> </i> {!! Lang::get('lang.merge') !!}</button>
|
||||
<!--</div>-->
|
||||
<p><p/>
|
||||
<div class="mailbox-messages" id="refresh">
|
||||
<p style="display:none;text-align:center; position:fixed; margin-left:40%;margin-top:-70px;" id="show" class="text-red"><b>{!! Lang::get('lang.loading') !!}...</b></p>
|
||||
<!-- table -->
|
||||
@@ -69,37 +70,7 @@ if (Auth::user()->role == 'agent') {
|
||||
Lang::get('lang.assigned_to'),
|
||||
Lang::get('lang.last_activity'))
|
||||
->setUrl(route('get.myticket.ticket'))
|
||||
->setOptions('aoColumnDefs',array(
|
||||
array(
|
||||
'render' => "function ( data, type, row ) {
|
||||
var t = row[6].split(/[- :,/ :,. /]/);
|
||||
var d = new Date(t[0], t[1]-1, t[2], t[3], t[4], t[5]);
|
||||
<!-- -->
|
||||
var dtf= '$date_time_format';
|
||||
if(dtf==1) {
|
||||
dtf = 'D/MMM/YYYY hh:mm:ss A';
|
||||
} else if(dtf==2) {
|
||||
dtf = 'D MMM, YYYY hh:mm:ss A';
|
||||
} else if(dtf==3) {
|
||||
dtf = 'D-MMM-YYYY hh:mm:ss A';
|
||||
} else if(dtf==4) {
|
||||
dtf = 'MMM/D/YYYY hh:mm:ss A';
|
||||
} else if(dtf==5) {
|
||||
dtf = 'MMM D, YYYY hh:mm:ss A';
|
||||
} else if(dtf==6) {
|
||||
dtf = 'MMM-D-YYYY hh:mm:ss A';
|
||||
} else if(dtf==7) {
|
||||
dtf = 'YYYY/MMM/D hh:mm:ss A';
|
||||
} else if(dtf==8) {
|
||||
dtf = 'YYYY, MMM D hh:mm:ss A';
|
||||
} else if(dtf==9) {
|
||||
dtf = 'YYYY-MMM-D hh:mm:ss A';
|
||||
}
|
||||
return moment(d).format(dtf);
|
||||
<!-- //return d; -->
|
||||
}",
|
||||
'aTargets' => array(6))
|
||||
))
|
||||
|
||||
->setOrder(array(6=>'desc'))
|
||||
->setClass('table table-hover table-bordered table-striped')
|
||||
->setCallbacks("fnRowCallback",'function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) {
|
||||
|
||||
@@ -16,7 +16,10 @@ class="active"
|
||||
<h1>{{Lang::get('lang.tickets')}}</h1>
|
||||
@stop
|
||||
|
||||
|
||||
@section('content')
|
||||
|
||||
|
||||
<!-- Main content -->
|
||||
{!! Form::open(['route'=>'post.newticket','method'=>'post','id'=>'form']) !!}
|
||||
<div class="box box-primary">
|
||||
@@ -72,19 +75,29 @@ class="active"
|
||||
|
||||
<div class="form-group">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-4">
|
||||
<!-- email -->
|
||||
<div class="form-group {{ $errors->has('email') ? 'has-error' : '' }}">
|
||||
{!! Form::label('email',Lang::get('lang.email')) !!} <span class="text-red"> *</span>
|
||||
{!! Form::text('email',null,['class' => 'form-control']) !!}
|
||||
<!-- {!! Form::text('email',null,['class' => 'form-control'],['id' => 'email']) !!} -->
|
||||
<input type="text" name="email" id="email" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-4">
|
||||
<!-- email -->
|
||||
<div class="form-group {{ $errors->has('first_name') ? 'has-error' : '' }}">
|
||||
{!! Form::label('email',Lang::get('lang.first_name')) !!} <span class="text-red"> *</span>
|
||||
<!-- {!! Form::text('email',null,['class' => 'form-control'],['id' => 'email']) !!} -->
|
||||
<input type="text" name="first_name" id="first_name" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<!-- full name -->
|
||||
<div class="form-group {{ $errors->has('fullname') ? 'has-error' : '' }}">
|
||||
{!! Form::label('fullname',Lang::get('lang.full_name')) !!} <span class="text-red"> *</span>
|
||||
{!! Form::text('fullname',null,['class' => 'form-control']) !!}
|
||||
<div class="form-group {{ $errors->has('last_name') ? 'has-error' : '' }}">
|
||||
{!! Form::label('fullname',Lang::get('lang.last_name')) !!} <span class="text-red"></span>
|
||||
<input type="text" name="last_name" id="last_name" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -92,13 +105,13 @@ class="active"
|
||||
<div class="col-md-1 form-group {{ Session::has('country_code_error') ? 'has-error' : '' }}">
|
||||
|
||||
{!! Form::label('code',Lang::get('lang.country-code')) !!}
|
||||
{!! Form::text('code',null,['class' => 'form-control', 'placeholder' => $phonecode, 'title' => Lang::get('lang.enter-country-phone-code')]) !!}
|
||||
{!! Form::text('code',null,['class' => 'form-control', 'id' => 'country_code', 'placeholder' => $phonecode, 'title' => Lang::get('lang.enter-country-phone-code')]) !!}
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<!-- phone -->
|
||||
<div class="form-group {{ $errors->has('mobile') ? 'has-error' : '' }}">
|
||||
<label>{!! Lang::get('lang.mobile_number') !!}:</label>
|
||||
{!! Form::input('number','mobile',null,['class' => 'form-control']) !!}
|
||||
{!! Form::input('number','mobile',null,['class' => 'form-control', 'id' => 'mobile']) !!}
|
||||
{!! $errors->first('mobile', '<spam class="help-block text-red">:message</spam>') !!}
|
||||
</div>
|
||||
</div>
|
||||
@@ -106,7 +119,8 @@ class="active"
|
||||
<!-- phone -->
|
||||
<div class="form-group {{ $errors->has('phone') ? 'has-error' : '' }}">
|
||||
<label>{!! Lang::get('lang.phone') !!}:</label>
|
||||
{!! Form::input('number','phone',null,['class' => 'form-control']) !!}
|
||||
<input type="text" name="phone_number" id="phone_number" class="form-control">
|
||||
<!-- {!! Form::input('number','phone',null,['class' => 'form-control']) !!} -->
|
||||
{!! $errors->first('phone', '<spam class="help-block text-red">:message</spam>') !!}
|
||||
</div>
|
||||
</div>
|
||||
@@ -132,7 +146,7 @@ class="active"
|
||||
<div class="form-group">
|
||||
<label>{!! Lang::get('lang.help_topic') !!}:</label>
|
||||
<!-- helptopic -->
|
||||
<?php $helptopic = App\Model\helpdesk\Manage\Help_topic::all(); ?>
|
||||
<?php $helptopic = App\Model\helpdesk\Manage\Help_topic::where('status','=',1)->get(); ?>
|
||||
{!! Form::select('helptopic', ['Helptopic'=>$helptopic->lists('topic','id')->toArray()],null,['class' => 'form-control select']) !!}
|
||||
</div>
|
||||
</div>
|
||||
@@ -221,6 +235,24 @@ class="active"
|
||||
$("textarea").wysihtml5();
|
||||
});
|
||||
|
||||
$(document).ready(function(){
|
||||
$("#email").autocomplete({
|
||||
source:"{!!URL::route('post.newticket.autofill')!!}",
|
||||
minLength:1,
|
||||
select:function(evt, ui) {
|
||||
// this.form.phone_number.value = ui.item.phone_number;
|
||||
// this.form.user_name.value = ui.item.user_name;
|
||||
this.form.first_name.value = ui.item.first_name;
|
||||
this.form.last_name.value = ui.item.last_name;
|
||||
this.form.country_code.value = ui.item.country_code;
|
||||
this.form.phone_number.value = ui.item.phone_number;
|
||||
this.form.mobile.value = ui.item.mobile;
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#form').submit(function() {
|
||||
var duedate = document.getElementById('datemask').value;
|
||||
@@ -242,7 +274,9 @@ class="active"
|
||||
$(function() {
|
||||
$('#datemask').datepicker({changeMonth: true, changeYear: true}).mask('99/99/9999');
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
@stop
|
||||
|
||||
|
||||
@@ -61,6 +61,7 @@ if (Auth::user()->role == 'agent') {
|
||||
<input type="submit" class="submit btn btn-default text-yellow btn-sm" id="close" name="submit" value="{!! Lang::get('lang.close') !!}">
|
||||
<button type="button" class="btn btn-sm btn-default text-green" id="Edit_Ticket" data-toggle="modal" data-target="#MergeTickets"><i class="fa fa-code-fork"> </i> {!! Lang::get('lang.merge') !!}</button>
|
||||
<!--</div>-->
|
||||
<p><p/>
|
||||
<div class="mailbox-messages" id="refresh">
|
||||
<p style="display:none;text-align:center; position:fixed; margin-left:40%;margin-top:-70px;" id="show" class="text-red"><b>{!! Lang::get('lang.loading') !!}...</b></p>
|
||||
<!-- table -->
|
||||
@@ -74,37 +75,7 @@ if (Auth::user()->role == 'agent') {
|
||||
Lang::get('lang.assigned_to'),
|
||||
Lang::get('lang.last_activity'))
|
||||
->setUrl(route('get.open.ticket'))
|
||||
->setOptions('aoColumnDefs',array(
|
||||
array(
|
||||
'render' => "function ( data, type, row ) {
|
||||
var t = row[6].split(/[- :,/ :,. /]/);
|
||||
var d = new Date(t[0], t[1]-1, t[2], t[3], t[4], t[5]);
|
||||
<!-- -->
|
||||
var dtf= '$date_time_format';
|
||||
if(dtf==1) {
|
||||
dtf = 'D/MMM/YYYY hh:mm:ss A';
|
||||
} else if(dtf==2) {
|
||||
dtf = 'D MMM, YYYY hh:mm:ss A';
|
||||
} else if(dtf==3) {
|
||||
dtf = 'D-MMM-YYYY hh:mm:ss A';
|
||||
} else if(dtf==4) {
|
||||
dtf = 'MMM/D/YYYY hh:mm:ss A';
|
||||
} else if(dtf==5) {
|
||||
dtf = 'MMM D, YYYY hh:mm:ss A';
|
||||
} else if(dtf==6) {
|
||||
dtf = 'MMM-D-YYYY hh:mm:ss A';
|
||||
} else if(dtf==7) {
|
||||
dtf = 'YYYY/MMM/D hh:mm:ss A';
|
||||
} else if(dtf==8) {
|
||||
dtf = 'YYYY, MMM D hh:mm:ss A';
|
||||
} else if(dtf==9) {
|
||||
dtf = 'YYYY-MMM-D hh:mm:ss A';
|
||||
}
|
||||
return moment(d).format(dtf);
|
||||
<!-- //return d; -->
|
||||
}",
|
||||
'aTargets' => array(6))
|
||||
))
|
||||
|
||||
->setOrder(array(6=>'desc'))
|
||||
->setClass('table table-hover table-bordered table-striped')
|
||||
->setCallbacks("fnRowCallback",'function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) {
|
||||
|
||||
@@ -75,6 +75,7 @@ if ($i == 0) {
|
||||
<input type="submit" class="submit btn btn-default text-yellow btn-sm" id="close" name="submit" value="{!! Lang::get('lang.close') !!}">
|
||||
<button type="button" class="btn btn-sm btn-default text-green" id="Edit_Ticket" data-toggle="modal" data-target="#MergeTickets"><i class="fa fa-code-fork"> </i> {!! Lang::get('lang.merge') !!}</button>
|
||||
<!--</div>-->
|
||||
<p><p/>
|
||||
<div class="mailbox-messages" id="refresh">
|
||||
<!--datatable-->
|
||||
{!! Datatable::table()
|
||||
@@ -87,37 +88,7 @@ if ($i == 0) {
|
||||
Lang::get('lang.assigned_to'),
|
||||
Lang::get('lang.last_activity'))
|
||||
->setUrl(route('get.overdue.ticket'))
|
||||
->setOptions('aoColumnDefs',array(
|
||||
array(
|
||||
'render' => "function ( data, type, row ) {
|
||||
var t = row[6].split(/[- :,/ :,. /]/);
|
||||
var d = new Date(t[0], t[1]-1, t[2], t[3], t[4], t[5]);
|
||||
<!-- -->
|
||||
var dtf= '$date_time_format';
|
||||
if(dtf==1) {
|
||||
dtf = 'D/MMM/YYYY hh:mm:ss A';
|
||||
} else if(dtf==2) {
|
||||
dtf = 'D MMM, YYYY hh:mm:ss A';
|
||||
} else if(dtf==3) {
|
||||
dtf = 'D-MMM-YYYY hh:mm:ss A';
|
||||
} else if(dtf==4) {
|
||||
dtf = 'MMM/D/YYYY hh:mm:ss A';
|
||||
} else if(dtf==5) {
|
||||
dtf = 'MMM D, YYYY hh:mm:ss A';
|
||||
} else if(dtf==6) {
|
||||
dtf = 'MMM-D-YYYY hh:mm:ss A';
|
||||
} else if(dtf==7) {
|
||||
dtf = 'YYYY/MMM/D hh:mm:ss A';
|
||||
} else if(dtf==8) {
|
||||
dtf = 'YYYY, MMM D hh:mm:ss A';
|
||||
} else if(dtf==9) {
|
||||
dtf = 'YYYY-MMM-D hh:mm:ss A';
|
||||
}
|
||||
return moment(d).format(dtf);
|
||||
<!-- //return d; -->
|
||||
}",
|
||||
'aTargets' => array(6))
|
||||
))
|
||||
|
||||
->setOrder(array(6=>'desc'))
|
||||
->setClass('table table-hover table-bordered table-striped')
|
||||
->setCallbacks("fnRowCallback",'function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) {
|
||||
|
||||
@@ -2,41 +2,55 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>PDF</title>
|
||||
<!-- <link href="{{asset("downloads/bootstrap.min.css")}}" rel="stylesheet" type="text/css" /> -->
|
||||
<link href="{{asset("lb-faveo/aaaaaa/css/AdminLTE.min.css")}}" rel="stylesheet" type="text/css" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<style type="text/css">
|
||||
* {
|
||||
font-family: "DejaVu Sans Mono", monospace;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<?php
|
||||
$rtl = App\Model\helpdesk\Settings\CommonSettings::where('option_name', '=', 'enable_rtl')->first();
|
||||
if($rtl->option_value == 1) {
|
||||
echo '<body style="direction: rtl; text-align: right;">';
|
||||
} else {
|
||||
echo '<body>';
|
||||
}
|
||||
?>
|
||||
<h2>
|
||||
<div id="logo" class="site-logo text-center" style="font-size: 30px;">
|
||||
<?php
|
||||
<div id="logo" class="site-logo text-center" style="font-size: 30px;">
|
||||
<?php
|
||||
$company = App\Model\helpdesk\Settings\Company::where('id', '=', '1')->first();
|
||||
$system = App\Model\helpdesk\Settings\System::where('id', '=', '1')->first();
|
||||
?>
|
||||
@if($system->url)
|
||||
<a href="{!! $system->url !!}" rel="home">
|
||||
@else
|
||||
<a href="{{url('/')}}" rel="home">
|
||||
@endif
|
||||
@if($company->use_logo == 1)
|
||||
<img src="{{asset('lb-faveo/media/company')}}{{'/'}}{{$company->logo}}" alt="User Image" width="200px" height="200px"/>
|
||||
@else
|
||||
@if($system->name)
|
||||
{!! $system->name !!}
|
||||
@else
|
||||
<b>SUPPORT</b> CENTER
|
||||
@endif
|
||||
@endif
|
||||
</a>
|
||||
</div>
|
||||
|
||||
$system = App\Model\helpdesk\Settings\System::where('id', '=', '1')->first();
|
||||
?>
|
||||
<center>
|
||||
@if($system->url)
|
||||
<a href="{!! $system->url !!}" rel="home">
|
||||
@else
|
||||
<a href="{{url('/')}}" rel="home" style="text-decoration:none;">
|
||||
@endif
|
||||
@if($company->use_logo == 1)
|
||||
<img src="{!! public_path().'/uploads/company'.'/'.$company->logo !!}" width="100px;"/>
|
||||
@else
|
||||
@if($system->name)
|
||||
{!! $system->name !!}
|
||||
@else
|
||||
<b>SUPPORT</b> CENTER
|
||||
@endif
|
||||
@endif
|
||||
</a>
|
||||
</center>
|
||||
</div>
|
||||
</h2>
|
||||
<hr>
|
||||
<h4>{{$thread->title}}</h4><br/>
|
||||
<hr>
|
||||
<h4>{!! $thread->title !!}</h4><br/>
|
||||
|
||||
<?php $ticket_source = App\Model\helpdesk\Ticket\Ticket_source::where('id','=',$tickets->source)->first();
|
||||
<?php
|
||||
$ticket_source = App\Model\helpdesk\Ticket\Ticket_source::where('id', '=', $tickets->source)->first();
|
||||
$ticket_source = $ticket_source->value;
|
||||
|
||||
$user = App\User::where('id', '=', $tickets->user_id)->first(); ?>
|
||||
$user = App\User::where('id', '=', $tickets->user_id)->first();
|
||||
?>
|
||||
<?php $response = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $tickets->id)->get(); ?>
|
||||
@foreach($response as $last)
|
||||
<?php $ResponseDate = $last->created_at; ?>
|
||||
@@ -46,7 +60,7 @@
|
||||
<?php $priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('priority_id', '=', $tickets->priority_id)->first(); ?>
|
||||
<?php $help_topic = App\Model\helpdesk\Manage\Help_topic::where('id', '=', $tickets->help_topic_id)->first(); ?>
|
||||
<?php $help_topic = App\Model\helpdesk\Manage\Help_topic::where('id', '=', $tickets->help_topic_id)->first(); ?>
|
||||
<?php $dept = App\Model\helpdesk\Agent\Department::where('id','=',$help_topic->department)->first(); ?>
|
||||
<?php $dept = App\Model\helpdesk\Agent\Department::where('id', '=', $help_topic->department)->first(); ?>
|
||||
<table class="table">
|
||||
<tr><th></th><th></th></tr>
|
||||
<tr><td><b>{!! Lang::get('lang.status') !!}:</b></td> <td>{{$status->state}}</td></tr>
|
||||
@@ -58,169 +72,178 @@
|
||||
<tr><td><b>{!! Lang::get('lang.help_topic') !!}:</b></td> <td>{{$help_topic->topic}}</td></tr>
|
||||
</table>
|
||||
|
||||
<?php $conversations = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $tickets->id)->get(); ?>
|
||||
<?php $conversations = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $tickets->id)->orderBy('created_at', 'desc')->paginate(10); ?>
|
||||
@foreach($conversations as $conversation)
|
||||
<br/><hr>
|
||||
<span class="time-label">
|
||||
<?php
|
||||
$role = App\User::where('id','=',$conversation->user_id)->first();
|
||||
?>
|
||||
<?php if($conversation->is_internal) { ?>
|
||||
<i class="fa fa-tag bg-purple" title="Posted by System"></i>
|
||||
<?php }else{ if ($role->role == 'agent' || $role->role == 'admin') { ?>
|
||||
<i class="fa fa-mail-reply-all bg-yellow" title="Posted by Support Team"></i>
|
||||
<?php } elseif ($role->role == 'user') { ?>
|
||||
<i class="fa fa-user bg-aqua" title="Posted by Customer"></i>
|
||||
<?php } else { ?>
|
||||
<i class="fa fa-mail-reply-all bg-purple" title="Posted by System"></i>
|
||||
<?php } }
|
||||
$attachment = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id','=',$conversation->id)->first();
|
||||
if($attachment == null ) {
|
||||
$body = $conversation->body;
|
||||
}
|
||||
else {
|
||||
// dd($attachment->file);
|
||||
// print $attachment->file;
|
||||
// header("Content-type: image/jpeg");
|
||||
// echo "<img src='".base64_decode($attachment->file)."' style='width:128px;height:128px'/> ";
|
||||
$body = $conversation->body;
|
||||
$attachments = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id','=',$conversation->id)->orderBy('id', 'DESC')->get();
|
||||
foreach($attachments as $attachment)
|
||||
{
|
||||
// $i++;
|
||||
if ($attachment->type == 'pdf' || $attachment->type == 'PDF') {
|
||||
// echo "hello";
|
||||
} elseif ($attachment->type == 'docx' || $attachment->type =='DOCX') {
|
||||
// echo "hello";
|
||||
} elseif ($attachment->type == 'html' || $attachment->type =='HTML') {
|
||||
// echo "hello";
|
||||
} elseif ($attachment->type == 'zip' || $attachment->type =='ZIP') {
|
||||
// echo "hello";
|
||||
} else {
|
||||
$image = @imagecreatefromstring($attachment->file);
|
||||
ob_start();
|
||||
imagejpeg($image, null, 80);
|
||||
$data = ob_get_contents();
|
||||
ob_end_clean();
|
||||
$var = '<img width="20px" src="data:image/jpg;base64,' . base64_encode($data) . '" />';
|
||||
// echo $var;
|
||||
// echo $attachment->name;
|
||||
// $body = explode($attachment->name, $body);
|
||||
$body = str_replace($attachment->name, "data:image/jpg;base64," . base64_encode($data), $body);
|
||||
@if($conversation->user_id != null)
|
||||
<?php
|
||||
|
||||
$role = App\User::where('id', '=', $conversation->user_id)->first();
|
||||
?>
|
||||
|
||||
<?php if ($conversation->is_internal) { ?>
|
||||
<i class="fa fa-tag bg-purple" title="Posted by System"></i>
|
||||
<?php
|
||||
} else {
|
||||
if ($role->role == 'agent' || $role->role == 'admin') {
|
||||
?>
|
||||
<i class="fa fa-mail-reply-all bg-yellow" title="Posted by Support Team"></i>
|
||||
<?php } elseif ($role->role == 'user') { ?>
|
||||
<i class="fa fa-user bg-aqua" title="Posted by Customer"></i>
|
||||
<?php } else { ?>
|
||||
<i class="fa fa-mail-reply-all bg-purple" title="Posted by System"></i>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
@endif
|
||||
<?php
|
||||
$attachment = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id', '=', $conversation->id)->first();
|
||||
if ($attachment == null) {
|
||||
$body = $conversation->body;
|
||||
} else {
|
||||
// dd($attachment->file);
|
||||
// print $attachment->file;
|
||||
// header("Content-type: image/jpeg");
|
||||
// echo "<img src='".base64_decode($attachment->file)."' style='width:128px;height:128px'/> ";
|
||||
$body = $conversation->body;
|
||||
$attachments = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id', '=', $conversation->id)->where('poster', '=', 'INLINE')->get();
|
||||
|
||||
$string = $body;
|
||||
foreach ($attachments as $attachment) {
|
||||
|
||||
if ($attachment->type == 'pdf' || $attachment->type == 'PDF') {
|
||||
// echo "hello";
|
||||
} elseif ($attachment->type == 'docx' || $attachment->type == 'DOCX') {
|
||||
// echo "hello";
|
||||
} elseif ($attachment->type == 'html' || $attachment->type == 'HTML') {
|
||||
// echo "hello";
|
||||
} elseif ($attachment->type == 'zip' || $attachment->type == 'ZIP') {
|
||||
// echo "hello";
|
||||
} else {
|
||||
try {
|
||||
$image = @imagecreatefromstring($attachment->file);
|
||||
ob_start();
|
||||
imagejpeg($image, null, 80);
|
||||
$data = ob_get_contents();
|
||||
ob_end_clean();
|
||||
$var = '<img width="20px" src="data:image/jpg;base64,' . base64_encode($data) . '" />';
|
||||
// echo $var;
|
||||
// echo $attachment->name;
|
||||
// $body = explode($attachment->name, $body);
|
||||
$body = str_replace($attachment->name, "data:image/jpg;base64," . base64_encode($data), $body);
|
||||
|
||||
$string = $body;
|
||||
$start = "<head>";
|
||||
$end = "</head>";
|
||||
if(strpos($string,$start) == false || strpos($string,$start) == false)
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
$ini = strpos($string,$start);
|
||||
$ini += strlen($start);
|
||||
$len = strpos($string,$end,$ini) - $ini;
|
||||
$parsed = substr($string,$ini,$len);
|
||||
$body2 = $parsed;
|
||||
$body = str_replace($body2 ," " ,$body);
|
||||
if (strpos($string, $start) == false || strpos($string, $start) == false) {
|
||||
|
||||
} else {
|
||||
$ini = strpos($string, $start);
|
||||
$ini += strlen($start);
|
||||
$len = strpos($string, $end, $ini) - $ini;
|
||||
$parsed = substr($string, $ini, $len);
|
||||
$body2 = $parsed;
|
||||
$body = str_replace($body2, " ", $body);
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
|
||||
}
|
||||
}
|
||||
// echo $body;
|
||||
}
|
||||
// echo $body;
|
||||
// $body = explode($attachment->file, $body);
|
||||
// $body = $body[0];
|
||||
// }
|
||||
}
|
||||
?>
|
||||
|
||||
// $body = explode($attachment->file, $body);
|
||||
// $body = $body[0];
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
$string = $body;
|
||||
$start = "<head>";
|
||||
$end = "</head>";
|
||||
if (strpos($string, $start) == false || strpos($string, $start) == false) {
|
||||
|
||||
} else {
|
||||
$ini = strpos($string, $start);
|
||||
$ini += strlen($start);
|
||||
$len = strpos($string, $end, $ini) - $ini;
|
||||
$parsed = substr($string, $ini, $len);
|
||||
$body2 = $parsed;
|
||||
$body = str_replace($body2, " ", $body);
|
||||
}
|
||||
?>
|
||||
<div class="timeline-item">
|
||||
<!--<span id="date" class="time" style="color:#fff;"><i class="fa fa-clock-o"> </i> {{date_format($conversation->created_at, 'd/m/Y H:i:s')}}</span>-->
|
||||
|
||||
<?php
|
||||
$string = $body;
|
||||
$start = "<head>";
|
||||
$end = "</head>";
|
||||
if(strpos($string,$start) == false || strpos($string,$start) == false)
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
$ini = strpos($string,$start);
|
||||
$ini += strlen($start);
|
||||
$len = strpos($string,$end,$ini) - $ini;
|
||||
$parsed = substr($string,$ini,$len);
|
||||
$body2 = $parsed;
|
||||
$body = str_replace($body2 ," " ,$body);
|
||||
}
|
||||
?>
|
||||
<div class="timeline-item">
|
||||
<span id="date" class="time" style="color:#fff;"><i class="fa fa-clock-o"> </i> {{date_format($conversation->created_at, 'd/m/Y H:i:s')}}</span>
|
||||
|
||||
<h3 class="timeline-header" style="background-color:<?php
|
||||
if($conversation->is_internal)
|
||||
{
|
||||
$color = '#046380';
|
||||
echo $color;
|
||||
<h3 class="timeline-header" style="background-color:<?php
|
||||
if ($conversation->is_internal) {
|
||||
$color = '#046380';
|
||||
echo $color;
|
||||
} else {
|
||||
if ($role->role == 'agent' || $role->role == 'admin') {
|
||||
$color = '#FFD34E';
|
||||
echo $color;
|
||||
} elseif ($role->role == 'user') {
|
||||
$color = '#00A388';
|
||||
echo $color;
|
||||
} else {
|
||||
$color = '#046380';
|
||||
echo $color;
|
||||
}
|
||||
}
|
||||
?>;
|
||||
">
|
||||
<a href="#" style="text-decoration:none; color:#fff;"><?php
|
||||
if($conversation->user_id != null) {
|
||||
if ($role->role == "user") {
|
||||
echo $role->user_name;
|
||||
} else {
|
||||
echo $role->first_name . " " . $role->last_name;
|
||||
}
|
||||
} else { echo Lang::get('lang.system'); } ?> </a><strong>{!! Lang::get('lang.date') !!}:</strong> {!! $thread->created_at !!}<br/></h3>
|
||||
<div class="timeline-body" style="padding-left:30px;">
|
||||
{!! $body !!}
|
||||
</div>
|
||||
<div class="timeline-footer" >
|
||||
<?php
|
||||
$attachments = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id', '=', $conversation->id)->get();
|
||||
$i = 0;
|
||||
foreach ($attachments as $attachment) {
|
||||
if ($attachment->poster == 'ATTACHMENT') {
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
if ($i > 0) {
|
||||
echo "<hr style='height:1px;color:#2D3244;background-color:#2D3244;''><h4 class='box-title'><b>" . $i . " </b> Attachments</h4>";
|
||||
}
|
||||
?>
|
||||
<ul class='mailbox-attachments clearfix'>
|
||||
<?php
|
||||
foreach ($attachments as $attachment) {
|
||||
if ($attachment->poster == 'ATTACHMENT') {
|
||||
try {
|
||||
if ($attachment->type == 'jpg' || $attachment->type == 'JPG' || $attachment->type == 'jpeg' || $attachment->type == 'JPEG' || $attachment->type == 'png' || $attachment->type == 'PNG' || $attachment->type == 'gif' || $attachment->type == 'GIF') {
|
||||
$image = @imagecreatefromstring($attachment->file);
|
||||
ob_start();
|
||||
imagejpeg($image, null, 80);
|
||||
$data = ob_get_contents();
|
||||
ob_end_clean();
|
||||
$var = '<a href="' . URL::route('image', array('image_id' => $attachment->id)) . '" target="_blank"><img style="max-width:200px;max-height:150px;" src="data:image/jpg;base64,' . base64_encode($data) . '"/></a>';
|
||||
echo '<li><span class="mailbox-attachment-icon has-img">' . $var . '</span></li>';
|
||||
} else {
|
||||
$var = '<a href="' . URL::route('image', array('image_id' => $attachment->id)) . '" target="_blank">' . $attachment->name . '</a>';
|
||||
echo '<li>' . $var . '</li>';
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($role->role == 'agent' || $role->role == 'admin')
|
||||
{
|
||||
$color = '#FFD34E';
|
||||
echo $color;
|
||||
} elseif ($role->role == 'user')
|
||||
{
|
||||
$color = '#00A388';
|
||||
echo $color;
|
||||
} else
|
||||
{
|
||||
$color = '#046380';
|
||||
echo $color;
|
||||
}
|
||||
}
|
||||
?>;
|
||||
">
|
||||
<a href="#" style="color:#fff;"><?php if($role->role == "user") {echo $role->user_name; } else { echo $role->first_name . " " . $role->last_name; } ?> </a><strong>{!! Lang::get('lang.date') !!}:</strong> {!! $thread->created_at !!}<br/></h3>
|
||||
<div class="timeline-body" style="padding-left:30px;">
|
||||
{!! $body !!}
|
||||
</div>
|
||||
<div class="timeline-footer" >
|
||||
<?php
|
||||
$attachments = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id','=',$conversation->id)->get();
|
||||
$i = 0;
|
||||
foreach($attachments as $attachment) {
|
||||
if($attachment->poster == 'ATTACHMENT') {
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
if($i>0)
|
||||
{
|
||||
echo "<hr style='height:1px;color:#2D3244;background-color:#2D3244;''><h4 class='box-title'><b>".$i." </b> Attachments</h4>";
|
||||
}
|
||||
?>
|
||||
<ul class='mailbox-attachments clearfix'>
|
||||
<?php
|
||||
foreach($attachments as $attachment)
|
||||
{
|
||||
if($attachment->poster == 'ATTACHMENT')
|
||||
{
|
||||
if($attachment->type == 'jpg'||$attachment->type == 'JPG'||$attachment->type == 'jpeg'||$attachment->type == 'JPEG'||$attachment->type == 'png'||$attachment->type == 'PNG'||$attachment->type == 'gif'||$attachment->type == 'GIF')
|
||||
{
|
||||
$image = @imagecreatefromstring($attachment->file);
|
||||
ob_start();
|
||||
imagejpeg($image, null, 80);
|
||||
$data = ob_get_contents();
|
||||
ob_end_clean();
|
||||
$var = '<a href="'.URL::route('image', array('image_id' => $attachment->id)).'" target="_blank"><img style="max-width:200px;max-height:150px;" src="data:image/jpg;base64,' . base64_encode($data) . '"/></a>';
|
||||
echo '<li><span class="mailbox-attachment-icon has-img">'.$var.'</span></li>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$var = '<a href="'.URL::route('image', array('image_id' => $attachment->id)).'" target="_blank">'.$attachment->name.'</a>';
|
||||
echo '<li>'.$var.'</li>';
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
} catch (\Exception $e) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</body>
|
||||
</html>
|
||||
@@ -7,6 +7,7 @@ class="active"
|
||||
@section('ticket-bar')
|
||||
active
|
||||
@stop
|
||||
|
||||
@section('PageHeader')
|
||||
<h1>{{Lang::get('lang.ticket-details')}}</h1>
|
||||
@stop
|
||||
@@ -18,7 +19,6 @@ $group = App\Model\helpdesk\Agent\Groups::where('id', '=', $agent_group)->where(
|
||||
?>
|
||||
|
||||
@section('sidebar')
|
||||
|
||||
<li class="header">{!! Lang::get('lang.Ticket_Information') !!} </li>
|
||||
<li>
|
||||
<a href="">
|
||||
@@ -236,8 +236,8 @@ if ($thread->title != "") {
|
||||
<div class="col-md-6">
|
||||
<?php
|
||||
$user_phone = App\User::where('mobile', '=', $thread->user_id)->first();
|
||||
$TicketData = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $thread->ticket_id)->max('id');
|
||||
$TicketDatarow = App\Model\helpdesk\Ticket\Ticket_Thread::where('id', '=', $TicketData)->first();
|
||||
$TicketData = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $thread->ticket_id)->where('is_internal', '=', 0)->max('id');
|
||||
$TicketDatarow = App\Model\helpdesk\Ticket\Ticket_Thread::where('id', '=', $TicketData)->where('is_internal', '=', 0)->first();
|
||||
$LastResponse = App\User::where('id', '=', $TicketDatarow->user_id)->first();
|
||||
if ($LastResponse->role == "user") {
|
||||
$rep = "#F39C12";
|
||||
@@ -262,7 +262,6 @@ if ($thread->title != "") {
|
||||
@if($user->mobile !=null)<tr><td><b>{!! Lang::get('lang.mobile') !!}:</b></td> <td>{{$user->ext . $user->phone_number}}</td></tr>@endif
|
||||
<tr><td><b>{!! Lang::get('lang.source') !!}:</b></td> <td>{{$ticket_source}}</td></tr>
|
||||
<tr><td><b>{!! Lang::get('lang.help_topic') !!}:</b></td> <?php $help_topic = App\Model\helpdesk\Manage\Help_topic::where('id', '=', $tickets->help_topic_id)->first(); ?><td title="{{$help_topic->topic}}">{{$help_topic->topic}}</td></tr>
|
||||
<?php Event::fire(new App\Events\TicketDetailTable($TicketData)); ?>
|
||||
<tr><td><b>{!! Lang::get('lang.last_message') !!}:</b></td> <td>{{$username}}</td></tr>
|
||||
<?php Event::fire(new App\Events\TicketDetailTable($TicketData)); ?>
|
||||
</div>
|
||||
@@ -273,7 +272,7 @@ if ($thread->title != "") {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{-- Event fire --}}
|
||||
<?php Event::fire('ticket.timeline.marble',array($TicketData));?>
|
||||
<div id="gifshow" style="display:none">
|
||||
<img src="{{asset("lb-faveo/media/images/gifloader.gif")}}">
|
||||
</div> <!-- added 05/05/2016-->
|
||||
@@ -291,7 +290,6 @@ if ($thread->title != "") {
|
||||
<div class="tab-content">
|
||||
<div id="alert21" class="alert alert-success alert-dismissable" style="display:none;">
|
||||
<button id="dismiss21" type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<h4><i class="icon fa fa-check"></i>{!! Lang::get('lang.alert') !!}!</h4>
|
||||
<div id="message-success2"></div>
|
||||
</div>
|
||||
<div id="alert22" class="alert alert-warning alert-dismissable" style="display:none;">
|
||||
@@ -300,11 +298,10 @@ if ($thread->title != "") {
|
||||
</div>
|
||||
<div id="alert23" class="alert alert-danger alert-dismissable" style="display:none;">
|
||||
<button id="dismiss23" type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<h4><i class="icon fa fa-ban"></i>{!! Lang::get('lang.alert') !!}!</h4>
|
||||
<i class="icon fa fa-ban"></i><b>{!! Lang::get('lang.alert') !!} !</b>
|
||||
<div id="message-danger2"></div>
|
||||
</div>
|
||||
<div class="tab-pane active" id="General">
|
||||
|
||||
<!-- ticket reply -->
|
||||
<div id="show3" style="display:none;">
|
||||
<div class="col-md-4">
|
||||
@@ -321,7 +318,9 @@ if ($thread->title != "") {
|
||||
</br>
|
||||
</br>
|
||||
</div>
|
||||
{!! Form::model($tickets->id, ['id'=>'form3', 'name'=>'form3' ,'method' => 'PATCH', 'enctype'=>'multipart/form-data'] )!!}
|
||||
<form id="form3">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}">
|
||||
|
||||
<div id="t1">
|
||||
<div class="form-group">
|
||||
<div class="row">
|
||||
@@ -374,7 +373,7 @@ if ($thread->title != "") {
|
||||
<div class="form-group">
|
||||
<div class="row">
|
||||
<!-- reply content -->
|
||||
<div class="form-group {{ $errors->has('title') ? 'has-error' : '' }}">
|
||||
<div class="form-group {{ $errors->has('title') ? 'has-error' : '' }}" id="reply_content_class">
|
||||
<div class="col-md-2">
|
||||
{!! Form::label('Reply Content', Lang::get('lang.reply_content').':') !!}<span class="text-red"> *</span>
|
||||
</div>
|
||||
@@ -383,9 +382,26 @@ if ($thread->title != "") {
|
||||
<textarea style="width:98%;height:20%;" name="reply_content" class="form-control" id="reply_content"></textarea>
|
||||
</div>
|
||||
{!! $errors->first('reply_content', '<spam class="help-block text-red">:message</spam>') !!}
|
||||
<br/>
|
||||
<div type="file" class="btn btn-default btn-file"><i class="fa fa-paperclip"> </i> {!! Lang::get('lang.attachment') !!}<input type="file" name="attachment[]" multiple/></div><br/>
|
||||
{!! Lang::get('lang.max') !!}. 10MB
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="row">
|
||||
<!-- reply content -->
|
||||
<div class="form-group {{ $errors->has('title') ? 'has-error' : '' }}" id="reply_content_class">
|
||||
<div class="col-md-2">
|
||||
<label> {!! Lang::get('lang.attachment') !!}</label>
|
||||
</div>
|
||||
<div class="col-md-10">
|
||||
<div id="reset-attachment">
|
||||
<span class='btn btn-default btn-file'> <i class='fa fa-paperclip'></i> <span>{!! Lang::get('lang.upload') !!}</span><input type='file' name='attachment[]' id='attachment' multiple/></span>
|
||||
<div id='file_details'></div><div id='total-size'></div>{!! Lang::get('lang.max') !!}. {!! $max_size_in_actual !!}
|
||||
<div>
|
||||
<a id='clear-file' onClick='clearAll()' style='display:none; cursor:pointer;'><i class='fa fa-close'></i>Clear all</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -428,7 +444,7 @@ if ($thread->title != "") {
|
||||
<div class="form-group">
|
||||
<div class="row">
|
||||
<!-- internal note -->
|
||||
<div class="form-group {{ $errors->has('title') ? 'has-error' : '' }}">
|
||||
<div class="form-group {{ $errors->has('title') ? 'has-error' : '' }}" id="internal_content_class">
|
||||
<div class="col-md-2">
|
||||
<label>{!! Lang::get('lang.internal_note') !!}:<span class="text-red"> *</span></label>
|
||||
</div>
|
||||
@@ -476,6 +492,9 @@ if ($thread->title != "") {
|
||||
</ul>
|
||||
|
||||
<div class="col-md-12" >
|
||||
<link rel="stylesheet" type="text/css" href="{{asset("lb-faveo/css/faveo-css.css")}}">
|
||||
<link href="{{asset("lb-faveo/css/jquery.rating.css")}}" rel="stylesheet" type="text/css" />
|
||||
|
||||
<!-- The time line -->
|
||||
<ul class="timeline">
|
||||
<!-- timeline time label -->
|
||||
@@ -500,7 +519,9 @@ if ($thread->title != "") {
|
||||
</span> <?php
|
||||
$data = $ConvDate[0];
|
||||
}
|
||||
$role = App\User::where('id', '=', $conversation->user_id)->first();
|
||||
if($conversation->user_id != null) {
|
||||
$role = App\User::where('id', '=', $conversation->user_id)->first();
|
||||
}
|
||||
?>
|
||||
</li>
|
||||
<li>
|
||||
@@ -508,13 +529,19 @@ if ($thread->title != "") {
|
||||
<i class="fa fa-tag bg-purple" title="Posted by System"></i>
|
||||
<?php
|
||||
} else {
|
||||
if ($role->role == 'agent' || $role->role == 'admin') {
|
||||
if($conversation->user_id != null) {
|
||||
if ($role->role == 'agent' || $role->role == 'admin') {
|
||||
?>
|
||||
<i class="fa fa-mail-reply-all bg-yellow" title="Posted by Support Team"></i>
|
||||
<?php } elseif ($role->role == 'user') { ?>
|
||||
<i class="fa fa-user bg-aqua" title="Posted by Customer"></i>
|
||||
<?php } else { ?>
|
||||
<i class="fa fa-mail-reply-all bg-purple" title="Posted by System"></i>
|
||||
<?php
|
||||
}
|
||||
} else {
|
||||
?>
|
||||
<i class="fa fa-mail-reply-all bg-yellow" title="Posted by Support Team"></i>
|
||||
<?php } elseif ($role->role == 'user') { ?>
|
||||
<i class="fa fa-user bg-aqua" title="Posted by Customer"></i>
|
||||
<?php } else { ?>
|
||||
<i class="fa fa-mail-reply-all bg-purple" title="Posted by System"></i>
|
||||
<i class="fa fa-tag bg-purple" title="Posted by System"></i>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
@@ -575,21 +602,26 @@ if ($thread->title != "") {
|
||||
$body2 = $parsed;
|
||||
$body = str_replace($body2, " ", $body);
|
||||
}
|
||||
if ($conversation->is_internal) {
|
||||
$color = '#A19CFF';
|
||||
// echo $color;
|
||||
} else {
|
||||
if ($role->role == 'agent' || $role->role == 'admin') {
|
||||
$color = '#F9B03B';
|
||||
} elseif ($role->role == 'user') {
|
||||
$color = '#38D8FF';
|
||||
if($conversation->user_id != null) {
|
||||
if ($conversation->is_internal) {
|
||||
$color = '#A19CFF';
|
||||
// echo $color;
|
||||
} else {
|
||||
$color = '#605CA8';
|
||||
if ($role->role == 'agent' || $role->role == 'admin') {
|
||||
$color = '#F9B03B';
|
||||
} elseif ($role->role == 'user') {
|
||||
$color = '#38D8FF';
|
||||
} else {
|
||||
$color = '#605CA8';
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
<div class="timeline-item">
|
||||
<span style="color:#fff;"><div class="pull-right"> <table><tbody>
|
||||
@if($role)
|
||||
@if($role->role != null)
|
||||
@if($role->role != 'user' && $conversation->is_internal != 1)
|
||||
@foreach($ratings as $rating)
|
||||
@if($rating->rating_area == 'Comment Area')
|
||||
<?php
|
||||
@@ -602,32 +634,47 @@ if ($thread->title != "") {
|
||||
?>
|
||||
<tr>
|
||||
<th><div class="ticketratingtitle" style="color:#3c8dbc;" >{!! $rating->name !!} </div></th> 
|
||||
<td>
|
||||
<td style="button:disabled;">
|
||||
<?php for ($i = 1; $i <= $rating->rating_scale; $i++) { ?>
|
||||
<input type="radio" class="star" id="star5" name="{!! $rating->name !!},{!! $conversation->id !!}" value="{!! $i !!}"<?php echo ($ratingval == $i) ? 'checked' : '' ?> />
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
<input type="radio" class="star star-rating-readonly" id="star5" name="{!! $rating->name !!},{!! $conversation->id !!}" value="{!! $i !!}"<?php echo ($ratingval == $i) ? 'checked' : '' ?> />
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
@endif
|
||||
</tbody></table></div>
|
||||
</span>
|
||||
<h3 class="timeline-header">
|
||||
<?php
|
||||
if ($role->role == "user") {
|
||||
$usernam = $role->user_name;
|
||||
if($conversation->user_id != null) {
|
||||
if ($role->role == "user") {
|
||||
$usernam = $role->user_name;
|
||||
} else {
|
||||
$usernam = $role->first_name . " " . $role->last_name;
|
||||
}
|
||||
} else {
|
||||
$usernam = $role->first_name . " " . $role->last_name;
|
||||
$usernam = Lang::get('lang.system');
|
||||
}
|
||||
?>
|
||||
<div class="user-block" style="margin-bottom:-5px;margin-top:-2px;">
|
||||
@if($role->profile_pic != null)
|
||||
<img src="{{$role->profile_pic}}"class="img-circle img-bordered-sm" alt="User Image"/>
|
||||
@else
|
||||
<img src="{{ Gravatar::src($role->email) }}" class="img-circle img-bordered-sm" alt="img-circle img-bordered-sm">
|
||||
@if($conversation->user_id != null)
|
||||
@if($role->profile_pic != null)
|
||||
<img src="{{$role->profile_pic}}"class="img-circle img-bordered-sm" alt="User Image"/>
|
||||
@else
|
||||
<img src="{{ Gravatar::src($role->email) }}" class="img-circle img-bordered-sm" alt="img-circle img-bordered-sm">
|
||||
@endif
|
||||
@else
|
||||
<img src="{{asset('lb-faveo/media/images/avatar_1.png')}}" class="img-circle img-bordered-sm" alt="img-circle img-bordered-sm">
|
||||
@endif
|
||||
<span class="username" style="margin-bottom:4px;margin-top:2px;">
|
||||
<a href='{!! url("/user/".$role->id) !!}'>{!! $usernam !!}</a>
|
||||
@if($conversation->user_id != null)
|
||||
<a href='{!! url("/user/".$role->id) !!}'>{!! $usernam !!}</a>
|
||||
@else
|
||||
{!! $usernam !!}
|
||||
@endif
|
||||
</span>
|
||||
<span class="description" style="margin-bottom:4px;margin-top:4px;"><i class="fa fa-clock-o"></i> {{UTC::usertimezone($conversation->created_at)}}</span>
|
||||
|
||||
@@ -635,7 +682,7 @@ if ($thread->title != "") {
|
||||
|
||||
</h3>
|
||||
<div class="timeline-body" style="padding-left:30px;margin-bottom:-20px">
|
||||
{!! $body !!}
|
||||
{!! nl2br($body) !!}
|
||||
</div>
|
||||
@if($conversation->id == $ij->id)
|
||||
<?php $ticket_form_datas = App\Model\helpdesk\Ticket\Ticket_Form_Data::where('ticket_id', '=', $tickets->id)->get(); ?>
|
||||
@@ -657,7 +704,9 @@ if ($thread->title != "") {
|
||||
<br/><br/>
|
||||
<div class="timeline-footer" style="margin-bottom:-5px">
|
||||
@if(!$conversation->is_internal)
|
||||
<?php Event::fire(new App\Events\Timeline($conversation, $role, $user)); ?>
|
||||
@if($conversation->user_id != null)
|
||||
<?php Event::fire(new App\Events\Timeline($conversation, $role, $user)); ?>
|
||||
@endif
|
||||
@endif
|
||||
<?php
|
||||
$attachments = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id', '=', $conversation->id)->get();
|
||||
@@ -709,7 +758,7 @@ if ($thread->title != "") {
|
||||
<ul class="pull-right" style="padding-right:25px;padding-bottom:10px;">
|
||||
<?php echo $conversations->setPath(url('/thread/' . $tickets->id))->render(); ?>
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
</div><!-- /.col -->
|
||||
</div>
|
||||
</div><!-- /.row -->
|
||||
@@ -720,7 +769,7 @@ if ($thread->title != "") {
|
||||
<!-- page modals -->
|
||||
<div>
|
||||
<!-- Edit Ticket modal -->
|
||||
<?php if ($group->can_edit_ticket == 1) { ?>
|
||||
<?php if ($group->can_edit_ticket == 1) { ?>
|
||||
<div class="modal fade" id="Edit">
|
||||
<div class="modal-dialog" style="width:60%;height:70%;">
|
||||
<div class="modal-content">
|
||||
@@ -1034,6 +1083,7 @@ if ($thread->title != "") {
|
||||
<div class="tab-pane active" id="ahah">
|
||||
<div class="modal-body" id="def">
|
||||
<div class="callout callout-info" id="hide1234" ><i class="icon fa fa-info"> </i> {!! Lang::get('lang.search_existing_users_or_add_new_users') !!}</div>
|
||||
<div id="here"></div>
|
||||
<div id="show7" style="display:none;">
|
||||
<div class="row col-md-12">
|
||||
<div class="col-xs-5">
|
||||
@@ -1045,7 +1095,7 @@ if ($thread->title != "") {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="here"></div>
|
||||
|
||||
{!! Form::model($tickets->id, ['id'=>'search-user','method' => 'PATCH'] )!!}
|
||||
<script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
|
||||
<input type="text" class="form-control" name="search" id="tags" placeholder="{!! Lang::get('lang.search_by_email') !!}">
|
||||
@@ -1243,7 +1293,14 @@ if ($thread->title != "") {
|
||||
|
||||
<!-- scripts used on page -->
|
||||
<script type="text/javascript">
|
||||
|
||||
function clearAll() {
|
||||
$("#file_details").html("");
|
||||
$("#total-size").html("");
|
||||
$("#attachment").val('');
|
||||
$("#clear-file").hide();
|
||||
$("#replybtn").removeClass('disabled');
|
||||
}
|
||||
|
||||
$(function () {
|
||||
$("#InternalContent").wysihtml5();
|
||||
});
|
||||
@@ -1273,12 +1330,12 @@ if ($thread->title != "") {
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
});
|
||||
$(function() {
|
||||
$("#tags, #tags2").autocomplete({
|
||||
source: 'auto/<?php echo $tickets->id; ?>'
|
||||
});
|
||||
$("#tags, #tags2").autocomplete({
|
||||
source: 'auto/<?php echo $tickets->id; ?>'
|
||||
});
|
||||
});
|
||||
jQuery(document).ready(function() {
|
||||
$("#cc_page").on('click', '.search_r', function(){
|
||||
@@ -1343,10 +1400,6 @@ if ($thread->title != "") {
|
||||
setInterval(function(){
|
||||
$("#alert11").hide();
|
||||
setTimeout(function() {
|
||||
// var link = document.querySelector('#load-inbox');
|
||||
// if(link) {
|
||||
// link.click();
|
||||
// }
|
||||
window.location = document.referrer;
|
||||
}, 500);
|
||||
}, 2000);
|
||||
@@ -1627,6 +1680,19 @@ if ($thread->title != "") {
|
||||
});
|
||||
// Internal Note
|
||||
$('#form2').on('submit', function() {
|
||||
var internal_content = document.getElementById('InternalContent').value;
|
||||
if(internal_content) {
|
||||
$("#internal_content_class").removeClass('has-error');
|
||||
$("#alert23").hide();
|
||||
} else {
|
||||
var message = "<li>{!! Lang::get('lang.internal_content_is_a_required_field') !!}</li>";
|
||||
$("#internal_content_class").addClass('has-error');
|
||||
$("#alert23").show();
|
||||
$('#message-danger2').html(message);
|
||||
$("#show3").hide();
|
||||
$("#t1").show();
|
||||
return false;
|
||||
}
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "../internal/note/{{ $tickets->id }}",
|
||||
@@ -1642,7 +1708,7 @@ if ($thread->title != "") {
|
||||
{
|
||||
$("#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.you_have_successfully_replied_to_your_ticket') !!}";
|
||||
$("#alert21").show();
|
||||
$('#message-success2').html(message);
|
||||
setInterval(function(){$("#alert21").hide(); }, 4000);
|
||||
@@ -1653,6 +1719,16 @@ if ($thread->title != "") {
|
||||
var div1 = document.getElementById('newtextarea1');
|
||||
div1.innerHTML = div1.innerHTML + '<textarea style="width:98%;height:200px;" name="InternalContent" class="form-control" id="InternalContent"/></textarea>';
|
||||
var wysihtml5Editor = $('textarea').wysihtml5().data("wysihtml5").editor;
|
||||
setInterval(function(){
|
||||
var head= document.getElementsByTagName('head')[0];
|
||||
var script= document.createElement('script');
|
||||
script.type= 'text/javascript';
|
||||
script.src= '{{asset("lb-faveo/js/jquery.rating.pack.js")}}';
|
||||
head.appendChild(script);
|
||||
// $('.rating-cancel').hide();
|
||||
// $(".star-rating-control").attr("disabled", "disabled").off('hover');
|
||||
// $(".star-rating-control").addClass("disabled")
|
||||
}, 4000);
|
||||
} else {
|
||||
// alert('fail');
|
||||
var message = "{!! Lang::get('lang.for_some_reason_your_message_was_not_posted_please_try_again_later') !!}";
|
||||
@@ -1668,8 +1744,63 @@ if ($thread->title != "") {
|
||||
return false;
|
||||
});
|
||||
// Ticket Reply
|
||||
$('#attachment').change(function() {
|
||||
input = document.getElementById('attachment');
|
||||
if (!input) {
|
||||
alert("Um, couldn't find the fileinput element.");
|
||||
} else if (!input.files) {
|
||||
alert("This browser doesn't seem to support the `files` property of file inputs.");
|
||||
} else if (!input.files[0]) {
|
||||
} else {
|
||||
$("#file_details").html("");
|
||||
var total_size = 0;
|
||||
for(i = 0; i < input.files.length; i++) {
|
||||
file = input.files[i];
|
||||
var supported_size = "{!! $max_size_in_bytes !!}";
|
||||
var supported_actual_size = "{!! $max_size_in_actual !!}";
|
||||
if(file.size < supported_size) {
|
||||
$("#file_details").append("<tr> <td> " + file.name + " </td><td> " + formatBytes(file.size) + "</td> </tr>");
|
||||
} else {
|
||||
$("#file_details").append("<tr style='color:red;'> <td> " + file.name + " </td><td> " + formatBytes(file.size) + "</td> </tr>");
|
||||
}
|
||||
total_size += parseInt(file.size);
|
||||
}
|
||||
if(total_size > supported_size) {
|
||||
$("#total-size").append("<span style='color:red'>Your total file upload size is greater than "+ supported_actual_size +"</span>");
|
||||
$("#replybtn").addClass('disabled');
|
||||
$("#clear-file").show();
|
||||
} else {
|
||||
$("#total-size").html("");
|
||||
$("#replybtn").removeClass('disabled');
|
||||
$("#clear-file").show();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
function formatBytes(bytes,decimals) {
|
||||
if(bytes == 0) return '0 Byte';
|
||||
var k = 1000;
|
||||
var dm = decimals + 1 || 3;
|
||||
var sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
|
||||
var i = Math.floor(Math.log(bytes) / Math.log(k));
|
||||
return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i];
|
||||
}
|
||||
|
||||
$('#form3').on('submit', function() {
|
||||
var fd = new FormData(document.getElementById("form3"));
|
||||
var fd = new FormData(document.getElementById("form3"));
|
||||
var reply_content = document.getElementById('reply_content').value;
|
||||
if(reply_content) {
|
||||
$("#reply_content_class").removeClass('has-error');
|
||||
$("#alert23").hide();
|
||||
} else {
|
||||
var message = "<li>{!! Lang::get('lang.reply_content_is_a_required_field') !!}</li>";
|
||||
$("#reply_content_class").addClass('has-error');
|
||||
$("#alert23").show();
|
||||
$('#message-danger2').html(message);
|
||||
$("#show3").hide();
|
||||
$("#t1").show();
|
||||
return false;
|
||||
}
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "../thread/reply/{{ $tickets->id }}",
|
||||
@@ -1679,28 +1810,40 @@ if ($thread->title != "") {
|
||||
processData: false, // tell jQuery not to process the data
|
||||
contentType: false, // tell jQuery not to set contentType
|
||||
beforeSend: function() {
|
||||
|
||||
|
||||
$("#t1").hide();
|
||||
$("#show3").show();
|
||||
},
|
||||
success: function(response) {
|
||||
|
||||
if(response !== 1) {
|
||||
if(response === "file size exceeded") {
|
||||
alert(response);
|
||||
}
|
||||
}
|
||||
if (response == 1)
|
||||
{
|
||||
$("#refresh1").load("../thread/{{$tickets->id}} #refresh1");
|
||||
// $("#t1").load("../thread/{{$tickets->id}} #t1");
|
||||
var message = "{!! Lang::get('lang.you_have_successfully_replied_to_your_ticket') !!}";
|
||||
$("#alert21").show();
|
||||
$('#message-success2').html(message);
|
||||
setInterval(function(){$("#alert21").hide(); }, 4000);
|
||||
// var wysihtml5Editor = $('textarea').wysihtml5().data("wysihtml5").editor;
|
||||
$("#newtextarea").empty();
|
||||
var div = document.getElementById('newtextarea');
|
||||
div.innerHTML = div.innerHTML + '<textarea style="width:98%;height:200px;" name="reply_content" class="form-control" id="reply_content"/></textarea>';
|
||||
$("#newtextarea1").empty();
|
||||
var div1 = document.getElementById('newtextarea1');
|
||||
div1.innerHTML = div1.innerHTML + '<textarea style="width:98%;height:200px;" name="InternalContent" class="form-control" id="InternalContent"/></textarea>';
|
||||
var wysihtml5Editor = $('textarea').wysihtml5().data("wysihtml5").editor;
|
||||
$("#refresh1").load("../thread/{{$tickets->id}} #refresh1");
|
||||
var message = "{{ Lang::get('lang.you_have_successfully_replied_to_your_ticket') }}";
|
||||
$("#alert21").show();
|
||||
$('#message-success2').html(message);
|
||||
setInterval(function(){$("#alert21").hide(); }, 4000);
|
||||
$("#newtextarea").empty();
|
||||
var div = document.getElementById('newtextarea');
|
||||
div.innerHTML = div.innerHTML + '<textarea style="width:98%;height:200px;" name="reply_content" class="form-control" id="reply_content"/></textarea>';
|
||||
$("#newtextarea1").empty();
|
||||
var div1 = document.getElementById('newtextarea1');
|
||||
div1.innerHTML = div1.innerHTML + '<textarea style="width:98%;height:200px;" name="InternalContent" class="form-control" id="InternalContent"/></textarea>';
|
||||
var wysihtml5Editor = $('textarea').wysihtml5().data("wysihtml5").editor;
|
||||
setInterval(function(){
|
||||
var head= document.getElementsByTagName('head')[0];
|
||||
var script= document.createElement('script');
|
||||
script.type= 'text/javascript';
|
||||
script.src= '{{asset("lb-faveo/js/jquery.rating.pack.js")}}';
|
||||
head.appendChild(script);
|
||||
// $('.rating-cancel').hide();
|
||||
// $(".star-rating-control").attr("disabled", "disabled").off('hover');
|
||||
// $(".star-rating-control").addClass("disabled")
|
||||
}, 4000);
|
||||
} else {
|
||||
// alert('fail');
|
||||
// $( "#dismis4" ).trigger( "click" );
|
||||
@@ -1709,8 +1852,12 @@ if ($thread->title != "") {
|
||||
$('#message-danger2').html(message);
|
||||
setInterval(function(){$("#alert23").hide(); }, 4000);
|
||||
}
|
||||
$("#show3").hide();
|
||||
$("#t1").show();
|
||||
$("#show3").hide();
|
||||
$("#t1").show();
|
||||
},
|
||||
error: function(response) {
|
||||
$("#show3").hide();
|
||||
$("#t1").show();
|
||||
}
|
||||
})
|
||||
return false;
|
||||
@@ -1753,8 +1900,9 @@ if ($thread->title != "") {
|
||||
dataType: "html",
|
||||
data: $(this).serialize(),
|
||||
beforeSend: function() {
|
||||
$('#show7').show();
|
||||
$('#hide1234').hide();
|
||||
$('#here').html("");
|
||||
$('#show7').show();
|
||||
$('#hide1234').hide();
|
||||
},
|
||||
success: function(response) {
|
||||
$('#show7').hide();
|
||||
@@ -1767,7 +1915,7 @@ if ($thread->title != "") {
|
||||
// if(link) {
|
||||
// link.click();
|
||||
// }
|
||||
$('#cc-close').trigger('click');
|
||||
// $('#cc-close').trigger('click');
|
||||
}, 500);
|
||||
}
|
||||
})
|
||||
@@ -1892,7 +2040,6 @@ if ($thread->title != "") {
|
||||
$("#merge-succ-alert").show();
|
||||
$('#message-merge-succ').html(message);
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
return false;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -66,6 +66,7 @@ if (Auth::user()->role == 'agent') {
|
||||
<input type="submit" class="btn btn-default text-yellow btn-sm" name="submit" id="hard-delete" value="{{Lang::get('lang.clean-up')}}" title="{{Lang::get('lang.trash-delete-title-msg')}}">
|
||||
|
||||
<!--</div>-->
|
||||
<p><p/>
|
||||
<div class="mailbox-messages" id="refresh">
|
||||
<p style="display:none;text-align:center; position:fixed; margin-left:40%;margin-top:-70px;" id="show" class="text-red"><b>{!! Lang::get('lang.loading') !!}...</b></p>
|
||||
<!-- table -->
|
||||
|
||||
@@ -57,6 +57,7 @@ if (Auth::user()->role == 'agent') {
|
||||
<input type="submit" class="submit btn btn-default text-yellow btn-sm" id="close" name="submit" value="{!! Lang::get('lang.close') !!}">
|
||||
<button type="button" class="btn btn-sm btn-default text-green" id="Edit_Ticket" data-toggle="modal" data-target="#MergeTickets"><i class="fa fa-code-fork"> </i> {!! Lang::get('lang.merge') !!}</button>
|
||||
<!--</div>-->
|
||||
<p><p/>
|
||||
<div class="mailbox-messages" id="refresh">
|
||||
<p style="display:none;text-align:center; position:fixed; margin-left:40%;margin-top:-70px;" id="show" class="text-red"><b>{!! Lang::get('lang.loading') !!}...</b></p>
|
||||
<!-- table -->
|
||||
@@ -71,37 +72,7 @@ if (Auth::user()->role == 'agent') {
|
||||
Lang::get('lang.assigned_to'),
|
||||
Lang::get('lang.last_activity'))
|
||||
->setUrl(route('get.unassigned.ticket'))
|
||||
->setOptions('aoColumnDefs',array(
|
||||
array(
|
||||
'render' => "function ( data, type, row ) {
|
||||
var t = row[6].split(/[- :,/ :,. /]/);
|
||||
var d = new Date(t[0], t[1]-1, t[2], t[3], t[4], t[5]);
|
||||
<!-- -->
|
||||
var dtf= '$date_time_format';
|
||||
if(dtf==1) {
|
||||
dtf = 'D/MMM/YYYY hh:mm:ss A';
|
||||
} else if(dtf==2) {
|
||||
dtf = 'D MMM, YYYY hh:mm:ss A';
|
||||
} else if(dtf==3) {
|
||||
dtf = 'D-MMM-YYYY hh:mm:ss A';
|
||||
} else if(dtf==4) {
|
||||
dtf = 'MMM/D/YYYY hh:mm:ss A';
|
||||
} else if(dtf==5) {
|
||||
dtf = 'MMM D, YYYY hh:mm:ss A';
|
||||
} else if(dtf==6) {
|
||||
dtf = 'MMM-D-YYYY hh:mm:ss A';
|
||||
} else if(dtf==7) {
|
||||
dtf = 'YYYY/MMM/D hh:mm:ss A';
|
||||
} else if(dtf==8) {
|
||||
dtf = 'YYYY, MMM D hh:mm:ss A';
|
||||
} else if(dtf==9) {
|
||||
dtf = 'YYYY-MMM-D hh:mm:ss A';
|
||||
}
|
||||
return moment(d).format(dtf);
|
||||
<!-- //return d; -->
|
||||
}",
|
||||
'aTargets' => array(6))
|
||||
))
|
||||
|
||||
->setOrder(array(6=>'desc'))
|
||||
->setClass('table table-hover table-bordered table-striped')
|
||||
->setCallbacks("fnRowCallback",'function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) {
|
||||
|
||||
@@ -12,19 +12,11 @@ active
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('HeadInclude')
|
||||
@stop
|
||||
<!-- header -->
|
||||
@section('PageHeader')
|
||||
<h1>{!! Lang::get('lang.create_user') !!}</h1>
|
||||
@stop
|
||||
<!-- /header -->
|
||||
<!-- breadcrumbs -->
|
||||
@section('breadcrumbs')
|
||||
<ol class="breadcrumb">
|
||||
</ol>
|
||||
@stop
|
||||
<!-- /breadcrumbs -->
|
||||
<!-- content -->
|
||||
@section('content')
|
||||
@if(Session::has('fails'))
|
||||
@@ -50,48 +42,62 @@ class="active"
|
||||
<b>{!! Lang::get('lang.alert') !!}!</b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<br/>
|
||||
@if($errors->first('email'))
|
||||
<li class="error-message-padding">{!! $errors->first('email', ':message') !!}</li>
|
||||
@if($errors->first('first_name'))
|
||||
<li class="error-message-padding">{!! $errors->first('first_name', ':message') !!}</li>
|
||||
@endif
|
||||
@if($errors->first('full_name'))
|
||||
<li class="error-message-padding">{!! $errors->first('full_name', ':message') !!}</li>
|
||||
@if($errors->first('last_name'))
|
||||
<li class="error-message-padding">{!! $errors->first('last_name', ':message') !!}</li>
|
||||
@endif
|
||||
@if($errors->first('user_name'))
|
||||
<li class="error-message-padding">{!! $errors->first('user_name', ':message') !!}</li>
|
||||
@endif
|
||||
@if($errors->first('email'))
|
||||
<li class="error-message-padding">{!! $errors->first('email', ':message') !!}</li>
|
||||
@endif
|
||||
@if($errors->first('mobile'))
|
||||
<li class="error-message-padding">{!! $errors->first('mobile', ':message') !!}</li>
|
||||
<li class="error-message-padding">{!! $errors->first('mobile', ':message') !!}</li>
|
||||
@endif
|
||||
@if($errors->first('ext'))
|
||||
<li class="error-message-padding">{!! $errors->first('ext', ':message') !!}</li>
|
||||
<li class="error-message-padding">{!! $errors->first('ext', ':message') !!}</li>
|
||||
@endif
|
||||
@if($errors->first('phone_number'))
|
||||
<li class="error-message-padding">{!! $errors->first('phone_number', ':message') !!}</li>
|
||||
<li class="error-message-padding">{!! $errors->first('phone_number', ':message') !!}</li>
|
||||
@endif
|
||||
@if($errors->first('active'))
|
||||
<li class="error-message-padding">{!! $errors->first('active', ':message') !!}</li>
|
||||
<li class="error-message-padding">{!! $errors->first('active', ':message') !!}</li>
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
<!-- Email Address : Email : Required -->
|
||||
@endif
|
||||
<div class="row">
|
||||
<div class="col-xs-4 form-group {{ $errors->has('email') ? 'has-error' : '' }}">
|
||||
<!-- First name : first name : Required -->
|
||||
<div class="col-xs-3 form-group {{ $errors->has('first_name') ? 'has-error' : '' }}">
|
||||
{!! Form::label('first_name',Lang::get('lang.first_name')) !!}<span class="text-red"> *</span>
|
||||
{!! Form::text('first_name',null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
<!-- Last name : last name : Required -->
|
||||
<div class="col-xs-3 form-group {{ $errors->has('last_name') ? 'has-error' : '' }}">
|
||||
{!! Form::label('last_name',Lang::get('lang.last_name')) !!}
|
||||
{!! Form::text('last_name',null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
<!-- User Name : Text : Required-->
|
||||
<div class="col-xs-3 form-group {{ $errors->has('user_name') ? 'has-error' : '' }}">
|
||||
{!! Form::label('user_name',Lang::get('lang.user_name')) !!}<span class="text-red"> *</span>
|
||||
{!! Form::text('user_name',null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
<!-- Email Address : Email : Required -->
|
||||
<div class="col-xs-3 form-group {{ $errors->has('email') ? 'has-error' : '' }}">
|
||||
{!! Form::label('email',Lang::get('lang.email')) !!}<span class="text-red"> *</span>
|
||||
{!! Form::email('email',null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
<!-- Full Name : Text : Required-->
|
||||
<div class="col-xs-4 form-group {{ $errors->has('full_name') ? 'has-error' : '' }}">
|
||||
{!! Form::label('full_name',Lang::get('lang.full_name')) !!}<span class="text-red"> *</span>
|
||||
{!! Form::text('full_name',null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
<!-- mobile Number : Text : -->
|
||||
<div class="col-md-4 form-group {{ $errors->has('mobile') ? 'has-error' : '' }}">
|
||||
{!! Form::label('mobile',Lang::get('lang.mobile')) !!}
|
||||
{!! Form::text('mobile',null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
<div class="col-xs-1 form-group {{ Session::has('country_code_error') ? 'has-error' : '' }}">
|
||||
|
||||
{!! Form::label('country_code',Lang::get('lang.country-code')) !!}
|
||||
{!! $errors->first('country_code', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::text('country_code',null,['class' => 'form-control', 'placeholder' => $phonecode, 'title' => Lang::get('lang.enter-country-phone-code')]) !!}
|
||||
|
||||
</div>
|
||||
<!-- mobile Number : Text : -->
|
||||
<div class="col-md-3 form-group {{ $errors->has('mobile') ? 'has-error' : '' }}">
|
||||
{!! Form::label('mobile',Lang::get('lang.mobile')) !!}
|
||||
{!! Form::text('mobile',null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
<div class="col-xs-1 form-group {{ $errors->has('ext') ? 'has-error' : '' }}">
|
||||
<label for="ext">{!! Lang::get('lang.ext') !!}</label>
|
||||
@@ -101,13 +107,13 @@ class="active"
|
||||
<label for="phone_number">{!! Lang::get('lang.phone') !!}</label>
|
||||
{!! Form::text('phone_number',null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
<div class="col-md-4 form-group {{ $errors->has('active') ? 'has-error' : '' }}">
|
||||
<div class="col-md-3 form-group {{ $errors->has('active') ? 'has-error' : '' }}">
|
||||
{!! Form::label('active',Lang::get('lang.status')) !!}
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="col-xs-4">
|
||||
{!! Form::radio('active','1',true) !!} {{Lang::get('lang.active')}}
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="col-xs-6">
|
||||
{!! Form::radio('active','0') !!} {{Lang::get('lang.inactive')}}
|
||||
</div>
|
||||
</div>
|
||||
@@ -118,15 +124,26 @@ class="active"
|
||||
{!! Form::label('internal_note',Lang::get('lang.internal_notes')) !!}
|
||||
{!! Form::textarea('internal_note',null,['class' => 'form-control', 'size' => '30x5']) !!}
|
||||
</div>
|
||||
<!-- Send email to user about registration password -->
|
||||
<div class="form-group">
|
||||
<input type="checkbox" name="send_email" checked> <label> {{ Lang::get('lang.send_password_via_email')}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
{!! Form::submit(Lang::get('lang.submit'),['class'=>'form-group btn btn-primary'])!!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
$("textarea").wysihtml5();
|
||||
});
|
||||
|
||||
$('input[type="checkbox"]').iCheck({
|
||||
checkboxClass: 'icheckbox_flat-blue'
|
||||
});
|
||||
$('input[type="radio"]').iCheck({
|
||||
radioClass: 'iradio_flat-blue'
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
@stop
|
||||
|
||||
@@ -44,49 +44,63 @@ class="active"
|
||||
<b>{!! Lang::get('lang.alert') !!}!</b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<br/>
|
||||
@if($errors->first('email'))
|
||||
<li class="error-message-padding">{!! $errors->first('email', ':message') !!}</li>
|
||||
@if($errors->first('first_name'))
|
||||
<li class="error-message-padding">{!! $errors->first('first_name', ':message') !!}</li>
|
||||
@endif
|
||||
@if($errors->first('last_name'))
|
||||
<li class="error-message-padding">{!! $errors->first('last_name', ':message') !!}</li>
|
||||
@endif
|
||||
@if($errors->first('user_name'))
|
||||
<li class="error-message-padding">{!! $errors->first('user_name', ':message') !!}</li>
|
||||
<li class="error-message-padding">{!! $errors->first('user_name', ':message') !!}</li>
|
||||
@endif
|
||||
@if($errors->first('email'))
|
||||
<li class="error-message-padding">{!! $errors->first('email', ':message') !!}</li>
|
||||
@endif
|
||||
@if($errors->first('mobile'))
|
||||
<li class="error-message-padding">{!! $errors->first('mobile', ':message') !!}</li>
|
||||
<li class="error-message-padding">{!! $errors->first('mobile', ':message') !!}</li>
|
||||
@endif
|
||||
@if($errors->first('ext'))
|
||||
<li class="error-message-padding">{!! $errors->first('ext', ':message') !!}</li>
|
||||
<li class="error-message-padding">{!! $errors->first('ext', ':message') !!}</li>
|
||||
@endif
|
||||
@if($errors->first('phone_number'))
|
||||
<li class="error-message-padding">{!! $errors->first('phone_number', ':message') !!}</li>
|
||||
<li class="error-message-padding">{!! $errors->first('phone_number', ':message') !!}</li>
|
||||
@endif
|
||||
@if($errors->first('active'))
|
||||
<li class="error-message-padding">{!! $errors->first('active', ':message') !!}</li>
|
||||
<li class="error-message-padding">{!! $errors->first('active', ':message') !!}</li>
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
<!-- Email Address : Email : Required -->
|
||||
<div class="row">
|
||||
<div class="col-md-4 form-group {{ $errors->has('email') ? 'has-error' : '' }}">
|
||||
{!! Form::label('email',Lang::get('lang.email')) !!} <span class="text-red"> *</span>
|
||||
{!! Form::email('email',null,['class' => 'form-control']) !!}
|
||||
<!-- First name : first name : Required -->
|
||||
<div class="col-xs-3 form-group {{ $errors->has('first_name') ? 'has-error' : '' }}">
|
||||
{!! Form::label('first_name',Lang::get('lang.first_name')) !!}<span class="text-red"> *</span>
|
||||
{!! Form::text('first_name',null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
<!-- Full Name : Text : Required-->
|
||||
<div class="col-md-4 form-group {{ $errors->has('user_name') ? 'has-error' : '' }}">
|
||||
{!! Form::label('user_name',Lang::get('lang.full_name')) !!} <span class="text-red"> *</span>
|
||||
<!-- Last name : last name : Required -->
|
||||
<div class="col-xs-3 form-group {{ $errors->has('last_name') ? 'has-error' : '' }}">
|
||||
{!! Form::label('last_name',Lang::get('lang.last_name')) !!}
|
||||
{!! Form::text('last_name',null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
<!-- User Name : Text : Required-->
|
||||
<div class="col-xs-3 form-group {{ $errors->has('user_name') ? 'has-error' : '' }}">
|
||||
{!! Form::label('user_name',Lang::get('lang.user_name')) !!}<span class="text-red"> *</span>
|
||||
{!! Form::text('user_name',null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
<!-- mobile Number : Text : -->
|
||||
<div class="col-md-4 form-group {{ $errors->has('mobile') ? 'has-error' : '' }}">
|
||||
{!! Form::label('mobile',Lang::get('lang.mobile')) !!}
|
||||
{!! Form::text('mobile',null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
<div class="col-md-3 form-group {{ $errors->has('email') ? 'has-error' : '' }}">
|
||||
{!! Form::label('email',Lang::get('lang.email')) !!} <span class="text-red"> *</span>
|
||||
{!! Form::email('email',null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
<div class="col-xs-1 form-group {{ Session::has('country_code_error') ? 'has-error' : '' }}">
|
||||
|
||||
{!! Form::label('country_code',Lang::get('lang.country-code')) !!}
|
||||
{!! $errors->first('country_code', '<spam class="help-block">:message</spam>') !!}
|
||||
{!! Form::text('country_code',null,['class' => 'form-control', 'placeholder' => $phonecode, 'title' => Lang::get('lang.enter-country-phone-code')]) !!}
|
||||
|
||||
</div>
|
||||
<!-- mobile Number : Text : -->
|
||||
<div class="col-md-3 form-group {{ $errors->has('mobile') ? 'has-error' : '' }}">
|
||||
{!! Form::label('mobile',Lang::get('lang.mobile')) !!}
|
||||
{!! Form::text('mobile',null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
<div class="col-xs-1 form-group {{ $errors->has('ext') ? 'has-error' : '' }}">
|
||||
<label for="ext">{!! Lang::get('lang.ext') !!}</label>
|
||||
{!! Form::text('ext',null,['class' => 'form-control']) !!}
|
||||
@@ -95,7 +109,7 @@ class="active"
|
||||
<label for="phone_number">{!! Lang::get('lang.phone') !!}</label>
|
||||
{!! Form::text('phone_number',null,['class' => 'form-control']) !!}
|
||||
</div>
|
||||
<div class="col-xs-3 form-group {{ $errors->has('active') ? 'has-error' : '' }}">
|
||||
<div class="col-xs-2 form-group {{ $errors->has('active') ? 'has-error' : '' }}">
|
||||
{!! Form::label('active',Lang::get('lang.status')) !!}
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
@@ -106,7 +120,7 @@ class="active"
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-3 form-group {{ $errors->has('ban') ? 'has-error' : '' }}">
|
||||
<div class="col-xs-2 form-group {{ $errors->has('ban') ? 'has-error' : '' }}">
|
||||
{!! Form::label('ban',Lang::get('lang.ban')) !!}
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
@@ -121,16 +135,24 @@ class="active"
|
||||
<!-- Internal Notes : Textarea -->
|
||||
<div class="form-group">
|
||||
{!! Form::label('internal_note',Lang::get('lang.internal_notes')) !!}
|
||||
{!! Form::textarea('internal_note',null,['class' => 'form-control']) !!}
|
||||
{!! Form::textarea('internal_note',null,['class' => 'form-control', 'size' => '30x5']) !!}
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
{!! Form::submit(Lang::get('lang.save'),['class'=>'form-group btn btn-primary'])!!}
|
||||
{!! Form::submit(Lang::get('lang.update'),['class'=>'form-group btn btn-primary'])!!}
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function() {
|
||||
$("textarea").wysihtml5();
|
||||
});
|
||||
|
||||
$('input[type="checkbox"]').iCheck({
|
||||
checkboxClass: 'icheckbox_flat-blue'
|
||||
});
|
||||
$('input[type="radio"]').iCheck({
|
||||
radioClass: 'iradio_flat-blue'
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
@stop
|
||||
@@ -42,6 +42,14 @@ class="active"
|
||||
</div>
|
||||
@endif
|
||||
<!-- failure message -->
|
||||
@if(Session::has('warning'))
|
||||
<div class="alert alert-warning alert-dismissable">
|
||||
<i class="fa fa-ban"></i><button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<b>{!! Lang::get('lang.alert') !!} !</b>
|
||||
{{Session::get('warning')}}
|
||||
</div>
|
||||
@endif
|
||||
<!-- failure message -->
|
||||
@if(Session::has('fails'))
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<i class="fa fa-ban"></i><button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
|
||||
@@ -127,7 +127,7 @@ class="active"
|
||||
{!! Form::close() !!}
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
{!! Form::submit(Lang::get('lang.submit'),['class'=>'form-group btn btn-primary'])!!}
|
||||
{!! Form::submit(Lang::get('lang.update'),['class'=>'form-group btn btn-primary'])!!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -178,7 +178,7 @@ class="active"
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
{!! Form::submit(Lang::get('lang.save'),['class'=>'form-group btn btn-primary'])!!}
|
||||
{!! Form::submit(Lang::get('lang.update'),['class'=>'form-group btn btn-primary'])!!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -82,10 +82,10 @@ class="active"
|
||||
<div class='col-xs-4'><label>{!! Lang::get('lang.group') !!}:</label></div> <div class='col-xs-7'> {{ $grp }}</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<div class='col-xs-4'><label>{!! Lang::get('lang.company') !!}:</label></div> <div class='col-xs-7'> {{ $user->role }}</div>
|
||||
<div class='col-xs-4'><label>{!! Lang::get('lang.company') !!}:</label></div> <div class='col-xs-7'> {{ $user->company }}</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<div class='col-xs-4'><label>{!! Lang::get('lang.role') !!}:</label></div> <div class='col-xs-7'> {{ $user->company }}</div>
|
||||
<div class='col-xs-4'><label>{!! Lang::get('lang.role') !!}:</label></div> <div class='col-xs-7'> {{ $user->role }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -64,6 +64,14 @@ class="active"
|
||||
</center>
|
||||
</div>
|
||||
</div>
|
||||
@if($users->user_name)
|
||||
<div class="box-footer">
|
||||
<b>{{Lang::get('lang.user_name')}}</b>
|
||||
<a class="pull-right" href="{{route('user.show', $users->id)}}">
|
||||
{{$users->user_name }}
|
||||
</a>
|
||||
</div>
|
||||
@endif
|
||||
<div class="box-footer">
|
||||
<b>{{Lang::get('lang.email')}}</b>
|
||||
<a class="pull-right" href="{{route('user.show', $users->id)}}">
|
||||
@@ -118,12 +126,30 @@ class="active"
|
||||
<span style="color:red;">{!! Lang::get('lang.inactive') !!}</span>
|
||||
@endif
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
@if($users->country_code)
|
||||
<div class="box-footer">
|
||||
<b>{{Lang::get('lang.country_code')}}</b>
|
||||
<a class="pull-right"> {{$users->country_code}}</a>
|
||||
</div>
|
||||
@endif
|
||||
@if($users->ext)
|
||||
<div class="box-footer">
|
||||
<b>{{Lang::get('lang.ext')}}</b>
|
||||
<a class="pull-right"> {{$users->ext}}</a>
|
||||
</div>
|
||||
@endif
|
||||
@if($users->mobile)
|
||||
<div class="box-footer">
|
||||
<b>{{Lang::get('lang.mobile')}}</b>
|
||||
<a class="pull-right"> {{$users->mobile}}</a>
|
||||
</div>
|
||||
@endif
|
||||
@if($users->phone_number)
|
||||
<div class="box-footer">
|
||||
<b>{{Lang::get('lang.phone')}}</b>
|
||||
<a class="pull-right">{{$users->phone_number}}</a>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<b>{{Lang::get('lang.phone')}}</b>
|
||||
<a class="pull-right"> {{$users->phone_number}}</a>
|
||||
</div>
|
||||
@endif
|
||||
@if($users->internal_note)
|
||||
<div class="box-footer">
|
||||
@@ -252,7 +278,7 @@ class="active"
|
||||
@if($attach > 0) <i class="fa fa-paperclip"></i>@endif</td>
|
||||
<td class="mailbox-Id"><a href="{!! route('ticket.thread',[$ticket->id]) !!}" title="{!! $title->title !!}">#{!! $ticket->ticket_number !!}</a></td>
|
||||
<?php $priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('priority_id', '=', $ticket->priority_id)->first(); ?>
|
||||
<td class="mailbox-priority"><spam class="btn btn-{{$priority->priority_color}} btn-xs">{{$priority->priority}}</spam></td>
|
||||
<td class="mailbox-priority">@if($priority != null)<spam class="btn btn-{{$priority->priority_color}} btn-xs">{{$priority->priority}}</spam>@endif</td>
|
||||
<?php $from = App\User::where('id', '=', $ticket->user_id)->first(); ?>
|
||||
<td class="mailbox-last-reply" style="color:{!! $rep !!}">{!! $username !!}</td>
|
||||
<td>{!! $assigned !!}</td>
|
||||
@@ -370,7 +396,7 @@ class="active"
|
||||
@if($attach > 0) <i class="fa fa-paperclip"></i>@endif</td>
|
||||
<td class="mailbox-Id"><a href="{!! route('ticket.thread',[$ticket->id]) !!}" title="{!! $title->title !!}">#{!! $ticket->ticket_number !!}</a></td>
|
||||
<?php $priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('priority_id', '=', $ticket->priority_id)->first(); ?>
|
||||
<td class="mailbox-priority"><spam class="btn btn-{{$priority->priority_color}} btn-xs">{{$priority->priority}}</spam></td>
|
||||
<td class="mailbox-priority">@if($priority != null)<spam class="btn btn-{{$priority->priority_color}} btn-xs">{{$priority->priority}}</spam>@endif</td>
|
||||
<?php $from = App\User::where('id', '=', $ticket->user_id)->first(); ?>
|
||||
<td class="mailbox-last-reply" style="color:{!! $rep !!}">{!! $username !!}</td>
|
||||
<td>{!! $assigned !!}</td>
|
||||
@@ -492,7 +518,7 @@ class="active"
|
||||
@if($attach > 0) <i class="fa fa-paperclip"></i>@endif</td>
|
||||
<td class="mailbox-Id"><a href="{!! route('ticket.thread',[$ticket->id]) !!}" title="{!! $title->title !!}">#{!! $ticket->ticket_number !!}</a></td>
|
||||
<?php $priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('priority_id', '=', $ticket->priority_id)->first(); ?>
|
||||
<td class="mailbox-priority"><spam class="btn btn-{{$priority->priority_color}} btn-xs">{{$priority->priority}}</spam></td>
|
||||
<td class="mailbox-priority">@if($priority != null)<spam class="btn btn-{{$priority->priority_color}} btn-xs">{{$priority->priority}}</spam>@endif</td>
|
||||
<?php $from = App\User::where('id', '=', $ticket->user_id)->first(); ?>
|
||||
<td class="mailbox-last-reply" style="color:{!! $rep !!}">{!! $username !!}</td>
|
||||
<td>{!! $assigned !!}</td>
|
||||
|
||||
@@ -1,740 +0,0 @@
|
||||
@extends('themes.default1.agent.layout.agent')
|
||||
|
||||
@section('Users')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('user-bar')
|
||||
active
|
||||
@stop
|
||||
|
||||
@section('user')
|
||||
class="active"
|
||||
@stop
|
||||
|
||||
@section('HeadInclude')
|
||||
@stop
|
||||
<!-- header -->
|
||||
@section('PageHeader')
|
||||
<h1>{!! Lang::get('lang.user_profile') !!} <a href="{{route('user.edit', $users->id)}}" class="btn btn-info btn-sm btn-flat pull-right"><i class="fa fa-edit" style="color:black;"> </i> {!! Lang::get('lang.edit') !!}</a></h1>
|
||||
@stop
|
||||
<!-- /header -->
|
||||
<!-- breadcrumbs -->
|
||||
@section('breadcrumbs')
|
||||
|
||||
@stop
|
||||
<!-- /breadcrumbs -->
|
||||
<!-- content -->
|
||||
@section('content')
|
||||
<!-- success message -->
|
||||
<div id="alert-success" class="alert alert-success alert-dismissable" style="display:none;">
|
||||
<i class="fa fa-check-circle"> </i> <b> Success <span id="get-success"></span></b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="box box-primary">
|
||||
<div class="box-header">
|
||||
</div>
|
||||
<div class="box-body ">
|
||||
<div>
|
||||
<center>
|
||||
<img src="{{ Gravatar::src($users -> email) }}" class="img-circle" alt="User Image" style="border:3px solid #CBCBDA;padding:3px;">
|
||||
@if($users->first_name || $users->last_name)
|
||||
<h3 class="">{{$users->first_name}} {{$users->last_name}}</h3>
|
||||
@else
|
||||
<h3 class="">{{$users->user_name}}</h3>
|
||||
@endif
|
||||
</center>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<b>{{Lang::get('lang.email')}}</b>
|
||||
<a class="pull-right">
|
||||
{{$users->email }}
|
||||
</a>
|
||||
</div>
|
||||
<div class="box-footer">
|
||||
<div id="refresh-org">
|
||||
<?php
|
||||
$user_org = App\Model\helpdesk\Agent_panel\User_org::where('user_id','=', $users->id)->first();
|
||||
?>
|
||||
@if($user_org == null)
|
||||
<b>{!! Lang::get('lang.organization') !!}</b>
|
||||
|
||||
<a href="" class="pull-right" data-toggle="modal" data-target="#assign"><i class="fa fa-hand-o-right" style="color:orange;"> </i> {!! Lang::get('lang.assign') !!} </a>
|
||||
<a href="" data-toggle="modal" data-target="#create_org" class="pull-right"> {{Lang::get('lang.create')}} <b style="color:#000"> / </b> </a>
|
||||
@else
|
||||
<?php $org_id = $user_org->org_id;
|
||||
$organization = App\Model\helpdesk\Agent_panel\Organization::where('id','=',$org_id)->first(); ?>
|
||||
<b>{!! Lang::get('lang.organization') !!}</b>
|
||||
<a href="{!! URL::route('organizations.show',$organization->id) !!}" class="pull-right">{!! $organization->name !!}</a>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box-footer">
|
||||
<b>{{Lang::get('lang.status')}}</b>
|
||||
<a class="pull-right">
|
||||
@if($users->active == '1')
|
||||
<span style="color:green;">{!! Lang::get('lang.active') !!}</span>
|
||||
@else
|
||||
<span style="color:red;">{!! Lang::get('lang.inactive') !!}</span>
|
||||
@endif
|
||||
</a>
|
||||
</div>
|
||||
@if($users->phone_number)
|
||||
<div class="box-footer">
|
||||
<b>{{Lang::get('lang.phone')}}</b>
|
||||
<a class="pull-right">{{$users->phone_number}}</a>
|
||||
</div>
|
||||
@endif
|
||||
@if($users->internal_note)
|
||||
<div class="box-footer">
|
||||
<b>{{Lang::get('lang.internal_notes')}}</b>
|
||||
<br/>
|
||||
{!! $users->internal_note !!}
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
{{-- detals table starts --}}
|
||||
<?php $user = App\User::where('id',$users->id)->first(); ?>
|
||||
<?php $open = count(App\Model\helpdesk\Ticket\Tickets::where('user_id', '=', $users->id)->where('status', '=','1')->get());
|
||||
$counted = count(App\Model\helpdesk\Ticket\Tickets::where('user_id', '=', $users->id)->where('status', '=','2')->get());
|
||||
$deleted = count(App\Model\helpdesk\Ticket\Tickets::where('user_id', '=', $users->id)->where('status', '=','5')->get()); ?>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<!-- Custom Tabs -->
|
||||
<div class="nav-tabs-custom">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a href="#tab_1" data-toggle="tab">{!! Lang::get('lang.open_tickets') !!} ({{$open}})</a></li>
|
||||
<li><a href="#tab_2" data-toggle="tab">{!! Lang::get('lang.closed_tickets') !!} ({{$counted}})</a></li>
|
||||
<li><a href="#tab_3" data-toggle="tab">{!! Lang::get('lang.deleted_tickets') !!} ({{$deleted}})</a></li>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="tab_1">
|
||||
{{-- open tab --}}
|
||||
<?php $open = count(App\Model\helpdesk\Ticket\Tickets::where('user_id', '=', $users->id)->where('status', '=','1')->get()); ?>
|
||||
|
||||
@if(Session::has('success'))
|
||||
<div id="success-alert" class="alert alert-success alert-dismissable">
|
||||
<i class="fa fa-check-circle"> </i> <b> Success </b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('success')}}
|
||||
</div>
|
||||
@endif
|
||||
<!-- failure message -->
|
||||
@if(Session::has('fails'))
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<i class="fa fa-ban"> </i> <b> Alert! </b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('fails')}}
|
||||
</div>
|
||||
@endif
|
||||
<div class="box-body no-padding ">
|
||||
|
||||
{!! Form::open(['route'=>'select_all','method'=>'post']) !!}
|
||||
<div class="mailbox-controls">
|
||||
<!-- Check all button -->
|
||||
<a class="btn btn-default btn-sm checkbox-toggle"><i class="fa fa-square-o"></i></a>
|
||||
<a class="btn btn-default btn-sm" id="click"><i class="fa fa-refresh"></i></a>
|
||||
<input type="submit" class="btn btn-default text-orange btn-sm" name="submit" value="{!! Lang::get('lang.delete') !!}">
|
||||
<input type="submit" class="btn btn-default text-yellow btn-sm" name="submit" value="{!! Lang::get('lang.close') !!}">
|
||||
<div class="pull-right">
|
||||
<?php
|
||||
$counted = count(App\Model\helpdesk\Ticket\Tickets::where('user_id', '=', $users->id)->where('status', '=','1')->get());
|
||||
if ($counted < 20) {
|
||||
echo $counted . "/" . $counted;
|
||||
} else {
|
||||
echo "20/" . $counted;
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class=" table-responsive mailbox-messages" id="refresh">
|
||||
<p style="display:none;text-align:center; position:fixed; margin-left:40%;margin-top:-70px;" id="show" class="text-red"><b>Loading...</b></p>
|
||||
<!-- table -->
|
||||
<table class="table table-hover table-striped">
|
||||
<thead>
|
||||
<th>
|
||||
</th>
|
||||
<th>{!! Lang::get('lang.subject') !!}</th>
|
||||
<th>{!! Lang::get('lang.ticket_id') !!}</th>
|
||||
<th>{!! Lang::get('lang.priority') !!}</th>
|
||||
<th>{!! Lang::get('lang.last_replier') !!}</th>
|
||||
<th>{!! Lang::get('lang.assigned_to') !!}</th>
|
||||
<th>{!! Lang::get('lang.last_activity') !!}</th>
|
||||
</thead>
|
||||
<tbody id="hello">
|
||||
<?php $tickets = App\Model\helpdesk\Ticket\Tickets::where('user_id', '=', $users->id)->where('status', '=','1')->orderBy('id', 'DESC')->paginate(20);?>
|
||||
@foreach ($tickets as $ticket)
|
||||
<tr <?php if ($ticket->seen_by == null) {?> style="color:green;" <?php }
|
||||
?> >
|
||||
<td ><input type="checkbox" class="icheckbox_flat-blue" name="select_all[]" value="{{$ticket->id}}"/></td>
|
||||
<?php
|
||||
// collaborators
|
||||
$collaborators = App\Model\helpdesk\Ticket\Ticket_Collaborator::where('ticket_id','=',$ticket->id)->get();
|
||||
$collab = count($collaborators);
|
||||
// title
|
||||
$title = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->first();
|
||||
$string = strip_tags($title->title);
|
||||
// check atatchments
|
||||
$attachments = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id','=',$title->id)->first();
|
||||
$attach = count($attachments);
|
||||
|
||||
if (strlen($string) > 40) {
|
||||
$stringCut = substr($string, 0, 40);
|
||||
$string = substr($stringCut, 0, strrpos($stringCut, ' ')).' ...';
|
||||
}
|
||||
$TicketData = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->max('id');
|
||||
$TicketDatarow = App\Model\helpdesk\Ticket\Ticket_Thread::where('id', '=', $TicketData)->first();
|
||||
$LastResponse = App\User::where('id', '=', $TicketDatarow->user_id)->first();
|
||||
if($LastResponse->role == "user") {
|
||||
$rep = "#F39C12";
|
||||
$username = $LastResponse->user_name;
|
||||
} else { $rep = "#000"; $username = $LastResponse->first_name ." ". $LastResponse->last_name;
|
||||
if($LastResponse->first_name==null || $LastResponse->last_name==null) {
|
||||
$username = $LastResponse->user_name;
|
||||
}}
|
||||
$titles = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->get();
|
||||
$count = count($titles);
|
||||
foreach($titles as $title) {
|
||||
$title = $title;
|
||||
}
|
||||
$assigned_to = App\User::where('id','=',$ticket->assigned_to)->first();
|
||||
if($assigned_to == null) {
|
||||
$assigned = "Unassigned";
|
||||
} else {
|
||||
$assigned = $assigned_to->first_name ." ". $assigned_to->last_name;
|
||||
}
|
||||
?>
|
||||
<td class="mailbox-name"><a href="{!! route('ticket.thread',[$ticket->id]) !!}" title="{!! $title->title !!}">{{$string}} </a> ({!! $count!!}) <i class="fa fa-comment"></i>
|
||||
@if($collab > 0) <i class="fa fa-users"></i>@endif
|
||||
@if($attach > 0) <i class="fa fa-paperclip"></i>@endif</td>
|
||||
<td class="mailbox-Id"><a href="{!! route('ticket.thread',[$ticket->id]) !!}" title="{!! $title->title !!}">#{!! $ticket->ticket_number !!}</a></td>
|
||||
<?php $priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('priority_id', '=', $ticket->priority_id)->first();?>
|
||||
<td class="mailbox-priority"><spam class="btn btn-{{$priority->priority_color}} btn-xs">{{$priority->priority}}</spam></td>
|
||||
<?php $from = App\User::where('id','=',$ticket->user_id)->first(); ?>
|
||||
<td class="mailbox-last-reply" style="color:{!! $rep !!}">{!! $username !!}</td>
|
||||
<td>{!! $assigned !!}</td>
|
||||
<td class="mailbox-last-activity">{!! UTC::usertimezone($title->updated_at) !!}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table><!-- /.table -->
|
||||
<div class="pull-right">
|
||||
<?php echo $tickets->setPath(url('/ticket/open'))->render();?>
|
||||
</div>
|
||||
</div><!-- /.mail-box-messages -->
|
||||
{!! Form::close() !!}
|
||||
|
||||
{{-- end deleted tickets --}}
|
||||
</div>
|
||||
</div><!-- /.tab-pane -->
|
||||
<div class="tab-pane" id="tab_2">
|
||||
{{-- open tab --}}
|
||||
<?php $closed = count(App\Model\helpdesk\Ticket\Tickets::where('user_id', '=', $users->id)->where('status', 2)->get()); ?>
|
||||
@if(Session::has('success'))
|
||||
<div id="success-alert" class="alert alert-success alert-dismissable">
|
||||
<i class="fa fa-check-circle"> </i> <b> Success </b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('success')}}
|
||||
</div>
|
||||
@endif
|
||||
<!-- failure message -->
|
||||
@if(Session::has('fails'))
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<i class="fa fa-ban"> </i> <b> Alert! </b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('fails')}}
|
||||
</div>
|
||||
@endif
|
||||
<div class="box-body no-padding">
|
||||
{!! Form::open(['route'=>'select_all','method'=>'post']) !!}
|
||||
<div class="mailbox-controls">
|
||||
<!-- Check all button -->
|
||||
<a class="btn btn-default btn-sm checkbox-toggle"><i class="fa fa-square-o"></i></a>
|
||||
<a class="btn btn-default btn-sm" id="click"><i class="fa fa-refresh"></i></a>
|
||||
<input type="submit" class="btn btn-default text-orange btn-sm" name="submit" value="{!! Lang::get('lang.delete') !!}">
|
||||
<input type="submit" class="btn btn-default text-yellow btn-sm" name="submit" value="{!! Lang::get('lang.close') !!}">
|
||||
<div class="pull-right">
|
||||
<?php
|
||||
$counted = count(App\Model\helpdesk\Ticket\Tickets::where('user_id', '=', $users->id)->where('status', '=','2')->get());
|
||||
if ($counted < 20) {
|
||||
echo $counted . "/" . $counted;
|
||||
} else {
|
||||
echo "20/" . $counted;
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class=" table-responsive mailbox-messages" id="refresh">
|
||||
<p style="display:none;text-align:center; position:fixed; margin-left:40%;margin-top:-70px;" id="show" class="text-red"><b>Loading...</b></p>
|
||||
<!-- table -->
|
||||
<table class="table table-hover table-striped">
|
||||
<thead>
|
||||
<th>
|
||||
</th>
|
||||
<th>{!! Lang::get('lang.subject') !!}</th>
|
||||
<th>{!! Lang::get('lang.ticket_id') !!}</th>
|
||||
<th>{!! Lang::get('lang.priority') !!}</th>
|
||||
<th>{!! Lang::get('lang.last_replier') !!}</th>
|
||||
<th>{!! Lang::get('lang.assigned_to') !!}</th>
|
||||
<th>{!! Lang::get('lang.last_activity') !!}</th>
|
||||
</thead>
|
||||
<tbody id="hello">
|
||||
<?php $tickets = App\Model\helpdesk\Ticket\Tickets::where('user_id', '=', $users->id)->where('status', '=','2')->orderBy('id', 'DESC')->paginate(20);?>
|
||||
@foreach ($tickets as $ticket)
|
||||
<tr <?php if ($ticket->seen_by == null) {?> style="color:green;" <?php } ?> >
|
||||
<td ><input type="checkbox" class="icheckbox_flat-blue" name="select_all[]" value="{{$ticket->id}}"/></td>
|
||||
<?php
|
||||
// collaborators
|
||||
$collaborators = App\Model\helpdesk\Ticket\Ticket_Collaborator::where('ticket_id','=',$ticket->id)->get();
|
||||
$collab = count($collaborators);
|
||||
// title
|
||||
$title = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->first();
|
||||
$string = strip_tags($title->title);
|
||||
// check atatchments
|
||||
$attachments = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id','=',$title->id)->first();
|
||||
$attach = count($attachments);
|
||||
|
||||
if (strlen($string) > 40) {
|
||||
$stringCut = substr($string, 0, 40);
|
||||
$string = substr($stringCut, 0, strrpos($stringCut, ' ')).' ...';
|
||||
}
|
||||
$TicketData = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->max('id');
|
||||
$TicketDatarow = App\Model\helpdesk\Ticket\Ticket_Thread::where('id', '=', $TicketData)->first();
|
||||
$LastResponse = App\User::where('id', '=', $TicketDatarow->user_id)->first();
|
||||
if($LastResponse->role == "user") {
|
||||
$rep = "#F39C12";
|
||||
$username = $LastResponse->user_name;
|
||||
} else { $rep = "#000"; $username = $LastResponse->first_name ." ". $LastResponse->last_name;
|
||||
if($LastResponse->first_name==null || $LastResponse->last_name==null) {
|
||||
$username = $LastResponse->user_name;
|
||||
}}
|
||||
$titles = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->get();
|
||||
$count = count($titles);
|
||||
foreach($titles as $title) {
|
||||
$title = $title;
|
||||
}
|
||||
$assigned_to = App\User::where('id','=',$ticket->assigned_to)->first();
|
||||
if($assigned_to == null) {
|
||||
$assigned = "Unassigned";
|
||||
} else {
|
||||
$assigned = $assigned_to->first_name ." ". $assigned_to->last_name;
|
||||
}
|
||||
?>
|
||||
<td class="mailbox-name"><a href="{!! route('ticket.thread',[$ticket->id]) !!}" title="{!! $title->title !!}">{{$string}} </a> ({!! $count!!}) <i class="fa fa-comment"></i>
|
||||
@if($collab > 0) <i class="fa fa-users"></i>@endif
|
||||
@if($attach > 0) <i class="fa fa-paperclip"></i>@endif</td>
|
||||
<td class="mailbox-Id"><a href="{!! route('ticket.thread',[$ticket->id]) !!}" title="{!! $title->title !!}">#{!! $ticket->ticket_number !!}</a></td>
|
||||
<?php $priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('priority_id', '=', $ticket->priority_id)->first();?>
|
||||
<td class="mailbox-priority"><spam class="btn btn-{{$priority->priority_color}} btn-xs">{{$priority->priority}}</spam></td>
|
||||
<?php $from = App\User::where('id','=',$ticket->user_id)->first(); ?>
|
||||
<td class="mailbox-last-reply" style="color:{!! $rep !!}">{!! $username !!}</td>
|
||||
<td>{!! $assigned !!}</td>
|
||||
<td class="mailbox-last-activity">{!! UTC::usertimezone($title->updated_at) !!}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table><!-- /.table -->
|
||||
|
||||
<div class="pull-right">
|
||||
<?php echo $tickets->setPath(url('/ticket/open'))->render();?>
|
||||
</div>
|
||||
</div><!-- /.mail-box-messages -->
|
||||
{!! Form::close() !!}
|
||||
|
||||
{{-- end deleted tickets --}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane" id="tab_3">
|
||||
{{-- open tab --}}
|
||||
<?php $deleted = count(App\Model\helpdesk\Ticket\Tickets::where('user_id', '=', $users->id)->where('status', '=','5')->get()); ?>
|
||||
|
||||
@if(Session::has('success'))
|
||||
<div id="success-alert" class="alert alert-success alert-dismissable">
|
||||
<i class="fa fa-check-circle"> </i> <b> Success </b>
|
||||
<button type="button" id="close-alert" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('success')}}
|
||||
</div>
|
||||
@endif
|
||||
<!-- failure message -->
|
||||
@if(Session::has('fails'))
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<i class="fa fa-ban"> </i> <b> Alert! </b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('fails')}}
|
||||
</div>
|
||||
@endif
|
||||
<div class="box-body no-padding ">
|
||||
|
||||
{!! Form::open(['route'=>'select_all','method'=>'post']) !!}
|
||||
<div class="mailbox-controls">
|
||||
<!-- Check all button -->
|
||||
<a class="btn btn-default btn-sm checkbox-toggle"><i class="fa fa-square-o"></i></a>
|
||||
<a class="btn btn-default btn-sm" id="click"><i class="fa fa-refresh"></i></a>
|
||||
<input type="submit" class="btn btn-default text-orange btn-sm" name="submit" value="{!! Lang::get('lang.delete') !!}">
|
||||
<input type="submit" class="btn btn-default text-yellow btn-sm" name="submit" value="{!! Lang::get('lang.close') !!}">
|
||||
<div class="pull-right">
|
||||
<?php
|
||||
$counted = count(App\Model\helpdesk\Ticket\Tickets::where('user_id', '=', $users->id)->where('status', '=','5')->get());
|
||||
if ($counted < 20) {
|
||||
echo $counted . "/" . $counted;
|
||||
} else {
|
||||
echo "20/" . $counted;
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class=" table-responsive mailbox-messages" id="refresh">
|
||||
<p style="display:none;text-align:center; position:fixed; margin-left:40%;margin-top:-70px;" id="show" class="text-red"><b>Loading...</b></p>
|
||||
<!-- table -->
|
||||
<table class="table table-hover table-striped">
|
||||
<thead>
|
||||
<th>
|
||||
</th>
|
||||
<th>{!! Lang::get('lang.subject') !!}</th>
|
||||
<th>{!! Lang::get('lang.ticket_id') !!}</th>
|
||||
<th>{!! Lang::get('lang.priority') !!}</th>
|
||||
<th>{!! Lang::get('lang.last_replier') !!}</th>
|
||||
<th>{!! Lang::get('lang.assigned_to') !!}</th>
|
||||
<th>{!! Lang::get('lang.last_activity') !!}</th>
|
||||
</thead>
|
||||
<tbody id="hello">
|
||||
<?php $tickets = App\Model\helpdesk\Ticket\Tickets::where('user_id', '=', $users->id)->where('status', '=','5')->orderBy('id', 'DESC')->paginate(20);?>
|
||||
@foreach ($tickets as $ticket)
|
||||
<tr <?php if ($ticket->seen_by == null) {?> style="color:green;" <?php }
|
||||
?> >
|
||||
<td ><input type="checkbox" class="icheckbox_flat-blue" name="select_all[]" value="{{$ticket->id}}"/></td>
|
||||
<?php
|
||||
// collaborators
|
||||
$collaborators = App\Model\helpdesk\Ticket\Ticket_Collaborator::where('ticket_id','=',$ticket->id)->get();
|
||||
$collab = count($collaborators);
|
||||
// title
|
||||
$title = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->first();
|
||||
$string = strip_tags($title->title);
|
||||
// check atatchments
|
||||
$attachments = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id','=',$title->id)->first();
|
||||
$attach = count($attachments);
|
||||
|
||||
if (strlen($string) > 40) {
|
||||
$stringCut = substr($string, 0, 40);
|
||||
$string = substr($stringCut, 0, strrpos($stringCut, ' ')).' ...';
|
||||
}
|
||||
$TicketData = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->max('id');
|
||||
$TicketDatarow = App\Model\helpdesk\Ticket\Ticket_Thread::where('id', '=', $TicketData)->first();
|
||||
$LastResponse = App\User::where('id', '=', $TicketDatarow->user_id)->first();
|
||||
if($LastResponse->role == "user") {
|
||||
$rep = "#F39C12";
|
||||
$username = $LastResponse->user_name;
|
||||
} else { $rep = "#000"; $username = $LastResponse->first_name ." ". $LastResponse->last_name;
|
||||
if($LastResponse->first_name==null || $LastResponse->last_name==null) {
|
||||
$username = $LastResponse->user_name;
|
||||
}}
|
||||
$titles = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->get();
|
||||
$count = count($titles);
|
||||
foreach($titles as $title)
|
||||
{
|
||||
$title = $title;
|
||||
}
|
||||
$assigned_to = App\User::where('id','=',$ticket->assigned_to)->first();
|
||||
if($assigned_to == null)
|
||||
{
|
||||
$assigned = "Unassigned";
|
||||
}
|
||||
else
|
||||
{
|
||||
$assigned = $assigned_to->first_name ." ". $assigned_to->last_name;
|
||||
}
|
||||
?>
|
||||
<td class="mailbox-name"><a href="{!! route('ticket.thread',[$ticket->id]) !!}" title="{!! $title->title !!}">{{$string}} </a> ({!! $count!!}) <i class="fa fa-comment"></i>
|
||||
@if($collab > 0) <i class="fa fa-users"></i>@endif
|
||||
@if($attach > 0) <i class="fa fa-paperclip"></i>@endif</td>
|
||||
<td class="mailbox-Id"><a href="{!! route('ticket.thread',[$ticket->id]) !!}" title="{!! $title->title !!}">#{!! $ticket->ticket_number !!}</a></td>
|
||||
<?php $priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('priority_id', '=', $ticket->priority_id)->first();?>
|
||||
<td class="mailbox-priority"><spam class="btn btn-{{$priority->priority_color}} btn-xs">{{$priority->priority}}</spam></td>
|
||||
<?php $from = App\User::where('id','=',$ticket->user_id)->first(); ?>
|
||||
<td class="mailbox-last-reply" style="color:{!! $rep !!}">{!! $username !!}</td>
|
||||
<td>{!! $assigned !!}</td>
|
||||
<td class="mailbox-last-activity">{!! UTC::usertimezone($title->updated_at) !!}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table><!-- /.table -->
|
||||
|
||||
<div class="pull-right">
|
||||
<?php echo $tickets->setPath(url('/ticket/open'))->render();?>
|
||||
</div>
|
||||
</div><!-- /.mail-box-messages -->
|
||||
{!! Form::close() !!}
|
||||
|
||||
</div><!-- /.tab-pane -->
|
||||
</div><!-- /.tab-content -->
|
||||
</div><!-- nav-tabs-custom -->
|
||||
</div><!-- /.col -->
|
||||
</div> <!-- /.row -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- END CUSTOM TABS -->
|
||||
|
||||
{{-- MODAL POPUPS --}}
|
||||
|
||||
<div class="modal fade" id="create_org">
|
||||
<div class="modal-dialog" style="width:84%;height:70%;">
|
||||
<div class="modal-content">
|
||||
{!! Form::model($users->id, ['id'=>'form','method' => 'PATCH'] )!!}
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidd en="true">×</span></button>
|
||||
<h4 class="modal-title">{!! Lang::get('lang.create_organization') !!}</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!-- failure message -->
|
||||
<div class="alert alert-danger alert-dismissable" id="alert-danger" style="display:none;">
|
||||
<i class="fa fa-ban"> </i> <b> Alert! <span id="get-danger"></span> </b>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
</div>
|
||||
<div class="row" id="hide">
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label>{!! Lang::get('lang.name') !!}</label>
|
||||
<input type="text" name="name" class="form-control">
|
||||
<spam id="error-name" style="display:none;position:fixed" class="call-out text-red">This is a required field</spam>
|
||||
<spam id="error-name1" style="display:none;position:fixed" class="call-out text-red">! Allready Taken</spam>
|
||||
<br/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label>{!! Lang::get('lang.phone') !!}</label>
|
||||
<input type="number" name="phone" class="form-control">
|
||||
<br/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="form-group">
|
||||
<label>{!! Lang::get('lang.website') !!}</label>
|
||||
<input type="url" name="website" placeholder="https://www.example.com" class="form-control">
|
||||
<spam id="error-website" style="display:none" class="help-block text-red">! Allready Taken</spam>
|
||||
<br/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label>{!! Lang::get('lang.address') !!}</label>
|
||||
<textarea name="address" class="form-control"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label>{!! Lang::get('lang.internal_notes') !!}</label>
|
||||
<textarea name="internal" class="form-control"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="show2" style="display:none;">
|
||||
<div class="row row-md-12">
|
||||
<div class="col-xs-5">
|
||||
</div>
|
||||
<div class="col-xs-2">
|
||||
<img src="{{asset("lb-faveo/media/images/gifloader.gif")}}">
|
||||
</div>
|
||||
<div class="col-xs-5">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal" id="dismis">{!! Lang::get('lang.close') !!}</button>
|
||||
<input type="submit" class="btn btn-primary pull-right" value="{!! Lang::get('lang.update') !!}">
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
|
||||
jQuery(document).ready(function($) {
|
||||
// create org
|
||||
$('#form').on('submit', function() {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "../user-org/{{$users->id}}",
|
||||
dataType: "html",
|
||||
data: $(this).serialize(),
|
||||
beforeSend: function() {
|
||||
$("#hide").hide();
|
||||
$("#show2").show();
|
||||
},
|
||||
success: function(response) {
|
||||
$("#show2").hide();
|
||||
$("#hide").show();
|
||||
|
||||
if (response == 0) {
|
||||
message = "Organization added successfully."
|
||||
$("#dismis").trigger("click");
|
||||
$("#refresh-org").load("../user/{{ $users->id }} #refresh-org");
|
||||
// $("#refresh2").load("../thread/{{$users->id}} #refresh2");
|
||||
// $("#show").show();
|
||||
$("#alert-success").show();
|
||||
$('#get-success').html(message);
|
||||
setInterval(function(){$("#alert-success").hide(); },4000);
|
||||
|
||||
} else {
|
||||
message = response;
|
||||
$("#alert-danger").show();
|
||||
$('#get-danger').html(message);
|
||||
}
|
||||
}
|
||||
})
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<!-- Organisation Assign Modal -->
|
||||
<div class="modal fade" id="assign">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
{!! Form::model($users->id, ['id'=>'org_assign','method' => 'PATCH'] )!!}
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" id="dismiss" aria-label="Close"><span aria-hidden="true">×</span></button>
|
||||
<h4 class="modal-title">{!! Lang::get('lang.assign') !!}</h4>
|
||||
</div>
|
||||
<div id="assign_alert" class="alert alert-success alert-dismissable" style="display:none;">
|
||||
<button id="assign_dismiss" type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
<h4><i class="icon fa fa-check"></i>Alert!</h4>
|
||||
<div id="message-success1"></div>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
</div>
|
||||
<div class="col-md-6" id="assign_loader" style="display:none;">
|
||||
<img src="{{asset("lb-faveo/media/images/gifloader.gif")}}"><br/><br/><br/>
|
||||
</div>
|
||||
</div>
|
||||
<div id="assign_body">
|
||||
<p>{!! Lang::get('lang.please_select_an_organization') !!}</p>
|
||||
<select id="org" class="form-control" name="org">
|
||||
<?php
|
||||
$orgs = App\Model\helpdesk\Agent_panel\Organization::all();
|
||||
?>
|
||||
<optgroup label="Select Organizations">
|
||||
@foreach($orgs as $org)
|
||||
<option value="{{$org->id}}">{!! $org->name !!}</option>
|
||||
@endforeach
|
||||
</optgroup>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default pull-left" data-dismiss="modal" id="dismis4">{!! Lang::get('lang.close') !!}</button>
|
||||
<button type="submit" class="btn btn-success pull-right" id="submt2">{!! Lang::get('lang.assign') !!}</button>
|
||||
</div>
|
||||
{!! Form::close()!!}
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
// Assign a ticket
|
||||
jQuery(document).ready(function($) {
|
||||
// create org
|
||||
$('#org_assign').on('submit', function() {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "../user-org-assign/{{$users->id}}",
|
||||
dataType: "html",
|
||||
data: $(this).serialize(),
|
||||
beforeSend: function() {
|
||||
$("#hide").hide();
|
||||
$("#show2").show();
|
||||
},
|
||||
success: function(response) {
|
||||
$("#show2").hide();
|
||||
$("#hide").show();
|
||||
|
||||
if (response == 1) {
|
||||
message = "Organization added successfully."
|
||||
$("#dismiss").trigger("click");
|
||||
$("#refresh-org").load("../user/{{ $users->id }} #refresh-org");
|
||||
// $("#refresh2").load("../thread/{{$users->id}} #refresh2");
|
||||
// $("#show").show();
|
||||
$("#alert-success").show();
|
||||
$('#get-success').html(message);
|
||||
setInterval(function(){$("#alert-success").hide(); },4000);
|
||||
}
|
||||
}
|
||||
})
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
$(function () {
|
||||
//Enable check and uncheck all functionality
|
||||
$(".checkbox-toggle").click(function () {
|
||||
var clicks = $(this).data('clicks');
|
||||
if (clicks) {
|
||||
//Uncheck all checkboxes
|
||||
$(".mailbox-messages input[type='checkbox']").iCheck("uncheck");
|
||||
$(".fa", this).removeClass("fa-check-square-o").addClass('fa-square-o');
|
||||
} else {
|
||||
//Check all checkboxes
|
||||
$(".mailbox-messages input[type='checkbox']").iCheck("check");
|
||||
$(".fa", this).removeClass("fa-square-o").addClass('fa-check-square-o');
|
||||
}
|
||||
$(this).data("clicks", !clicks);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
$(function() {
|
||||
// Enable check and uncheck all functionality
|
||||
$(".checkbox-toggle").click(function() {
|
||||
var clicks = $(this).data('clicks');
|
||||
if (clicks) {
|
||||
//Uncheck all checkboxes
|
||||
$("input[type='checkbox']", ".mailbox-messages").iCheck("uncheck");
|
||||
} else {
|
||||
//Check all checkboxes
|
||||
$("input[type='checkbox']", ".mailbox-messages").iCheck("check");
|
||||
}
|
||||
$(this).data("clicks", !clicks);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$(document).ready(function() { /// Wait till page is loaded
|
||||
$('#click').click(function() {
|
||||
$('#refresh').load('open #refresh');
|
||||
$("#show").show();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
<script>
|
||||
$(function () {
|
||||
$("textarea").wysihtml5();
|
||||
});
|
||||
</script>
|
||||
@stop
|
||||
<!-- /content -->
|
||||
Reference in New Issue
Block a user