diff --git a/app/Http/Controllers/Controller.php b/app/Http/Controllers/Controller.php index 1ccbf9c..f45ab75 100644 --- a/app/Http/Controllers/Controller.php +++ b/app/Http/Controllers/Controller.php @@ -3,9 +3,10 @@ namespace App\Http\Controllers; use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Http; - use Laravel\Lumen\Routing\Controller as BaseController; +use App\Models\ReportK3Detail; + class Controller extends BaseController { protected $pathImage = "assets/image/"; @@ -211,7 +212,7 @@ class Controller extends BaseController return $query; } - protected function calculateAllCost($activity, $proyek_id){ + protected function calculateAllCost($activity_id, $proyek_id){ $humanCostPlanning = $this->calculateAllHumanCost($activity_id, $proyek_id); $materialCostPlanning = $this->calculateMaterialCost($activity_id, $proyek_id); $toolsCostPlanning = 0; @@ -278,4 +279,17 @@ class Controller extends BaseController return json_decode($response); } + + protected function addDetailK3($dataDetail, $report_id){ + foreach ($dataDetail as $value) { + $dataNew = array( + "report_k3_id"=>$report_id, + "checklist_k3_id"=>$value['checklist_id'], + "name_checklist_k3"=>$value['checklist_name'], + "created_by"=>$this->currentName + ); + + ReportK3Detail::create($dataNew); + } + } } diff --git a/app/Http/Controllers/PresenceController.php b/app/Http/Controllers/PresenceController.php index 3a6e7f5..400c812 100644 --- a/app/Http/Controllers/PresenceController.php +++ b/app/Http/Controllers/PresenceController.php @@ -5,9 +5,7 @@ namespace App\Http\Controllers; use Log; use Illuminate\Http\Request; use App\Models\Presence; -// use App\Models\Activity; -// use GuzzleHttp\Client; -// use Illuminate\Support\Facades\Http; +use App\Models\ReportK3; use Carbon\Carbon; use Illuminate\Support\Facades\DB; @@ -23,9 +21,7 @@ class PresenceController extends Controller $statusBoundary = false; $date = date_create($request->clock_time); // assign and in boundary - if(count($checkLocation) > 0 && $checkLocation[0]['boundary']){ - // $checkLocation[0]['status_assign'] ? $statusBoundary = true - // : + if(count($checkLocation) > 0 && $checkLocation[0]['boundary']){ $statusBoundary = true; } @@ -124,23 +120,151 @@ class PresenceController extends Controller } } + public function reportK3(Request $request){ + // return response()->json(['status'=>'success', 'message'=>$request->report_k3['detail'],'code'=>200], 200); + + $this->validate($request, [ + 'user_id' => 'required' + ]); + + $dataFormK3 = array( + "user_id" => $request->user_id, + "proyek_id" => $request->report_k3['proyek_id'], + "report_date" => $request->time, + "description" => $request->report_k3['description'] + ); + + $checkLocation = $this->checkLocation($request); + $statusBoundary = false; + $date = date_create($request->time); + // assign and in boundary + if(count($checkLocation) > 0 && $checkLocation[0]['boundary']){ + $statusBoundary = true; + } + + // not assign + if(!$checkLocation[0]['status_assign'] && $checkLocation[0]['boundary'] == false){ + $data=array( + 'id' => null, + 'boundary' => $statusBoundary + ); + return response()->json(['status'=>'failed', 'data'=>$data, 'message'=>'Tidak dapat melakukan presensi. Anda belum di assign ke area kerja.','code'=>200], 200); + } + // assign and not in boundary + if($checkLocation[0]['status_assign'] && $checkLocation[0]['boundary'] == false){ + $data=array( + 'id' => null, + 'boundary' => true + ); + return response()->json(['status'=>'failed', 'data'=>$data, 'message'=>'Tidak dapat melakukan presensi. Anda berada di luar area kerja.','code'=>200], 200); + } + + if($request->clock_in_out['type']=="out"){ + $clock_out_loc = $this->getLoc($request->clock_in_out['clock_out_lat'], $request->clock_in_out['clock_out_lng'])->display_name; + $dataUpdate = array( + "clock_out"=>$request->time, + "clock_out_lat" => $request->clock_in_out['clock_out_lat'], + "clock_out_lng" => $request->clock_in_out['clock_out_lng'], + "updated_by"=>$this->currentName, + "clock_out_loc" => $clock_out_loc, + "clock_out_boundary" => $statusBoundary + ); + + $resultUpdate = $this->updateFormAdd($dataUpdate, $request->user_id); + if($resultUpdate && $resultUpdate > 0){ + if($statusBoundary){ + for ($i=0; $i < count($checkLocation); $i++) { + # code... + DB::table('clock_in_out_boundary')->insert([ + "clock_in_out_id" => $resultUpdate, + "user_id" => $request->user_id, + "activity_id" => $checkLocation[$i]['activity_id'], + "type" => $request->clock_in_out['type'], + "created_at" => $date, + "created_by" => $this->currentName + ]); + }; + }; + $data=array( + 'presence_id' => $resultUpdate, + 'boundary' => $statusBoundary + ); + + return response()->json(['status'=>'success', 'data'=>$data,'message'=>'clock out success!','code'=>200], 200); + } + else{ + return response()->json(['status'=>'failed','message'=>'clock out failed please try again!','code'=>400], 400); + } + die(); + } + + $onlyDate = date_format($date,"Y-m-d"); + $clock_in_loc = $this->getLoc($request->clock_in_out['clock_in_lat'], $request->clock_in_out['clock_in_lng'])->display_name; + + $dataFormPresence = array( + 'user_id' => $request->user_id, + 'clock_in' => $request->time, + 'date_presence' => $onlyDate, + 'created_by' => $this->currentName, + 'clock_in_lat' => $request->clock_in_out['clock_in_lat'], + 'clock_in_lng' => $request->clock_in_out['clock_in_lng'], + 'clock_in_loc' => $clock_in_loc, + 'clock_in_boundary' => $statusBoundary + ); + + $result = Presence::create($dataFormPresence); + $data=array( + 'presence_id' => $result->id, + 'boundary' => $statusBoundary + ); + if($result){ + if($statusBoundary){ + $insertk3 = $this->insertK3($dataFormK3, $request->report_k3['detail']) ; + for ($i=0; $i < count($checkLocation); $i++) { + # code... + DB::table('clock_in_out_boundary')->insert([ + "clock_in_out_id" => $result->id, + "user_id" => $request->user_id, + "activity_id" => $checkLocation[$i]['activity_id'], + "type" => $request->type, + "created_at" => $date, + "created_by" => $this->currentName + ]); + }; + $data['report_id'] = $insertk3->id; + }; + return response()->json(['status'=>'success', 'data'=> $data, 'message'=>'clock in successfully!','code'=>200], 200); + }else{ + return response()->json(['status'=>'failed','message'=>'clock in failed!','code'=>400], 400); + } + } + + private function insertK3($params, $details){ + $insert = ReportK3::create($params); + if($insert && $details){ + $this->addDetailK3($details, $insert->id); + } + return $insert; + } + private function checkLocation($params){ // cek user tersebut apakah punya assign task yang ada bondary nya // geom ada di table activity + // $clock_time = $geom = DB::table("assign_hr_to_activity as ahta")->select("ma.geom", "ma.id") ->join("m_activity as ma", "ma.id", "=", "ahta.activity_id") ->where("ahta.user_id", $params->user_id) - ->whereDate("ma.start_date", "<=", $params->clock_time) - ->whereDate("ma.end_date", ">=", $params->clock_time) + ->whereDate("ma.start_date", "<=", $params->time) + ->whereDate("ma.end_date", ">=", $params->time) ->get(); $temp = []; if (count($geom) > 0) { foreach($geom as $dataGeom){ $valGeom = json_decode($dataGeom->geom); - if($params->type=="out"){ - $check = DB::select(DB::raw("SELECT ST_Intersects(ST_GeomFromGeoJSON('".json_encode($valGeom->geometry)."'), ST_GeomFromText('POINT(".$params->clock_out_lng." ".$params->clock_out_lat.")', 4326)) as boundary")); + if($params->clock_in_out['type']=="out"){ + $check = DB::select(DB::raw("SELECT ST_Intersects(ST_GeomFromGeoJSON('".json_encode($valGeom->geometry)."'), ST_GeomFromText('POINT(".$params->clock_in_out['clock_out_lng']." ".$params->clock_in_out['clock_out_lat'].")', 4326)) as boundary")); }else{ - $check = DB::select(DB::raw("SELECT ST_Intersects(ST_GeomFromGeoJSON('".json_encode($valGeom->geometry)."'), ST_GeomFromText('POINT(".$params->clock_in_lng." ".$params->clock_in_lat.")', 4326)) as boundary")); + $check = DB::select(DB::raw("SELECT ST_Intersects(ST_GeomFromGeoJSON('".json_encode($valGeom->geometry)."'), ST_GeomFromText('POINT(".$params->clock_in_out['clock_in_lng']." ".$params->clock_in_out['clock_in_lat'].")', 4326)) as boundary")); } foreach ($check as $key) { // assign and in boundary diff --git a/app/Http/Controllers/ReportK3Controller.php b/app/Http/Controllers/ReportK3Controller.php index 310e435..76db167 100644 --- a/app/Http/Controllers/ReportK3Controller.php +++ b/app/Http/Controllers/ReportK3Controller.php @@ -8,7 +8,7 @@ use App\Models\ReportK3Detail; use App\Models\ProjectToChecklistK3; use App\Models\ChecklistK3; use App\Models\Image; -use DB; +use Illuminate\Support\Facades\DB; class ReportK3Controller extends Controller { @@ -35,19 +35,6 @@ class ReportK3Controller extends Controller return response()->json(['status'=>'failed','message'=>'add data report k3 failed!','code'=>400], 400); } } - - private function addDetailK3($dataDetail, $report_id){ - foreach ($dataDetail as $value) { - $dataNew = array( - "report_k3_id"=>$report_id, - "checklist_k3_id"=>$value['checklist_id'], - "name_checklist_k3"=>$value['checklist_name'], - "created_by"=>$this->currentName - ); - - ReportK3Detail::create($dataNew); - } - } public function edit($id){ if(!$id || (int) $id < 0 || $id==""){ diff --git a/app/Models/HumanResource.php b/app/Models/HumanResource.php index 4745a1d..222a835 100644 --- a/app/Models/HumanResource.php +++ b/app/Models/HumanResource.php @@ -34,6 +34,5 @@ class HumanResource extends Model 'updated_by', 'divisi_id', 'status_boundary' - ]; } diff --git a/rest-client.http b/rest-client.http index 61b3d7a..03878db 100644 --- a/rest-client.http +++ b/rest-client.http @@ -1,1113 +1,1105 @@ -@token = eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9sb2NhbGhvc3Q6ODQ0NFwvYXBpXC9sb2dpbiIsImlhdCI6MTY3NzQ3NzIzMSwiZXhwIjoxNjc4MDgyMDMxLCJuYmYiOjE2Nzc0NzcyMzEsImp0aSI6ImR5WWhRY3ZIbUJEcmFKMG0iLCJzdWIiOjEsInBydiI6IjIzYmQ1Yzg5NDlmNjAwYWRiMzllNzAxYzQwMDg3MmRiN2E1OTc2ZjcifQ.9zT6CBbQholzIdQ9ZBDoxMvrR-PKvIYkGzdNB6bim0Y - -@hostname = https://adw-api.ospro.id/api -# @hostname = https://ospro-api.ospro.id/api -# @hostname = https://api-iu.ospro.id/api -# @hostname = https://api-staging-adw.ospro.id/api -# @hostname = http://localhost:8444/api -# @hostname = http://103.73.125.81:8444/api -# @hostname = http://localhost:8444/adw-backend/api - -###### login -POST {{hostname}}/login -# Authorization: Bearer xxx -# X-REQUEST-TYPE: GraphQL 1123150023 -content-type: application/json - -{ - "username": "admin", - "password": "1nt3gr4s14" -} - -###### Tools Req -### add -POST {{hostname}}/req-tools/add -Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczpcL1wvb3Nwcm8tYXBpLm9zcHJvLmlkXC9hcGlcL2xvZ2luIiwiaWF0IjoxNjUyODYzNzM4LCJleHAiOjE2NTI5NTAxMzgsIm5iZiI6MTY1Mjg2MzczOCwianRpIjoia2ZwNnhwc0ZZZ0dFNEtGSSIsInN1YiI6MSwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.f7a0M-GKYgacXtaEmZJUs2UOPFXaigEwGu8OfZ117kI - -content-type: application/json - -{ - "asset_type": "Alat Berat 1", - "asset_name": "Beco", - "required_date":"2021-12-16", - "qty": 10, - "uom": "Kg", - "description": "test Data", - "created_by":"admin", - "proyek_id":1 -} - -### update -PUT {{hostname}}/req-tools/update/3 -Authorization: Bearer dFWBXe6qQQm_s4DyH68yVt:APA91bFTms-pjqm-9OkugufLF2yjtOTJZQBlVxY8FC5iYq3owmWzGZtlPSSHholMeUxeE0TRQ6pFfEKvy5xRHnufPu4dJNiY-2gRGHKch6o4iWU9gp3GDHQ7sm-ySsE9keCMKzmQ11aM -content-type: application/json - -{ - "qty": 332, -} - -### search -POST {{hostname}}/req-tools/search -Authorization: Bearer {{token}} -content-type: application/json - -{ - "paging":{ - "start":0, - "length":10 - }, - "columns":[ - { - "name":"asset_type", - "logic_operator":"like", - "value":"", - "operator":"AND" - }, - { - "name":"status", - "logic_operator":"<>", - "value":"receipt to site", - "operator":"AND" - } - ], - "joins":[], - "orders":{ - "columns":[ - "id" - ], - "ascending":false - } -} - -### delete -DELETE {{hostname}}/req-tools/delete/13 -Authorization: Bearer dFWBXe6qQQm_s4DyH68yVt:APA91bFTms-pjqm-9OkugufLF2yjtOTJZQBlVxY8FC5iYq3owmWzGZtlPSSHholMeUxeE0TRQ6pFfEKvy5xRHnufPu4dJNiY-2gRGHKch6o4iWU9gp3GDHQ7sm-ySsE9keCMKzmQ11aM -content-type: application/json - - -###### Menu -### add -POST {{hostname}}/menu/add -Authorization: {{token}} -content-type: application/json - -{ - "alias_name": "Alat Berat 1", - "icon": "#", - "name":"2021-12-16", - "parent_id": 23, - "sequence": 100, - "url": "test Data" -} - -### update -PUT {{hostname}}/req-tools/update/3 -Authorization: Bearer dFWBXe6qQQm_s4DyH68yVt:APA91bFTms-pjqm-9OkugufLF2yjtOTJZQBlVxY8FC5iYq3owmWzGZtlPSSHholMeUxeE0TRQ6pFfEKvy5xRHnufPu4dJNiY-2gRGHKch6o4iWU9gp3GDHQ7sm-ySsE9keCMKzmQ11aM -content-type: application/json - -{ - "qty": 332, -} - -### search -POST {{hostname}}/menu/search -Authorization: Bearer {{token}} -content-type: application/json - -{ - "paging":{ - "start":0, - "length":10 - }, - "columns":[ - { - "name":"name", - "logic_operator":"like", - "value":"", - "operator":"AND" - } - ], - "joins":[ - { - "name":"m_menu", - "column_join":"parent_id", - "column_results":["name"], - } - ], - "orders":{ - "columns":[ - "id" - ], - "ascending":false - } -} - -### delete -DELETE {{hostname}}/req-tools/delete/13 -Authorization: Bearer dFWBXe6qQQm_s4DyH68yVt:APA91bFTms-pjqm-9OkugufLF2yjtOTJZQBlVxY8FC5iYq3owmWzGZtlPSSHholMeUxeE0TRQ6pFfEKvy5xRHnufPu4dJNiY-2gRGHKch6o4iWU9gp3GDHQ7sm-ySsE9keCMKzmQ11aM -content-type: application/json - - -###### Material Req -### add -POST {{hostname}}/request-material/add -Authorization: Bearer {{token}} -content-type: application/json - -{ - "description": "Lempengan Besi", - "required_date": "2022-05-04", - "qty": "1000", - "uom": "Lembar", - "fom_date": "2022-05-04", - "proyek_id": 29, - "price":10 - } - -### update -PUT {{hostname}}/request-material/update/20 -Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczpcL1wvb3Nwcm8tYXBpLm9zcHJvLmlkXC9hcGlcL2xvZ2luIiwiaWF0IjoxNjQyMTE1NjQyLCJleHAiOjE2NDIyMDIwNDIsIm5iZiI6MTY0MjExNTY0MiwianRpIjoiVWt1UjRnZjVUMHQ5YXRQWSIsInN1YiI6MSwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.ftCrSs5v7GxqxW64ZcfZn40Opxom5YoFcDMMF1TvWrk -Content-Type: application/x-www-form-urlencoded -Accept: application/json - -{ - "description": "Pebble", - "fom_date": "2022-01-12T09:59:26.190Z", - "id": 20, - "po_date": null, - "pr_date": null, - "qty": "10", - "qty_received": "100", - "received_date": null, - "required_date": "2022-01-12T09:59:07.739Z", - "status": "fom", - "uom": "kg" -} - - - -### search -POST {{hostname}}/request-material/search -Authorization: Bearer dFWBXe6qQQm_s4DyH68yVt:APA91bFTms-pjqm-9OkugufLF2yjtOTJZQBlVxY8FC5iYq3owmWzGZtlPSSHholMeUxeE0TRQ6pFfEKvy5xRHnufPu4dJNiY-2gRGHKch6o4iWU9gp3GDHQ7sm-ySsE9keCMKzmQ11aM -content-type: application/json - -{ - "paging":{ - "start":0, - "length":10 - }, - "columns":[ - { - "name":"description", - "logic_operator":"like", - "value":"", - "operator":"AND" - } - ], - "joins":[], - "orders":{ - "columns":[ - "id" - ], - "ascending":false - } -} - -### delete -DELETE {{hostname}}/request-material/delete/2 -Authorization: Bearer dFWBXe6qQQm_s4DyH68yVt:APA91bFTms-pjqm-9OkugufLF2yjtOTJZQBlVxY8FC5iYq3owmWzGZtlPSSHholMeUxeE0TRQ6pFfEKvy5xRHnufPu4dJNiY-2gRGHKch6o4iWU9gp3GDHQ7sm-ySsE9keCMKzmQ11aM -content-type: application/json - - -###### Human Resource -### add -POST {{hostname}}/human-resource/add -Authorization: Bearer dFWBXe6qQQm_s4DyH68yVt:APA91bFTms-pjqm-9OkugufLF2yjtOTJZQBlVxY8FC5iYq3owmWzGZtlPSSHholMeUxeE0TRQ6pFfEKvy5xRHnufPu4dJNiY-2gRGHKch6o4iWU9gp3GDHQ7sm-ySsE9keCMKzmQ11aM -content-type: application/json - -{ - "role_id" : 1, - "username" : "ibnu", - "password" : "test", - "name" : "ibnu", - "phone_number" : "083823134569", - "email" : "ibnu@gmail.com", - "address" : "gria pesona madani", - "ktp_number" : "3212141105950004", - "employee_type" : "freelance" -} - -### update -PUT {{hostname}}/human-resource/update/8 -Authorization: Bearer dFWBXe6qQQm_s4DyH68yVt:APA91bFTms-pjqm-9OkugufLF2yjtOTJZQBlVxY8FC5iYq3owmWzGZtlPSSHholMeUxeE0TRQ6pFfEKvy5xRHnufPu4dJNiY-2gRGHKch6o4iWU9gp3GDHQ7sm-ySsE9keCMKzmQ11aM -content-type: application/json - -{ - "address" : "gria pesona madani 1" -} - - -### delete -DELETE {{hostname}}/human-resource/delete/8 -Authorization: Bearer dFWBXe6qQQm_s4DyH68yVt:APA91bFTms-pjqm-9OkugufLF2yjtOTJZQBlVxY8FC5iYq3owmWzGZtlPSSHholMeUxeE0TRQ6pFfEKvy5xRHnufPu4dJNiY-2gRGHKch6o4iWU9gp3GDHQ7sm-ySsE9keCMKzmQ11aM -content-type: application/json - -### search -POST {{hostname}}/human-resource/search -Authorization: Bearer dFWBXe6qQQm_s4DyH68yVt:APA91bFTms-pjqm-9OkugufLF2yjtOTJZQBlVxY8FC5iYq3owmWzGZtlPSSHholMeUxeE0TRQ6pFfEKvy5xRHnufPu4dJNiY-2gRGHKch6o4iWU9gp3GDHQ7sm-ySsE9keCMKzmQ11aM -content-type: application/json - -{ - "paging":{ - "start":0, - "length":10 - }, - "columns":[ - { - "name":"name", - "logic_operator":"like", - "value":"", - "operator":"AND" - } - ], - "joins":[], - "orders":{ - "columns":[ - "id" - ], - "ascending":false - } -} - - -###### Material Resource -### add -POST {{hostname}}/material-resource/add -Authorization: Bearer dFWBXe6qQQm_s4DyH68yVt:APA91bFTms-pjqm-9OkugufLF2yjtOTJZQBlVxY8FC5iYq3owmWzGZtlPSSHholMeUxeE0TRQ6pFfEKvy5xRHnufPu4dJNiY-2gRGHKch6o4iWU9gp3GDHQ7sm-ySsE9keCMKzmQ11aM -content-type: application/json - -{ - "id": 3, - "name": "Batangan Besi", - "uom": "truck", - "unit_price": 500000, - "description": "Pasir", - "qty": 1000 -} - -### update -PUT {{hostname}}/material-resource/update/5 -Authorization: Bearer dFWBXe6qQQm_s4DyH68yVt:APA91bFTms-pjqm-9OkugufLF2yjtOTJZQBlVxY8FC5iYq3owmWzGZtlPSSHholMeUxeE0TRQ6pFfEKvy5xRHnufPu4dJNiY-2gRGHKch6o4iWU9gp3GDHQ7sm-ySsE9keCMKzmQ11aM -content-type: application/json - -{ - "uom" : "Batang" -} - - -### delete -DELETE {{hostname}}/material-resource/delete/5 -Authorization: Bearer dFWBXe6qQQm_s4DyH68yVt:APA91bFTms-pjqm-9OkugufLF2yjtOTJZQBlVxY8FC5iYq3owmWzGZtlPSSHholMeUxeE0TRQ6pFfEKvy5xRHnufPu4dJNiY-2gRGHKch6o4iWU9gp3GDHQ7sm-ySsE9keCMKzmQ11aM -content-type: application/json - -### search -POST {{hostname}}/material-resource/search -Authorization: Bearer dFWBXe6qQQm_s4DyH68yVt:APA91bFTms-pjqm-9OkugufLF2yjtOTJZQBlVxY8FC5iYq3owmWzGZtlPSSHholMeUxeE0TRQ6pFfEKvy5xRHnufPu4dJNiY-2gRGHKch6o4iWU9gp3GDHQ7sm-ySsE9keCMKzmQ11aM -content-type: application/json - -{ - "paging":{ - "start":0, - "length":10 - }, - "columns":[ - { - "name":"name", - "logic_operator":"like", - "value":"", - "operator":"AND" - } - ], - "joins":[], - "orders":{ - "columns":[ - "id" - ], - "ascending":false - } -} - - -###### Tools Resource -### add -POST {{hostname}}/tools-resource/add -Authorization: Bearer dFWBXe6qQQm_s4DyH68yVt:APA91bFTms-pjqm-9OkugufLF2yjtOTJZQBlVxY8FC5iYq3owmWzGZtlPSSHholMeUxeE0TRQ6pFfEKvy5xRHnufPu4dJNiY-2gRGHKch6o4iWU9gp3GDHQ7sm-ySsE9keCMKzmQ11aM -content-type: application/json - -{ - "name": "Excavator Belco", - "description": "Excavator Belco", - "uom":"unit", - "qty": "100", - "asset_type": "Alat Berat" -} - -### update -PUT {{hostname}}/tools-resource/update/5 -Authorization: Bearer dFWBXe6qQQm_s4DyH68yVt:APA91bFTms-pjqm-9OkugufLF2yjtOTJZQBlVxY8FC5iYq3owmWzGZtlPSSHholMeUxeE0TRQ6pFfEKvy5xRHnufPu4dJNiY-2gRGHKch6o4iWU9gp3GDHQ7sm-ySsE9keCMKzmQ11aM -content-type: application/json - -{ - "name" : "Excavator Kobelco" -} - - -### delete -DELETE {{hostname}}/tools-resource/delete/5 -Authorization: Bearer dFWBXe6qQQm_s4DyH68yVt:APA91bFTms-pjqm-9OkugufLF2yjtOTJZQBlVxY8FC5iYq3owmWzGZtlPSSHholMeUxeE0TRQ6pFfEKvy5xRHnufPu4dJNiY-2gRGHKch6o4iWU9gp3GDHQ7sm-ySsE9keCMKzmQ11aM -content-type: application/json - -### search -POST {{hostname}}/tools-resource/search -Authorization: Bearer dFWBXe6qQQm_s4DyH68yVt:APA91bFTms-pjqm-9OkugufLF2yjtOTJZQBlVxY8FC5iYq3owmWzGZtlPSSHholMeUxeE0TRQ6pFfEKvy5xRHnufPu4dJNiY-2gRGHKch6o4iWU9gp3GDHQ7sm-ySsE9keCMKzmQ11aM -content-type: application/json - -{ - "paging":{ - "start":0, - "length":10 - }, - "columns":[ - { - "name":"name", - "logic_operator":"like", - "value":"", - "operator":"AND" - } - ], - "joins":[], - "orders":{ - "columns":[ - "id" - ], - "ascending":false - } -} - - -###### Project - -### list -GET {{hostname}}/project/list -Authorization: Bearer {{token}} -content-type: application/json - - -### add -POST {{hostname}}/project/add -Authorization: Bearer {{token}} -content-type: application/json - -{ - "nama": "Excavator Belco", - "keterangan": "Excavator Belco", - "mulai_proyek":"2022/01/11", - "akhir_proyek": "2022/05/11" -} - -### update -PUT {{hostname}}/project/update/5 -Authorization: Bearer dFWBXe6qQQm_s4DyH68yVt:APA91bFTms-pjqm-9OkugufLF2yjtOTJZQBlVxY8FC5iYq3owmWzGZtlPSSHholMeUxeE0TRQ6pFfEKvy5xRHnufPu4dJNiY-2gRGHKch6o4iWU9gp3GDHQ7sm-ySsE9keCMKzmQ11aM -content-type: application/json - -{ - "name" : "Excavator Kobelco" -} - - -### delete -DELETE {{hostname}}/project/delete/19 -Authorization: Bearer {{token}} -content-type: application/json - -### search -POST {{hostname}}/tools-resource/search -Authorization: Bearer dFWBXe6qQQm_s4DyH68yVt:APA91bFTms-pjqm-9OkugufLF2yjtOTJZQBlVxY8FC5iYq3owmWzGZtlPSSHholMeUxeE0TRQ6pFfEKvy5xRHnufPu4dJNiY-2gRGHKch6o4iWU9gp3GDHQ7sm-ySsE9keCMKzmQ11aM -content-type: application/json - -{ - "paging":{ - "start":0, - "length":10 - }, - "columns":[ - { - "name":"name", - "logic_operator":"like", - "value":"", - "operator":"AND" - } - ], - "joins":[], - "orders":{ - "columns":[ - "id" - ], - "ascending":false - } -} - -### dashboard -GET {{hostname}}/project/dashboard/47 -Authorization: Bearer {{token}} -content-type: application/json - - -###### Divisi - -### list -GET {{hostname}}/divisi/list -Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczpcL1wvb3Nwcm8tYXBpLm9zcHJvLmlkXC9hcGlcL2xvZ2luIiwiaWF0IjoxNjQxNDYwNDcyLCJleHAiOjE2NDE0NjQwNzIsIm5iZiI6MTY0MTQ2MDQ3MiwianRpIjoiRjRxYmJ3U25YcEw0OXN0QyIsInN1YiI6MSwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.CLm_ZOEW5GCyGJuIcRNIRD8m1XxIeSCH60QK2HxF8d0 -content-type: application/json - - - -###### Activity -### get data by id version -GET {{hostname}}/activity/33/29/get -Authorization: Bearer {{token}} -content-type: application/json - -###### Rate Sallary - -### list -GET {{hostname}}/project-role/list -Authorization: Bearer {{token}} -content-type: application/json - - - -###### Rate Sallary - -### list -GET {{hostname}}/rate-sallary/list -Authorization: Bearer {{token}} -content-type: application/json - - -### add -POST {{hostname}}/rate-sallary/add -Authorization: Bearer {{token}} -content-type: application/json - -{ - "project_role_id" : 4, - "cost" : 2000, - "type_rate" : "UMR Jatim" -} - -### update -PUT {{hostname}}/rate-sallary/update/{id} -Authorization: Bearer {{token}} -content-type: application/json - -{ - "project_role_id" : 4, - "cost" : 2000, - "type_rate" : "UMR Jatim" -} - -### delete -POST {{hostname}}/rate-sallary/delete/{id} -Authorization: Bearer {{token}} -content-type: application/json - -{ - "project_role_id" : 4, - "cost" : 2000, - "type_rate" : "UMR Jatim" -} - - - -### search -POST {{hostname}}/dashboard/percentage-planning-actual -Authorization: Bearer {{token}} -content-type: application/json - -{ - "paging":{ - "start":0, - "length":10 - }, - "columns":[ - { - "name":"proyek_id", - "logic_operator":"in", - "value":[7,6,4], - "operator":"AND" - }, - { - "name":"version_gantt_id", - "logic_operator":"=", - "value":3, - "operator":"AND" - } - ], - "joins":[], - "orders":{ - "columns":[ - "proyek_id" - ], - "ascending":true - } -} - - -### -POST {{hostname}}/dashboard/cost-planning-actual -Authorization: Bearer {{token}} -content-type: application/json - -{ - "project_id" : [11] -} - - -### -POST {{hostname}}/dashboard/percentage-planning-actual -Authorization: Bearer {{token}} -content-type: application/json - -{ - "project_id" : [11] -} - - -###### project participants -### add -POST {{hostname}}/project-participants/add -Authorization: Bearer {{token}} -content-type: application/json - -{ - "proyek_id" : 11, - "tittle" : "investor", - "name" : "ibnu" -} - - -# get('/project-participants/edit/{id}', 'ProjectParticipantsController@edit'); -### update -# PUT {{hostname}}//project-participants/update/11 - -# POST {{hostname}}/project-participants/search -# DELETE {{hostname}}/project-participants/delete/{id} -# GET {{hostname}}/project-participants/list - -### -GET {{hostname}}/project-participants/list -Authorization: Bearer {{token}} -content-type: application/json - - -### -GET {{hostname}}/project-participants/proyek_id/11 -Authorization: Bearer {{token}} -content-type: application/json - -### -DELETE {{hostname}}/project-participants/delete/1 -Authorization: Bearer {{token}} -content-type: application/json - -### -DELETE {{hostname}}/project-participants/delete-by-proyek/7 -Authorization: Bearer {{token}} -content-type: application/json - -###### project-approval -POST {{hostname}}/project-approval/add -Authorization: Bearer {{token}} -content-type: application/json - -{ - "proyek_id" : 7, - "tittle" : "investor", - "name" : "koko", - "date_approval" : "2022/01/21" -} - -### -get {{hostname}}/project-approval/edit/{id} - - -put {{hostname}}/project-approval/update/{id} -post {{hostname}}/project-approval/search -delete {{hostname}}/project-approval/delete/{id} -get {{hostname}}/project-approval/list - -###### project-milestone -post {{hostname}}/project-milestone/add -Authorization: Bearer {{token}} -content-type: application/json - -{ - "proyek_id" : 7, - "status" : "Build 2. Finish eksekusi", - "due_date" : "2022/01/21", - "deadline" : "2022/01/21" -} - -### -get {{hostname}}/project-milestone/edit/{id} -put {{hostname}}/project-milestone/update/{id} -post {{hostname}}/project-milestone/search -delete {{hostname}}/project-milestone/delete/{id} -get {{hostname}}/project-milestone/list -get {{hostname}}/project-milestone/select - - -### -GET {{hostname}}/template-gantt/get-tree/3 -Authorization: Bearer {{token}} -content-type: application/json - -### -POST {{hostname}}/folder-document-proyek/add -Authorization: Bearer {{token}} -content-type: application/json - -{ - "proyek_id": "12", - "name_folder": "test 1", - "parent_id" : 1 -} - - -### -GET {{hostname}}/folder-document-proyek/list -Authorization: Bearer {{token}} -content-type: application/json - - -### -GET {{hostname}}/folder-document-proyek/get-tree/12 -Authorization: Bearer {{token}} -content-type: application/json - - - -### -POST {{hostname}}/human-resource/select -Authorization: Bearer {{token}} -content-type: application/json - -{ - "idact" : "362", - "idProyek": "11" -} - - -### -POST https://ospro-api.ospro.id/api/dashboard/status-proyek -Authorization: Bearer {{token}} -content-type: application/json - -{ - "project_id": [11] -} - - -### -POST {{hostname}}/activity/get-percentage -Authorization: Bearer {{token}} -content-type: application/json - -{ - "project_id": [11] -} - - -### -POST {{hostname}}/activity/get-curva-s -Authorization: Bearer {{token}} -content-type: application/json - -{ - "project_id": [47], - "period": "week" -} - - -### -POST {{hostname}}/dashboard/curva-s -Authorization: Bearer {{token}} -content-type: application/json - -{ - "project_id": [15] -} - -### -GET https://adw-api.ospro.id/api/request-material/get-material-integration?name=c -Authorization: Bearer {{token}} -content-type: application/json - -### -POST {{hostname}}/presence/search -Authorization: Bearer {{token}} -content-type: application/json - -{ - "paging":{ - "start":0, - "length":10 - }, - "columns":[], - "joins": [ - { - "name": "m_users", - "column_join": "user_id", - "column_results": [ - "username", - "name" - ] - } - ], - "orders":{ - "columns":[ - "id" - ], - "ascending":true - } -} - - -### -POST {{hostname}}/report-k3/search -Authorization: Bearer {{token}} -content-type: application/json - -{ - "paging": { - "start": 0, - "length": 10 - }, - "filter_columns": [ - { - "name": "name", - "value": "", - "table_name": "m_users" - } - ], - "columns": [ - { - "name": "report_date", - "logic_operator": "range", - "value": "2023-02-21 00:00:00", - "value1": "2023-02-21 23:59:59", - "operator": "AND" - }, - { - "name": "name", - "logic_operator": "ilike", - "value": "", - "operator": "AND", - "table_name": "m_users" - }, - { - "name": "proyek_id", - "logic_operator": "in", - "value": [ - 80, - 79, - 78, - 76, - 75, - 74, - 73, - 72, - 71, - 66, - 64, - 63, - 62, - 58, - 57, - 49, - 48, - 47, - 37, - 31 - ] - } - ], - "joins": [ - { - "name": "m_users", - "column_join": "user_id", - "column_results": [ - "name" - ] - }, - { - "name": "m_proyek", - "column_join": "proyek_id", - "column_results": [ - "nama" - ] - } - ], - "orders": { - "columns": [ - "id" - ], - "ascending": false - }, - "child_data": { - "table_name": "t_report_k3_detail", - "column_table": "report_k3_id", - "column_name": "id" - } -} - - - -### -POST {{hostname}}/assign-material/ForReportActivityByMaterial -Authorization: Bearer {{token}} -content-type: application/json - -{ - "idact": 387 -} - - -###### -GET {{hostname}}/presence/clockinout/262 -Authorization: Bearer {{token}} -content-type: application/json - -###### -POST {{hostname}}/presence/add -Authorization: Bearer {{token}} -content-type: application/json - -{ - "clock_in_lat": -6.16678379060529, - "clock_in_lng": 106.9175039866567, - "clock_time": "2023-02-16T14:48:17+07:00", - "type": "in", - "user_id": 1247 -} - -###### -POST {{hostname}}/presence/add -Authorization: Bearer {{token}} -content-type: application/json - -{ - "clock_in_lat": -1.4264273154149407, - "clock_in_lng": 113.98530036945851, - "clock_time": "2023-02-13T16:40:17+07:00", - "type": "in", - "user_id": 1 -} - -###### -# POST {{hostname}}/ -GET {{hostname}}/assign-material/datatablesForReportActivity?draw=2&columns[0][data]=material_name&columns[0][name]=material_name&columns[0][searchable]=true&columns[0][orderable]=true&columns[0][search][value]=&columns[0][search][regex]=false&columns[1][data]=type&columns[1][name]=type&columns[1][searchable]=true&columns[1][orderable]=true&columns[1][search][value]=&columns[1][search][regex]=false&columns[2][data]=qty_planning&columns[2][name]=&columns[2][searchable]=true&columns[2][orderable]=true&columns[2][search][value]=&columns[2][search][regex]=false&columns[3][data]=qty_sum&columns[3][name]=&columns[3][searchable]=true&columns[3][orderable]=true&columns[3][search][value]=&columns[3][search][regex]=false&columns[4][data]=uom&columns[4][name]=uom&columns[4][searchable]=true&columns[4][orderable]=true&columns[4][search][value]=&columns[4][search][regex]=false&columns[5][data]=action&columns[5][name]=action&columns[5][searchable]=true&columns[5][orderable]=true&columns[5][search][value]=&columns[5][search][regex]=false&order[0][column]=0&order[0][dir]=asc&start=0&length=10&search[value]=&search[regex]=false&idact=2511&_=1675418553660 -Authorization: Bearer {{token}} -content-type: application/json - -###### -GET {{hostname}}/dashboard/get-total-project-per-schedule-health -Authorization: Bearer {{token}} -content-type: application/json - -###### -GET {{hostname}}/dashboard/get-detail-expenditure -Authorization: Bearer {{token}} -content-type: application/json - - -###### -GET {{hostname}}/presence/bulk-update-location -Authorization: Bearer {{token}} -content-type: application/json - - -##### -GET https://nominatim.oslogdev.com/reverse?lat=-6.2622811&lon=106.7881746&format=json - -###### - -POST {{hostname}}/waypoint/add -Authorization: Bearer {{token}} -content-type: application/json -{ - "user_id": 1247, - "lat": -6.2622811, - "lng": 106.7881746, - "wptime": "2023-02-07T10:40:17+07:00", - "speed": 0, - "angle": 0, - "satelite": 0 -} - -###### -POST {{hostname}}/map-monitoring/search -Authorization: Bearer {{token}} -content-type: application/json - -{ - "project_id" : [75, 76, 78] -} - -###### -POST {{hostname}}/waypoint/add-bulk -Authorization: Bearer {{token}} -content-type: application/json - -{ - "wp_records": [ - { - "user_id": 1247, - "lon": 106.88702067952579, - "lat": -6.193331793510694, - "wptime": "2023-02-07T10:40:17+07:00", - "speed": 0, - "angle": 0, - "satelite": 0, - "datesend": "2023-02-07T10:40:17+07:00" - }, - { - "user_id": 1247, - "lon": 106.88731982052337, - "lat": -6.1933255977790225, - "wptime": "2023-02-07T10:41:17+07:00", - "speed": 0, - "angle": 0, - "satelite": 0, - "datesend": "2023-02-07T10:41:17+07:00" - }, - { - "user_id": 1247, - "lon": 106.88765896352822, - "lat": -6.193328086924183, - "wptime": "2023-02-07T10:42:17+07:00", - "speed": 0, - "angle": 0, - "satelite": 0, - "datesend": "2023-02-07T10:42:17+07:00" - }, - { - "user_id": 1247, - "lon": 106.88812637133634, - "lat": -6.1933373805197505, - "wptime": "2023-02-07T10:43:17+07:00", - "speed": 0, - "angle": 0, - "satelite": 0, - "datesend": "2023-02-07T10:43:17+07:00" - }, - { - "user_id": 1247, - "lon": 106.88867721532353, - "lat": -6.1933448515770095, - "wptime": "2023-02-07T10:44:17+07:00", - "speed": 0, - "angle": 0, - "satelite": 0, - "datesend": "2023-02-07T10:44:17+07:00" - } - ] -} - -##### -POST {{hostname}}/map-monitoring/search -Authorization: Bearer {{token}} -content-type: application/json - -{ - "time_from": "2023-02-10 00:00:00", - "time_to": "2023-02-10 23:59:00", -} - -# { -# "columns": [ -# { -# "logic_operator": "range", -# "name": "created_at", -# "operator": "AND", -# "value": "2023-02-10 00:00:00", -# "value1": "2023-02-10 23:59:00" -# } -# ], -# "joins": [ -# { -# "column_join": "user_id", -# "column_results": [ -# "username", "name" -# ], -# "name": "m_users" -# } -# ], -# "orders": { -# "ascending": false, -# "columns": [ -# "created_at" -# ] -# }, -# "paging": { -# "length": 25, -# "start": 0 -# } -# } - - -<<<<<<< HEAD -GET /stock_master?name=SEARCH - -###### -GET {{hostname}}/request-material/get-material-integration -Authorization: Bearer {{token}} -content-type: application/json - - -###### -POST {{hostname}}/presence/reportk3 -Authorization: Bearer {{token}} -content-type: application/json - -{ - "time" : "2023-02-16T14:48:17+07:00", // untuk report date, time_clockin/out - "user_id": 1247, - "clock_in_out": { - "clock_in_lat": -6.16678379060529, - "clock_in_lng": 106.9175039866567, - "type": "in" - }, - "report_k3": { - "proyek_id": "", - "description": "", - "detail": [{ - "checklist_id": 1, - "checklist_name": "" - }, - { - "checklist_id": 2, - "checklist_name": "" - }] - - } -} -======= -### get image -# GET {{hostname}}/image/106/presensi -GET {{hostname}}/image/1634/report_activity -Authorization: Bearer {{token}} -content-type: application/json - ->>>>>>> e18d0c3c5b06faa60a69b484259ec0102546422f +@token = eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9sb2NhbGhvc3Q6ODQ0NFwvYXBpXC9sb2dpbiIsImlhdCI6MTY3NzQ3NzIzMSwiZXhwIjoxNjc4MDgyMDMxLCJuYmYiOjE2Nzc0NzcyMzEsImp0aSI6ImR5WWhRY3ZIbUJEcmFKMG0iLCJzdWIiOjEsInBydiI6IjIzYmQ1Yzg5NDlmNjAwYWRiMzllNzAxYzQwMDg3MmRiN2E1OTc2ZjcifQ.9zT6CBbQholzIdQ9ZBDoxMvrR-PKvIYkGzdNB6bim0Y + +@hostname = https://adw-api.ospro.id/api +# @hostname = https://ospro-api.ospro.id/api +# @hostname = https://api-iu.ospro.id/api +# @hostname = https://api-staging-adw.ospro.id/api +# @hostname = http://localhost:8444/api +# @hostname = http://103.73.125.81:8444/api +# @hostname = http://localhost:8444/adw-backend/api + +###### login +POST {{hostname}}/login +# Authorization: Bearer xxx +# X-REQUEST-TYPE: GraphQL 1123150023 +content-type: application/json + +{ + "username": "admin", + "password": "1nt3gr4s14" +} + +###### Tools Req +### add +POST {{hostname}}/req-tools/add +Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczpcL1wvb3Nwcm8tYXBpLm9zcHJvLmlkXC9hcGlcL2xvZ2luIiwiaWF0IjoxNjUyODYzNzM4LCJleHAiOjE2NTI5NTAxMzgsIm5iZiI6MTY1Mjg2MzczOCwianRpIjoia2ZwNnhwc0ZZZ0dFNEtGSSIsInN1YiI6MSwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.f7a0M-GKYgacXtaEmZJUs2UOPFXaigEwGu8OfZ117kI + +content-type: application/json + +{ + "asset_type": "Alat Berat 1", + "asset_name": "Beco", + "required_date":"2021-12-16", + "qty": 10, + "uom": "Kg", + "description": "test Data", + "created_by":"admin", + "proyek_id":1 +} + +### update +PUT {{hostname}}/req-tools/update/3 +Authorization: Bearer dFWBXe6qQQm_s4DyH68yVt:APA91bFTms-pjqm-9OkugufLF2yjtOTJZQBlVxY8FC5iYq3owmWzGZtlPSSHholMeUxeE0TRQ6pFfEKvy5xRHnufPu4dJNiY-2gRGHKch6o4iWU9gp3GDHQ7sm-ySsE9keCMKzmQ11aM +content-type: application/json + +{ + "qty": 332, +} + +### search +POST {{hostname}}/req-tools/search +Authorization: Bearer {{token}} +content-type: application/json + +{ + "paging":{ + "start":0, + "length":10 + }, + "columns":[ + { + "name":"asset_type", + "logic_operator":"like", + "value":"", + "operator":"AND" + }, + { + "name":"status", + "logic_operator":"<>", + "value":"receipt to site", + "operator":"AND" + } + ], + "joins":[], + "orders":{ + "columns":[ + "id" + ], + "ascending":false + } +} + +### delete +DELETE {{hostname}}/req-tools/delete/13 +Authorization: Bearer dFWBXe6qQQm_s4DyH68yVt:APA91bFTms-pjqm-9OkugufLF2yjtOTJZQBlVxY8FC5iYq3owmWzGZtlPSSHholMeUxeE0TRQ6pFfEKvy5xRHnufPu4dJNiY-2gRGHKch6o4iWU9gp3GDHQ7sm-ySsE9keCMKzmQ11aM +content-type: application/json + + +###### Menu +### add +POST {{hostname}}/menu/add +Authorization: {{token}} +content-type: application/json + +{ + "alias_name": "Alat Berat 1", + "icon": "#", + "name":"2021-12-16", + "parent_id": 23, + "sequence": 100, + "url": "test Data" +} + +### update +PUT {{hostname}}/req-tools/update/3 +Authorization: Bearer dFWBXe6qQQm_s4DyH68yVt:APA91bFTms-pjqm-9OkugufLF2yjtOTJZQBlVxY8FC5iYq3owmWzGZtlPSSHholMeUxeE0TRQ6pFfEKvy5xRHnufPu4dJNiY-2gRGHKch6o4iWU9gp3GDHQ7sm-ySsE9keCMKzmQ11aM +content-type: application/json + +{ + "qty": 332, +} + +### search +POST {{hostname}}/menu/search +Authorization: Bearer {{token}} +content-type: application/json + +{ + "paging":{ + "start":0, + "length":10 + }, + "columns":[ + { + "name":"name", + "logic_operator":"like", + "value":"", + "operator":"AND" + } + ], + "joins":[ + { + "name":"m_menu", + "column_join":"parent_id", + "column_results":["name"], + } + ], + "orders":{ + "columns":[ + "id" + ], + "ascending":false + } +} + +### delete +DELETE {{hostname}}/req-tools/delete/13 +Authorization: Bearer dFWBXe6qQQm_s4DyH68yVt:APA91bFTms-pjqm-9OkugufLF2yjtOTJZQBlVxY8FC5iYq3owmWzGZtlPSSHholMeUxeE0TRQ6pFfEKvy5xRHnufPu4dJNiY-2gRGHKch6o4iWU9gp3GDHQ7sm-ySsE9keCMKzmQ11aM +content-type: application/json + + +###### Material Req +### add +POST {{hostname}}/request-material/add +Authorization: Bearer {{token}} +content-type: application/json + +{ + "description": "Lempengan Besi", + "required_date": "2022-05-04", + "qty": "1000", + "uom": "Lembar", + "fom_date": "2022-05-04", + "proyek_id": 29, + "price":10 + } + +### update +PUT {{hostname}}/request-material/update/20 +Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczpcL1wvb3Nwcm8tYXBpLm9zcHJvLmlkXC9hcGlcL2xvZ2luIiwiaWF0IjoxNjQyMTE1NjQyLCJleHAiOjE2NDIyMDIwNDIsIm5iZiI6MTY0MjExNTY0MiwianRpIjoiVWt1UjRnZjVUMHQ5YXRQWSIsInN1YiI6MSwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.ftCrSs5v7GxqxW64ZcfZn40Opxom5YoFcDMMF1TvWrk +Content-Type: application/x-www-form-urlencoded +Accept: application/json + +{ + "description": "Pebble", + "fom_date": "2022-01-12T09:59:26.190Z", + "id": 20, + "po_date": null, + "pr_date": null, + "qty": "10", + "qty_received": "100", + "received_date": null, + "required_date": "2022-01-12T09:59:07.739Z", + "status": "fom", + "uom": "kg" +} + + + +### search +POST {{hostname}}/request-material/search +Authorization: Bearer dFWBXe6qQQm_s4DyH68yVt:APA91bFTms-pjqm-9OkugufLF2yjtOTJZQBlVxY8FC5iYq3owmWzGZtlPSSHholMeUxeE0TRQ6pFfEKvy5xRHnufPu4dJNiY-2gRGHKch6o4iWU9gp3GDHQ7sm-ySsE9keCMKzmQ11aM +content-type: application/json + +{ + "paging":{ + "start":0, + "length":10 + }, + "columns":[ + { + "name":"description", + "logic_operator":"like", + "value":"", + "operator":"AND" + } + ], + "joins":[], + "orders":{ + "columns":[ + "id" + ], + "ascending":false + } +} + +### delete +DELETE {{hostname}}/request-material/delete/2 +Authorization: Bearer dFWBXe6qQQm_s4DyH68yVt:APA91bFTms-pjqm-9OkugufLF2yjtOTJZQBlVxY8FC5iYq3owmWzGZtlPSSHholMeUxeE0TRQ6pFfEKvy5xRHnufPu4dJNiY-2gRGHKch6o4iWU9gp3GDHQ7sm-ySsE9keCMKzmQ11aM +content-type: application/json + + +###### Human Resource +### add +POST {{hostname}}/human-resource/add +Authorization: Bearer dFWBXe6qQQm_s4DyH68yVt:APA91bFTms-pjqm-9OkugufLF2yjtOTJZQBlVxY8FC5iYq3owmWzGZtlPSSHholMeUxeE0TRQ6pFfEKvy5xRHnufPu4dJNiY-2gRGHKch6o4iWU9gp3GDHQ7sm-ySsE9keCMKzmQ11aM +content-type: application/json + +{ + "role_id" : 1, + "username" : "ibnu", + "password" : "test", + "name" : "ibnu", + "phone_number" : "083823134569", + "email" : "ibnu@gmail.com", + "address" : "gria pesona madani", + "ktp_number" : "3212141105950004", + "employee_type" : "freelance" +} + +### update +PUT {{hostname}}/human-resource/update/8 +Authorization: Bearer dFWBXe6qQQm_s4DyH68yVt:APA91bFTms-pjqm-9OkugufLF2yjtOTJZQBlVxY8FC5iYq3owmWzGZtlPSSHholMeUxeE0TRQ6pFfEKvy5xRHnufPu4dJNiY-2gRGHKch6o4iWU9gp3GDHQ7sm-ySsE9keCMKzmQ11aM +content-type: application/json + +{ + "address" : "gria pesona madani 1" +} + + +### delete +DELETE {{hostname}}/human-resource/delete/8 +Authorization: Bearer dFWBXe6qQQm_s4DyH68yVt:APA91bFTms-pjqm-9OkugufLF2yjtOTJZQBlVxY8FC5iYq3owmWzGZtlPSSHholMeUxeE0TRQ6pFfEKvy5xRHnufPu4dJNiY-2gRGHKch6o4iWU9gp3GDHQ7sm-ySsE9keCMKzmQ11aM +content-type: application/json + +### search +POST {{hostname}}/human-resource/search +Authorization: Bearer dFWBXe6qQQm_s4DyH68yVt:APA91bFTms-pjqm-9OkugufLF2yjtOTJZQBlVxY8FC5iYq3owmWzGZtlPSSHholMeUxeE0TRQ6pFfEKvy5xRHnufPu4dJNiY-2gRGHKch6o4iWU9gp3GDHQ7sm-ySsE9keCMKzmQ11aM +content-type: application/json + +{ + "paging":{ + "start":0, + "length":10 + }, + "columns":[ + { + "name":"name", + "logic_operator":"like", + "value":"", + "operator":"AND" + } + ], + "joins":[], + "orders":{ + "columns":[ + "id" + ], + "ascending":false + } +} + + +###### Material Resource +### add +POST {{hostname}}/material-resource/add +Authorization: Bearer dFWBXe6qQQm_s4DyH68yVt:APA91bFTms-pjqm-9OkugufLF2yjtOTJZQBlVxY8FC5iYq3owmWzGZtlPSSHholMeUxeE0TRQ6pFfEKvy5xRHnufPu4dJNiY-2gRGHKch6o4iWU9gp3GDHQ7sm-ySsE9keCMKzmQ11aM +content-type: application/json + +{ + "id": 3, + "name": "Batangan Besi", + "uom": "truck", + "unit_price": 500000, + "description": "Pasir", + "qty": 1000 +} + +### update +PUT {{hostname}}/material-resource/update/5 +Authorization: Bearer dFWBXe6qQQm_s4DyH68yVt:APA91bFTms-pjqm-9OkugufLF2yjtOTJZQBlVxY8FC5iYq3owmWzGZtlPSSHholMeUxeE0TRQ6pFfEKvy5xRHnufPu4dJNiY-2gRGHKch6o4iWU9gp3GDHQ7sm-ySsE9keCMKzmQ11aM +content-type: application/json + +{ + "uom" : "Batang" +} + + +### delete +DELETE {{hostname}}/material-resource/delete/5 +Authorization: Bearer dFWBXe6qQQm_s4DyH68yVt:APA91bFTms-pjqm-9OkugufLF2yjtOTJZQBlVxY8FC5iYq3owmWzGZtlPSSHholMeUxeE0TRQ6pFfEKvy5xRHnufPu4dJNiY-2gRGHKch6o4iWU9gp3GDHQ7sm-ySsE9keCMKzmQ11aM +content-type: application/json + +### search +POST {{hostname}}/material-resource/search +Authorization: Bearer dFWBXe6qQQm_s4DyH68yVt:APA91bFTms-pjqm-9OkugufLF2yjtOTJZQBlVxY8FC5iYq3owmWzGZtlPSSHholMeUxeE0TRQ6pFfEKvy5xRHnufPu4dJNiY-2gRGHKch6o4iWU9gp3GDHQ7sm-ySsE9keCMKzmQ11aM +content-type: application/json + +{ + "paging":{ + "start":0, + "length":10 + }, + "columns":[ + { + "name":"name", + "logic_operator":"like", + "value":"", + "operator":"AND" + } + ], + "joins":[], + "orders":{ + "columns":[ + "id" + ], + "ascending":false + } +} + + +###### Tools Resource +### add +POST {{hostname}}/tools-resource/add +Authorization: Bearer dFWBXe6qQQm_s4DyH68yVt:APA91bFTms-pjqm-9OkugufLF2yjtOTJZQBlVxY8FC5iYq3owmWzGZtlPSSHholMeUxeE0TRQ6pFfEKvy5xRHnufPu4dJNiY-2gRGHKch6o4iWU9gp3GDHQ7sm-ySsE9keCMKzmQ11aM +content-type: application/json + +{ + "name": "Excavator Belco", + "description": "Excavator Belco", + "uom":"unit", + "qty": "100", + "asset_type": "Alat Berat" +} + +### update +PUT {{hostname}}/tools-resource/update/5 +Authorization: Bearer dFWBXe6qQQm_s4DyH68yVt:APA91bFTms-pjqm-9OkugufLF2yjtOTJZQBlVxY8FC5iYq3owmWzGZtlPSSHholMeUxeE0TRQ6pFfEKvy5xRHnufPu4dJNiY-2gRGHKch6o4iWU9gp3GDHQ7sm-ySsE9keCMKzmQ11aM +content-type: application/json + +{ + "name" : "Excavator Kobelco" +} + + +### delete +DELETE {{hostname}}/tools-resource/delete/5 +Authorization: Bearer dFWBXe6qQQm_s4DyH68yVt:APA91bFTms-pjqm-9OkugufLF2yjtOTJZQBlVxY8FC5iYq3owmWzGZtlPSSHholMeUxeE0TRQ6pFfEKvy5xRHnufPu4dJNiY-2gRGHKch6o4iWU9gp3GDHQ7sm-ySsE9keCMKzmQ11aM +content-type: application/json + +### search +POST {{hostname}}/tools-resource/search +Authorization: Bearer dFWBXe6qQQm_s4DyH68yVt:APA91bFTms-pjqm-9OkugufLF2yjtOTJZQBlVxY8FC5iYq3owmWzGZtlPSSHholMeUxeE0TRQ6pFfEKvy5xRHnufPu4dJNiY-2gRGHKch6o4iWU9gp3GDHQ7sm-ySsE9keCMKzmQ11aM +content-type: application/json + +{ + "paging":{ + "start":0, + "length":10 + }, + "columns":[ + { + "name":"name", + "logic_operator":"like", + "value":"", + "operator":"AND" + } + ], + "joins":[], + "orders":{ + "columns":[ + "id" + ], + "ascending":false + } +} + + +###### Project + +### list +GET {{hostname}}/project/list +Authorization: Bearer {{token}} +content-type: application/json + + +### add +POST {{hostname}}/project/add +Authorization: Bearer {{token}} +content-type: application/json + +{ + "nama": "Excavator Belco", + "keterangan": "Excavator Belco", + "mulai_proyek":"2022/01/11", + "akhir_proyek": "2022/05/11" +} + +### update +PUT {{hostname}}/project/update/5 +Authorization: Bearer dFWBXe6qQQm_s4DyH68yVt:APA91bFTms-pjqm-9OkugufLF2yjtOTJZQBlVxY8FC5iYq3owmWzGZtlPSSHholMeUxeE0TRQ6pFfEKvy5xRHnufPu4dJNiY-2gRGHKch6o4iWU9gp3GDHQ7sm-ySsE9keCMKzmQ11aM +content-type: application/json + +{ + "name" : "Excavator Kobelco" +} + + +### delete +DELETE {{hostname}}/project/delete/19 +Authorization: Bearer {{token}} +content-type: application/json + +### search +POST {{hostname}}/tools-resource/search +Authorization: Bearer dFWBXe6qQQm_s4DyH68yVt:APA91bFTms-pjqm-9OkugufLF2yjtOTJZQBlVxY8FC5iYq3owmWzGZtlPSSHholMeUxeE0TRQ6pFfEKvy5xRHnufPu4dJNiY-2gRGHKch6o4iWU9gp3GDHQ7sm-ySsE9keCMKzmQ11aM +content-type: application/json + +{ + "paging":{ + "start":0, + "length":10 + }, + "columns":[ + { + "name":"name", + "logic_operator":"like", + "value":"", + "operator":"AND" + } + ], + "joins":[], + "orders":{ + "columns":[ + "id" + ], + "ascending":false + } +} + +### dashboard +GET {{hostname}}/project/dashboard/47 +Authorization: Bearer {{token}} +content-type: application/json + + +###### Divisi + +### list +GET {{hostname}}/divisi/list +Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczpcL1wvb3Nwcm8tYXBpLm9zcHJvLmlkXC9hcGlcL2xvZ2luIiwiaWF0IjoxNjQxNDYwNDcyLCJleHAiOjE2NDE0NjQwNzIsIm5iZiI6MTY0MTQ2MDQ3MiwianRpIjoiRjRxYmJ3U25YcEw0OXN0QyIsInN1YiI6MSwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.CLm_ZOEW5GCyGJuIcRNIRD8m1XxIeSCH60QK2HxF8d0 +content-type: application/json + + + +###### Activity +### get data by id version +GET {{hostname}}/activity/33/29/get +Authorization: Bearer {{token}} +content-type: application/json + +###### Rate Sallary + +### list +GET {{hostname}}/project-role/list +Authorization: Bearer {{token}} +content-type: application/json + + + +###### Rate Sallary + +### list +GET {{hostname}}/rate-sallary/list +Authorization: Bearer {{token}} +content-type: application/json + + +### add +POST {{hostname}}/rate-sallary/add +Authorization: Bearer {{token}} +content-type: application/json + +{ + "project_role_id" : 4, + "cost" : 2000, + "type_rate" : "UMR Jatim" +} + +### update +PUT {{hostname}}/rate-sallary/update/{id} +Authorization: Bearer {{token}} +content-type: application/json + +{ + "project_role_id" : 4, + "cost" : 2000, + "type_rate" : "UMR Jatim" +} + +### delete +POST {{hostname}}/rate-sallary/delete/{id} +Authorization: Bearer {{token}} +content-type: application/json + +{ + "project_role_id" : 4, + "cost" : 2000, + "type_rate" : "UMR Jatim" +} + + + +### search +POST {{hostname}}/dashboard/percentage-planning-actual +Authorization: Bearer {{token}} +content-type: application/json + +{ + "paging":{ + "start":0, + "length":10 + }, + "columns":[ + { + "name":"proyek_id", + "logic_operator":"in", + "value":[7,6,4], + "operator":"AND" + }, + { + "name":"version_gantt_id", + "logic_operator":"=", + "value":3, + "operator":"AND" + } + ], + "joins":[], + "orders":{ + "columns":[ + "proyek_id" + ], + "ascending":true + } +} + + +### +POST {{hostname}}/dashboard/cost-planning-actual +Authorization: Bearer {{token}} +content-type: application/json + +{ + "project_id" : [11] +} + + +### +POST {{hostname}}/dashboard/percentage-planning-actual +Authorization: Bearer {{token}} +content-type: application/json + +{ + "project_id" : [11] +} + + +###### project participants +### add +POST {{hostname}}/project-participants/add +Authorization: Bearer {{token}} +content-type: application/json + +{ + "proyek_id" : 11, + "tittle" : "investor", + "name" : "ibnu" +} + + +# get('/project-participants/edit/{id}', 'ProjectParticipantsController@edit'); +### update +# PUT {{hostname}}//project-participants/update/11 + +# POST {{hostname}}/project-participants/search +# DELETE {{hostname}}/project-participants/delete/{id} +# GET {{hostname}}/project-participants/list + +### +GET {{hostname}}/project-participants/list +Authorization: Bearer {{token}} +content-type: application/json + + +### +GET {{hostname}}/project-participants/proyek_id/11 +Authorization: Bearer {{token}} +content-type: application/json + +### +DELETE {{hostname}}/project-participants/delete/1 +Authorization: Bearer {{token}} +content-type: application/json + +### +DELETE {{hostname}}/project-participants/delete-by-proyek/7 +Authorization: Bearer {{token}} +content-type: application/json + +###### project-approval +POST {{hostname}}/project-approval/add +Authorization: Bearer {{token}} +content-type: application/json + +{ + "proyek_id" : 7, + "tittle" : "investor", + "name" : "koko", + "date_approval" : "2022/01/21" +} + +### +get {{hostname}}/project-approval/edit/{id} + + +put {{hostname}}/project-approval/update/{id} +post {{hostname}}/project-approval/search +delete {{hostname}}/project-approval/delete/{id} +get {{hostname}}/project-approval/list + +###### project-milestone +post {{hostname}}/project-milestone/add +Authorization: Bearer {{token}} +content-type: application/json + +{ + "proyek_id" : 7, + "status" : "Build 2. Finish eksekusi", + "due_date" : "2022/01/21", + "deadline" : "2022/01/21" +} + +### +get {{hostname}}/project-milestone/edit/{id} +put {{hostname}}/project-milestone/update/{id} +post {{hostname}}/project-milestone/search +delete {{hostname}}/project-milestone/delete/{id} +get {{hostname}}/project-milestone/list +get {{hostname}}/project-milestone/select + + +### +GET {{hostname}}/template-gantt/get-tree/3 +Authorization: Bearer {{token}} +content-type: application/json + +### +POST {{hostname}}/folder-document-proyek/add +Authorization: Bearer {{token}} +content-type: application/json + +{ + "proyek_id": "12", + "name_folder": "test 1", + "parent_id" : 1 +} + + +### +GET {{hostname}}/folder-document-proyek/list +Authorization: Bearer {{token}} +content-type: application/json + + +### +GET {{hostname}}/folder-document-proyek/get-tree/12 +Authorization: Bearer {{token}} +content-type: application/json + + + +### +POST {{hostname}}/human-resource/select +Authorization: Bearer {{token}} +content-type: application/json + +{ + "idact" : "362", + "idProyek": "11" +} + + +### +POST https://ospro-api.ospro.id/api/dashboard/status-proyek +Authorization: Bearer {{token}} +content-type: application/json + +{ + "project_id": [11] +} + + +### +POST {{hostname}}/activity/get-percentage +Authorization: Bearer {{token}} +content-type: application/json + +{ + "project_id": [11] +} + + +### +POST {{hostname}}/activity/get-curva-s +Authorization: Bearer {{token}} +content-type: application/json + +{ + "project_id": [47], + "period": "week" +} + + +### +POST {{hostname}}/dashboard/curva-s +Authorization: Bearer {{token}} +content-type: application/json + +{ + "project_id": [15] +} + +### +GET https://adw-api.ospro.id/api/request-material/get-material-integration?name=c +Authorization: Bearer {{token}} +content-type: application/json + +### +POST {{hostname}}/presence/search +Authorization: Bearer {{token}} +content-type: application/json + +{ + "paging":{ + "start":0, + "length":10 + }, + "columns":[], + "joins": [ + { + "name": "m_users", + "column_join": "user_id", + "column_results": [ + "username", + "name" + ] + } + ], + "orders":{ + "columns":[ + "id" + ], + "ascending":true + } +} + + +### +POST {{hostname}}/report-k3/search +Authorization: Bearer {{token}} +content-type: application/json + +{ + "paging": { + "start": 0, + "length": 10 + }, + "filter_columns": [ + { + "name": "name", + "value": "", + "table_name": "m_users" + } + ], + "columns": [ + { + "name": "report_date", + "logic_operator": "range", + "value": "2023-02-21 00:00:00", + "value1": "2023-02-21 23:59:59", + "operator": "AND" + }, + { + "name": "name", + "logic_operator": "ilike", + "value": "", + "operator": "AND", + "table_name": "m_users" + }, + { + "name": "proyek_id", + "logic_operator": "in", + "value": [ + 80, + 79, + 78, + 76, + 75, + 74, + 73, + 72, + 71, + 66, + 64, + 63, + 62, + 58, + 57, + 49, + 48, + 47, + 37, + 31 + ] + } + ], + "joins": [ + { + "name": "m_users", + "column_join": "user_id", + "column_results": [ + "name" + ] + }, + { + "name": "m_proyek", + "column_join": "proyek_id", + "column_results": [ + "nama" + ] + } + ], + "orders": { + "columns": [ + "id" + ], + "ascending": false + }, + "child_data": { + "table_name": "t_report_k3_detail", + "column_table": "report_k3_id", + "column_name": "id" + } +} + + + +### +POST {{hostname}}/assign-material/ForReportActivityByMaterial +Authorization: Bearer {{token}} +content-type: application/json + +{ + "idact": 387 +} + + +###### +GET {{hostname}}/presence/clockinout/262 +Authorization: Bearer {{token}} +content-type: application/json + +###### +POST {{hostname}}/presence/add +Authorization: Bearer {{token}} +content-type: application/json + +{ + "clock_in_lat": -6.16678379060529, + "clock_in_lng": 106.9175039866567, + "clock_time": "2023-02-16T14:48:17+07:00", + "type": "in", + "user_id": 1247 +} + +###### +POST {{hostname}}/presence/add +Authorization: Bearer {{token}} +content-type: application/json + +{ + "clock_in_lat": -1.4264273154149407, + "clock_in_lng": 113.98530036945851, + "clock_time": "2023-02-13T16:40:17+07:00", + "type": "in", + "user_id": 1 +} + +###### +# POST {{hostname}}/ +GET {{hostname}}/assign-material/datatablesForReportActivity?draw=2&columns[0][data]=material_name&columns[0][name]=material_name&columns[0][searchable]=true&columns[0][orderable]=true&columns[0][search][value]=&columns[0][search][regex]=false&columns[1][data]=type&columns[1][name]=type&columns[1][searchable]=true&columns[1][orderable]=true&columns[1][search][value]=&columns[1][search][regex]=false&columns[2][data]=qty_planning&columns[2][name]=&columns[2][searchable]=true&columns[2][orderable]=true&columns[2][search][value]=&columns[2][search][regex]=false&columns[3][data]=qty_sum&columns[3][name]=&columns[3][searchable]=true&columns[3][orderable]=true&columns[3][search][value]=&columns[3][search][regex]=false&columns[4][data]=uom&columns[4][name]=uom&columns[4][searchable]=true&columns[4][orderable]=true&columns[4][search][value]=&columns[4][search][regex]=false&columns[5][data]=action&columns[5][name]=action&columns[5][searchable]=true&columns[5][orderable]=true&columns[5][search][value]=&columns[5][search][regex]=false&order[0][column]=0&order[0][dir]=asc&start=0&length=10&search[value]=&search[regex]=false&idact=2511&_=1675418553660 +Authorization: Bearer {{token}} +content-type: application/json + +###### +GET {{hostname}}/dashboard/get-total-project-per-schedule-health +Authorization: Bearer {{token}} +content-type: application/json + +###### +GET {{hostname}}/dashboard/get-detail-expenditure +Authorization: Bearer {{token}} +content-type: application/json + + +###### +GET {{hostname}}/presence/bulk-update-location +Authorization: Bearer {{token}} +content-type: application/json + + +##### +GET https://nominatim.oslogdev.com/reverse?lat=-6.2622811&lon=106.7881746&format=json + +###### + +POST {{hostname}}/waypoint/add +Authorization: Bearer {{token}} +content-type: application/json +{ + "user_id": 1247, + "lat": -6.2622811, + "lng": 106.7881746, + "wptime": "2023-02-07T10:40:17+07:00", + "speed": 0, + "angle": 0, + "satelite": 0 +} + +###### +POST {{hostname}}/map-monitoring/search +Authorization: Bearer {{token}} +content-type: application/json + +{ + "project_id" : [75, 76, 78] +} + +###### +POST {{hostname}}/waypoint/add-bulk +Authorization: Bearer {{token}} +content-type: application/json + +{ + "wp_records": [ + { + "user_id": 1247, + "lon": 106.88702067952579, + "lat": -6.193331793510694, + "wptime": "2023-02-07T10:40:17+07:00", + "speed": 0, + "angle": 0, + "satelite": 0, + "datesend": "2023-02-07T10:40:17+07:00" + }, + { + "user_id": 1247, + "lon": 106.88731982052337, + "lat": -6.1933255977790225, + "wptime": "2023-02-07T10:41:17+07:00", + "speed": 0, + "angle": 0, + "satelite": 0, + "datesend": "2023-02-07T10:41:17+07:00" + }, + { + "user_id": 1247, + "lon": 106.88765896352822, + "lat": -6.193328086924183, + "wptime": "2023-02-07T10:42:17+07:00", + "speed": 0, + "angle": 0, + "satelite": 0, + "datesend": "2023-02-07T10:42:17+07:00" + }, + { + "user_id": 1247, + "lon": 106.88812637133634, + "lat": -6.1933373805197505, + "wptime": "2023-02-07T10:43:17+07:00", + "speed": 0, + "angle": 0, + "satelite": 0, + "datesend": "2023-02-07T10:43:17+07:00" + }, + { + "user_id": 1247, + "lon": 106.88867721532353, + "lat": -6.1933448515770095, + "wptime": "2023-02-07T10:44:17+07:00", + "speed": 0, + "angle": 0, + "satelite": 0, + "datesend": "2023-02-07T10:44:17+07:00" + } + ] +} + +##### +POST {{hostname}}/map-monitoring/search +Authorization: Bearer {{token}} +content-type: application/json + +{ + "time_from": "2023-02-10 00:00:00", + "time_to": "2023-02-10 23:59:00", +} + +# { +# "columns": [ +# { +# "logic_operator": "range", +# "name": "created_at", +# "operator": "AND", +# "value": "2023-02-10 00:00:00", +# "value1": "2023-02-10 23:59:00" +# } +# ], +# "joins": [ +# { +# "column_join": "user_id", +# "column_results": [ +# "username", "name" +# ], +# "name": "m_users" +# } +# ], +# "orders": { +# "ascending": false, +# "columns": [ +# "created_at" +# ] +# }, +# "paging": { +# "length": 25, +# "start": 0 +# } +# } + + +<<<<<<< HEAD +GET /stock_master?name=SEARCH + +###### +GET {{hostname}}/request-material/get-material-integration +Authorization: Bearer {{token}} +content-type: application/json + + +###### +POST {{hostname}}/presence/reportk3 +Authorization: Bearer {{token}} +content-type: application/json + +{ + "time" : "2023-02-16T14:48:17+07:00", // untuk report date, time_clockin/out + "user_id": 1247, + "clock_in_out": { + "clock_in_lat": -6.16678379060529, + "clock_in_lng": 106.9175039866567, + "type": "in" + }, + "report_k3": { + "proyek_id": "", + "description": "", + "detail": [{ + "checklist_id": 1, + "checklist_name": "" + }, + { + "checklist_id": 2, + "checklist_name": "" + }] + + } +} diff --git a/routes/web.php b/routes/web.php index 57e03bc..49cc04b 100644 --- a/routes/web.php +++ b/routes/web.php @@ -230,6 +230,7 @@ $router->group(['prefix'=>'api', 'middleware' => 'cors'], function () use ($rout $router->delete('/presence/delete/{id}', 'PresenceController@delete'); $router->get('/presence/list', 'PresenceController@list'); $router->get('/presence/clockinout/{id}', 'PresenceController@clockinout'); + $router->post('/presence/reportk3', 'PresenceController@reportK3'); $router->get('/presence/bulk-update-location', 'PresenceController@bulkUpdateLocation'); $router->post('/permit/add', 'AbsentController@add');