diff --git a/.env.sample b/.env.sample index 91edae4c..6af188a4 100644 --- a/.env.sample +++ b/.env.sample @@ -20,7 +20,7 @@ CI_ENVIRONMENT = development # APP #-------------------------------------------------------------------- -app.baseURL = 'https://localhost/PHP828APPS/ruc/ci4/' +app.baseURL = 'http://localhost/nhance/' # If you have trouble with `.`, you could also use `_`. # app_baseURL = '' # app.forceGlobalSecureRequests = false @@ -30,18 +30,20 @@ app.baseURL = 'https://localhost/PHP828APPS/ruc/ci4/' # DATABASE #-------------------------------------------------------------------- -database.default.hostname = localhost -database.default.database = ruc -database.default.username = root -database.default.password = + + +database.default.hostname = 119.18.54.85 +database.default.database = venbaehn_nhance +database.default.username = venbaehn_nhance_user1 +database.default.password = 'iM~X7(cR+}A-' # database.default.DBDriver = MySQLi # database.default.DBPrefix = # database.default.port = 3306 -# database.tests.hostname = localhost -# database.tests.database = ci4_test -# database.tests.username = root -# database.tests.password = root +database.default.hostname = 119.18.54.85 +database.default.database = venbaehn_nhance +database.default.username = venbaehn_nhance_user1 +database.default.password = 'iM~X7(cR+}A-' # database.tests.DBDriver = MySQLi # database.tests.DBPrefix = # database.tests.port = 3306 @@ -141,3 +143,13 @@ database.default.password = #-------------------------------------------------------------------- # curlrequest.shareOptions = true + +#-------------------------------------------------------------------- +# Google-OAUTH-Credentials +#-------------------------------------------------------------------- + +GOOGLE_OAUTH_APP_NAME = 'OAuth' +GOOGLE_OAUTH_CLIENT_ID = '696241936560-m2mr272ge7vr2n4q36c22l3d2gdgi90l.apps.googleusercontent.com' +GOOGLE_OAUTH_CLIENT_SECRET = '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' +GOOGLE_OAUTH_REDIRECT_URI = 'http://localhost/nhance/oauth2callback' +GOOGLE_OAUTH_SCOPES = "https://www.googleapis.com/auth/userinfo.email,https://www.googleapis.com/auth/userinfo.profile" diff --git a/app/Config/Autoload.php b/app/Config/Autoload.php index 62937931..dfba0156 100755 --- a/app/Config/Autoload.php +++ b/app/Config/Autoload.php @@ -99,5 +99,5 @@ class Autoload extends AutoloadConfig * @var string[] * @phpstan-var list */ - public $helpers = ['uuid','session','utility', 'form', 'url', 'oauth']; + public $helpers = ['uuid','session','utility', 'form', 'url', 'oauth', 'fileupload']; } diff --git a/app/Config/Routes.php b/app/Config/Routes.php index e99166a6..37773ad4 100644 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -32,30 +32,33 @@ $routes->group("/client", ["filter" => "authMVC"], function($routes){ $routes->get("list", "ClientController::index"); $routes->get("create", "ClientController::clientOnboarding"); + $routes->get("list/(:any)", "ClientController::editClientOnboarding/$1"); $routes->group("general", ["filter" => "authMVC"], function($routes){ - $routes->get("create", "ClientController::clientGeneralInfoData"); - $routes->post("create", "ClientController::createClientGeneralInfo"); + $routes->post("create", "ClientController::createClientGeneralInfo"); + $routes->post("edit", "ClientController::editClientGeneralInfo"); }); - $routes->group("relation", ["filter" => "authMVC"], function($routes){ - $routes->get("list", "ClientController::index"); - $routes->get("create", "ClientController::clientCreate"); - $routes->post("create", "ClientController::clientCreate"); - }); + $routes->group("branch", ["filter" => "authMVC"], function($routes){ - $routes->get("list", "ClientController::index"); - $routes->get("create", "ClientController::clientCreate"); - $routes->post("create", "ClientController::clientCreate"); - }); + $routes->post("create", "ClientController::createClientBranch"); + $routes->post("edit", "ClientController::editClientBranch"); + $routes->get("list/(:any)", "ClientController::getSingleBranchDataById/$1"); + }); + + $routes->group("relation", ["filter" => "authMVC"], function($routes){ + $routes->post("create", "ClientController::createClientRelation"); + $routes->post("edit", "ClientController::editClientRelation"); + }); $routes->group("policy", ["filter" => "authMVC"], function($routes){ - $routes->get("list", "ClientController::index"); - $routes->get("create", "ClientController::clientCreate"); - $routes->post("create", "ClientController::clientCreate"); + $routes->post("create", "ClientController::createClientPolicy"); + $routes->post("edit", "ClientController::editClientPolicy"); + $routes->get("list/(:any)", "ClientController::getClientPolicyById/$1"); }); $routes->group("kyc", ["filter" => "authMVC"], function($routes){ - $routes->get("list", "ClientController::index"); - $routes->get("create", "ClientController::clientCreate"); - $routes->post("create", "ClientController::clientCreate"); + $routes->post("create", "ClientController::createClientKYCInfo"); + $routes->post("edit", "ClientController::editClientKYCInfo"); + $routes->get("list/(:any)", "ClientController::getKycDocsById/$1"); + $routes->get("delete/(:any)", "ClientController::deleteClientKycDocs/$1"); }); }); @@ -69,6 +72,8 @@ $routes->group("/employee", ["filter" => "authMVC"], function($routes){ $routes->group("/util", ["filter" => "authMVC"], function($routes){ $routes->get("clients-with-policies", "EmployeeController::getClientWithPolicies"); + $routes->get("police-by-insurer/(:any)", "ClientController::getPolicesByInsurerId/$1"); }); -$routes->cli('processjob', 'JobWorker::processJob'); \ No newline at end of file +$routes->cli('processjob', 'JobWorker::processJob'); + diff --git a/app/Config/Security.php b/app/Config/Security.php index f1d8da93..f136322a 100644 --- a/app/Config/Security.php +++ b/app/Config/Security.php @@ -71,7 +71,7 @@ class Security extends BaseConfig * * Regenerate CSRF Token on every submission. */ - public bool $regenerate = true; + public bool $regenerate = false; /** * -------------------------------------------------------------------------- diff --git a/app/Controllers/ClientController.php b/app/Controllers/ClientController.php index f56c0d36..0b321f69 100644 --- a/app/Controllers/ClientController.php +++ b/app/Controllers/ClientController.php @@ -6,6 +6,7 @@ use CodeIgniter\HTTP\IncomingRequest; use CodeIgniter\HTTP\RequestInterface; use CodeIgniter\HTTP\ResponseInterface; use Psr\Log\LoggerInterface; +use CodeIgniter\API\ResponseTrait; use App\Models\UserModel; use App\Models\ClientModel; @@ -21,10 +22,14 @@ use App\Models\LevelContactModel; use App\Models\PolicesModel; use App\Models\TPABranchModel; use App\Models\TPAModel; +use App\Models\StateModel; class ClientController extends AdminController -{ +{ + use ResponseTrait; + + protected $myLogger; protected $clientModel; protected $userModel; protected $clientBranchModel; @@ -39,12 +44,14 @@ class ClientController extends AdminController protected $policesModel; protected $tpaBranchModel; protected $tpaModel; + protected $stateModel; public function __construct() { - parent::__construct(); - + set_session_context('Client'); + $this->myLogger = \Config\Services::mylogger(); + $this->clientModel = new ClientModel(); $this->userModel = new UserModel(); $this->clientBranchModel = new ClientBranchModel(); @@ -59,33 +66,431 @@ class ClientController extends AdminController $this->policesModel = new PolicesModel(); $this->tpaBranchModel = new TPABranchModel(); $this->tpaModel = new TPAModel(); + $this->stateModel = new StateModel(); } public function index() { - echo view('layout/header'); - echo view('client_list'); + $this->myLogger->logme('error','Client list function called'); + $headerData['page_name'] = 'Client List'; + $data['clientList'] = $this->clientModel->getCreatedByUserName(); + $data['client_rm'] = $this->clientRMModel->getAllClientRM(); + // echo '
';
+        // print_r($data); die;
+        echo view('layout/header', $headerData);
+        echo view('client_list', $data);
         echo view('layout/footer');
+
+        // $this->loadLayout('client_onboarding', $data);
     }
 
-    public function clientOnboarding(){
+    public function clientOnboarding()
+    {
+        
+        $this->myLogger->logme('error','Client Onboarding function called');
+        $headerData['page_name'] = 'Client Onboarding';
 
-        $data['contact_level'] = ['1'=>'level 1', '2'=>'level 2', '3'=>'level 3'];
         $data['entity']        = $this->kycEntityTypeModel->findAll();
         $data['kyc_docs']      = $this->kycDocsModel->findAll();
         $data['police']        = $this->policesModel->findAll();
         $data['insurer']       = $this->insurerBranchModel ->getInsurerBranchesWithInsurerNames();
+        $data['tpa']           = $this->tpaBranchModel ->getTpaBranchesWithTpaNames();
+        $data['state']         = $this->stateModel->getAllStates();
         $data['RM']            = $this->userModel->findAll();
-        
-        echo view('layout/header');
+                
+        // echo "
";
+        // print_r($data); die;
+
+        echo view('layout/header', $headerData);
         echo view('client_onboarding', $data);
         echo view('layout/footer');
 
-        // $this->loadLayout('client_onboarding', $data);
     }    
      
-    
-    public function createClientGeneralInfo(){
-        
+    public function editClientOnboarding($id = null)
+    {
+
+        $this->myLogger->logme('error','Edit Client Onboarding function called');
+        $headerData['page_name'] = 'Edit Client Onboarding';
+
+        $editData['RM']            = $this->userModel->findAll();
+        $editData['tpa']           = $this->tpaBranchModel ->getTpaBranchesWithTpaNames();
+        $editData['state']         = $this->stateModel->getAllStates();
+        $editData['police']        = $this->policesModel->findAll();
+        $editData['entity']        = $this->kycEntityTypeModel->findAll();
+        $editData['insurer']       = $this->insurerBranchModel ->getInsurerBranchesWithInsurerNames();
+        $editData['kyc_docs']      = $this->kycDocsModel->findAll();
+
+
+        $editData['client']           = $this->clientModel->where(['id' => $id, 'is_active' => 1])->first();
+        $editData['client_kyc']       = $this->clientKYCDocsModel->getKycDocsName($id);
+        $editData['client_branch']    = $this->clientBranchModel->where(['client_id' => $id, 'is_active' => 1])->findAll();
+        $editData['client_relation']  = $this->clientRMModel->where(['client_id' => $id, 'is_active' => 1])->findAll();
+        $editData['client_policy']    = $this->clientPolicyModel->getClientPolicyByClientId($id);
+
+
+                
+        // echo "
";
+        // print_r($editData); die;
+
+        echo view('layout/header', $headerData);
+        echo view('client_onboarding', $editData);
+        echo view('layout/footer');
+
     }
+     
+    public function createClientGeneralInfo()
+    {
+
+        $this->myLogger->logme('error','Client general info function called');
+        $data   = $this->request->getPost();
+        $data['created_by'] = get_session_userid();
+        $insert = $this->clientModel->insert($data);
+        if($insert){
+            $client_data = $this->clientModel->where(['id' => $insert, 'is_active' => 1])->first();
+            echo json_encode(array("status" => true , 'data' => $client_data));
+        }else{
+            echo json_encode(array("status" => false));
+        }
+    }
+
+    public function editClientGeneralInfo()
+    {
+        $this->myLogger->logme('error','edit client general info function called');
+        $id                 = $this->request->getPost('PrimaryKey');
+        $data               = $this->request->getPost();
+        $data['updated_by'] = get_session_userid();
+        $update             = $this->clientModel->update($id,$data);
+        if($update){
+            echo json_encode(array("status" => true , 'data' => $data));
+        }else{
+            echo json_encode(array("status" => false));
+        }
+    }
+    
+    public function createClientKYCInfo()
+    {
+        $this->myLogger->logme('error','create Client kyc function called');        
+        $File = file_Upload($this->request->getFile('file_name'));
+        if(!empty($File)){
+            $data['file_name'] = $File;
+        }
+
+        $data['client_id'] = $this->request->getPost('client_id');
+        $data['kyc_doc_type_id'] = $this->request->getPost('kyc_doc_id');
+        $data['created_by'] = get_session_userid();
+        $insert = $this->clientKYCDocsModel->insert($data);
+        if($insert){
+            $kycDocs = $this->clientKYCDocsModel->getKycDocsName($this->request->getPost('client_id'));
+            echo json_encode(array("status" => true , 'data' => $kycDocs));
+        }else{
+            echo json_encode(array("status" => false));
+        }
+    }
+
+    public function editClientKYCInfo()
+    {
+       
+        $this->myLogger->logme('error','edit client kyc function called');        
+        $File = file_Upload($this->request->getFile('file_name'));
+        if(!empty($File)){
+            $data['file_name'] = $File;
+        }
+        $id                 = $this->request->getPost('PrimaryKey');
+        $data['client_id']  = $id;
+        $data['kyc_doc_type_id'] = $this->request->getPost('kyc_doc_id');
+        $data['updated_by'] = get_session_userid();
+        $insert = $this->clientKYCDocsModel->insert($data);
+        if($insert){
+            $kycDocs = $this->clientKYCDocsModel->getKycDocsName($id);
+            echo json_encode(array("status" => true , 'data' => $kycDocs));
+        }else{
+            echo json_encode(array());
+        }
+    }
+
+    public function deleteClientKycDocs($id=null)
+    {
+        
+        $delete = $this->clientKYCDocsModel->where('id', $id)->delete();
+        if($delete){
+            echo json_encode(array("status" => true ));
+        }else{
+            echo json_encode(array("status" => false));
+        }
+    }
+
+    public function createClientRelation()
+    {
+
+        $this->myLogger->logme('error','Client relation function called');
+
+        $data['client_id'] = $this->request->getPost('client_id');
+        $data['created_by'] = get_session_userid();
+        $inserted = false; 
+        
+        if ($this->request->getPost('head')) {
+            $data['level'] = "1";
+            $data['user_id'] = $this->request->getPost('head');
+            $inserted = $this->clientRMModel->insert($data);
+        }
+        
+        if ($this->request->getPost('manager')) {
+            $data['level'] = "2";
+            $data['user_id'] = $this->request->getPost('manager');
+            $inserted = $this->clientRMModel->insert($data);
+        }
+        
+        if ($this->request->getPost('account_manager')) {
+            $data['level'] = "3";
+            foreach ($this->request->getPost('account_manager') as $value) {
+                $data['user_id'] = $value;
+                $inserted = $this->clientRMModel->insert($data);
+            }
+        }
+        
+        if ($inserted) {
+            echo json_encode(array("status" => true, 'data' => $this->request->getPost()));
+        } else {
+            echo json_encode(array("status" => false));
+        }
+    }
+
+    public function editClientRelation()
+    {
+        $this->myLogger->logme('error','Client relation function called');
+        
+        $id                 = $this->request->getPost('PrimaryKey');
+        $data['client_id']  = $this->request->getPost('client_id');
+        $data['updated_by'] = get_session_userid();
+        $inserted = false; 
+        
+        if ($this->request->getPost('head')) {
+            $data['user_id'] = $this->request->getPost('head');
+            $checkHead = $this->clientRMModel->checkExistenceOfClientRelation($id, $this->request->getPost('head'), 1);
+            if($checkHead){
+                $inserted = $this->clientRMModel->where('client_id', $id )->where('level', 1)->set($data)->update();
+            }else{
+                $data['level'] = "1";
+                $data['user_id'] = $this->request->getPost('head');
+                $inserted = $this->clientRMModel->insert($data);
+            }
+        }
+        
+        if ($this->request->getPost('manager')) {
+            $data['user_id'] = $this->request->getPost('manager');
+            $checkHead = $this->clientRMModel->checkExistenceOfClientRelation($id, $this->request->getPost('manager'), 2);
+            if($checkHead){
+                $inserted = $this->clientRMModel->where('client_id', $id )->where('level', 2)->set($data)->update();
+            }else{
+                $data['level'] = "2";
+                $data['user_id'] = $this->request->getPost('manager');
+                $inserted = $this->clientRMModel->insert($data);
+            }
+        }
+        
+        if ($this->request->getPost('account_manager')) {
+
+            $this->clientRMModel->where('client_id', $id)->where('level', 3)->delete();
+            $data['level'] = "3";
+            foreach ($this->request->getPost('account_manager') as $value) {
+                $data['user_id'] = $value;
+                $inserted = $this->clientRMModel->insert($data);
+            }
+        }
+        
+        $lastQuery = $this->clientRMModel->getLastQuery();
+
+        if ($inserted) {
+            echo json_encode(array("status" => true, 'data' => $this->request->getPost(), "place" => 'edit'));
+        } else {
+            echo json_encode(array("status" => false, "place" => 'edit'));
+        }
+    }
+
+    public function createClientBranch()
+    {
+
+        $this->myLogger->logme('error','Client branch CREATE function called');
+        $data   = $this->request->getPost();
+        $data['created_by'] = get_session_userid();
+        $insert = $this->clientBranchModel->insert($data);
+        
+        if($insert){
+            for ($i = 0; $i < count($this->request->getPost('name')); $i++) {
+                // Prepare data to insert
+                $data = [
+                    'contact_type' => 'client',
+                    'ref_id'       => $insert,
+                    'created_by'   => get_session_userid(),
+                    'name'         => $this->request->getPost('name')[$i],
+                    'email'        => $this->request->getPost('email')[$i],
+                    'mobile'       => $this->request->getPost('mobile')[$i],
+                    'designation'  => $this->request->getPost('designation')[$i]
+                ];
+                $contacts = $this->levelContactModel->insert($data);
+            }
+        }
+
+        if($insert){
+            $branchData = $this->clientBranchModel->where('client_id', $this->request->getPost('client_id'))->findAll();
+            echo json_encode(array("status" => true , 'data' => $branchData));
+        }else{
+            echo json_encode(array("status" => false));
+        }
+    }
+
+    public function editClientBranch()
+    {
+
+        $this->myLogger->logme('error','Client branch EDIT function called');
+        $id     = $this->request->getPost('PrimaryKey');
+        $client_id     = $this->request->getPost('client_id');
+        $data   = $this->request->getPost();
+        $data['updated_by'] = get_session_userid();
+        $insert = $this->clientBranchModel->update($id, $data);
+        $this->myLogger->logme('error','Client branch EDITED by {data}', ['data' => get_session_userid()]);
+
+
+        if($insert){
+
+            $this->levelContactModel->where('ref_id', $id)->where('contact_type', 'client')->delete();
+            for ($i = 0; $i < count($this->request->getPost('name')); $i++) {
+                $data = [
+                    'contact_type' => 'client',
+                    'ref_id'       => $id,
+                    'updated_by'   => get_session_userid(),
+                    'name'         => $this->request->getPost('name')[$i],
+                    'email'        => $this->request->getPost('email')[$i],
+                    'mobile'       => $this->request->getPost('mobile')[$i],
+                    'designation'  => $this->request->getPost('designation')[$i]
+                ];
+                $contacts = $this->levelContactModel->insert($data);
+            }
+        }
+
+        if($insert){
+            $branchData = $this->clientBranchModel->where('client_id', $client_id)->findAll();
+            echo json_encode(array("status" => true , 'data' => $branchData));
+        }else{
+            echo json_encode(array("status" => false));
+        }
+    }
+
+    public function createClientPolicy()
+    {
+
+        $this->myLogger->logme('error','Client policy CREATE function called');
+
+        $insurerValue = (string) $this->request->getPost('insurer');
+        list($insurerBranchId, $insurerId) = explode('-', $insurerValue);
+
+        $data['insurer_branch_id'] = $insurerBranchId;
+        $data['insurer_id'] = $insurerId;
+
+        $tpaValue = (string) $this->request->getPost('tpa');
+        list($tpaBranchId, $tpaId) = explode('-', $tpaValue);
+
+        $data['tpa_branch_id'] = $tpaBranchId;
+        $data['tpa_id'] = $tpaId;
+        $data['policy_id'] = $this->request->getPost('policy_id');
+        $data['client_id'] = $this->request->getPost('client_id');
+
+
+        $data['created_by'] = get_session_userid();
+        $insert = $this->clientPolicyModel->insert($data);
+        if($insert){
+            $clientPoliceData =  $this->clientPolicyModel->getClientPolicyByClientId($this->request->getPost('client_id'));
+            echo json_encode(array("status" => true , 'data' => $clientPoliceData));
+        }else{
+            echo json_encode(array("status" => false));
+        }
+    }
+
+    public function editClientPolicy()
+    {
+
+        $this->myLogger->logme('error','Client policy function called');
+
+        $id = $this->request->getPost('PrimaryKey');
+        $client_id = $this->request->getPost('client_id');
+
+        $insurerValue = (string) $this->request->getPost('insurer');
+        list($insurerBranchId, $insurerId) = explode('-', $insurerValue);
+
+        $data['insurer_branch_id'] = $insurerBranchId;
+        $data['insurer_id'] = $insurerId;
+
+        $tpaValue = (string) $this->request->getPost('tpa');
+        list($tpaBranchId, $tpaId) = explode('-', $tpaValue);
+
+        $data['tpa_branch_id'] = $tpaBranchId;
+        $data['tpa_id'] = $tpaId;
+        $data['policy_id'] = $this->request->getPost('policy_id');
+
+        $data['updated_by'] = get_session_userid();
+        $insert = $this->clientPolicyModel->update($id,$data);
+        $lastQuery = $this->clientPolicyModel->getLastQuery();
+
+        if($insert){
+            $clientPoliceData =  $this->clientPolicyModel->getClientPolicyByClientId($client_id);
+            echo json_encode(array("status" => true , 'data' => $clientPoliceData));
+        }else{
+            echo json_encode(array("status" => false));
+        }
+    }
+
+    public function getKycDocsById($id=null)
+    {
+
+        $this->myLogger->logme('error','getKycDocsById function called');
+        if($id){
+            $kyc_docs_data = $this->kycDocsModel->where(['kyc_type_id' => $id, 'is_active' => 1])->findAll();
+            echo json_encode(array("status" => true , 'data' => $kyc_docs_data));
+            $this->myLogger->logme('error','getKycDocs status TRUE');
+        }else{
+            echo json_encode(array("status" => false));
+            $this->myLogger->logme('error','getKycDocs status FALSE');
+        }
+    }
+
+    public function getPolicesByInsurerId($id = null)
+    {
+        $this->myLogger->logme('error','getPolicesByInsurerId function called');
+        if($id){
+            $police_data = $this->policesModel->where(['insurer_id' => $id, 'is_active' => 1])->findAll();
+            echo json_encode(array("status" => true , 'data' => $police_data));
+        }else{
+            echo json_encode(array("status" => false));
+        }
+    }
+
+    public function getSingleBranchDataById($id=null)
+    {
+
+        $this->myLogger->logme('error','getSingleBranchDataById function called');
+        if($id){
+            $branch_data = $this->clientBranchModel->where(['id' => $id, 'is_active' => 1])->first();
+            $branch_contact_data = $this->levelContactModel->where(['ref_id' => $id, 'contact_type'=>'client', 'is_active' => 1])->findAll();
+            echo json_encode(array("status" => true , 'data' => $branch_data, 'contact' => $branch_contact_data));
+        }else{
+            echo json_encode(array("status" => false));
+        }
+
+    }
+
+    public function getClientPolicyById($id=null)
+    {
+        $this->myLogger->logme('error','getClientPolicyById function called');
+        if($id){
+            $client_policy_data = $this->clientPolicyModel->where(['id' => $id, 'is_active' => 1])->first();
+            $insurer_id = $client_policy_data['insurer_id'];
+            $polices = $this->policesModel->where(['insurer_id' => $insurer_id, 'is_active' => 1])->findAll();
+            echo json_encode(array("status" => true , 'data' => $client_policy_data, 'policy' => $polices));
+        }else{
+            echo json_encode(array("status" => false));
+        }
+
+    }
+
 }
\ No newline at end of file
diff --git a/app/Controllers/LoginController.php b/app/Controllers/LoginController.php
index f536fac9..1dc8fb89 100644
--- a/app/Controllers/LoginController.php
+++ b/app/Controllers/LoginController.php
@@ -17,6 +17,7 @@ class LoginController extends BaseController
         
         // $session_data = ['isLoggedIn' => True ,'userid' => '4'];
         // set_session_data($session_data);
+        // $isLoggedIn = check_session();
         $isLoggedIn = check_session();
         
         if ($isLoggedIn) {
diff --git a/app/Controllers/UserController.php b/app/Controllers/UserController.php
index 387d114a..5d1f2813 100644
--- a/app/Controllers/UserController.php
+++ b/app/Controllers/UserController.php
@@ -16,109 +16,98 @@ use App\Models\UserTeamsModel;
 
 class UserController extends AdminController
 {
-    
     protected $myLogger;
+    protected $userModel;
+    protected $roleModel;
+    protected $teamModel;
+    protected $userTeamsModel;
+
     public function __construct()
     {
-        // helper('utility');
         set_session_context('User');
         $this->myLogger = \Config\Services::mylogger();
+        
+        $this->userModel      = new UserModel();
+        $this->roleModel      = new RoleModel();
+        $this->teamModel      = new TeamModel();
+        $this->userTeamsModel = new UserTeamsModel();
     }
 
     public function list()
-    {
-        $model = new UserModel();
-        $this->myLogger->logme('error','list {data} called',['data' => '9638527410']);
-        $data['UserList'] = $model->where('is_active', 1)->orderBy('id', 'DESC')->findAll();
-        echo view('layout/header');
-        echo view('AddUser');
-		echo view('UserList', $data);
-		echo view('layout/footer');
+    {   
+        $data['headerData'] = 'User List';
+        $this->myLogger->logme('error','User list function called');
+        $data['UserList'] = $this->userModel->getUserList();
+        // echo '
';
+        // print_r($data); die;
+        $data['roleData'] = $this->roleModel->select('id, role')->findAll();
+        $data['teamData'] = $this->teamModel->select('id, name')->findAll();
+        $this->loadLayout('UserList', $data);
     }
 
 
     public function create()
     {    
+        $this->myLogger->logme('error','User create function called');
          $teams = $this->request->getPost('team'); 
+         
         //if this is get method return to user creation page
         if(!$this->request->getPost()){
             return redirect()->to(base_url('/user/list'));
         }else{
     
-            //else do user insert operation
-            $userModel  = new UserModel();
-            $File = fileUpload($this->request->getFile('profile'));
             $userData = $this->request->getPost();
-            if(!empty($File)){
-                $userData['profile'] = $File;
-            }
-
-            // Inserting data into the 'users' table
             $userData['created_by'] =  get_session_userid();
             unset($userData['team']);
-            $insert = $userModel->insert($userData);
+            $insert = $this->userModel->insert($userData);
             if($insert){
                $teamData['user_id'] = $insert ;
-               $UserTeamsModel =  new UserTeamsModel();
                foreach ($teams as $value) {
                     $teamData['team_id'] = $value;
                     $teamData['created_by'] =  get_session_userid();
-                    $UserTeamsModel->insert($teamData);
+                    $this->userTeamsModel->insert($teamData);
                 }
             }
         }
+        $this->myLogger->logme('error','User create Successfully created by id {data}', ['data' =>  get_session_userid()]);
         return redirect()->to(base_url('/user/list'));
     }
 
-    public function getuser($id = null){
-
-        $model          =  new UserModel();
-        $RoleModel      =  new RoleModel();
-        $TeamModal      =  new TeamModel();
-        $UserTeamsModel =  new UserTeamsModel();
-
-        $roleData     = $RoleModel->select('id, role')->findAll();
-        $teamData     = $TeamModal->select('id, name')->findAll();
-        $userTeamData = $UserTeamsModel->where('user_id', $id)->findAll();
-        $data         = $model->getUserById($id);
+    public function getuser($id = null)
+    {
+        $userTeamData = $this->userTeamsModel->where('user_id', $id)->findAll();
+        $data         = $this->userModel->getUserById($id);
         if($data){
-           echo json_encode(array("status" => true , 'data' => $data, 'roleData' => $roleData, 'teamData' => $teamData, 'userTeamData' => $userTeamData));
+           echo json_encode(array("status" => true , 'data' => $data, 'userTeamData' => $userTeamData));
         }else{
             echo json_encode(array("status" => false));
         }
-
     }
 
     public function edit()
     {   
         $teams = $this->request->getPost('team'); 
-        // echo '
';
-        // print_r($this->request->getPost()); die;
+
         if(!$this->request->getPost()){
             return redirect()->to(base_url('/user/list'));
         }else{
-            $userModel = new UserModel();
             $id = $this->request->getPost('PrimaryKey');
-            $imageDetails = $userModel->find($id);
-            $File = fileUpload($this->request->getFile('profile'), (isset($imageDetails['profile']) ? $imageDetails['profile'] : null));
             $userData = $this->request->getPost();
-            if(!empty($File)){
-                $userData['profile'] = $File;
-            }
 
             // Update data in the 'users' table based on the $id
             $userData['updated_by'] =  get_session_userid();
-            unset($userData['PrimaryKey']);
-            $update = $userModel->update($id, $userData);
+            $update = $this->userModel->where('id', $id )->set($userData)->update();
+
             if($update){
-                $UserTeamsModel =  new UserTeamsModel();
-                $UserTeamsModel->where('user_id', $id)->delete();
-                $teamData['user_id'] = $id ;
-                foreach ($teams as $value) {
-                     $teamData['team_id'] = $value;
-                     $teamData['created_by'] =  get_session_userid();
-                     $UserTeamsModel->insert($teamData);
-                 }
+                $this->userTeamsModel->where('user_id', $id)->delete();
+                if($teams){
+                    $teamData['user_id'] = $id ;
+                    foreach ($teams as $value) {
+                         $teamData['team_id'] = $value;
+                         $teamData['created_by'] =  get_session_userid();
+                         $this->userTeamsModel->insert($teamData);
+                     }
+                }
              }
             return redirect()->to(base_url('/user/list'));
         }
@@ -137,14 +126,10 @@ class UserController extends AdminController
         }
     }
 
-    public function getRolesAndTeams(){
-
-        $RoleModel =  new RoleModel();
-        $TeamModal =  new TeamModel();
-
-        $roleData = $RoleModel->select('id, role')->findAll();
-        $teamData = $TeamModal->select('id, name')->findAll();
+    public function getRolesAndTeams()
+    {
+        $roleData = $this->roleModel->select('id, role')->findAll();
+        $teamData = $this->teamModel->select('id, name')->findAll();
         echo json_encode(array("status" => true , 'roleData' => $roleData, 'teamData' => $teamData,));
-
     }
 }
diff --git a/app/Helpers/fileupload_helper.php b/app/Helpers/fileupload_helper.php
new file mode 100644
index 00000000..7fadd870
--- /dev/null
+++ b/app/Helpers/fileupload_helper.php
@@ -0,0 +1,40 @@
+getClientMimeType(), $allowedTypes)) {
+            throw new \Exception('Invalid file type.');
+        }
+
+        // Generate a unique filename
+        $originalName = $file->getName();
+        $ext = pathinfo($originalName, PATHINFO_EXTENSION);
+        $baseName = pathinfo($originalName, PATHINFO_FILENAME);
+
+        $counter = 0;
+        $newName = $baseName . '.' . $ext;
+        while (file_exists($uploadPath . $newName)) {
+            $counter++;
+            $newName = $baseName . '_' . $counter . '.' . $ext;
+        }
+
+        // Move the file to the upload directory
+        try {
+            $file->move($uploadPath, $newName);
+        } catch (\Exception $e) {
+            throw new \Exception('Failed to upload file: ' . $e->getMessage());
+        }
+
+        return $uploadDirectory . $newName;
+
+    }
+}
diff --git a/app/Helpers/utility_helper.php b/app/Helpers/utility_helper.php
index 286b942f..34ede33e 100644
--- a/app/Helpers/utility_helper.php
+++ b/app/Helpers/utility_helper.php
@@ -43,9 +43,9 @@ if (!function_exists('change_date_format')) {
     }
 }
 
-if (!function_exists('fileUpload')) {
+if (!function_exists('file_Upload')) {
     
-    function fileUpload($fileToUpload, $imageDetails = null)
+    function file_Upload($fileToUpload, $imageDetails = null)
     {
         $fileName = $fileToUpload->getClientName();
         if ($fileToUpload !== NULL && $fileName !== "") {
diff --git a/app/Models/ClientBranchModel.php b/app/Models/ClientBranchModel.php
index 4fcec4a2..1ace7a2a 100644
--- a/app/Models/ClientBranchModel.php
+++ b/app/Models/ClientBranchModel.php
@@ -13,9 +13,24 @@ class ClientBranchModel extends Model
         "client_id",
         "branch_name",
         "branch_code",
+        "city",
+        "district",
+        "state",
         "created_by",
         "updated_by",
         "is_active",
     ];
 
+    public function getBranchAndContactByBranchId($branch_id){
+
+        return $this->db->table('client_branch')
+        ->select('client_branch.*')
+        ->select('level_contacts.name, level_contacts.email, level_contacts.mobile, level_contacts.designation,')
+        ->join('level_contacts', 'level_contacts.ref_id = client_branch.id')
+        ->where('level_contacts.contact_type', 'client')
+        ->where('client_branch.id', $branch_id)
+        ->get()
+        ->getResult();
+    }
+
 }
diff --git a/app/Models/ClientKYCDocsModel.php b/app/Models/ClientKYCDocsModel.php
index c6c5cbf2..9a3f28b5 100644
--- a/app/Models/ClientKYCDocsModel.php
+++ b/app/Models/ClientKYCDocsModel.php
@@ -8,6 +8,22 @@ class ClientKYCDocsModel extends Model
 {
     protected $table            = 'client_kyc_documents';
     protected $primaryKey       = 'id';
-    protected $allowedFields    = ['id','client_id','entity_type_id','file_name','is_active',"created_by","updated_by",];
+    protected $allowedFields    = [
+        'id',
+        'client_id',
+        'kyc_doc_type_id',
+        'file_name',
+        'is_active',
+        "created_by",
+        "updated_by",
+    ];
+
+    public function getKycDocsName($client_id){
+        $query = $this->select('client_kyc_documents.*, kyc_docs.file_name as client_file_name')
+                        ->join('kyc_docs', 'kyc_docs.id = client_kyc_documents.kyc_doc_type_id')
+                        ->where(['client_id' => $client_id, 'client_kyc_documents.is_active' => 1])
+                        ->findAll();
+        return $query;
+    }
 
 }
diff --git a/app/Models/ClientModel.php b/app/Models/ClientModel.php
index a19930ff..3ccf26a1 100644
--- a/app/Models/ClientModel.php
+++ b/app/Models/ClientModel.php
@@ -27,6 +27,7 @@ class ClientModel extends Model
     ];
 
 
+
         //get client and its associated policies in same array
     public function clientsWithPolicies()
     {
@@ -46,7 +47,18 @@ class ClientModel extends Model
             }
             //print_r(($clients));die();
             return $clients;
+    }
             
+
+    public function getCreatedByUserName(){
+
+        return $this->db->table('clients')
+        ->select('clients.*')
+        ->select('user_profiles.first_name as user_name')
+        ->join('user_profiles', 'user_profiles.id = clients.created_by')
+        ->get()
+        ->getResult();
+    
     }
 
 }
diff --git a/app/Models/ClientPolicyModel.php b/app/Models/ClientPolicyModel.php
index 8dc0e0e4..5ef5e39d 100644
--- a/app/Models/ClientPolicyModel.php
+++ b/app/Models/ClientPolicyModel.php
@@ -20,4 +20,43 @@ class ClientPolicyModel extends Model
         "updated_by",
         "Is_active",
     ];
+
+    public function getClientPolicyById($id){
+
+        return $this->db->table('client_policy')
+        ->select('insurers.name as insurer_name, insurers.short_name as insurer_short')
+        ->select('tpa.name as tpa_name, tpa.short_name as tpa_short')
+        ->select('policies.name as policy_name')
+        ->select('insurer_branch.branch_name as insurer_branch_name, insurer_branch.branch_code as insurer_branch_code')
+        ->select('tpa_branch.branch_name as tpa_branch_name, tpa_branch.branch_code as tpa_branch_code')
+        ->join('insurers', 'insurers.id = client_policy.insurer_id')
+        ->join('insurer_branch', 'client_policy.insurer_branch_id = insurer_branch.id')
+        ->join('tpa', 'tpa.id = client_policy.tpa_id')
+        ->join('tpa_branch', 'client_policy.tpa_branch_id = tpa_branch.id')
+        ->join('policies', 'policies.id = client_policy.policy_id')
+        ->where('client_policy.id', $id)
+        ->get()
+        ->getResult();
+    
+    }
+
+    public function getClientPolicyByClientId($client_id){
+
+        return $this->db->table('client_policy')
+        ->select('client_policy.*')
+        ->select('insurers.name as insurer_name, insurers.short_name as insurer_short')
+        ->select('tpa.name as tpa_name, tpa.short_name as tpa_short')
+        ->select('policies.name as policy_name')
+        ->select('insurer_branch.branch_name as insurer_branch_name, insurer_branch.branch_code as insurer_branch_code')
+        ->select('tpa_branch.branch_name as tpa_branch_name, tpa_branch.branch_code as tpa_branch_code')
+        ->join('insurers', 'insurers.id = client_policy.insurer_id')
+        ->join('insurer_branch', 'client_policy.insurer_branch_id = insurer_branch.id')
+        ->join('tpa', 'tpa.id = client_policy.tpa_id')
+        ->join('tpa_branch', 'client_policy.tpa_branch_id = tpa_branch.id')
+        ->join('policies', 'policies.id = client_policy.policy_id')
+        ->where('client_policy.client_id', $client_id)
+        ->get()
+        ->getResult();
+    
+    }
 }
diff --git a/app/Models/ClientRMModel.php b/app/Models/ClientRMModel.php
index 96db80ba..799649e5 100644
--- a/app/Models/ClientRMModel.php
+++ b/app/Models/ClientRMModel.php
@@ -18,4 +18,25 @@ class ClientRMModel extends Model
         "is_active",
     ];
 
+    public function checkExistenceOfClientRelation($id, $user_id, $level)
+    {
+        $query = $this->where('client_id', $id)
+                      ->where('user_id', $user_id)
+                      ->where('level', $level)
+                      ->countAllResults();
+        return ($query > 0) ? true : false;
+    }
+
+    public function getAllClientRM(){
+
+        return $this->db->table('client_rm')
+        ->select('client_rm.client_id, client_rm.level,')
+        ->select('user_profiles.first_name as account_manager')
+        ->join('user_profiles', 'user_profiles.id = client_rm.user_id')
+        ->where('level', 3)
+        ->get()
+        ->getResult();
+
+    }
+
 }
diff --git a/app/Models/LevelContactModel.php b/app/Models/LevelContactModel.php
index 68ab7794..635d3652 100644
--- a/app/Models/LevelContactModel.php
+++ b/app/Models/LevelContactModel.php
@@ -17,6 +17,7 @@ class LevelContactModel extends Model
         "email",
         "city",
         "mobile",
+        "designation",
         "created_by",
         "updated_by",
         "is_active",
diff --git a/app/Models/StateModel.php b/app/Models/StateModel.php
new file mode 100644
index 00000000..0827de63
--- /dev/null
+++ b/app/Models/StateModel.php
@@ -0,0 +1,20 @@
+select('id, state')->findAll();
+    }
+}
diff --git a/app/Models/TPABranchModel.php b/app/Models/TPABranchModel.php
index 24a2de34..9e528194 100644
--- a/app/Models/TPABranchModel.php
+++ b/app/Models/TPABranchModel.php
@@ -23,4 +23,12 @@ class TPABranchModel extends Model
         "updated_by",
         "is_active",
     ];
+
+    public function getTpaBranchesWithTpaNames()
+    {
+       $query = $this->select('tpa_branch.*, T.short_name as tpa_short_name, T.name as tpa_name')
+                    ->join('tpa T', 'tpa_branch.tpa_id = T.id', 'left')
+                    ->find();
+       return $query;             
+    }
 }
diff --git a/app/Models/UserModel.php b/app/Models/UserModel.php
index 8bc3f186..94ab4d18 100644
--- a/app/Models/UserModel.php
+++ b/app/Models/UserModel.php
@@ -26,8 +26,6 @@ class UserModel extends Model
         "created_at",
         "updated_by",
         "updated_at",
-        "created_by",
-        "updated_by",
         "is_active",
     ];
 
@@ -90,13 +88,22 @@ class UserModel extends Model
     public function getUserById($id){
 
         $userData = $this->where('id', $id)->get();
-        
         if ($userData->getNumRows() > 0) {
             return $userData->getRow();
         } else {
             return false;
         }
-
     }
+
+    public function getUserList(){
+
+        return $this->db->table('user_profiles')
+        ->select('user_profiles.*')
+        ->select('roles.role as user_role')
+        ->join('roles', 'roles.id = user_profiles.role')
+        ->get()
+        ->getResult();
+    }
+
 }
 ?>
\ No newline at end of file
diff --git a/app/Views/AddUser.php b/app/Views/AddUser.php
index efc5feee..685b0fc0 100644
--- a/app/Views/AddUser.php
+++ b/app/Views/AddUser.php
@@ -40,18 +40,7 @@ body {
 
 
 
-
-
-
-

-
- -
-
-
-
+
@@ -70,56 +59,38 @@ body {
-
- - -
-
- - -
-
-
-
- - -
-
- - -
-
- -
-
+
-
- - +
+ + +
+
+ + +
+
+ +
+
-
+
-
+
- -
-
- Preview Image -
-
diff --git a/app/Views/DashBoard.php b/app/Views/DashBoard.php index 09112e5f..fc335f73 100644 --- a/app/Views/DashBoard.php +++ b/app/Views/DashBoard.php @@ -1,15 +1 @@ - -
-
-
-

Welcome !

-
- -
-
-
-
- - +

Welcome !

diff --git a/app/Views/UserList.php b/app/Views/UserList.php index 24159676..542c245c 100644 --- a/app/Views/UserList.php +++ b/app/Views/UserList.php @@ -1,138 +1,238 @@ + -
-
-
-
-
-
-

User List

-
-
- -
-
- - +
+
+
+
+
+
+

User List

+
+
+ +
+
+
+ - - - - - - - - - - - - - - - - - - -
First NameLast NameEmailMobile NoAction
- - -
-
-
-
-
+ Name + Email + Mobile No + Role + Status + Action + + + + + + first_name; ?> + email; ?> + mobile; ?> + user_role; ?> + + + is_active == 1){ echo 'Active'; }else{ echo 'In-Active'; } ?> + + + + + + + + + + +
+
+
+ +
+ + + + + + diff --git a/app/Views/client_basic_info.php b/app/Views/client_basic_info.php index f9b46e6f..35e981dd 100644 --- a/app/Views/client_basic_info.php +++ b/app/Views/client_basic_info.php @@ -2,46 +2,54 @@
-
- - + + + +
- - - + + + + + + + + +
- - +
- - +
- - + +
- - + +
@@ -49,37 +57,49 @@
- - +
- - +
- - +
- - +
- - +
@@ -101,6 +121,105 @@ $(document).ready(function () { + $("#general_form").submit(function(event) { + + event.preventDefault(); + var isValid = validateForm(); + var PrimaryKey = $('#general_PrimaryKey').val(); + var form_action = ''; + + if (isValid) { + + if(PrimaryKey === ''){ + form_action = ''; + }else{ + form_action = ''; + } + + var formData = new FormData($('#general_form')[0]); + var OptionsHTML1 = '' + + $.ajax({ + data: formData, + url: form_action, + type: "POST", + dataType: 'json', + processData: false, + contentType: false, + success: function(res) { + + console.log(res); + $('#client_id').val(res.data.id); + $('#client_id_relation').val(res.data.id); + $('#client_id_branch').val(res.data.id); + $('#client_id_police').val(res.data.id); + $('#client_id_kyc').val(res.data.id); + $('#kyc_tab').click(); + + $.toast({ + text: 'Client General Info', + heading: "Submitted Sucessfully", + position: 'top-right', + icon: 'success', + bgColor: !1, + }); + + $.ajax({ + url: ''+res.data.entity_type_id, + type: "GET", + dataType: 'json', + processData: false, + contentType: false, + success: function(res) { + console.log(res); + $.each(res.data, function(index, item) { + OptionsHTML1 += ''; + }); + $('#kyc_docs').html(OptionsHTML1); + }, + error: function (xhr, status, error) { + console.error(xhr.responseText); + console.error(status, error); + } + }); + }, + error: function (xhr, status, error) { + console.error(xhr.responseText); + console.error(status, error); + } + }); + } + }); + +function validateForm() { + var isValid = true; + + // Perform validation for each field + $('#general_form input, #general_form select').each(function() { + // Check for empty text inputs and selects + if ($(this).is('input[type="text"]') || $(this).is('select')) { + if ($.trim($(this).val()) == '') { + alert('Please fill in all fields'); + isValid = false; + return false; // Exit the loop early + } + } + + // Check for file inputs (assuming image files) + if ($(this).is('input[type="file"]')) { + var fileInput = $(this)[0]; + if (fileInput.files.length === 0) { + alert('Please select an image file'); + isValid = false; + return false; // Exit the loop early + } + } + }); + + return isValid; +} + + }); \ No newline at end of file diff --git a/app/Views/client_branch.php b/app/Views/client_branch.php index 6423219c..5f9c6d44 100644 --- a/app/Views/client_branch.php +++ b/app/Views/client_branch.php @@ -2,7 +2,7 @@
- +
@@ -11,22 +11,12 @@ - + - - - - - - - - - - - +
# Branch Name Branch CodeAction
1App design and development01/01/2015
2Coffee detail page - Main Page21/07/2016
@@ -36,29 +26,54 @@
- +

- - - + + +
- - +
- - + +
+
+ +
+
+ + +
+
+ + +
+
+ +
@@ -67,47 +82,31 @@
-
- - -
-
+
- +
-
+
- +
-
-
-
-
-
-
- - +
@@ -116,47 +115,28 @@
-
-
-
- - -
-
- - +
+ +
-
-
- - +
+ +
-
- - -
-
- - +
+ +
@@ -165,52 +145,30 @@
-
- - +
+ +
- -
- - -
- -
- - +
+ +
-
-
- - +
+ +
-
- - +
+ +
-
- - -
-
+
+
@@ -31,6 +33,199 @@
+ +
+
+
+
+ + + + + + + + + + +
Document NameFile NameAction
+
+ +
+
+
- \ No newline at end of file + + + \ No newline at end of file diff --git a/app/Views/client_list.php b/app/Views/client_list.php index 3fc9f02c..c239dce9 100644 --- a/app/Views/client_list.php +++ b/app/Views/client_list.php @@ -1,137 +1,51 @@ - -
-
-
-

-
-
-
-
-
-
-
- - +
- - - - - - - - - - - + + + + + - + + - + - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - +
IDRequested BySubjectAssigneePriorityStatusCreated DateDue DateAction
Client NameAccount ManagerAction
#1256client_name; ?> ( short_name; ?> ) - - contact-img - George A. Lianes - + + + client_id == $row->id): ?> + account_manager . ', '; ?> + + + - Support for theme - - - contact-img - - - Low - - Open - - 2017/04/28 - - 2017/04/28 -
#2542 - - contact-img - Jose D. Delacruz - - - New submission on your website - - - contact-img - - - Medium - - Closed - - 2008/04/25 - - 2008/04/25 - - -
@@ -139,3 +53,91 @@
+ + \ No newline at end of file diff --git a/app/Views/client_onboarding.php b/app/Views/client_onboarding.php index 9a1ca7f0..cf15721f 100644 --- a/app/Views/client_onboarding.php +++ b/app/Views/client_onboarding.php @@ -1,5 +1,36 @@ + + +
@@ -8,7 +39,7 @@

Client Onboarding

diff --git a/app/Views/client_policy.php b/app/Views/client_policy.php index e41c0bfe..cec7c530 100644 --- a/app/Views/client_policy.php +++ b/app/Views/client_policy.php @@ -4,7 +4,7 @@
- +
@@ -13,22 +13,13 @@ - - - + + + + - - - - - - - - - - - +
#Branch NameBranch CodeInsurerPolicyTPAAction
1App design and development01/01/2015
2Coffee detail page - Main Page21/07/2016
@@ -39,37 +30,45 @@
- +

- - - + + + +
- + + + +
- - +
- + + + +
@@ -91,7 +90,10 @@ \ No newline at end of file diff --git a/app/Views/client_rm.php b/app/Views/client_rm.php index dbf694f9..9b3e3ff0 100644 --- a/app/Views/client_rm.php +++ b/app/Views/client_rm.php @@ -1,64 +1,43 @@ - -
- - - + + + +
- + + + + +
- user_id + + + + +
- + + + + +
@@ -80,6 +59,9 @@ body { \ No newline at end of file diff --git a/app/Views/errors/cli/error_exception.php b/app/Views/errors/cli/error_exception.php index f24e98fb..21e4745d 100644 --- a/app/Views/errors/cli/error_exception.php +++ b/app/Views/errors/cli/error_exception.php @@ -10,6 +10,7 @@ CLI::write($message); CLI::newLine(); CLI::write('at ' . CLI::color(clean_path($exception->getFile()) . ':' . $exception->getLine(), 'green')); CLI::newLine(); +CLI::error('ERROR: ' . $code); // The backtrace if (defined('SHOW_DEBUG_BACKTRACE') && SHOW_DEBUG_BACKTRACE) { diff --git a/app/Views/layout/footer.php b/app/Views/layout/footer.php index eb665814..9fab58df 100644 --- a/app/Views/layout/footer.php +++ b/app/Views/layout/footer.php @@ -7,15 +7,15 @@
- © Minton theme by Coderthemes + © NHANCE
-
+
@@ -31,400 +31,400 @@
- -
-
+ +
+
- - + + - -
-
+ +
+
- -
- - -
- + -
Group Chats
+
Group Chats
-
- - - App Development - + + +
Favourites
+ + + +
Other Chats
+ + + +
+ + +
+
+ Theme Settings +
+ +
+ + +
Color Scheme
+
+ + +
+ +
+ + +
+ + +
Width
+
+ + +
+
+ + +
+ + +
Topbar
+ +
+ + +
+ +
+ + +
+ + +
Menus Positon (Leftsidebar and Topbar)
+ +
+ + +
+ +
+ + +
+ + +
Left Sidebar Color
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ + +
Left Sidebar Size
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ + +
Sidebar User Info
+ +
+ + +
+ + + + + Purchase Now + +
+ +
+
+ +
- -
Favourites
- - - -
Other Chats
- - - -
- - -
-
- Theme Settings -
- -
- - -
Color Scheme
-
- - -
- -
- - -
- - -
Width
-
- - -
-
- - -
- - -
Topbar
- -
- - -
- -
- - -
- - -
Menus Positon (Leftsidebar and Topbar)
- -
- - -
- -
- - -
- - -
Left Sidebar Color
- -
- - -
- -
- - -
- -
- - -
- -
- - -
- - -
Left Sidebar Size
- -
- - -
- -
- - -
- -
- - -
- - -
Sidebar User Info
- -
- - -
- - - - - Purchase Now - -
- -
-
- -
-
- +
@@ -432,6 +432,11 @@ + + + + + @@ -449,7 +454,10 @@ - + + + + @@ -465,13 +473,13 @@ + - - - + + \ No newline at end of file diff --git a/app/Views/layout/header.php b/app/Views/layout/header.php index da64c35e..70433942 100644 --- a/app/Views/layout/header.php +++ b/app/Views/layout/header.php @@ -3,11 +3,11 @@ - User List + nHance - - - + + + /assets/images/favicon.ico"> @@ -23,15 +23,16 @@ - /assets/css/bootstrap-material.min.css" rel="stylesheet" type="text/css" id="bs-default-stylesheet" /> - /assets/css/app-material.min.css" rel="stylesheet" type="text/css" id="app-default-stylesheet" /> + /assets/css/bootstrap-creative.min.css" rel="stylesheet" type="text/css" id="bs-default-stylesheet" /> + /assets/css/app-creative.min.css" rel="stylesheet" type="text/css" id="app-default-stylesheet" /> - /assets/css/bootstrap-material-dark.min.css" rel="stylesheet" type="text/css" id="bs-dark-stylesheet" /> - /assets/css/app-material-dark.min.css" rel="stylesheet" type="text/css" id="app-dark-stylesheet" /> + /assets/css/bootstrap-creative-dark.min.css" rel="stylesheet" type="text/css" id="bs-dark-stylesheet" /> + /assets/css/app-creative-dark.min.css" rel="stylesheet" type="text/css" id="app-dark-stylesheet" /> /assets/css/icons.min.css" rel="stylesheet" type="text/css" /> - + + @@ -52,10 +53,154 @@ }); } + + + + - + + + +
+
+
+
+
+
@@ -76,37 +221,31 @@
- -->
- + --> - - @@ -285,8 +415,8 @@ @@ -476,608 +463,98 @@
-
-