BUG_fix in ticket
This commit is contained in:
parent
5f95fa8399
commit
659b6fd122
@ -181,7 +181,7 @@ class ThzController extends BaseController
|
|||||||
->findAll();
|
->findAll();
|
||||||
|
|
||||||
if(!empty($result['master'])){
|
if(!empty($result['master'])){
|
||||||
$notes = $this->thzMasterNotesModel->ticketConversationList($thz_id, $ticketType );
|
$notes = $this->thzMasterNotesModel->ticketConversationList($thz_id, $returnType );
|
||||||
$result['notes'] = !empty($notes) ? $notes : [];
|
$result['notes'] = !empty($notes) ? $notes : [];
|
||||||
}else{
|
}else{
|
||||||
return $this->response->setJSON((['status' => 'error', 'message' => 'No tickets found']))->setStatusCode(400);
|
return $this->response->setJSON((['status' => 'error', 'message' => 'No tickets found']))->setStatusCode(400);
|
||||||
|
|||||||
@ -76,16 +76,13 @@ class ThzMasterNotesModel extends Model
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function ticketConversationList($thz_id , $ticketType)
|
public function ticketConversationList($thz_id , $returnType)
|
||||||
{
|
{
|
||||||
$ticketTypeFilter = "";
|
$ticketTypeFilter = "";
|
||||||
|
|
||||||
if ($ticketType == 'External') {
|
if ($returnType == 'api') {
|
||||||
//user only see his message
|
//user only see his message
|
||||||
$ticketTypeFilter = "AND thz_master_notes.notes_type = 'External' ";
|
$ticketTypeFilter = "AND thz_master_notes.notes_type = 'External' ";
|
||||||
} elseif ($ticketType == 'Internal') {
|
|
||||||
// internal team needs to see both the tickets
|
|
||||||
$ticketTypeFilter = "AND ( thz_master_notes.notes_type = 'External' OR thz_master_notes.notes_type = 'Internal' ) ";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$integer_ticket_id = (int)$thz_id;
|
$integer_ticket_id = (int)$thz_id;
|
||||||
|
|||||||
@ -601,7 +601,7 @@ function viewTicket(ticket_id){
|
|||||||
// $('.loader').fadeIn();
|
// $('.loader').fadeIn();
|
||||||
// $('.loader-mask').fadeIn();
|
// $('.loader-mask').fadeIn();
|
||||||
|
|
||||||
let url = '<?= base_url('ticketConversationList?return_type=web¬es_ticket_type=Internal&thz_id='); ?>' + ticket_id;
|
let url = '<?= base_url('ticketConversationList?return_type=web&thz_id='); ?>' + ticket_id;
|
||||||
window.location.href = url;
|
window.location.href = url;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -175,8 +175,11 @@
|
|||||||
<!-- Top Row: Message + Badge -->
|
<!-- Top Row: Message + Badge -->
|
||||||
<div class="d-flex justify-content-between align-items-start">
|
<div class="d-flex justify-content-between align-items-start">
|
||||||
<p class="mb-1 mr-4"><?= $conv['notes'] ?></p>
|
<p class="mb-1 mr-4"><?= $conv['notes'] ?></p>
|
||||||
<?php if(!empty($conv['notes_by'])): ?>
|
<!-- <?php if(!empty($conv['notes_by'])): ?>
|
||||||
<span class="badge bg-warning text-dark"><?= $conv['notes_by'] ?></span>
|
<span class="badge bg-warning text-dark"><?= $conv['notes_by'] ?></span>
|
||||||
|
<?php endif; ?> -->
|
||||||
|
<?php if (!empty($conv['notes_type']) && $conv['notes_type'] === "Internal"): ?>
|
||||||
|
<span class="badge bg-warning text-dark"><?= $conv['notes_type'] ?></span>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -368,7 +371,7 @@
|
|||||||
toastr.success(response.message, 'success');
|
toastr.success(response.message, 'success');
|
||||||
$('#ticketModal').modal('hide');
|
$('#ticketModal').modal('hide');
|
||||||
form.reset();
|
form.reset();
|
||||||
window.location.href = "<?= base_url('ticketConversationList?return_type=web¬es_ticket_type=Internal&thz_id=') ?>" + id;
|
window.location.href = "<?= base_url('ticketConversationList?return_type=web&thz_id=') ?>" + id;
|
||||||
} else {
|
} else {
|
||||||
toastr.error(response.message, 'error');
|
toastr.error(response.message, 'error');
|
||||||
}
|
}
|
||||||
@ -400,7 +403,7 @@
|
|||||||
if (response.status === "success") {
|
if (response.status === "success") {
|
||||||
toastr.success(response.message, 'success');
|
toastr.success(response.message, 'success');
|
||||||
form.reset();
|
form.reset();
|
||||||
window.location.href = "<?= base_url('ticketConversationList?return_type=web¬es_ticket_type=Internal&thz_id=') ?>" + id;
|
window.location.href = "<?= base_url('ticketConversationList?return_type=web&thz_id=') ?>" + id;
|
||||||
} else {
|
} else {
|
||||||
toastr.error(response.message, 'error');
|
toastr.error(response.message, 'error');
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user