FEAT_CLAIM_MODULE : RV

This commit is contained in:
VENKATESHWARAN 2025-01-27 14:30:25 +05:30
parent 5d0b625cc1
commit cd99066ea9
19 changed files with 1660 additions and 1 deletions

View File

@ -491,3 +491,14 @@ $routes->group("/bdsReport", ["filter" => "authMVC"], function ($routes) {
$routes->get('bap_wise_data/(:any)','BDSReportController::Bap_Wise_Data/$1');
});
//New Tickets
$routes->group("/ticket", ["filter" => "authMVC"], function ($routes) {
$routes->match( ['get', 'post'], 'list','TicketController::ticketList');
$routes->get('new','TicketController::ticket_form');
$routes->post('create','TicketController::createTicket');
$routes->get('update','TicketController::updateTicket');
$routes->get('view/(:any)','TicketController::view_ticket/$1');
$routes->get('mail_template','TicketController::createMailTemplate');
});

View File

@ -0,0 +1,132 @@
<?php
namespace App\Controllers;
use App\Controllers\BaseController;
use CodeIgniter\HTTP\ResponseInterface;
use Psr\Log\LoggerInterface;
use Kint\Kint;
use CodeIgniter\API\ResponseTrait;
class TicketController extends BaseController
{
use ResponseTrait;
protected $myLogger;
protected $ticketType;
protected $priorityType;
protected $relationshipType;
public function __construct()
{
$this->myLogger = \Config\Services::mylogger();
$this->ticketType = [1 => "Claim-GMC", 2 => "Claim-GPA", 3 => "EDLI", 4 => "GTLI"];
$this->priorityType = [
1 => "Low",
2 => "Medium",
3 => "High",
4 => "Urgent",
5 => "Emergency",
6 => "Critical"
];
$this->relationshipType = [
"self" => "Self",
"spouse" => "Spouse",
"son" => "Son",
"daughter" => "Daughter",
"father" => "Father",
"mother" => "Mother",
"father-in-law" => "Father-in-Law",
"mother-in-law" => "Mother-in-Law"
];
}
public function ticketList()
{
if ($this->request->is('get')) {
$data['page_name'] = "Claims";
$data['ticket_type'] = $this->ticketType;
$data['claim_status'] = [];
$data['client_list'] = [];
return $this->loadLayout('ticket_search', $data);
} else{
$data['ticket_data'] = $this->ticketSearch();
$html = view('ticket_list', $data);
return $this->respond(['status' => true, 'html' => $html], 200);
}
}
public function ticketSearch()
{
$search_data = $this->request->getPost();
// print_r($search_data); die;
$data = [
[
'id' => 1,
'status' => 'Approved',
'claim_no' => 'CL12345',
'tpa_id' => 'TPA001',
'emp_name' => 'John Doe',
'insurer_name' => 'ABC Insurance',
'client_name' => 'XYZ Corp',
'tat' => '5 Days',
],
[
'id' => 2,
'status' => 'Pending',
'claim_no' => 'CL12346',
'tpa_id' => 'TPA002',
'emp_name' => 'Jane Smith',
'insurer_name' => 'DEF Insurance',
'client_name' => 'LMN Ltd',
'tat' => '3 Days',
],
[
'id' => 3,
'status' => 'Rejected',
'claim_no' => 'CL12347',
'tpa_id' => 'TPA003',
'emp_name' => 'Alice Johnson',
'insurer_name' => 'GHI Insurance',
'client_name' => 'PQR Co',
'tat' => '7 Days',
],
];
return $data;
}
public function ticket_form()
{
$data['ticket_form'] = 1;
return $this->loadLayout('ticket_form_gmc', $data);
}
public function view_ticket($ticket_id)
{
$data = [];
return $this->loadLayout('ticket_edit_onbording', $data);
}
public function createTicket()
{
}
public function updateTicket()
{
}
public function createMailTemplate()
{
$data = [];
return $this->loadLayout('ticket_mail_template', $data);
}
}

View File

@ -0,0 +1,49 @@
<?php
namespace App\Models;
use CodeIgniter\Model;
class TicketClaimStatusModel extends Model
{
protected $table = 'ticket_claim_status';
protected $primaryKey = 'id';
protected $useAutoIncrement = true;
protected $returnType = 'array';
protected $useSoftDeletes = false;
protected $protectFields = true;
protected $allowedFields = [];
// Callbacks
protected $allowCallbacks = true;
protected $beforeInsert = ["checkAndADDCreatedByValue"];
protected $afterInsert = [];
protected $beforeUpdate = ["checkAndUpdateUpdatedByValue"];
protected $afterUpdate = [];
protected $beforeFind = [];
protected $afterFind = [];
protected $beforeDelete = [];
protected $afterDelete = [];
protected function checkAndADDCreatedByValue(array $data)
{
// Check if 'updated_by' value is null or empty
if (empty($data['data']['created_by'])) {
// Set 'updated_by' value to the current session user ID
$data['data']['created_by'] = get_session_userid();
}
return $data;
}
protected function checkAndUpdateUpdatedByValue(array $data)
{
// Check if 'updated_by' value is null or empty
if (empty($data['data']['updated_by'])) {
// Set 'updated_by' value to the current session user ID
$data['data']['updated_by'] = get_session_userid();
}
return $data;
}
}

View File

@ -0,0 +1,49 @@
<?php
namespace App\Models;
use CodeIgniter\Model;
class TicketHistoryModel extends Model
{
protected $table = 'ticket_history';
protected $primaryKey = 'id';
protected $useAutoIncrement = true;
protected $returnType = 'array';
protected $useSoftDeletes = false;
protected $protectFields = true;
protected $allowedFields = [];
// Callbacks
protected $allowCallbacks = true;
protected $beforeInsert = ["checkAndADDCreatedByValue"];
protected $afterInsert = [];
protected $beforeUpdate = ["checkAndUpdateUpdatedByValue"];
protected $afterUpdate = [];
protected $beforeFind = [];
protected $afterFind = [];
protected $beforeDelete = [];
protected $afterDelete = [];
protected function checkAndADDCreatedByValue(array $data)
{
// Check if 'updated_by' value is null or empty
if (empty($data['data']['created_by'])) {
// Set 'updated_by' value to the current session user ID
$data['data']['created_by'] = get_session_userid();
}
return $data;
}
protected function checkAndUpdateUpdatedByValue(array $data)
{
// Check if 'updated_by' value is null or empty
if (empty($data['data']['updated_by'])) {
// Set 'updated_by' value to the current session user ID
$data['data']['updated_by'] = get_session_userid();
}
return $data;
}
}

View File

@ -0,0 +1,49 @@
<?php
namespace App\Models;
use CodeIgniter\Model;
class TicketMailTemplateModel extends Model
{
protected $table = 'ticket_mail_template';
protected $primaryKey = 'id';
protected $useAutoIncrement = true;
protected $returnType = 'array';
protected $useSoftDeletes = false;
protected $protectFields = true;
protected $allowedFields = [];
// Callbacks
protected $allowCallbacks = true;
protected $beforeInsert = ["checkAndADDCreatedByValue"];
protected $afterInsert = [];
protected $beforeUpdate = ["checkAndUpdateUpdatedByValue"];
protected $afterUpdate = [];
protected $beforeFind = [];
protected $afterFind = [];
protected $beforeDelete = [];
protected $afterDelete = [];
protected function checkAndADDCreatedByValue(array $data)
{
// Check if 'updated_by' value is null or empty
if (empty($data['data']['created_by'])) {
// Set 'updated_by' value to the current session user ID
$data['data']['created_by'] = get_session_userid();
}
return $data;
}
protected function checkAndUpdateUpdatedByValue(array $data)
{
// Check if 'updated_by' value is null or empty
if (empty($data['data']['updated_by'])) {
// Set 'updated_by' value to the current session user ID
$data['data']['updated_by'] = get_session_userid();
}
return $data;
}
}

View File

@ -0,0 +1,49 @@
<?php
namespace App\Models;
use CodeIgniter\Model;
class TicketMasterModel extends Model
{
protected $table = 'ticket_master';
protected $primaryKey = 'id';
protected $useAutoIncrement = true;
protected $returnType = 'array';
protected $useSoftDeletes = false;
protected $protectFields = true;
protected $allowedFields = [];
// Callbacks
protected $allowCallbacks = true;
protected $beforeInsert = ["checkAndADDCreatedByValue"];
protected $afterInsert = [];
protected $beforeUpdate = ["checkAndUpdateUpdatedByValue"];
protected $afterUpdate = [];
protected $beforeFind = [];
protected $afterFind = [];
protected $beforeDelete = [];
protected $afterDelete = [];
protected function checkAndADDCreatedByValue(array $data)
{
// Check if 'updated_by' value is null or empty
if (empty($data['data']['created_by'])) {
// Set 'updated_by' value to the current session user ID
$data['data']['created_by'] = get_session_userid();
}
return $data;
}
protected function checkAndUpdateUpdatedByValue(array $data)
{
// Check if 'updated_by' value is null or empty
if (empty($data['data']['updated_by'])) {
// Set 'updated_by' value to the current session user ID
$data['data']['updated_by'] = get_session_userid();
}
return $data;
}
}

View File

@ -0,0 +1,50 @@
<?php
namespace App\Models;
use CodeIgniter\Model;
class TicketMessageModel extends Model
{
protected $table = 'ticket_messages';
protected $primaryKey = 'id';
protected $useAutoIncrement = true;
protected $returnType = 'array';
protected $useSoftDeletes = false;
protected $protectFields = true;
protected $allowedFields = [];
// Callbacks
protected $allowCallbacks = true;
protected $beforeInsert = ["checkAndADDCreatedByValue"];
protected $afterInsert = [];
protected $beforeUpdate = ["checkAndUpdateUpdatedByValue"];
protected $afterUpdate = [];
protected $beforeFind = [];
protected $afterFind = [];
protected $beforeDelete = [];
protected $afterDelete = [];
protected function checkAndADDCreatedByValue(array $data)
{
// Check if 'updated_by' value is null or empty
if (empty($data['data']['created_by'])) {
// Set 'updated_by' value to the current session user ID
$data['data']['created_by'] = get_session_userid();
}
return $data;
}
protected function checkAndUpdateUpdatedByValue(array $data)
{
// Check if 'updated_by' value is null or empty
if (empty($data['data']['updated_by'])) {
// Set 'updated_by' value to the current session user ID
$data['data']['updated_by'] = get_session_userid();
}
return $data;
}
}

View File

@ -0,0 +1,49 @@
<?php
namespace App\Models;
use CodeIgniter\Model;
class TicketNoteModel extends Model
{
protected $table = 'ticket_notes';
protected $primaryKey = 'id';
protected $useAutoIncrement = true;
protected $returnType = 'array';
protected $useSoftDeletes = false;
protected $protectFields = true;
protected $allowedFields = [];
// Callbacks
protected $allowCallbacks = true;
protected $beforeInsert = ["checkAndADDCreatedByValue"];
protected $afterInsert = [];
protected $beforeUpdate = ["checkAndUpdateUpdatedByValue"];
protected $afterUpdate = [];
protected $beforeFind = [];
protected $afterFind = [];
protected $beforeDelete = [];
protected $afterDelete = [];
protected function checkAndADDCreatedByValue(array $data)
{
// Check if 'updated_by' value is null or empty
if (empty($data['data']['created_by'])) {
// Set 'updated_by' value to the current session user ID
$data['data']['created_by'] = get_session_userid();
}
return $data;
}
protected function checkAndUpdateUpdatedByValue(array $data)
{
// Check if 'updated_by' value is null or empty
if (empty($data['data']['updated_by'])) {
// Set 'updated_by' value to the current session user ID
$data['data']['updated_by'] = get_session_userid();
}
return $data;
}
}

View File

@ -625,7 +625,7 @@
</li>
<?php } ?>
<!--
<li>
<?php
$sessionData = get_session_userdata();
@ -639,6 +639,27 @@
<i class="mdi mdi-lifebuoy"></i>
<span> Tickets </span>
</a>
</li> -->
<li>
<a href="#sidebarDashboardsTicket" data-toggle="collapse" class="waves-effect">
<i class="mdi mdi-lifebuoy"></i>
<span class="badge badge-success badge-pill float-right">2</span>
<span> Claims </span>
</a>
<div class="collapse" id="sidebarDashboardsTicket">
<ul class="nav-second-level">
<li>
<a href="<?= base_url('/ticket/new') ?>">New claim</a>
</li>
<li>
<a href="<?= base_url('/ticket/list') ?>">Claim List</a>
</li>
<li>
<a href="<?= base_url('/ticket/mail_template') ?>">Mail Template</a>
</li>
</ul>
</div>
</li>
<li>

View File

@ -0,0 +1,67 @@
<div class="card mb-3" style="margin-right: 23px;">
<div class="card-body">
<div class="row">
<div class="col-xl-2 col-lg-3">
<div class="text-center">
<div class="mb-3">
<img src="https://venbait.in/nhance/helpdesk/dev/assets/helpdeskz/images/user.jpg"
class="user-avatar rounded-circle img-fluid" style="max-width: 100px">
</div>
<div class="mb-3">
<div>RUPESH</div>
<span class="badge badge-dark">User</span>
</div>
</div>
</div>
<div class="col">
<div class="mb-3">
<div class="text-muted"><i class="fa fa-calendar"></i> 16 December 2024 04:15 pm</div>
</div>
<div id="msg_388" class="form-group">
Body </div>
<div class="form-group mt-5">
<button class="btn btn-dark btn-sm" type="button" onclick="quoteMessage(388);"><i
class="fa fa-quote-left"></i> Quote</button>
</div>
<div class="border-top mt-3 pt-4 text-right">
</div>
</div>
</div>
</div>
</div>
<div class="card mb-3 bg-staff" style="margin-right: 23px;">
<div class="card-body">
<div class="row">
<div class="col-xl-2 col-lg-3">
<div class="text-center">
<div class="mb-3">
<img src="https://venbait.in/nhance/helpdesk/dev/assets/helpdeskz/images/agent.jpg"
class="user-avatar rounded-circle img-fluid" style="max-width: 100px">
</div>
<div class="mb-3">
<div>Venkatesh HelpDesk Admin</div>
<span class="badge badge-primary">Staff</span>
</div>
</div>
</div>
<div class="col">
<div class="mb-3">
<div class="text-muted"><i class="fa fa-calendar"></i> 24 January 2025 03:41 pm</div>
</div>
<div id="msg_394" class="form-group">
<p>hi how are you i am fine</p>
</div>
<div class="form-group mt-5">
<button class="btn btn-dark btn-sm" type="button" onclick="quoteMessage(394);"><i
class="fa fa-quote-left"></i> Quote</button>
</div>
<div class="border-top mt-3 pt-4 text-right">
<i class="fa fa-globe"></i> 115.97.253.189
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,72 @@
<style>
.bg-staff {
background-color: #FFF5E5;
}
</style>
<div class="row">
<div class="col-12">
<div class="card" style="margin-right: 23px;">
<div class="card-body">
<!-- Header Section -->
<div class="row mb-3">
<div class="col-6 d-flex align-items-center">
<h4 class="mb-0">Ticket</h4>
</div>
<div class="col-6 text-right">
<a href="<?= base_url('ticket/list'); ?>" aria-label="Back to ticket list">
<i class="fas fa-arrow-left" style="font-size: 17px;"></i>
</a>
</div>
</div>
<!-- Navigation Tabs -->
<ul class="nav nav-pills navtab-bg">
<li class="nav-item">
<a href="#general-tab" data-toggle="tab" class="nav-link px-2 py-1 active" id="general_tab" aria-expanded="true">
<i class="mdi mdi-contacts mr-1"></i>
<span class="d-none d-sm-inline-block">General</span>
</a>
</li>
<li class="nav-item">
<a href="#reply-tab" data-toggle="tab" class="nav-link px-2 py-1" id="reply_tab" aria-expanded="false">
<i class="fa fa-file mr-1"></i>
<span class="d-none d-sm-inline-block">Reply</span>
</a>
</li>
<li class="nav-item">
<a href="#note-tab" data-toggle="tab" class="nav-link px-2 py-1" id="note_tab" aria-expanded="false">
<i class="mdi mdi-account-switch mr-1"></i>
<span class="d-none d-sm-inline-block">Note</span>
</a>
</li>
<li class="nav-item">
<a href="#history-tab" data-toggle="tab" class="nav-link px-2 py-1" id="history_tab" aria-expanded="false">
<i class="mdi mdi-source-branch mr-1"></i>
<span class="d-none d-sm-inline-block">History</span>
</a>
</li>
</ul>
<!-- Tab Content -->
<div class="tab-content">
<div class="tab-pane fade show active" id="general-tab">
<?php include('ticket_form_gpa.php'); ?>
</div>
<div class="tab-pane fade" id="reply-tab">
<?php include('ticket_reply.php'); ?>
</div>
<div class="tab-pane fade" id="note-tab">
<?php include('ticket_note.php'); ?>
</div>
<div class="tab-pane fade" id="history-tab">
<?php include('ticket_history.php'); ?>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="ticket_conversation_div">
<?php include("ticket_conversation.php") ?>
</div>

View File

@ -0,0 +1,246 @@
<div class="row">
<div class="col-12">
<div class="<?= isset($ticket_form) ? "card" : "" ?>">
<div class="card-body">
<?php if(isset($ticket_form)){ ?>
<div class="row" style="margin-bottom:1rem;">
<div class="col-6" style="align-self: center;">
<h4 id="page_title" style="position: relative;">Claim GMC </h4>
</div>
</div>
<?php } ?>
<form role="form" class="parsley-examples" method="post" id="ticket_form_gmc"enctype="multipart/form-data">
<div class="form-group">
<div class="form-row">
<div class="form-group col-md-3">
<label for="claim_status">Status<span class="text-danger"></span></label>
<select class="form-control" id="claim_status_id" name="claim_status_id">
<option value="0">Select status</option>
<?php
if (isset($claim_status) && count($claim_status)) {
foreach ($claim_status as $key => $value) {
echo "<option value=" . $value['id'] . ">" . $value['status'] . "</option>";
}
}
?>
</select>
</div>
<div class="form-group col-md-3">
<label for="priority">Priority<span class="text-danger"></span></label>
<select class="form-control" id="priority" name="priority">
<option value="0">Select Priority</option>
<?php
if (isset($claim_status) && count($claim_status)) {
foreach ($claim_status as $key => $value) {
echo "<option value=" . $value['id'] . ">" . $value['status'] . "</option>";
}
}
?>
</select>
</div>
<div class="form-group col-md-3">
<label for="acm_id">Account Manager<span class="text-danger"></span></label>
<select class="form-control" id="acm_id" name="acm_id">
<option value="0">Select Account Manager</option>
<?php
if (isset($claim_status) && count($claim_status)) {
foreach ($claim_status as $key => $value) {
echo "<option value=" . $value['id'] . ">" . $value['status'] . "</option>";
}
}
?>
</select>
</div>
<div class="form-group col-md-3">
<label for="policy_no">Policy No<span class="text-danger"></span></label>
<input type="text" class="form-control" id="policy_no"
value="<?= isset($client['client_name']) ? $client['client_name'] : '' ?>"
name="policy_no">
</div>
<div class="form-group col-md-3">
<label for="acm_id">Insurer<span class="text-danger"></span></label>
<select class="form-control" id="insurer_id" name="insurer_id">
<option value="0">Select insurer</option>
<?php
if (isset($claim_status) && count($claim_status)) {
foreach ($claim_status as $key => $value) {
echo "<option value=" . $value['id'] . ">" . $value['status'] . "</option>";
}
}
?>
</select>
</div>
<div class="form-group col-md-3">
<label for="acm_id">TPA<span class="text-danger"></span></label>
<select class="form-control" id="tpa_id" name="tpa_id">
<option value="0">Select TPA</option>
<?php
if (isset($claim_status) && count($claim_status)) {
foreach ($claim_status as $key => $value) {
echo "<option value=" . $value['id'] . ">" . $value['status'] . "</option>";
}
}
?>
</select>
</div>
<div class="form-group col-md-3">
<label for="client_name">Corporate Name<span class="text-danger"></span></label>
<select class="form-control" id="client_id" name="client_id">
<option value="0">Select Corporate</option>
<?php
if (isset($claim_status) && count($claim_status)) {
foreach ($claim_status as $key => $value) {
echo "<option value=" . $value['id'] . ">" . $value['client_name'] . "</option>";
}
}
?>
</select>
</div>
<div class="form-group col-md-3">
<label for="emp_code">Employee ID<span class="text-danger"></span></label>
<input type="text" class="form-control" id="emp_code" placeholder="Enter Employee ID"
value="<?= isset($client['client_name']) ? $client['client_name'] : '' ?>"
name="emp_code">
</div>
<div class="form-group col-md-3">
<label for="tpa_id">TPA ID<span class="text-danger"></span></label>
<input type="text" class="form-control" id="tpa_no" placeholder="Enter TPA ID"
value="<?= isset($client['short_name']) ? $client['short_name'] : '' ?>"
name="tpa_no">
</div>
<div class="form-group col-md-3">
<label for="emp_name">Employee Name<span class="text-danger"></span></label>
<input type="text" class="form-control" id="emp_name" placeholder="Enter Employee Name"
value="<?= isset($client['short_name']) ? $client['short_name'] : '' ?>"
name="emp_name">
</div>
<div class="form-group col-md-3">
<label for="insured_name"> Insured Name <span class="text-danger"></span></label>
<select class="form-control" id="insured_name" name="insured_name">
<option value="0">Select Insured Name</option>
<?php
if (isset($ticket_type) && count($ticket_type)) {
foreach ($ticket_type as $key => $value) {
echo "<option value='" . $key . "'>" . $value . "</option>";
}
}
?>
</select>
</div>
<div class="form-group col-md-3">
<label for="relationship"> Relationship <span class="text-danger"></span></label>
<select class="form-control" id="relationship" name="relationship">
<option value="0">Select Relationship</option>
<?php
if (isset($ticket_type) && count($ticket_type)) {
foreach ($ticket_type as $key => $value) {
echo "<option value='" . $key . "'>" . $value . "</option>";
}
}
?>
</select>
</div>
<div class="form-group col-md-3">
<label for="client_name">Employee Mobile No<span class="text-danger"></span></label>
<input type="text" class="form-control" id="emp_mobile" placeholder="Enter EMP Mobile"
value="<?= isset($client['client_name']) ? $client['client_name'] : '' ?>"
name="emp_mobile">
</div>
<div class="form-group col-md-3">
<label for="emp_mail">Employee Mail ID<span class="text-danger"></span></label>
<input type="text" class="form-control" id="emp_mail" placeholder="Enter EMP Mail"
value="<?= isset($client['short_name']) ? $client['short_name'] : '' ?>"
name="emp_mail">
</div>
<div class="form-group col-md-3">
<label for="mode_of_intimation"> Mode of Intimation <span
class="text-danger"></span></label>
<select class="form-control" id="mode_of_intimation" name="mode_of_intimation">
<option value="0">Select Mode</option>
<?php
if (isset($ticket_type) && count($ticket_type)) {
foreach ($ticket_type as $key => $value) {
echo "<option value='" . $key . "'>" . $value . "</option>";
}
}
?>
</select>
</div>
<div class="form-group col-md-3">
<label for="claim_type"> Claim Type <span class="text-danger"></span></label>
<select class="form-control" id="claim_type" name="claim_type">
<option value="0">Select claim Type</option>
<?php
if (isset($ticket_type) && count($ticket_type)) {
foreach ($ticket_type as $key => $value) {
echo "<option value='" . $key . "'>" . $value . "</option>";
}
}
?>
</select>
</div>
<div class="form-group col-md-3">
<label for="hospital_name">Hospital Name<span class="text-danger"></span></label>
<input type="text" class="form-control" id="hospital_name"
placeholder="Enter Hospital Name"
value="<?= isset($client['short_name']) ? $client['short_name'] : '' ?>"
name="hospital_name">
</div>
<div class="form-group col-md-3">
<label for="doa">DOA<span class="text-danger"></span></label>
<input type="text" class="form-control" id="doa" placeholder="Enter DOA"
value="<?= isset($client['client_name']) ? $client['client_name'] : '' ?>"
name="doa">
</div>
<div class="form-group col-md-3">
<label for="dod">DOD<span class="text-danger"></span></label>
<input type="text" class="form-control" id="dod" placeholder="Enter DOD"
value="<?= isset($client['short_name']) ? $client['short_name'] : '' ?>" name="dod">
</div>
<div class="form-group col-md-3">
<label for="claim_amount">Claim Amount<span class="text-danger"></span></label>
<input type="text" class="form-control" id="claim_amount"
placeholder="Enter Claim Amount"
value="<?= isset($client['short_name']) ? $client['short_name'] : '' ?>"
name="claim_amount">
</div>
<div class="form-group col-md-3">
<label for="pod_no">POD No<span class="text-danger"></span></label>
<input type="text" class="form-control" id="pod_no" placeholder="Enter POD NO"
value="<?= isset($client['short_name']) ? $client['short_name'] : '' ?>"
name="pod_no">
</div>
</div>
</div>
<div class="form-group col-md-12 text-right m-b-0" style="margin-top: 29px;">
<button type="submit" class="btn btn-primary waves-effect waves-light mr-1"
id="btnSubmit">Submit</button>
</div>
</div>
</form>
</div>
</div>
</div>

View File

@ -0,0 +1,173 @@
<div class="row">
<div class="col-12">
<div class="<?= isset($ticket_form) ? "card" : "" ?>">
<div class="card-body">
<?php if(isset($ticket_form)){ ?>
<div class="row" style="margin-bottom:1rem;">
<div class="col-6" style="align-self: center;">
<h4 id="page_title" style="position: relative;">Claim GPA </h4>
</div>
</div>
<?php } ?>
<form role="form" class="parsley-examples" method="post" id="ticket_form_gmc"
enctype="multipart/form-data">
<div class="form-group">
<div class="form-row">
<div class="form-group col-md-3">
<label for="claim_status">Status<span class="text-danger"></span></label>
<select class="form-control" id="claim_status" name="claim_status">
<option value="0">Select status</option>
<?php
if (isset($claim_status) && count($claim_status)) {
foreach ($claim_status as $key => $value) {
echo "<option value=" . $value['id'] . ">" . $value['status'] . "</option>";
}
}
?>
</select>
</div>
<div class="form-group col-md-3">
<label for="acm_id">Account Manager<span class="text-danger"></span></label>
<select class="form-control" id="acm_id" name="acm_id">
<option value="0">Select Account Manager</option>
<?php
if (isset($claim_status) && count($claim_status)) {
foreach ($claim_status as $key => $value) {
echo "<option value=" . $value['id'] . ">" . $value['status'] . "</option>";
}
}
?>
</select>
</div>
<div class="form-group col-md-3">
<label for="client_name">Corporate Name<span class="text-danger"></span></label>
<select class="form-control" id="client_id" name="client_id">
<option value="0">Select Corporate</option>
<?php
if (isset($claim_status) && count($claim_status)) {
foreach ($claim_status as $key => $value) {
echo "<option value=" . $value['id'] . ">" . $value['client_name'] . "</option>";
}
}
?>
</select>
</div>
<div class="form-group col-md-3">
<label for="acm_id">Insurer<span class="text-danger"></span></label>
<select class="form-control" id="insurer_id" name="insurer_id">
<option value="0">Select insurer</option>
<?php
if (isset($claim_status) && count($claim_status)) {
foreach ($claim_status as $key => $value) {
echo "<option value=" . $value['id'] . ">" . $value['status'] . "</option>";
}
}
?>
</select>
</div>
<div class="form-group col-md-3">
<label for="policy_no">Policy No<span class="text-danger"></span></label>
<input type="text" class="form-control" id="policy_no"
value="<?= isset($client['client_name']) ? $client['client_name'] : '' ?>"
name="policy_no">
</div>
<div class="form-group col-md-3">
<label for="ticket_type"> Claim Type <span class="text-danger"></span></label>
<select class="form-control" id="ticket_type" name="ticket_type">
<option value="0">Select claim Type</option>
<?php
if (isset($ticket_type) && count($ticket_type)) {
foreach ($ticket_type as $key => $value) {
echo "<option value='" . $key . "'>" . $value . "</option>";
}
}
?>
</select>
</div>
<div class="form-group col-md-3">
<label for="emp_code">Employee ID<span class="text-danger"></span></label>
<input type="text" class="form-control" id="emp_code" placeholder="Enter Employee ID"
value="<?= isset($client['client_name']) ? $client['client_name'] : '' ?>"
name="emp_code">
</div>
<div class="form-group col-md-3">
<label for="emp_name">Employee Name<span class="text-danger"></span></label>
<input type="text" class="form-control" id="emp_name" placeholder="Enter Employee Name"
value="<?= isset($client['short_name']) ? $client['short_name'] : '' ?>"
name="emp_name">
</div>
<div class="form-group col-md-3">
<label for="date_of_join">Date of joining<span class="text-danger"></span></label>
<input type="text" class="form-control" id="date_of_join"
placeholder="Enter Joining Date"
value="<?= isset($client['client_name']) ? $client['client_name'] : '' ?>"
name="date_of_join">
</div>
<div class="form-group col-md-3">
<label for="date_of_incep">Date of Inception<span class="text-danger"></span></label>
<input type="text" class="form-control" id="date_of_incep"
placeholder="Enter Inception Date"
value="<?= isset($client['short_name']) ? $client['short_name'] : '' ?>"
name="date_of_incep">
</div>
<div class="form-group col-md-3">
<label for="dob">Date of Birth<span class="text-danger"></span></label>
<input type="text" class="form-control" id="dob" placeholder="Enter Birth Date"
value="<?= isset($client['short_name']) ? $client['short_name'] : '' ?>" name="dob">
</div>
<div class="form-group col-md-3">
<label for="date_of_accident">Date of Accident<span class="text-danger"></span></label>
<input type="text" class="form-control" id="date_of_accident"
placeholder="Enter Accident Date"
value="<?= isset($client['client_name']) ? $client['client_name'] : '' ?>"
name="date_of_accident">
</div>
<div class="form-group col-md-3">
<label for="date_of_death">Date of Death<span class="text-danger"></span></label>
<input type="date_of_death" class="form-control" id="date_of_death"
placeholder="Enter Death Date"
value="<?= isset($client['short_name']) ? $client['short_name'] : '' ?>"
name="date_of_death">
</div>
<div class="form-group col-md-3">
<label for="date_of_intimat">Date of Intimation<span class="text-danger"></span></label>
<input type="text" class="form-control" id="date_of_intimat"
placeholder="Enter Intimation Date"
value="<?= isset($client['short_name']) ? $client['short_name'] : '' ?>"
name="date_of_intimat">
</div>
<div class="form-group col-md-3">
<label for="si_amt">Sum insured<span class="text-danger"></span></label>
<input type="text" class="form-control" id="si_amt" placeholder="Enter SI"
value="<?= isset($client['short_name']) ? $client['short_name'] : '' ?>"
name="si_amt">
</div>
</div>
</div>
<div class="form-group col-md-12 text-right m-b-0" style="margin-top: 29px;">
<button type="submit" class="btn btn-primary waves-effect waves-light mr-1"
id="btnSubmit">Submit</button>
</div>
</div>
</form>
</div>
</div>
</div>

View File

@ -0,0 +1,33 @@
<div class="row">
<div class="col-12">
<div class="card-body">
<div class="table-responsive">
<table id="scroll-horizontal-datatable" class="table w-100 nowrap">
<thead class="bg-light">
<tr>
<th>Field</th>
<th>Old Value</th>
<th>New Value</th>
<th>User</th>
<th>Date/Time</th>
</tr>
</thead>
<tbody>
<?php if (isset($ticket_history)) { ?>
<?php foreach($ticket_history as $index => $row){ ?>
<tr>
<td><?php echo $row['status']; ?></td>
<td><?php echo $row['claim_no']; ?></td>
<td><?php echo $row['tpa_id']; ?></td>
<td><?php echo $row['emp_name']; ?></td>
<td><?php echo $row['insurer_name']; ?></td>
<td><?php echo $row['client_name']; ?></td>
</tr>
<?php } ?>
<?php } ?>
</tbody>
</table>
</div>
</div>
</div>
</div> <!-- end col-->

136
app/Views/ticket_list.php Normal file
View File

@ -0,0 +1,136 @@
<style>
.table th,
.table td {
padding: 8px;
}
table.dataTable tbody td {
padding: 4px 4px !important;
}
.col-12 {
max-width: 98% !important;
}
.dataTables_filter {
position: absolute;
}
.right-align-input {
text-align: right;
}
.addbtnStyle {
margin-left: 20px !important;
}
</style>
<div class="col-12">
<div class="card">
<div class="card-body">
<div class="row" style="padding-bottom: 10px;">
<div class="col-6" style="align-self: center;">
<h4 style="position: relative;">Claim List </h4>
</div>
</div>
<div class="table-responsive">
<table id="scroll-horizontal-datatable" class="table w-100 nowrap">
<thead class="bg-light">
<tr>
<th>Status</th>
<th>Claim number</th>
<th>TPA ID</th>
<th>Emp name</th>
<th>Insured Name</th>
<th>Corporate name</th>
<th>TAT</th>
</tr>
</thead>
<tbody>
<?php if (isset($ticket_data)) { ?>
<?php foreach($ticket_data as $index => $row){ ?>
<tr onclick="viewTicket(<?php echo $row['id']; ?>)">
<td><?php echo $row['status']; ?></td>
<td><?php echo $row['claim_no']; ?></td>
<td><?php echo $row['tpa_id']; ?></td>
<td><?php echo $row['emp_name']; ?></td>
<td><?php echo $row['insurer_name']; ?></td>
<td><?php echo $row['client_name']; ?></td>
<td><?php echo $row['tat']; ?></td>
</tr>
<?php } ?>
<?php } ?>
</tbody>
</table>
<div>
</div>
</div>
</div><!-- end col -->
</div>
</div>
<!-------------------------------------------------------------------------------------------------->
<script>
// Datatable document ready
$(document).ready(function() {
var ticketsTable = $('#scroll-horizontal-datatable');
if (ticketsTable.length) {
ticketsTable.DataTable({
scrollX: true,
dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
"<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
buttons: [{
extend: 'csv',
text: 'CSV',
title: 'Claim-List',
},
{
extend: 'excel',
text: 'Excel',
title: 'claim-List',
exportOptions: {
orthogonal: 'sort'
},
},
{
text: 'New Claim',
className: 'buttons-html5 addbtnStyle',
action: function(e, dt, node, config) {
newClaim()
}
}
],
language: {
search: "_INPUT_",
searchPlaceholder: "Search..."
},
paging: true, // Enable pagination
pageLength: 25, // Set default number of rows per page (optional)
ordering: false,
});
} else {
console.error("Table atet found.");
}
});
function viewTicket(ticket_id){
let url = '<?= base_url('ticket/view/'); ?>' + ticket_id
window.location.href = url
}
function newClaim(){
let url = '<?= base_url('ticket/new'); ?>'
window.location.href = url
}
</script>

View File

@ -0,0 +1,174 @@
<style>
.table th,
.table td {
padding: 8px;
}
table.dataTable tbody td {
padding: 4px 4px !important;
}
.col-12 {
max-width: 98% !important;
}
.dataTables_filter {
position: absolute;
}
.right-align-input {
text-align: right;
}
.addbtnStyle {
margin-left: 20px !important;
}
</style>
<div class="col-12">
<div class="card">
<div class="card-body">
<div class="row" style="padding-bottom: 10px;">
<div class="col-6" style="align-self: center;">
<h4 style="position: relative;">Mail Template List </h4>
</div>
</div>
<div class="table-responsive">
<table id="scroll-horizontal-datatable" class="table w-100 nowrap">
<thead class="bg-light">
<tr>
<th>Template Name</th>
<th>Status</th>
<th>Policy Type</th>
</tr>
</thead>
<tbody>
<?php if (isset($ticket_data)) { ?>
<?php foreach($ticket_data as $index => $row){ ?>
<tr>
<td><?php echo $row['status']; ?></td>
<td><?php echo $row['claim_no']; ?></td>
<td><?php echo $row['tpa_id']; ?></td>
</tr>
<?php } ?>
<?php } ?>
</tbody>
</table>
<div>
</div>
</div>
</div><!-- end col -->
</div>
</div>
<div class="modal fade" id="new_mail_template" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel"
aria-hidden="true" aria-modal="true" data-backdrop="static">
<div class="modal-dialog modal-full-width">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" id="myLargeModalLabel">Add New Template<span id="nameOfThePolicy"></span></h4>
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
</div>
<div class="modal-body">
<div class="text-center" id="no_data"></div>
<form role="form" class="parsley-examples" method="post" id="account_maneger_summary_mail_form"
enctype="multipart/form-data">
<div class="form-group">
<div class="form-row">
<div class="form-group col-md-6">
<label for="emp_code">Template Name</label>
<input type="text" id="template_name" name="template_name" value="Trigger 1" class="form-control" placeholder="Template Name">
</div>
<div class="form-group col-md-3">
<label for="emp_code">Policy Type</label>
<select class="form-control" id="policy_type" name="policy_type">
<option value="0">Select Policy Type</option>
<?php
if (isset($claim_status) && count($claim_status)) {
foreach ($claim_status as $key => $value) {
echo "<option value=" . $value['id'] . ">" . $value['status'] . "</option>";
}
}
?>
</select>
</div>
<div class="form-group col-md-3">
<label for="emp_code">Claim Status</label>
<select class="form-control" id="claim_status" name="claim_status">
<option value="0">Select status</option>
<?php
if (isset($claim_status) && count($claim_status)) {
foreach ($claim_status as $key => $value) {
echo "<option value=" . $value['id'] . ">" . $value['status'] . "</option>";
}
}
?>
</select>
</div>
</div>
<hr>
<!-- Unlayer editor -->
<div class="form-row">
<div class="form-group col-md-12">
<textarea class="form-control" rows="5" placeholder="Enter Mail Content"></textarea>
</div>
</div>
<div class="form-group text-right m-b-0">
<button type="submit" class="btn btn-primary waves-effect waves-light mr-1" id="btnGridSubmit_2">Submit</button>
</div>
</div>
</form>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<!-------------------------------------------------------------------------------------------------->
<script>
// Datatable document ready
$(document).ready(function() {
var ticketsTable = $('#scroll-horizontal-datatable');
if (ticketsTable.length) {
ticketsTable.DataTable({
scrollX: true,
dom: "<'row'<'col-sm-6'f><'col-sm-6 text-right'B>>" + // Filter left, buttons right
"<'row'<'col-sm-12'tr>>" +
"<'row'<'col-sm-5'i><'col-sm-7'p>>", // Pagination at the bottom, without page length selector
buttons: [{
text: 'Add Template',
className: 'buttons-html5 addbtnStyle',
action: function(e, dt, node, config) {
openModal()
}
}],
language: {
search: "_INPUT_",
searchPlaceholder: "Search..."
},
paging: true, // Enable pagination
pageLength: 25, // Set default number of rows per page (optional)
ordering: false,
});
} else {
console.error("Table atet found.");
}
});
function openModal() {
var myModal = new bootstrap.Modal(document.getElementById('new_mail_template'));
myModal.show();
}
</script>

62
app/Views/ticket_note.php Normal file
View File

@ -0,0 +1,62 @@
<div class="row">
<div class="col-12">
<div class="card-body">
<form role="form" class="parsley-examples" method="post" id="ticket_note_form"
enctype="multipart/form-data">
<div class="form-group">
<div class="form-row">
<div class="form-group col-md-12">
<label for="ticket_note">Add Notes</label>
<textarea class="form-control" id="ticket_note" name="ticket_note" rows="3"
placeholder="Enter Text"><?= isset($client['addon_subheading']) ? $client['addon_subheading'] : '' ?></textarea>
</div>
</div>
</div>
<div class="form-group text-right m-b-0">
<button type="submit" class="btn btn-primary" id="ticket_note_submit">Submit</button>
</div>
</form>
</div>
</div> <!-- end col-->
</div>
<!-- end -->
<script>
$(document).ready(function() {
$("#ticket_note_form").submit(function(event) {
event.preventDefault();
$('.loader').fadeIn();
$('.loader-mask').fadeIn();
var url = '<?= base_url("/ticket/note"); ?>';
var formData = new FormData($('#ticket_note_form')[0]);
sendAjaxRequestForGlobal(url, 'POST', formData, function(response) {
if (response.status == true) {
$('.loader').fadeOut();
$('.loader-mask').delay(350).fadeOut('slow');
} else {
$('.loader').fadeOut();
$('.loader-mask').delay(350).fadeOut('slow');
let message = response.message;
toastr.error(message, 'ERROR');
}
}, function(xhr, status, error) {
console.error('Error fetching data:', error);
console.error(xhr.responseText);
toastr.error('An error occurred while fetching the report page.', 'ERROR');
$('.loader').fadeOut();
$('.loader-mask').delay(350).fadeOut('slow');
});
});
});
</script>

View File

@ -0,0 +1,67 @@
<div class="row">
<div class="col-12">
<div class="card-body">
<form role="form" class="parsley-examples" method="post" id="ticket_reply_form" enctype="multipart/form-data">
<div class="form-group">
<div class="form-row">
<!-- Email To Field -->
<div class="form-group col-md-4">
<label for="emp_mail_for_to">To</label>
<input type="text" class="form-control" id="emp_mail_for_to" name="emp_mail_for_to" placeholder="Recipient email">
</div>
<!-- Subject Field -->
<div class="form-group col-md-4">
<label for="mail_subject">Subject</label>
<input type="text" class="form-control" id="mail_subject" name="mail_subject" placeholder="Mail subject">
</div>
<!-- Mail Content Field -->
<div class="form-group col-md-12">
<label for="mail_content">Mail Content</label>
<textarea class="form-control" id="mail_content" name="mail_content" rows="3" placeholder="Enter mail content">
<?= isset($client['addon_subheading']) ? $client['addon_subheading'] : '' ?>
</textarea>
</div>
</div>
</div>
<!-- Submit Button -->
<div class="form-group text-right">
<button type="submit" class="btn btn-primary" id="ticket_reply_submit">Submit</button>
</div>
</form>
</div>
</div>
</div>
<script>
$(document).ready(function() {
$("#ticket_reply_form").submit(function(event) {
event.preventDefault();
// Show loaders
$('.loader, .loader-mask').fadeIn();
var url = '<?= base_url("/ticket/reply"); ?>';
var formData = new FormData(this);
// Send AJAX request
sendAjaxRequestForGlobal(url, 'POST', formData, function(response) {
$('.loader, .loader-mask').fadeOut();
if (response.status) {
toastr.success('Mail sent successfully.', 'Success');
} else {
toastr.error(response.message || 'Failed to send mail.', 'Error');
}
}, function(xhr, status, error) {
console.error('Error:', error);
console.error('Response:', xhr.responseText);
$('.loader, .loader-mask').fadeOut();
toastr.error('An error occurred while processing the request.', 'Error');
});
});
});
</script>

170
app/Views/ticket_search.php Normal file
View File

@ -0,0 +1,170 @@
<style>
.col-12 {
max-width: 98% !important;
}
</style>
<div class="row">
<div class="col-12" style="margin-top: -12px;">
<div id="accordion" class="mb-3">
<div class="card mb-1">
<h5 class="m-1">
<a id="toggleIcon" class="text-dark float-right" data-toggle="collapse" href="#collapseOne"
aria-expanded="true">
<i id="icon" class="mdi mdi-chevron-down mr-1 text-primary" style="font-size: 28px;"></i>
</a>
</h5>
<div id="collapseOne" class="collapse hide" aria-labelledby="headingOne" data-parent="#accordion">
<div class="card-body">
<div class="form-group">
<div class="form-row">
<div class="form-group col-md-3">
<label for="ticket_type"> Claim Type <span class="text-danger"></span></label>
<select class="form-control" id="ticket_type" name="ticket_type">
<option value="0">Select claim Type</option>
<?php
if (isset($ticket_type) && count($ticket_type)) {
foreach ($ticket_type as $key => $value) {
echo "<option value='" . $key . "'>" . $value . "</option>";
}
}
?>
</select>
</div>
<div class="form-group col-md-3">
<label for="pod_no">POD No<span class="text-danger"></span></label>
<input type="text" class="form-control" id="pod_no" name="pod_no">
</div>
<div class="form-group col-md-3">
<label for="claim_no">Claim No<span class="text-danger"></span></label>
<input type="text" class="form-control" id="claim_no" name="claim_no">
</div>
<div class="form-group col-md-3">
<label for="client_id"> Corporate Name <span class="text-danger"></span></label>
<select class="form-control" id="client_id" name="client_id">
<option value="0">Select Corporate</option>
<?php
if (isset($client_list) && count($client_list)) {
foreach ($ticket_type as $key => $value) {
echo "<option value='" . $value['id'] . "'>" . $value['client_name'] . "</option>";
}
}
?>
</select>
</div>
<div class="form-group col-md-3">
<label for="emp_code">Employee ID<span class="text-danger"></span></label>
<input type="text" class="form-control" id="emp_code" name="emp_code">
</div>
<div class="form-group col-md-3">
<label for="tpa_id">TPA ID<span class="text-danger"></span></label>
<input type="text" class="form-control" id="tpa_id" name="tpa_id">
</div>
<div class="form-group col-md-3">
<label for="emp_mobile_no">Employee Mobile No<span
class="text-danger"></span></label>
<input type="text" class="form-control" id="emp_mobile_no" name="emp_mobile_no">
</div>
<div class="form-group col-md-3">
<label for="claim_status">Status<span class="text-danger"></span></label>
<select class="form-control" id="claim_status" name="claim_status">
<option value="0">Select status</option>
<?php
if (isset($claim_status) && count($claim_status)) {
foreach ($claim_status as $key => $value) {
echo "<option value=" . $value['id'] . ">" . $value['status'] . "</option>";
}
}
?>
</select>
</div>
<div class="form-group col-md-12 text-right m-b-0" style="margin-bottom: -15px;">
<a href="<?= base_url("/ticket/list"); ?>" class="btn btn-secondary"id="clear-filters">Clear</a>
<a class="btn btn-primary" id="get-emp-list" onclick="fetchTicketListData();">Submit</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- end page title -->
<div class="row" id="ticket_list_div">
<?php include('ticket_list.php'); ?>
</div>
<script>
function fetchTicketListData() {
var ticket_type = $('#ticket_type').val();
var pod_no = $('#pod_no').val();
var claim_no = $('#claim_no').val();
var emp_code = $('#emp_code').val();
var claim_status = $('#claim_status').val();
var emp_mobile_no = $('#emp_mobile_no').val();
var tpa_id = $('#tpa_id').val();
var client_id = $('#client_id').val();
var requestData = {
ticket_type: ticket_type,
pod_no: pod_no,
claim_no: claim_no,
emp_code: emp_code,
claim_status: claim_status,
emp_mobile_no: emp_mobile_no,
tpa_id: tpa_id,
client_id: client_id,
};
console.log("requestData", requestData);
var url = '<?= base_url('/ticket/list') ?>';
$('.loader').fadeIn();
$('.loader-mask').fadeIn();
sendAjaxRequestForGlobal(url, 'POST', requestData, function(response) {
console.log('Filter Responce', response);
if (response.status == true) {
$('#ticket_list_div').empty();
$('#ticket_list_div').html(response.html);
$('.loader').fadeOut();
$('.loader-mask').delay(350).fadeOut('slow');
} else {
$('.loader').fadeOut();
$('.loader-mask').delay(350).fadeOut('slow');
let message = response.message;
toastr.error(message, 'ERROR');
}
}, function(xhr, status, error) {
console.error('Error fetching data:', error);
console.error(xhr.responseText);
toastr.error('An error occurred while fetching the data.', 'ERROR');
$('.loader').fadeOut();
$('.loader-mask').delay(350).fadeOut('slow');
});
}
</script>