From 0ce506a2aa1f3483d899b05233e9cca3b0c61388 Mon Sep 17 00:00:00 2001 From: Wahyu Ramadhan Date: Fri, 12 May 2023 15:01:40 +0700 Subject: [PATCH] Disable integration --- .../Commands/syncHumanResourceIntegration.php | 6 ++--- .../Controllers/DashboardBoDController.php | 22 +++++++++---------- app/Http/Controllers/ProjectController.php | 10 ++++----- .../Controllers/RequestMaterialController.php | 2 +- .../Controllers/UserToProyekController.php | 2 +- 5 files changed, 21 insertions(+), 21 deletions(-) diff --git a/app/Console/Commands/syncHumanResourceIntegration.php b/app/Console/Commands/syncHumanResourceIntegration.php index 7b4ef5f..6120999 100644 --- a/app/Console/Commands/syncHumanResourceIntegration.php +++ b/app/Console/Commands/syncHumanResourceIntegration.php @@ -39,9 +39,9 @@ class syncHumanResourceIntegration extends Command */ public function handle() { - $url = config('api.adw').'/employees?page=1'; - echo "Requesting to " . $url; - $response = MasterFunctionsHelper::curlReq($url); + // $url = config('api.adw').'/employees?page=1'; + // echo "Requesting to " . $url; + $response = null; if(!$response) return; diff --git a/app/Http/Controllers/DashboardBoDController.php b/app/Http/Controllers/DashboardBoDController.php index 915b8f6..cf32a27 100644 --- a/app/Http/Controllers/DashboardBoDController.php +++ b/app/Http/Controllers/DashboardBoDController.php @@ -37,17 +37,17 @@ class DashboardBoDController extends Controller } private function getInvoiceIntegration($search) { - if(empty($search)) - return response()->json(['status'=>'error', 'message'=>'Empty query string!'], 400); - - $url = str_replace("SEARCH", $search, config('api.adw').'/project_cost?project_no=SEARCH'); - $token = config('api.adw_token'); - $response = $this->curlReq($url, $token); - - if(@$response->data->project_no == "") - return null; - - return $response; + // if(empty($search)) + // return response()->json(['status'=>'error', 'message'=>'Empty query string!'], 400); + // + // $url = str_replace("SEARCH", $search, config('api.adw').'/project_cost?project_no=SEARCH'); + // $token = config('api.adw_token'); + // $response = $this->curlReq($url, $token); + // + // if(@$response->data->project_no == "") + // return null; + // + return null; } // to do diff --git a/app/Http/Controllers/ProjectController.php b/app/Http/Controllers/ProjectController.php index 4689c04..32b8b38 100644 --- a/app/Http/Controllers/ProjectController.php +++ b/app/Http/Controllers/ProjectController.php @@ -389,12 +389,12 @@ class ProjectController extends Controller } public function getInvoiceIntegration(Request $request) { - $search = urlencode($request->search); - if(empty($search)) - return response()->json(['status'=>'error', 'message'=>'Empty query string!'], 400); - $url = str_replace("SEARCH", $search, config('api.adw').'/project_cost?project_no=SEARCH'); + // $search = urlencode($request->search); + // if(empty($search)) + // return response()->json(['status'=>'error', 'message'=>'Empty query string!'], 400); + // $url = str_replace("SEARCH", $search, config('api.adw').'/project_cost?project_no=SEARCH'); - $response = MasterFunctionsHelper::curlReq($url); + $response = null; return response()->json(['status'=>'success', 'data'=> $response, 'code'=>200], 200); diff --git a/app/Http/Controllers/RequestMaterialController.php b/app/Http/Controllers/RequestMaterialController.php index 605cf5f..35cb76d 100644 --- a/app/Http/Controllers/RequestMaterialController.php +++ b/app/Http/Controllers/RequestMaterialController.php @@ -170,7 +170,7 @@ class RequestMaterialController extends Controller } public function getMaterialIntegration(Request $request) { - $search = urlencode($request->name); + $search = null; if(empty($search)) return response()->json(['status'=>'error', 'message'=>'Empty query string!'], 400); $url = str_replace("SEARCH", $search, config('api.adw').'/stock_master?name=SEARCH'); diff --git a/app/Http/Controllers/UserToProyekController.php b/app/Http/Controllers/UserToProyekController.php index fecdfec..dc944ea 100644 --- a/app/Http/Controllers/UserToProyekController.php +++ b/app/Http/Controllers/UserToProyekController.php @@ -185,7 +185,7 @@ class UserToProyekController extends Controller } public function getEmployeeIntegration(Request $request) { - $search = urlencode($request->name); + $search = null; if(empty($search)) return response()->json(['status'=>'error', 'message'=>'Empty query string!'], 400); $url = str_replace("SEARCH", $search, config('api.adw').'/employees?emp_name=SEARCH');