FIX_mentioned Issues

This commit is contained in:
venba-Inspriron-3558 2025-08-26 10:22:57 +05:30
parent 14605542f4
commit deaa6d96e3
2 changed files with 83 additions and 61 deletions

View File

@ -255,7 +255,7 @@ table thead th {
<thead>
<tr>
<th>Ticket No</th>
<th>Name</th>
<th class="app-text-left">Name</th>
<th>Policy Number</th>
<th>Ticket Type</th>
<th>Subject</th>
@ -294,14 +294,14 @@ table thead th {
<td class="app-text-left">
<?php if (!empty($row['created_at'])):
$cdt = new DateTime($row['created_at']);
echo $cdt->format('d/m/Y') . "<br><span class='time'>" . $cdt->format('h:i a') . "</span>";
echo $cdt->format('d/m/Y') . "<br><span class='time'> " . $cdt->format('h:i a') . "</span>";
endif;
?>
</td>
<td class="app-text-left">
<?php if (!empty($row['updated_at'])):
$udt = new DateTime($row['updated_at']);
echo $udt->format('d/m/Y') . "<br><span class='time'>" . $udt->format('h:i a') . "</span>";
echo $udt->format('d/m/Y') . "<br><span class='time'> " . $udt->format('h:i a') . "</span>";
endif;
?>
</td>
@ -436,13 +436,15 @@ table thead th {
<div class="form-group col-md-12 app-font-family">
<label for="subject">Subject<span class="text-danger">*</span></label>
<input type="text" class="form-control" id="subject" name="subject" placeholder="Enter Subject" required>
<input type="text" class="form-control" id="subject" name="subject" placeholder="Enter Subject" required maxlength="150">
<small id="subjectCounter" class="form-text text-muted app-text-right">0/150</small>
</div>
<div class="form-group col-md-12 app-font-family">
<label for="message">Message<span class="text-danger">*</span></label>
<!-- <input type="text" class="form-control" id="message" name="message" placeholder="Enter Message"> -->
<textarea class="form-control" id="message" name="message" placeholder="Enter Message" rows="4" required></textarea>
<textarea class="form-control" id="message" name="message" placeholder="Enter Message" rows="4" required maxlength="1500"></textarea>
<small id="messageCounter" class="form-text text-muted text-end app-text-right">0/1500</small>
</div>
</div>
@ -725,19 +727,21 @@ $(document).ready(function() {
text: '<span class="app-text-white"> Export </span><i class="mdi mdi-menu-down app-text-white"></i>',
className: 'btn app-btn-secondary app-btn-border-radius app-text-white',
buttons: [
{
extend: 'csv',
text: 'CSV',
title: 'ticket-List'
},
{
extend: 'excel',
text: ' Excel',
title: 'ticket-List',
exportOptions: {
orthogonal: 'sort'
}
}
{
extend: 'csv',
text: '<i class="mdi mdi-file-delimited app-text-white" ></i><span class="app-text-white"> CSV </span>',
title: 'Tickets',
className: 'app-btn-primary app-text-white',
},
{
extend: 'excel',
text: '<i class="mdi mdi-file-excel app-text-white" ></i><span class="app-text-white"> EXCEL </span>',
title: 'Tickets',
exportOptions: {
orthogonal: 'sort'
},
className: 'app-btn-primary app-text-white',
}
]
}
],
@ -757,6 +761,39 @@ $(document).ready(function() {
} else {
console.error("Table Not found.");
}
const subjectInput = document.getElementById("subject");
const subjectCounter = document.getElementById("subjectCounter");
subjectInput.addEventListener("input", function () {
const subjectLength = subjectInput.value.length;
subjectCounter.textContent = `${subjectLength}/150`;
if (subjectLength > 150) {
toastr.error('Subject cannot exceed 150 characters', 'Warning');
subjectInput.classList.add('is-invalid');
} else {
subjectInput.classList.remove('is-invalid');
}
});
const messageInput = document.getElementById("message");
const messageCounter = document.getElementById("messageCounter");
messageInput.addEventListener("input", function () {
const messageLength = messageInput.value.length;
messageCounter.textContent = `${messageLength}/1500`;
if (messageLength > 1500) {
toastr.error('Message cannot exceed 1500 characters', 'Warning');
messageInput.classList.add('is-invalid');
} else {
messageInput.classList.remove('is-invalid');
}
});
});
function viewTicket(ticket_id){

View File

@ -157,7 +157,7 @@ hr{
<div class="row" id="notes-body">
<!-- Left Details -->
<div class="col-4" id="notes-body-left">
<div class="col-5" id="notes-body-left">
<div class="card master-card" style="background:#F5FFFF;">
<div class="card-header d-flex justify-content-between align-items-center" style="background:none; border:none;">
<p class="sub-title-text app-font-family mb-0">Details</p>
@ -173,20 +173,20 @@ hr{
</div>
<div class="card-body card-scroll sub-title-text app-font-family" style="padding:0 27px !important; background:#F5FFFF;">
<div class="row mb-2 ml-o">
<div class="col-5 app-subtitle app-text-grey app-font-family">Ticket ID</div>
<div class="col-7 app-text app-text-black text-end app-font-family"><?= $master[0]['thz_id'];?></div>
<div class="col-4 app-subtitle app-text-grey app-font-family">Ticket ID</div>
<div class="col-8 app-text app-text-black text-end app-font-family" style="font-weight: 500 !important;"><?= $master[0]['thz_id'];?></div>
</div>
<div class="row mb-2">
<div class="col-5 app-subtitle app-text-grey app-font-family">Name</div>
<div class="col-7 app-text app-text-black text-end app-font-family"><?= $master[0]['name'];?></div>
<div class="col-4 app-subtitle app-text-grey app-font-family">Name</div>
<div class="col-8 app-text app-text-black text-end app-font-family" style="font-weight: 500 !important;"><?= $master[0]['name'];?></div>
</div>
<div class="row mb-2">
<div class="col-5 app-subtitle app-text-grey app-font-family">Mobile</div>
<div class="col-7 app-text app-text-black text-end app-font-family"><?= $master[0]['mobile'];?></div>
<div class="col-4 app-subtitle app-text-grey app-font-family">Mobile</div>
<div class="col-8 app-text app-text-black text-end app-font-family" style="font-weight: 500 !important;"><?= $master[0]['mobile'];?></div>
</div>
<div class="row mb-2">
<div class="col-5 app-subtitle app-text-grey app-font-family">Policy Number</div>
<div class="col-7 app-text text-end app-font-family">
<div class="col-4 app-subtitle app-text-grey app-font-family">Policy Number</div>
<div class="col-8 app-text text-end app-font-family" style="font-weight: 500 !important;">
<?= (!empty($master[0]['policy_no']) && strtolower($master[0]['policy_no']) !== 'null')
? '<u class="app-text-black">
<a href="javascript:void(0);"
@ -202,28 +202,28 @@ hr{
</div>
</div>
<div class="row mb-2">
<div class="col-5 app-subtitle app-text-grey app-font-family">Assigned To</div>
<div class="col-7 app-text app-text-black text-end app-font-family"><?= $master[0]['assignee_name'];?></div>
<div class="col-4 app-subtitle app-text-grey app-font-family">Assigned To</div>
<div class="col-8 app-text app-text-black text-end app-font-family" style="font-weight: 500 !important;"><?= $master[0]['assignee_name'];?></div>
</div>
<div class="row mb-2">
<div class="col-5 app-subtitle app-text-grey app-font-family">Status</div>
<div class="col-7 app-text app-text-black text-end app-font-family"><?= $master[0]['status'];?></div>
<div class="col-4 app-subtitle app-text-grey app-font-family">Status</div>
<div class="col-8 app-text app-text-black text-end app-font-family" style="font-weight: 500 !important;"><?= $master[0]['status'];?></div>
</div>
<div class="row mb-2">
<div class="col-5 app-subtitle app-text-grey app-font-family">Ticket Type</div>
<div class="col-7 app-text app-text-black text-end app-font-family"><?= $master[0]['ticket_type'];?></div>
<div class="col-4 app-subtitle app-text-grey app-font-family">Ticket Type</div>
<div class="col-8 app-text app-text-black text-end app-font-family" style="font-weight: 500 !important;"><?= $master[0]['ticket_type'];?></div>
</div>
<div class="row mb-2">
<div class="col-5 app-subtitle app-text-grey app-font-family">Subject</div>
<div class="col-7 app-text app-text-black text-end app-font-family"><?= $master[0]['subject'];?></div>
<div class="col-4 app-subtitle app-text-grey app-font-family">Subject</div>
<div class="col-8 app-text app-text-black text-end app-font-family" style="font-weight: 500 !important; text-align: justify;"><?= $master[0]['subject'];?></div>
</div>
<div class="row mb-2">
<div class="col-5 app-subtitle app-text-grey app-font-family">Message</div>
<div class="col-7 app-text app-text-black text-end app-font-family"><?= $master[0]['message'];?></div>
<div class="col-4 app-subtitle app-text-grey app-font-family">Message</div>
<div class="col-8 app-text app-text-black text-end app-font-family" style="font-weight: 500 !important; text-align: justify;"><?= $master[0]['message'];?></div>
</div>
<div class="row mb-2">
<div class="col-5 app-subtitle app-text-grey app-font-family">Related Tickets</div>
<div class="col-7 app-text text-end app-font-family">
<div class="col-4 app-subtitle app-text-grey app-font-family">Related Tickets</div>
<div class="col-8 app-text text-end app-font-family" style="font-weight: 500 !important;">
<u class="text-warning">
<a href="javascript:void(0);"
class="text-warning"
@ -244,7 +244,7 @@ hr{
<!-- Right Conversation -->
<div class="col-8">
<div class="col-7">
<!-- Conversation Card -->
<div class="card mb-3 conversation-card">
@ -259,7 +259,7 @@ hr{
<hr/>
<!-- Top Row: Message + Badge -->
<div class="d-flex justify-content-between align-items-start app-text app-text-black app-font-family">
<p class="mb-1 ml-0 mr-0 app-font-family"><?= $conv['notes'] ?></p>
<p class="mb-1 ml-0 mr-0 app-font-family" style="font-weight: 400 !important;"><?= $conv['notes'] ?></p>
<!-- <?php if(!empty($conv['notes_by'])): ?>
<span class="badge bg-warning text-dark"><?= $conv['notes_by'] ?></span>
<?php endif; ?> -->
@ -270,8 +270,8 @@ hr{
<!-- Bottom Row: Name + Date -->
<div class="d-flex justify-content-between small text-muted" style="padding-top: 5px;">
<span class="app-font-family"><i class="mdi mdi-account"></i> <?= $conv['name'] ?></span>
<span style="font-size:9px; app-font-family"><?= date("j F Y h:i a", strtotime($conv['created_at'])) ?></span>
<span class="app-font-family" style="font-weight: 400 !important;"><i class="mdi mdi-account"></i> <?= $conv['name'] ?></span>
<span style="font-size:9px; font-weight: 400 !important;" class="app-font-family"><?= date("j F Y h:i a", strtotime($conv['created_at'])) ?></span>
</div>
<!-- <?php echo $i < count($notes)-1 ? '<hr/>' : ''; ?> -->
@ -388,9 +388,9 @@ hr{
<?php if(!empty($related_tickets)): foreach($related_tickets as $j => $rt): ?>
<div class="card related-ticket-card app-font-family app-text"
style="cursor: pointer;"
onclick="window.location='<?= base_url().'ticketConversationList?return_type=web&thz_id='.$rt['thz_id'] ?>'">
<div class="card-body">
style="cursor: pointer;"
onclick="window.location='<?= base_url().'/ticketConversationList?return_type=web&thz_id='.$rt['thz_id']; ?>'">
<div class="card-body">
<div class="d-flex justify-content-between align-items-center" style="margin-bottom: 10px !important;">
<h5 class="app-font-family app-text"><?php echo '# '.$rt['thz_id']." / ".$rt['ticket_type']; ?></h5>
<small classs="app-font-family" style="font-size:7px;">
@ -549,19 +549,4 @@ hr{
}
});
}
</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>