Merge branch 'test' of bitbucket.org:jubilian/nhance into test
This commit is contained in:
commit
d8dd315b26
@ -118,7 +118,10 @@ $routes->group("/master", ["filter" => "authMVC"], function($routes){
|
|||||||
|
|
||||||
|
|
||||||
$routes->group("insurer", ["filter" => "authMVC"], function($routes){
|
$routes->group("insurer", ["filter" => "authMVC"], function($routes){
|
||||||
|
|
||||||
|
|
||||||
$routes->get("list", "MasterController::insurerList");
|
$routes->get("list", "MasterController::insurerList");
|
||||||
|
$routes->get("remove/(:any)", "MasterController::insurerRemove/$1");
|
||||||
$routes->get("create", "MasterController::insurerOnboarding");
|
$routes->get("create", "MasterController::insurerOnboarding");
|
||||||
$routes->post("createpost", "MasterController::createInsurerGeneralInfo");
|
$routes->post("createpost", "MasterController::createInsurerGeneralInfo");
|
||||||
$routes->post("edit", "MasterController::editInsurerGeneralInfo");
|
$routes->post("edit", "MasterController::editInsurerGeneralInfo");
|
||||||
|
|||||||
@ -154,6 +154,7 @@ class ClientController extends AdminController
|
|||||||
{
|
{
|
||||||
$headerData['page_name'] = 'Client Deposit';
|
$headerData['page_name'] = 'Client Deposit';
|
||||||
|
|
||||||
|
$data['clientName'] = $this->clientModel->where('id',$id)->find();
|
||||||
$data['clientData'] = $this->clientPolicyModel->getinsurerswithclientid($id);
|
$data['clientData'] = $this->clientPolicyModel->getinsurerswithclientid($id);
|
||||||
$data['depositsummary'] = $this->clientPolicyModel->getDepositlistsummary($id);
|
$data['depositsummary'] = $this->clientPolicyModel->getDepositlistsummary($id);
|
||||||
|
|
||||||
@ -281,16 +282,20 @@ class ClientController extends AdminController
|
|||||||
{
|
{
|
||||||
$this->myLogger->logme('error','edit client general info function called');
|
$this->myLogger->logme('error','edit client general info function called');
|
||||||
$uploadFilePath = ROOTPATH . 'public/uploads/logo/';
|
$uploadFilePath = ROOTPATH . 'public/uploads/logo/';
|
||||||
|
// print_r($this->request->getFile('client_logo'));die;
|
||||||
$file_name = file_Upload($this->request->getFile('client_logo'), $uploadFilePath);
|
$file_name = file_Upload($this->request->getFile('client_logo'), $uploadFilePath);
|
||||||
$id = $this->request->getPost('PrimaryKey');
|
$id = $this->request->getPost('PrimaryKey');
|
||||||
$data = $this->request->getPost();
|
$data = $this->request->getPost();
|
||||||
$data['updated_by'] = get_session_userid();
|
$data['updated_by'] = get_session_userid();
|
||||||
|
$data['client_logo'] = $file_name;
|
||||||
|
|
||||||
if (!isset($data['is_download_btn'])) {
|
if (!isset($data['is_download_btn'])) {
|
||||||
$data['is_download_btn'] = 0;
|
$data['is_download_btn'] = 0;
|
||||||
} elseif ($data['is_download_btn']) {
|
} elseif ($data['is_download_btn']) {
|
||||||
$data['is_download_btn'] = 1;
|
$data['is_download_btn'] = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// print_r($data);die;
|
||||||
|
|
||||||
$update = $this->clientModel->update($id,$data);
|
$update = $this->clientModel->update($id,$data);
|
||||||
|
|
||||||
|
|||||||
@ -85,7 +85,31 @@ class MasterController extends AdminController
|
|||||||
// $this->loadLayout('insurer_onboarding', $data);
|
// $this->loadLayout('insurer_onboarding', $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function insurerRemove($id = null)
|
||||||
|
{
|
||||||
|
$this->myLogger->logme('error','Insurer Remove function called');
|
||||||
|
// $id = $this->request->getPost('PrimaryKey');
|
||||||
|
$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();
|
||||||
|
}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();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public function editInsurerOnboarding($id = null)
|
public function editInsurerOnboarding($id = null)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@ -282,17 +282,20 @@ input:checked + .slider:before {
|
|||||||
}, 1000);
|
}, 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#client_id').val(res.data.id);
|
var idToUse = res.data.id ? res.data.id : res.data.PrimaryKey;
|
||||||
$('#general_PrimaryKey').val(res.data.id);
|
|
||||||
$('#client_id_relation').val(res.data.id);
|
$('#client_id').val(idToUse);
|
||||||
$('#relation_PrimaryKey').val(res.data.id);
|
$('#general_PrimaryKey').val(idToUse);
|
||||||
$('#client_id_branch').val(res.data.id);
|
$('#client_id_relation').val(idToUse);
|
||||||
$('#client_id_for_client_branch').val(res.data.id);
|
$('#relation_PrimaryKey').val(idToUse);
|
||||||
$('#client_id_policy').val(res.data.id);
|
$('#client_id_branch').val(idToUse);
|
||||||
$('#policy_PrimaryKey').val(res.data.id);
|
$('#client_id_for_client_branch').val(idToUse);
|
||||||
$('#client_id_kyc').val(res.data.id);
|
$('#client_id_policy').val(idToUse);
|
||||||
$('#kyc_PrimaryKey').val(res.data.id);
|
$('#policy_PrimaryKey').val(idToUse);
|
||||||
$('#Client_id').val(res.data.id);
|
$('#client_id_kyc').val(idToUse);
|
||||||
|
$('#kyc_PrimaryKey').val(idToUse);
|
||||||
|
$('#Client_id').val(idToUse);
|
||||||
|
|
||||||
$('#entity_type').val(res.data.entity_type_id);
|
$('#entity_type').val(res.data.entity_type_id);
|
||||||
|
|
||||||
|
|
||||||
@ -362,15 +365,22 @@ input:checked + .slider:before {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function PreviewImage() {
|
function PreviewImage() {
|
||||||
var oFReader = new FileReader();
|
var file = document.getElementById("client_logo").files[0];
|
||||||
oFReader.readAsDataURL(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) {
|
oFReader.onload = function (oFREvent) {
|
||||||
document.getElementById("uploadPreview").src = oFREvent.target.result;
|
document.getElementById("uploadPreview").src = oFREvent.target.result;
|
||||||
};
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// function validateFile(input) {
|
// function validateFile(input) {
|
||||||
// const file = input.files[0];
|
// const file = input.files[0];
|
||||||
// const allowedExtensions = ["jpg", "jpeg", "png"];
|
// const allowedExtensions = ["jpg", "jpeg", "png"];
|
||||||
@ -394,8 +404,8 @@ input:checked + .slider:before {
|
|||||||
toastr.warning('Only JPG, JPEG, PNG files are allowed.', 'Invalid file type.');
|
toastr.warning('Only JPG, JPEG, PNG files are allowed.', 'Invalid file type.');
|
||||||
document.getElementById("uploadPreview").src = "";
|
document.getElementById("uploadPreview").src = "";
|
||||||
$("#uploadPreview").attr("src", "http://ssl.gstatic.com/accounts/ui/avatar_2x.png");
|
$("#uploadPreview").attr("src", "http://ssl.gstatic.com/accounts/ui/avatar_2x.png");
|
||||||
input.value = "";
|
// input.value = "";
|
||||||
return;
|
// return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check file size
|
// Check file size
|
||||||
@ -403,8 +413,8 @@ input:checked + .slider:before {
|
|||||||
if (fileSize > 200) {
|
if (fileSize > 200) {
|
||||||
toastr.warning('Maximum file size allowed is 200KB.', 'File size exceeds limit.');
|
toastr.warning('Maximum file size allowed is 200KB.', 'File size exceeds limit.');
|
||||||
$("#uploadPreview").attr("src", "http://ssl.gstatic.com/accounts/ui/avatar_2x.png");
|
$("#uploadPreview").attr("src", "http://ssl.gstatic.com/accounts/ui/avatar_2x.png");
|
||||||
input.value = "";
|
// input.value = "";
|
||||||
return;
|
// return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check image dimensions
|
// Check image dimensions
|
||||||
@ -413,8 +423,8 @@ input:checked + .slider:before {
|
|||||||
if (this.width !== 100 || this.height !== 100) {
|
if (this.width !== 100 || this.height !== 100) {
|
||||||
toastr.warning('Image dimensions should be 100x100 pixels.', 'Invalid image dimensions.');
|
toastr.warning('Image dimensions should be 100x100 pixels.', 'Invalid image dimensions.');
|
||||||
$("#uploadPreview").attr("src", "http://ssl.gstatic.com/accounts/ui/avatar_2x.png");
|
$("#uploadPreview").attr("src", "http://ssl.gstatic.com/accounts/ui/avatar_2x.png");
|
||||||
input.value = "";
|
// input.value = "";
|
||||||
return;
|
// return;
|
||||||
}
|
}
|
||||||
// If both size and dimensions are valid, you can proceed with your logic here
|
// If both size and dimensions are valid, you can proceed with your logic here
|
||||||
// For example, you can display the image
|
// For example, you can display the image
|
||||||
|
|||||||
@ -200,6 +200,13 @@ $(document).ready(function () {
|
|||||||
$('#branch_city').val('');
|
$('#branch_city').val('');
|
||||||
$('#branch_form')[0].reset();
|
$('#branch_form')[0].reset();
|
||||||
$('.ac').css('display', 'block');
|
$('.ac').css('display', 'block');
|
||||||
|
$('.parsley-errors-list').remove();
|
||||||
|
|
||||||
|
$('#branch_form').parsley().reset();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
contactCount = 1
|
contactCount = 1
|
||||||
|
|
||||||
var buttonIds = JSON.parse(localStorage.getItem('buttonIds')) || [];
|
var buttonIds = JSON.parse(localStorage.getItem('buttonIds')) || [];
|
||||||
@ -316,7 +323,7 @@ $(document).ready(function () {
|
|||||||
$('.loader-mask').delay(350).fadeOut('slow');
|
$('.loader-mask').delay(350).fadeOut('slow');
|
||||||
}, 500);
|
}, 500);
|
||||||
|
|
||||||
console.log('branch contact : ',res.contact)
|
// console.log('branch contact : ',res.contact)
|
||||||
|
|
||||||
$('#add_branch').show();
|
$('#add_branch').show();
|
||||||
$('#branch_table').hide();
|
$('#branch_table').hide();
|
||||||
@ -335,7 +342,7 @@ $(document).ready(function () {
|
|||||||
$('#designation').val(res.contact[0].designation);
|
$('#designation').val(res.contact[0].designation);
|
||||||
|
|
||||||
res.contact.shift();
|
res.contact.shift();
|
||||||
console.log(res.contact.length)
|
// console.log(res.contact.length)
|
||||||
for (let index = 0; index < res.contact.length; index++) {
|
for (let index = 0; index < res.contact.length; index++) {
|
||||||
const contact = res.contact[index];
|
const contact = res.contact[index];
|
||||||
if (contact !== undefined) {
|
if (contact !== undefined) {
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
<div class="row" style="margin-bottom:1rem;">
|
<div class="row" style="margin-bottom:1rem;">
|
||||||
<div class="col-6" style="align-self: center;">
|
<div class="col-6" style="align-self: center;">
|
||||||
|
|
||||||
<h4 class="header-title" style="position: relative;">Client Deposit - <?php print_r($clientData[0]->client_name);?><?php?></h4>
|
<h4 class="header-title" style="position: relative;">Client Deposit - <?php echo $clientName[0]['client_name'];?></h4>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="col-6" style="text-align: right; position: relative;top: 53px;">
|
<!-- <div class="col-6" style="text-align: right; position: relative;top: 53px;">
|
||||||
|
|||||||
@ -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>
|
<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">
|
<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/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" href="<?= base_url("master/insurer/remove/"); ?><?= $row['id'];?>"><i class="mdi mdi-delete mr-2 text-muted font-18 vertical-middle"></i>Delete</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user