diff --git a/ams_vendor.zip b/ams_vendor.zip new file mode 100644 index 0000000..99d3bb3 Binary files /dev/null and b/ams_vendor.zip differ diff --git a/application/config/testing/database.php b/application/config/testing/database.php index 55ec504..59c5e42 100644 --- a/application/config/testing/database.php +++ b/application/config/testing/database.php @@ -79,6 +79,10 @@ 'username' => 'root', 'password' => '', 'database' => 'test', + // 'hostname' => '119.18.54.85', + // 'username' => 'venbaehn_ams', + // 'password' => 'L;nD7Z@f)1ZT', + // 'database' => 'venbaehn_ams', 'dbdriver' => 'mysqli', 'dbprefix' => '', 'pconnect' => FALSE, diff --git a/application/modules/Auth/controllers/Auth.php b/application/modules/Auth/controllers/Auth.php index a204b91..f64a602 100644 --- a/application/modules/Auth/controllers/Auth.php +++ b/application/modules/Auth/controllers/Auth.php @@ -190,10 +190,12 @@ public function verify_otp(){ public function change_password() - { + { + print_r($this->input->post('id')); die; $id = $this->input->post('id'); $data['password'] = hash_password($this->input->post('password')); - $table="users"; + $table="users"; + $userData = $this->MY_Model->edit_option($data, $id, $table); redirect('login'); } diff --git a/application/modules/Auth/views/change_password_form.php b/application/modules/Auth/views/change_password_form.php index 59f7663..551fac7 100644 --- a/application/modules/Auth/views/change_password_form.php +++ b/application/modules/Auth/views/change_password_form.php @@ -1,15 +1,18 @@ - - - + + + + - AMS + + + BigBamboo Enterprise @@ -22,9 +25,9 @@ - - - -
+ + + +
-
+ $('#password, #confirm_password').on('keyup', function() { + $(':input[type="submit"]').prop('disabled', true); + if ($('#password').val() == $('#confirm_password').val() && $('#confirm_password').val() + .length > 0) { + $('#message').html('Matching').css('color', 'green'); + $('button[type="submit"]').attr("disabled", false); + } else if ($('#password').val().length == 0 || $('#confirm_password').val().length == 0) { + $('#message').html(''); + } else + $('#message').html('Not Matching').css('color', 'red'); + }); + +
+ + \ No newline at end of file diff --git a/application/modules/Auth/views/login.php b/application/modules/Auth/views/login.php index 3bba26c..811aa1b 100644 --- a/application/modules/Auth/views/login.php +++ b/application/modules/Auth/views/login.php @@ -1,13 +1,15 @@ - + + + - AMS + BigBamboo Enterprise @@ -20,93 +22,58 @@ - + - + -
- - +
+ + -
- - - - - + + + + + \ No newline at end of file diff --git a/application/modules/Auth/views/otp_verification.php b/application/modules/Auth/views/otp_verification.php index 3b22d73..84dfb4d 100644 --- a/application/modules/Auth/views/otp_verification.php +++ b/application/modules/Auth/views/otp_verification.php @@ -1,15 +1,17 @@ - - - + + + + + - AMS + BigBamboo Enterprise @@ -22,153 +24,156 @@ - + - -
+ + -
+
+ + + + + -
+
- + + $(document).on('click', '#close-form', function() { + $('.bs-example-modal-sm').css('display', 'none'); + }); + + + $(document).on('click', '.btn-primary', function() { + if ($('#otp').val()) { + var data = $("#otp-form").serialize(); + console.log(data); + $.ajax({ + type: "post", + url: "auth/verify_otp", + data: data, + json: true, + success: function(response) { + // decode encoded json + response = jQuery.parseJSON(response) + if (response.status === "failed") { + //update the csrf to the form + $('input[name=csrf_test_name]').val(response.csrf_hash); + $('#otp_span_msg').html('invalid otp').css('color', 'red'); + } else { + //update the csrf to the form + $('input[name=csrf_test_name]').val(response.csrf_hash); + console.log(response.id); + $('.form').html(response.htmlPage); + // location.href = `auth/change_password_view/${response.id}`; + } + }, + error: function(jqXHR, textStatus, err) { + alert('text status ' + textStatus + ', err ' + err) + } + }); + } else { + $('#otp_span_msg').html('Pls enter OTP').css('color', 'red'); + } + }); + + \ No newline at end of file diff --git a/application/modules/Business/controllers/Business.php b/application/modules/Business/controllers/Business.php index fa02ed5..303635d 100644 --- a/application/modules/Business/controllers/Business.php +++ b/application/modules/Business/controllers/Business.php @@ -42,8 +42,8 @@ public function index() public function business_list() { - $business_list = $this->Business_model->get_business_details(); - $this->layout->set('tableData', $business_list); + $business_list = $this->Business_model->get_business_details(); + $this->layout->set('tableData', $business_list); $this->layout->buffer('main_content', 'Business/business_list'); $this->layout->render('default_layout'); @@ -52,7 +52,7 @@ public function business_list() public function add_business() { - $this->layout->set('stateData', $this->MY_Model->select('state')); + $this->layout->set('stateData', $this->MY_Model->select('state')); $this->layout->set('ModuleData', $this->MY_Model->select('modules')); $this->layout->buffer('main_content', 'Business/add_business'); $this->layout->render('default_layout'); @@ -87,14 +87,20 @@ public function create_business() $add_admin = $this->input->post('add_admin'); unset($data['add_admin']); } - $count = count($this->input->post('module_id')); - for($i=0;$i<$count;$i++) - { - $mdata['module_id'] = $this->input->post('module_id')[$i]; - $mdata['uid'] = $this->input->post('uid'); - $mdata['is_active'] = 1; - $add_module = $this->MY_Model->insert($mdata, "permit_modules"); - } + + $modules = $this->input->post('module_id'); + if($modules !== NULL && $modules !== ''){ + + $count = count($modules); + + for($i=0;$i<$count;$i++) + { + $mdata['module_id'] = $this->input->post('module_id')[$i]; + $mdata['uid'] = $this->input->post('uid'); + $mdata['is_active'] = 1; + $add_module = $this->MY_Model->insert($mdata, "permit_modules"); + } + } unset($data['module_id']); $create_business = $this->MY_Model->insert($data,$table); @@ -187,12 +193,7 @@ public function edit_business() $differentValues1 = array_diff($module_id_array , $DbData); $differentValues2 = array_diff($DbData , $module_id_array); $final_array = array_merge($differentValues1, $differentValues2); - // echo "
";
-		// print_r($DbData); print_r($this->input->post('module_id')); print_r($final_array); 
-        // echo "
";
-       
-		//  die;
-
+		
         if(count($final_array) != 0)
         {
         	foreach($final_array as $key => $value){
@@ -250,7 +251,7 @@ public function delete_business($id)
   {
     $Data = $this->Business_model->delete_by_md5_id($id,user()->business_id,'asset');
 	redirect('Business/business_list');
-	}
+  }
 
 	//===================== MODULES =================================================
   
@@ -305,15 +306,4 @@ public function getDeleteConfirmationPopup()
   }
 
 
-}
-
-
-
-
-
-
-
-
-
-
-
+}
\ No newline at end of file
diff --git a/application/modules/Business/views/add_business.php b/application/modules/Business/views/add_business.php
index 46c9c78..0283e9a 100644
--- a/application/modules/Business/views/add_business.php
+++ b/application/modules/Business/views/add_business.php
@@ -1,18 +1,17 @@
-
 
 
 
 
 
 
 
 
 
 
-
+
-
-

Add Business

+
+

Add Business

+
+ + +
+
+
+
+
+
+ + +
Business Information
+
+
+
+
+
+ + + + + +
+ +
+ +
+ + +
+ +
+ + +
+ +
+ +
+ +
+ + +
+ +
+ + +
+ +
+
+ + +

+ + +
+ +
+ +
+ + +
+ +
+
+ + +
+ +
+ +
+ + +
+ +
+ +
+ + + +
+ +
+ +
+
+ + +
+
+ +
+
+ +
+ +
+ + +
+ + + +
+
+ +
+
+
+
+ + + + + + + + +
- - -
-
-
-
-
-
- - -
Business Information
-
-
-
-
-
- - - - - -
- -
- -
- - -
- -
- - -
- -
- -
- -
- - -
- -
- - -
- -
-
- - -

- - -
- -
- -
- - -
- -
-
- - -
- -
- -
- - -
- -
- -
- - - -
- -
- -
-
- - -
-
- -
-
- -
- -
- - -
- - - -
-
- -
-
-
-
- - - - - - - - -
-
- + \ No newline at end of file diff --git a/application/modules/Business/views/add_module_form.php b/application/modules/Business/views/add_module_form.php index 3996bef..1249b76 100644 --- a/application/modules/Business/views/add_module_form.php +++ b/application/modules/Business/views/add_module_form.php @@ -1,49 +1,48 @@ -
-
+
-
-

Add Module

-
+
+

Add Module

+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+ - + -
- -
- -
+
+ +
+ +
+
+ + +
+ + +
+
+ + +
+
-
- -
- - -
-
-
- - - - - - - - + \ No newline at end of file diff --git a/application/modules/Business/views/edit_business.php b/application/modules/Business/views/edit_business.php index bac02b0..deb5fde 100644 --- a/application/modules/Business/views/edit_business.php +++ b/application/modules/Business/views/edit_business.php @@ -1,4 +1,3 @@ - @@ -8,7 +7,7 @@ .multi-select-container { display: inline-block; position: relative; - width:100%; + width: 100%; } .multi-select-menu { @@ -53,7 +52,7 @@ width: 1px; } -.multi-select-menuitem + .multi-select-menuitem { +.multi-select-menuitem+.multi-select-menuitem { padding-top: 0; } @@ -69,9 +68,9 @@ .multi-select-button { display: block; - margin-top:2px; - width:100%; - max-width: 100%!important; + margin-top: 2px; + width: 100%; + max-width: 100% !important; font-size: 0.875em; padding: 0.85em 0.6em; white-space: nowrap; @@ -94,8 +93,8 @@ border-color: #999 transparent transparent transparent; margin-left: 0.4em; vertical-align: 0.1em; - right:5px; - top:17px; + right: 5px; + top: 17px; } .multi-select-container--open .multi-select-menu { @@ -116,189 +115,187 @@ /* Allow labels to line wrap when menu is artificially narrowed */ white-space: normal; } -
-
+
-
-

Edit Business

-
+
+

Edit Business

+
-Business List -
-
-
-
-
- +
+
+
+
+
- -
Business Information
-
-
-
-
-
+ +
Business Information
+
+
+
+
+ - - - + + + -
- -
- -
+
+ +
+ +
- -
- -
+ +
+ +
- -
- -
-
+ +
+ +
+
-
+
+ +
+ + foreach ($businessModuleData as $object) { + if (isset($object->modules)) { + $modulesArray[] = $object->modules; + } - + } - modules)) { - $modulesArray[] = $object->modules; - } - -} - - foreach ($ModuleData as $key => $data) { ?> -modules, $modulesArray)) { ?> - - - - - - -
+ foreach ($ModuleData as $key => $data) { ?> + modules, $modulesArray)) { ?> + + + + + + +
- -
- -
-
+ +
+ +
+
-

+
+

-
- -
- -
+
+ +
+ +
- -
- -
-
+ +
+ +
+
-
- -
- -
+
+ +
+ +
- -
- -
-
+ +
+ +
+
-
- -
- -
-
+
+ +
+ +
+
-
-
-
- - -
-
- -
-
-
+
+
+
+ + +
+
+ +
+
+
- -
-
- - - - - - - - - - - - - + + + + \ No newline at end of file diff --git a/application/modules/Business/views/edit_modules.php b/application/modules/Business/views/edit_modules.php index a77dcd9..5916a8b 100644 --- a/application/modules/Business/views/edit_modules.php +++ b/application/modules/Business/views/edit_modules.php @@ -1,53 +1,53 @@ -
-
+
+ +
+

Edit Module

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

Edit Module

-
-
-
-
-
-
-
-
-
-
- - - - - - -
- -
- -
-
- - -
- - -
-
- - -
-
-
- - -
- - - - - + \ No newline at end of file diff --git a/application/modules/Employee/controllers/Employee.php b/application/modules/Employee/controllers/Employee.php index 9c8e752..e05b52e 100644 --- a/application/modules/Employee/controllers/Employee.php +++ b/application/modules/Employee/controllers/Employee.php @@ -70,52 +70,7 @@ public function addEmployee($businessId = 0) } - public function add_employee_education() - { - - $id = $this->input->post('id'); - if ($id) { - $data = $this->input->post(); - // $id = $this->input->post('id'); - $data['business_id'] = user()->business_id; - $table="employee_qualification"; - $create_user = $this->MY_Model->update_md5($data,md5($id),$table); - redirect('Employee/editEmployee/'.md5($this->input->post('emp_id'))); - } - else{ - $data = $this->input->post(); - // $id = $this->input->post('id'); - $data['business_id'] = user()->business_id; - $table="employee_qualification"; - $create_user = $this->MY_Model->insert($data,$table); - redirect('Employee/editEmployee/'.md5($this->input->post('emp_id'))); - } - - } - - public function add_employee_history() - { - $id = $this->input->post('id'); - if ($id) { - $data = $this->input->post(); - // $id = $this->input->post('id'); - $data['business_id'] = user()->business_id; - $table="employee_history"; - $create_user = $this->MY_Model->update_md5($data,md5($id),$table); - redirect('Employee/editEmployee/'.md5($this->input->post('emp_id'))); - } - else{ - $data = $this->input->post(); - // $id = $this->input->post('id'); - $data['business_id'] = user()->business_id; - $table="employee_history"; - $create_user = $this->MY_Model->insert($data,$table); - redirect('Employee/editEmployee/'.md5($this->input->post('emp_id'))); - } - - } - public function createEmp() { //insert in users table @@ -532,5 +487,52 @@ public function editEmp_history($id) } + public function add_employee_education() + { + + $id = $this->input->post('id'); + if ($id) { + $data = $this->input->post(); + // $id = $this->input->post('id'); + $data['business_id'] = user()->business_id; + $table="employee_qualification"; + $create_user = $this->MY_Model->update_md5($data,md5($id),$table); + redirect('Employee/editEmployee/'.md5($this->input->post('emp_id'))); + } + else{ + $data = $this->input->post(); + // $id = $this->input->post('id'); + $data['business_id'] = user()->business_id; + $table="employee_qualification"; + $create_user = $this->MY_Model->insert($data,$table); + redirect('Employee/editEmployee/'.md5($this->input->post('emp_id'))); + } + + + } + + public function add_employee_history() + { + $id = $this->input->post('id'); + if ($id) { + $data = $this->input->post(); + // $id = $this->input->post('id'); + $data['business_id'] = user()->business_id; + $table="employee_history"; + $create_user = $this->MY_Model->update_md5($data,md5($id),$table); + redirect('Employee/editEmployee/'.md5($this->input->post('emp_id'))); + } + else{ + $data = $this->input->post(); + // $id = $this->input->post('id'); + $data['business_id'] = user()->business_id; + $table="employee_history"; + $create_user = $this->MY_Model->insert($data,$table); + redirect('Employee/editEmployee/'.md5($this->input->post('emp_id'))); + } + + } + + } diff --git a/application/modules/Employee/views/add_emp.php b/application/modules/Employee/views/add_emp.php index 26de719..dc15692 100644 --- a/application/modules/Employee/views/add_emp.php +++ b/application/modules/Employee/views/add_emp.php @@ -1,26 +1,25 @@ - - - - + + + - - - + + +
-
-

Add Employee

-
-
-
-
+
+
+

Add Employee

+
+
+
+
+
- - -
-
+ +
+ - + -
-
-
Personal Information* -

+
+
+
Personal Information* +

+ +
+ + +
+ +
+ + +
+ +
+ +
+ +
+ + +
+ +
+ + +
+ +
+ +
+ + +
+ + +
+ +
+ + +
+ +
+ + +
+ + +
+ + +
+ +
+
+ +
+ + +
+ +
+ + +
+ + +
+ + +
+ + +
+ + +
+
+ +
+
+
Emergency Contact
+
+ + +
+ +
+ + +
+ +
+ +
+ +
+ + +
+ +
+ + +
+ +
+ +
+
+
+ +
+
+
Address Details
+

+ +
+ + +
+ +
+ + +
+ +
+ +
+ +
+ + +
+ +
+ + +
+ +
+ +
+
+ +
+
+
Additional Information
+
+

+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + + +
+ Male + Female +
+ +
+ +
+ + +
+ + +
+ +
+
+ +
+
+
Permission
+
+

+ +
+ + +
+ + +
+
+
+ +

+
+
+ Cancel + +
+
+
+ -
- - -
-
- - -
- -
- -
- -
- - -
- -
- - -
- -
- -
- - -
- - - -
- -
- - -
- -
- - -
- - -
- - -
- -
-
- -
- - -
- -
- - -
- - -
- - -
- - -
- - -
-
- -
-
-
Emergency Contact
-
- - -
- -
- - -
- -
- -
- -
- - -
- -
- - -
- -
-
-
- -
-
-
Address Details
-

- -
- - -
- -
- - -
- -
- -
- -
- - -
- -
- - -
- -
- -
-
- -
-
-
Additional Information
-
-

- -
- - -
- -
- - -
- -
- - -
- -
- - -
- -
- - - -
- Male - Female -
- -
- -
- - -
- - -
- -
-
- -
-
-
Permission
-
-

- -
- - -
- - -
-
-
- -

-
-
-Cancel - -
-
-
- - -
-
-
- +}); + \ No newline at end of file diff --git a/application/modules/Employee/views/edit_emp.php b/application/modules/Employee/views/edit_emp.php index 90a950e..301c9c9 100644 --- a/application/modules/Employee/views/edit_emp.php +++ b/application/modules/Employee/views/edit_emp.php @@ -1,23 +1,21 @@ - - - - - - - - + + + + + +
-
+
-
-

Edit Employee

-
+
+

Edit Employee

+
-
-
-
-
-
- +
+
+ + + + + +
+
Personal Information*
+
+

+
+ + +
+ +
+ + +
+ +
+ +
+ +
+ + +
+ +
+ + +
+ +
+ +
+ +
+ + +
+ + +
+ + +
+ +
+ +
+ +
+ + +
+ +
+ +
+ +
+ +
+
+
Emergency Contact
+
+

+
+ + +
+ +
+ + +
+ +
+ +
+ +
+ + +
+ +
+ + +
+ +
+ +
+
+ +
+
+
Address Detail
+
+

+
+ + +
+ +
+ + +
+ +
+ +
+ +
+ + +
+ +
+ + +
+ +
+ +
+
+ +
+
+
Additional Information
+
+

+
+ + +
+ +
+ + +
+ +
+
+ +
+ + +
+ +
+ + +
+ gender == 'male') + { + echo 'Male'; + echo '  '; + echo 'Female'; + } + else + { + echo 'Male'; + echo '  '; + echo 'Female'; + } ?> +
+ +
+ +
+ + +
+ + Avatar +
+ +
+
+ +
+
+
Permissions
+
+

+
+ + +
+ + +
+ +
+
+ + + +

+
+
+ Cancel + +
+
+
+ + +
+
+
+
-
- - - + -
-
Personal Information*
-
-

-
- - -
- -
- - -
- -
- -
- -
- - -
- -
- - -
- -
- -
- -
- - -
- - -
- - -
- -
- -
- -
- - -
- gender == 'male') - { - echo 'Male'; - echo '  '; - echo 'Female'; - } - else - { - echo 'Male'; - echo '  '; - echo 'Female'; - } ?> -
- - -
- -
- -
- -
-
-
Emergency Contact
-
-

-
- - -
- -
- - -
- -
- -
- -
- - -
- -
- - -
- -
- -
-
- -
-
-
Address Detail
-
-

-
- - -
- -
- - -
- -
- -
- -
- - -
- -
- - -
- -
- -
-
- -
-
-
Additional Information
-
-

-
- - -
- -
- -
- -
- - -
- -
- - -
- -
- -
- -
- - -
- - Avatar -
- -
-
- -
-
-
Permissions
-
-

-
- - -
- - -
- -
-
- - - -

-
-
-Cancel - -
-
-
- - -
-
- - -
- -
- -
- - - - - + + - + \ No newline at end of file diff --git a/application/modules/Expence/views/edit_expence.php b/application/modules/Expence/views/edit_expence.php index 1a4eb09..e91388a 100644 --- a/application/modules/Expence/views/edit_expence.php +++ b/application/modules/Expence/views/edit_expence.php @@ -121,10 +121,10 @@
- +
- +
@@ -181,7 +181,7 @@
- +

diff --git a/application/modules/Expence/views/expence_form.php b/application/modules/Expence/views/expence_form.php index 423a8b3..baeb9b4 100644 --- a/application/modules/Expence/views/expence_form.php +++ b/application/modules/Expence/views/expence_form.php @@ -8,10 +8,10 @@
-
-
+
+
- -

Expense Claim

+ +

Expense Claim

-
-
-
-
-
+
+
+
+
+ - + -
-
- -
- - Self +
+
+ +
- Others - -
- - -
- -
+ Self -
+ Others + +
+ + +
+ +
+ +
-
+
- -
-
- + +
+
+ -
- -
+
- -
-
- -
- -
-
-
+
+ + +
+
+ +
+ +
+
+
-
-
- -
-

+
+

-id)) { foreach ($expense_child_data as $key => $value) { ?> + id)) { foreach ($expense_child_data as $key => $value) { ?> -
+
- -
-
- -
- - + +
+
+ +
-
- -
- -
-
+ + +
+ +
+ +
+
-
- -
- - - +
+ +
+ + + +
+ + +
+ +
+
+
+ + + + + + + + +
+ + +
+
+ +
+ +
+ +
+ +
+
+ + +
+ +
+ + +
+ + +
+ +
+
+
+ + + + + +
+
+ + +
+
+
+ + + id)) { ?> + + + +
+
+ + +
- - -
- -
-
- - - - - - - - -
- - -
-
- -
- -
- -
- -
- -
- -
- - -
- - -
-
-
- - - - - -
- - -
-
-
- - -id)) { ?> - - - -
-
- - -
-
-
- -
- + + + - + } + + + }); +} + \ No newline at end of file diff --git a/application/modules/Layout/views/includes/default_header.php b/application/modules/Layout/views/includes/default_header.php index 0b371ce..ae42f4a 100644 --- a/application/modules/Layout/views/includes/default_header.php +++ b/application/modules/Layout/views/includes/default_header.php @@ -6,13 +6,13 @@ - + - Ams + Ams @@ -112,7 +112,7 @@ Masters - Settings + Log Out diff --git a/application/modules/Layout/views/includes/default_menu.php b/application/modules/Layout/views/includes/default_menu.php index a223d7f..de5aa1c 100644 --- a/application/modules/Layout/views/includes/default_menu.php +++ b/application/modules/Layout/views/includes/default_menu.php @@ -1,178 +1,186 @@ -
- +
@@ -271,7 +270,7 @@ $("#user_dropdown").addClass("hide-arrow"); $("input[name='risedby']").on("change", function() { var inputValue = $(this).val(); - if (inputValue === "name;?>(id;?>)") { + if (inputValue === "name;?>") { $("#user_dropdown").removeClass("hide-arrow"); } else { $("#user_dropdown").addClass("hide-arrow"); @@ -360,7 +359,7 @@ var currentUserId = 'id; ?>'; $userDropdown.append(''); $userDropdown.prop('disabled', true); - } else if (selectedValue === 'name; ?>(id;?>)') { + } else if (selectedValue === 'name; ?>') { $.ajax({ @@ -555,112 +554,15 @@ function calculateDateDifference() { } - // $(document).ready(function() { - // $('#type').change(function() { - - // var leave_type_id = $('#type').val(); - // console.log(leave_type_id); - // let employee_id = $('#user_dropdown').val(); - - // DateDifferenceOthers(leave_type_id, employee_id); - // }); - // }); +$('#subimt').click(function() { + let val = $('#user_dropdown').val() + console.log(val); +}); - // function DateDifferenceOthers( leave_type_id, employee_id ) { - - - // let type_id = leave_type_id; - // let emp_id = employee_id; - // // var type_id = $('option:selected', this).attr('id'); - // // let emp_id = $('#user_dropdown').val(); - - // var fromDate = fromDateInput.datepicker("getDate"); - // var toDate = toDateInput.datepicker("getDate"); - - // $.ajax({ - // data: {emp_id : emp_id, type_id : type_id}, - // url : "Leave/get_emp_leave_count/", - // type: "get", - // success: function(response) { - // response = JSON.parse(response); - - // if (fromDate && toDate) { - // var difference = Math.ceil((toDate - fromDate) / (1000 * 60 * 60 * 24) + 1); - // if(response.length == 0) - // { - // $.ajax({ - // type: "get", - // url: "Leave/get_leave_master_count/", - // data: {type_id: type_id}, - // success: function(response) { - // response = JSON.parse(response); - // if (difference > response[0].days) - // { - // Swal.fire('No sufficient leave balance please check the Date'); - // $("#todate").val(''); - // $("#dateDifference").val(""); - // } - - // }, - - // }); - - // } - // else{ - - // if (difference > response[0].remaining_days) - // { - - // Swal.fire('No sufficient leave balance please check the Date' ); - // $("#todate").val(''); - // $("#dateDifference").val(""); - // } - - // } - // } - - // } - - // }); - - // } - // $('#user_dropdown').on('change', function(){ - - // let emp_id = $('#user_dropdown').val(); - // DateValidate(emp_id); - - - // }); - - // function DateValidate(emp_id) { - - // var fromDate = fromDateInput.datepicker("getDate"); - // var toDate = toDateInput.datepicker("getDate"); - - // $.ajax({ - // data: {emp_id : emp_id, fromDate : fromDate, toDate : toDate}, - // url : "Leave/get_from_to_date_count/", - // type: "get", - // success: function(response) { - - // alert(response); - - // response = JSON.parse(response); - - - // } - - // }); - - - - - - // } @@ -673,4 +575,3 @@ function calculateDateDifference() { - diff --git a/application/modules/Leave/views/edit_leave.php b/application/modules/Leave/views/edit_leave.php index a7ea90b..aad5d23 100644 --- a/application/modules/Leave/views/edit_leave.php +++ b/application/modules/Leave/views/edit_leave.php @@ -42,7 +42,7 @@ color: black; } - input[type=date]::-webkit-datetime-edit, input::-webkit-inner-spin-button, input::-webkit-clear-button { + /* input[type=date]::-webkit-datetime-edit, input::-webkit-inner-spin-button, input::-webkit-clear-button { display: none;s } @@ -52,7 +52,7 @@ right: 0; color: black; opacity: 1; - } + } */ diff --git a/application/modules/Leave/views/leave_list.php b/application/modules/Leave/views/leave_list.php index d78cec9..035a60b 100644 --- a/application/modules/Leave/views/leave_list.php +++ b/application/modules/Leave/views/leave_list.php @@ -1,157 +1,162 @@ - - - - - + + + + - + div.dataTables_wrapper div.dataTables_filter { + margin-top: -30px !important; + } +
-
-
- - +
+
-

My Approvals

-
-
-
-
-
- - - - - - - - - - - - - - - - - $value) { ?> + - $type) { ?> - id === $value->type ) { ?> - - - - - - from_date == "" && $value->to_date == "") { ?> - - - - - - - - - - no_of_days == 0){ ?> - - - - - status == 'pending'){ ?> - - status == 'Approved'){ ?> - - status == 'Declined'){ ?> - - status == 'canceled'){ ?> - - My Approvals +
+ +
+
+
+
Created Date/TimeEmployee Name NoteLeave Duration Leave Type Leave Raised ByNo of Days Status Action
created_date; ?>
created_time; ?>
name; ?> (emp_id; ?>) comments; ?> - perm_date);?>
- from_time); ?> to - to_time);?> -
from_date); echo ' to ';?> to_date);?> type; ?>risedby; ?>---no_of_days; ?>status; ?>status; ?> By approved_by; ?>
approved_at; ?>
status; ?> By declined_by; ?>
" DReason; ?> "
status; ?>
+ + + + + + + + + + + + + + + + $value) { ?> - }?> - + + + + + from_date == "" && $value->to_date == "") { ?> + + - status == 'pending') { ?> + + -   + - -   + + no_of_days == 0){ ?> + + + + + status == 'pending'){ ?> + + status == 'Approved'){ ?> + + status == 'Declined'){ ?> + + status == 'canceled'){ ?> + + + - - - -
Created Date/TimeEmployee Name NoteLeave Duration Leave Type Leave Raised ByNo of Days Status Action
+ $type) { ?> + id === $value->type ) { ?> +
created_date; ?>
created_time; ?> +
emp_name; ?>comments; ?> + perm_date);?>
+ from_time); ?> to + to_time);?> +
from_date); echo ' to ';?> + to_date);?> type; ?>Risedby; ?>---no_of_days; ?>status; ?>status; ?> By + ApproveBy; ?>
approved_at; ?>
status; ?> By + DeclineBy; ?>
" DReason; ?> "
status; ?> - -
+ status == 'pending') { ?> + +   + + +   + + + + + + + +
+
+
-
-
-
-
+
@@ -160,103 +165,106 @@ - - + \ No newline at end of file diff --git a/application/modules/User/controllers/User.php b/application/modules/User/controllers/User.php index 988cf8d..434c2f1 100644 --- a/application/modules/User/controllers/User.php +++ b/application/modules/User/controllers/User.php @@ -204,14 +204,15 @@ public function check_password() $table="users"; $userData = $this->MY_Model->edit_option($data, user()->id, $table); // $this->session->sess_destroy(); - $data1['status'] = 'success'; - $data1['csrf_hash'] = $this->security->get_csrf_hash(); - echo json_encode($data1); + // $data1['status'] = 'success'; + // $data1['csrf_hash'] = $this->security->get_csrf_hash(); + // echo json_encode($data1); + redirect('logout'); } else{ - $data['status'] = 'failed'; - $data['csrf_hash'] = $this->security->get_csrf_hash(); - echo json_encode($data); + // $data['status'] = 'failed'; + // $data['csrf_hash'] = $this->security->get_csrf_hash(); + // echo json_encode($data); } } @@ -244,4 +245,4 @@ public function view_business_history($id) echo json_encode($htmlPage); } -} +} \ No newline at end of file diff --git a/application/modules/User/views/add_user.php b/application/modules/User/views/add_user.php index 8f918a0..b689793 100644 --- a/application/modules/User/views/add_user.php +++ b/application/modules/User/views/add_user.php @@ -1,38 +1,40 @@ -
-
+
-
-

Add User

-
+
+

Add User

+
-
-
-
-
-
- +
+
+
+
+
+ - - - - -
-
-
+ + + +
+
+ - - + + - - + -
+
- -
- -
+ +
+ +
- -
- -
+ +
+ +
-
+
-action_permit != 'view') { ?> - +
+
+ + + + + + + + +
- - - - - - - -
- - -
- -
- - -
- -
- -
- -
- - -
- -
- - -
- -
- -
- -

- -
- - -
- -
- - -
- - -
- - -
- - -
- - -
- - - - - - - - - - - -
-
-
- - - -
-
- - -
-
-
- - - - - - - - -
-
- + \ No newline at end of file diff --git a/application/modules/User/views/change_password.php b/application/modules/User/views/change_password.php index cf5c044..86e79ca 100644 --- a/application/modules/User/views/change_password.php +++ b/application/modules/User/views/change_password.php @@ -1,121 +1,119 @@ -
-
+
-
-

Change Password

+
+

Change Password

+
+ + +
+
+
+
+
+
+
+
+ + + + +
+ + +
+ + +
+ +
+ +
+ + +
+ + +
+ +
+ +
+ + +
+ + +
+ + +
+ +
+
+
+ + + +
+
+ + +
+
+
+
+ + + + + + + + +
- - -
-
-
-
-
- - - - - - -
-
-
- - - - -
- - -
- - -
- -
- -
- - -
- - -
- -
- -
- - -
- - -
- - -
- -
- - - -
-
-
- - - -
-
- - -
-
-
- - - - - - - - -
-
+ \ No newline at end of file diff --git a/application/modules/User/views/edit_profile.php b/application/modules/User/views/edit_profile.php index 5770872..e62f67a 100644 --- a/application/modules/User/views/edit_profile.php +++ b/application/modules/User/views/edit_profile.php @@ -1,65 +1,69 @@ -
-
+
-
-

Edit Profile

-
+
+

Edit Profile

+
-
-
-
-
-
- +
+
+
+
+
+ - - - - -
-
-
+ + + + +
+
+ - - - -
+ + + +
- -
- -
+ +
+ +
-
- -
+
+ +
- -
- -
+ +
+ +
-
- -
+
+ +
- -
- -
+ +
+ +
-
- - + - + -
-
-
- - -
-
+
+
+
+ + +
+
- -
-
-
+ +
+
+
@@ -90,5 +94,5 @@ -
-
+
+
\ No newline at end of file diff --git a/application/modules/User/views/profile.php b/application/modules/User/views/profile.php index a8e6eae..17b4a2a 100644 --- a/application/modules/User/views/profile.php +++ b/application/modules/User/views/profile.php @@ -1,13 +1,12 @@ - - -
-
-
-
+ +
+
+
+

User Profile

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

User Details - -

- -
-
-
-
- - - +
+

User Details

-
-
-
- - profile_image == NULL) { - ?> -
- Avatar - -
- - Edit Profile -
-
-
+
+
+ + + + + +
+
+
+ + profile_image == NULL) { + ?> +
+ Avatar + +
+ + Edit Profile +
+
+ -
- Avatar - -
- - Edit Profile -
-
- + Avatar + +
+ + Edit Profile +
+
+ -
-
-
-
-

name ?>

+
+
+
+
+

name ?>

-
    -
  • email ?> -
  • +
      +
    • email ?> +
    • -
    • - mobile ?> -
    • -
    - - Edit Profile -
    - + mobile ?> + +
+ + Edit Profile +
+ -
- +
+
-
-
+
-
- +
+
+