bug-fix-patch

This commit is contained in:
Manish Verma
2016-12-15 20:56:40 +05:30
parent 70d1b1fe12
commit 1fb18523b0
9 changed files with 27 additions and 10 deletions

View File

@@ -143,15 +143,16 @@ class AgentLayout
public function inbox()
{
$ticket = $this->tickets();
if ($this->auth->role == 'admin') {
return $ticket->whereIn('status', [1, 7])->select('id');
} elseif ($this->auth->role == 'agent') {
return $ticket->whereIn('status', [1, 7])
->where('dept_id', '=', $this->auth->primary_dpt)
->orWhere('assigned_to', '=', Auth::user()->id)
->select('id');
$table = $this->tickets();
if (Auth::user()->role == 'agent') {
$id = Auth::user()->primary_dpt;
$table = $table->where('tickets.dept_id', '=', $id)->orWhere('assigned_to', '=', Auth::user()->id);
}
return $table->Join('ticket_status', function ($join) {
$join->on('ticket_status.id', '=', 'tickets.status')
->whereIn('ticket_status.id', [1, 7]);
});
}
public function overdues()

View File

@@ -1144,5 +1144,6 @@ return [
'user-account-is-deleted' => 'This user account has been deleted.',
'restore-user' => 'Restore user account',
'delete-account-caution-info' => 'Please note this account may still have open tickets in the system.',
'reply-can-not-be-empty' => 'Reply can not be blank. Please enter your reply.',
];

View File

@@ -1581,5 +1581,6 @@ return [
'user-account-is-deleted' => 'This user account has been deleted.',
'restore-user' => 'Restore user account',
'delete-account-caution-info' => 'Please note this account may still have open tickets in the system.',
'reply-can-not-be-empty' => 'Reply can not be blank. Please enter your reply.',
];

View File

@@ -1552,5 +1552,6 @@ return [
'user-account-is-deleted' => 'This user account has been deleted.',
'restore-user' => 'Restore user account',
'delete-account-caution-info' => 'Please note this account may still have open tickets in the system.',
'reply-can-not-be-empty' => 'Reply can not be blank. Please enter your reply.',
];

View File

@@ -1104,4 +1104,5 @@ return [
'user-account-is-deleted' => 'This user account has been deleted.',
'restore-user' => 'Restore user account',
'delete-account-caution-info' => 'Please note this account may still have open tickets in the system.',
'reply-can-not-be-empty' => 'Reply can not be blank. Please enter your reply.',
];

View File

@@ -1597,5 +1597,6 @@ return [
'user-account-is-deleted' => 'This user account has been deleted.',
'restore-user' => 'Restore user account',
'delete-account-caution-info' => 'Please note this account may still have open tickets in the system.',
'reply-can-not-be-empty' => 'Reply can not be blank. Please enter your reply.',
];

View File

@@ -1542,5 +1542,6 @@ return [
'user-account-is-deleted' => 'This user account has been deleted.',
'restore-user' => 'Restore user account',
'delete-account-caution-info' => 'Please note this account may still have open tickets in the system.',
'reply-can-not-be-empty' => 'Reply can not be blank. Please enter your reply.',
];

View File

@@ -1051,4 +1051,5 @@ return [
'user-account-is-deleted' => 'This user account has been deleted.',
'restore-user' => 'Restore user account',
'delete-account-caution-info' => 'Please note this account may still have open tickets in the system.',
'reply-can-not-be-empty' => 'Reply can not be blank. Please enter your reply.',
];

View File

@@ -364,18 +364,27 @@ alert(h+20);
<div class="form-group">
<div class="col-md-12">
<div class="form-group ">
<textarea class="form-control" name="comment" cols="30" rows="8"></textarea>
<textarea class="form-control" id="reply-input" name="comment" cols="30" rows="8"></textarea>
</div>
</div>
</div>
</div>
<div class="text-right">
<button type="submit" class="btn btn-custom btn-lg">{!! Lang::get('lang.post_comment') !!}</button>
<button type="submit" onClick="return checkFunction();" class="btn btn-custom btn-lg">{!! Lang::get('lang.post_comment') !!}</button>
</div>
{!! Form::close() !!}
</div>
<script type="text/javascript">
function checkFunction() {
var x;
x = document.getElementById("reply-input").value;
if (x == "") {
alert("{{Lang::get('lang.reply-can-not-be-empty')}}");
return false;
};
}
$("#cc_page").on('click', '.search_r', function () {
var search_r = $('a', this).attr('id');
$.ajax({