MERGE_YAML_AND_CLIENT_TRACKER_ISSUE
This commit is contained in:
commit
fd2b3ac9fb
@ -1,5 +1,5 @@
|
||||
---
|
||||
deployment:
|
||||
tasks:
|
||||
- export DEPLOYPATH=/home/example/public_html/
|
||||
- export DEPLOYPATH=home3/venbaehn/public_html/nhance/devauto/
|
||||
- /bin/cp . $DEPLOYPATH
|
||||
@ -39,6 +39,7 @@ $routes->group("/client", ["filter" => "authMVC"], function($routes){
|
||||
$routes->get("list", "ClientController::index");
|
||||
$routes->get("create", "ClientController::clientOnboarding");
|
||||
$routes->get('deposit/(:num)', 'ClientController::deposit/$1');
|
||||
$routes->get('remove/(:num)', 'ClientController::removeClient/$1');
|
||||
// application/config/routes.php
|
||||
|
||||
// Add a route for the view_Deposit method
|
||||
@ -58,7 +59,6 @@ $routes->post('save_deposit', 'ClientController::saveDeposit');
|
||||
|
||||
$routes->get("list/(:any)", "ClientController::editClientOnboarding/$1");
|
||||
|
||||
$routes->get("remove/(:any)", "ClientController::removeClientOnboarding/$1");
|
||||
|
||||
|
||||
$routes->group("general", ["filter" => "authMVC"], function($routes){
|
||||
@ -70,6 +70,7 @@ $routes->post('save_deposit', 'ClientController::saveDeposit');
|
||||
$routes->post("create", "ClientController::createClientBranch");
|
||||
$routes->post("edit", "ClientController::editClientBranch");
|
||||
$routes->get("list/(:any)", "ClientController::getSingleBranchDataById/$1");
|
||||
$routes->get("remove/(:any)", "ClientController::removeClientBranch/$1");
|
||||
});
|
||||
|
||||
$routes->group("relation", ["filter" => "authMVC"], function($routes){
|
||||
@ -132,6 +133,7 @@ $routes->group("/master", ["filter" => "authMVC"], function($routes){
|
||||
$routes->post("edit", "MasterController::editInsurerBranch");
|
||||
$routes->get("editget/(:any)", "MasterController::editInsurerGet/$1");
|
||||
$routes->get("list/(:any)", "MasterController::insurerBranchList/$1");
|
||||
$routes->get("remove/(:any)", "MasterController::removeInsurerBranch/$1");
|
||||
});
|
||||
|
||||
});
|
||||
@ -142,12 +144,14 @@ $routes->group("/master", ["filter" => "authMVC"], function($routes){
|
||||
$routes->post("createpost", "MasterController::createTPAGeneralInfo");
|
||||
$routes->post("edit", "MasterController::editTPAGeneralInfo");
|
||||
$routes->get("list/(:any)", "MasterController::editTPAOnboarding/$1");
|
||||
$routes->get("remove/(:any)", "MasterController::tpaRemove/$1");
|
||||
|
||||
$routes->group("branch", ["filter" => "authMVC"], function($routes){
|
||||
$routes->post("create", "MasterController::createTPABranch");
|
||||
$routes->get("editget/(:any)", "MasterController::editTPAGet/$1");
|
||||
$routes->post("edit", "MasterController::editTPABranch");
|
||||
$routes->get("list/(:any)", "MasterController::tpaBranchList/$1");
|
||||
$routes->get("remove/(:any)", "MasterController::removeTPABranch/$1");
|
||||
});
|
||||
});
|
||||
|
||||
@ -157,6 +161,7 @@ $routes->group("/master", ["filter" => "authMVC"], function($routes){
|
||||
$routes->post("createpost", "MasterController::createKYCInfo");
|
||||
$routes->post("edit", "MasterController::editKYCInfo");
|
||||
$routes->get("list/(:any)", "MasterController::editKYCOnboarding/$1");
|
||||
$routes->get("remove/(:any)", "MasterController::kycRemove/$1");
|
||||
$routes->get("delete/(:any)", "MasterController::deleteClientKycDocs/$1");
|
||||
|
||||
|
||||
@ -166,6 +171,7 @@ $routes->group("/master", ["filter" => "authMVC"], function($routes){
|
||||
$routes->post("edit", "MasterController::editKYCDocs");
|
||||
// $routes->get("list", "MasterController::tpaBranchList");
|
||||
$routes->get("list/(:any)", "MasterController::kycDocsList/$1");
|
||||
$routes->get("remove/(:any)", "MasterController::removeKYCDocs/$1");
|
||||
|
||||
});
|
||||
});
|
||||
@ -176,6 +182,7 @@ $routes->group("/master", ["filter" => "authMVC"], function($routes){
|
||||
$routes->post("createpost", "MasterController::createPolicyType");
|
||||
$routes->post("edit", "MasterController::editPolicyType");
|
||||
$routes->get("list/(:any)", "MasterController::editPolicyTypeOnboarding/$1");
|
||||
$routes->get("remove/(:any)", "MasterController::policyTypeRemove/$1");
|
||||
|
||||
|
||||
$routes->group("policies", ["filter" => "authMVC"], function($routes){
|
||||
@ -184,6 +191,7 @@ $routes->group("/master", ["filter" => "authMVC"], function($routes){
|
||||
$routes->post("edit", "MasterController::editPolicies");
|
||||
$routes->get("list", "MasterController::tpaBranchList");
|
||||
$routes->get("list/(:any)", "MasterController::policesList/$1");
|
||||
$routes->get("remove/(:any)", "MasterController::removePolicyPolicies/$1");
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@ -103,27 +103,36 @@ class ClientController extends AdminController
|
||||
}
|
||||
|
||||
|
||||
public function removeClientOnboarding($id = null)
|
||||
{
|
||||
$this->myLogger->logme('error', 'Edit Client Onboarding function called');
|
||||
$headerData['page_name'] = 'Edit Client Onboarding';
|
||||
|
||||
$this->clientModel->update($id, ['is_active' => 0]);
|
||||
|
||||
// $this->clientBranchModel->where('client_id', $id)->update(['is_active' => 0]);
|
||||
// $this->clientRMModel->where('client_id', $id)->update(['is_active' => 0]);
|
||||
|
||||
|
||||
$data['clientList'] = $this->clientModel->getCreatedByUserName();
|
||||
$data['client_rm'] = $this->clientRMModel->getAllClientRM();
|
||||
|
||||
echo view('layout/header', $headerData);
|
||||
echo view('client_list', $data);
|
||||
echo view('layout/footer');
|
||||
}
|
||||
|
||||
public function removeClient($id = null)
|
||||
{
|
||||
$this->myLogger->logme('error','Client Remove function called');
|
||||
// $data = $this->request->getPost();
|
||||
$data['updated_by'] = get_session_userid();
|
||||
$data['is_active'] = 0;
|
||||
$update = $this->clientModel->update($id,$data);
|
||||
if($update){
|
||||
return $this->respond(['status' => true,'code' => 200], 200);
|
||||
}else{
|
||||
return $this->respond(['status' => false,'code' => 404], 200);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function removeClientBranch($id = null)
|
||||
{
|
||||
$this->myLogger->logme('error','Client Branch Remove function called');
|
||||
// $id = $this->request->getPost('PrimaryKey');
|
||||
// $data = $this->request->getPost();
|
||||
$data['updated_by'] = get_session_userid();
|
||||
$data['is_active'] = 0;
|
||||
$update = $this->clientBranchModel->update($id,$data);
|
||||
if($update){
|
||||
return $this->respond(['status' => true,'code' => 200], 200);
|
||||
}else{
|
||||
return $this->respond(['status' => false,'code' => 404], 200);
|
||||
}
|
||||
}
|
||||
|
||||
public function clientOnboarding()
|
||||
{
|
||||
|
||||
@ -553,12 +553,12 @@ class EmployeeRestController extends AdminController
|
||||
}
|
||||
|
||||
if (count($check_miss_match) > 0) {
|
||||
return $this->respond(['status' => 'failed', 'code' => 404, 'message' => "Column Name's are miss Match's!", 'data'=> $check_miss_match], 404);
|
||||
return $this->respond(['status' => 'failed', 'code' => 404, 'message' => "Column Name's are miss Match's!", 'data'=> $check_miss_match], 200);
|
||||
}
|
||||
}
|
||||
|
||||
if(count($data[0]) != 10){
|
||||
return $this->respond(['status' => 'failed', 'code' => 404, 'message' => "Uploaded file row count is Not Match!" ], 404);
|
||||
return $this->respond(['status' => 'failed', 'code' => 404, 'message' => "Uploaded file row count is Not Match!" ], 200);
|
||||
}
|
||||
|
||||
//this change the column name into index number
|
||||
@ -593,7 +593,7 @@ class EmployeeRestController extends AdminController
|
||||
}
|
||||
if (count($new_array) > 0) {
|
||||
$count =count($new_array);
|
||||
return $this->respond(['status' => 'failed', 'code' => 404, 'message' => "$count Employee Sum Insured is Not Match.. " , 'data' => $new_array], 404);
|
||||
return $this->respond(['status' => 'failed', 'code' => 404, 'message' => "$count Employee Sum Insured is Not Match.. " , 'data' => $new_array], 200);
|
||||
}
|
||||
}
|
||||
foreach ($extra['0'] as $index => $id) {
|
||||
|
||||
@ -15,8 +15,8 @@ class LoginController extends BaseController
|
||||
|
||||
public function index(){
|
||||
|
||||
$session_data = ['isLoggedIn' => True ,'userid' => '25'];
|
||||
set_session_data($session_data);
|
||||
//$session_data = ['isLoggedIn' => True ,'userid' => '25'];
|
||||
//set_session_data($session_data);
|
||||
// $isLoggedIn = check_session();
|
||||
$isLoggedIn = check_session();
|
||||
|
||||
|
||||
@ -73,7 +73,7 @@ class MasterController extends AdminController
|
||||
{
|
||||
$this->myLogger->logme('error','Insurer list function called');
|
||||
$headerData['page_name'] = 'Insurer List';
|
||||
$data['insurerList'] = $this->insurerModel->findAll();
|
||||
$data['insurerList'] = $this->insurerModel->where('is_active',1)->findAll();
|
||||
$data['insurer_rm'] = $this->insurerRMModel->getAllClientRM();
|
||||
// echo '<pre>';
|
||||
// print_r($data['insurerList']); die;
|
||||
@ -89,27 +89,36 @@ class MasterController extends AdminController
|
||||
{
|
||||
$this->myLogger->logme('error','Insurer Remove function called');
|
||||
// $id = $this->request->getPost('PrimaryKey');
|
||||
$data = $this->request->getPost();
|
||||
// $data = $this->request->getPost();
|
||||
$data['updated_by'] = get_session_userid();
|
||||
$data['is_active'] = 0;
|
||||
$update = $this->insurerModel->update($id,$data);
|
||||
if($update){
|
||||
echo "<script>";
|
||||
echo "toastr.warning('Please Add the Client!', 'warning',{timeOut: 2000});";
|
||||
echo "</script>";
|
||||
// echo json_encode(array("status" => true , 'data' => $data));
|
||||
// exit();
|
||||
return $this->respond(['status' => true,'code' => 200], 200);
|
||||
}else{
|
||||
echo "<script>";
|
||||
echo "toastr.warning('Please Add the Client!', 'warning',{timeOut: 2000});";
|
||||
echo "</script>";
|
||||
// toastr.warning('Please Add the Client!', 'warning',{timeOut: 2000});
|
||||
|
||||
// echo json_encode(array("status" => false));
|
||||
// exit();
|
||||
return $this->respond(['status' => false,'code' => 404], 200);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function removeInsurerBranch($id = null)
|
||||
{
|
||||
$this->myLogger->logme('error','Insurer Branch Remove function called');
|
||||
// $id = $this->request->getPost('PrimaryKey');
|
||||
// $data = $this->request->getPost();
|
||||
$data['updated_by'] = get_session_userid();
|
||||
$data['is_active'] = 0;
|
||||
$update = $this->insurerBranchModel->update($id,$data);
|
||||
if($update){
|
||||
return $this->respond(['status' => true,'code' => 200], 200);
|
||||
}else{
|
||||
return $this->respond(['status' => false,'code' => 404], 200);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public function editInsurerOnboarding($id = null)
|
||||
{
|
||||
|
||||
@ -315,7 +324,7 @@ class MasterController extends AdminController
|
||||
{
|
||||
$this->myLogger->logme('error','TPA list function called');
|
||||
$headerData['page_name'] = 'TPA List';
|
||||
$data['tpaList'] = $this->tpaModel->findAll();
|
||||
$data['tpaList'] = $this->tpaModel->where('is_active',1)->findAll();
|
||||
// $data['insurer_rm'] = $this->insurerRMModel->getAllClientRM();
|
||||
// echo '<pre>';
|
||||
// print_r($data['insurerList']); die;
|
||||
@ -328,8 +337,37 @@ class MasterController extends AdminController
|
||||
}
|
||||
|
||||
|
||||
public function tpaRemove($id = null)
|
||||
{
|
||||
$this->myLogger->logme('error','TPA Remove function called');
|
||||
$data = $this->request->getPost();
|
||||
$data['updated_by'] = get_session_userid();
|
||||
$data['is_active'] = 0;
|
||||
$update = $this->tpaModel->update($id,$data);
|
||||
if($update){
|
||||
return $this->respond(['status' => true,'code' => 200], 200);
|
||||
}else{
|
||||
return $this->respond(['status' => false,'code' => 404], 200);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function removeTPABranch($id = null)
|
||||
{
|
||||
$this->myLogger->logme('error','TPA Branch Remove function called');
|
||||
// $id = $this->request->getPost('PrimaryKey');
|
||||
// $data = $this->request->getPost();
|
||||
$data['updated_by'] = get_session_userid();
|
||||
$data['is_active'] = 0;
|
||||
$update = $this->tpaBranchModel->update($id,$data);
|
||||
if($update){
|
||||
return $this->respond(['status' => true,'code' => 200], 200);
|
||||
}else{
|
||||
return $this->respond(['status' => false,'code' => 404], 200);
|
||||
}
|
||||
}
|
||||
|
||||
public function tpaOnboarding()
|
||||
{
|
||||
|
||||
@ -536,7 +574,7 @@ class MasterController extends AdminController
|
||||
{
|
||||
$this->myLogger->logme('error','KYC list function called');
|
||||
$headerData['page_name'] = 'KYC List';
|
||||
$data['kycList'] = $this->kycEntityTypeModel->findAll();
|
||||
$data['kycList'] = $this->kycEntityTypeModel->where('is_active',1)->findAll();
|
||||
// $data['insurer_rm'] = $this->insurerRMModel->getAllClientRM();
|
||||
// echo '<pre>';
|
||||
// print_r($data['insurerList']); die;
|
||||
@ -548,9 +586,36 @@ class MasterController extends AdminController
|
||||
// $this->loadLayout('insurer_onboarding', $data);
|
||||
}
|
||||
|
||||
|
||||
public function kycRemove($id = null)
|
||||
{
|
||||
$this->myLogger->logme('error','KYC Remove function called');
|
||||
// $data = $this->request->getPost();
|
||||
$data['updated_by'] = get_session_userid();
|
||||
$data['is_active'] = 0;
|
||||
$update = $this->kycEntityTypeModel->update($id,$data);
|
||||
if($update){
|
||||
return $this->respond(['status' => true,'code' => 200], 200);
|
||||
}else{
|
||||
return $this->respond(['status' => false,'code' => 404], 200);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function removeKYCDocs($id = null)
|
||||
{
|
||||
$this->myLogger->logme('error','KYC Docs Remove function called');
|
||||
// $id = $this->request->getPost('PrimaryKey');
|
||||
// $data = $this->request->getPost();
|
||||
$data['updated_by'] = get_session_userid();
|
||||
$data['is_active'] = 0;
|
||||
$update = $this->kycDocsModel->update($id,$data);
|
||||
if($update){
|
||||
return $this->respond(['status' => true,'code' => 200], 200);
|
||||
}else{
|
||||
return $this->respond(['status' => false,'code' => 404], 200);
|
||||
}
|
||||
}
|
||||
|
||||
public function kycOnboarding()
|
||||
{
|
||||
|
||||
@ -718,7 +783,7 @@ class MasterController extends AdminController
|
||||
{
|
||||
$this->myLogger->logme('error','Policy Type list function called');
|
||||
$headerData['page_name'] = 'Policy Type List';
|
||||
$data['policyList'] = $this->policyTypeModel->findAll();
|
||||
$data['policyList'] = $this->policyTypeModel->where('is_active',1)->findAll();
|
||||
// $data['insurer_rm'] = $this->insurerRMModel->getAllClientRM();
|
||||
// echo '<pre>';
|
||||
// print_r($data['insurerList']); die;
|
||||
@ -730,7 +795,35 @@ class MasterController extends AdminController
|
||||
// $this->loadLayout('insurer_onboarding', $data);
|
||||
}
|
||||
|
||||
|
||||
public function policyTypeRemove($id = null)
|
||||
{
|
||||
$this->myLogger->logme('error','Policy Type Remove function called');
|
||||
// $data = $this->request->getPost();
|
||||
$data['updated_by'] = get_session_userid();
|
||||
$data['is_active'] = 0;
|
||||
$update = $this->policyTypeModel->update($id,$data);
|
||||
if($update){
|
||||
return $this->respond(['status' => true,'code' => 200], 200);
|
||||
}else{
|
||||
return $this->respond(['status' => false,'code' => 404], 200);
|
||||
}
|
||||
}
|
||||
|
||||
public function removePolicyPolicies($id = null)
|
||||
{
|
||||
$this->myLogger->logme('error','Policies Remove function called');
|
||||
// $id = $this->request->getPost('PrimaryKey');
|
||||
// $data = $this->request->getPost();
|
||||
$data['updated_by'] = get_session_userid();
|
||||
$data['is_active'] = 0;
|
||||
$update = $this->policesModel->update($id,$data);
|
||||
if($update){
|
||||
return $this->respond(['status' => true,'code' => 200], 200);
|
||||
}else{
|
||||
return $this->respond(['status' => false,'code' => 404], 200);
|
||||
}
|
||||
}
|
||||
|
||||
public function policyTypeOnboarding()
|
||||
{
|
||||
|
||||
@ -58,8 +58,10 @@ class ClientModel extends Model
|
||||
->select('clients.*')
|
||||
->select('user_profiles.first_name as user_name')
|
||||
->join('user_profiles', 'user_profiles.id = clients.created_by')
|
||||
->where('clients.is_active', 1)
|
||||
->get()
|
||||
->getResult();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -1,12 +1,11 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use CodeIgniter\Model;
|
||||
use App\Models\PolicyPremium1Model;
|
||||
use App\Models\PolicyPremium2Model;
|
||||
use App\Models\PolicyGridModel;
|
||||
use CodeIgniter\Model;
|
||||
// use App\Models\PolicyPremium1Model;
|
||||
// use App\Models\PolicyPremium2Model;
|
||||
|
||||
class PolicesModel extends Model
|
||||
{
|
||||
|
||||
@ -172,7 +172,7 @@ input:checked + .slider:before {
|
||||
<i class="text">( Image dimensions 100 x 100 pixels and size of 200KB. )</i>
|
||||
</div>
|
||||
<div class="form-group col-md-6 float-right" style="position: relative;top: 20px;">
|
||||
<img src="<?= isset($client['client_logo']) && !empty($client['client_logo']) ? base_url() . "public/uploads/logo/" . $client['client_logo'] : 'http://ssl.gstatic.com/accounts/ui/avatar_2x.png' ?>" width="100" height="100" id="uploadPreview" class="avatar img-circle img-thumbnail" alt="avatar"/>
|
||||
<img src="<?= isset($client['client_logo']) && !empty($client['client_logo']) ? base_url() . "public/uploads/logo/" . $client['client_logo'] : base_url()."public/assets/images/avatar_2x.png" ?>" width="100" height="100" id="uploadPreview" class="avatar img-circle img-thumbnail" alt="avatar"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -254,7 +254,6 @@ input:checked + .slider:before {
|
||||
var OptionsHTML1 = ''
|
||||
|
||||
$.ajax({
|
||||
data: formData,
|
||||
url: form_action,
|
||||
type: "POST",
|
||||
dataType: 'json',
|
||||
@ -364,77 +363,70 @@ input:checked + .slider:before {
|
||||
return false;
|
||||
}
|
||||
|
||||
function PreviewImage() {
|
||||
var file = document.getElementById("client_logo").files[0];
|
||||
|
||||
if (file) {
|
||||
if (file.size <= 200 * 1024) { // 200kb in bytes
|
||||
var oFReader = new FileReader();
|
||||
oFReader.readAsDataURL(file);
|
||||
|
||||
oFReader.onload = function (oFREvent) {
|
||||
document.getElementById("uploadPreview").src = oFREvent.target.result;
|
||||
function PreviewImage() {
|
||||
console.log('function called');
|
||||
var fileInput = document.getElementById("client_logo");
|
||||
var file = fileInput.files[0];
|
||||
|
||||
if (file) {
|
||||
var allowedExtensions = ["jpg", "jpeg", "png"];
|
||||
var fileExtension = file.name.split('.').pop().toLowerCase();
|
||||
|
||||
if (!allowedExtensions.includes(fileExtension) || file.size > 200 * 1024) {
|
||||
toastr.warning('Maximum file size allowed is 200KB.', 'File size exceeds limit.');
|
||||
fileInput.value = ""; // Clear the file input
|
||||
document.getElementById("uploadPreview").src = "http://ssl.gstatic.com/accounts/ui/avatar_2x.png"; // Remove the preview image
|
||||
} else {
|
||||
var reader = new FileReader();
|
||||
reader.readAsDataURL(file);
|
||||
|
||||
reader.onload = function (event) {
|
||||
document.getElementById("uploadPreview").src = event.target.result;
|
||||
};
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// function validateFile(input) {
|
||||
// const file = input.files[0];
|
||||
// const allowedExtensions = ["jpg", "jpeg", "png"];
|
||||
// const fileExtension = file.name.split(".").pop().toLowerCase();
|
||||
|
||||
// if (!allowedExtensions.includes(fileExtension)) {
|
||||
// toastr.warning('Only JPG, JPEG, PNG files are allowed.', 'Invalid file type.');
|
||||
// document.getElementById("uploadPreview").src = "http://ssl.gstatic.com/accounts/ui/avatar_2x.png";
|
||||
// input.value = "";
|
||||
// return;
|
||||
// }
|
||||
// }
|
||||
|
||||
function validateFile(input) {
|
||||
const file = input.files[0];
|
||||
const allowedExtensions = ["jpg", "jpeg", "png"];
|
||||
const fileExtension = file.name.split(".").pop().toLowerCase();
|
||||
|
||||
// Check if the file extension is allowed
|
||||
if (!allowedExtensions.includes(fileExtension)) {
|
||||
toastr.warning('Only JPG, JPEG, PNG files are allowed.', 'Invalid file type.');
|
||||
document.getElementById("uploadPreview").src = "";
|
||||
$("#uploadPreview").attr("src", "http://ssl.gstatic.com/accounts/ui/avatar_2x.png");
|
||||
// input.value = "";
|
||||
// return;
|
||||
}
|
||||
const file = input.files[0];
|
||||
const allowedExtensions = ["jpg", "jpeg", "png"];
|
||||
const fileExtension = file.name.split(".").pop().toLowerCase();
|
||||
|
||||
// Check file size
|
||||
const fileSize = file.size / 1024; // in KB
|
||||
if (fileSize > 200) {
|
||||
toastr.warning('Maximum file size allowed is 200KB.', 'File size exceeds limit.');
|
||||
$("#uploadPreview").attr("src", "http://ssl.gstatic.com/accounts/ui/avatar_2x.png");
|
||||
// input.value = "";
|
||||
// return;
|
||||
}
|
||||
|
||||
// Check image dimensions
|
||||
const img = new Image();
|
||||
img.onload = function() {
|
||||
if (this.width !== 100 || this.height !== 100) {
|
||||
toastr.warning('Image dimensions should be 100x100 pixels.', 'Invalid image dimensions.');
|
||||
$("#uploadPreview").attr("src", "http://ssl.gstatic.com/accounts/ui/avatar_2x.png");
|
||||
// input.value = "";
|
||||
// return;
|
||||
// Check if the file extension is allowed
|
||||
if (!allowedExtensions.includes(fileExtension)) {
|
||||
toastr.warning('Only JPG, JPEG, PNG files are allowed.', 'Invalid file type.');
|
||||
$("#uploadPreview").attr("src", "http://ssl.gstatic.com/accounts/ui/avatar_2x.png");
|
||||
input.value = "";
|
||||
}
|
||||
// If both size and dimensions are valid, you can proceed with your logic here
|
||||
// For example, you can display the image
|
||||
const reader = new FileReader();
|
||||
reader.onload = function(e) {
|
||||
document.getElementById("uploadPreview").src = e.target.result;
|
||||
|
||||
|
||||
// Check file size
|
||||
const fileSize = file.size / 1024; // in KB
|
||||
if (fileSize > 200) {
|
||||
toastr.warning('Maximum file size allowed is 200KB.', 'File size exceeds limit.');
|
||||
$("#uploadPreview").attr("src", "http://ssl.gstatic.com/accounts/ui/avatar_2x.png");
|
||||
input.value = "";
|
||||
}
|
||||
|
||||
// Check image dimensions
|
||||
const img = new Image();
|
||||
img.onload = function() {
|
||||
if (this.width !== 100 || this.height !== 100) {
|
||||
toastr.warning('Image dimensions should be 100x100 pixels.', 'Invalid image dimensions.');
|
||||
$("#uploadPreview").attr("src", "http://ssl.gstatic.com/accounts/ui/avatar_2x.png");
|
||||
}
|
||||
// If both size and dimensions are valid, you can proceed with your logic here
|
||||
// For example, you can display the image
|
||||
const reader = new FileReader();
|
||||
reader.onload = function(e) {
|
||||
document.getElementById("uploadPreview").src = e.target.result;
|
||||
};
|
||||
reader.readAsDataURL(file);
|
||||
};
|
||||
reader.readAsDataURL(file);
|
||||
};
|
||||
img.src = URL.createObjectURL(file);
|
||||
img.src = URL.createObjectURL(file);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -140,7 +140,11 @@ $(document).ready(function () {
|
||||
<tr>
|
||||
<td>${item.branch_name}</td>
|
||||
<td>${item.branch_code}</td>
|
||||
<td><a class="mdi mdi-lead-pencil btnBranchEdit" href="#" data-id="${item.id}" style="font-size:18px;"></a></td>
|
||||
<td>
|
||||
<a class="mdi mdi-lead-pencil btnBranchEdit" href="#" data-id="${item.id}" style="font-size:18px;"></a>
|
||||
<a style="color:#02a8b5" data-id="${item.id}" onclick="removeClientBranch(this)"><i data-id="${item.id}" class="mdi mdi-delete" style="font-size:18px;"></i></a>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
`;
|
||||
});
|
||||
@ -281,7 +285,10 @@ $(document).ready(function () {
|
||||
<tr>
|
||||
<td>${item.branch_name}</td>
|
||||
<td>${item.branch_code}</td>
|
||||
<td><a class="mdi mdi-lead-pencil btnBranchEdit" href="#" data-id="${item.id}" style="font-size:18px;"></a></td>
|
||||
<td>
|
||||
<a class="mdi mdi-lead-pencil btnBranchEdit" href="#" data-id="${item.id}" style="font-size:18px;"></a>
|
||||
<a style="color:#02a8b5" data-id="${item.id}" onclick="removeClientBranch(this)"><i data-id="${item.id}" class="mdi mdi-delete" style="font-size:18px;"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
`;
|
||||
});
|
||||
@ -504,4 +511,42 @@ $(document).ready(function () {
|
||||
return false;
|
||||
}
|
||||
|
||||
function removeClientBranch(element) {
|
||||
var id = element.getAttribute('data-id');
|
||||
var form_action = '<?= base_url("client/branch/remove/") ?>' + id;
|
||||
$.ajax({
|
||||
url: form_action,
|
||||
type: "GET",
|
||||
dataType: 'json',
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success: function(res) {
|
||||
// console.log(res.status == true);
|
||||
if(res){
|
||||
if (res.status == true) {
|
||||
toastr.success('Remove Done!', 'success');
|
||||
|
||||
location.reload();
|
||||
|
||||
} else {
|
||||
toastr.warning('Remove Not Done!', 'warning');
|
||||
}
|
||||
}
|
||||
},
|
||||
error: function (xhr, status, error) {
|
||||
console.error(xhr.responseText);
|
||||
console.error(status, error);
|
||||
setTimeout(function() {
|
||||
$('.loader').fadeOut();
|
||||
$('.loader-mask').delay(350).fadeOut('slow');
|
||||
toastr.warning('Something Wrong!', 'warning');
|
||||
}, 1000);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
@ -2,16 +2,17 @@
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row" style="margin-bottom:1rem;">
|
||||
<div class="col-6" style="align-self: center;">
|
||||
|
||||
<h4 class="header-title" style="position: relative;">Client Deposit - <?php echo $clientName[0]['client_name'];?></h4>
|
||||
|
||||
</div>
|
||||
<!-- <div class="col-6" style="text-align: right; position: relative;top: 53px;">
|
||||
<div class="row" style="margin-bottom:1rem;">
|
||||
<div class="col-6" style="align-self: center;">
|
||||
|
||||
<h4 class="header-title" style="position: relative;">Client Deposit -
|
||||
<?php echo $clientName[0]['client_name'];?></h4>
|
||||
|
||||
</div>
|
||||
<!-- <div class="col-6" style="text-align: right; position: relative;top: 53px;">
|
||||
<a href="<?= base_url("client/client_deposit"); ?>" type="button" id="btnAdd" class="btn btn-primary waves-effect waves-light" data-toggle="" data-placement="top" title="Add" data-trigger="hover">ADD</a>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
<table class="table table-sm table-hover m-0 table-centered dt-responsive nowrap w-100" cellspacing="0"
|
||||
id="tickets-table">
|
||||
<thead class="bg-light">
|
||||
@ -21,44 +22,41 @@
|
||||
<th class="font-weight-medium">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
|
||||
<tbody>
|
||||
|
||||
|
||||
<tr>
|
||||
<?php foreach ($clientData as $value): ?>
|
||||
<?php foreach ($clientData as $value): ?>
|
||||
<td>
|
||||
|
||||
<?php echo $value->insurer_name;?>
|
||||
</td>
|
||||
|
||||
<?php echo $value->insurer_name;?>
|
||||
|
||||
</td>
|
||||
|
||||
<td>₹
|
||||
<?php
|
||||
$insurerId = $value->insurer_id;
|
||||
<?php
|
||||
$insurerId = $value->insurer_id;
|
||||
// Check if the balance information exists for the insurer
|
||||
if (isset($balances[$insurerId])) {
|
||||
$balance = $balances[$insurerId]->balance;
|
||||
echo $balance;
|
||||
} else {
|
||||
echo "N/A"; // Display "Not Available" if balance information is not present
|
||||
}
|
||||
?>
|
||||
|
||||
// Check if the balance information exists for the insurer
|
||||
if (isset($balances[$insurerId])) {
|
||||
$balance = $balances[$insurerId]->balance;
|
||||
echo $balance;
|
||||
} else {
|
||||
echo "N/A"; // Display "Not Available" if balance information is not present
|
||||
}
|
||||
?>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<a class="dropdown-item" href="<?= base_url("client/view_deposit/{$value->insurer_id}?client_id={$value->client_id}"); ?>">
|
||||
<i class="mdi mdi-eye mr-2 text-muted font-18 vertical-middle"></i>View Deposit
|
||||
</a>
|
||||
</td>
|
||||
<a class="dropdown-item"
|
||||
href="<?= base_url("client/view_deposit/{$value->insurer_id}?client_id={$value->client_id}"); ?>">
|
||||
<i class="mdi mdi-eye mr-2 text-muted font-18 vertical-middle"></i>View Deposit
|
||||
</a>
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@ -67,22 +65,19 @@
|
||||
<!-- end row -->
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
$(document).ready(function(){
|
||||
|
||||
$('#tickets-table').DataTable({
|
||||
dom: "<'row'<'col-sm-0'f><'col-sm-9 text-right'B>>" ,
|
||||
buttons: [
|
||||
{
|
||||
extend: 'csv',
|
||||
text: 'CSV',
|
||||
title: 'Client_Deposit',
|
||||
className: 'my_class',
|
||||
exportOptions: {
|
||||
columns: ':not(:last-child)'
|
||||
},
|
||||
}
|
||||
],
|
||||
$('#tickets-table').DataTable({
|
||||
dom: "<'row'<'col-sm-0'f><'col-sm-9 text-right'B>>",
|
||||
buttons: [{
|
||||
extend: 'csv',
|
||||
text: 'CSV',
|
||||
title: 'Client_Deposit',
|
||||
className: 'my_class',
|
||||
exportOptions: {
|
||||
columns: ':not(:last-child)'
|
||||
},
|
||||
}],
|
||||
|
||||
|
||||
language: {
|
||||
@ -92,6 +87,5 @@
|
||||
|
||||
});
|
||||
|
||||
})
|
||||
|
||||
})
|
||||
</script>
|
||||
@ -39,7 +39,7 @@
|
||||
<div class="dropdown-menu dropdown-menu-right">
|
||||
<a class="dropdown-item" href="<?= base_url("client/list/"); ?><?= $row->id;?>"><i class="mdi mdi-pencil mr-2 text-muted font-18 vertical-middle"></i>Edit</a>
|
||||
<a class="dropdown-item" href="<?= base_url("client/deposit/{$row->id}"); ?>"><i class="mdi mdi-cash mr-2 text-muted font-18 vertical-middle"></i>Deposit</a>
|
||||
<a class="dropdown-item" href="<?= base_url("client/remove/"); ?><?= $row->id;?>"><i class="mdi mdi-delete mr-2 text-muted font-18 vertical-middle"></i>Delete</a>
|
||||
<a class="dropdown-item" data-id="<?= $row->id;?>" onclick="removeClient(this)"><i class="mdi mdi-delete mr-2 text-muted font-18 vertical-middle"></i>Delete</a>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
@ -83,4 +83,42 @@
|
||||
|
||||
})
|
||||
|
||||
|
||||
|
||||
function removeClient(element) {
|
||||
var id = element.getAttribute('data-id');
|
||||
var form_action = '<?= base_url("client/remove/") ?>' + id;
|
||||
$.ajax({
|
||||
url: form_action,
|
||||
type: "GET",
|
||||
dataType: 'json',
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success: function(res) {
|
||||
// console.log(res.status == true);
|
||||
if(res){
|
||||
if (res.status == true) {
|
||||
toastr.success('Remove Done!', 'success');
|
||||
|
||||
location.reload();
|
||||
|
||||
} else {
|
||||
toastr.warning('Remove Not Done!', 'warning');
|
||||
}
|
||||
}
|
||||
},
|
||||
error: function (xhr, status, error) {
|
||||
console.error(xhr.responseText);
|
||||
console.error(status, error);
|
||||
setTimeout(function() {
|
||||
$('.loader').fadeOut();
|
||||
$('.loader-mask').delay(350).fadeOut('slow');
|
||||
toastr.warning('Something Wrong!', 'warning');
|
||||
}, 1000);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
@ -5,7 +5,7 @@
|
||||
<button type="button" id="BtnAdd" class="btn btn-primary waves-effect waves-light btnAdd btn-sm"><span class="fa fa-plus-square" aria-hidden="true" style="padding: 5px 10px;"></span>Add Policy</button>
|
||||
</div>
|
||||
|
||||
<div class="table-responsive" id="table_list" >
|
||||
<div class="table-responsive" id="table_list" style="height:200px">
|
||||
|
||||
<table class="table table-borderless table-nowrap mb-0">
|
||||
<thead class="thead-light">
|
||||
@ -820,4 +820,9 @@
|
||||
|
||||
}
|
||||
|
||||
|
||||
function removeClientPolicy(element) {
|
||||
console.log(element);
|
||||
}
|
||||
|
||||
</script>
|
||||
@ -123,9 +123,9 @@
|
||||
|
||||
<script>
|
||||
|
||||
var contactCount = 1;
|
||||
var insurer_branch_form_action = '';
|
||||
var insurer_Branch_PrimaryKey = $('#insurer_id_branch').val();
|
||||
var contactCount = 1;
|
||||
var insurer_branch_form_action = '';
|
||||
var insurer_Branch_PrimaryKey = $('#insurer_id_branch').val();
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
@ -207,7 +207,10 @@ var insurer_Branch_PrimaryKey = $('#insurer_id_branch').val();
|
||||
<tr>
|
||||
<td>${item.branch_name}</td>
|
||||
<td>${item.branch_code}</td>
|
||||
<td><a class="btnBranchEdit" data-id="${item.id}" href="#"><i data-id="${item.id}" class="mdi mdi-lead-pencil btnBranchEdit" style="font-size:18px;"></i></a></td>
|
||||
<td>
|
||||
<a class="btnBranchEdit" data-id="${item.id}" href="#"><i data-id="${item.id}" class="mdi mdi-lead-pencil btnBranchEdit" style="font-size:18px;"></i></a>
|
||||
<a style="color:#02a8b5" data-id="${item.id}" onclick="removeInsurerBranch(this)"><i data-id="${item.id}" class="mdi mdi-delete" style="font-size:18px;"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
`;
|
||||
});
|
||||
@ -247,7 +250,10 @@ var insurer_Branch_PrimaryKey = $('#insurer_id_branch').val();
|
||||
<tr>
|
||||
<td>${item.branch_name}</td>
|
||||
<td>${item.branch_code}</td>
|
||||
<td><a class="mdi mdi-lead-pencil btnBranchEdit" href="#" data-id="${item.id}" style="font-size:18px;"></a></td>
|
||||
<td>
|
||||
<a class="mdi mdi-lead-pencil btnBranchEdit" href="#" data-id="${item.id}" style="font-size:18px;"></a>
|
||||
<a style="color:#02a8b5" data-id="${item.id}" onclick="removeInsurerBranch(this)"><i data-id="${item.id}" class="mdi mdi-delete" style="font-size:18px;"></i></a>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
`;
|
||||
@ -462,4 +468,42 @@ var insurer_Branch_PrimaryKey = $('#insurer_id_branch').val();
|
||||
return isValid;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function removeInsurerBranch(element) {
|
||||
var id = element.getAttribute('data-id');
|
||||
var form_action = '<?= base_url("master/insurer/branch/remove/") ?>' + id;
|
||||
$.ajax({
|
||||
url: form_action,
|
||||
type: "GET",
|
||||
dataType: 'json',
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success: function(res) {
|
||||
// console.log(res.status == true);
|
||||
if(res){
|
||||
if (res.status == true) {
|
||||
toastr.success('Remove Done!', 'success');
|
||||
|
||||
location.reload();
|
||||
|
||||
} else {
|
||||
toastr.warning('Remove Not Done!', 'warning');
|
||||
}
|
||||
}
|
||||
},
|
||||
error: function (xhr, status, error) {
|
||||
console.error(xhr.responseText);
|
||||
console.error(status, error);
|
||||
setTimeout(function() {
|
||||
$('.loader').fadeOut();
|
||||
$('.loader-mask').delay(350).fadeOut('slow');
|
||||
toastr.warning('Something Wrong!', 'warning');
|
||||
}, 1000);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
</script>
|
||||
@ -30,7 +30,7 @@
|
||||
<a href="javascript: void(0);" class="dropdown-toggle arrow-none btn btn-light btn-sm" data-toggle="dropdown"aria-expanded="false"><i class="mdi mdi-dots-horizontal"></i></a>
|
||||
<div class="dropdown-menu dropdown-menu-right">
|
||||
<a class="dropdown-item" href="<?= base_url("master/insurer/list/"); ?><?= $row['id'];?>"><i class="mdi mdi-pencil mr-2 text-muted font-18 vertical-middle"></i>Edit</a>
|
||||
<a class="dropdown-item" href="<?= base_url("master/insurer/remove/"); ?><?= $row['id'];?>"><i class="mdi mdi-delete mr-2 text-muted font-18 vertical-middle"></i>Delete</a>
|
||||
<a class="dropdown-item" data-id="<?= $row['id'];?>" onclick="removeInsurer(this)"><i class="mdi mdi-delete mr-2 text-muted font-18 vertical-middle"></i>Delete</a>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
@ -131,4 +131,41 @@ class csvExport {
|
||||
}
|
||||
|
||||
|
||||
function removeInsurer(element) {
|
||||
var id = element.getAttribute('data-id');
|
||||
var form_action = '<?= base_url("master/insurer/remove/") ?>' + id;
|
||||
$.ajax({
|
||||
url: form_action,
|
||||
type: "GET",
|
||||
dataType: 'json',
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success: function(res) {
|
||||
// console.log(res.status == true);
|
||||
if(res){
|
||||
if (res.status == true) {
|
||||
toastr.success('Remove Done!', 'success');
|
||||
|
||||
location.reload();
|
||||
|
||||
} else {
|
||||
toastr.warning('Remove Not Done!', 'warning');
|
||||
}
|
||||
}
|
||||
},
|
||||
error: function (xhr, status, error) {
|
||||
console.error(xhr.responseText);
|
||||
console.error(status, error);
|
||||
setTimeout(function() {
|
||||
$('.loader').fadeOut();
|
||||
$('.loader-mask').delay(350).fadeOut('slow');
|
||||
toastr.warning('Something Wrong!', 'warning');
|
||||
}, 1000);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
@ -137,7 +137,10 @@ $(document).ready(function () {
|
||||
branchTable += `
|
||||
<tr>
|
||||
<td>${item.file_name}</td>
|
||||
<td><a class="btnBranchEdit" data-id="${item.id}" href="#"><i data-id="${item.id}" class="mdi mdi-lead-pencil btnBranchEdit" style="font-size:18px;"></i></a></td>
|
||||
<td>
|
||||
<a class="btnBranchEdit" data-id="${item.id}" href="#"><i data-id="${item.id}" class="mdi mdi-lead-pencil btnBranchEdit" style="font-size:18px;"></i></a>
|
||||
<a style="color:#02a8b5" data-id="${item.id}" onclick="removeKYCDocs(this)"><i data-id="${item.id}" class="mdi mdi-delete" style="font-size:18px;"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
`;
|
||||
});
|
||||
@ -178,7 +181,10 @@ $(document).ready(function () {
|
||||
insurerBranchTableInsert += `
|
||||
<tr>
|
||||
<td>${item.file_name}</td>
|
||||
<td><a class="btnBranchEdit" data-id="${item.id}" href="#"><i data-id="${item.id}" class="mdi mdi-lead-pencil btnBranchEdit" style="font-size:18px;"></i></a></td>
|
||||
<td>
|
||||
<a class="btnBranchEdit" data-id="${item.id}" href="#"><i data-id="${item.id}" class="mdi mdi-lead-pencil btnBranchEdit" style="font-size:18px;"></i></a>
|
||||
<a style="color:#02a8b5" data-id="${item.id}" onclick="removeKYCDocs(this)"><i data-id="${item.id}" class="mdi mdi-delete" style="font-size:18px;"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
`;
|
||||
});
|
||||
@ -279,7 +285,10 @@ $(document).ready(function () {
|
||||
insurerBranchTableInsert += `
|
||||
<tr>
|
||||
<td>${item.file_name}</td>
|
||||
<td><a class="btnBranchEdit" data-id="${item.id}"><i data-id="${item.id}" class="mdi mdi-lead-pencil btnBranchEdit" style="font-size:18px;"></i></a></td>
|
||||
<td>
|
||||
<a class="btnBranchEdit" data-id="${item.id}"><i data-id="${item.id}" class="mdi mdi-lead-pencil btnBranchEdit" style="font-size:18px;"></i></a>
|
||||
<a style="color:#02a8b5" data-id="${item.id}" onclick="removeKYCDocs(this)"><i data-id="${item.id}" class="mdi mdi-delete" style="font-size:18px;"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
`;
|
||||
});
|
||||
@ -300,4 +309,41 @@ $(document).ready(function () {
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
function removeKYCDocs(element) {
|
||||
var id = element.getAttribute('data-id');
|
||||
var form_action = '<?= base_url("master/kyc/kycdocs/remove/") ?>' + id;
|
||||
$.ajax({
|
||||
url: form_action,
|
||||
type: "GET",
|
||||
dataType: 'json',
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success: function(res) {
|
||||
// console.log(res.status == true);
|
||||
if(res){
|
||||
if (res.status == true) {
|
||||
toastr.success('Remove Done!', 'success');
|
||||
|
||||
location.reload();
|
||||
|
||||
} else {
|
||||
toastr.warning('Remove Not Done!', 'warning');
|
||||
}
|
||||
}
|
||||
},
|
||||
error: function (xhr, status, error) {
|
||||
console.error(xhr.responseText);
|
||||
console.error(status, error);
|
||||
setTimeout(function() {
|
||||
$('.loader').fadeOut();
|
||||
$('.loader-mask').delay(350).fadeOut('slow');
|
||||
toastr.warning('Something Wrong!', 'warning');
|
||||
}, 1000);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
@ -28,7 +28,7 @@
|
||||
<a href="javascript: void(0);" class="dropdown-toggle arrow-none btn btn-light btn-sm" data-toggle="dropdown"aria-expanded="false"><i class="mdi mdi-dots-horizontal"></i></a>
|
||||
<div class="dropdown-menu dropdown-menu-right">
|
||||
<a class="dropdown-item" href="<?= base_url("master/kyc/list/"); ?><?= $row['id'];?>"><i class="mdi mdi-pencil mr-2 text-muted font-18 vertical-middle"></i>Edit</a>
|
||||
<a class="dropdown-item" href="#"><i class="mdi mdi-delete mr-2 text-muted font-18 vertical-middle"></i>Delete</a>
|
||||
<a class="dropdown-item" data-id="<?= $row['id'];?>" onclick="removeKYC(this)"><i class="mdi mdi-delete mr-2 text-muted font-18 vertical-middle"></i>Delete</a>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
@ -129,4 +129,44 @@ class csvExport {
|
||||
}
|
||||
|
||||
|
||||
|
||||
function removeKYC(element) {
|
||||
var id = element.getAttribute('data-id');
|
||||
var form_action = '<?= base_url("master/kyc/remove/") ?>' + id;
|
||||
$.ajax({
|
||||
url: form_action,
|
||||
type: "GET",
|
||||
dataType: 'json',
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success: function(res) {
|
||||
// console.log(res.status == true);
|
||||
if(res){
|
||||
if (res.status == true) {
|
||||
toastr.success('Remove Done!', 'success');
|
||||
|
||||
location.reload();
|
||||
|
||||
} else {
|
||||
toastr.warning('Remove Not Done!', 'warning');
|
||||
}
|
||||
}
|
||||
},
|
||||
error: function (xhr, status, error) {
|
||||
console.error(xhr.responseText);
|
||||
console.error(status, error);
|
||||
setTimeout(function() {
|
||||
$('.loader').fadeOut();
|
||||
$('.loader-mask').delay(350).fadeOut('slow');
|
||||
toastr.warning('Something Wrong!', 'warning');
|
||||
}, 1000);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
@ -206,12 +206,12 @@
|
||||
/* color: #02a8b5 !important; */
|
||||
font-size: 12px;
|
||||
}
|
||||
.form-group {
|
||||
/* margin-bottom: -0.2rem !important; */
|
||||
/* .form-group {
|
||||
margin-bottom: -0.2rem !important;
|
||||
}
|
||||
.form-row{
|
||||
/* width: 84%; */
|
||||
}
|
||||
width: 84%;
|
||||
} */
|
||||
|
||||
</style>
|
||||
|
||||
@ -375,7 +375,7 @@
|
||||
<a href="javascript:void(0);" class="dropdown-item notify-item">
|
||||
<div class="notify-icon bg-secondary">
|
||||
<i class="mdi mdi-heart"></i>
|
||||
</div>
|
||||
</div>composer create-project laravel/laravel:^11.0 example-app
|
||||
<p class="notify-details">Carlos Crouch liked
|
||||
<b>Admin</b>
|
||||
<small class="text-muted">13 days ago</small>
|
||||
@ -502,7 +502,7 @@
|
||||
|
||||
<!-- LOGO -->
|
||||
<div class="logo-box">
|
||||
<a href="https://localhost/nhance/dashboard/view" class="logo logo-dark text-center">
|
||||
<a href="<?= base_url('/dashboard/view')?>" class="logo logo-dark text-center">
|
||||
<span class="logo-sm">
|
||||
<img src="<?= base_url()."public"; ?>/assets/images/logo-sm-dark.png" alt="" height="24">
|
||||
<!-- <span class="logo-lg-text-light">nHance</span> -->
|
||||
@ -513,7 +513,7 @@
|
||||
</span>
|
||||
</a>
|
||||
|
||||
<a href="https://localhost/nhance/dashboard/view" class="logo logo-light text-center">
|
||||
<a href="<?= base_url('/dashboard/view')?>" class="logo logo-light text-center">
|
||||
<span class="logo-sm">
|
||||
<img src="<?= base_url()."public"; ?>/assets/images/n.png" alt="" height="24">
|
||||
</span>
|
||||
|
||||
@ -187,7 +187,10 @@ $(document).ready(function () {
|
||||
<tr>
|
||||
<td>${item.insurer_id}</td>
|
||||
<td>${item.name}</td>
|
||||
<td><a class="btnBranchEdit" data-id="${item.id}" href="#"><i data-id="${item.id}" class="mdi mdi-lead-pencil btnBranchEdit" style="font-size:18px;"></i></a></td>
|
||||
<td>
|
||||
<a class="btnBranchEdit" data-id="${item.id}" href="#"><i data-id="${item.id}" class="mdi mdi-lead-pencil btnBranchEdit" style="font-size:18px;"></i></a>
|
||||
<a style="color:#02a8b5" data-id="${item.id}" onclick="removePolicies(this)"><i data-id="${item.id}" class="mdi mdi-delete" style="font-size:18px;"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
`;
|
||||
});
|
||||
@ -228,7 +231,10 @@ $(document).ready(function () {
|
||||
<tr>
|
||||
<td>${item.insurer_id}</td>
|
||||
<td>${item.name}</td>
|
||||
<td><a class="btnBranchEdit" data-id="${item.id}" href="#"><i data-id="${item.id}" class="mdi mdi-lead-pencil btnBranchEdit" style="font-size:18px;"></i></a></td>
|
||||
<td>
|
||||
<a class="btnBranchEdit" data-id="${item.id}" href="#"><i data-id="${item.id}" class="mdi mdi-lead-pencil btnBranchEdit" style="font-size:18px;"></i></a>
|
||||
<a style="color:#02a8b5" data-id="${item.id}" onclick="removePolicies(this)"><i data-id="${item.id}" class="mdi mdi-delete" style="font-size:18px;"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
`;
|
||||
});
|
||||
@ -350,7 +356,10 @@ $(document).ready(function () {
|
||||
<tr>
|
||||
<td value=''>${item.insurer.name}</td>
|
||||
<td>${item.policy.name}</td>
|
||||
<td><a class="btnBranchEdit" data-id="${item.policy.id}"><i data-id="${item.policy.id}" class="mdi mdi-lead-pencil btnBranchEdit" style="font-size:18px;"></i></a></td>
|
||||
<td>
|
||||
<a class="btnBranchEdit" data-id="${item.policy.id}"><i data-id="${item.policy.id}" class="mdi mdi-lead-pencil btnBranchEdit" style="font-size:18px;"></i></a>
|
||||
<a style="color:#02a8b5" data-id="${item.id}" onclick="removePolicies(this)"><i data-id="${item.id}" class="mdi mdi-delete" style="font-size:18px;"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
`;
|
||||
});
|
||||
@ -372,4 +381,42 @@ $(document).ready(function () {
|
||||
|
||||
});
|
||||
|
||||
|
||||
function removePolicies(element) {
|
||||
var id = element.getAttribute('data-id');
|
||||
var form_action = '<?= base_url("master/policy/policies/remove/") ?>' + id;
|
||||
$.ajax({
|
||||
url: form_action,
|
||||
type: "GET",
|
||||
dataType: 'json',
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success: function(res) {
|
||||
// console.log(res.status == true);
|
||||
if(res){
|
||||
if (res.status == true) {
|
||||
toastr.success('Remove Done!', 'success');
|
||||
|
||||
// $('#branch_table').empty();
|
||||
|
||||
location.reload();
|
||||
|
||||
} else {
|
||||
toastr.warning('Remove Not Done!', 'warning');
|
||||
}
|
||||
}
|
||||
},
|
||||
error: function (xhr, status, error) {
|
||||
console.error(xhr.responseText);
|
||||
console.error(status, error);
|
||||
setTimeout(function() {
|
||||
$('.loader').fadeOut();
|
||||
$('.loader-mask').delay(350).fadeOut('slow');
|
||||
toastr.warning('Something Wrong!', 'warning');
|
||||
}, 1000);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
@ -34,7 +34,7 @@
|
||||
<a href="javascript: void(0);" class="dropdown-toggle arrow-none btn btn-light btn-sm" data-toggle="dropdown"aria-expanded="false"><i class="mdi mdi-dots-horizontal"></i></a>
|
||||
<div class="dropdown-menu dropdown-menu-right">
|
||||
<a class="dropdown-item" href="<?= base_url("master/policy/list/"); ?><?= $row['id'];?>"><i class="mdi mdi-pencil mr-2 text-muted font-18 vertical-middle"></i>Edit</a>
|
||||
<a class="dropdown-item" href="#"><i class="mdi mdi-delete mr-2 text-muted font-18 vertical-middle"></i>Delete</a>
|
||||
<a class="dropdown-item" data-id="<?= $row['id'];?>" onclick="removePolciyType(this)"><i class="mdi mdi-delete mr-2 text-muted font-18 vertical-middle"></i>Delete</a>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
@ -135,4 +135,42 @@ class csvExport {
|
||||
}
|
||||
|
||||
|
||||
function removePolciyType(element) {
|
||||
var id = element.getAttribute('data-id');
|
||||
var form_action = '<?= base_url("master/policy/remove/") ?>' + id;
|
||||
$.ajax({
|
||||
url: form_action,
|
||||
type: "GET",
|
||||
dataType: 'json',
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success: function(res) {
|
||||
// console.log(res.status == true);
|
||||
if(res){
|
||||
if (res.status == true) {
|
||||
toastr.success('Remove Done!', 'success');
|
||||
|
||||
location.reload();
|
||||
|
||||
} else {
|
||||
toastr.warning('Remove Not Done!', 'warning');
|
||||
}
|
||||
}
|
||||
},
|
||||
error: function (xhr, status, error) {
|
||||
console.error(xhr.responseText);
|
||||
console.error(status, error);
|
||||
setTimeout(function() {
|
||||
$('.loader').fadeOut();
|
||||
$('.loader-mask').delay(350).fadeOut('slow');
|
||||
toastr.warning('Something Wrong!', 'warning');
|
||||
}, 1000);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
@ -243,7 +243,10 @@ $(document).ready(function () {
|
||||
<tr>
|
||||
<td>${item.branch_name}</td>
|
||||
<td>${item.branch_code}</td>
|
||||
<td><a class="mdi mdi-lead-pencil btnBranchEdit" href="#" data-id="${item.id}" style="font-size:18px;"></a></td>
|
||||
<td>
|
||||
<a class="mdi mdi-lead-pencil btnBranchEdit" href="#" data-id="${item.id}" style="font-size:18px;"></a>
|
||||
<a style="color:#02a8b5" data-id="${item.id}" onclick="removeTPABranch(this)"><i data-id="${item.id}" class="mdi mdi-delete" style="font-size:18px;"></i></a>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
`;
|
||||
@ -347,7 +350,10 @@ $(document).ready(function () {
|
||||
<tr>
|
||||
<td>${item.branch_name}</td>
|
||||
<td>${item.branch_code}</td>
|
||||
<td><a class="mdi mdi-lead-pencil btnBranchEdit" href="#" data-id="${item.id}" style="font-size:18px;"></a></td>
|
||||
<td>
|
||||
<a class="mdi mdi-lead-pencil btnBranchEdit" href="#" data-id="${item.id}" style="font-size:18px;"></a>
|
||||
<a style="color:#02a8b5" data-id="${item.id}" onclick="removeTPABranch(this)"><i data-id="${item.id}" class="mdi mdi-delete" style="font-size:18px;"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
`;
|
||||
});
|
||||
@ -496,4 +502,38 @@ function validateForm() {
|
||||
return isValid;
|
||||
}
|
||||
|
||||
|
||||
function removeTPABranch(element) {
|
||||
var id = element.getAttribute('data-id');
|
||||
var form_action = '<?= base_url("master/tpa/branch/remove/") ?>' + id;
|
||||
$.ajax({
|
||||
url: form_action,
|
||||
type: "GET",
|
||||
dataType: 'json',
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success: function(res) {
|
||||
// console.log(res.status == true);
|
||||
if(res){
|
||||
if (res.status == true) {
|
||||
toastr.success('Remove Done!', 'success');
|
||||
|
||||
location.reload();
|
||||
|
||||
} else {
|
||||
toastr.warning('Remove Not Done!', 'warning');
|
||||
}
|
||||
}
|
||||
},
|
||||
error: function (xhr, status, error) {
|
||||
console.error(xhr.responseText);
|
||||
console.error(status, error);
|
||||
setTimeout(function() {
|
||||
$('.loader').fadeOut();
|
||||
$('.loader-mask').delay(350).fadeOut('slow');
|
||||
toastr.warning('Something Wrong!', 'warning');
|
||||
}, 1000);
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@ -28,7 +28,7 @@
|
||||
<a href="javascript: void(0);" class="dropdown-toggle arrow-none btn btn-light btn-sm" data-toggle="dropdown"aria-expanded="false"><i class="mdi mdi-dots-horizontal"></i></a>
|
||||
<div class="dropdown-menu dropdown-menu-right">
|
||||
<a class="dropdown-item" href="<?= base_url("master/tpa/list/"); ?><?= $row['id'];?>"><i class="mdi mdi-pencil mr-2 text-muted font-18 vertical-middle"></i>Edit</a>
|
||||
<a class="dropdown-item" href="#"><i class="mdi mdi-delete mr-2 text-muted font-18 vertical-middle"></i>Delete</a>
|
||||
<a class="dropdown-item" data-id="<?= $row['id'];?>" onclick="removeTPA(this)"><i class="mdi mdi-delete mr-2 text-muted font-18 vertical-middle"></i>Delete</a>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
@ -129,4 +129,41 @@ class csvExport {
|
||||
}
|
||||
|
||||
|
||||
function removeTPA(element) {
|
||||
var id = element.getAttribute('data-id');
|
||||
var form_action = '<?= base_url("master/tpa/remove/") ?>' + id;
|
||||
$.ajax({
|
||||
url: form_action,
|
||||
type: "GET",
|
||||
dataType: 'json',
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success: function(res) {
|
||||
// console.log(res.status == true);
|
||||
if(res){
|
||||
if (res.status == true) {
|
||||
toastr.success('Remove Done!', 'success');
|
||||
|
||||
location.reload();
|
||||
|
||||
} else {
|
||||
toastr.warning('Remove Not Done!', 'warning');
|
||||
}
|
||||
}
|
||||
},
|
||||
error: function (xhr, status, error) {
|
||||
console.error(xhr.responseText);
|
||||
console.error(status, error);
|
||||
setTimeout(function() {
|
||||
$('.loader').fadeOut();
|
||||
$('.loader-mask').delay(350).fadeOut('slow');
|
||||
toastr.warning('Something Wrong!', 'warning');
|
||||
}, 1000);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
@ -1,55 +1,63 @@
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="text-center">
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-xl-5">
|
||||
<div class="py-1">
|
||||
<i class="font-24"></i>
|
||||
<h4 >Deposit Summary Of <?php echo $clientData->short_name?></h4>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-8 col-xl-7">
|
||||
<div class="py-1">
|
||||
<i class=" font-24"></i>
|
||||
|
||||
|
||||
<h4><?php echo $insurerName->name; ?></h4>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row mt-3 text-center">
|
||||
<div class="col-3">
|
||||
<p class="text-muted font-15 mb-1 text-truncate">Deposits</p>
|
||||
<h4 style="font-size: 26px;"><i class="fe-arrow-up text-success mr-1"></i>₹<?php echo $deposiamount->total_credit?></h4>
|
||||
</div>
|
||||
|
||||
<div class="col-3">
|
||||
<p class="text-muted font-15 mb-1 text-truncate">Consumed</p>
|
||||
<h4 style="font-size: 26px;"><i class="fe-arrow-down text-danger mr-1"></i>₹<?php echo $deposiamount->total_withdraw?></h4>
|
||||
</div>
|
||||
<div class="col-3">
|
||||
<p class="text-muted font-15 mb-1 text-truncate">Refund</p>
|
||||
<h4 style="font-size: 26px;"><i class="fe-arrow-up text-success mr-1"></i>₹<?php echo $deposiamount->total_refund?></h4>
|
||||
</div>
|
||||
<div class="col-3">
|
||||
<p class="text-muted font-15 mb-1 text-truncate">Current Balance</p>
|
||||
<h4 style="font-size: 26px;"><i class="fe-credit-card text-sucess mr-1"></i>₹<?php echo $deposiamount->balance?></h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="text-center">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6 col-xl-5">
|
||||
<div class="py-1">
|
||||
<i class="font-24"></i>
|
||||
<h4>Deposit Summary Of <?php echo $clientData->short_name?></h4>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 col-xl-5">
|
||||
<div class="py-1">
|
||||
<i class=" font-24"></i>
|
||||
<h4><?php echo $insurerName->name; ?></h4>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row mt-3 text-center">
|
||||
|
||||
<div class="col-3">
|
||||
<p class="text-muted font-15 mb-1 text-truncate">Deposits</p>
|
||||
<h4 style="font-size: 26px;"><i
|
||||
class="fe-arrow-up text-success mr-1"></i>₹<?php echo $deposiamount->total_credit?>
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
<div class="col-3">
|
||||
<p class="text-muted font-15 mb-1 text-truncate">Consumed</p>
|
||||
<h4 style="font-size: 26px;"><i
|
||||
class="fe-arrow-down text-danger mr-1"></i>₹<?php echo $deposiamount->total_withdraw?>
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
<div class="col-3">
|
||||
<p class="text-muted font-15 mb-1 text-truncate">Refund</p>
|
||||
<h4 style="font-size: 26px;"><i
|
||||
class="fe-arrow-up text-success mr-1"></i>₹<?php echo $deposiamount->total_refund?>
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
<div class="col-3">
|
||||
<p class="text-muted font-15 mb-1 text-truncate">Current Balance</p>
|
||||
<h4 style="font-size: 26px;"><i
|
||||
class="fe-credit-card text-sucess mr-1"></i>₹<?php echo $deposiamount->balance?>
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- start page title -->
|
||||
<div class="row">
|
||||
<!-- <div class="row">
|
||||
<div class="col-12">
|
||||
<div class="page-title-box page-title-box-alt">
|
||||
<h4 class="page-title"></h4>
|
||||
@ -57,70 +65,66 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end page title -->
|
||||
</div> -->
|
||||
<!-- end page title -->
|
||||
<div class="row" id="List-page">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row" style="margin-bottom:1rem;">
|
||||
<div class="col-6" style="align-self: center;">
|
||||
<h4 class="header-title" style="position: relative;">Transaction Details</h4>
|
||||
</div>
|
||||
<div class="col-6" style="text-align: right; position: relative;top: 51px;
|
||||
right: 31px;">
|
||||
<button type="button" id="btnAdd" class="btn btn-primary waves-effect waves-light" data-toggle="modal" data-target="#addTransactionModal">New</button>
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin-bottom:1rem;">
|
||||
<div class="col-6" style="align-self: center;">
|
||||
<h4 class="header-title" style="position: relative;">Transaction Details</h4>
|
||||
</div>
|
||||
<table class="table table-sm table-hover m-0 table-centered dt-responsive nowrap w-100" cellspacing="0" id="tickets-table">
|
||||
<thead class="bg-light">
|
||||
<div class="col-6" style="text-align: right; position: relative;top: 53px;">
|
||||
<button type="button" id="btnAdd" class="btn btn-primary waves-effect waves-light"
|
||||
data-toggle="modal" data-target="#addTransactionModal">New</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table class="table table-sm table-hover m-0 table-centered dt-responsive nowrap w-100" cellspacing="0"
|
||||
id="tickets-table">
|
||||
<thead class="bg-light">
|
||||
<tr>
|
||||
|
||||
|
||||
<th class="font-weight-medium">Date</th>
|
||||
<th class="font-weight-medium">User</th>
|
||||
<th class="font-weight-medium">Description</th>
|
||||
<th class="font-weight-medium">Sub Type</th>
|
||||
<th class="font-weight-medium">Credit</th>
|
||||
<th class="font-weight-medium">Debit</th>
|
||||
|
||||
<th class="font-weight-medium">Balnce</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($depositdata as $row) { ?>
|
||||
<tr id="<?php echo $row->id;?>">
|
||||
<td class=""><?php echo date('d-m-y h:i A', strtotime($row->created_at)); ?></td>
|
||||
<th class="font-weight-medium">Balance</th>
|
||||
|
||||
<td><?php echo $row->username; ?></td>
|
||||
<td><?php echo $row->description; ?></td>
|
||||
<td><?php echo isset($subTypeOptions[$row->sub_type]) ? $subTypeOptions[$row->sub_type] : ''; ?></td>
|
||||
<td><?php echo ($row->transaction_type == 'Credit') ? $row->amount : ''; ?></td>
|
||||
<td><?php echo ($row->transaction_type == 'Debit') ? $row->amount : ''; ?></td>
|
||||
<td><?php echo $row->balance; ?></td>
|
||||
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($depositdata as $row) { ?>
|
||||
<tr id="<?php echo $row->id;?>">
|
||||
<td class=""><?php echo date('d-m-y h:i A', strtotime($row->created_at)); ?></td>
|
||||
<td><?php echo $row->username; ?></td>
|
||||
<td><?php echo $row->description; ?></td>
|
||||
<td><?php echo isset($subTypeOptions[$row->sub_type]) ? $subTypeOptions[$row->sub_type] : ''; ?>
|
||||
</td>
|
||||
<td><?php echo ($row->transaction_type == 'Credit') ? $row->amount : ''; ?></td>
|
||||
<td><?php echo ($row->transaction_type == 'Debit') ? $row->amount : ''; ?></td>
|
||||
<td><?php echo $row->balance; ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end col -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- Add this modal markup at the end of your HTML body -->
|
||||
<!-- end col -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- Add this modal markup at the end of your HTML body -->
|
||||
<!-- Button to trigger modal -->
|
||||
|
||||
<!-- Add this modal markup at the end of your HTML body -->
|
||||
<div class="modal fade" id="addTransactionModal" tabindex="-1" role="dialog" aria-labelledby="addTransactionModalLabel" aria-hidden="true">
|
||||
<div class="modal fade" id="addTransactionModal" tabindex="-1" role="dialog" aria-labelledby="addTransactionModalLabel"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
@ -131,15 +135,17 @@
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="transactionMode" class="control-label">Transaction Mode</label>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="radio" name="transactionMode" id="addMode" value="add" checked>
|
||||
<input class="form-check-input" type="radio" name="transactionMode" id="addMode"
|
||||
value="add" checked>
|
||||
<label class="form-check-label" for="addMode">Deposit</label>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="radio" name="transactionMode" id="adjustmentMode" value="adjustment">
|
||||
<input class="form-check-input" type="radio" name="transactionMode" id="adjustmentMode"
|
||||
value="adjustment">
|
||||
<label class="form-check-label" for="adjustmentMode">Adjustment</label>
|
||||
</div>
|
||||
</div>
|
||||
@ -150,7 +156,7 @@
|
||||
<input type="number" class="form-control" id="amount" placeholder="Amount">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="row" id="transactionTypeRow" style="display:none;">
|
||||
<div class="col-md-6">
|
||||
@ -167,19 +173,20 @@
|
||||
<div class="col-md-12">
|
||||
<div class="form-group no-margin">
|
||||
<label for="description" class="control-label">Description</label>
|
||||
<textarea class="form-control" id="description" placeholder="Write something about the transaction"></textarea>
|
||||
<textarea class="form-control" id="description"
|
||||
placeholder="Write something about the transaction"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="subType" class="control-label"style="display: none;">Transaction Sub Type</label>
|
||||
<select class="form-control" id="subType" name="sub_type"style="display: none;">
|
||||
<option value="Deposit"hidden>Deposit</option>
|
||||
<option value="Adjustment"hidden>Adjustment</option>
|
||||
<!-- Add more options as needed -->
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<label for="subType" class="control-label" style="display: none;">Transaction Sub Type</label>
|
||||
<select class="form-control" id="subType" name="sub_type" style="display: none;">
|
||||
<option value="Deposit" hidden>Deposit</option>
|
||||
<option value="Adjustment" hidden>Adjustment</option>
|
||||
<!-- Add more options as needed -->
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary" id="saveTransactionBtn">Save Transaction</button>
|
||||
@ -189,33 +196,29 @@
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$('input[name="transactionMode"]').change(function () {
|
||||
if ($(this).val() === 'adjustment') {
|
||||
$('#transactionTypeRow').show();
|
||||
} else {
|
||||
$('#transactionTypeRow').hide();
|
||||
}
|
||||
});
|
||||
$(document).ready(function() {
|
||||
$('input[name="transactionMode"]').change(function() {
|
||||
if ($(this).val() === 'adjustment') {
|
||||
$('#transactionTypeRow').show();
|
||||
} else {
|
||||
$('#transactionTypeRow').hide();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
$('#tickets-table').DataTable({
|
||||
dom: "<'row'<'col-sm-0'f><'col-sm-9 text-right'B>>" ,
|
||||
buttons: [
|
||||
{
|
||||
extend: 'csv',
|
||||
text: 'CSV',
|
||||
title: 'TransactionDetails',
|
||||
exportOptions: {
|
||||
columns: ''
|
||||
}
|
||||
dom: "<'row'<'col-sm-0'f><'col-sm-9 text-right'B>>",
|
||||
buttons: [{
|
||||
extend: 'csv',
|
||||
text: 'CSV',
|
||||
title: 'TransactionDetails',
|
||||
exportOptions: {
|
||||
columns: ''
|
||||
}
|
||||
],
|
||||
}],
|
||||
|
||||
|
||||
language: {
|
||||
@ -225,80 +228,80 @@ $(document).ready(function () {
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
<!-- Include jQuery library (if not already included) -->
|
||||
|
||||
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
// Event listener for radio buttons
|
||||
$('input[name="transactionMode"]').change(function () {
|
||||
if ($(this).val() === 'add') {
|
||||
// Set the hidden input value to 'Deposit' when 'Deposit' radio button is selected
|
||||
$('#subType').val('Deposit');
|
||||
} else if ($(this).val() === 'adjustment') {
|
||||
// Set the hidden input value to 'Adjustment' when 'Adjustment' radio button is selected
|
||||
$('#subType').val('Adjustment');
|
||||
$(document).ready(function() {
|
||||
// Event listener for radio buttons
|
||||
$('input[name="transactionMode"]').change(function() {
|
||||
if ($(this).val() === 'add') {
|
||||
// Set the hidden input value to 'Deposit' when 'Deposit' radio button is selected
|
||||
$('#subType').val('Deposit');
|
||||
} else if ($(this).val() === 'adjustment') {
|
||||
// Set the hidden input value to 'Adjustment' when 'Adjustment' radio button is selected
|
||||
$('#subType').val('Adjustment');
|
||||
}
|
||||
});
|
||||
|
||||
$('#saveTransactionBtn').on('click', function() {
|
||||
// Collect data from modal fields
|
||||
var amount = $('#amount').val();
|
||||
var description = $('#description').val();
|
||||
var clientId = '<?php echo $clientData->id; ?>';
|
||||
var insurerId = '<?php echo $insurerName->id; ?>';
|
||||
var transactionType;
|
||||
if ($('#addMode').is(':checked')) {
|
||||
transactionType =
|
||||
'Credit'; // Assuming 'Credit' is the default when the 'Deposit' radio button is selected
|
||||
} else if ($('#adjustmentMode').is(':checked') && $('#transactionTypeRow').is(':visible')) {
|
||||
transactionType = $('#transactionType').val();
|
||||
} else {
|
||||
transactionType = ''; // You might want to handle this case based on your requirements
|
||||
}
|
||||
|
||||
// Fetch sub_type_id based on the selected sub_type
|
||||
var subTypeOptions = {
|
||||
'Deposit': 1,
|
||||
'Adjustment': 2,
|
||||
'Deletion': 3,
|
||||
// Add more options as needed
|
||||
};
|
||||
|
||||
var subType = $('#subType').val();
|
||||
var subTypeId = subTypeOptions[subType] || null;
|
||||
|
||||
if (subTypeId === null) {
|
||||
// Handle the case where sub_type is not found in the options
|
||||
alert('Invalid sub_type selected.');
|
||||
return;
|
||||
}
|
||||
|
||||
// Send data to the server using Ajax
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: '<?= base_url()."client/save_deposit" ?>',
|
||||
data: {
|
||||
amount: amount,
|
||||
description: description,
|
||||
transaction_type: transactionType,
|
||||
sub_type: subType,
|
||||
sub_type_id: subTypeId, // Include sub_type_id
|
||||
client_id: clientId,
|
||||
insurer_id: insurerId
|
||||
},
|
||||
success: function(response) {
|
||||
// Handle success response
|
||||
console.log("Transaction saved successfully");
|
||||
// Reload the page or perform other actions as needed
|
||||
location.reload();
|
||||
},
|
||||
error: function(error) {
|
||||
// Handle error response
|
||||
console.error(error);
|
||||
}
|
||||
});
|
||||
|
||||
$('#saveTransactionBtn').on('click', function () {
|
||||
// Collect data from modal fields
|
||||
var amount = $('#amount').val();
|
||||
var description = $('#description').val();
|
||||
var clientId = '<?php echo $clientData->id; ?>';
|
||||
var insurerId = '<?php echo $insurerName->id; ?>';
|
||||
var transactionType;
|
||||
if ($('#addMode').is(':checked')) {
|
||||
transactionType = 'Credit'; // Assuming 'Credit' is the default when the 'Deposit' radio button is selected
|
||||
} else if ($('#adjustmentMode').is(':checked') && $('#transactionTypeRow').is(':visible')) {
|
||||
transactionType = $('#transactionType').val();
|
||||
} else {
|
||||
transactionType = ''; // You might want to handle this case based on your requirements
|
||||
}
|
||||
|
||||
// Fetch sub_type_id based on the selected sub_type
|
||||
var subTypeOptions = {
|
||||
'Deposit': 1,
|
||||
'Adjustment': 2,
|
||||
'Deletion': 3,
|
||||
// Add more options as needed
|
||||
};
|
||||
|
||||
var subType = $('#subType').val();
|
||||
var subTypeId = subTypeOptions[subType] || null;
|
||||
|
||||
if (subTypeId === null) {
|
||||
// Handle the case where sub_type is not found in the options
|
||||
alert('Invalid sub_type selected.');
|
||||
return;
|
||||
}
|
||||
|
||||
// Send data to the server using Ajax
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: '<?= base_url()."client/save_deposit" ?>',
|
||||
data: {
|
||||
amount: amount,
|
||||
description: description,
|
||||
transaction_type: transactionType,
|
||||
sub_type: subType,
|
||||
sub_type_id: subTypeId, // Include sub_type_id
|
||||
client_id: clientId,
|
||||
insurer_id: insurerId
|
||||
},
|
||||
success: function (response) {
|
||||
// Handle success response
|
||||
console.log("Transaction saved successfully");
|
||||
// Reload the page or perform other actions as needed
|
||||
location.reload();
|
||||
},
|
||||
error: function (error) {
|
||||
// Handle error response
|
||||
console.error(error);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
});
|
||||
</script>
|
||||
BIN
public/assets/images/avatar_2x.png
Normal file
BIN
public/assets/images/avatar_2x.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 626 B |
Loading…
Reference in New Issue
Block a user