Fix update due date link, manager check, change due date btn visibility
This commit is contained in:
parent
83e2ec500a
commit
bc6299e5cf
@ -757,9 +757,11 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php');
|
||||
?>
|
||||
</span>
|
||||
</b><br>
|
||||
<?php if ($can_edit): ?>
|
||||
<button class="btn btn-default btn-sm" id="change-button">
|
||||
<?php echo $hesklang['chg']; ?>
|
||||
</button>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div id="editable-due-date" style="display: none">
|
||||
<span class="form-group">
|
||||
|
@ -36,9 +36,9 @@ class UserToTicketChecker extends \BaseClass {
|
||||
return false;
|
||||
}
|
||||
|
||||
$categoryManagerId = $this->userGateway->getManagerForCategory($ticket->categoryId, $heskSettings);
|
||||
$categoryManager = $this->userGateway->getManagerForCategory($ticket->categoryId, $heskSettings);
|
||||
|
||||
if ($user->id === $categoryManagerId) {
|
||||
if ($categoryManager !== null && $user->id === $categoryManager->id) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,7 @@ class Ticket extends \BaseClass {
|
||||
$ticket->numberOfReplies = intval($row['replies']);
|
||||
$ticket->numberOfStaffReplies = intval($row['staffreplies']);
|
||||
$ticket->ownerId = intval($row['owner']);
|
||||
$ticket->assignedBy = $row['assigned_by'] === null ? null : intval($row['assigned_by']);
|
||||
$ticket->assignedBy = $row['assignedby'] === null ? null : intval($row['assignedby']);
|
||||
$ticket->timeWorked = $row['time_worked'];
|
||||
$ticket->lastReplyBy = intval($row['lastreplier']);
|
||||
$ticket->lastReplier = $row['replierid'] === null ? null : intval($row['replierid']);
|
||||
|
@ -23,7 +23,7 @@ $(document).ready(function() {
|
||||
var ticketId = $('input[type="hidden"][name="orig_id"]').val();
|
||||
$.ajax({
|
||||
method: 'POST',
|
||||
url: heskPath + 'api/v1/staff/tickets/' + ticketId + '/due-date',
|
||||
url: heskPath + 'api/index.php/v1/staff/tickets/' + ticketId + '/due-date',
|
||||
headers: {
|
||||
'X-Internal-Call': true,
|
||||
'X-HTTP-Method-Override': 'PATCH'
|
||||
|
Loading…
x
Reference in New Issue
Block a user