nhance/app/Views/client_onboarding.php
2024-09-13 09:00:09 +05:30

247 lines
8.1 KiB
PHP
Executable File

<style>
body {
.multiselect-native-select {
position: relative;
/* bottom: 32px; */
select {
border: 0 !important;
clip: rect(0 0 0 0) !important;
height: 1px !important;
margin: -1px -1px -1px -3px !important;
overflow: hidden !important;
padding: 0 !important;
position: absolute !important;
width: 1px !important;
left: 50%;
top: 30px;
}
}
.multiselect-container{
width: 100% !important;
}
.multiselect-selected-text{
float: left !important;
}
}
.navtab-bg .nav-link {
margin: 0 5px 10px!important;
}
</style>
<div class="row" id="client_add">
<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;">Client Onboarding <?php if(isset($client)) {echo ' - ' . $client['client_name']; } ?></h4>
</div>
<div class="col-6" style="text-align: right;">
<a href="<?= base_url("client/list"); ?>"><i class="fas fa-arrow-left" style="font-size: 17px;"></i></a>
</div>
</div>
<br>
<ul class="nav nav-pills navtab-bg">
<li class="nav-item">
<a href="#general-q-tab" data-toggle="tab" aria-expanded="false"
class="nav-link px-3 py-2 active" id="general_tab">
<span class="mr-1"><i class="mdi mdi-contacts"></i></span>
<span class="d-none d-sm-inline-block">General</span>
</a>
</li>
<li class="nav-item">
<a href="#KYC-DOC-tab" data-toggle="tab" aria-expanded="true" class="nav-link px-3 py-2" id="kyc_tab">
<span class="mr-1"><i class="fa fa-file"></i></span>
<span class="d-none d-sm-inline-block">KYC Docs</span>
</a>
</li>
<li class="nav-item">
<a href="#RM-tab" data-toggle="tab" aria-expanded="true" class="nav-link px-3 py-2" id="RM_tab">
<span class="mr-1"><i class="mdi mdi-account-switch"></i></span>
<span class="d-none d-sm-inline-block"> Relationship Manager</span>
</a>
</li>
<li class="nav-item">
<a href="#branch-tab" data-toggle="tab" aria-expanded="false" class="nav-link px-3 py-2" id="branch_tab">
<span class="mr-1"><i class="mdi mdi-source-branch"></i></span>
<span class="d-none d-sm-inline-block">Branch & Contacts</span>
</a>
</li>
<li class="nav-item">
<a href="#notification-tab" data-toggle="tab" aria-expanded="false" class="nav-link px-3 py-2" id="notification_tab">
<span class="mr-1"><i class="mdi mdi-bell"></i></span>
<span class="d-none d-sm-inline-block">Notifications</span>
</a>
</li>
<li class="nav-item">
<a href="#police-tab" data-toggle="tab" aria-expanded="false" class="nav-link px-3 py-2" id="policy_tab">
<span class="mr-1"><i class="mdi mdi-book-open-page-variant"></i></span>
<span class="d-none d-sm-inline-block">Policies</span>
</a>
</li>
</ul>
<div class="tab-content">
<?php include('notification.php'); ?>
<?php include('client_basic_info.php'); ?>
<?php include('client_kyc.php'); ?>
<?php include('client_rm.php'); ?>
<?php include('client_branch.php'); ?>
<?php include('client_policy.php'); ?>
</div>
</div>
</div>
</div>
</div>
<script>
// $(document).ready(function(){
// var tabid = localStorage.getItem('tabId');
// console.log(tabid)
// $('#'+tabid).click();
// localStorage.removeItem('tabId')
// })
// $('#general_tab').click( function (){
// localStorage.setItem('tabId', 'general_tab')
// })
// $('#KYC-DOC-tab').click( function (){
// localStorage.setItem('tabId', 'kyc_tab')
// })
// $('#RM_tab').click( function (){
// localStorage.setItem('tabId', 'RM_tab')
// })
// $('#branch_tab').click( function (){
// localStorage.setItem('tabId', 'branch_tab')
// })
// $('#policy_tab').click( function (){
// localStorage.setItem('tabId', 'policy_tab')
// })
</script>
<script>
function client_kyc_docs() {
var check_client_id = $('#general_PrimaryKey');
if(check_client_id[0].value == '' || check_client_id[0].value == null || check_client_id[0].value == 0){
$('#btnBranchAdd').hide();
toastr.warning('Please Add the Client!', 'warning',{timeOut: 2000});
}else{
if ($('#btnBranchBack')[0].style.display == 'none') {
$('#btnBranchAdd').show();
}
}
}
function client_relationship_manager() {
var check_client_id = $('#general_PrimaryKey');
if(check_client_id[0].value == '' || check_client_id[0].value == null || check_client_id[0].value == 0){
$('#relation_form').hide();
toastr.warning('Please Add the Client!', 'warning',{timeOut: 2000});
}else{
$('#relation_form').show();
}
}
function client_policies() {
var check_client_id = $('#general_PrimaryKey');
if(check_client_id[0].value == '' || check_client_id[0].value == null || check_client_id[0].value == 0){
$('#BtnAdd').hide();
toastr.warning('Please Add the Client!', 'warning',{timeOut: 2000});
}else{
if ($('#btnPolicyBack')[0].style.display == 'none') {
$('#BtnAdd').show();
}
}
}
function client_branch_contact() {
var check_client_id = $('#general_PrimaryKey');
if(check_client_id[0].value == '' || check_client_id[0].value == null || check_client_id[0].value == 0){
$('#btnBranchAdd').hide();
toastr.warning('Please Add the Client!', 'warning',{timeOut: 2000});
}else{
if ($('#btnBranchBack')[0].style.display == 'none') {
$('#btnBranchAdd').show();
}
}
}
function client_notification() {
var check_client_id = $('#general_PrimaryKey');
if(check_client_id[0].value == '' || check_client_id[0].value == null || check_client_id[0].value == 0){
$('#notification-tab').hide();
toastr.warning('Please Add the Client!', 'warning',{timeOut: 2000});
}else{
if ($('#notification-tab')[0].style.display == 'none') {
$('#notification-tab').show();
}
}
}
document.getElementById("kyc_tab").addEventListener("click", function(event) {
event.preventDefault();
client_kyc_docs();
});
document.getElementById("RM_tab").addEventListener("click", function(event) {
event.preventDefault();
client_relationship_manager();
});
document.getElementById("policy_tab").addEventListener("click", function(event) {
event.preventDefault();
client_policies();
});
document.getElementById("branch_tab").addEventListener("click", function(event) {
event.preventDefault();
client_branch_contact();
});
document.getElementById("notification_tab").addEventListener("click", function(event) {
event.preventDefault();
client_notification();
});
</script>