FIX_UI ticket
This commit is contained in:
parent
99987910e9
commit
79c5e8f561
@ -91,7 +91,7 @@ class ThzController extends BaseController
|
|||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
|
|
||||||
$data['page_name'] = "Ticket List";
|
$data['page_name'] = "Tickets";
|
||||||
$data['ticket_data'] = $tickets;
|
$data['ticket_data'] = $tickets;
|
||||||
$data['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
|
$data['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.
|
// 2,3,4 remain person varannum.
|
||||||
@ -197,17 +197,14 @@ class ThzController extends BaseController
|
|||||||
return $this->response->setJSON((['status' => 'success', 'data' => $result]))->setStatusCode(200);
|
return $this->response->setJSON((['status' => 'success', 'data' => $result]))->setStatusCode(200);
|
||||||
}else{
|
}else{
|
||||||
$toGetCreatedBy = $result['master'][0]['created_by'];
|
$toGetCreatedBy = $result['master'][0]['created_by'];
|
||||||
|
$toGetMobile = $result['master'][0]['mobile'];
|
||||||
$toGetPolicyId = (!empty($result['master'][0]['policy_id']) && strtolower($result['master'][0]['policy_id']) !== 'null')
|
$toGetPolicyId = (!empty($result['master'][0]['policy_id']) && strtolower($result['master'][0]['policy_id']) !== 'null')
|
||||||
? $result['master'][0]['policy_id']
|
? $result['master'][0]['policy_id']
|
||||||
: '';
|
: '';
|
||||||
|
|
||||||
$result['related_tickets'] = $this->thzMasterModel
|
$result['related_tickets'] = $this->thzMasterModel->where('mobile', $toGetMobile)->where('thz_id !=', $thz_id)->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.created_by', $toGetCreatedBy)
|
|
||||||
->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
|
$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['page_name'] = "Tickets"; // 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);
|
return $this->loadLayout('thz_notes', $result);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -43,7 +43,7 @@ class ThzMasterModel extends Model
|
|||||||
public function ticketAutoFetchDetails($client_id ,$mobile){
|
public function ticketAutoFetchDetails($client_id ,$mobile){
|
||||||
|
|
||||||
$result = $this->db->table('employees e')
|
$result = $this->db->table('employees e')
|
||||||
->select('e.id, e.email_personal, e.client_id, e.client_branch_id as branch_id, e.mobile, e.emp_code, e.name, ep.client_policy_id as policy_id')
|
->select('e.id, e.email_personal,e.email_corporate, e.client_id, e.client_branch_id as branch_id, e.mobile, e.emp_code, e.name, ep.client_policy_id as policy_id')
|
||||||
->join('employee_polices ep', 'ep.employee_id = e.id AND ep.is_active = 1', 'left')
|
->join('employee_polices ep', 'ep.employee_id = e.id AND ep.is_active = 1', 'left')
|
||||||
->whereIn('e.emp_status', ['active', 'draft', 'enrolled'])
|
->whereIn('e.emp_status', ['active', 'draft', 'enrolled'])
|
||||||
->where('e.is_active', 1)
|
->where('e.is_active', 1)
|
||||||
|
|||||||
@ -511,33 +511,73 @@
|
|||||||
font-weight: 600!important;
|
font-weight: 600!important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-ternary {
|
/*
|
||||||
|
#E26728 (base)
|
||||||
|
#B8521F (darker 1)
|
||||||
|
#9C461B (darker 2)
|
||||||
|
#803A16 (darker 3)
|
||||||
|
rgba(226, 103, 40, 0.5) (transparent)
|
||||||
|
|
||||||
|
#00999E (base)
|
||||||
|
#007A7E (darker 1)
|
||||||
|
#006C70 (darker 2)
|
||||||
|
#005D61 (darker 3)
|
||||||
|
rgba(0, 153, 158, 0.5) (transparent)
|
||||||
|
*/
|
||||||
|
|
||||||
|
.btn-app-primary {
|
||||||
|
color: #fff !important;
|
||||||
|
background-color: #00999E;
|
||||||
|
border-color: #00999E; }
|
||||||
|
.btn-app-primary:hover {
|
||||||
|
color: #fff !important;
|
||||||
|
background-color: #007A7E;
|
||||||
|
border-color: #006C70; }
|
||||||
|
.btn-app-primary:focus, .btn-app-primary.focus {
|
||||||
|
color: #fff !important;
|
||||||
|
background-color: #007A7E;
|
||||||
|
border-color: #006C70;
|
||||||
|
box-shadow: 0 0 0 0.15rem rgba(0, 153, 158, 0.5); }
|
||||||
|
.btn-app-primary.disabled, .btn-app-primary:disabled {
|
||||||
|
color: #fff !important;
|
||||||
|
background-color: #00999E;
|
||||||
|
border-color: #00999E; }
|
||||||
|
.btn-app-primary:not(:disabled):not(.disabled):active, .btn-app-primary:not(:disabled):not(.disabled).active,
|
||||||
|
.show > .btn-app-primary.dropdown-toggle {
|
||||||
|
color: #fff !important;
|
||||||
|
background-color: #006C70;
|
||||||
|
border-color: #005D61; }
|
||||||
|
.btn-app-primary:not(:disabled):not(.disabled):active:focus, .btn-app-primary:not(:disabled):not(.disabled).active:focus,
|
||||||
|
.show > .btn-app-primary.dropdown-toggle:focus {
|
||||||
|
box-shadow: 0 0 0 0.15rem rgba(0, 153, 158, 0.5); }
|
||||||
|
|
||||||
|
.btn-app-ternary {
|
||||||
color: #fff !important;
|
color: #fff !important;
|
||||||
background-color: #E26728;
|
background-color: #E26728;
|
||||||
border-color: #E26728; }
|
border-color: #E26728; }
|
||||||
.btn-ternary:hover {
|
.btn-app-ternary:hover {
|
||||||
color: #fff !important;
|
color: #fff !important;
|
||||||
background-color: #B9501F;
|
background-color: #B8521F;
|
||||||
border-color: #A6471C; }
|
border-color: #9C461B; }
|
||||||
.btn-ternary:focus, .btn-ternary.focus {
|
.btn-app-ternary:focus, .btn-app-ternary.focus {
|
||||||
color: #fff !important;
|
color: #fff !important;
|
||||||
background-color: #B9501F;
|
background-color: #B8521F;
|
||||||
border-color: #A6471C;
|
border-color: #9C461B;
|
||||||
box-shadow: 0 0 0 0.15rem rgba(226, 103, 40, 0.5); }
|
box-shadow: 0 0 0 0.15rem rgba(226, 103, 40, 0.5); }
|
||||||
.btn-ternary.disabled, .btn-ternary:disabled {
|
.btn-app-ternary.disabled, .btn-app-ternary:disabled {
|
||||||
color: #fff !important;
|
color: #fff !important;
|
||||||
background-color: #E26728;
|
background-color: #E26728;
|
||||||
border-color: #E26728; }
|
border-color: #E26728; }
|
||||||
.btn-ternary:not(:disabled):not(.disabled):active, .btn-ternary:not(:disabled):not(.disabled).active,
|
.btn-app-ternary:not(:disabled):not(.disabled):active, .btn-app-ternary:not(:disabled):not(.disabled).active,
|
||||||
.show > .btn-ternary.dropdown-toggle {
|
.show > .btn-app-ternary.dropdown-toggle {
|
||||||
color: #fff !important;
|
color: #fff !important;
|
||||||
background-color: #A6471C;
|
background-color: #9C461B;
|
||||||
border-color: #933E19; }
|
border-color: #803A16; }
|
||||||
.btn-ternary:not(:disabled):not(.disabled):active:focus, .btn-ternary:not(:disabled):not(.disabled).active:focus,
|
.btn-app-ternary:not(:disabled):not(.disabled):active:focus, .btn-app-ternary:not(:disabled):not(.disabled).active:focus,
|
||||||
.show > .btn-ternary:dropdown-toggle:focus {
|
.show > .btn-app-ternary.dropdown-toggle:focus {
|
||||||
box-shadow: 0 0 0 0.15rem rgba(226, 103, 40, 0.5); }
|
box-shadow: 0 0 0 0.15rem rgba(226, 103, 40, 0.5); }
|
||||||
|
|
||||||
.btn-border-radius{ border-radius: 10px !important; }
|
.btn-border-radius{ border-radius: 10px !important; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -728,7 +768,15 @@
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
<!-- Tickets -->
|
||||||
|
<?php if (in_array(get_role_id(), [1,2,3,5]) || in_array(CLAIMS_TEAM_ID, user_team())) { ?>
|
||||||
|
<li>
|
||||||
|
<a id="tickets" href="<?= base_url('/ticketList?return_type=web') ?>" class="waves-effect img-inactive-not-working">
|
||||||
|
<img src="<?= base_url() . "public"; ?>/assets/images/user_manual_sb.png" alt="Logo" height="20">
|
||||||
|
<span>Tickets</span>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<?php } ?>
|
||||||
<!-- BDS -->
|
<!-- BDS -->
|
||||||
<?php if ((get_role_id() == 1 || get_role_id() == 5) || (in_array(MANAGEMENT_TEAM_ID, user_team()) || in_array(FINANCE_TEAM_ID, user_team()) || in_array(BUSINESS_TEAM_ID, user_team()) || in_array(POS_TEAM_ID, user_team()))) { ?>
|
<?php if ((get_role_id() == 1 || get_role_id() == 5) || (in_array(MANAGEMENT_TEAM_ID, user_team()) || in_array(FINANCE_TEAM_ID, user_team()) || in_array(BUSINESS_TEAM_ID, user_team()) || in_array(POS_TEAM_ID, user_team()))) { ?>
|
||||||
<li>
|
<li>
|
||||||
|
|||||||
@ -237,7 +237,7 @@
|
|||||||
<input type="hidden" id="notes_by" name="notes_by" value="Staff">
|
<input type="hidden" id="notes_by" name="notes_by" value="Staff">
|
||||||
<input type="hidden" id="created_by" name="created_by" value="<?= get_session_userid(); ?>">
|
<input type="hidden" id="created_by" name="created_by" value="<?= get_session_userid(); ?>">
|
||||||
<div class="notes-box">
|
<div class="notes-box">
|
||||||
<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..." required></textarea>
|
||||||
<div class="icon-buttons">
|
<div class="icon-buttons">
|
||||||
<!-- save btn means local - internal -->
|
<!-- save btn means local - internal -->
|
||||||
<button type="button" class="btn-icon" onclick="submitConverstionTicket('Internal')"><i class="mdi mdi-content-save"></i></button>
|
<button type="button" class="btn-icon" onclick="submitConverstionTicket('Internal')"><i class="mdi mdi-content-save"></i></button>
|
||||||
@ -310,7 +310,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-ternary btn-border-radius" onclick="submitTicket()">Save</button>
|
<button type="button" class="btn btn-app-ternary btn-border-radius" onclick="submitTicket()">Save</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
@ -422,16 +422,16 @@
|
|||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
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');
|
$('#ticketModal').modal('hide');
|
||||||
form.reset();
|
form.reset();
|
||||||
window.location.href = "<?= base_url('ticketConversationList?return_type=web&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');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
error: function(xhr) {
|
error: function(xhr) {
|
||||||
toastr.error("Something went wrong!", 'error');
|
toastr.error("Something went wrong!", 'Error');
|
||||||
console.error(xhr.responseText);
|
console.error(xhr.responseText);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -444,6 +444,17 @@
|
|||||||
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 id = urlParams.get('thz_id');
|
||||||
var form = document.getElementById("conversationForm");
|
var form = document.getElementById("conversationForm");
|
||||||
|
// reset any old error styles
|
||||||
|
form.classList.remove('was-validated');
|
||||||
|
|
||||||
|
var notes = document.getElementById('notes').value.trim();
|
||||||
|
|
||||||
|
if (notes === "") {
|
||||||
|
toastr.warning('Please enter notes', 'Warning');
|
||||||
|
form.classList.add('was-validated');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var formData = new FormData(form);
|
var formData = new FormData(form);
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
@ -455,15 +466,15 @@
|
|||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
success: function(response) {
|
success: function(response) {
|
||||||
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&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');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
error: function(xhr) {
|
error: function(xhr) {
|
||||||
toastr.error("Something went wrong!", 'error');
|
toastr.error("Something went wrong!", 'Error');
|
||||||
console.error(xhr.responseText);
|
console.error(xhr.responseText);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user