Merge branch 'dev' of bitbucket.org:jubilian/nhance into dev
This commit is contained in:
commit
3dda9c5991
@ -88,6 +88,7 @@ class ThzMasterNotesModel extends Model
|
|||||||
$ticketTypeFilter = "AND ( thz_master_notes.notes_type = 'External' OR thz_master_notes.notes_type = 'Internal' ) ";
|
$ticketTypeFilter = "AND ( thz_master_notes.notes_type = 'External' OR thz_master_notes.notes_type = 'Internal' ) ";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$integer_ticket_id = (int)$thz_id;
|
||||||
|
|
||||||
$notes_sql = "SELECT
|
$notes_sql = "SELECT
|
||||||
thz_master_notes.*,
|
thz_master_notes.*,
|
||||||
@ -105,7 +106,7 @@ class ThzMasterNotesModel extends Model
|
|||||||
LEFT JOIN thz_master
|
LEFT JOIN thz_master
|
||||||
ON thz_master.thz_id = thz_master_notes.thz_id
|
ON thz_master.thz_id = thz_master_notes.thz_id
|
||||||
AND LOWER(thz_master_notes.notes_by) = 'user'
|
AND LOWER(thz_master_notes.notes_by) = 'user'
|
||||||
WHERE thz_master_notes.thz_id = '. (int)$thz_id .'
|
WHERE thz_master_notes.thz_id = ". $integer_ticket_id ."
|
||||||
$ticketTypeFilter
|
$ticketTypeFilter
|
||||||
ORDER BY thz_master_notes.created_at ASC";
|
ORDER BY thz_master_notes.created_at ASC";
|
||||||
|
|
||||||
|
|||||||
@ -199,19 +199,19 @@
|
|||||||
|
|
||||||
<!-- Input Card -->
|
<!-- Input Card -->
|
||||||
<div class="card">
|
<div class="card">
|
||||||
|
<form id="conversationForm">
|
||||||
|
<input type="hidden" id="notes_type" name="notes_type">
|
||||||
|
<input type="hidden" id="thz_id" name="thz_id">
|
||||||
|
<input type="hidden" id="notes_by" name="notes_by" value="Staff">
|
||||||
|
<input type="hidden" id="created_by" name="created_by" value="<?= get_session_userid(); ?>">
|
||||||
<div class="notes-box">
|
<div class="notes-box">
|
||||||
<form id="conversationForm">
|
<textarea class="form-control" id="notes" name="notes" placeholder="Write your notes here..."></textarea>
|
||||||
<textarea class="form-control" id="notes" name="notes" placeholder="Write your notes here..."></textarea>
|
<div class="icon-buttons">
|
||||||
<input type="hidden" id="notes_type" name="notes_type">
|
<button type="button" class="btn-icon" onclick="submitConverstionTicket('External')"><i class="mdi mdi-content-save"></i></button>
|
||||||
<input type="hidden" id="thz_id" name="thz_id">
|
<button type="button" class="btn-icon" onclick="submitConverstionTicket('Internal')"><i class="mdi mdi-email"></i></button>
|
||||||
<input type="hidden" id="notes_by" name="notes_by" value="Staff">
|
</div>
|
||||||
<input type="hidden" id="created_by" name="created_by" value="<?= get_session_userid(); ?>">
|
|
||||||
<div class="icon-buttons">
|
|
||||||
<button type="button" class="btn-icon" onclick="submitConverstionTicket('External')"><i class="mdi mdi-content-save"></i></button>
|
|
||||||
<button type="button" class="btn-icon" onclick="submitConverstionTicket('Internal')"><i class="mdi mdi-email"></i></button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -232,7 +232,7 @@
|
|||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<div class="form-row">
|
<div class="form-row">
|
||||||
<input type="hidden" id="thz_id" name="thz_id">
|
<input type="hidden" id="edit_thz_id" name="thz_id">
|
||||||
<input type="hidden" id="updated_by" name="updated_by" value="<?= get_session_userid(); ?>">
|
<input type="hidden" id="updated_by" name="updated_by" value="<?= get_session_userid(); ?>">
|
||||||
|
|
||||||
<div class="form-group col-md-12">
|
<div class="form-group col-md-12">
|
||||||
@ -335,13 +335,10 @@
|
|||||||
form.reset();
|
form.reset();
|
||||||
|
|
||||||
var masterData = <?= json_encode($master[0]); ?>;
|
var masterData = <?= json_encode($master[0]); ?>;
|
||||||
// console.log("*****");
|
|
||||||
|
|
||||||
// console.log(masterData);
|
|
||||||
|
|
||||||
document.getElementById('EditModalLabel').innerText = "Update";
|
document.getElementById('EditModalLabel').innerText = "Update";
|
||||||
|
|
||||||
document.getElementById('thz_id').value = masterData.thz_id;
|
document.getElementById('edit_thz_id').value = masterData.thz_id;
|
||||||
document.getElementById('assign_to').value = masterData.assign_to;
|
document.getElementById('assign_to').value = masterData.assign_to;
|
||||||
document.getElementById('status').value = masterData.status;
|
document.getElementById('status').value = masterData.status;
|
||||||
document.getElementById('ticket_type').value = masterData.ticket_type;
|
document.getElementById('ticket_type').value = masterData.ticket_type;
|
||||||
@ -355,11 +352,10 @@
|
|||||||
|
|
||||||
function submitTicket() {
|
function submitTicket() {
|
||||||
|
|
||||||
var form = document.getElementById("ticketForm"); // your form ID
|
var form = document.getElementById("ticketForm");
|
||||||
|
var id = form.querySelector("[name='thz_id']").value;
|
||||||
var formData = new FormData(form);
|
var formData = new FormData(form);
|
||||||
|
|
||||||
var id = form.querySelector("[name='thz_id']").value;
|
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "<?= base_url('ticketSave') ?>",
|
url: "<?= base_url('ticketSave') ?>",
|
||||||
type: "POST",
|
type: "POST",
|
||||||
@ -389,7 +385,7 @@
|
|||||||
document.getElementById("notes_type").value = notetype;
|
document.getElementById("notes_type").value = notetype;
|
||||||
const urlParams = new URLSearchParams(window.location.search);
|
const urlParams = new URLSearchParams(window.location.search);
|
||||||
document.getElementById("thz_id").value = urlParams.get('thz_id');
|
document.getElementById("thz_id").value = urlParams.get('thz_id');
|
||||||
|
var id = urlParams.get('thz_id');
|
||||||
var form = document.getElementById("conversationForm");
|
var form = document.getElementById("conversationForm");
|
||||||
var formData = new FormData(form);
|
var formData = new FormData(form);
|
||||||
|
|
||||||
@ -403,7 +399,6 @@
|
|||||||
success: function(response) {
|
success: function(response) {
|
||||||
if (response.status === "success") {
|
if (response.status === "success") {
|
||||||
toastr.success(response.message, 'success');
|
toastr.success(response.message, 'success');
|
||||||
$('#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¬es_ticket_type=Internal&thz_id=') ?>" + id;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user