Bug-fix-patch4
# client close ticket thread is not internal # change lenght of titcket title in cleint ticket list page # client side ticket attachment issue fixed
This commit is contained in:
@@ -1246,6 +1246,11 @@ class TicketController extends Controller
|
|||||||
if ($ticket_status == null) {
|
if ($ticket_status == null) {
|
||||||
return redirect()->route('unauth');
|
return redirect()->route('unauth');
|
||||||
}
|
}
|
||||||
|
if(\Auth::user()->role == 'user') {
|
||||||
|
$is_internal = 0;
|
||||||
|
} else {
|
||||||
|
$is_internal = 1;
|
||||||
|
}
|
||||||
$ticket_status->status = 3;
|
$ticket_status->status = 3;
|
||||||
$ticket_status->closed = 1;
|
$ticket_status->closed = 1;
|
||||||
$ticket_status->closed_at = date('Y-m-d H:i:s');
|
$ticket_status->closed_at = date('Y-m-d H:i:s');
|
||||||
@@ -1256,7 +1261,7 @@ class TicketController extends Controller
|
|||||||
$thread = new Ticket_Thread();
|
$thread = new Ticket_Thread();
|
||||||
$thread->ticket_id = $ticket_status->id;
|
$thread->ticket_id = $ticket_status->id;
|
||||||
$thread->user_id = Auth::user()->id;
|
$thread->user_id = Auth::user()->id;
|
||||||
$thread->is_internal = 1;
|
$thread->is_internal = $is_internal;
|
||||||
$thread->body = $ticket_status_message->message.' '.Auth::user()->first_name.' '.Auth::user()->last_name;
|
$thread->body = $ticket_status_message->message.' '.Auth::user()->first_name.' '.Auth::user()->last_name;
|
||||||
$thread->save();
|
$thread->save();
|
||||||
|
|
||||||
|
@@ -1,5 +1,4 @@
|
|||||||
@extends('themes.default1.client.layout.client')
|
@extends('themes.default1.client.layout.client')
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<?php
|
<?php
|
||||||
$tickets = App\Model\helpdesk\Ticket\Tickets::where('id', '=', \Crypt::decrypt($id))->first();
|
$tickets = App\Model\helpdesk\Ticket\Tickets::where('id', '=', \Crypt::decrypt($id))->first();
|
||||||
@@ -89,8 +88,7 @@ $thread = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', \Cryp
|
|||||||
<?php
|
<?php
|
||||||
$priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('priority_id', '=', $tickets->priority_id)->first();
|
$priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('priority_id', '=', $tickets->priority_id)->first();
|
||||||
?>
|
?>
|
||||||
<div class="callout callout-{{$priority->priority_color}}" style = 'background-color:{{$priority->priority_color}}; color:#F9F9F9'>
|
<div class="callout callout-default ">
|
||||||
<!-- <div class="callout callout-default "> -->
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<?php
|
<?php
|
||||||
@@ -136,15 +134,13 @@ $thread = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', \Cryp
|
|||||||
|
|
||||||
<tr><td><b>{!! Lang::get('lang.priority') !!}:</b></td> <?php $priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('priority_id', '=', $tickets->priority_id)->first(); ?>
|
<tr><td><b>{!! Lang::get('lang.priority') !!}:</b></td> <?php $priority = App\Model\helpdesk\Ticket\Ticket_Priority::where('priority_id', '=', $tickets->priority_id)->first(); ?>
|
||||||
|
|
||||||
<!-- {{$priority->priority}} -->
|
@if($priority->priority_id == 1)
|
||||||
<td title="{{$priority->priority}}">{{$priority->priority}}</td>
|
<td title="{{$priority->priority_desc}}" style="color:green">{{$priority->priority_desc}}</td>
|
||||||
<!-- @if($priority->priority_id == 1)
|
|
||||||
<td title="{{$priority->priority_color}}"style = 'background-color:{{$priority->priority_color}}; color:#F9F9F9'></td>
|
|
||||||
@elseif($priority->priority_id == 2)
|
@elseif($priority->priority_id == 2)
|
||||||
<td title="{{$priority->priority_desc}}" style="color:orange">{{$priority->priority_desc}}</td>
|
<td title="{{$priority->priority_desc}}" style="color:orange">{{$priority->priority_desc}}</td>
|
||||||
@elseif($priority->priority_id == 3)
|
@elseif($priority->priority_id == 3)
|
||||||
<td title="{{$priority->priority_desc}}" style="color:red">{{$priority->priority_desc}}</td>
|
<td title="{{$priority->priority_desc}}" style="color:red">{{$priority->priority_desc}}</td>
|
||||||
@endif -->
|
@endif
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr><td><b>{!! Lang::get('lang.department') !!}:</b></td>
|
<tr><td><b>{!! Lang::get('lang.department') !!}:</b></td>
|
||||||
@@ -171,69 +167,11 @@ $thread = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', \Cryp
|
|||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
$conversations = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $tickets->id)->where('is_internal', '=', 0)->paginate(10);
|
$conversations = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $tickets->id)->where('is_internal', '=', 0)->paginate(10);
|
||||||
|
$ij = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $tickets->id)->first();
|
||||||
|
$user = App\User::where('id', '=', $tickets->user_id)->first();
|
||||||
foreach ($conversations as $conversation) {
|
foreach ($conversations as $conversation) {
|
||||||
$ConvDate1 = $conversation->created_at;
|
$role = $conversation->user;
|
||||||
$ConvDate = explode(' ', $ConvDate1);
|
$body = $conversation->thread($conversation->body);
|
||||||
|
|
||||||
$date = $ConvDate[0];
|
|
||||||
$time = $ConvDate[1];
|
|
||||||
$time = substr($time, 0, -3);
|
|
||||||
if (isset($data) && $date == $data) {
|
|
||||||
|
|
||||||
} else {
|
|
||||||
$data = $ConvDate[0];
|
|
||||||
}
|
|
||||||
$role = App\User::where('id', '=', $conversation->user_id)->first();
|
|
||||||
|
|
||||||
$attachment = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id', '=', $conversation->id)->first();
|
|
||||||
if ($attachment == null) {
|
|
||||||
$body = $conversation->body;
|
|
||||||
} else {
|
|
||||||
$body = $conversation->body;
|
|
||||||
$attachments = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id', '=', $conversation->id)->orderBy('id', 'DESC')->get();
|
|
||||||
foreach ($attachments as $attachment) {
|
|
||||||
if ($attachment->type == 'pdf') {
|
|
||||||
|
|
||||||
} elseif ($attachment->type == 'docx') {
|
|
||||||
|
|
||||||
} else {
|
|
||||||
$image = @imagecreatefromstring($attachment->file);
|
|
||||||
ob_start();
|
|
||||||
imagejpeg($image, null, 80);
|
|
||||||
$data = ob_get_contents();
|
|
||||||
ob_end_clean();
|
|
||||||
$var = '<img src="data:image/jpg;base64,' . base64_encode($data) . '" />';
|
|
||||||
$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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$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);
|
|
||||||
}
|
|
||||||
?>
|
?>
|
||||||
<ol class="comment-list" >
|
<ol class="comment-list" >
|
||||||
<li class="comment">
|
<li class="comment">
|
||||||
@@ -284,9 +222,63 @@ foreach ($conversations as $conversation) {
|
|||||||
</div><!-- .comment-metadata -->
|
</div><!-- .comment-metadata -->
|
||||||
</footer><!-- .comment-meta -->
|
</footer><!-- .comment-meta -->
|
||||||
<div class="comment-content">
|
<div class="comment-content">
|
||||||
<p>{!! $body !!}</p>
|
@if($conversation->firstContent()=='yes')
|
||||||
|
<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">
|
||||||
|
jQuery(document).ready(function () {
|
||||||
|
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(){
|
||||||
|
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 = '{!!$conversation->purify()!!}'; }, 1000);
|
||||||
|
|
||||||
|
</script>
|
||||||
|
@else
|
||||||
|
{!! $body !!}
|
||||||
|
@endif
|
||||||
|
@if($conversation->id == $ij->id)
|
||||||
|
<?php $ticket_form_datas = App\Model\helpdesk\Ticket\Ticket_Form_Data::where('ticket_id', '=', $tickets->id)->get(); ?>
|
||||||
|
@if(isset($ticket_form_datas))
|
||||||
|
|
||||||
|
<br/>
|
||||||
|
<table class="table table-bordered">
|
||||||
|
<tbody>
|
||||||
|
@foreach($ticket_form_datas as $ticket_form_data)
|
||||||
|
<tr>
|
||||||
|
<td style="width: 30%">{!! $ticket_form_data->getFieldKeyLabel() !!}</td>
|
||||||
|
<td>{!! removeUnderscore($ticket_form_data->content) !!}</td>
|
||||||
|
</tr>
|
||||||
|
@endforeach
|
||||||
|
</tbody></table>
|
||||||
|
|
||||||
|
@endif
|
||||||
|
@endif
|
||||||
</div><!-- .comment-content -->
|
</div><!-- .comment-content -->
|
||||||
|
<br/><br/>
|
||||||
<div class="timeline-footer" style="margin-bottom:-5px">
|
<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)); ?>
|
||||||
|
@endif
|
||||||
|
@endif
|
||||||
<?php
|
<?php
|
||||||
$attachments = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id', '=', $conversation->id)->get();
|
$attachments = App\Model\helpdesk\Ticket\Ticket_attachments::where('thread_id', '=', $conversation->id)->get();
|
||||||
$i = 0;
|
$i = 0;
|
||||||
@@ -307,16 +299,14 @@ foreach ($conversations as $conversation) {
|
|||||||
$power = $size > 0 ? floor(log($size, 1024)) : 0;
|
$power = $size > 0 ? floor(log($size, 1024)) : 0;
|
||||||
$value = number_format($size / pow(1024, $power), 2, '.', ',') . ' ' . $units[$power];
|
$value = number_format($size / pow(1024, $power), 2, '.', ',') . ' ' . $units[$power];
|
||||||
if ($attachment->poster == 'ATTACHMENT') {
|
if ($attachment->poster == 'ATTACHMENT') {
|
||||||
if ($attachment->type == 'jpg' || $attachment->type == 'JPG' || $attachment->type == 'jpeg' || $attachment->type == 'JPEG' || $attachment->type == 'png' || $attachment->type == 'PNG' || $attachment->type == 'gif' || $attachment->type == 'GIF') {
|
if (mime($attachment->type) == true) {
|
||||||
$image = @imagecreatefromstring($attachment->file);
|
$var = '<a href="' . URL::route('image', array('image_id' => $attachment->id)) . '" target="_blank"><img style="max-width:200px;height:133px;" src="data:image/jpg;base64,' . $attachment->file . '"/></a>';
|
||||||
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;height:133px;" src="data:image/jpg;base64,' . base64_encode($data) . '"/></a>';
|
|
||||||
echo '<li style="background-color:#f4f4f4;"><span class="mailbox-attachment-icon has-img">' . $var . '</span><div class="mailbox-attachment-info"><b style="word-wrap: break-word;">' . $attachment->name . '</b><br/><p>' . $value . '</p></div></li>';
|
echo '<li style="background-color:#f4f4f4;"><span class="mailbox-attachment-icon has-img">' . $var . '</span><div class="mailbox-attachment-info"><b style="word-wrap: break-word;">' . $attachment->name . '</b><br/><p>' . $value . '</p></div></li>';
|
||||||
} else {
|
} else {
|
||||||
$var = '<a style="max-width:200px;height:133px;color:#666;" href="' . URL::route('image', array('image_id' => $attachment->id)) . '" target="_blank"><span class="mailbox-attachment-icon" style="background-color:#fff;">' . strtoupper($attachment->type) . '</span><div class="mailbox-attachment-info"><span ><b style="word-wrap: break-word;">' . $attachment->name . '</b><br/><p>' . $value . '</p></span></div></a>';
|
//$var = '<a href="' . URL::route('image', array('image_id' => $attachment->id)) . '" target="_blank"><img style="max-width:200px;height:133px;" src="data:'.$attachment->type.';base64,' . base64_encode($data) . '"/></a>';
|
||||||
|
$var = '<a style="max-width:200px;height:133px;color:#666;" href="' . URL::route('image', array('image_id' => $attachment->id)) . '" target="_blank"><span class="mailbox-attachment-icon" style="background-color:#fff; font-size:18px;">' . strtoupper($attachment->type) . '</span><div class="mailbox-attachment-info"><span ><b style="word-wrap: break-word;">' . $attachment->name . '</b><br/><p>' . $value . '</p></span></div></a>';
|
||||||
|
|
||||||
echo '<li style="background-color:#f4f4f4;">' . $var . '</li>';
|
echo '<li style="background-color:#f4f4f4;">' . $var . '</li>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -378,23 +368,23 @@ foreach ($conversations as $conversation) {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$("#cc_page").on('click', '.search_r', function() {
|
$("#cc_page").on('click', '.search_r', function () {
|
||||||
var search_r = $('a', this).attr('id');
|
var search_r = $('a', this).attr('id');
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "GET",
|
type: "GET",
|
||||||
url: "../ticket/status/{{$tickets->id}}/" + search_r,
|
url: "../ticket/status/{{$tickets->id}}/" + search_r,
|
||||||
beforeSend: function() {
|
beforeSend: function () {
|
||||||
$("#refresh").hide();
|
$("#refresh").hide();
|
||||||
$("#loader").show();
|
$("#loader").show();
|
||||||
},
|
},
|
||||||
success: function(response) {
|
success: function (response) {
|
||||||
$("#refresh").load("../check_ticket/{!! $id !!} #refresh");
|
$("#refresh").load("../check_ticket/{!! $id !!} #refresh");
|
||||||
$("#refresh").show();
|
$("#refresh").show();
|
||||||
$("#loader").hide();
|
$("#loader").hide();
|
||||||
var message = response;
|
var message = response;
|
||||||
$("#alert11").show();
|
$("#alert11").show();
|
||||||
$('#message-success1').html(message);
|
$('#message-success1').html(message);
|
||||||
setInterval(function() {
|
setInterval(function () {
|
||||||
$("#alert11").hide();
|
$("#alert11").hide();
|
||||||
}, 4000);
|
}, 4000);
|
||||||
}
|
}
|
||||||
@@ -402,19 +392,19 @@ foreach ($conversations as $conversation) {
|
|||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function () {
|
||||||
var Data = $('input[name="rating"]:checked').val();
|
var Data = $('input[name="rating"]:checked').val();
|
||||||
var Data2 = $('input[name="rating2"]:checked').val();
|
var Data2 = $('input[name="rating2"]:checked').val();
|
||||||
if (Data) {
|
if (Data) {
|
||||||
$('input[name=rating]').rating('readOnly');
|
$('input[name=rating]').rating('readOnly');
|
||||||
jQuery('.star').attr('disabled', true);
|
jQuery('.star').attr('disabled', true);
|
||||||
}
|
}
|
||||||
$('.star').change(function() {
|
$('.star').change(function () {
|
||||||
$('#foo').submit();
|
$('#foo').submit();
|
||||||
$('.foo2').submit();
|
$('.foo2').submit();
|
||||||
});
|
});
|
||||||
// process the form
|
// process the form
|
||||||
$('#foo').submit(function(event) {
|
$('#foo').submit(function (event) {
|
||||||
// get the form data
|
// get the form data
|
||||||
// there are many ways to get this data using jQuery (you can use the class or id also)
|
// there are many ways to get this data using jQuery (you can use the class or id also)
|
||||||
var formData = $(this).serialize();
|
var formData = $(this).serialize();
|
||||||
@@ -425,7 +415,7 @@ foreach ($conversations as $conversation) {
|
|||||||
url: '../rating/' +<?php echo $tickets->id ?>, // the url where we want to POST
|
url: '../rating/' +<?php echo $tickets->id ?>, // the url where we want to POST
|
||||||
data: formData, // our data object
|
data: formData, // our data object
|
||||||
dataType: 'json', // what type of data do we expect back from the server
|
dataType: 'json', // what type of data do we expect back from the server
|
||||||
success: function() {
|
success: function () {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// using the done promise callback
|
// using the done promise callback
|
||||||
@@ -433,7 +423,7 @@ foreach ($conversations as $conversation) {
|
|||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
});
|
});
|
||||||
// process the form
|
// process the form
|
||||||
$('.foo2').submit(function(event) {
|
$('.foo2').submit(function (event) {
|
||||||
// get the form data
|
// get the form data
|
||||||
// there are many ways to get this data using jQuery (you can use the class or id also)
|
// there are many ways to get this data using jQuery (you can use the class or id also)
|
||||||
var formData = $(this).serialize();
|
var formData = $(this).serialize();
|
||||||
@@ -444,7 +434,7 @@ foreach ($conversations as $conversation) {
|
|||||||
url: '../rating2/' +<?php echo $tickets->id ?>, // the url where we want to POST
|
url: '../rating2/' +<?php echo $tickets->id ?>, // the url where we want to POST
|
||||||
data: formData, // our data object
|
data: formData, // our data object
|
||||||
dataType: 'json', // what type of data do we expect back from the server
|
dataType: 'json', // what type of data do we expect back from the server
|
||||||
success: function() {
|
success: function () {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// using the done promise callback
|
// using the done promise callback
|
||||||
@@ -452,22 +442,22 @@ foreach ($conversations as $conversation) {
|
|||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
$(function() {
|
$(function () {
|
||||||
//Add text editor
|
//Add text editor
|
||||||
$("textarea").wysihtml5();
|
$("textarea").wysihtml5();
|
||||||
});
|
});
|
||||||
|
|
||||||
jQuery(document).ready(function() {
|
jQuery(document).ready(function () {
|
||||||
// Close a ticket
|
// Close a ticket
|
||||||
$('#close').on('click', function(e) {
|
$('#close').on('click', function (e) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "GET",
|
type: "GET",
|
||||||
url: "../ticket/close/{{$tickets->id}}",
|
url: "../ticket/close/{{$tickets->id}}",
|
||||||
beforeSend: function() {
|
beforeSend: function () {
|
||||||
$("#refresh").hide();
|
$("#refresh").hide();
|
||||||
$("#loader").show();
|
$("#loader").show();
|
||||||
},
|
},
|
||||||
success: function(response) {
|
success: function (response) {
|
||||||
$("#refresh").load("../check_ticket/{!! $id !!} #refresh");
|
$("#refresh").load("../check_ticket/{!! $id !!} #refresh");
|
||||||
$("#refresh").show();
|
$("#refresh").show();
|
||||||
$("#loader").hide();
|
$("#loader").hide();
|
||||||
@@ -490,24 +480,24 @@ foreach ($conversations as $conversation) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Resolved a ticket
|
// Resolved a ticket
|
||||||
$('#resolved').on('click', function(e) {
|
$('#resolved').on('click', function (e) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "GET",
|
type: "GET",
|
||||||
url: "../ticket/resolve/{{$tickets->id}}",
|
url: "../ticket/resolve/{{$tickets->id}}",
|
||||||
beforeSend: function() {
|
beforeSend: function () {
|
||||||
$("#refresh").hide();
|
$("#refresh").hide();
|
||||||
$("#loader").show();
|
$("#loader").show();
|
||||||
},
|
},
|
||||||
success: function(response) {
|
success: function (response) {
|
||||||
$("#refresh").load("../check_ticket/{!! $id !!} #refresh");
|
$("#refresh").load("../check_ticket/{!! $id !!} #refresh");
|
||||||
$("#refresh").show();
|
$("#refresh").show();
|
||||||
$("#loader").hide();
|
$("#loader").hide();
|
||||||
var message = "Success! Your Ticket have been Resolved";
|
var message = "Success! Your Ticket have been Resolved";
|
||||||
$("#alert11").show();
|
$("#alert11").show();
|
||||||
$('#message-success1').html(message);
|
$('#message-success1').html(message);
|
||||||
setInterval(function() {
|
setInterval(function () {
|
||||||
$("#alert11").hide();
|
$("#alert11").hide();
|
||||||
setTimeout(function() {
|
setTimeout(function () {
|
||||||
var link = document.querySelector('#load-inbox');
|
var link = document.querySelector('#load-inbox');
|
||||||
if (link) {
|
if (link) {
|
||||||
link.click();
|
link.click();
|
||||||
@@ -520,15 +510,15 @@ foreach ($conversations as $conversation) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Open a ticket
|
// Open a ticket
|
||||||
$('#open').on('click', function(e) {
|
$('#open').on('click', function (e) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "GET",
|
type: "GET",
|
||||||
url: "../ticket/open/{{$tickets->id}}",
|
url: "../ticket/open/{{$tickets->id}}",
|
||||||
beforeSend: function() {
|
beforeSend: function () {
|
||||||
$("#refresh").hide();
|
$("#refresh").hide();
|
||||||
$("#loader").show();
|
$("#loader").show();
|
||||||
},
|
},
|
||||||
success: function(response) {
|
success: function (response) {
|
||||||
$("#refresh").load("../check_ticket/{!! $id !!} #refresh");
|
$("#refresh").load("../check_ticket/{!! $id !!} #refresh");
|
||||||
$("#refresh").show();
|
$("#refresh").show();
|
||||||
$("#loader").hide();
|
$("#loader").hide();
|
||||||
@@ -536,7 +526,7 @@ foreach ($conversations as $conversation) {
|
|||||||
var message = "Success! Your Ticket have been Opened";
|
var message = "Success! Your Ticket have been Opened";
|
||||||
$("#alert11").show();
|
$("#alert11").show();
|
||||||
$('#message-success1').html(message);
|
$('#message-success1').html(message);
|
||||||
setInterval(function() {
|
setInterval(function () {
|
||||||
$("#alert11").hide();
|
$("#alert11").hide();
|
||||||
}, 4000);
|
}, 4000);
|
||||||
}
|
}
|
||||||
|
@@ -74,9 +74,10 @@ class="active"
|
|||||||
$title = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->orderBy('id')->first();
|
$title = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)->orderBy('id')->first();
|
||||||
$string = strip_tags($title->title);
|
$string = strip_tags($title->title);
|
||||||
if (strlen($string) > 40) {
|
if (strlen($string) > 40) {
|
||||||
$stringCut = substr($string, 0, 40);
|
$stringCut = substr($string, 0, 25);
|
||||||
$string = substr($stringCut, 0, strrpos($stringCut, ' ')) . ' ...';
|
$string = $stringCut.'....';
|
||||||
}
|
}
|
||||||
|
// dd($stringCut);
|
||||||
$TicketData = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)
|
$TicketData = App\Model\helpdesk\Ticket\Ticket_Thread::where('ticket_id', '=', $ticket->id)
|
||||||
->where('user_id', '!=' , null)
|
->where('user_id', '!=' , null)
|
||||||
->max('id');
|
->max('id');
|
||||||
|
Reference in New Issue
Block a user