Fixed change status in new inbox route

This commit is contained in:
Manish Verma
2018-08-14 17:12:08 +05:30
parent 9b3a1287b6
commit a6c6782468
4 changed files with 32 additions and 14 deletions

View File

@@ -190,7 +190,8 @@ class Finder
*/
public static function getCustomedStatus()
{
$status = Ticket_Status::select('id', 'name', 'icon_class')->get();
$status = Ticket_Status::select('id', 'name', 'icon_class')
->whereIn('id', [1,2,3,5])->get();
return $status;
}

View File

@@ -1727,6 +1727,8 @@ class TicketController extends Controller
$this->delete($delete, new Tickets());
} elseif ($value == 'Close') {
$this->close($delete, new Tickets());
} elseif ($value == 'Resolve') {
$this->resolve($delete, new Tickets());
} elseif ($value == 'Open') {
$this->open($delete, new Tickets());
} elseif ($value == 'Delete forever') {

View File

@@ -1607,6 +1607,11 @@ return [
'set_as_sys_lang' => 'Make default',
'filtered-results' => 'Filtered results',
'methon_not_allowed' => 'Method not allowed',
'confirm-to-proceed' => 'Are you sure?',
'change-ticket-status-to' => 'Change status of tickets to ',
'your-ticket-status-changed' => 'Your ticket\'s status has been changed.',
'reload-be-patient-message' => 'Please be patient we are reloading the page.',
'status-changed-successfully' => 'Status changed successfully.',
'system-outgoing-incoming-mail-not-configured' => 'You have not configured system mail. Faveo can\'t fetch tickets from mail or send mail to users without it.',
'confihure-the-mail-now' => 'Click here to configure the mail.',
'system-mail-not-configured-agent-message' => 'System incoming and outgoing email settings are not configured. Please contct your system\'s admin and report the problem.',

View File

@@ -64,13 +64,16 @@ var filterClick = 0;
$("#myModal").css("display", "none");
} else {
$("#myModal").css("display", "none");
if (c_status != 'hard-delete'){
var url = '{{url("ticket/change-status/")}}/' + values + '/' + c_status;
if (c_status != 'hard-delete') {
var url = '{{url("select_all")}}/';
$.ajax({
type: "GET",
url: url,
type: "POST",
url: "{{url('select_all')}}",
dataType: "html",
data: $(this).serialize(),
data: {
"submit": c_status,
"select_all": values
},
beforeSend: function() {
$('.loader1').css('display','block');
$('.loader').css('display','block');
@@ -122,17 +125,24 @@ var filterClick = 0;
function changeStatus(id, name) {
$('#myModalLabel').html('{{Lang::get("lang.change-ticket-status-to")}}' + name);
var msg = "{{Lang::get('lang.confirm-to-proceed')}}";
var values = getValues();
if (values == "") {
msg = "{{Lang::get('lang.select-ticket')}}";
var values = getValues();
if (values == "") {
msg = "{{Lang::get('lang.select-ticket')}}";
$('.yes').html("{{Lang::get('lang.ok')}}");
$('#myModalLabel').html("{{Lang::get('lang.alert')}}");
} else {
c_status = id;
} else {
c_status = "Open";
if(id == 2){
c_status = "Resolve";
} else if (id == 3) {
c_status = "Close";
} else if(id == 5) {
c_status = "Delete";
}
$('.yes').html("Yes");
}
$('#custom-alert-body').html(msg);
$("#myModal").css("display", "block");
}
$('#custom-alert-body').html(msg);
$("#myModal").css("display", "block");
}
$('#modalpopup').on('submit', function(e){