diff --git a/app/Config/Routes.php b/app/Config/Routes.php index 240671ef..2f5af3e2 100644 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -280,3 +280,9 @@ $routes->group("employeeRest", ["filter" => "authJWT"], function($routes){ $routes->post("sendEmail", "EmployeeRestController::send_email"); + + + +// Ticketing System + +// Ticketing System End's diff --git a/app/Controllers/DashboardController.php b/app/Controllers/DashboardController.php index 6e9e957c..ccd39f50 100644 --- a/app/Controllers/DashboardController.php +++ b/app/Controllers/DashboardController.php @@ -21,4 +21,7 @@ class DashboardController extends AdminController echo view('DashBoard'); echo view('layout/footer'); } + + + } diff --git a/app/Controllers/RestAuthenticationController.php b/app/Controllers/RestAuthenticationController.php index 4b14a8bd..1aa3adab 100644 --- a/app/Controllers/RestAuthenticationController.php +++ b/app/Controllers/RestAuthenticationController.php @@ -80,8 +80,8 @@ class RestAuthenticationController extends AdminController $result = ['user_verification' => true , 'otp'=>$randomNumber]; return $this->respond(['status' => 'success','code' => 200,'data' => $result],200); } else { - $result = ['user_verification' => false]; - return $this->respond(['status' => 'failed','code' => 404,'data' => $result],404); + $result = ['user_verification' => false , 'message' => "User not found"]; + return $this->respond(['status' => 'failed','code' => 404,'data' => $result],200); } } catch (\Throwable $th) { @@ -118,7 +118,7 @@ class RestAuthenticationController extends AdminController $result = JWTToken::encode($employeeData); return $this->respond(['status' => 'success','code' => 200,'data' => $result],200); } else { - return $this->respond(['status' => 'failed','code' => 404,'data' => "No data"],404); + return $this->respond(['status' => 'failed','code' => 404,'data' => "Invalid OTP"],200); } } catch (\Exception $e) { return $this->respond(['status' => 'failed','code' => 500,'data' => $e->getMessage()],500); @@ -139,8 +139,8 @@ class RestAuthenticationController extends AdminController $result = ['user_verification' => true , 'otp'=>$randomNumber]; return $this->respond(['status' => 'success','code' => 200,'data' => $result],200); } else { - $result = ['user_verification' => false]; - return $this->respond(['status' => 'failed','code' => 404,'data' => $result],404); + $result = ['user_verification' => false , 'message' => "User not found"]; + return $this->respond(['status' => 'failed','code' => 404,'data' => $result],200); } } catch (\Throwable $th) { @@ -180,7 +180,7 @@ class RestAuthenticationController extends AdminController $result = JWTToken::encode($hrData['0']); return $this->respond(['status' => 'success','code' => 200,'data' => $result],200); } else { - return $this->respond(['status' => 'failed','code' => 404,'data' => "No data"],404); + return $this->respond(['status' => 'failed','code' => 404,'data' => "Invalid OTP"],200); } } catch (\Exception $e) { return $this->respond(['status' => 'failed','code' => 500,'data' => $e->getMessage()],500); diff --git a/app/Helpers/excel_util_helper.php b/app/Helpers/excel_util_helper.php index 44ddf180..84ed0c24 100644 --- a/app/Helpers/excel_util_helper.php +++ b/app/Helpers/excel_util_helper.php @@ -247,22 +247,33 @@ if (!function_exists('data_group_by_family')) function data_group_by_family($emp_data,$data_source = 'excel') { $result = []; + // dd($emp_data); foreach ($emp_data as $rkey => $row) { if($data_source == 'excel') { if(!check_row_is_empty_or_null($row)) { - $result[$row[1]][] = $row; + if(strtolower($row[5]) == 'self' && isset($result[$row[1]])) + { + array_unshift($result[$row[1]],$row); + }else + { + $result[$row[1]][] = $row; + } } - }else if($data_source = 'db') { - $result[$row['emp_code']][] = $row; + if(strtolower($row['relationship']) == 'self' && isset($result[$row['emp_code']])) + { + array_unshift($result[$row['emp_code']],$row); + }else + { + $result[$row['emp_code']][] = $row; + } } } - return $result; } } diff --git a/app/Views/layout/header.php b/app/Views/layout/header.php index e5690d70..dc06d7c0 100644 --- a/app/Views/layout/header.php +++ b/app/Views/layout/header.php @@ -602,7 +602,14 @@
  • - + $sessionData]); + ?> + Tickets