CHANGE_UI_FIX - VADIVEL J 2025-08-22
This commit is contained in:
parent
99987910e9
commit
11f5f0be3e
@ -196,19 +196,28 @@ class ThzController extends BaseController
|
||||
if ($returnType === 'api') {
|
||||
return $this->response->setJSON((['status' => 'success', 'data' => $result]))->setStatusCode(200);
|
||||
}else{
|
||||
$toGetCreatedBy = $result['master'][0]['created_by'];
|
||||
|
||||
$assign_to = $result['master'][0]['assign_to'];
|
||||
$mobile = $result['master'][0]['mobile'];
|
||||
|
||||
$toGetPolicyId = (!empty($result['master'][0]['policy_id']) && strtolower($result['master'][0]['policy_id']) !== 'null')
|
||||
? $result['master'][0]['policy_id']
|
||||
: '';
|
||||
|
||||
$result['related_tickets'] = $this->thzMasterModel
|
||||
->select('thz_master.*, CONCAT(user_profiles.first_name, " ", user_profiles.last_name) as assignee_name')
|
||||
->join('user_profiles', 'user_profiles.id = thz_master.assign_to', 'left')
|
||||
->where('thz_master.created_by', $toGetCreatedBy)
|
||||
->findAll();
|
||||
->select('thz_master.*, CONCAT(user_profiles.first_name, " ", user_profiles.last_name) as assignee_name')
|
||||
->join('user_profiles', 'user_profiles.id = thz_master.assign_to', 'left')
|
||||
->where('thz_master.assign_to', $assign_to)
|
||||
->where('thz_master.mobile',$mobile)
|
||||
->where('thz_master.thz_id !=',$thz_id)
|
||||
->where('thz_master.status !=','Closed')
|
||||
->where('thz_master.status !=','Resolved')
|
||||
->findAll();
|
||||
|
||||
$result['assignee'] = $this->userModel->where('is_active', 1)->whereIn('role', ['2', '3','4'])->findAll(); // enga 5-"head" and 1-"admin" assign pannvaga so dropdown la varakudhathu
|
||||
// 2,3,4 remain person varannum.
|
||||
$result['policy_terms'] = $toGetPolicyId ? $this->getPolicyTerms($toGetPolicyId) : '';
|
||||
$result['policy_terms'] = $toGetPolicyId ? $this->getPolicyTerms($toGetPolicyId) : '';
|
||||
|
||||
return $this->loadLayout('thz_notes', $result);
|
||||
}
|
||||
|
||||
|
||||
@ -327,9 +327,17 @@
|
||||
</div>
|
||||
|
||||
<div class="modal-body card-scroll" style="padding-top:5px!important;">
|
||||
|
||||
<?php if( !isset($related_tickets) || empty($related_tickets) ) { ?>
|
||||
<div class="d-flex justify-content-center align-items-center">
|
||||
<div>
|
||||
<p> No Related Tickets Found </p>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php foreach($related_tickets as $j => $rt): ?>
|
||||
<div class="card related-ticket-card mb-3">
|
||||
<div class="card related-ticket-card mb-3" data-related-ticket-id="<?=$rt['thz_id']?>">
|
||||
<div class="card-body" style="border-radius: 20px; padding:27px !important;">
|
||||
<div class="d-flex justify-content-between align-items-start">
|
||||
<h5 class="mb-1"><?php echo '# '.$rt['thz_id']." / ".$rt['ticket_type']; ?></h5>
|
||||
@ -468,4 +476,19 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
// attach click event to the div
|
||||
$(document).on('click', '.related-ticket-card', function(){
|
||||
|
||||
let relatedId = $(this).data('related-ticket-id');
|
||||
console.log("Related Ticket ID:", relatedId);
|
||||
|
||||
window.open("<?php echo base_url('/ticketConversationList?return_type=web&thz_id=')?>"+relatedId,"_blank");
|
||||
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
Loading…
Reference in New Issue
Block a user