Updates
This commit is contained in:
@@ -14,6 +14,31 @@ class="active"
|
||||
|
||||
@section('PageHeader')
|
||||
<h1>{{Lang::get('lang.tickets')}}</h1>
|
||||
<style>
|
||||
.tooltip1 {
|
||||
position: relative;
|
||||
/*display: inline-block;*/
|
||||
/*border-bottom: 1px dotted black;*/
|
||||
}
|
||||
|
||||
.tooltip1 .tooltiptext {
|
||||
visibility: hidden;
|
||||
width: 100%;
|
||||
background-color: black;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
border-radius: 6px;
|
||||
padding: 5px 0;
|
||||
|
||||
/* Position the tooltip */
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.tooltip1:hover .tooltiptext {
|
||||
visibility: visible;
|
||||
}
|
||||
</style>
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
@@ -52,6 +77,7 @@ if (Auth::user()->role == 'agent') {
|
||||
{{Session::get('fails')}}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{!! Form::open(['id'=>'modalpopup', 'route'=>'select_all','method'=>'post']) !!}
|
||||
<!--<div class="mailbox-controls">-->
|
||||
<!-- Check all button -->
|
||||
@@ -59,46 +85,14 @@ if (Auth::user()->role == 'agent') {
|
||||
<input type="submit" class="submit btn btn-default text-orange btn-sm" id="delete" name="submit" value="{!! Lang::get('lang.delete') !!}">
|
||||
<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>
|
||||
|
||||
<button type="button" class="btn btn-sm btn-default" id="assign_Ticket" data-toggle="modal" data-target="#AssignTickets" style="display: none;"><i class="fa fa-hand-o-right"> </i> {!! Lang::get('lang.assign') !!}</button>
|
||||
<!--</div>-->
|
||||
<!--</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 -->
|
||||
{!! Datatable::table()
|
||||
->addColumn(
|
||||
"",
|
||||
Lang::get('lang.subject'),
|
||||
Lang::get('lang.ticket_id'),
|
||||
Lang::get('lang.priority'),
|
||||
Lang::get('lang.from'),
|
||||
Lang::get('lang.assigned_to'),
|
||||
Lang::get('lang.last_activity'))
|
||||
->setUrl(route('get.answered.ticket'))
|
||||
|
||||
->setOrder(array(6=>'desc'))
|
||||
->setClass('table table-hover table-bordered table-striped')
|
||||
->setCallbacks("fnRowCallback",'function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) {
|
||||
var str = aData[3];
|
||||
if(str.search("#000") == -1) {
|
||||
$("td", nRow).css({"background-color":"#F3F3F3", "font-weight":"600", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px #F3F3F3"});
|
||||
$("td", nRow).mouseenter(function(){
|
||||
$("td", nRow).css({"background-color":"#DEDFE0", "font-weight":"600", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px #DEDFE0"});
|
||||
});
|
||||
$("td", nRow).mouseleave(function(){
|
||||
$("td", nRow).css({"background-color":"#F3F3F3", "font-weight":"600", "border-bottom":"solid 0.5px #ddd","border-right":"solid 0.5px #F3F3F3"});
|
||||
});
|
||||
} else {
|
||||
$("td", nRow).css({"background-color":"white", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px white"});
|
||||
$("td", nRow).mouseenter(function(){
|
||||
$("td", nRow).css({"background-color":"#DEDFE0", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px #DEDFE0"});
|
||||
});
|
||||
$("td", nRow).mouseleave(function(){
|
||||
$("td", nRow).css({"background-color":"white", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px white"});
|
||||
});
|
||||
}
|
||||
}')
|
||||
->render();!!}
|
||||
{!!$table->render('vendor.Chumper.template')!!}
|
||||
</div><!-- /.mail-box-messages -->
|
||||
{!! Form::close() !!}
|
||||
</div><!-- /.box-body -->
|
||||
@@ -125,12 +119,12 @@ if (Auth::user()->role == 'agent') {
|
||||
<div class="col-md-12">
|
||||
<div id="merge-succ-alert" class="alert alert-success alert-dismissable" style="display:none;" >
|
||||
<!--<button id="dismiss-merge" type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>-->
|
||||
<h4><i class="icon fa fa-check"></i>{!! Lang::get('lang.alert') !!}!</h4>
|
||||
<h4><i class="icon fa fa-check"></i>{!! Lang::get('lag.alert') !!}!</h4>
|
||||
<div id="message-merge-succ"></div>
|
||||
</div>
|
||||
<div id="merge-err-alert" class="alert alert-danger alert-dismissable" style="display:none;">
|
||||
<!--<button id="dismiss-merge2" type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>-->
|
||||
<h4><i class="icon fa fa-ban"></i>{!! Lang::get('lang.alert') !!}!</h4>
|
||||
<h4><i class="icon fa fa-ban"></i>{!! Lang::get('lag.alert') !!}!</h4>
|
||||
<div id="message-merge-err"></div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -165,6 +159,8 @@ if (Auth::user()->role == 'agent') {
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
||||
|
||||
<!-- Assign ticket model-->
|
||||
<div class="modal fade" id="AssignTickets">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
@@ -219,7 +215,7 @@ if (Auth::user()->role == 'agent') {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{!! $table->script('vendor.Chumper.ticket-javascript') !!}
|
||||
<script>
|
||||
var t_id = [];
|
||||
var option = null;
|
||||
@@ -251,14 +247,14 @@ if (Auth::user()->role == 'agent') {
|
||||
t_id = $('.selectval').map(function() {
|
||||
return $(this).val();
|
||||
}).get();
|
||||
showAssign(t_id);
|
||||
// alert(checkboxValues);
|
||||
showAssign(t_id)
|
||||
} else {
|
||||
//Check all checkboxes
|
||||
$("input[type='checkbox']", ".mailbox-messages").iCheck("check");
|
||||
// alert('Hallo');
|
||||
showAssign(t_id);
|
||||
t_id = [];
|
||||
showAssign(t_id)
|
||||
}
|
||||
$(this).data("clicks", !clicks);
|
||||
});
|
||||
@@ -407,15 +403,10 @@ if (Auth::user()->role == 'agent') {
|
||||
var message = "{{Lang::get('lang.merge-success')}}";
|
||||
$("#merge-succ-alert").show();
|
||||
$('#message-merge-succ').html(message);
|
||||
setInterval(function() {
|
||||
setTimeout(function () {
|
||||
$("#alert11").hide();
|
||||
setTimeout(function() {
|
||||
var link = document.querySelector('#load-answered');
|
||||
if (link) {
|
||||
link.click();
|
||||
}
|
||||
}, 500);
|
||||
}, 2000);
|
||||
location.reload();
|
||||
}, 1000);
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -14,6 +14,31 @@ class="active"
|
||||
|
||||
@section('PageHeader')
|
||||
<h1>{{Lang::get('lang.tickets')}}</h1>
|
||||
<style>
|
||||
.tooltip1 {
|
||||
position: relative;
|
||||
/*display: inline-block;*/
|
||||
/*border-bottom: 1px dotted black;*/
|
||||
}
|
||||
|
||||
.tooltip1 .tooltiptext {
|
||||
visibility: hidden;
|
||||
width: 100%;
|
||||
background-color: black;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
border-radius: 6px;
|
||||
padding: 5px 0;
|
||||
|
||||
/* Position the tooltip */
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.tooltip1:hover .tooltiptext {
|
||||
visibility: visible;
|
||||
}
|
||||
</style>
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
@@ -47,6 +72,7 @@ if (Auth::user()->role == 'agent') {
|
||||
{{Session::get('fails')}}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{!! Form::open(['id'=>'modalpopup', 'route'=>'select_all','method'=>'post']) !!}
|
||||
<!--<div class="mailbox-controls">-->
|
||||
<!-- Check all button -->
|
||||
@@ -54,47 +80,14 @@ if (Auth::user()->role == 'agent') {
|
||||
<input type="submit" class="submit btn btn-default text-orange btn-sm" id="delete" name="submit" value="{!! Lang::get('lang.delete') !!}">
|
||||
<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>
|
||||
|
||||
<button type="button" class="btn btn-sm btn-default" id="assign_Ticket" data-toggle="modal" data-target="#AssignTickets" style="display: none;"><i class="fa fa-hand-o-right"> </i> {!! Lang::get('lang.assign') !!}</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 -->
|
||||
{!! Datatable::table()
|
||||
->addColumn(
|
||||
"",
|
||||
Lang::get('lang.subject'),
|
||||
Lang::get('lang.ticket_id'),
|
||||
Lang::get('lang.priority'),
|
||||
Lang::get('lang.from'),
|
||||
Lang::get('lang.assigned_to'),
|
||||
Lang::get('lang.last_activity'))
|
||||
->setUrl(route('get.assigned.ticket'))
|
||||
|
||||
->setOrder(array(6=>'desc'))
|
||||
->setClass('table table-hover table-bordered table-striped')
|
||||
->setCallbacks("fnRowCallback",'function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) {
|
||||
var str = aData[3];
|
||||
if(str.search("#000") == -1) {
|
||||
$("td", nRow).css({"background-color":"#F3F3F3", "font-weight":"600", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px #F3F3F3"});
|
||||
$("td", nRow).mouseenter(function(){
|
||||
$("td", nRow).css({"background-color":"#DEDFE0", "font-weight":"600", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px #DEDFE0"});
|
||||
});
|
||||
$("td", nRow).mouseleave(function(){
|
||||
$("td", nRow).css({"background-color":"#F3F3F3", "font-weight":"600", "border-bottom":"solid 0.5px #ddd","border-right":"solid 0.5px #F3F3F3"});
|
||||
});
|
||||
} else {
|
||||
$("td", nRow).css({"background-color":"white", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px white"});
|
||||
$("td", nRow).mouseenter(function(){
|
||||
$("td", nRow).css({"background-color":"#DEDFE0", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px #DEDFE0"});
|
||||
});
|
||||
$("td", nRow).mouseleave(function(){
|
||||
$("td", nRow).css({"background-color":"white", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px white"});
|
||||
});
|
||||
}
|
||||
}')
|
||||
->render();!!}
|
||||
{!!$table->render('vendor.Chumper.template')!!}
|
||||
</div><!-- /.mail-box-messages -->
|
||||
{!! Form::close() !!}
|
||||
</div><!-- /.box-body -->
|
||||
@@ -197,7 +190,7 @@ if (Auth::user()->role == 'agent') {
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
||||
<!-- Assign ticket model-->
|
||||
<!-- Assign ticket model-->
|
||||
<!-- Modal -->
|
||||
<div class="modal fade in" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="false" style="display: none; padding-right: 15px;background-color: rgba(0, 0, 0, 0.7);">
|
||||
<div class="modal-dialog" role="document">
|
||||
@@ -218,7 +211,7 @@ if (Auth::user()->role == 'agent') {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{!! $table->script('vendor.Chumper.ticket-javascript') !!}
|
||||
|
||||
<script>
|
||||
var t_id = [];
|
||||
@@ -252,16 +245,16 @@ if (Auth::user()->role == 'agent') {
|
||||
t_id = $('.selectval').map(function() {
|
||||
return $(this).val();
|
||||
}).get();
|
||||
showAssign(t_id)
|
||||
// alert(checkboxValues);
|
||||
showAssign(t_id);
|
||||
} else {
|
||||
//Check all checkboxes
|
||||
$("input[type='checkbox']", ".mailbox-messages").iCheck("check");
|
||||
// alert('Hallo');
|
||||
t_id = [];
|
||||
showAssign(t_id)
|
||||
}
|
||||
$(this).data("clicks", !clicks);
|
||||
showAssign(t_id);
|
||||
|
||||
});
|
||||
|
||||
@@ -423,20 +416,16 @@ if (Auth::user()->role == 'agent') {
|
||||
var message = "{{Lang::get('lang.merge-success')}}";
|
||||
$("#merge-succ-alert").show();
|
||||
$('#message-merge-succ').html(message);
|
||||
setInterval(function() {
|
||||
setTimeout(function () {
|
||||
$("#alert11").hide();
|
||||
setTimeout(function() {
|
||||
var link = document.querySelector('#load-assigned');
|
||||
if (link) {
|
||||
link.click();
|
||||
}
|
||||
}, 500);
|
||||
}, 2000);
|
||||
location.reload();
|
||||
}, 1000);
|
||||
}
|
||||
}
|
||||
})
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#AssignTickets').on('show.bs.modal', function() {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
@@ -481,7 +470,6 @@ if (Auth::user()->role == 'agent') {
|
||||
})
|
||||
return false;
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
function someFunction(id) {
|
||||
|
||||
@@ -14,6 +14,31 @@ class="active"
|
||||
|
||||
@section('PageHeader')
|
||||
<h1>{{Lang::get('lang.tickets')}}</h1>
|
||||
<style>
|
||||
.tooltip1 {
|
||||
position: relative;
|
||||
/*display: inline-block;*/
|
||||
/*border-bottom: 1px dotted black;*/
|
||||
}
|
||||
|
||||
.tooltip1 .tooltiptext {
|
||||
visibility: hidden;
|
||||
width: 100%;
|
||||
background-color: black;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
border-radius: 6px;
|
||||
padding: 5px 0;
|
||||
|
||||
/* Position the tooltip */
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.tooltip1:hover .tooltiptext {
|
||||
visibility: visible;
|
||||
}
|
||||
</style>
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
@@ -47,6 +72,7 @@ if (Auth::user()->role == 'agent') {
|
||||
{{Session::get('fails')}}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{!! Form::open(['id'=>'modalpopup', 'route'=>'select_all','method'=>'post']) !!}
|
||||
<!--<div class="mailbox-controls">-->
|
||||
<!-- Check all button -->
|
||||
@@ -54,45 +80,14 @@ if (Auth::user()->role == 'agent') {
|
||||
{{-- <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" 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 -->
|
||||
{!! Datatable::table()
|
||||
->addColumn(
|
||||
"",
|
||||
Lang::get('lang.subject'),
|
||||
Lang::get('lang.ticket_id'),
|
||||
Lang::get('lang.priority'),
|
||||
Lang::get('lang.from'),
|
||||
Lang::get('lang.assigned_to'),
|
||||
Lang::get('lang.last_activity'))
|
||||
->setUrl(route('get.closed.ticket'))
|
||||
|
||||
->setOrder(array(6=>'desc'))
|
||||
->setClass('table table-hover table-bordered table-striped')
|
||||
->setCallbacks("fnRowCallback",'function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) {
|
||||
var str = aData[3];
|
||||
if(str.search("#000") == -1) {
|
||||
$("td", nRow).css({"background-color":"#F3F3F3", "font-weight":"600", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px #F3F3F3"});
|
||||
$("td", nRow).mouseenter(function(){
|
||||
$("td", nRow).css({"background-color":"#DEDFE0", "font-weight":"600", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px #DEDFE0"});
|
||||
});
|
||||
$("td", nRow).mouseleave(function(){
|
||||
$("td", nRow).css({"background-color":"#F3F3F3", "font-weight":"600", "border-bottom":"solid 0.5px #ddd","border-right":"solid 0.5px #F3F3F3"});
|
||||
});
|
||||
} else {
|
||||
$("td", nRow).css({"background-color":"white", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px white"});
|
||||
$("td", nRow).mouseenter(function(){
|
||||
$("td", nRow).css({"background-color":"#DEDFE0", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px #DEDFE0"});
|
||||
});
|
||||
$("td", nRow).mouseleave(function(){
|
||||
$("td", nRow).css({"background-color":"white", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px white"});
|
||||
});
|
||||
}
|
||||
}')
|
||||
->render();!!}
|
||||
{!!$table->render('vendor.Chumper.template')!!}
|
||||
|
||||
</div><!-- /.mail-box-messages -->
|
||||
{!! Form::close() !!}
|
||||
@@ -121,7 +116,7 @@ if (Auth::user()->role == 'agent') {
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
{!! $table->script('vendor.Chumper.ticket-javascript') !!}
|
||||
<script>
|
||||
var option = null;
|
||||
$(function() {
|
||||
|
||||
@@ -14,11 +14,37 @@ class="active"
|
||||
|
||||
@section('PageHeader')
|
||||
<h1>{{Lang::get('lang.today-due_tickets')}}</h1>
|
||||
<style>
|
||||
.tooltip1 {
|
||||
position: relative;
|
||||
/*display: inline-block;*/
|
||||
/*border-bottom: 1px dotted black;*/
|
||||
}
|
||||
|
||||
.tooltip1 .tooltiptext {
|
||||
visibility: hidden;
|
||||
width: 100%;
|
||||
background-color: black;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
border-radius: 6px;
|
||||
padding: 5px 0;
|
||||
|
||||
/* Position the tooltip */
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.tooltip1:hover .tooltiptext {
|
||||
visibility: visible;
|
||||
}
|
||||
</style>
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
<?php
|
||||
if (Auth::user()->role == 'admin' || user()->role == 'agent') {
|
||||
|
||||
if (Auth::user()->role == 'admin' || Auth::user()->role == 'agent') {
|
||||
$todaytickets = count(App\Model\helpdesk\Ticket\Tickets::where('status', '=', 1)->whereRaw('date(duedate) = ?', [date('Y-m-d')])->get());
|
||||
} else {
|
||||
$dept = App\Model\helpdesk\Agent\Department::where('id', '=', Auth::user()->primary_dpt)->first();
|
||||
@@ -68,47 +94,13 @@ if (Auth::user()->role == 'agent') {
|
||||
<a class="btn btn-default btn-sm checkbox-toggle"><i class="fa fa-square-o"></i></a>
|
||||
<input type="submit" class="submit btn btn-default text-orange btn-sm" id="delete" name="submit" value="{!! Lang::get('lang.delete') !!}">
|
||||
<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>
|
||||
|
||||
<button type="button" class="btn btn-sm btn-default" id="assign_Ticket" data-toggle="modal" data-target="#AssignTickets" style="display: none;"><i class="fa fa-hand-o-right"> </i> {!! Lang::get('lang.assign') !!}</button>
|
||||
<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 -->
|
||||
{!! Datatable::table()
|
||||
->addColumn(
|
||||
"",
|
||||
Lang::get('lang.subject'),
|
||||
Lang::get('lang.ticket_id'),
|
||||
Lang::get('lang.priority'),
|
||||
Lang::get('lang.from'),
|
||||
Lang::get('lang.assigned_to'),
|
||||
Lang::get('lang.last_activity'))
|
||||
->setUrl(route('ticket.post.duetoday'))
|
||||
|
||||
->setOrder(array(6=>'desc'))
|
||||
->setClass('table table-hover table-bordered table-striped')
|
||||
->setCallbacks("fnRowCallback",'function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) {
|
||||
var str = aData[3];
|
||||
if(str.search("#000") == -1) {
|
||||
$("td", nRow).css({"background-color":"#F3F3F3", "font-weight":"600", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px #F3F3F3"});
|
||||
$("td", nRow).mouseenter(function(){
|
||||
$("td", nRow).css({"background-color":"#DEDFE0", "font-weight":"600", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px #DEDFE0"});
|
||||
});
|
||||
$("td", nRow).mouseleave(function(){
|
||||
$("td", nRow).css({"background-color":"#F3F3F3", "font-weight":"600", "border-bottom":"solid 0.5px #ddd","border-right":"solid 0.5px #F3F3F3"});
|
||||
});
|
||||
} else {
|
||||
$("td", nRow).css({"background-color":"white", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px white"});
|
||||
$("td", nRow).mouseenter(function(){
|
||||
$("td", nRow).css({"background-color":"#DEDFE0", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px #DEDFE0"});
|
||||
});
|
||||
$("td", nRow).mouseleave(function(){
|
||||
$("td", nRow).css({"background-color":"white", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px white"});
|
||||
});
|
||||
}
|
||||
}')
|
||||
->render();!!}
|
||||
{!!$table->render('vendor.Chumper.template')!!}
|
||||
</div><!-- /.mail-box-messages -->
|
||||
{!! Form::close() !!}
|
||||
</div><!-- /.box-body -->
|
||||
@@ -211,7 +203,7 @@ if (Auth::user()->role == 'agent') {
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
||||
<!-- Assign ticket model-->
|
||||
<!-- Assign ticket model-->
|
||||
<!-- Modal -->
|
||||
<div class="modal fade in" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="false" style="display: none; padding-right: 15px;background-color: rgba(0, 0, 0, 0.7);">
|
||||
<div class="modal-dialog" role="document">
|
||||
@@ -232,7 +224,7 @@ if (Auth::user()->role == 'agent') {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{!! $table->script('vendor.Chumper.ticket-javascript') !!}
|
||||
<script>
|
||||
var t_id = [];
|
||||
$(function() {
|
||||
@@ -264,14 +256,14 @@ if (Auth::user()->role == 'agent') {
|
||||
t_id = $('.selectval').map(function() {
|
||||
return $(this).val();
|
||||
}).get();
|
||||
showAssign(t_id);
|
||||
showAssign(t_id)
|
||||
// alert(checkboxValues);
|
||||
} else {
|
||||
//Check all checkboxes
|
||||
$("input[type='checkbox']", ".mailbox-messages").iCheck("check");
|
||||
// alert('Hallo');
|
||||
showAssign(t_id)
|
||||
t_id = [];
|
||||
showAssign(t_id);
|
||||
}
|
||||
$(this).data("clicks", !clicks);
|
||||
});
|
||||
@@ -421,20 +413,16 @@ if (Auth::user()->role == 'agent') {
|
||||
var message = "{{Lang::get('lang.merge-success')}}";
|
||||
$("#merge-succ-alert").show();
|
||||
$('#message-merge-succ').html(message);
|
||||
setInterval(function() {
|
||||
setTimeout(function () {
|
||||
$("#alert11").hide();
|
||||
setTimeout(function() {
|
||||
var link = document.querySelector('#load-open');
|
||||
if (link) {
|
||||
link.click();
|
||||
}
|
||||
}, 500);
|
||||
}, 2000);
|
||||
location.reload();
|
||||
}, 1000);
|
||||
}
|
||||
}
|
||||
})
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#AssignTickets').on('show.bs.modal', function() {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
@@ -456,7 +444,7 @@ if (Auth::user()->role == 'agent') {
|
||||
$('#assign-form').on('submit', function() {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "../ticket/assign/"+t_id,
|
||||
url: "ticket/assign/"+t_id,
|
||||
dataType: "html",
|
||||
data: $(this).serialize(),
|
||||
beforeSend: function() {
|
||||
@@ -479,7 +467,6 @@ if (Auth::user()->role == 'agent') {
|
||||
})
|
||||
return false;
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
function someFunction(id) {
|
||||
|
||||
@@ -14,15 +14,40 @@ class="active"
|
||||
|
||||
@section('PageHeader')
|
||||
<h1>{{Lang::get('lang.tickets')}}</h1>
|
||||
<style>
|
||||
.tooltip1 {
|
||||
position: relative;
|
||||
/*display: inline-block;*/
|
||||
/*border-bottom: 1px dotted black;*/
|
||||
}
|
||||
|
||||
.tooltip1 .tooltiptext {
|
||||
visibility: hidden;
|
||||
width: 100%;
|
||||
background-color: black;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
border-radius: 6px;
|
||||
padding: 5px 0;
|
||||
|
||||
/* Position the tooltip */
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.tooltip1:hover .tooltiptext {
|
||||
visibility: visible;
|
||||
}
|
||||
</style>
|
||||
@stop
|
||||
@section('content')
|
||||
<?php
|
||||
$date_time_format = UTC::getDateTimeFormat();
|
||||
if (Auth::user()->role == 'agent') {
|
||||
$dept = App\Model\helpdesk\Agent\Department::where('id', '=', Auth::user()->primary_dpt)->first();
|
||||
$tickets = App\Model\helpdesk\Ticket\Tickets::whereIn('status', array(1, 7))->where('dept_id', '=', $dept->id)->orderBy('id', 'DESC')->paginate(20);
|
||||
$tickets = App\Model\helpdesk\Ticket\Tickets::whereIn('status', array(1, 7))->where('dept_id', '=', $dept->id)->orderBy('id', 'DESC')->paginate(20);
|
||||
} else {
|
||||
$tickets = App\Model\helpdesk\Ticket\Tickets::whereIn('status', array(1, 7))->orderBy('id', 'DESC')->paginate(20);
|
||||
$tickets = App\Model\helpdesk\Ticket\Tickets::whereIn('status', array(1, 7))->orderBy('id', 'DESC')->paginate(20);
|
||||
}
|
||||
?>
|
||||
<!-- Main content -->
|
||||
@@ -49,54 +74,24 @@ if (Auth::user()->role == 'agent') {
|
||||
@endif
|
||||
{!! Form::open(['id'=>'modalpopup', '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="submit btn btn-default text-orange btn-sm" id="delete" name="submit" value="{!! Lang::get('lang.delete') !!}">
|
||||
{{--@if(Auth::user()->role == 'admin')--}}
|
||||
<input type="submit" class="submit btn btn-default text-yellow btn-sm" id="close" name="submit" value="{!! Lang::get('lang.close') !!}">
|
||||
{{--@endif--}}
|
||||
<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>
|
||||
<button type="button" class="btn btn-sm btn-default" id="assign_Ticket" data-toggle="modal" data-target="#AssignTickets" style="display: none;"><i class="fa fa-hand-o-right"> </i> {!! Lang::get('lang.assign') !!}</button>
|
||||
<!-- 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="submit btn btn-default text-orange btn-sm" id="delete" name="submit" value="{!! Lang::get('lang.delete') !!}">
|
||||
@if(Auth::user()->role == 'admin')
|
||||
<input type="submit" class="submit btn btn-default text-yellow btn-sm" id="close" name="submit" value="{!! Lang::get('lang.close') !!}">
|
||||
@endif
|
||||
<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>-->
|
||||
|
||||
<button type="button" class="btn btn-sm btn-default" id="assign_Ticket" data-toggle="modal" data-target="#AssignTickets" style="display: none;"><i class="fa fa-hand-o-right"> </i> {!! Lang::get('lang.assign') !!}</button>
|
||||
<p><p/>
|
||||
<div class="mailbox-messages" id="refresh">
|
||||
<!--datatable-->
|
||||
{!! Datatable::table()
|
||||
->addColumn(
|
||||
"",
|
||||
Lang::get('lang.subject'),
|
||||
Lang::get('lang.ticket_id'),
|
||||
Lang::get('lang.priority'),
|
||||
Lang::get('lang.from'),
|
||||
Lang::get('lang.assigned_to'),
|
||||
Lang::get('lang.last_activity'))
|
||||
->setUrl(route('get.inbox.ticket'))
|
||||
{!!$table->render('vendor.Chumper.template')!!}
|
||||
|
||||
|
||||
->setOrder(array(6=>'desc'))
|
||||
->setClass('table table-hover table-bordered table-striped')
|
||||
->setCallbacks("fnCreatedRow", 'function( nRow, aData, iDataIndex ) {
|
||||
var str = aData[3];
|
||||
if(str.search("#000") == -1) {
|
||||
$("td", nRow).css({"background-color":"#F3F3F3", "font-weight":"600", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px #F3F3F3"});
|
||||
$("td", nRow).mouseenter(function(){
|
||||
$("td", nRow).css({"background-color":"#DEDFE0", "font-weight":"600", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px #DEDFE0"});
|
||||
});
|
||||
$("td", nRow).mouseleave(function(){
|
||||
$("td", nRow).css({"background-color":"#F3F3F3", "font-weight":"600", "border-bottom":"solid 0.5px #ddd","border-right":"solid 0.5px #F3F3F3"});
|
||||
});
|
||||
} else {
|
||||
$("td", nRow).css({"background-color":"white", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px white"});
|
||||
$("td", nRow).mouseenter(function(){
|
||||
$("td", nRow).css({"background-color":"#DEDFE0", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px #DEDFE0"});
|
||||
});
|
||||
$("td", nRow).mouseleave(function(){
|
||||
$("td", nRow).css({"background-color":"white", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px white"});
|
||||
});
|
||||
}
|
||||
}')
|
||||
->render();!!}
|
||||
<!-- /.datatable -->
|
||||
</div><!-- /.mail-box-messages -->
|
||||
{!! Form::close() !!}
|
||||
@@ -166,7 +161,6 @@ if (Auth::user()->role == 'agent') {
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
||||
|
||||
<!-- Assign ticket model-->
|
||||
<div class="modal fade" id="AssignTickets">
|
||||
<div class="modal-dialog">
|
||||
@@ -201,8 +195,7 @@ if (Auth::user()->role == 'agent') {
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
||||
<!-- Assign ticket model-->
|
||||
|
||||
<!-- Assign ticket model-->
|
||||
<!-- Modal -->
|
||||
<div class="modal fade in" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="false" style="display: none; padding-right: 15px;background-color: rgba(0, 0, 0, 0.7);">
|
||||
<div class="modal-dialog" role="document">
|
||||
@@ -223,14 +216,14 @@ if (Auth::user()->role == 'agent') {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{!! $table->script('vendor.Chumper.ticket-javascript') !!}
|
||||
<script>
|
||||
|
||||
var t_id = [];
|
||||
var option = null;
|
||||
$(function() {
|
||||
$(function () {
|
||||
//Enable check and uncheck all functionality
|
||||
$(".checkbox-toggle").click(function() {
|
||||
$(".checkbox-toggle").click(function () {
|
||||
var clicks = $(this).data('clicks');
|
||||
if (clicks) {
|
||||
//Uncheck all checkboxes
|
||||
@@ -245,20 +238,20 @@ if (Auth::user()->role == 'agent') {
|
||||
});
|
||||
});
|
||||
|
||||
$(function() {
|
||||
$(function () {
|
||||
// Enable check and uncheck all functionality
|
||||
|
||||
$(".checkbox-toggle").click(function() {
|
||||
$(".checkbox-toggle").click(function () {
|
||||
var clicks = $(this).data('clicks');
|
||||
if (clicks) {
|
||||
//Uncheck all checkboxes
|
||||
$("input[type='checkbox']", ".mailbox-messages").iCheck("uncheck");
|
||||
// alert($("input[type='checkbox']").val());
|
||||
t_id = $('.selectval').map(function() {
|
||||
t_id = $('.selectval').map(function () {
|
||||
return $(this).val();
|
||||
}).get();
|
||||
// alert(checkboxValues);
|
||||
showAssign(t_id);
|
||||
// alert(checkboxValues);
|
||||
} else {
|
||||
//Check all checkboxes
|
||||
$("input[type='checkbox']", ".mailbox-messages").iCheck("check");
|
||||
@@ -274,8 +267,8 @@ if (Auth::user()->role == 'agent') {
|
||||
});
|
||||
|
||||
|
||||
$(document).ready(function() { /// Wait till page is loaded
|
||||
$('#click').click(function() {
|
||||
$(document).ready(function () { /// Wait till page is loaded
|
||||
$('#click').click(function () {
|
||||
$('#refresh').load('inbox #refresh');
|
||||
$('#title_refresh').load('inbox #title_refresh');
|
||||
$('#count_refresh').load('inbox #count_refresh');
|
||||
@@ -284,17 +277,17 @@ if (Auth::user()->role == 'agent') {
|
||||
|
||||
$(".select2").select2();
|
||||
|
||||
$('#delete').on('click', function() {
|
||||
$('#delete').on('click', function () {
|
||||
option = 0;
|
||||
$('#myModalLabel').html("{{Lang::get('lang.delete-tickets')}}");
|
||||
});
|
||||
|
||||
$('#close').on('click', function() {
|
||||
$('#close').on('click', function () {
|
||||
option = 1;
|
||||
$('#myModalLabel').html("{{Lang::get('lang.close-tickets')}}");
|
||||
});
|
||||
|
||||
$("#modalpopup").on('submit', function(e) {
|
||||
$("#modalpopup").on('submit', function (e) {
|
||||
e.preventDefault();
|
||||
var msg = "{{Lang::get('lang.confirm')}}";
|
||||
var values = getValues();
|
||||
@@ -309,15 +302,15 @@ if (Auth::user()->role == 'agent') {
|
||||
$("#myModal").css("display", "block");
|
||||
});
|
||||
|
||||
$(".closemodal, .no").click(function() {
|
||||
$(".closemodal, .no").click(function () {
|
||||
$("#myModal").css("display", "none");
|
||||
});
|
||||
|
||||
$(".closemodal, .no").click(function() {
|
||||
$(".closemodal, .no").click(function () {
|
||||
$("#myModal").css("display", "none");
|
||||
});
|
||||
|
||||
$('.yes').click(function() {
|
||||
$('.yes').click(function () {
|
||||
var values = getValues();
|
||||
if (values == "") {
|
||||
$("#myModal").css("display", "none");
|
||||
@@ -335,14 +328,14 @@ if (Auth::user()->role == 'agent') {
|
||||
});
|
||||
|
||||
function getValues() {
|
||||
var values = $('.selectval:checked').map(function() {
|
||||
var values = $('.selectval:checked').map(function () {
|
||||
return $(this).val();
|
||||
}).get();
|
||||
return values;
|
||||
}
|
||||
|
||||
//checking merging tickets
|
||||
$('#MergeTickets').on('show.bs.modal', function() {
|
||||
$('#MergeTickets').on('show.bs.modal', function () {
|
||||
|
||||
// alert("hi");
|
||||
$.ajax({
|
||||
@@ -350,11 +343,11 @@ if (Auth::user()->role == 'agent') {
|
||||
url: "{{route('check.merge.tickets',0)}}",
|
||||
dataType: "html",
|
||||
data: {data1: t_id},
|
||||
beforeSend: function() {
|
||||
beforeSend: function () {
|
||||
$("#merge_body").hide();
|
||||
$("#merge_loader").show();
|
||||
},
|
||||
success: function(response) {
|
||||
success: function (response) {
|
||||
if (response == 0) {
|
||||
$("#merge_body").show();
|
||||
$("#merge-succ-alert").hide();
|
||||
@@ -388,7 +381,7 @@ if (Auth::user()->role == 'agent') {
|
||||
url: "{{ route('get.merge.tickets',0) }}",
|
||||
dataType: "html",
|
||||
data: {data1: t_id},
|
||||
success: function(data) {
|
||||
success: function (data) {
|
||||
$('#select-merge-parent').html(data);
|
||||
}
|
||||
// return false;
|
||||
@@ -399,17 +392,17 @@ if (Auth::user()->role == 'agent') {
|
||||
});
|
||||
|
||||
//submit merging form
|
||||
$('#merge-form').on('submit', function() {
|
||||
$('#merge-form').on('submit', function () {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "{!! url('merge-tickets/') !!}/" + t_id,
|
||||
dataType: "json",
|
||||
data: $(this).serialize(),
|
||||
beforeSend: function() {
|
||||
beforeSend: function () {
|
||||
$("#merge_body").hide();
|
||||
$("#merge_loader").show();
|
||||
},
|
||||
success: function(response) {
|
||||
success: function (response) {
|
||||
if (response == 0) {
|
||||
$("#merge_body").show();
|
||||
$("#merge-succ-alert").hide();
|
||||
@@ -430,14 +423,9 @@ if (Auth::user()->role == 'agent') {
|
||||
var message = "{{Lang::get('lang.merge-success')}}";
|
||||
$("#merge-succ-alert").show();
|
||||
$('#message-merge-succ').html(message);
|
||||
setInterval(function() {
|
||||
setTimeout(function () {
|
||||
$("#alert11").hide();
|
||||
setTimeout(function() {
|
||||
var link = document.querySelector('#load-inbox');
|
||||
if (link) {
|
||||
link.click();
|
||||
}
|
||||
}, 100);
|
||||
location.reload();
|
||||
}, 1000);
|
||||
}
|
||||
}
|
||||
@@ -489,18 +477,17 @@ if (Auth::user()->role == 'agent') {
|
||||
})
|
||||
return false;
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
function someFunction(id) {
|
||||
if (document.getElementById(id).checked) {
|
||||
t_id.push(id);
|
||||
// alert(t_id);
|
||||
} else if(document.getElementById(id).checked === undefined){
|
||||
} else if (document.getElementById(id).checked === undefined) {
|
||||
var index = t_id.indexOf(id);
|
||||
if (index === -1){
|
||||
if (index === -1) {
|
||||
t_id.push(id);
|
||||
} else{
|
||||
} else {
|
||||
t_id.splice(index, 1);
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -13,6 +13,31 @@ class="active"
|
||||
@stop
|
||||
@section('PageHeader')
|
||||
<h1>{{Lang::get('lang.tickets')}}</h1>
|
||||
<style>
|
||||
.tooltip1 {
|
||||
position: relative;
|
||||
/*display: inline-block;*/
|
||||
/*border-bottom: 1px dotted black;*/
|
||||
}
|
||||
|
||||
.tooltip1 .tooltiptext {
|
||||
visibility: hidden;
|
||||
width: 100%;
|
||||
background-color: black;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
border-radius: 6px;
|
||||
padding: 5px 0;
|
||||
|
||||
/* Position the tooltip */
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.tooltip1:hover .tooltiptext {
|
||||
visibility: visible;
|
||||
}
|
||||
</style>
|
||||
@stop
|
||||
@section('content')
|
||||
<?php
|
||||
@@ -46,7 +71,6 @@ if (Auth::user()->role == 'agent') {
|
||||
{{Session::get('fails')}}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
{!! Form::open(['id'=>'modalpopup', 'route'=>'select_all','method'=>'post']) !!}
|
||||
<!--<div class="mailbox-controls">-->
|
||||
<!-- Check all button -->
|
||||
@@ -55,46 +79,15 @@ if (Auth::user()->role == 'agent') {
|
||||
<input type="submit" class="submit btn btn-default text-orange btn-sm" id="delete" name="submit" value="{!! Lang::get('lang.delete') !!}">
|
||||
<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>
|
||||
|
||||
<button type="button" class="btn btn-sm btn-default" id="assign_Ticket" data-toggle="modal" data-target="#AssignTickets" style="display: none;"><i class="fa fa-hand-o-right"> </i> {!! Lang::get('lang.assign') !!}</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 -->
|
||||
{!! Datatable::table()
|
||||
->addColumn(
|
||||
"",
|
||||
Lang::get('lang.subject'),
|
||||
Lang::get('lang.ticket_id'),
|
||||
Lang::get('lang.priority'),
|
||||
Lang::get('lang.from'),
|
||||
Lang::get('lang.assigned_to'),
|
||||
Lang::get('lang.last_activity'))
|
||||
->setUrl(route('get.myticket.ticket'))
|
||||
|
||||
->setOrder(array(6=>'desc'))
|
||||
->setClass('table table-hover table-bordered table-striped')
|
||||
->setCallbacks("fnRowCallback",'function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) {
|
||||
var str = aData[3];
|
||||
if(str.search("#000") == -1) {
|
||||
$("td", nRow).css({"background-color":"#F3F3F3", "font-weight":"600", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px #F3F3F3"});
|
||||
$("td", nRow).mouseenter(function(){
|
||||
$("td", nRow).css({"background-color":"#DEDFE0", "font-weight":"600", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px #DEDFE0"});
|
||||
});
|
||||
$("td", nRow).mouseleave(function(){
|
||||
$("td", nRow).css({"background-color":"#F3F3F3", "font-weight":"600", "border-bottom":"solid 0.5px #ddd","border-right":"solid 0.5px #F3F3F3"});
|
||||
});
|
||||
} else {
|
||||
$("td", nRow).css({"background-color":"white", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px white"});
|
||||
$("td", nRow).mouseenter(function(){
|
||||
$("td", nRow).css({"background-color":"#DEDFE0", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px #DEDFE0"});
|
||||
});
|
||||
$("td", nRow).mouseleave(function(){
|
||||
$("td", nRow).css({"background-color":"white", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px white"});
|
||||
});
|
||||
}
|
||||
}')
|
||||
->render();!!}
|
||||
{!!$table->render('vendor.Chumper.template')!!}
|
||||
|
||||
</div><!-- /.mail-box-messages -->
|
||||
{!! Form::close() !!}
|
||||
@@ -199,8 +192,7 @@ if (Auth::user()->role == 'agent') {
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
||||
<!-- Assign ticket model-->
|
||||
|
||||
<!-- Assign ticket model-->
|
||||
|
||||
<!-- Modal -->
|
||||
<div class="modal fade in" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="false" style="display: none; padding-right: 15px;background-color: rgba(0, 0, 0, 0.7);">
|
||||
@@ -224,6 +216,7 @@ if (Auth::user()->role == 'agent') {
|
||||
</div>
|
||||
|
||||
|
||||
{!! $table->script('vendor.Chumper.ticket-javascript') !!}
|
||||
|
||||
<script>
|
||||
var t_id = [];
|
||||
@@ -257,14 +250,14 @@ if (Auth::user()->role == 'agent') {
|
||||
t_id = $('.selectval').map(function() {
|
||||
return $(this).val();
|
||||
}).get();
|
||||
showAssign(t_id);
|
||||
showAssign(t_id)
|
||||
// alert(checkboxValues);
|
||||
} else {
|
||||
//Check all checkboxes
|
||||
$("input[type='checkbox']", ".mailbox-messages").iCheck("check");
|
||||
// alert('Hallo');
|
||||
t_id = [];
|
||||
showAssign(t_id);
|
||||
showAssign(t_id)
|
||||
}
|
||||
$(this).data("clicks", !clicks);
|
||||
|
||||
@@ -435,15 +428,10 @@ if (Auth::user()->role == 'agent') {
|
||||
var message = "{{Lang::get('lang.merge-success')}}";
|
||||
$("#merge-succ-alert").show();
|
||||
$('#message-merge-succ').html(message);
|
||||
setInterval(function() {
|
||||
setTimeout(function () {
|
||||
$("#alert11").hide();
|
||||
setTimeout(function() {
|
||||
var link = document.querySelector('#load-myticket');
|
||||
if (link) {
|
||||
link.click();
|
||||
}
|
||||
}, 500);
|
||||
}, 2000);
|
||||
location.reload();
|
||||
}, 1000);
|
||||
|
||||
}
|
||||
|
||||
@@ -452,6 +440,7 @@ if (Auth::user()->role == 'agent') {
|
||||
return false;
|
||||
|
||||
});
|
||||
|
||||
$('#AssignTickets').on('show.bs.modal', function() {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
@@ -496,51 +485,6 @@ if (Auth::user()->role == 'agent') {
|
||||
})
|
||||
return false;
|
||||
});
|
||||
$('#AssignTickets').on('show.bs.modal', function() {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "{{route('get-agents')}}",
|
||||
dataType: "html",
|
||||
beforeSend: function() {
|
||||
$("#assign_body").hide();
|
||||
$("#assign_loader").show();
|
||||
},
|
||||
success: function(data) {
|
||||
$("#assign_loader").hide();
|
||||
$("#assign_body").show();
|
||||
$('#select-assign-agent').html(data);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Assign a ticket
|
||||
$('#assign-form').on('submit', function() {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "../ticket/assign/"+t_id,
|
||||
dataType: "html",
|
||||
data: $(this).serialize(),
|
||||
beforeSend: function() {
|
||||
$("#assign_body").hide();
|
||||
$("#assign_loader").show();
|
||||
},
|
||||
success: function(response) {
|
||||
if (response == 1)
|
||||
{
|
||||
location.reload();
|
||||
var message = "Success!";
|
||||
$("#alert11").show();
|
||||
$('#message-success1').html(message);
|
||||
setInterval(function(){$("#dismiss11").trigger("click"); }, 2000);
|
||||
}
|
||||
$("#assign_body").show();
|
||||
$("#assign_loader").hide();
|
||||
$("#dismis4").trigger("click");
|
||||
}
|
||||
})
|
||||
return false;
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
@@ -158,7 +158,7 @@ class="active"
|
||||
<div class="form-group">
|
||||
<label>{!! Lang::get('lang.help_topic') !!}:</label>
|
||||
<!-- helptopic -->
|
||||
<?php $helptopic = App\Model\helpdesk\Manage\Help_topic::where('status', '=', 1)->get(); ?>
|
||||
<?php $helptopic = App\Model\helpdesk\Manage\Help_topic::where('status', '=', 1)->select('topic', 'id')->get(); ?>
|
||||
{!! Form::select('helptopic', ['Helptopic'=>$helptopic->lists('topic','id')->toArray()],null,['class' => 'form-control select','id'=>'selectid']) !!}
|
||||
</div>
|
||||
</div>
|
||||
@@ -166,7 +166,7 @@ class="active"
|
||||
<!-- sla plan -->
|
||||
<div class="form-group">
|
||||
<label>{!! Lang::get('lang.sla_plan') !!}:</label>
|
||||
<?php $sla_plan = App\Model\helpdesk\Manage\Sla_plan::all(); ?>
|
||||
<?php $sla_plan = App\Model\helpdesk\Manage\Sla_plan::where('status', '=', 1)->select('grace_period', 'id')->get(); ?>
|
||||
{!! Form::select('sla', ['SLA'=>$sla_plan->lists('grace_period','id')->toArray()],null,['class' => 'form-control select']) !!}
|
||||
</div>
|
||||
</div>
|
||||
@@ -181,7 +181,7 @@ class="active"
|
||||
<!-- assign to -->
|
||||
<div class="form-group">
|
||||
<label>{!! Lang::get('lang.assign_to') !!}:</label>
|
||||
<?php $agents = App\User::where('role', '!=', 'user')->get(); ?>
|
||||
<?php $agents = App\User::where('role', '!=', 'user')->where('active', '=', 1)->get(); ?>
|
||||
{!! Form::select('assignto', [''=>'Select an Agent','Agents'=>$agents->lists('first_name','id')->toArray()],null,['class' => 'form-control select']) !!}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -14,6 +14,31 @@ class="active"
|
||||
|
||||
@section('PageHeader')
|
||||
<h1>{{Lang::get('lang.tickets')}}</h1>
|
||||
<style>
|
||||
.tooltip1 {
|
||||
position: relative;
|
||||
/*display: inline-block;*/
|
||||
/*border-bottom: 1px dotted black;*/
|
||||
}
|
||||
|
||||
.tooltip1 .tooltiptext {
|
||||
visibility: hidden;
|
||||
width: 100%;
|
||||
background-color: black;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
border-radius: 6px;
|
||||
padding: 5px 0;
|
||||
|
||||
/* Position the tooltip */
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.tooltip1:hover .tooltiptext {
|
||||
visibility: visible;
|
||||
}
|
||||
</style>
|
||||
@stop
|
||||
|
||||
@section('content')
|
||||
@@ -60,46 +85,15 @@ if (Auth::user()->role == 'agent') {
|
||||
<input type="submit" class="submit btn btn-default text-orange btn-sm" id="delete" name="submit" value="{!! Lang::get('lang.delete') !!}">
|
||||
<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>
|
||||
|
||||
<button type="button" class="btn btn-sm btn-default" id="assign_Ticket" data-toggle="modal" data-target="#AssignTickets" style="display: none;"><i class="fa fa-hand-o-right"> </i> {!! Lang::get('lang.assign') !!}</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 -->
|
||||
{!! Datatable::table()
|
||||
->addColumn(
|
||||
"",
|
||||
Lang::get('lang.subject'),
|
||||
Lang::get('lang.ticket_id'),
|
||||
Lang::get('lang.priority'),
|
||||
Lang::get('lang.from'),
|
||||
Lang::get('lang.assigned_to'),
|
||||
Lang::get('lang.last_activity'))
|
||||
->setUrl(route('get.open.ticket'))
|
||||
|
||||
->setOrder(array(6=>'desc'))
|
||||
->setClass('table table-hover table-bordered table-striped')
|
||||
->setCallbacks("fnRowCallback",'function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) {
|
||||
var str = aData[3];
|
||||
if(str.search("#000") == -1) {
|
||||
$("td", nRow).css({"background-color":"#F3F3F3", "font-weight":"600", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px #F3F3F3"});
|
||||
$("td", nRow).mouseenter(function(){
|
||||
$("td", nRow).css({"background-color":"#DEDFE0", "font-weight":"600", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px #DEDFE0"});
|
||||
});
|
||||
$("td", nRow).mouseleave(function(){
|
||||
$("td", nRow).css({"background-color":"#F3F3F3", "font-weight":"600", "border-bottom":"solid 0.5px #ddd","border-right":"solid 0.5px #F3F3F3"});
|
||||
});
|
||||
} else {
|
||||
$("td", nRow).css({"background-color":"white", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px white"});
|
||||
$("td", nRow).mouseenter(function(){
|
||||
$("td", nRow).css({"background-color":"#DEDFE0", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px #DEDFE0"});
|
||||
});
|
||||
$("td", nRow).mouseleave(function(){
|
||||
$("td", nRow).css({"background-color":"white", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px white"});
|
||||
});
|
||||
}
|
||||
}')
|
||||
->render();!!}
|
||||
{!!$table->render('vendor.Chumper.template')!!}
|
||||
</div><!-- /.mail-box-messages -->
|
||||
{!! Form::close() !!}
|
||||
</div><!-- /.box-body -->
|
||||
@@ -202,7 +196,7 @@ if (Auth::user()->role == 'agent') {
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
||||
<!-- Assign ticket model-->
|
||||
<!-- Assign ticket model-->
|
||||
<!-- Modal -->
|
||||
<div class="modal fade in" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="false" style="display: none; padding-right: 15px;background-color: rgba(0, 0, 0, 0.7);">
|
||||
<div class="modal-dialog" role="document">
|
||||
@@ -223,7 +217,7 @@ if (Auth::user()->role == 'agent') {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{!! $table->script('vendor.Chumper.ticket-javascript') !!}
|
||||
<script>
|
||||
var t_id = [];
|
||||
$(function() {
|
||||
@@ -255,14 +249,14 @@ if (Auth::user()->role == 'agent') {
|
||||
t_id = $('.selectval').map(function() {
|
||||
return $(this).val();
|
||||
}).get();
|
||||
showAssign(t_id);
|
||||
showAssign(t_id)
|
||||
// alert(checkboxValues);
|
||||
} else {
|
||||
//Check all checkboxes
|
||||
$("input[type='checkbox']", ".mailbox-messages").iCheck("check");
|
||||
// alert('Hallo');
|
||||
t_id = [];
|
||||
showAssign(t_id);
|
||||
showAssign(t_id)
|
||||
}
|
||||
$(this).data("clicks", !clicks);
|
||||
});
|
||||
@@ -412,20 +406,16 @@ if (Auth::user()->role == 'agent') {
|
||||
var message = "{{Lang::get('lang.merge-success')}}";
|
||||
$("#merge-succ-alert").show();
|
||||
$('#message-merge-succ').html(message);
|
||||
setInterval(function() {
|
||||
setTimeout(function () {
|
||||
$("#alert11").hide();
|
||||
setTimeout(function() {
|
||||
var link = document.querySelector('#load-open');
|
||||
if (link) {
|
||||
link.click();
|
||||
}
|
||||
}, 500);
|
||||
}, 2000);
|
||||
location.reload();
|
||||
}, 1000);
|
||||
}
|
||||
}
|
||||
})
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#AssignTickets').on('show.bs.modal', function() {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
@@ -490,6 +480,7 @@ if (Auth::user()->role == 'agent') {
|
||||
}
|
||||
showAssign(t_id);
|
||||
}
|
||||
|
||||
function showAssign(t_id)
|
||||
{
|
||||
if (t_id.length >= 1) {
|
||||
|
||||
@@ -12,38 +12,68 @@ active
|
||||
class="active"
|
||||
@stop
|
||||
@section('PageHeader')
|
||||
<h1>{{Lang::get('lang.tickets')}}</h1>@stop
|
||||
<h1>{{Lang::get('lang.tickets')}}</h1>
|
||||
<style>
|
||||
.tooltip1 {
|
||||
position: relative;
|
||||
/*display: inline-block;*/
|
||||
/*border-bottom: 1px dotted black;*/
|
||||
}
|
||||
|
||||
.tooltip1 .tooltiptext {
|
||||
visibility: hidden;
|
||||
width: 100%;
|
||||
background-color: black;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
border-radius: 6px;
|
||||
padding: 5px 0;
|
||||
|
||||
/* Position the tooltip */
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.tooltip1:hover .tooltiptext {
|
||||
visibility: visible;
|
||||
}
|
||||
</style>
|
||||
@stop
|
||||
@section('content')
|
||||
<?php
|
||||
$date_time_format = UTC::getDateTimeFormat();
|
||||
if (Auth::user()->role == 'agent') {
|
||||
$dept = \App\Model\helpdesk\Agent\Department::where('id', '=', Auth::user()->primary_dpt)->first();
|
||||
$overdues = App\Model\helpdesk\Ticket\Tickets::where('status', '=', 1)->where('isanswered', '=', 0)->where('dept_id', '=', $dept->id)->orderBy('id', 'DESC')->get();
|
||||
} else {
|
||||
$overdues = App\Model\helpdesk\Ticket\Tickets::where('status', '=', 1)->where('isanswered', '=', 0)->orderBy('id', 'DESC')->get();
|
||||
}
|
||||
$i = count($overdues);
|
||||
if ($i == 0) {
|
||||
$overdue_ticket = 0;
|
||||
} else {
|
||||
$j = 0;
|
||||
foreach ($overdues as $overdue) {
|
||||
$sla_plan = App\Model\helpdesk\Manage\Sla_plan::where('id', '=', $overdue->sla)->first();
|
||||
// $date_time_format = UTC::getDateTimeFormat();
|
||||
// if (Auth::user()->role == 'agent') {
|
||||
// $dept = \App\Model\helpdesk\Agent\Department::where('id', '=', Auth::user()->primary_dpt)->first();
|
||||
// $overdues = App\Model\helpdesk\Ticket\Tickets::where('status', '=', 1)->where('isanswered', '=', 0)->where('dept_id', '=', $dept->id)->orderBy('id', 'DESC')->get();
|
||||
// } else {
|
||||
// $overdues = App\Model\helpdesk\Ticket\Tickets::where('status', '=', 1)->where('isanswered', '=', 0)->orderBy('id', 'DESC')->get();
|
||||
// }
|
||||
// $i = count($overdues);
|
||||
// if ($i == 0) {
|
||||
// $overdue_ticket = 0;
|
||||
// } else {
|
||||
// $j = 0;
|
||||
// foreach ($overdues as $overdue) {
|
||||
// $sla_plan = App\Model\helpdesk\Manage\Sla_plan::where('id', '=', $overdue->sla)->first();
|
||||
|
||||
// $ovadate = $overdue->created_at;
|
||||
// $new_date = date_add($ovadate, date_interval_create_from_date_string($sla_plan->grace_period)) . '<br/><br/>';
|
||||
// if (date('Y-m-d H:i:s') > $new_date) {
|
||||
// $j++;
|
||||
// //$value[] = $overdue;
|
||||
// }
|
||||
// }
|
||||
// // dd(count($value));
|
||||
// if ($j > 0) {
|
||||
// $overdue_ticket = $j;
|
||||
// } else {
|
||||
// $overdue_ticket = 0;
|
||||
// }
|
||||
// }
|
||||
|
||||
$overdue_ticket=App\Model\helpdesk\Ticket\Tickets::where('tickets.duedate','<', \Carbon\Carbon::now())->count();
|
||||
|
||||
|
||||
$ovadate = $overdue->created_at;
|
||||
$new_date = date_add($ovadate, date_interval_create_from_date_string($sla_plan->grace_period)) . '<br/><br/>';
|
||||
if (date('Y-m-d H:i:s') > $new_date) {
|
||||
$j++;
|
||||
//$value[] = $overdue;
|
||||
}
|
||||
}
|
||||
// dd(count($value));
|
||||
if ($j > 0) {
|
||||
$overdue_ticket = $j;
|
||||
} else {
|
||||
$overdue_ticket = 0;
|
||||
}
|
||||
}
|
||||
?>
|
||||
<!-- Main content -->
|
||||
<div class="box box-primary">
|
||||
@@ -74,45 +104,13 @@ if ($i == 0) {
|
||||
<input type="submit" class="submit btn btn-default text-orange btn-sm" id="delete" name="submit" value="{!! Lang::get('lang.delete') !!}">
|
||||
<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>
|
||||
<button type="button" class="btn btn-sm btn-default" id="assign_Ticket" data-toggle="modal" data-target="#AssignTickets" style="display: none;"><i class="fa fa-hand-o-right"> </i> {!! Lang::get('lang.assign') !!}</button>
|
||||
<!--</div>-->
|
||||
|
||||
<button type="button" class="btn btn-sm btn-default" id="assign_Ticket" data-toggle="modal" data-target="#AssignTickets" style="display: none;"><i class="fa fa-hand-o-right"> </i> {!! Lang::get('lang.assign') !!}</button>
|
||||
<!--</div>-->
|
||||
<p><p/>
|
||||
<div class="mailbox-messages" id="refresh">
|
||||
<!--datatable-->
|
||||
{!! Datatable::table()
|
||||
->addColumn(
|
||||
"",
|
||||
Lang::get('lang.subject'),
|
||||
Lang::get('lang.ticket_id'),
|
||||
Lang::get('lang.priority'),
|
||||
Lang::get('lang.from'),
|
||||
Lang::get('lang.assigned_to'),
|
||||
Lang::get('lang.last_activity'))
|
||||
->setUrl(route('get.overdue.ticket'))
|
||||
|
||||
->setOrder(array(6=>'desc'))
|
||||
->setClass('table table-hover table-bordered table-striped')
|
||||
->setCallbacks("fnRowCallback",'function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) {
|
||||
var str = aData[3];
|
||||
if(str.search("#000") == -1) {
|
||||
$("td", nRow).css({"background-color":"#F3F3F3", "font-weight":"600", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px #F3F3F3"});
|
||||
$("td", nRow).mouseenter(function(){
|
||||
$("td", nRow).css({"background-color":"#DEDFE0", "font-weight":"600", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px #DEDFE0"});
|
||||
});
|
||||
$("td", nRow).mouseleave(function(){
|
||||
$("td", nRow).css({"background-color":"#F3F3F3", "font-weight":"600", "border-bottom":"solid 0.5px #ddd","border-right":"solid 0.5px #F3F3F3"});
|
||||
});
|
||||
} else {
|
||||
$("td", nRow).css({"background-color":"white", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px white"});
|
||||
$("td", nRow).mouseenter(function(){
|
||||
$("td", nRow).css({"background-color":"#DEDFE0", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px #DEDFE0"});
|
||||
});
|
||||
$("td", nRow).mouseleave(function(){
|
||||
$("td", nRow).css({"background-color":"white", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px white"});
|
||||
});
|
||||
}
|
||||
}')
|
||||
->render();!!}
|
||||
{!!$table->render('vendor.Chumper.template')!!}
|
||||
<!-- /.datatable -->
|
||||
</div><!-- /.mail-box-messages -->
|
||||
{!! Form::close() !!}
|
||||
@@ -216,7 +214,7 @@ if ($i == 0) {
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
||||
<!-- Assign ticket model-->
|
||||
<!-- Assign ticket model-->
|
||||
<!-- Modal -->
|
||||
<div class="modal fade in" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="false" style="display: none; padding-right: 15px;background-color: rgba(0, 0, 0, 0.7);">
|
||||
<div class="modal-dialog" role="document">
|
||||
@@ -238,7 +236,7 @@ if ($i == 0) {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{!! $table->script('vendor.Chumper.ticket-javascript') !!}
|
||||
<script>
|
||||
var t_id = [];
|
||||
var option = null;
|
||||
@@ -271,14 +269,14 @@ if ($i == 0) {
|
||||
t_id = $('.selectval').map(function() {
|
||||
return $(this).val();
|
||||
}).get();
|
||||
showAssign(t_id);
|
||||
showAssign(t_id)
|
||||
// alert(checkboxValues);
|
||||
} else {
|
||||
//Check all checkboxes
|
||||
$("input[type='checkbox']", ".mailbox-messages").iCheck("check");
|
||||
// alert('Hallo');
|
||||
t_id = [];
|
||||
showAssign(t_id);
|
||||
showAssign(t_id)
|
||||
}
|
||||
$(this).data("clicks", !clicks);
|
||||
|
||||
@@ -454,14 +452,9 @@ if ($i == 0) {
|
||||
var message = "{{Lang::get('lang.merge-success')}}";
|
||||
$("#merge-succ-alert").show();
|
||||
$('#message-merge-succ').html(message);
|
||||
setInterval(function() {
|
||||
setTimeout(function () {
|
||||
$("#alert11").hide();
|
||||
setTimeout(function() {
|
||||
var link = document.querySelector('#load-inbox');
|
||||
if (link) {
|
||||
link.click();
|
||||
}
|
||||
}, 100);
|
||||
location.reload();
|
||||
}, 1000);
|
||||
|
||||
}
|
||||
@@ -536,6 +529,7 @@ if ($i == 0) {
|
||||
}
|
||||
showAssign(t_id);
|
||||
}
|
||||
|
||||
function showAssign(t_id)
|
||||
{
|
||||
if (t_id.length >= 1) {
|
||||
@@ -544,6 +538,5 @@ if ($i == 0) {
|
||||
$('#assign_Ticket').css('display', 'none');
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
@stop
|
||||
@@ -1,249 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>PDF</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<style type="text/css">
|
||||
* {
|
||||
font-family: "DejaVu Sans Mono", monospace;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<?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
|
||||
$company = App\Model\helpdesk\Settings\Company::where('id', '=', '1')->first();
|
||||
$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/>
|
||||
<h3>Ticket Title : {!! $tickets->title !!}</h3><br>
|
||||
<h3>Ticket Number : {!! $tickets->ticket_number !!}</h3><br>
|
||||
<h3>Ticket Department : {!! $tickets->department !!}</h3><br>
|
||||
<h3>Ticket Helptopic : {!! $tickets->helptopic !!}</h3><br>
|
||||
@forelse($ticket->thread as $thread)
|
||||
{!! $thread->body !!}
|
||||
<hr>
|
||||
@empty
|
||||
|
||||
<?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();
|
||||
?>
|
||||
<?php $response = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $tickets->id)->get(); ?>
|
||||
@foreach($response as $last)
|
||||
<?php $ResponseDate = $last->created_at; ?>
|
||||
@endforeach
|
||||
|
||||
<?php $status = App\Model\helpdesk\Ticket\Ticket_Status::where('id', '=', $tickets->status)->first(); ?>
|
||||
<?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(); ?>
|
||||
<table class="table">
|
||||
<tr><th></th><th></th></tr>
|
||||
<tr><td><b>{!! Lang::get('lang.status') !!}:</b></td> <td>{{$status->state}}</td></tr>
|
||||
<tr><td><b>{!! Lang::get('lang.priority') !!}:</b></td> <td>{{$priority->priority}}</td></tr>
|
||||
<tr><td><b>{!! Lang::get('lang.department') !!}:</b></td> <td>{{$dept->name}}</td></tr>
|
||||
<tr><td><b>{!! Lang::get('lang.email') !!}:</b></td> <td>{{$user->email}}</td></tr>
|
||||
<tr><td><b>{!! Lang::get('lang.phone') !!}:</b></td> <td>{{$user->mobile}}</td></tr>
|
||||
<tr><td><b>{!! Lang::get('lang.source') !!}:</b></td> <td>{{$ticket_source}}</td></tr>
|
||||
<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)->orderBy('created_at', 'desc')->paginate(10); ?>
|
||||
@foreach($conversations as $conversation)
|
||||
<br/><hr>
|
||||
<span class="time-label">
|
||||
@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();
|
||||
|
||||
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);
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
// echo $body;
|
||||
// $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>-->
|
||||
|
||||
<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>';
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</body>
|
||||
</html>
|
||||
@endforelse
|
||||
@@ -0,0 +1,35 @@
|
||||
@if (count($errors) > 0)
|
||||
<div id="heading"></div>
|
||||
<div class="alert alert-danger">
|
||||
<strong>Whoops!</strong> There were some problems with your input.<br><br>
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
@endif
|
||||
<div id="response"></div>
|
||||
<!-- check whether success or not -->
|
||||
@if(Session::has('warn'))
|
||||
<div class="alert alert-warning alert-dismissable">
|
||||
<i class="fa fa-check-circle"></i>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{!!Session::get('warn')!!}
|
||||
</div>
|
||||
@endif
|
||||
@if(Session::has('success'))
|
||||
<div class="alert alert-success alert-dismissable">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('success')}}
|
||||
</div>
|
||||
@endif
|
||||
<!-- fail message -->
|
||||
@if(Session::has('fails'))
|
||||
<div class="alert alert-danger alert-dismissable">
|
||||
<i class="fa fa-ban"></i>
|
||||
<b>{{Lang::get('message.alert')}}!</b> {{Lang::get('message.failed')}}.
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('fails')}}
|
||||
</div>
|
||||
@endif
|
||||
@@ -36,25 +36,36 @@
|
||||
<tr><td><b>{!! Lang::get('lang.email') !!}:</b></td> <td>{{$thread->email}}</td></tr>
|
||||
<tr><td><b>{!! Lang::get('lang.phone') !!}:</b></td> <td>{{$thread->phone}}</td></tr>
|
||||
<tr><td><b>{!! Lang::get('lang.mobile') !!}:</b></td> <td>{{$thread->mobile}}</td></tr>
|
||||
|
||||
@if($ticket->getAssignedTo())
|
||||
<tr><td><b>{!! Lang::get('lang.assigned_to') !!}:</b></td> <td>{{$ticket->getAssignedTo()->first_name}} {{$ticket->getAssignedTo()->last_name}}</td></tr>
|
||||
@endif
|
||||
</table>
|
||||
<hr>
|
||||
@if($ticket->extraFields()->count()>0)
|
||||
<div>
|
||||
<table class="table" style="border: 1px solid black;border-collapse: collapse; width: 100%">
|
||||
|
||||
@foreach($ticket->extraFields() as $ticket_form_data)
|
||||
<tr style="border: 1px solid black;border-collapse: collapse;">
|
||||
<td style="border: 1px solid black;border-collapse: collapse; padding: 14px;"> <b>{!! $ticket_form_data->title !!}</b></td>
|
||||
<td style="border: 1px solid black; width: 100%;border-collapse: collapse;padding: 14px;">{!! $ticket_form_data->content !!}</td>
|
||||
</tr>
|
||||
|
||||
@foreach($ticket->extraFields() as $ticket_form_data)
|
||||
@if($ticket_form_data->isHidden()==false)
|
||||
<tr style="border: 1px solid black;border-collapse: collapse;">
|
||||
<td style="border: 1px solid black;border-collapse: collapse; padding: 14px;"> <b>{!! $ticket_form_data->getFieldKeyLabel() !!}</b></td>
|
||||
<td style="border: 1px solid black; width: 100%;border-collapse: collapse;padding: 14px;">{!! removeUnderscore($ticket_form_data->content) !!}</td>
|
||||
</tr>
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
|
||||
</table>
|
||||
</div>
|
||||
<hr>
|
||||
@endif
|
||||
@foreach($ticket->extraFields() as $ticket_form_data)
|
||||
@if($ticket_form_data->isHidden()==true)
|
||||
<div>
|
||||
<span>{!! $ticket_form_data->getHidden() !!}:</span>
|
||||
</div>
|
||||
<br>
|
||||
@endif
|
||||
@endforeach
|
||||
<div>
|
||||
<h3>Issue</h3>
|
||||
</div>
|
||||
@@ -62,5 +73,6 @@
|
||||
{!! $thread->body !!}
|
||||
</div>
|
||||
<hr>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
$array = [
|
||||
Lang::get('lang.status')=>$status->name,
|
||||
Lang::get('lang.priority')=>$priority->priority_desc,
|
||||
Lang::get('lang.department')=>$dept123->name,
|
||||
Lang::get('lang.email')=>str_limit($user->email,30),
|
||||
Lang::get('lang.source')=>$ticket_source,
|
||||
Lang::get('lang.help_topic')=>$help_topic->topic,
|
||||
Lang::get('lang.last_message')=>str_limit($username,30),
|
||||
Lang::get('lang.organization') => $LastResponse->getOrgWithLink(),
|
||||
];
|
||||
|
||||
if($user->ban > 0){
|
||||
array_push($array, [Lang::get('lang.this_ticket_is_under_banned_user')=>'']);
|
||||
}
|
||||
if($user->phone_number !=null){
|
||||
array_push($array, [Lang::get('lang.phone')=>$user->phone_number]);
|
||||
}
|
||||
if($user->mobile !=null){
|
||||
array_push($array, [Lang::get('lang.mobile')=>$user->mobile]);
|
||||
}
|
||||
$collection = collect($array);
|
||||
?>
|
||||
@foreach($collection->chunk(4) as $chunk)
|
||||
<div class="col-md-6">
|
||||
<table class="table table-responsive">
|
||||
@foreach($chunk as $key=>$value)
|
||||
<tr>
|
||||
<td><b>{!! $key !!}:</b></td>
|
||||
<td>{!!$value!!}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
</div>
|
||||
@endforeach
|
||||
@include('themes.default1.agent.helpdesk.filters.tags')
|
||||
<?php Event::fire(new App\Events\TicketDetailTable($TicketData)); ?>
|
||||
|
||||
@@ -10,6 +10,7 @@ active
|
||||
|
||||
@section('PageHeader')
|
||||
<h1>{{Lang::get('lang.ticket-details')}}</h1>
|
||||
@include('themes.default1.agent.helpdesk.ticket.response-messages')
|
||||
@stop
|
||||
<?php
|
||||
$user = App\User::where('id', '=', $tickets->user_id)->first();
|
||||
@@ -29,7 +30,7 @@ $group = App\Model\helpdesk\Agent\Groups::where('id', '=', $agent_group)->where(
|
||||
<li>
|
||||
<a href="{!! URL('user/'.$user->id) !!}">
|
||||
<span>{!! Lang::get('lang.User') !!} </span>
|
||||
</br><i class="fa fa-user"></i> <b>{{$user->user_name}}</b>
|
||||
</br><i class="fa fa-user"></i> <b>{{$user->name() }}</b>
|
||||
</a>
|
||||
</li>
|
||||
<li >
|
||||
@@ -65,7 +66,7 @@ $group = App\Model\helpdesk\Agent\Groups::where('id', '=', $agent_group)->where(
|
||||
{!! $rating->name !!}:
|
||||
<small class="pull-right">
|
||||
<?php for ($i = 1; $i <= $rating->rating_scale; $i++) { ?>
|
||||
<input type="radio" class="star" id="star5" name="{!! $rating->name !!}" value="{!! $i !!}"<?php echo ($ratingval == $i) ? 'checked' : '' ?> />
|
||||
<input type="radio" class="star not-apply" id="star5" name="{!! $rating->name !!}" value="{!! $i !!}"<?php echo ($ratingval == $i) ? 'checked' : '' ?> />
|
||||
<?php } ?>
|
||||
</small>
|
||||
</a>
|
||||
@@ -84,7 +85,7 @@ $group = App\Model\helpdesk\Agent\Groups::where('id', '=', $agent_group)->where(
|
||||
{!! $rating->name !!}:
|
||||
<small class="pull-right">
|
||||
<?php for ($i = 1; $i <= $rating->rating_scale; $i++) { ?>
|
||||
<input type="radio" class="star" id="star5" name="{!! $rating->name !!}" value="{!! $i !!}"<?php echo ($avg_rating == $i) ? 'checked' : '' ?> />
|
||||
<input type="radio" class="star not-apply" id="star5" name="{!! $rating->name !!}" value="{!! $i !!}"<?php echo ($avg_rating == $i) ? 'checked' : '' ?> />
|
||||
<?php } ?>
|
||||
</small>
|
||||
</a>
|
||||
@@ -112,22 +113,23 @@ if ($thread->title != "") {
|
||||
|
||||
if ($group->can_edit_ticket == 1) {
|
||||
?>
|
||||
<button type="button" class="btn btn-default" id="Edit_Ticket" data-toggle="modal" data-target="#Edit"><i class="fa fa-edit" style="color:green;"> </i> {!! Lang::get('lang.edit') !!}</button>
|
||||
<button type="button" class="btn btn-sm btn-default" id="Edit_Ticket" data-toggle="modal" data-target="#Edit"><i class="fa fa-edit" style="color:green;"> </i> {!! Lang::get('lang.edit') !!}</button>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($group->can_assign_ticket == 1) { ?>
|
||||
<button type="button" class="btn btn-default" data-toggle="modal" data-target="#{{$tickets->id}}assign"><i class="fa fa-hand-o-right" style="color:orange;"> </i> {!! Lang::get('lang.assign') !!}</button>
|
||||
<button type="button" class="btn btn-sm btn-default" data-toggle="modal" data-target="#{{$tickets->id}}assign"><i class="fa fa-hand-o-right" style="color:orange;"> </i> {!! Lang::get('lang.assign') !!}</button>
|
||||
<?php } ?>
|
||||
|
||||
@if($tickets->assigned_to == Auth::user()->id)
|
||||
<button type="button" id="surrender_button" class="btn btn-default" data-toggle="modal" data-target="#surrender"> <i class="fa fa-arrows-alt" style="color:red;"> </i> {!! Lang::get('lang.surrender') !!}</button>
|
||||
<button type="button" id="surrender_button" class="btn btn-sm btn-default" data-toggle="modal" data-target="#surrender"> <i class="fa fa-arrows-alt" style="color:red;"> </i> {!! Lang::get('lang.surrender') !!}</button>
|
||||
@endif
|
||||
|
||||
|
||||
<?php Event::fire('show-add-event-btn', array()); ?>
|
||||
|
||||
<a href="{{url('ticket/print/'.$tickets->id)}}" target="_blank" class="btn btn-primary"><i class="fa fa-print" > </i> {!! Lang::get('lang.generate_pdf') !!}</a>
|
||||
<a href="{{url('ticket/print/'.$tickets->id)}}" target="_blank" class="btn btn-primary btn-sm"><i class="fa fa-print" > </i> {!! Lang::get('lang.generate_pdf') !!}</a>
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" id="d1"><i class="fa fa-exchange" style="color:teal;" id="hidespin"> </i><i class="fa fa-spinner fa-spin" style="color:teal; display:none;" id="spin"></i>
|
||||
<button type="button" class="btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown" id="d1"><i class="fa fa-exchange" style="color:teal;" id="hidespin"> </i><i class="fa fa-spinner fa-spin" style="color:teal; display:none;" id="spin"></i>
|
||||
{!! Lang::get('lang.change_status') !!} <span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
@@ -156,7 +158,7 @@ if ($thread->title != "") {
|
||||
</div>
|
||||
<?php if ($group->can_delete_ticket == 1 || $group->can_ban_email == 1) { ?>
|
||||
<div id="more-option" class="btn-group">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" id="d2"><i class="fa fa-cogs" style="color:teal;"> </i>
|
||||
<button type="button" class="btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown" id="d2"><i class="fa fa-cogs" style="color:teal;"> </i>
|
||||
{!! Lang::get('lang.more') !!} <span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu pull-right">
|
||||
@@ -170,7 +172,9 @@ if ($thread->title != "") {
|
||||
?>
|
||||
<?php if ($group->can_ban_email == 1) { ?>
|
||||
<li data-toggle="modal" data-target="#banemail"><a href="#"><i class="fa fa-ban" style="color:red;"></i>{!! Lang::get('lang.ban_email') !!}</a></li>
|
||||
<?php }
|
||||
<?php
|
||||
\Event::fire('ticket.details.more.list',[$tickets]);
|
||||
}
|
||||
?> </ul>
|
||||
</div>
|
||||
<?php }
|
||||
@@ -242,9 +246,23 @@ if ($thread->title != "") {
|
||||
<div class="col-md-6">
|
||||
<table class="table table-hover">
|
||||
<div id="refresh">
|
||||
<tr><td><b>{!! Lang::get('lang.status') !!}:</b></td> <?php $status = App\Model\helpdesk\Ticket\Ticket_Status::where('id', '=', $tickets->status)->first(); ?><td title="{{$status->properties}}">{{$status->name}}</td></tr>
|
||||
<tr><td><b>{!! Lang::get('lang.priority') !!}:</b></td> <?php $priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('priority_id', '=', $tickets->priority_id)->first(); ?><td title="{{$priority->priority_desc}}">{{$priority->priority_desc}}</td></tr>
|
||||
<tr><td><b>{!! Lang::get('lang.department') !!}:</b></td> <?php $dept123 = App\Model\helpdesk\Agent\Department::where('id', '=', $tickets->dept_id)->first(); ?><td title="{{$dept123->name}}">{{$dept123->name}}</td></tr>
|
||||
<tr><td><b>{!! Lang::get('lang.status') !!}:</b></td>
|
||||
<?php $status = App\Model\helpdesk\Ticket\Ticket_Status::where('id', '=', $tickets->status)->first(); ?>
|
||||
@if($status)
|
||||
<td title="{{$status->properties}}">{{$status->name}}</td>
|
||||
@endif
|
||||
</tr>
|
||||
<tr><td><b>{!! Lang::get('lang.priority') !!}:</b></td>
|
||||
<?php $priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('priority_id', '=', $tickets->priority_id)->first(); ?>
|
||||
@if($priority)
|
||||
<td title="{{$priority->priority_desc}}">{{$priority->priority_desc}}</td>
|
||||
@endif
|
||||
</tr>
|
||||
<tr><td><b>{!! Lang::get('lang.department') !!}:</b></td>
|
||||
<?php $dept123 = App\Model\helpdesk\Agent\Department::where('id', '=', $tickets->dept_id)->first(); ?>
|
||||
@if($dept123)
|
||||
<td title="{{$dept123->name}}">{{$dept123->name}}</td></tr>
|
||||
@endif
|
||||
<tr><td><b>{!! Lang::get('lang.email') !!}:</b></td> <td>{{str_limit($user->email,30)}}</td></tr>
|
||||
@if($user->ban > 0) <tr><td style="color:orange;"><i class="fa fa-warning"></i><b>
|
||||
{!! Lang::get('lang.this_ticket_is_under_banned_user')!!}</td><td></td></tr>@endif
|
||||
@@ -306,6 +324,7 @@ if ($thread->title != "") {
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a href="#General" data-toggle="tab" style="color:#27C116;" id="aa"><i class="fa fa-reply-all"> </i> {!! Lang::get('lang.reply') !!}</a></li>
|
||||
<li><a href="#Internal" data-toggle="tab" style="color:#0495FF;" id="bb"><i class="fa fa-file-text"> </i> {!! Lang::get('lang.internal_notes') !!}</a></li>
|
||||
<?php Event::fire('timeline.tab.list',[$TicketData]); ?>
|
||||
<!-- <li><a href="#Reply" data-toggle="tab" style="color:orange;"><i class="fa fa-mail-forward" > </i> Forward</a></li> -->
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
@@ -343,6 +362,7 @@ if ($thread->title != "") {
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}">
|
||||
|
||||
<div id="t1">
|
||||
<div id="reply-response"></div>
|
||||
<div class="form-group">
|
||||
<div class="row">
|
||||
<!-- to -->
|
||||
@@ -370,7 +390,7 @@ if ($thread->title != "") {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php Event::fire(new App\Events\TimeLineFormEvent($TicketData)); ?>
|
||||
<?php Event::fire(new App\Events\TimeLineFormEvent($tickets)); ?>
|
||||
<div class="form-group">
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
@@ -403,6 +423,25 @@ 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>') !!}
|
||||
<script src="{{asset('vendor/unisharp/laravel-ckeditor/ckeditor.js')}}"></script>
|
||||
<script>
|
||||
CKEDITOR.replace( 'reply_content', {
|
||||
toolbarGroups: [
|
||||
{"name":"basicstyles","groups":["basicstyles"]},
|
||||
{"name":"links","groups":["links"]},
|
||||
{"name":"paragraph","groups":["list","blocks"]},
|
||||
{"name":"document","groups":["mode"]},
|
||||
{"name":"insert","groups":["insert"]},
|
||||
{"name":"styles","groups":["styles"]},
|
||||
{"name":"about","groups":["about"]}
|
||||
],
|
||||
filebrowserImageBrowseUrl: "{{url('laravel-filemanager?type=Images')}}",
|
||||
filebrowserImageUploadUrl: "{{url('laravel-filemanager/upload?type=Images')}}",
|
||||
filebrowserBrowseUrl: "{{url('laravel-filemanager?type=Files')}}",
|
||||
filebrowserUploadUrl: "{{url('laravel-filemanager/upload?type=Files')}}",
|
||||
removeButtons: 'Underline,Strike,Subscript,Superscript,Anchor,Styles,Specialchar'
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -492,6 +531,7 @@ if ($thread->title != "") {
|
||||
{!!Form::close()!!}
|
||||
</div>
|
||||
</div>
|
||||
<?php Event::fire('timeline.tab.content',[$tickets]); ?>
|
||||
</div>
|
||||
</div>
|
||||
<!-- ticket conversations -->
|
||||
@@ -520,7 +560,9 @@ if ($thread->title != "") {
|
||||
<ul class="timeline">
|
||||
<!-- timeline time label -->
|
||||
<?php
|
||||
|
||||
foreach ($conversations as $conversation) {
|
||||
|
||||
if ($conversation == null) {
|
||||
} else {
|
||||
?>
|
||||
@@ -541,8 +583,10 @@ if ($thread->title != "") {
|
||||
$data = $ConvDate[0];
|
||||
}
|
||||
if($conversation->user_id != null) {
|
||||
$role = App\User::where('id', '=', $conversation->user_id)->first();
|
||||
}
|
||||
$role = $conversation->user;
|
||||
} else {
|
||||
$role = null;
|
||||
}
|
||||
?>
|
||||
</li>
|
||||
<li>
|
||||
@@ -566,7 +610,7 @@ if ($thread->title != "") {
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if($conversation->user_id != null) {
|
||||
if ($conversation->is_internal) {
|
||||
$color = '#A19CFF';
|
||||
@@ -581,6 +625,7 @@ if ($thread->title != "") {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<div class="timeline-item">
|
||||
<span style="color:#fff;"><div class="pull-right"> <table><tbody>
|
||||
@@ -590,7 +635,7 @@ if ($thread->title != "") {
|
||||
@foreach($ratings as $rating)
|
||||
@if($rating->rating_area == 'Comment Area')
|
||||
<?php
|
||||
$rating_value = App\Model\helpdesk\Ratings\RatingRef::where('rating_id', '=', $rating->id)->where('thread_id', '=', $conversation->id)->first();
|
||||
$rating_value = App\Model\helpdesk\Ratings\RatingRef::where('rating_id', '=', $tickets->rating_id)->where('thread_id', '=', $conversation->id)->select('rating_value')->first();
|
||||
if ($rating_value == null) {
|
||||
$ratingval = '0';
|
||||
} else {
|
||||
@@ -601,7 +646,7 @@ if ($thread->title != "") {
|
||||
<th><div class="ticketratingtitle" style="color:#3c8dbc;" >{!! $rating->name !!} </div></th> 
|
||||
<td style="button:disabled;">
|
||||
<?php for ($i = 1; $i <= $rating->rating_scale; $i++) { ?>
|
||||
<input type="radio" class="star star-rating-readonly" id="star5" name="{!! $rating->name !!},{!! $conversation->id !!}" value="{!! $i !!}"<?php echo ($ratingval == $i) ? 'checked' : '' ?> />
|
||||
<input type="radio" class="star star-rating-readonly not-apply" id="star5" name="{!! $rating->name !!},{!! $conversation->id !!}" value="{!! $i !!}"<?php echo ($ratingval == $i) ? 'checked' : '' ?> />
|
||||
<?php } ?>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -624,6 +669,7 @@ if ($thread->title != "") {
|
||||
} else {
|
||||
$usernam = Lang::get('lang.system');
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<div class="user-block" style="margin-bottom:-5px;margin-top:-2px;">
|
||||
@@ -643,52 +689,59 @@ if ($thread->title != "") {
|
||||
@if($conversation->id == $ij->id)
|
||||
<a href="{{url('genereate-pdf/'.$conversation->id)}}" class= "pull-right fa fa-newspaper-o" title="generate pdf of this thread"></a>
|
||||
@endif
|
||||
|
||||
</div><!-- /.user-block -->
|
||||
|
||||
</h3>
|
||||
<div class="timeline-body" style="padding-left:30px;margin-bottom:-20px">
|
||||
@if($conversation->firstContent()=='yes')
|
||||
|
||||
|
||||
|
||||
@if($conversation->poster=='client')
|
||||
<div class="embed-responsive embed-responsive-16by9">
|
||||
<iframe id="loader_frame{{$conversation->id}}" class="embed-responsive-item">Body of html email here</iframe>
|
||||
<script type="text/javascript">
|
||||
<script type="text/javascript">
|
||||
jQuery(document).ready(function () {
|
||||
/* setInterval(function(){
|
||||
var mydiv = jQuery('#loader_frame{{$conversation->id}}').contents().find("body");
|
||||
var h = mydiv.height();
|
||||
/* setInterval(function(){
|
||||
var mydiv = jQuery('#loader_frame{{$conversation->id}}').contents().find("body");
|
||||
var h = mydiv.height();
|
||||
alert(h+20);
|
||||
}, 2000);*/
|
||||
jQuery('.embed-responsive-16by9').css('height','auto');
|
||||
jQuery('.embed-responsive-16by9').css('padding','0');
|
||||
jQuery('#loader_frame{{$conversation->id}}').css('width','100%');
|
||||
jQuery('#loader_frame{{$conversation->id}}').css('position','static');
|
||||
jQuery('#loader_frame{{$conversation->id}}').css('border','none');
|
||||
var mydiv = jQuery('#loader_frame{{$conversation->id}}').contents().find("body");
|
||||
var h = mydiv.height();
|
||||
jQuery('#loader_frame{{$conversation->id}}').css('height', h+20);
|
||||
setInterval(function(){
|
||||
//var mydiv = jQuery('#loader_frame{{$conversation->id}}').contents().find("body");
|
||||
//alert(mydiv.height());
|
||||
h = jQuery('#loader_frame{{$conversation->id}}').height();
|
||||
if (!!navigator.userAgent.match(/Trident\/7\./)){
|
||||
jQuery('#loader_frame{{$conversation->id}}').css('height', h);
|
||||
}else {
|
||||
jQuery('#loader_frame{{$conversation->id}}').css('height', h);
|
||||
}
|
||||
}, 2000);
|
||||
});
|
||||
}, 2000);*/
|
||||
jQuery('.embed-responsive-16by9').css('height','auto');
|
||||
jQuery('.embed-responsive-16by9').css('padding','0');
|
||||
jQuery('#loader_frame{{$conversation->id}}').css('width','100%');
|
||||
jQuery('#loader_frame{{$conversation->id}}').css('position','static');
|
||||
jQuery('#loader_frame{{$conversation->id}}').css('border','none');
|
||||
var mydiv = jQuery('#loader_frame{{$conversation->id}}').contents().find("body");
|
||||
var h = mydiv.height();
|
||||
jQuery('#loader_frame{{$conversation->id}}').css('height', h+20);
|
||||
setInterval(function(){
|
||||
//var mydiv = jQuery('#loader_frame{{$conversation->id}}').contents().find("body");
|
||||
//alert(mydiv.height());
|
||||
h = jQuery('#loader_frame{{$conversation->id}}').height();
|
||||
if (!!navigator.userAgent.match(/Trident\/7\./)){
|
||||
jQuery('#loader_frame{{$conversation->id}}').css('height', h);
|
||||
}else {
|
||||
jQuery('#loader_frame{{$conversation->id}}').css('height', h);
|
||||
}
|
||||
}, 2000);
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
<script>
|
||||
setTimeout(function(){
|
||||
$('#loader_frame{{$conversation->id}}')[0].contentDocument.body.innerHTML = '<body><style>body{display:inline-block;}</style>{!!$conversation->purify()!!}<body>'; }, 1000);
|
||||
$('#loader_frame{{$conversation->id}}')[0].contentDocument.body.innerHTML = '<body><style>body{display:inline-block;height:auto;}</style>{!!$conversation->purify()!!}<body>'; }, 1000);
|
||||
|
||||
</script>
|
||||
@else
|
||||
{!! $conversation->body !!}
|
||||
@endif
|
||||
|
||||
|
||||
|
||||
|
||||
@if($conversation->id == $ij->id)
|
||||
<?php $ticket_form_datas = App\Model\helpdesk\Ticket\Ticket_Form_Data::where('ticket_id', '=', $tickets->id)->get(); ?>
|
||||
<?php $ticket_form_datas = App\Model\helpdesk\Ticket\Ticket_Form_Data::where('ticket_id', '=', $tickets->ticket_id)->select('id')->get(); ?>
|
||||
@if(isset($ticket_form_datas))
|
||||
|
||||
<br/>
|
||||
@@ -696,45 +749,35 @@ alert(h+20);
|
||||
<tbody>
|
||||
@foreach($ticket_form_datas as $ticket_form_data)
|
||||
<tr>
|
||||
<td style="width: 30%">{!! $ticket_form_data->title !!}</td>
|
||||
<td>{!! $ticket_form_data->content !!}</td>
|
||||
<td style="width: 30%">{!! $ticket_form_data->getFieldKeyLabel() !!}</td>
|
||||
<td>{!! removeUnderscore($ticket_form_data->content) !!}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
</tbody></table>
|
||||
|
||||
@endif
|
||||
@endif
|
||||
|
||||
</div>
|
||||
|
||||
<br/><br/>
|
||||
|
||||
<div class="timeline-footer" style="margin-bottom:-5px">
|
||||
@if(!$conversation->is_internal)
|
||||
@if($conversation->user_id != null)
|
||||
<?php Event::fire(new App\Events\Timeline($conversation, $role, $user)); ?>
|
||||
<?php Event::fire(new App\Events\Timeline($conversation, $role)); ?>
|
||||
@endif
|
||||
@endif
|
||||
<?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='border-top: 1px dotted #FFFFFF;margin-top:0px;margin-bottom:0px;background-color:#8B8C90;'><h4 class='box-title'><b>" . $i . " </b> Attachments</h4>";
|
||||
}
|
||||
?>
|
||||
|
||||
<ul class='mailbox-attachments clearfix'>
|
||||
@forelse($attachments as $attachment)
|
||||
{!! $attachment->getFile() !!}
|
||||
@empty
|
||||
|
||||
@forelse ($conversation->attach as $attachment)
|
||||
{!! $attachment->getFile() !!}
|
||||
@empty
|
||||
@endforelse
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
<?php $lastid = $conversation->id ?>
|
||||
@@ -745,10 +788,10 @@ alert(h+20);
|
||||
<li>
|
||||
<i class="fa fa-clock-o bg-gray"></i>
|
||||
</li>
|
||||
<ul class="pull-right" style="padding-right:25px;padding-bottom:10px;">
|
||||
<?php echo $conversations->setPath(url('/thread/' . $tickets->id))->render(); ?>
|
||||
<ul class="pull-right" style="padding-right:40px" >
|
||||
<?php echo $conversations->setPath(url('/thread/' . $tickets->id))->render(); ?>
|
||||
</ul>
|
||||
</ul>
|
||||
</ul>
|
||||
</div><!-- /.col -->
|
||||
</div>
|
||||
</div><!-- /.row -->
|
||||
@@ -778,7 +821,7 @@ alert(h+20);
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label>{!! Lang::get('lang.sla_plan') !!} <span class="text-red"> *</span></label>
|
||||
<?php $sla_plans = App\Model\helpdesk\Manage\Sla_plan::all() ?>
|
||||
<?php $sla_plans = App\Model\helpdesk\Manage\Sla_plan::where('status', '=', 1)->get() ?>
|
||||
<select class="form-control" name="sla_paln">
|
||||
@foreach($sla_plans as $sla_plan)
|
||||
<option value="{!! $sla_plan->id !!}" <?php
|
||||
@@ -794,7 +837,8 @@ alert(h+20);
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label>{!! Lang::get('lang.help_topic') !!} <span class="text-red"> *</span></label>
|
||||
<?php $help_topics = App\Model\helpdesk\Manage\Help_topic::where('status', '=', 1)->get() ?>
|
||||
|
||||
<?php $help_topics = App\Model\helpdesk\Manage\Help_topic::where('status', '=', 1)->get(); ?>
|
||||
<select class="form-control" name="help_topic">
|
||||
@foreach($help_topics as $helptopic)
|
||||
<option value="{!! $helptopic->id !!}" <?php
|
||||
@@ -827,7 +871,7 @@ alert(h+20);
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label>{!! Lang::get('lang.priority') !!} <span class="text-red"> *</span></label>
|
||||
<?php $ticket_prioritys = App\Model\helpdesk\Ticket\Ticket_Priority::where('status', '=', 1)->get(); ?>
|
||||
<?php $ticket_prioritys = App\Model\helpdesk\Ticket\Ticket_Priority::where('status','=',1)->get(); ?>
|
||||
<select class="form-control" name="ticket_priority">
|
||||
@foreach($ticket_prioritys as $ticket_priority)
|
||||
<option value="{!! $ticket_priority->priority_id !!}" <?php
|
||||
@@ -884,6 +928,7 @@ alert(h+20);
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
||||
<?php }
|
||||
\Event::fire('ticket.detail.modelpopup',[$tickets]);
|
||||
?>
|
||||
<!-- Change Owner Modal -->
|
||||
<div class="modal fade" id="ChangeOwner">
|
||||
@@ -1014,11 +1059,7 @@ alert(h+20);
|
||||
$teams = App\Model\helpdesk\Agent\Teams::where('status', '=', '1')->get();
|
||||
$count_teams = count($teams);
|
||||
?>
|
||||
<!--<optgroup label="Teams ( {!! $count_teams !!} )">
|
||||
@foreach($teams as $team)
|
||||
<option value="team_{{$team->id}}">{!! $team->name !!}</option>
|
||||
@endforeach
|
||||
</optgroup>-->
|
||||
|
||||
<optgroup label="Agents ( {!! $count_assign !!} )">
|
||||
@foreach($assign as $user)
|
||||
<option value="user_{{$user->id}}">{{$user->first_name." ".$user->last_name}}</option>
|
||||
@@ -1055,7 +1096,7 @@ alert(h+20);
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
||||
<?php \Event::fire('show-add-calendar-model', array())?>
|
||||
<?php \Event::fire('show-add-calendar-model', array('id' => $tickets->id))?>
|
||||
<!-- add or search user Modal -->
|
||||
<div class="modal fade" id="addccc">
|
||||
<div class="modal-dialog">
|
||||
@@ -1295,33 +1336,7 @@ alert(h+20);
|
||||
$("#InternalContent").wysihtml5();
|
||||
});
|
||||
jQuery('.star').attr('disabled', true);
|
||||
$(function () {
|
||||
// $('#cand').wysihtml5();
|
||||
var wysihtml5Editor = $('#reply_content').wysihtml5().data("wysihtml5").editor;
|
||||
$('#select').on('change', function (e) {
|
||||
|
||||
//alert('hello2');
|
||||
var $_token = $('#token').val();
|
||||
var data = $('#select').val();
|
||||
//var data1 = $(this).children('option:selected').data('id');
|
||||
//alert('data1');
|
||||
$.ajax({
|
||||
type : "POST",
|
||||
cache : false,
|
||||
headers : { 'X-XSRF-TOKEN' : $_token },
|
||||
url : "../canned/" + data,
|
||||
dataType : 'json',
|
||||
data : ({data}),
|
||||
success : function(response) {
|
||||
|
||||
// alert(response);
|
||||
wysihtml5Editor.setValue(response, true);
|
||||
console.log(wysihtml5Editor.getValue());
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
$(function() {
|
||||
$("#tags, #tags2").autocomplete({
|
||||
source: 'auto/<?php echo $tickets->id; ?>'
|
||||
@@ -1557,7 +1572,6 @@ alert(h+20);
|
||||
$("#show").hide();
|
||||
$("#hide").show();
|
||||
if (response == 0) {
|
||||
location.reload();
|
||||
// message = "{!! Lang::get('lang.ticket_updated_successfully') !!}"
|
||||
// $("#dismis").trigger("click");
|
||||
// $("#refresh1").load("../thread/{{$tickets->id}} #refresh1");
|
||||
@@ -1565,6 +1579,7 @@ alert(h+20);
|
||||
// $("#alert11").show();
|
||||
// $('#message-success1').html(message);
|
||||
// setInterval(function(){$("#alert11").hide(); }, 4000);
|
||||
location.reload();
|
||||
}
|
||||
else if (response == 1) {
|
||||
$("#error-subject").show();
|
||||
@@ -1732,8 +1747,10 @@ alert(h+20);
|
||||
if (response == 1)
|
||||
{
|
||||
$("#refresh1").load("../thread/{{$tickets->id}} #refresh1");
|
||||
$(".embed-responsive-item").load("../thread/{{$tickets->id}} .embed-responsive-item");
|
||||
|
||||
// $("#t4").load("../thread/{{$tickets->id}} #t4");
|
||||
var message = "{!! Lang::get('lang.updated-internal-note') !!}";
|
||||
var message = "{!! Lang::get('lang.internal-note-has-been-added') !!}";
|
||||
$("#alert21").show();
|
||||
$('#message-success2').html(message);
|
||||
setInterval(function(){$("#alert21").hide(); }, 4000);
|
||||
@@ -1812,6 +1829,9 @@ alert(h+20);
|
||||
}
|
||||
|
||||
$('#form3').on('submit', function() {
|
||||
for ( instance in CKEDITOR.instances ) {
|
||||
CKEDITOR.instances[instance].updateElement();
|
||||
}
|
||||
var fd = new FormData(document.getElementById("form3"));
|
||||
var reply_content = document.getElementById('reply_content').value;
|
||||
if(reply_content) {
|
||||
@@ -1826,66 +1846,33 @@ alert(h+20);
|
||||
$("#t1").show();
|
||||
return false;
|
||||
}
|
||||
var reply_content = document.getElementById('reply_content').value;
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "../thread/reply/{{ $tickets->id }}",
|
||||
enctype: 'multipart/form-data',
|
||||
dataType: "html",
|
||||
dataType: "json",
|
||||
data: fd,
|
||||
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)
|
||||
{
|
||||
location.reload();
|
||||
// $("#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" );
|
||||
var message = "{!! Lang::get('lang.for_some_reason_your_reply_was_not_posted_please_try_again_later') !!}";
|
||||
$("#alert23").show();
|
||||
$('#message-danger2').html(message);
|
||||
setInterval(function(){$("#alert23").hide(); }, 4000);
|
||||
}
|
||||
$("#show3").hide();
|
||||
$("#t1").show();
|
||||
},
|
||||
error: function(response) {
|
||||
$("#show3").hide();
|
||||
$("#t1").show();
|
||||
}
|
||||
$("#show3").show();
|
||||
},
|
||||
success: function(json) {
|
||||
location.reload();
|
||||
//$('html, body').animate({ scrollTop: $("#heading").offset().top }, 500);
|
||||
},
|
||||
error: function(json) {
|
||||
$("#show3").hide();
|
||||
$("#t1").show();
|
||||
var res = "";
|
||||
$.each(json.responseJSON, function (idx, topic) {
|
||||
res += "<li>" + topic + "</li>";
|
||||
});
|
||||
$("#reply-response").html("<div class='alert alert-danger'><strong>Whoops!</strong> There were some problems with your input.<br><br><ul>" + res + "</ul></div>");
|
||||
//$('html, body').animate({ scrollTop: $("#heading").offset().top }, 500);
|
||||
}
|
||||
})
|
||||
return false;
|
||||
});
|
||||
@@ -1898,7 +1885,6 @@ alert(h+20);
|
||||
|
||||
if (response == 1)
|
||||
{
|
||||
location.reload();
|
||||
// alert('ticket has been un assigned');
|
||||
var message = "{!! Lang::get('lang.you_have_unassigned_your_ticket') !!}";
|
||||
$("#alert11").show();
|
||||
|
||||
@@ -13,6 +13,31 @@ class="active"
|
||||
@stop
|
||||
@section('PageHeader')
|
||||
<h1>{{Lang::get('lang.tickets')}}</h1>
|
||||
<style>
|
||||
.tooltip1 {
|
||||
position: relative;
|
||||
/*display: inline-block;*/
|
||||
/*border-bottom: 1px dotted black;*/
|
||||
}
|
||||
|
||||
.tooltip1 .tooltiptext {
|
||||
visibility: hidden;
|
||||
width: 100%;
|
||||
background-color: black;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
border-radius: 6px;
|
||||
padding: 5px 0;
|
||||
|
||||
/* Position the tooltip */
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.tooltip1:hover .tooltiptext {
|
||||
visibility: visible;
|
||||
}
|
||||
</style>
|
||||
@stop
|
||||
@section('content')
|
||||
<?php
|
||||
@@ -57,53 +82,21 @@ if (Auth::user()->role == 'agent') {
|
||||
{!! Lang::get('lang.change_status') !!} <span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li ><input type="submit" class="btn btn-block btn-default btn-flat btn-sm text-blue" id="delete" name="submit" value="{!! Lang::get('lang.open') !!}">
|
||||
<li ><input type="submit" class="btn btn-block btn-default btn-sm text-green" id="delete" name="submit" value="{!! Lang::get('lang.open') !!}">
|
||||
</li>
|
||||
<li ><input type="submit" class="btn btn-block btn-default btn-flat btn-sm text-yellow" name="submit" id="close" value="{!! Lang::get('lang.close') !!}"></li>
|
||||
<li ><input type="submit" class="btn btn-block btn-default btn-sm text-yellow" name="submit" id="close" value="{!! Lang::get('lang.close') !!}"></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
<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 -->
|
||||
|
||||
{!! Datatable::table()
|
||||
->addColumn(
|
||||
"",
|
||||
Lang::get('lang.subject'),
|
||||
Lang::get('lang.ticket_id'),
|
||||
Lang::get('lang.priority'),
|
||||
Lang::get('lang.from'),
|
||||
Lang::get('lang.assigned_to'),
|
||||
Lang::get('lang.last_activity'))
|
||||
->setUrl(route('get.trash.ticket'))
|
||||
->setOrder(array(6=>'desc'))
|
||||
->setClass('table table-hover table-bordered table-striped')
|
||||
->setCallbacks("fnRowCallback",'function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) {
|
||||
var str = aData[3];
|
||||
if(str.search("#000") == -1) {
|
||||
$("td", nRow).css({"background-color":"#F3F3F3", "font-weight":"600", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px #F3F3F3"});
|
||||
$("td", nRow).mouseenter(function(){
|
||||
$("td", nRow).css({"background-color":"#DEDFE0", "font-weight":"600", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px #DEDFE0"});
|
||||
});
|
||||
$("td", nRow).mouseleave(function(){
|
||||
$("td", nRow).css({"background-color":"#F3F3F3", "font-weight":"600", "border-bottom":"solid 0.5px #ddd","border-right":"solid 0.5px #F3F3F3"});
|
||||
});
|
||||
} else {
|
||||
$("td", nRow).css({"background-color":"white", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px white"});
|
||||
$("td", nRow).mouseenter(function(){
|
||||
$("td", nRow).css({"background-color":"#DEDFE0", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px #DEDFE0"});
|
||||
});
|
||||
$("td", nRow).mouseleave(function(){
|
||||
$("td", nRow).css({"background-color":"white", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px white"});
|
||||
});
|
||||
}
|
||||
}')
|
||||
->render();!!}
|
||||
{!!$table->render('vendor.Chumper.template')!!}
|
||||
|
||||
</div><!-- /.mail-box-messages -->
|
||||
{!! Form::close() !!}
|
||||
@@ -130,7 +123,7 @@ if (Auth::user()->role == 'agent') {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{!! $table->script('vendor.Chumper.ticket-javascript') !!}
|
||||
<script>
|
||||
var option = null;
|
||||
$(function() {
|
||||
|
||||
@@ -13,6 +13,31 @@ class="active"
|
||||
@stop
|
||||
@section('PageHeader')
|
||||
<h1>{{Lang::get('lang.tickets')}}</h1>
|
||||
<style>
|
||||
.tooltip1 {
|
||||
position: relative;
|
||||
/*display: inline-block;*/
|
||||
/*border-bottom: 1px dotted black;*/
|
||||
}
|
||||
|
||||
.tooltip1 .tooltiptext {
|
||||
visibility: hidden;
|
||||
width: 100%;
|
||||
background-color: black;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
border-radius: 6px;
|
||||
padding: 5px 0;
|
||||
|
||||
/* Position the tooltip */
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.tooltip1:hover .tooltiptext {
|
||||
visibility: visible;
|
||||
}
|
||||
</style>
|
||||
@stop
|
||||
@section('content')
|
||||
<?php
|
||||
@@ -47,7 +72,7 @@ if (Auth::user()->role == 'agent') {
|
||||
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
|
||||
{{Session::get('fails')}}
|
||||
</div>
|
||||
@endif
|
||||
@endif
|
||||
{!! Form::open(['id'=>'modalpopup', 'route'=>'select_all','method'=>'post']) !!}
|
||||
|
||||
<!--<div class="mailbox-controls">-->
|
||||
@@ -56,6 +81,7 @@ if (Auth::user()->role == 'agent') {
|
||||
<input type="submit" class="submit btn btn-default text-orange btn-sm" id="delete" name="submit" value="{!! Lang::get('lang.delete') !!}">
|
||||
<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>
|
||||
|
||||
<button type="button" class="btn btn-sm btn-default" id="assign_Ticket" data-toggle="modal" data-target="#AssignTickets" style="display: none;"><i class="fa fa-hand-o-right"> </i> {!! Lang::get('lang.assign') !!}</button>
|
||||
<!--</div>-->
|
||||
<p><p/>
|
||||
@@ -63,40 +89,7 @@ if (Auth::user()->role == 'agent') {
|
||||
<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 -->
|
||||
|
||||
{!! Datatable::table()
|
||||
->addColumn(
|
||||
"",
|
||||
Lang::get('lang.subject'),
|
||||
Lang::get('lang.ticket_id'),
|
||||
Lang::get('lang.priority'),
|
||||
Lang::get('lang.from'),
|
||||
Lang::get('lang.assigned_to'),
|
||||
Lang::get('lang.last_activity'))
|
||||
->setUrl(route('get.unassigned.ticket'))
|
||||
|
||||
->setOrder(array(6=>'desc'))
|
||||
->setClass('table table-hover table-bordered table-striped')
|
||||
->setCallbacks("fnRowCallback",'function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) {
|
||||
var str = aData[3];
|
||||
if(str.search("#000") == -1) {
|
||||
$("td", nRow).css({"background-color":"#F3F3F3", "font-weight":"600", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px #F3F3F3"});
|
||||
$("td", nRow).mouseenter(function(){
|
||||
$("td", nRow).css({"background-color":"#DEDFE0", "font-weight":"600", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px #DEDFE0"});
|
||||
});
|
||||
$("td", nRow).mouseleave(function(){
|
||||
$("td", nRow).css({"background-color":"#F3F3F3", "font-weight":"600", "border-bottom":"solid 0.5px #ddd","border-right":"solid 0.5px #F3F3F3"});
|
||||
});
|
||||
} else {
|
||||
$("td", nRow).css({"background-color":"white", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px white"});
|
||||
$("td", nRow).mouseenter(function(){
|
||||
$("td", nRow).css({"background-color":"#DEDFE0", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px #DEDFE0"});
|
||||
});
|
||||
$("td", nRow).mouseleave(function(){
|
||||
$("td", nRow).css({"background-color":"white", "border-bottom":"solid 0.5px #ddd", "border-right":"solid 0.5px white"});
|
||||
});
|
||||
}
|
||||
}')
|
||||
->render();!!}
|
||||
{!!$table->render('vendor.Chumper.template')!!}
|
||||
|
||||
</div><!-- /.mail-box-messages -->
|
||||
{!! Form::close() !!}
|
||||
@@ -200,7 +193,7 @@ if (Auth::user()->role == 'agent') {
|
||||
</div><!-- /.modal-content -->
|
||||
</div><!-- /.modal-dialog -->
|
||||
</div><!-- /.modal -->
|
||||
<!-- Assign ticket model-->
|
||||
<!-- Assign ticket model-->
|
||||
<!-- Modal -->
|
||||
<div class="modal fade in" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="false" style="display: none; padding-right: 15px;background-color: rgba(0, 0, 0, 0.7);">
|
||||
<div class="modal-dialog" role="document">
|
||||
@@ -222,7 +215,7 @@ if (Auth::user()->role == 'agent') {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{!! $table->script('vendor.Chumper.ticket-javascript') !!}
|
||||
<script>
|
||||
var t_id = [];
|
||||
var option = null;
|
||||
@@ -255,14 +248,14 @@ if (Auth::user()->role == 'agent') {
|
||||
t_id = $('.selectval').map(function() {
|
||||
return $(this).val();
|
||||
}).get();
|
||||
showAssign(t_id);
|
||||
showAssign(t_id)
|
||||
// alert(checkboxValues);
|
||||
} else {
|
||||
//Check all checkboxes
|
||||
$("input[type='checkbox']", ".mailbox-messages").iCheck("check");
|
||||
// alert('Hallo');
|
||||
t_id = [];
|
||||
showAssign(t_id);
|
||||
showAssign(t_id)
|
||||
}
|
||||
$(this).data("clicks", !clicks);
|
||||
|
||||
@@ -428,15 +421,10 @@ if (Auth::user()->role == 'agent') {
|
||||
var message = "{{Lang::get('lang.merge-success')}}";
|
||||
$("#merge-succ-alert").show();
|
||||
$('#message-merge-succ').html(message);
|
||||
setInterval(function() {
|
||||
setTimeout(function () {
|
||||
$("#alert11").hide();
|
||||
setTimeout(function() {
|
||||
var link = document.querySelector('#load-unassigned');
|
||||
if (link) {
|
||||
link.click();
|
||||
}
|
||||
}, 500);
|
||||
}, 2000);
|
||||
location.reload();
|
||||
}, 1000);
|
||||
|
||||
}
|
||||
|
||||
@@ -467,7 +455,7 @@ if (Auth::user()->role == 'agent') {
|
||||
$('#assign-form').on('submit', function() {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "../ticket/assign/"+t_id,
|
||||
url: "ticket/assign/"+t_id,
|
||||
dataType: "html",
|
||||
data: $(this).serialize(),
|
||||
beforeSend: function() {
|
||||
@@ -490,7 +478,6 @@ if (Auth::user()->role == 'agent') {
|
||||
})
|
||||
return false;
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
function someFunction(id) {
|
||||
|
||||
Reference in New Issue
Block a user