CHANGE_thz as per another module
This commit is contained in:
parent
30f1c939c2
commit
f25ce7e51f
@ -137,8 +137,6 @@ class ThzController extends BaseController
|
||||
public function ticketList()
|
||||
{
|
||||
|
||||
$data['tab_name'] = "Tickets";
|
||||
$data['page_name'] = "Tickets";
|
||||
try {
|
||||
$returnType = strtolower($this->request->getGet('return_type') ?? 'api');
|
||||
|
||||
@ -166,7 +164,8 @@ class ThzController extends BaseController
|
||||
// 3,4 remain person varannum.
|
||||
$data['client_list'] = $this->clientModel->getCreatedByUserName();
|
||||
$data['ticket_type'] = $this->thzTypeModel->where('is_active', 1)->findAll();
|
||||
|
||||
$data['tab_name'] = "Tickets";
|
||||
$data['page_name'] = "Tickets";
|
||||
return $this->loadLayout('thz_list', $data);
|
||||
}
|
||||
|
||||
@ -361,6 +360,9 @@ class ThzController extends BaseController
|
||||
$result['policy_terms'] = $toGetPolicyId ? $this->getPolicyTerms($toGetPolicyId) : '';
|
||||
|
||||
$result['ticket_type'] = $this->thzTypeModel->where('is_active', 1)->findAll();
|
||||
|
||||
$result['tab_name'] = "Tickets";
|
||||
$result['page_name'] = "Tickets";
|
||||
|
||||
return $this->loadLayout('thz_notes', $result);
|
||||
}
|
||||
|
||||
@ -445,23 +445,16 @@
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
|
||||
.title-text {
|
||||
font-weight: 500;
|
||||
font-style: normal;
|
||||
font-size: 30px;
|
||||
line-height: 1;
|
||||
letter-spacing: 0;
|
||||
color: black;
|
||||
.secondary-title {
|
||||
margin-left: 26px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.sub-title-text {
|
||||
font-weight: 500;
|
||||
font-style: normal;
|
||||
font-size: 18px;
|
||||
line-height: 1;
|
||||
letter-spacing: 0;
|
||||
color: black;
|
||||
.secondary-title i {
|
||||
font-size: 43px;
|
||||
}
|
||||
.secondary-title span {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.font-color-black {
|
||||
|
||||
@ -16,11 +16,6 @@ table.dataTable tbody td {
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.highlight {
|
||||
border: 2px solid red;
|
||||
background-color: #ffe6e6;
|
||||
}
|
||||
|
||||
.column-header {
|
||||
margin-right: 10px;
|
||||
}
|
||||
@ -31,8 +26,6 @@ table.dataTable tbody td {
|
||||
padding: 0.5rem 1rem;
|
||||
}
|
||||
|
||||
/* Modeal class */
|
||||
|
||||
</style>
|
||||
|
||||
<style>
|
||||
@ -44,8 +37,6 @@ table.dataTable tbody td {
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
<div class="row" id="ticket_list">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
@ -85,8 +76,8 @@ table.dataTable tbody td {
|
||||
<td class="text-center wrap" title="<?php echo htmlspecialchars($row['subject']); ?>">
|
||||
<?php
|
||||
$subject = $row['subject'] ? $row['subject'] : 'N/A';
|
||||
echo (strlen($subject) > 50)
|
||||
? htmlspecialchars(substr($subject, 0, 50)) . "..."
|
||||
echo (strlen($subject) > 18)
|
||||
? htmlspecialchars(substr($subject, 0, 18)) . "..."
|
||||
: htmlspecialchars($subject);
|
||||
?>
|
||||
</td>
|
||||
@ -350,17 +341,6 @@ table.dataTable tbody td {
|
||||
text: '<i class="mdi mdi-file-delimited " ></i><span class=" btn-custom"> CSV </span>',
|
||||
className: 'app-btn-primary ',
|
||||
title: 'Tickets',
|
||||
exportOptions: {
|
||||
format: {
|
||||
body: function (data, row, column, node) {
|
||||
// Replace <br> with a space
|
||||
data = data.replace(/<br\s*\/?>/gi, " ");
|
||||
// Remove any other HTML tags
|
||||
data = data.replace(/<[^>]*>?/gm, "");
|
||||
return data.trim();
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
extend: 'excel',
|
||||
@ -428,10 +408,10 @@ table.dataTable tbody td {
|
||||
var ticketType = document.getElementById('ticket_type').value.trim();
|
||||
|
||||
// Validation checks
|
||||
if (name === "" || mobile === "" || email === "" || ticketType === "") {
|
||||
toastr.warning('Please fill all required fields.', 'Warning');
|
||||
form.classList.add('was-validated');
|
||||
return;
|
||||
if (message.length === 0) {
|
||||
toastr.error('Message cannot be empty', 'Warning');
|
||||
form.classList.add('was-validated');
|
||||
return;
|
||||
}
|
||||
|
||||
if (message.length > 1500) {
|
||||
@ -440,6 +420,12 @@ table.dataTable tbody td {
|
||||
return;
|
||||
}
|
||||
|
||||
if (subject.length === 0) {
|
||||
toastr.error('Subject cannot be empty', 'Warning');
|
||||
form.classList.add('was-validated');
|
||||
return;
|
||||
}
|
||||
|
||||
if (subject.length > 150) {
|
||||
toastr.error('Subject cannot exceed 150 characters', 'Warning');
|
||||
form.classList.add('was-validated');
|
||||
@ -460,6 +446,12 @@ table.dataTable tbody td {
|
||||
return;
|
||||
}
|
||||
|
||||
if (name === "" || mobile === "" || email === "" || ticketType === "" || subject === "" || message === "") {
|
||||
toastr.warning('Please fill all required fields.', 'Warning');
|
||||
form.classList.add('was-validated');
|
||||
return;
|
||||
}
|
||||
|
||||
var form = document.getElementById("ticketForm"); // your form ID
|
||||
var formData = new FormData(form);
|
||||
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
<style>
|
||||
|
||||
.notes-box {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@ -15,13 +14,12 @@
|
||||
resize: none;
|
||||
padding: 8px;
|
||||
font-size: 14px;
|
||||
background-color: transparent !important;
|
||||
border-radius: 0px !important;
|
||||
box-shadow: 0px 0px 0px 0px transparent !important;
|
||||
border-color: transparent !important;
|
||||
}
|
||||
textarea {
|
||||
background-color: white !important;
|
||||
border-radius: 0px !important;
|
||||
box-shadow: 0px 0px 0px 0px white !important;
|
||||
border-color: white !important;
|
||||
}
|
||||
|
||||
.icon-buttons {
|
||||
display: flex;
|
||||
gap: 6px;
|
||||
@ -77,10 +75,12 @@ textarea {
|
||||
.conversation-card,
|
||||
.conversation-card .card-header,
|
||||
.conversation-card .card-body {
|
||||
|
||||
background: #F5FFFF !important;
|
||||
}
|
||||
|
||||
.conversation-card{
|
||||
box-shadow: 0 2px 4px 0 #00000040;
|
||||
border-radius : 15px !important;
|
||||
}
|
||||
.master-card{
|
||||
border-radius: 15px !important;
|
||||
box-shadow: 0 2px 4px 0 #00000040;
|
||||
@ -134,146 +134,134 @@ hr{
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="row" id="notespage">
|
||||
|
||||
<h3 class="secondary-title">
|
||||
<a href="#" onclick="history.back(); return false;">
|
||||
<i class="mdi mdi-chevron-left" title="Back"></i>
|
||||
</a>
|
||||
<span>Ticket ID - <?= $master[0]['thz_id']; ?></span>
|
||||
</h3>
|
||||
|
||||
<div class="col-12">
|
||||
<div class="card ">
|
||||
<div class="card-body maincard">
|
||||
|
||||
<!-- Title -->
|
||||
<div class="row" id="notes-title" style="padding-bottom: 10px;">
|
||||
<!-- <div class="col-6" style="align-self: center;">
|
||||
<h4 style="position: relative;"><span onclick="history.back()"><i class="mdi mdi-chevron-left" style="font-size: 24px;"></i></span> Ticket ID-<?php echo $master[0]['thz_id']; ?></h4>
|
||||
</div> -->
|
||||
<h4 class="d-flex align-items-center" style="gap: 8px;">
|
||||
<span onclick="history.back()" style="cursor: pointer;">
|
||||
<i class="mdi mdi-chevron-left" style="font-size: 43px;"></i>
|
||||
</span>
|
||||
<span class="title-text ">Ticket ID-<?= $master[0]['thz_id']; ?></span>
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
<!-- Body -->
|
||||
<div class="row" id="notes-body">
|
||||
|
||||
<!-- Left Details -->
|
||||
<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 mb-0">Details</p>
|
||||
<?php if($master[0]['status'] !== "Closed") : ?>
|
||||
<a href="javascript:void(0);" onclick="openEditTicket()">
|
||||
<i class="mdi mdi-pencil edit-icon" title="Edit"></i>
|
||||
<!-- <i class="mdi mdi-pencil"
|
||||
title="Edit"
|
||||
style="font-size:15px; color:#555; cursor:pointer; transition:0.2s;"
|
||||
onmouseover="this.style.color='#02a8b5'; this.style.fontSize='17px';"
|
||||
onmouseout="this.style.color='#555'; this.style.fontSize='15px';">
|
||||
</i> -->
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="card-body card-scroll sub-title-text " style="padding:0 27px !important; background:#F5FFFF;">
|
||||
<div class="row mb-2 ml-o">
|
||||
<div class="col-4 app-subtitle app-text-grey ">Ticket ID</div>
|
||||
<div class="col-8 app-text font-color-black text-end " style="font-weight: 500 !important;"><?= $master[0]['thz_id'];?></div>
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row" id="notes-body">
|
||||
<!-- Left Details -->
|
||||
<div class="col-5" id="notes-body-left">
|
||||
<div class="card master-card" style="background:#F5FFFF; border-radius: 15px;">
|
||||
<div class="card-header d-flex justify-content-between align-items-center" style="background:none; border:none;">
|
||||
<h3 class="mb-0">Details</h3>
|
||||
<?php if($master[0]['status'] !== "Closed") : ?>
|
||||
<a href="javascript:void(0);" onclick="openEditTicket()">
|
||||
<i class="mdi mdi-pencil edit-icon" title="Edit"></i>
|
||||
<!-- <i class="mdi mdi-pencil"
|
||||
title="Edit"
|
||||
style="font-size:15px; color:#555; cursor:pointer; transition:0.2s;"
|
||||
onmouseover="this.style.color='#02a8b5'; this.style.fontSize='17px';"
|
||||
onmouseout="this.style.color='#555'; this.style.fontSize='15px';">
|
||||
</i> -->
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<div class="col-4 app-subtitle app-text-grey ">Name</div>
|
||||
<div class="col-8 app-text font-color-black text-end " style="font-weight: 500 !important;"><?= $master[0]['name'];?></div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<div class="col-4 app-subtitle app-text-grey ">Mobile</div>
|
||||
<div class="col-8 app-text font-color-black text-end " style="font-weight: 500 !important;"><?= $master[0]['mobile'];?></div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<div class="col-4 app-subtitle app-text-grey ">Policy Number</div>
|
||||
<div class="col-8 app-text text-end font-color-black" style="font-weight: 500 !important;">
|
||||
<?= (!empty($master[0]['policy_no']) && strtolower($master[0]['policy_no']) !== 'null')
|
||||
? '<u class="font-color-black">
|
||||
<a href="javascript:void(0);"
|
||||
class="font-color-black"
|
||||
data-toggle="modal"
|
||||
data-target="#PolicyModal"
|
||||
title="Click to view Policy Terms"
|
||||
data-id="'.$master[0]['policy_id'].'">'
|
||||
.$master[0]['policy_no'].'
|
||||
</a>
|
||||
</u>'
|
||||
: 'N/A'; ?>
|
||||
<div class="card-body card-scroll " style="padding:0 27px !important; background:#F5FFFF; border-radius: 15px !important;">
|
||||
<div class="row mb-2 ml-o">
|
||||
<div class="col-4 app-subtitle app-text-grey ">Ticket ID</div>
|
||||
<div class="col-8 font-color-black text-end " style="font-weight: 500 !important;"><?= $master[0]['thz_id'];?></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<div class="col-4 app-subtitle app-text-grey ">Assigned To</div>
|
||||
<div class="col-8 app-text font-color-black text-end " style="font-weight: 500 !important;"><?= $master[0]['assignee_name'];?></div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<div class="col-4 app-subtitle app-text-grey ">Status</div>
|
||||
<div class="col-8 app-text font-color-black text-end " style="font-weight: 500 !important;">
|
||||
<?= (!empty($master[0]['status']) && strtolower($master[0]['status']) !== 'null')
|
||||
<div class="row mb-2">
|
||||
<div class="col-4 app-subtitle app-text-grey ">Name</div>
|
||||
<div class="col-8 font-color-black text-end " style="font-weight: 500 !important;"><?= $master[0]['name'];?></div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<div class="col-4 app-subtitle app-text-grey ">Mobile</div>
|
||||
<div class="col-8 font-color-black text-end " style="font-weight: 500 !important;"><?= $master[0]['mobile'];?></div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<div class="col-4 app-subtitle app-text-grey ">Policy Number</div>
|
||||
<div class="col-8 text-end font-color-black" style="font-weight: 500 !important;">
|
||||
<?= (!empty($master[0]['policy_no']) && strtolower($master[0]['policy_no']) !== 'null')
|
||||
? '<u class="font-color-black">
|
||||
<a href="javascript:void(0);"
|
||||
class="font-color-black"
|
||||
onclick="statusHistory('.$master[0]['thz_id'].')"
|
||||
data-toggle="modal"
|
||||
data-target="#StatusModal"
|
||||
title="Click to view Status History">'
|
||||
.$master[0]['status'].'
|
||||
data-target="#PolicyModal"
|
||||
title="Click to view Policy Terms"
|
||||
data-id="'.$master[0]['policy_id'].'">'
|
||||
.$master[0]['policy_no'].'
|
||||
</a>
|
||||
</u>'
|
||||
: 'N/A'; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<div class="col-4 app-subtitle app-text-grey ">Ticket Type</div>
|
||||
<div class="col-8 app-text font-color-black text-end " style="font-weight: 500 !important;"><?= $master[0]['ticket_type'];?></div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<div class="col-4 app-subtitle app-text-grey ">Subject</div>
|
||||
<div class="col-8 app-text font-color-black text-end " style="font-weight: 500 !important; text-align: justify;"><?= $master[0]['subject'];?></div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<div class="col-4 app-subtitle app-text-grey ">Message</div>
|
||||
<div class="col-8 app-text font-color-black text-end " style="font-weight: 500 !important; text-align: justify;"><?= $master[0]['message'];?></div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<div class="col-4 app-subtitle app-text-grey ">Related Tickets</div>
|
||||
<div class="col-8 app-text text-end " style="font-weight: 500 !important;">
|
||||
<u class="text-warning">
|
||||
<a href="javascript:void(0);"
|
||||
class="text-warning"
|
||||
data-toggle="modal"
|
||||
data-target="#relatedTicketModal"
|
||||
title="<?= empty($master[0]['created_by']) ? 'No related tickets' : 'Click to view related tickets'; ?>"
|
||||
data-id="<?= $master[0]['created_by']; ?>">
|
||||
View
|
||||
</a>
|
||||
</u>
|
||||
<div class="row mb-2">
|
||||
<div class="col-4 app-subtitle app-text-grey ">Assigned To</div>
|
||||
<div class="col-8 font-color-black text-end " style="font-weight: 500 !important;"><?= $master[0]['assignee_name'];?></div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<div class="col-4 app-subtitle app-text-grey ">Status</div>
|
||||
<div class="col-8 font-color-black text-end " style="font-weight: 500 !important;">
|
||||
<?= (!empty($master[0]['status']) && strtolower($master[0]['status']) !== 'null')
|
||||
? '<u class="font-color-black">
|
||||
<a href="javascript:void(0);"
|
||||
class="font-color-black"
|
||||
onclick="statusHistory('.$master[0]['thz_id'].')"
|
||||
data-toggle="modal"
|
||||
data-target="#StatusModal"
|
||||
title="Click to view Status History">'
|
||||
.$master[0]['status'].'
|
||||
</a>
|
||||
</u>'
|
||||
: 'N/A'; ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<div class="col-4 app-subtitle app-text-grey ">Ticket Type</div>
|
||||
<div class="col-8 font-color-black text-end " style="font-weight: 500 !important;"><?= $master[0]['ticket_type'];?></div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<div class="col-4 app-subtitle app-text-grey ">Subject</div>
|
||||
<div class="col-8 font-color-black text-end " style="font-weight: 500 !important; text-align: justify;"><?= $master[0]['subject'];?></div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<div class="col-4 app-subtitle app-text-grey ">Message</div>
|
||||
<div class="col-8 font-color-black text-end " style="font-weight: 500 !important; text-align: justify;"><?= $master[0]['message'];?></div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<div class="col-4 app-subtitle app-text-grey ">Related Tickets</div>
|
||||
<div class="col-8 text-end " style="font-weight: 500 !important;">
|
||||
<u class="text-warning">
|
||||
<a href="javascript:void(0);"
|
||||
class="text-warning"
|
||||
data-toggle="modal"
|
||||
data-target="#relatedTicketModal"
|
||||
title="<?= empty($master[0]['created_by']) ? 'No related tickets' : 'Click to view related tickets'; ?>"
|
||||
data-id="<?= $master[0]['created_by']; ?>">
|
||||
View
|
||||
</a>
|
||||
</u>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- add more fields -->
|
||||
</div>
|
||||
<!-- add more fields -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Right Conversation -->
|
||||
|
||||
<div class="col-7">
|
||||
|
||||
<!-- Conversation Card -->
|
||||
<div class="card mb-3 conversation-card">
|
||||
<div class="card-header d-flex justify-content-between align-items-center" style="background:none; border:none; padding-bottom: 0px;">
|
||||
<p class="sub-title-text font-color-black" >Conversation</p>
|
||||
</div>
|
||||
<div class="card-body recard-scroll" style="padding:0 27px !important; margin:0 !important; background:#F5FFFF;">
|
||||
<!-- Right Conversation -->
|
||||
<div class="col-7" id="notes-body-right">
|
||||
<!-- Conversation Card -->
|
||||
<div class="card mb-3 conversation-card" style="background:#F5FFFF; border-radius: 15px !important;">
|
||||
<div class="card-header d-flex justify-content-between align-items-center" style="background:none; border:none; padding-bottom: 0px; border-radius: 15px !important;">
|
||||
<h3 class="font-color-black" >Conversation</h3>
|
||||
</div>
|
||||
<div class="card-body recard-scroll" style="padding:0 27px !important; margin:0 !important; background:#F5FFFF; border-radius: 15px !important;">
|
||||
<?php if(!empty($notes)): ?>
|
||||
<?php foreach($notes as $i => $conv): ?>
|
||||
|
||||
<div style="border:none; padding: 0px; margin: 0px;">
|
||||
<hr/>
|
||||
<!-- Top Row: Message + Badge -->
|
||||
<div class="d-flex justify-content-between align-items-start app-text font-color-black ">
|
||||
<div class="d-flex justify-content-between align-items-start font-color-black ">
|
||||
<p class="mb-1 ml-0 mr-0 " 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>
|
||||
@ -299,7 +287,7 @@ hr{
|
||||
<p class="text-center font-color-black"><i>No Data Found</i></p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Input Card -->
|
||||
@ -321,21 +309,24 @@ hr{
|
||||
<small id="messageCounter" class="form-text text-muted text-end text-right">0/1500</small>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- /notes-body -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade font-color-black " id="EditModal" tabindex="-1" role="dialog" aria-hidden="true">
|
||||
<div class="modal fade font-color-black " id="EditModal" tabindex="-1" role="dialog" aria-hidden="true"
|
||||
data-backdrop="static"
|
||||
data-keyboard="false"
|
||||
data-bs-backdrop="static"
|
||||
data-bs-keyboard="false">
|
||||
<div class="modal-dialog modal-dialog-centered">
|
||||
<div class="modal-content">
|
||||
<form id="ticketForm">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title title-text" id="EditModalLabel" style="font-size:27px !important">Update</h4>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true" data-bs-dismiss="modal">×</button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
@ -344,7 +335,7 @@ hr{
|
||||
<input type="hidden" id="updated_by" name="updated_by" value="<?= get_session_userid(); ?>">
|
||||
|
||||
<div class="form-group col-md-12">
|
||||
<label for="ticket_type" class="sub-title-text ">Ticket Type<span class="text-danger">*</span></label>
|
||||
<label for="ticket_type">Ticket Type<span class="text-danger">*</span></label>
|
||||
<select class="form-control" id="ticket_type" name="ticket_type" required>
|
||||
<option value="">Select Ticket Type</option>
|
||||
<!-- <option value="Sales">Sales</option>
|
||||
@ -361,7 +352,7 @@ hr{
|
||||
|
||||
|
||||
<div class="form-group col-md-12">
|
||||
<label for="status" class="sub-title-text ">Status</label>
|
||||
<label for="status">Status</label>
|
||||
<select class="form-control" id="status" name="status">
|
||||
<option value="">Select Status</option>
|
||||
<option value="Open">Open</option>
|
||||
@ -375,7 +366,7 @@ hr{
|
||||
// 2,3,4 dropdown data'va varannum but dropdown hide pannanum -->
|
||||
<?php if(in_array(get_role_id(), [1,5]) ) { ?>
|
||||
<div class="form-group col-md-12">
|
||||
<label for="assign_to" class="sub-title-text ">Assign To</label>
|
||||
<label for="assign_to">Assign To</label>
|
||||
<select class="form-control" id="assign_to" name="assign_to">
|
||||
<option value="">Select Assign To</option>
|
||||
<?php if(isset($assignee)) { ?>
|
||||
@ -391,7 +382,7 @@ hr{
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn app-btn-secondary " onclick="submitTicket()">Save</button>
|
||||
<button type="button" class="btn app-btn-secondary" onclick="submitTicket()">Save</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@ -404,7 +395,7 @@ hr{
|
||||
|
||||
<div class="modal-header" style="border-bottom-width:0;">
|
||||
<h4 class="modal-title title-text " style="font-size:27px !important">Related Tickets</h4>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true" data-bs-dismiss="modal">×</button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body card-scroll" style="padding-top:5px!important;">
|
||||
@ -451,7 +442,7 @@ hr{
|
||||
|
||||
<div class="modal-header" style="border-bottom-width:0;">
|
||||
<h4 class="modal-title title-text ">Policy Terms</h4>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true" data-bs-dismiss="modal">×</button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body card-scroll" style="padding-top:5px!important;">
|
||||
@ -476,7 +467,7 @@ hr{
|
||||
|
||||
<div class="modal-header" style="border-bottom-width:0;">
|
||||
<h4 class="modal-title title-text ">Status History</h4>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true" data-bs-dismiss="modal">×</button>
|
||||
</div>
|
||||
|
||||
<div class="modal-body card-scroll history-container" style="padding:5px 11px 11px 11px!important;">
|
||||
@ -486,15 +477,12 @@ hr{
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
$(document).ready(function() {
|
||||
// Initialize select2
|
||||
$("#ticket_type").select2();
|
||||
$("#status").select2();
|
||||
$("#assign_to").select2();
|
||||
// Initialize select2
|
||||
$("#ticket_type, #status, #assign_to").select2();
|
||||
|
||||
const messageInput = document.getElementById("notes");
|
||||
const messageCounter = document.getElementById("messageCounter");
|
||||
|
||||
@ -509,20 +497,35 @@ hr{
|
||||
messageInput.classList.remove('is-invalid');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
const btn = document.querySelector("button[onclick='submitTicket()']");
|
||||
|
||||
|
||||
$("#ticket_type, #status, #assign_to").on('change', function() {
|
||||
if (btn.disabled) {
|
||||
btn.disabled = false;
|
||||
btn.innerText = "Save";
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
function openEditTicket() {
|
||||
var form = document.getElementById('ticketForm');
|
||||
form.reset();
|
||||
form.classList.remove('was-validated'); // remove Bootstrap validation styling
|
||||
|
||||
var btn = document.querySelector("button[onclick='submitTicket()']");
|
||||
btn.disabled = false;
|
||||
btn.innerText = "Save";
|
||||
|
||||
|
||||
var masterData = <?= json_encode($master[0]); ?>;
|
||||
console.log(masterData);
|
||||
|
||||
$("#edit_thz_id").val(masterData.thz_id);
|
||||
$("#ticket_type").val(masterData.ticket_type).trigger("change");
|
||||
// $("#updated_by").val("<?= get_session_userid(); ?>");
|
||||
$("#ticket_type").val(masterData.ticket_type).trigger("change");
|
||||
$("#status").val(masterData.status).trigger("change");
|
||||
$("#assign_to").val(masterData.assign_to).trigger("change");
|
||||
|
||||
@ -640,11 +643,11 @@ function statusHistory(thzId) {
|
||||
<table data-custom-table-css="table" class="table w-100 nowrap text-custom-black text-custom app-datatable">
|
||||
<thead class="bg-light">
|
||||
<tr>
|
||||
<th class="app-text app-text-white">S.No</th>
|
||||
<th class="app-text app-text-white">Old Status</th>
|
||||
<th class="app-text app-text-white">New Status</th>
|
||||
<th class="app-text app-text-white">Updated By</th>
|
||||
<th class="app-text app-text-white">Date/Time</th>
|
||||
<th class="app-text-white">S.No</th>
|
||||
<th class="app-text-white">Old Status</th>
|
||||
<th class="app-text-white">New Status</th>
|
||||
<th class="app-text-white">Updated By</th>
|
||||
<th class="app-text-white">Date/Time</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="app-table-body">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user