Browse Source

converging

pull/3/head
Yusuf 2 years ago
parent
commit
0985b0bfa8
  1. 377
      app/Http/Controllers/ActivityController.php
  2. 723
      app/Http/Controllers/ProjectController.php
  3. 78
      app/Http/Middleware/CorsMiddleware.php
  4. 7
      app/Models/Activity.php
  5. 421
      routes/web.php

377
app/Http/Controllers/ActivityController.php

@ -401,193 +401,206 @@ class ActivityController extends Controller
} }
$dataFinal=[]; $dataFinal=[];
foreach ($allGantt as $keyGantt) { foreach ($allGantt as $keyGantt) {
$dataProject = Project::find($keyGantt['proyek_id']); $dataProject = Project::find($keyGantt['proyek_id']);
$dataHeader = Activity::where('type_activity', 'header')->where("proyek_id", $keyGantt['proyek_id'])->where("version_gantt_id", $keyGantt['last_gantt_id'])->first(); $dataHeader = Activity::where('type_activity', 'header')->where("proyek_id", $keyGantt['proyek_id'])->where("version_gantt_id", $keyGantt['last_gantt_id'])->first();
if($dataHeader){ if($dataHeader){
$totalRencanaBudget = Activity::where('parent_id', $dataHeader->id)->where("proyek_id", $keyGantt['proyek_id'])->where("version_gantt_id", $keyGantt['last_gantt_id'])->sum("rencana_biaya"); $totalRencanaBudget = Activity::where('parent_id', $dataHeader->id)->where("proyek_id", $keyGantt['proyek_id'])->where("version_gantt_id", $keyGantt['last_gantt_id'])->sum("rencana_biaya");
}else{ }else{
$totalRencanaBudget = Activity::whereNull('parent_id')->where("proyek_id", $keyGantt['proyek_id'])->where("version_gantt_id", $keyGantt['last_gantt_id'])->sum("rencana_biaya"); $totalRencanaBudget = Activity::whereNull('parent_id')->where("proyek_id", $keyGantt['proyek_id'])->where("version_gantt_id", $keyGantt['last_gantt_id'])->sum("rencana_biaya");
} }
$minDate = DB::table('assign_material_to_activity as ama') $minDate = DB::table('assign_material_to_activity as ama')
->where("ama.proyek_id", $keyGantt['proyek_id']) ->where("ama.proyek_id", $keyGantt['proyek_id'])
->join('m_activity as a', 'a.id', '=', 'ama.activity_id') ->join('m_activity as a', 'a.id', '=', 'ama.activity_id')
->where('a.version_gantt_id', '=', $keyGantt['last_gantt_id']) ->where('a.version_gantt_id', '=', $keyGantt['last_gantt_id'])
->min("plan_date"); ->min("plan_date");
$maxDate = DB::table('assign_material_to_activity as ama') $maxDate = DB::table('assign_material_to_activity as ama')
->where("ama.proyek_id", $keyGantt['proyek_id']) ->where("ama.proyek_id", $keyGantt['proyek_id'])
->join('m_activity as a', 'a.id', '=', 'ama.activity_id') ->join('m_activity as a', 'a.id', '=', 'ama.activity_id')
->where('a.version_gantt_id', '=', $keyGantt['last_gantt_id']) ->where('a.version_gantt_id', '=', $keyGantt['last_gantt_id'])
->max("plan_date"); ->max("plan_date");
$begin = new \DateTime($minDate); $begin = new \DateTime($minDate);
$end = new \DateTime($maxDate); $end = new \DateTime($maxDate);
$end2 = new \DateTime($maxDate); $end2 = new \DateTime($maxDate);
$interval = \DateInterval::createFromDateString('1 day'); $interval = \DateInterval::createFromDateString('1 day');
$period = new \DatePeriod($begin, $interval, $end); $period = new \DatePeriod($begin, $interval, $end);
$arr_ActualM = []; $arr_ActualM = [];
$tempDate = []; $tempDate = [];
$tempPercentage = []; $tempPercentage = [];
$tempTtlPercentPlan=0; $tempTtlPercentPlan=0;
$tempTtlPercentActual=0; $tempTtlPercentActual=0;
$currentACWP = 0; $currentACWP = 0;
$budgetControlACWP = 0; $budgetControlACWP = 0;
$currentProgressActivity = 0; $currentProgressActivity = 0;
$currentBCWP = 0; $currentBCWP = 0;
$budgetControlBCWP = 0; $budgetControlBCWP = 0;
foreach ($period as $dt) { foreach ($period as $dt) {
$dataPlanM = DB::table('assign_material_to_activity as ama')
->select('ama.activity_id', 'ama.qty_planning', 'ama.plan_date', 'ama.start_activity', 'a.bobot_planning', 'a.biaya_actual', 'a.duration', 'a.persentase_progress') $dataPlanM = DB::table('assign_material_to_activity as ama')
->join('m_activity as a', 'a.id', '=', 'ama.activity_id') ->select('ama.activity_id', 'ama.qty_planning', 'ama.plan_date', 'ama.start_activity', 'a.bobot_planning', 'a.biaya_actual', 'a.duration', 'a.persentase_progress')
->where('ama.proyek_id', '=', $keyGantt['proyek_id']) ->join('m_activity as a', 'a.id', '=', 'ama.activity_id')
->where('a.version_gantt_id', '=', $keyGantt['last_gantt_id']) ->where('ama.proyek_id', '=', $keyGantt['proyek_id'])
->whereDate('ama.plan_date', $dt->format("Y-m-d")) ->where('a.version_gantt_id', '=', $keyGantt['last_gantt_id'])
->get(); ->whereDate('ama.plan_date', $dt->format("Y-m-d"))
$dataActualM = DB::table('report_activity_material as ram') ->get();
->select('ram.activity_id', 'ram.qty', 'ram.report_date', 'a.bobot_planning', 'a.biaya_actual', 'a.duration', 'a.persentase_progress') $dataActualM = DB::table('report_activity_material as ram')
->join('m_activity as a', 'a.id', '=', 'ram.activity_id') ->select('ram.activity_id', 'ram.qty', 'ram.report_date', 'a.bobot_planning', 'a.biaya_actual', 'a.duration', 'a.persentase_progress')
->where('a.version_gantt_id', '=', $keyGantt['last_gantt_id']) ->join('m_activity as a', 'a.id', '=', 'ram.activity_id')
->where('a.proyek_id', '=', $keyGantt['proyek_id']) ->where('a.version_gantt_id', '=', $keyGantt['last_gantt_id'])
->whereDate('ram.report_date', $dt->format("Y-m-d")) ->where('a.proyek_id', '=', $keyGantt['proyek_id'])
->get(); ->whereDate('ram.report_date', $dt->format("Y-m-d"))
$dataTempPlan = []; ->get();
$x = 0; $dataTempPlan = [];
$sumPercentagePlan=0; $x = 0;
$totalACWP = isset($totalACWP) ? $totalACWP : 0; $sumPercentagePlan=0;
$totalBCWP = isset($totalBCWP) ? $totalBCWP : 0; $totalACWP = isset($totalACWP) ? $totalACWP : 0;
$totalBCWP = isset($totalBCWP) ? $totalBCWP : 0;
foreach ($dataPlanM as $keyPlanM) {
$sumVolPlan = DB::table('assign_material_to_activity') foreach ($dataPlanM as $keyPlanM) {
->select('activity_id', DB::raw('SUM(qty_planning) as ttl_qty_plan')) $sumVolPlan = DB::table('assign_material_to_activity')
->where('activity_id', '=', $keyPlanM->activity_id) ->select('activity_id', DB::raw('SUM(qty_planning) as ttl_qty_plan'))
->groupBy('activity_id') ->where('activity_id', '=', $keyPlanM->activity_id)
->first(); ->groupBy('activity_id')
$dataTempPlan [$x]['activity_id'] = $keyPlanM->activity_id; ->first();
$dataTempPlan [$x]['qty_plan'] = $keyPlanM->qty_planning; $dataTempPlan [$x]['activity_id'] = $keyPlanM->activity_id;
$dataTempPlan [$x]['plan_date'] = $keyPlanM->plan_date; $dataTempPlan [$x]['qty_plan'] = $keyPlanM->qty_planning;
$dataTempPlan [$x]['start_activity'] = $keyPlanM->start_activity; $dataTempPlan [$x]['plan_date'] = $keyPlanM->plan_date;
$dataTempPlan [$x]['bobot_planning'] = $keyPlanM->bobot_planning; $dataTempPlan [$x]['start_activity'] = $keyPlanM->start_activity;
$dataTempPlan [$x]['ttl_plan'] = $sumVolPlan->ttl_qty_plan; $dataTempPlan [$x]['bobot_planning'] = $keyPlanM->bobot_planning;
$dataTempPlan [$x]['biaya_actual'] = $keyPlanM->biaya_actual; $dataTempPlan [$x]['ttl_plan'] = $sumVolPlan->ttl_qty_plan;
$dataTempPlan [$x]['duration'] = $keyPlanM->duration; $dataTempPlan [$x]['biaya_actual'] = $keyPlanM->biaya_actual;
$dataTempPlan [$x]['persentase_progress'] = $keyPlanM->persentase_progress; $dataTempPlan [$x]['duration'] = $keyPlanM->duration;
$dataTempPlan [$x]['percentage'] = ($keyPlanM->qty_planning/$sumVolPlan->ttl_qty_plan)*$keyPlanM->bobot_planning; $dataTempPlan [$x]['persentase_progress'] = $keyPlanM->persentase_progress;
$sumPercentagePlan+=($keyPlanM->qty_planning/$sumVolPlan->ttl_qty_plan)*$keyPlanM->bobot_planning; $dataTempPlan [$x]['percentage'] = ($keyPlanM->qty_planning/$sumVolPlan->ttl_qty_plan)*$keyPlanM->bobot_planning;
$totalBCWP += (((($keyPlanM->persentase_progress*$keyPlanM->bobot_planning)/100)/$keyPlanM->duration)* $totalRencanaBudget)/100;
$dataTempPlan [$x]['totalBCWP'] = $totalBCWP; $sumPercentagePlan+=($keyPlanM->qty_planning/$sumVolPlan->ttl_qty_plan)*$keyPlanM->bobot_planning;
$x++; try {
} $totalBCWP += (((($keyPlanM->persentase_progress*$keyPlanM->bobot_planning)/100)/$keyPlanM->duration)* $totalRencanaBudget)/100;
$dataTempPlan [$x]['totalBCWP'] = $totalBCWP;
$w = 0; $x++;
$dataTempReport = []; } catch (\Exception $e) {
$sumPercentageActual=0; return response()->json(['message' => $e->getMessage(),
foreach ($dataActualM as $keyActualM) { 'data' => $keyPlanM->persentase_progress,
$sumVolActual = DB::table('assign_material_to_activity') 'data2' => $keyPlanM->bobot_planning,
->select('activity_id', DB::raw('SUM(qty_planning) as ttl_qty_plan')) 'data3' => $keyPlanM->duration,
->where('activity_id', '=', $keyActualM->activity_id) 'data4' => $totalRencanaBudget,
->groupBy('activity_id') 'data5' => $keyPlanM,
->first(); ]);
$dataTempReport [$w]['activity_id'] = $keyActualM->activity_id; }
$dataTempReport [$w]['qty'] = $keyActualM->qty; }
$dataTempReport [$w]['report_date'] = $keyActualM->report_date;
$dataTempReport [$w]['bobot_planning'] = $keyActualM->bobot_planning; $w = 0;
$dataTempReport [$w]['ttl_plan'] = $sumVolActual->ttl_qty_plan; $dataTempReport = [];
$dataTempReport [$w]['biaya_actual'] = $keyActualM->biaya_actual; $sumPercentageActual=0;
$dataTempReport [$w]['duration'] = $keyActualM->duration; foreach ($dataActualM as $keyActualM) {
$dataTempReport [$w]['persentase_progress'] = $keyActualM->persentase_progress; $sumVolActual = DB::table('assign_material_to_activity')
$dataTempReport [$w]['percentage'] = ($keyActualM->qty/$sumVolActual->ttl_qty_plan)*$keyActualM->bobot_planning; ->select('activity_id', DB::raw('SUM(qty_planning) as ttl_qty_plan'))
$sumPercentageActual+=($keyActualM->qty/$sumVolActual->ttl_qty_plan)*$keyActualM->bobot_planning; ->where('activity_id', '=', $keyActualM->activity_id)
$totalACWP += $keyActualM->biaya_actual/$keyActualM->duration; ->groupBy('activity_id')
$dataTempReport [$w]['totalacwp'] = $totalACWP; ->first();
$w++; $dataTempReport [$w]['activity_id'] = $keyActualM->activity_id;
} $dataTempReport [$w]['qty'] = $keyActualM->qty;
$dataTempReport [$w]['report_date'] = $keyActualM->report_date;
$arr_ActualM[] = array( $dataTempReport [$w]['bobot_planning'] = $keyActualM->bobot_planning;
'date'=>$dt->format("Y-m-d"), $dataTempReport [$w]['ttl_plan'] = $sumVolActual->ttl_qty_plan;
'percentPlan'=>$sumPercentagePlan, $dataTempReport [$w]['biaya_actual'] = $keyActualM->biaya_actual;
'percentActual'=>$sumPercentageActual, $dataTempReport [$w]['duration'] = $keyActualM->duration;
'plan'=>$dataTempPlan, $dataTempReport [$w]['persentase_progress'] = $keyActualM->persentase_progress;
'actual'=>$dataTempReport, $dataTempReport [$w]['percentage'] = ($keyActualM->qty/$sumVolActual->ttl_qty_plan)*$keyActualM->bobot_planning;
); $sumPercentageActual+=($keyActualM->qty/$sumVolActual->ttl_qty_plan)*$keyActualM->bobot_planning;
if(isset($dataPayload['period']) && $dataPayload['period'] == 'week'){ $totalACWP += $keyActualM->biaya_actual/$keyActualM->duration;
if($dt->format("w")==1){ $dataTempReport [$w]['totalacwp'] = $totalACWP;
if($totalACWP > 0 ){ $w++;
$budgetControlACWP = $currentACWP + $totalACWP; }
}
if($totalBCWP > 0 ){ $arr_ActualM[] = array(
$budgetControlBCWP = $currentBCWP + $totalBCWP; 'date'=>$dt->format("Y-m-d"),
} 'percentPlan'=>$sumPercentagePlan,
'percentActual'=>$sumPercentageActual,
$tempTtlPercentPlan+= $sumPercentagePlan; 'plan'=>$dataTempPlan,
$tempTtlPercentActual+= $sumPercentageActual; 'actual'=>$dataTempReport,
$currentACWP += $totalACWP; );
$currentBCWP += $totalBCWP;
if(isset($dataPayload['period']) && $dataPayload['period'] == 'week'){
$tempPercentage[] = array(round($tempTtlPercentPlan,2), round($tempTtlPercentActual,2)); if($dt->format("w")==1){
$tempDate[] = array($dt->format("Y-m-d"), 0, 0); if($totalACWP > 0 ){
}else if($dt->format("Y-m-d") == $end2->format("Y-m-d")) { $budgetControlACWP = $currentACWP + $totalACWP;
$tempTtlPercentPlan+= $sumPercentagePlan; }
$tempTtlPercentActual+= $sumPercentageActual; if($totalBCWP > 0 ){
$currentACWP += $totalACWP; $budgetControlBCWP = $currentBCWP + $totalBCWP;
$currentBCWP += $totalBCWP; }
$tempPercentage[] = array(round($tempTtlPercentPlan,2), round($tempTtlPercentActual,2)); $tempTtlPercentPlan+= $sumPercentagePlan;
$tempDate[] = array($dt->format("Y-m-d"), 0, 0); $tempTtlPercentActual+= $sumPercentageActual;
$tempTtlPercentPlan = 0; $currentACWP += $totalACWP;
$tempTtlPercentActual = 0; $currentBCWP += $totalBCWP;
}
}else{ $tempPercentage[] = array(round($tempTtlPercentPlan,2), round($tempTtlPercentActual,2));
$tempPercentage[] = array(round($sumPercentagePlan,2), round($sumPercentageActual,2)); $tempDate[] = array($dt->format("Y-m-d"), 0, 0);
$tempDate[] = array($dt->format("Y-m-d"), 0, 0); }else if($dt->format("Y-m-d") == $end2->format("Y-m-d")) {
} // error here
} $tempTtlPercentPlan+= $sumPercentagePlan;
$tempTtlPercentActual+= $sumPercentageActual;
if(round($totalACWP,0) > $totalRencanaBudget){ $currentACWP += $totalACWP;
$estimatedCost = round($totalACWP,0)+0; $currentBCWP += $totalBCWP;
}else{
$estimatedCost = ($totalRencanaBudget+0); $tempPercentage[] = array(round($tempTtlPercentPlan,2), round($tempTtlPercentActual,2));
} $tempDate[] = array($dt->format("Y-m-d"), 0, 0);
$costDeviation = $totalRencanaBudget - $estimatedCost; $tempTtlPercentPlan = 0;
if($costDeviation > 0){ $tempTtlPercentActual = 0;
$potential = "SAVING"; }
} else { }else{
$potential = $costDeviation == 0 ? "ON BUDGET" : "OVERRUN"; $tempPercentage[] = array(round($sumPercentagePlan,2), round($sumPercentageActual,2));
} $tempDate[] = array($dt->format("Y-m-d"), 0, 0);
}
$dataResponse = array( }
"date" =>$tempDate,
"percentage" =>$tempPercentage, if(round($totalACWP,0) > $totalRencanaBudget){
"data_details" =>$arr_ActualM, $estimatedCost = round($totalACWP,0)+0;
"budget_control" =>array("current_budget"=> $totalRencanaBudget, }else{
"acwp" => round($totalACWP,0), $estimatedCost = ($totalRencanaBudget+0);
"bcwp" => round($totalBCWP,0), }
"rem_to_complete" => ($totalRencanaBudget - round($totalACWP,0)), $costDeviation = $totalRencanaBudget - $estimatedCost;
"add_cost_to_complete" => 0, if($costDeviation > 0){
"estimated_at_completion" => $estimatedCost, $potential = "SAVING";
"cost_deviation" => $costDeviation, } else {
"potential" => $potential, $potential = $costDeviation == 0 ? "ON BUDGET" : "OVERRUN";
) }
);
$dataResponse = array(
$dataFinal[] = array( "date" =>$tempDate,
"proyek_name"=> $dataProject->nama, "percentage" =>$tempPercentage,
"data"=>$dataResponse, "data_details" =>$arr_ActualM,
"allGant"=>$allGantt "budget_control" =>array("current_budget"=> $totalRencanaBudget,
); "acwp" => round($totalACWP,0),
"bcwp" => round($totalBCWP,0),
"rem_to_complete" => ($totalRencanaBudget - round($totalACWP,0)),
"add_cost_to_complete" => 0,
"estimated_at_completion" => $estimatedCost,
"cost_deviation" => $costDeviation,
"potential" => $potential,
)
);
$dataFinal[] = array(
"proyek_name"=> $dataProject->nama,
"data"=>$dataResponse,
"allGant"=>$allGantt
);
return response()->json(['status'=>'success','code'=>200, 'data' => $dataFinal], 200);
} }
return response()->json(['status'=>'success','code'=>200, 'data' => $dataFinal], 200);
} }
private function getLatestGantt($id){ private function getLatestGantt($id){
return array( return array(
"last_gantt_id" => VersionGantt::where("proyek_id", $id)->latest(), "last_gantt_id" => VersionGantt::where("proyek_id", $id)->max("id"),
"proyek_id" => $id "proyek_id" => $id
); );
} }

723
app/Http/Controllers/ProjectController.php

@ -1,361 +1,362 @@
<?php <?php
namespace App\Http\Controllers; namespace App\Http\Controllers;
use Illuminate\Http\Request; use Illuminate\Http\Request;
use App\Models\Project; use App\Models\Project;
use App\Models\UserToProyek; use App\Models\UserToProyek;
use App\Models\Activity; use App\Models\Activity;
use App\Models\UserToActivity; use App\Models\UserToActivity;
use App\Models\User; use App\Models\User;
use App\Models\AssignMaterial; use App\Models\AssignMaterial;
use App\Models\DokumenProject; use App\Models\DokumenProject;
use App\Models\FolderDocumentProyek; use App\Models\FolderDocumentProyek;
use App\Models\ProjectCharter; use App\Models\ProjectCharter;
use App\Models\ProjectApproval; use App\Models\ProjectApproval;
use App\Models\ProjectPhase; use App\Models\ProjectPhase;
use App\Models\ProjectType; use App\Models\ProjectType;
use App\Models\ProjectMileStone; use App\Models\ProjectMileStone;
use App\Models\ProjectParticipants; use App\Models\ProjectParticipants;
use App\Models\ShowHideColumn; use App\Models\ShowHideColumn;
use App\Models\VersionGantt; use App\Models\VersionGantt;
use App\Models\Image; use App\Models\Image;
use App\Models\CommentActivity; use App\Models\CommentActivity;
use App\Models\Link; use App\Models\Link;
use App\Models\ActivityDokumen; use App\Models\ActivityDokumen;
use App\Models\Holiday; use App\Models\Holiday;
use App\Models\ReportActivity; use App\Models\ReportActivity;
use App\Models\OfficeHours; use App\Models\OfficeHours;
use DB; use DB;
class ProjectController extends Controller class ProjectController extends Controller
{ {
public function add(Request $request) public function add(Request $request)
{ {
$this->validate($request, [ $this->validate($request, [
'nama' => 'required', 'nama' => 'required',
'mulai_proyek' => 'required', 'mulai_proyek' => 'required',
'akhir_proyek' => 'required', 'akhir_proyek' => 'required',
'rencana_biaya' => 'required', 'rencana_biaya' => 'required',
'type_proyek_id' => 'required' 'type_proyek_id' => 'required'
]); ]);
$data = $request->all(); $data = $request->all();
$data['created_by'] = $this->currentName; $data['created_by'] = $this->currentName;
$result = Project::create($data); $result = Project::create($data);
if(!$result) if(!$result)
return response()->json(['status'=>'failed','message'=>'Failed to add data!','code'=> 500], 500); return response()->json(['status'=>'failed','message'=>'Failed to add data!','code'=> 500], 500);
$this->createOfficeHours($result->id); $this->createOfficeHours($result->id);
$dataResultInsert = Project::where('nama', $data['nama'])->where('mulai_proyek', $data['mulai_proyek'])->first(); $dataResultInsert = Project::where('nama', $data['nama'])->where('mulai_proyek', $data['mulai_proyek'])->first();
return response()->json(['status'=>'success','message'=>'Data added!', 'data_result' =>$dataResultInsert, 'code'=> 200], 200); return response()->json(['status'=>'success','message'=>'Data added!', 'data_result' =>$dataResultInsert, 'code'=> 200], 200);
} }
public function edit($id){ public function edit($id){
if(empty($id) || !is_int((int)$id)) if(empty($id) || !is_int((int)$id))
return response()->json(['status'=>'failed','message'=>'id is required!','code'=>400], 400); return response()->json(['status'=>'failed','message'=>'id is required!','code'=>400], 400);
$result = Project::find($id); $result = Project::find($id);
if(!$result) if(!$result)
return response()->json(['status'=>'failed','message'=> 'Data not found!','code'=> 404], 404); return response()->json(['status'=>'failed','message'=> 'Data not found!','code'=> 404], 404);
return response()->json(['status'=>'success','code'=> 200,'data'=>$result], 200); return response()->json(['status'=>'success','code'=> 200,'data'=>$result], 200);
} }
public function update(Request $request, $id) public function update(Request $request, $id)
{ {
if(empty($id) || !is_int((int)$id)) if(empty($id) || !is_int((int)$id))
return response()->json(['status'=>'failed','message'=>'id is required!','code'=>400], 400); return response()->json(['status'=>'failed','message'=>'id is required!','code'=>400], 400);
$data = Project::find($id); $data = Project::find($id);
if(!$data) if(!$data)
return response()->json(['status'=>'failed','message'=> 'Data not found!','code'=> 404], 404); return response()->json(['status'=>'failed','message'=> 'Data not found!','code'=> 404], 404);
$result = $data->update($request->all()); $result = $data->update($request->all());
if(!$result) if(!$result)
return response()->json(['status'=>'failed','message'=> 'Failed to update!','code'=> 500], 500); return response()->json(['status'=>'failed','message'=> 'Failed to update!','code'=> 500], 500);
return response()->json(['status'=>'success','message'=>'Data updated!','code' => 200], 200); return response()->json(['status'=>'success','message'=>'Data updated!','code' => 200], 200);
} }
private function createOfficeHours($proyek_id) private function createOfficeHours($proyek_id)
{ {
$dataCreate = array( $dataCreate = array(
"proyek_id"=>$proyek_id, "proyek_id"=>$proyek_id,
"monday_start"=> "08:00:00", "monday_start"=> "08:00:00",
"monday_end"=> "16:00:00", "monday_end"=> "16:00:00",
"tuesday_start"=> "08:00:00", "tuesday_start"=> "08:00:00",
"tuesday_end"=> "16:00:00", "tuesday_end"=> "16:00:00",
"wednesday_start"=> "08:00:00", "wednesday_start"=> "08:00:00",
"wednesday_end"=> "16:00:00", "wednesday_end"=> "16:00:00",
"thursday_start"=> "08:00:00", "thursday_start"=> "08:00:00",
"thursday_end"=> "16:00:00", "thursday_end"=> "16:00:00",
"friday_start"=> "08:00:00", "friday_start"=> "08:00:00",
"friday_end"=> "16:00:00", "friday_end"=> "16:00:00",
"saturday_start"=> "08:00:00", "saturday_start"=> "08:00:00",
"saturday_end"=> "16:00:00", "saturday_end"=> "16:00:00",
"sunday_start"=> "08:00:00", "sunday_start"=> "08:00:00",
"sunday_end"=> "16:00:00", "sunday_end"=> "16:00:00",
"created_by"=> $this->currentName "created_by"=> $this->currentName
); );
OfficeHours::create($dataCreate); OfficeHours::create($dataCreate);
return true; return true;
} }
public function delete($id) public function delete($id)
{ {
$data = Project::find($id); $data = Project::find($id);
if(!$data) if(!$data)
return response()->json(['status'=>'failed','message'=>'Data not found!','code'=> 404], 404); return response()->json(['status'=>'failed','message'=>'Data not found!','code'=> 404], 404);
$this->deleteRelative($id); $this->deleteRelative($id);
if(!$data->delete()) if(!$data->delete())
return response()->json(['status'=>'failed','message'=>'Delete failed!','code'=> 500], 500); return response()->json(['status'=>'failed','message'=>'Delete failed!','code'=> 500], 500);
return response()->json(['status'=>'success','message'=>'Data deleted!','code'=>200], 200); return response()->json(['status'=>'success','message'=>'Data deleted!','code'=>200], 200);
} }
private function deleteRelative($project_id) private function deleteRelative($project_id)
{ {
UserToProyek::where('proyek_id', $project_id)->delete(); UserToProyek::where('proyek_id', $project_id)->delete();
UserToActivity::where('proyek_id', $project_id)->delete(); UserToActivity::where('proyek_id', $project_id)->delete();
AssignMaterial::where('proyek_id', $project_id)->delete(); AssignMaterial::where('proyek_id', $project_id)->delete();
ProjectCharter::where('proyek_id', $project_id)->delete(); ProjectCharter::where('proyek_id', $project_id)->delete();
ProjectApproval::where('proyek_id', $project_id)->delete(); ProjectApproval::where('proyek_id', $project_id)->delete();
ProjectMileStone::where('proyek_id', $project_id)->delete(); ProjectMileStone::where('proyek_id', $project_id)->delete();
ProjectParticipants::where('proyek_id', $project_id)->delete(); ProjectParticipants::where('proyek_id', $project_id)->delete();
$this->deleteVersionGantt($project_id); $this->deleteVersionGantt($project_id);
$this->deleteDokumenProject($project_id); $this->deleteDokumenProject($project_id);
} }
private function deleteVersionGantt($project_id) private function deleteVersionGantt($project_id)
{ {
$dataVg = VersionGantt::where("proyek_id", $project_id)->pluck("id"); $dataVg = VersionGantt::where("proyek_id", $project_id)->pluck("id");
$vhIds = $dataVg->all(); $vhIds = $dataVg->all();
$activity = Activity::whereIn("version_gantt_id", $vhIds)->pluck('id'); $activity = Activity::whereIn("version_gantt_id", $vhIds)->pluck('id');
$activityIds = $activity->all(); $activityIds = $activity->all();
$dataRa = ReportActivity::whereIn("activity_id", $activityIds)->get(); $dataRa = ReportActivity::whereIn("activity_id", $activityIds)->get();
foreach ($dataRa as $ra) { foreach ($dataRa as $ra) {
$images = Image::where("ref_id", $ra->id)->where("category", "report_activity")->get(); $images = Image::where("ref_id", $ra->id)->where("category", "report_activity")->get();
foreach ($images as $image) { foreach ($images as $image) {
if(file_exists($this->pathImage.$image->image)){ if(file_exists($this->pathImage.$image->image)){
unlink($this->pathImage.$image->image); unlink($this->pathImage.$image->image);
} }
} }
Image::where("ref_id", $ra->id)->where("category", "report_activity")->delete(); Image::where("ref_id", $ra->id)->where("category", "report_activity")->delete();
} }
$dataAd = ActivityDokumen::whereIn("activity_id", $activityIds)->get(); $dataAd = ActivityDokumen::whereIn("activity_id", $activityIds)->get();
foreach ($dataAd as $ad) { foreach ($dataAd as $ad) {
if(file_exists($this->pathActivityDocument.$ad->file)){ if(file_exists($this->pathActivityDocument.$ad->file)){
unlink($this->pathActivityDocument.$ad->file); unlink($this->pathActivityDocument.$ad->file);
} }
} }
ActivityDokumen::whereIn("activity_id", $activityIds)->delete(); ActivityDokumen::whereIn("activity_id", $activityIds)->delete();
CommentActivity::whereIn("activity_id", $activityIds)->delete(); CommentActivity::whereIn("activity_id", $activityIds)->delete();
Holiday::where("proyek_id", $project_id)->delete(); Holiday::where("proyek_id", $project_id)->delete();
VersionGantt::where("proyek_id", $project_id)->delete(); VersionGantt::where("proyek_id", $project_id)->delete();
Link::whereIn("version_gantt_id", $vhIds)->delete(); Link::whereIn("version_gantt_id", $vhIds)->delete();
ShowHideColumn::whereIn("version_gantt_id", $vhIds)->delete(); ShowHideColumn::whereIn("version_gantt_id", $vhIds)->delete();
Activity::whereIn("version_gantt_id", $vhIds)->delete(); Activity::whereIn("version_gantt_id", $vhIds)->delete();
ReportActivity::whereIn("activity_id", $activityIds)->delete(); ReportActivity::whereIn("activity_id", $activityIds)->delete();
} }
private function deleteDokumenProject($project_id) private function deleteDokumenProject($project_id)
{ {
$dataDokumen = DokumenProject::where("type_dokumen", "project-document-out-folder")->where('ref_id', $project_id)->get(); $dataDokumen = DokumenProject::where("type_dokumen", "project-document-out-folder")->where('ref_id', $project_id)->get();
foreach ($dataDokumen as $dokumen) { foreach ($dataDokumen as $dokumen) {
if(file_exists($this->pathDocument.$dokumen->file)){ if(file_exists($this->pathDocument.$dokumen->file)){
unlink($this->pathDocument.$dokumen->file); unlink($this->pathDocument.$dokumen->file);
} }
} }
DokumenProject::where("type_dokumen", "project-document-out-folder")->where('ref_id', $project_id)->delete(); DokumenProject::where("type_dokumen", "project-document-out-folder")->where('ref_id', $project_id)->delete();
$dataFolder = FolderDocumentProyek::where('proyek_id', $project_id)->pluck("id"); $dataFolder = FolderDocumentProyek::where('proyek_id', $project_id)->pluck("id");
$ref_ids = $dataFolder->all(); $ref_ids = $dataFolder->all();
$dataDokumen = DokumenProject::where("type_dokumen", "project-document-in-folder")->whereIn('ref_id', $ref_ids)->get(); $dataDokumen = DokumenProject::where("type_dokumen", "project-document-in-folder")->whereIn('ref_id', $ref_ids)->get();
foreach ($dataDokumen as $dokumen) { foreach ($dataDokumen as $dokumen) {
if(file_exists($this->pathDocument.$dokumen->file)){ if(file_exists($this->pathDocument.$dokumen->file)){
unlink($this->pathDocument.$dokumen->file); unlink($this->pathDocument.$dokumen->file);
} }
} }
DokumenProject::where("type_dokumen", "project-document-in-folder")->whereIn('ref_id', $ref_ids)->delete(); DokumenProject::where("type_dokumen", "project-document-in-folder")->whereIn('ref_id', $ref_ids)->delete();
} }
public function search(Request $request) public function search(Request $request)
{ {
$payload = $request->all(); $payload = $request->all();
$dataBuilder = $this->setUpPayload($payload, 'm_proyek'); $dataBuilder = $this->setUpPayload($payload, 'm_proyek');
$builder = $dataBuilder['builder']; $builder = $dataBuilder['builder'];
$countBuilder = $dataBuilder['count']; $countBuilder = $dataBuilder['count'];
$dataGet = $builder->get(); $dataGet = $builder->get();
$totalRecord = $countBuilder->count(); $totalRecord = $countBuilder->count();
return response()->json(['status'=>'success','code'=>200,'data'=>$dataGet, 'totalRecord'=>$totalRecord], 200); return response()->json(['status'=>'success','code'=>200,'data'=>$dataGet, 'totalRecord'=>$totalRecord], 200);
} }
public function list() public function list()
{ {
$data = Project::orderBy('id', 'desc')->get(); $data = Project::orderBy('id', 'desc')->get();
$countData = $data->count(); $countData = $data->count();
if(!$data) if(!$data)
return response()->json(['status'=>'failed','message'=>'Data not found!','code'=> 404], 404); return response()->json(['status'=>'failed','message'=>'Data not found!','code'=> 404], 404);
$scheduleWarningThreshold = 10; $scheduleWarningThreshold = 10;
$scheduleDangerThreshold = 5; $scheduleDangerThreshold = 5;
foreach($data as $d){ foreach($data as $d){
$progress = $costVariance = $actualCost = 0; $progress = $costVariance = $actualCost = 0;
$lastActivity = null; $lastActivity = null;
$scheduleHealth = "on-track"; $scheduleHealth = "on-track";
$rootActivity = Activity::whereNull('parent_id')->where('proyek_id', $d->id)->orderBy('version_gantt_id', 'desc')->first(); $rootActivity = Activity::whereNull('parent_id')->where('proyek_id', $d->id)->orderBy('version_gantt_id', 'desc')->first();
if($rootActivity){ if($rootActivity){
$costVariance = $d->rencana_biaya - $rootActivity->biaya_actual; $costVariance = $d->rencana_biaya - $rootActivity->biaya_actual;
$actualCost = $rootActivity->biaya_actual ?? 0; $actualCost = $rootActivity->biaya_actual ?? 0;
$progress = $rootActivity->persentase_progress ?? 0; $progress = $rootActivity->persentase_progress ?? 0;
$timeleft = strtotime($d->mulai_proyek) - strtotime($rootActivity->end_date); $timeleft = strtotime($d->mulai_proyek) - strtotime($rootActivity->end_date);
$date1 = new \DateTime(date("Y-m-d", strtotime($d->mulai_proyek))); $date1 = new \DateTime(date("Y-m-d", strtotime($d->mulai_proyek)));
$date2 = new \DateTime(date("Y-m-d", strtotime($rootActivity->end_date))); $date2 = new \DateTime(date("Y-m-d", strtotime($rootActivity->end_date)));
$daysRemaining = $date2->diff($date1); $daysRemaining = $date2->diff($date1);
$daysRemaining = $daysRemaining->d; $daysRemaining = $daysRemaining->d;
if($daysRemaining <= $scheduleDangerThreshold) { if($daysRemaining <= $scheduleDangerThreshold) {
$scheduleHealth = "danger"; $scheduleHealth = "danger";
} elseif ($daysRemaining <= $scheduleWarningThreshold) { } elseif ($daysRemaining <= $scheduleWarningThreshold) {
$scheduleHealth = "warning"; $scheduleHealth = "warning";
} }
$lastActivity = date("d/m/Y", strtotime($rootActivity->end_date));
} $lastActivity = date("d/m/Y", strtotime($rootActivity->end_date));
$d->plannedInterval = date("d/m/Y", strtotime($d->mulai_proyek)) . " - " . date("d/m/Y", strtotime($d->akhir_proyek)); $d->lastActivity = $lastActivity ?? "-";
$d->plannedCost = $d->rencana_biaya; $d->plannedInterval = date("d/m/Y", strtotime($d->mulai_proyek)) . " - " . date("d/m/Y", strtotime($d->akhir_proyek));
$d->actualCost = $actualCost; $d->scheduleHealth = $scheduleHealth;
$d->lastActivity = $lastActivity ?? "-";
//$d->lastActivity = $daysRemaining . " -- " . $lastActivity . "\n" . $date1 . "\n" . $date2; $d->plannedCost = $d->rencana_biaya;
$d->costVariance = $costVariance; $d->actualCost = $actualCost;
$d->costHealth = $d->budget_health; $d->costVariance = $costVariance;
$d->scheduleHealth = $scheduleHealth; $d->costHealth = $d->budget_health;
$d->progress = $progress;
$d->lastGanttId = VersionGantt::where("proyek_id", $d->id)->orderBy('id', 'desc')->first()->id ?? null; $d->progress = $progress;
} $d->lastGanttId = VersionGantt::where("proyek_id", $d->id)->orderBy('id', 'desc')->first()->id ?? null;
}
$totalPlannedCost = $data->sum('plannedCost'); }
$totalActualCost = $data->sum('actualCost');
// $manpowers = User::where('employee_type', 'employee')->count(); $totalPlannedCost = $data->sum('plannedCost');
$manpowers = User::count(); $totalActualCost = $data->sum('actualCost');
$projectPhases = ProjectPhase::orderBy('order', 'asc')->pluck('name'); $manpowers = User::count();
$projectTypes = ProjectType::orderBy('id', 'asc')->pluck('name'); $projectPhases = ProjectPhase::orderBy('order', 'asc')->pluck('name');
try { $projectTypes = ProjectType::orderBy('id', 'asc')->pluck('name');
$projectsByPhase = DB::table('m_proyek') try {
->select('m_proyek_phase.name', 'm_proyek_phase.color', DB::raw('count(*) as total')) $projectsByPhase = DB::table('m_proyek')
->join('m_proyek_phase', 'm_proyek_phase.id', '=', 'm_proyek.phase_id') ->select('m_proyek_phase.name', 'm_proyek_phase.color', DB::raw('count(*) as total'))
->groupBy('m_proyek_phase.name', 'm_proyek_phase.color') ->join('m_proyek_phase', 'm_proyek_phase.id', '=', 'm_proyek.phase_id')
->get(); ->groupBy('m_proyek_phase.name', 'm_proyek_phase.color')
} catch (\Exception $e) { ->get();
return response()->json(['message' => $e->getMessage()]); } catch (\Exception $e) {
} return response()->json(['message' => $e->getMessage()]);
try { }
$projectsByType = DB::table('m_proyek') try {
->select('m_type_proyek.name', DB::raw('count(*) as total')) $projectsByType = DB::table('m_proyek')
->join('m_type_proyek', 'm_type_proyek.id', '=', 'm_proyek.type_proyek_id') ->select('m_type_proyek.name', DB::raw('count(*) as total'))
->groupBy('m_type_proyek.name') ->join('m_type_proyek', 'm_type_proyek.id', '=', 'm_proyek.type_proyek_id')
->get(); ->groupBy('m_type_proyek.name')
} catch (\Exception $e) { ->get();
return response()->json(['message' => $e->getMessage()]); } catch (\Exception $e) {
} return response()->json(['message' => $e->getMessage()]);
}
return response()->json(
[ return response()->json(
'status'=>'success', [
'code'=>200, 'status'=>'success',
'data'=>$data, 'code'=>200,
'totalRecord'=>$countData, 'data'=>$data,
'totalPlannedCost' => $totalPlannedCost, 'totalRecord'=>$countData,
'totalActualCost' => $totalActualCost, 'totalPlannedCost' => $totalPlannedCost,
'totalRevenue' => $totalPlannedCost - $totalActualCost, 'totalActualCost' => $totalActualCost,
'manpowers' => $manpowers, 'totalRevenue' => $totalPlannedCost - $totalActualCost,
'projectPhases' => $projectPhases, 'manpowers' => $manpowers,
'projectsByPhase' => $projectsByPhase, 'projectPhases' => $projectPhases,
'projectTypes' => $projectTypes, 'projectsByPhase' => $projectsByPhase,
'projectsByType' => $projectsByType, 'projectTypes' => $projectTypes,
], 200); 'projectsByType' => $projectsByType,
} ], 200);
}
public function getListProjectTask($id){
$data = UserToActivity::select("assign_hr_to_activity.user_id as user_id","m_proyek.*") public function getListProjectTask($id){
->where("assign_hr_to_activity.user_id", $id) $data = UserToActivity::select("assign_hr_to_activity.user_id as user_id","m_proyek.*")
->join('m_proyek', 'assign_hr_to_activity.proyek_id', '=', 'm_proyek.id') ->where("assign_hr_to_activity.user_id", $id)
->groupBy("m_proyek.proyek_id") ->join('m_proyek', 'assign_hr_to_activity.proyek_id', '=', 'm_proyek.id')
->get(); ->groupBy("m_proyek.proyek_id")
->get();
if(!$data)
return response()->json(['status'=>'failed','message'=>'Data not found!','code'=> 404], 404); if(!$data)
return response()->json(['status'=>'failed','message'=>'Data not found!','code'=> 404], 404);
return response()->json(['status'=>'success','code'=>200,'data'=>$data], 200);
} return response()->json(['status'=>'success','code'=>200,'data'=>$data], 200);
}
public function dashboard($id)
{ public function dashboard($id)
$data = DB::table('m_proyek as mp') {
->select('mp.kode_sortname', 'mp.nama as name_project', 'mp.mulai_proyek as start', 'mp.akhir_proyek as finish', $data = DB::table('m_proyek as mp')
'mp.rencana_biaya', 'mp.company', 'mp.currency_symbol', 'mu.name as pm', 'mp.budget_health') ->select('mp.kode_sortname', 'mp.nama as name_project', 'mp.mulai_proyek as start', 'mp.akhir_proyek as finish',
->join('m_users as mu', 'mu.id', '=', 'mp.pm_id') 'mp.rencana_biaya', 'mp.company', 'mp.currency_symbol', 'mu.name as pm', 'mp.budget_health')
->where('mp.id', $id) ->join('m_users as mu', 'mu.id', '=', 'mp.pm_id')
->get(); ->where('mp.id', $id)
$countData = $data->count(); ->get();
$countData = $data->count();
$manpowers = UserToProyek::where('proyek_id', $id)->count();
$rootActivity = Activity::whereNull('parent_id')->where('proyek_id', $id)->orderBy('version_gantt_id', 'desc')->first(); $manpowers = UserToProyek::where('proyek_id', $id)->count();
$rootActivity = Activity::whereNull('parent_id')->where('proyek_id', $id)->orderBy('version_gantt_id', 'desc')->first();
if($rootActivity){
$actualCost = $rootActivity->biaya_actual ?? 0; if($rootActivity){
$progress = $rootActivity->persentase_progress ?? 0; $actualCost = $rootActivity->biaya_actual ?? 0;
} $progress = $rootActivity->persentase_progress ?? 0;
}
$commentActivity = DB::table('m_comment_activity as mca')
->select('mca.activity_id', 'mca.comment as comment', 'mca.created_by as comment_by', 'mca.created_at as comment_created', $commentActivity = DB::table('m_comment_activity as mca')
'ma.name as activity') ->select('mca.activity_id', 'mca.comment as comment', 'mca.created_by as comment_by', 'mca.created_at as comment_created',
->join('m_activity as ma', 'ma.id', '=', 'mca.activity_id') 'ma.name as activity')
->where('ma.proyek_id', $id) ->join('m_activity as ma', 'ma.id', '=', 'mca.activity_id')
->orderBy('comment_by') ->where('ma.proyek_id', $id)
->take(2) ->orderBy('comment_by')
->get(); ->take(2)
->get();
foreach ($data as $val) {
$dataRes['kode_sortname'] = $val->kode_sortname; foreach ($data as $val) {
$dataRes['name_project'] = $val->name_project; $dataRes['kode_sortname'] = $val->kode_sortname;
$dataRes['start'] = $val->start; $dataRes['name_project'] = $val->name_project;
$dataRes['finish'] = $val->finish; $dataRes['start'] = $val->start;
$dataRes['rencana_biaya'] = $val->rencana_biaya; $dataRes['finish'] = $val->finish;
$dataRes['company'] = $val->company; $dataRes['rencana_biaya'] = $val->rencana_biaya;
$dataRes['currency_symbol'] = $val->currency_symbol; $dataRes['company'] = $val->company;
// get firstname $dataRes['currency_symbol'] = $val->currency_symbol;
$arr = explode(" ", $val->pm); // get firstname
$dataRes['pm'] = $arr[0]; $arr = explode(" ", $val->pm);
$dataRes['budget_health'] = $val->budget_health; $dataRes['pm'] = $arr[0];
$dataRes['actual_cost'] = $actualCost; $dataRes['budget_health'] = $val->budget_health;
$dataRes['progress'] = $progress; $dataRes['actual_cost'] = $actualCost;
$dataRes['comment'] = $commentActivity; $dataRes['progress'] = $progress;
$dataRes['man_power'] = $manpowers; $dataRes['comment'] = $commentActivity;
} $dataRes['man_power'] = $manpowers;
}
if(!$data)
return response()->json(['status'=>'failed','message'=>'Data not found!','code'=> 404], 404); if(!$data)
return response()->json(['status'=>'failed','message'=>'Data not found!','code'=> 404], 404);
return response()->json(['status'=>'success','code'=>200,'data'=>$dataRes, 'totalRecord'=>$countData], 200);
} return response()->json(['status'=>'success','code'=>200,'data'=>$dataRes, 'totalRecord'=>$countData], 200);
} }
}

78
app/Http/Middleware/CorsMiddleware.php

@ -1,39 +1,39 @@
<?php <?php
namespace App\Http\Middleware; namespace App\Http\Middleware;
use Closure; use Closure;
class CorsMiddleware class CorsMiddleware
{ {
/** /**
* Handle an incoming request. * Handle an incoming request.
* *
* @param \Illuminate\Http\Request $request * @param \Illuminate\Http\Request $request
* @param \Closure $next * @param \Closure $next
* @return mixed * @return mixed
*/ */
public function handle($request, Closure $next) public function handle($request, Closure $next)
{ {
$headers = [ $headers = [
'Access-Control-Allow-Origin' => '*', 'Access-Control-Allow-Origin' => '*',
'Access-Control-Allow-Methods' => 'POST, GET, OPTIONS, PUT, DELETE', 'Access-Control-Allow-Methods' => 'POST, GET, OPTIONS, PUT, DELETE',
'Access-Control-Allow-Credentials' => 'true', 'Access-Control-Allow-Credentials' => 'true',
'Access-Control-Max-Age' => '86400', 'Access-Control-Max-Age' => '86400',
'Access-Control-Allow-Headers' => 'Content-Type, Accept, Authorization, X-Requested-With, Application' 'Access-Control-Allow-Headers' => 'Content-Type, Accept, Authorization, X-Requested-With, Application'
]; ];
if ($request->isMethod('OPTIONS')) if ($request->isMethod('OPTIONS'))
{ {
return response()->json('{"method":"OPTIONS"}', 200, $headers); return response()->json('{"method":"OPTIONS"}', 200, $headers);
} }
$response = $next($request); $response = $next($request);
foreach($headers as $key => $value) foreach($headers as $key => $value)
{ {
$response->headers->set($key, $value); $response->headers->set($key, $value);
} }
return $response; return $response;
} }
} }

7
app/Models/Activity.php

@ -130,9 +130,10 @@ class Activity extends Model
public function getJobsDoneAttribute() public function getJobsDoneAttribute()
{ {
$tmpPercentage = []; $tmpPercentage = [];
$dataPlan = AssignMaterial::where('activity_id', $this->id)->get(); if(!ReportActivityMaterial::where('activity_id', $this->id)->first())
if($dataPlan->isEmpty()) return 0;
return 0; if(!$dataPlan = AssignMaterial::where('activity_id', $this->id)->get())
return 0;
foreach ($dataPlan as $value) { foreach ($dataPlan as $value) {
$tmpPercentage[] = 100; $tmpPercentage[] = 100;
$getDataVolActual = ReportActivityMaterial::where('assign_material_id', '=', $value->id)->sum("qty"); $getDataVolActual = ReportActivityMaterial::where('assign_material_id', '=', $value->id)->sum("qty");

421
routes/web.php

@ -1,415 +1,3 @@
<<<<<<< HEAD
<?php
$router->get('/', function () use ($router) {
return $router->app->version();
});
$router->group(['prefix'=>'api'], function () use ($router) {
$router->post('/login', 'AuthController@login');
$router->post('/menu/add', 'MenuController@add');
$router->get('/menu/edit/{id}', 'MenuController@edit');
$router->put('/menu/update/{id}', 'MenuController@update');
$router->delete('/menu/delete/{id}', 'MenuController@delete');
$router->post('/menu/search', 'MenuController@search');
$router->get('/menu/management/{id}', 'MenuController@listMenu');
$router->get('/menu/list', 'MenuController@list');
$router->post('/role-menu/add', 'RoleMenuController@add');
$router->put('/role-menu/update/{id}', 'RoleMenuController@update');
$router->delete('/role-menu/delete/{id}', 'RoleMenuController@delete');
$router->delete('/role-menu/delete-byrole/{id}', 'RoleMenuController@deleteByRole');
$router->post('/role-menu/search', 'RoleMenuController@search');
$router->get('/role-menu/get-role/{id}', 'RoleMenuController@listMenu');
$router->group(['middleware' => 'auth'], function () use ($router) {
$router->post('/role/search', 'RoleController@search');
$router->post('/role/add', 'RoleController@add');
$router->get('/role/edit/{id}', 'RoleController@edit');
$router->put('/role/update/{id}', 'RoleController@update');
$router->delete('/role/delete/{id}', 'RoleController@delete');
$router->get('/role/list', 'RoleController@list');
$router->post('/document-project/upload', 'ProjectDokumenController@uploadProjectDokumen');
$router->get('/document-project/get/{id}', 'ProjectDokumenController@dokumenByProyekId');
$router->delete('/document-project/delete/{id}', 'ProjectDokumenController@delete');
$router->post('/document-project/search', 'ProjectDokumenController@searchDocProject');
$router->get('/document-project/download/{id}', 'ProjectDokumenController@downloadDokumen');
$router->post('/document-activity/upload', 'ActivityDokumenController@uploadProjectDokumen');
$router->get('/document-activity/get/{id}', 'ActivityDokumenController@dokumenByActivityId');
$router->delete('/document-activity/delete/{id}', 'ActivityDokumenController@delete');
$router->post('/document-activity/search', 'ActivityDokumenController@searchDocProject');
$router->get('/document-activity/download/{id}', 'ActivityDokumenController@downloadDokumen');
$router->post('/project/search', 'ProjectController@search');
$router->post('/project/add', 'ProjectController@add');
$router->put('/project/update/{id}', 'ProjectController@update');
$router->get('/project/edit/{id}', 'ProjectController@edit');
$router->delete('/project/delete/{id}', 'ProjectController@delete');
$router->get('/project/list', 'ProjectController@list');
$router->get('/project/dashboard/{id}', 'ProjectController@dashboard');
$router->get('/project/list-user/{id}', 'ProjectController@getListProjectTask');
$router->post('/project-charter/search', 'ProjectCharterController@search');
$router->post('/project-charter/add', 'ProjectCharterController@add');
$router->put('/project-charter/update/{id}', 'ProjectCharterController@update');
$router->post('/divisi/add', 'DivisiController@add');
$router->get('/divisi/edit/{id}', 'DivisiController@edit');
$router->put('/divisi/update/{id}', 'DivisiController@update');
$router->post('/divisi/search', 'DivisiController@search');
$router->delete('/divisi/delete/{id}', 'DivisiController@delete');
$router->get('/divisi/list', 'DivisiController@list');
$router->post('/config-alert/search', 'ConfigAlertController@search');
$router->post('/config-alert/add', 'ConfigAlertController@add');
$router->get('/config-alert/edit/{id}', 'ConfigAlertController@edit');
$router->put('/config-alert/update/{id}', 'ConfigAlertController@update');
$router->delete('/config-alert/delete/{id}', 'ConfigAlertController@delete');
$router->get('/config-alert/list', 'ConfigAlertController@list');
$router->post('/config-alert-to-user/search', 'ConfigAlertUserController@search');
$router->post('/config-alert-to-user/add', 'ConfigAlertUserController@add');
$router->put('/config-alert-to-user/update/{id}', 'ConfigAlertUserController@update');
$router->delete('/config-alert-to-user/delete/{id}', 'ConfigAlertUserController@delete');
$router->get('/config-alert/get-user/{id}', 'ConfigAlertUserController@getConfigUser');
$router->post('/human-resource/search', 'HumanResourceController@search');
$router->post('/human-resource/add', 'HumanResourceController@add');
$router->get('/human-resource/edit/{id}', 'HumanResourceController@edit');
$router->put('/human-resource/update/{id}', 'HumanResourceController@update');
$router->delete('/human-resource/delete/{id}', 'HumanResourceController@delete');
$router->get('/human-resource/list', 'HumanResourceController@list');
$router->get('/human-resource/select', 'HumanResourceController@select');
$router->post('/human-resource/check-old-password/{id}', 'HumanResourceController@checkOldPassword');
$router->post('/project-role/search', 'ProjectRoleController@search');
$router->post('/project-role/add', 'ProjectRoleController@add');
$router->get('/project-role/edit/{id}', 'ProjectRoleController@edit');
$router->put('/project-role/update/{id}', 'ProjectRoleController@update');
$router->delete('/project-role/delete/{id}', 'ProjectRoleController@delete');
$router->get('/project-role/list', 'ProjectRoleController@list');
$router->get('/project-role/select', 'ProjectRoleController@select');
$router->post('/project-type/search', 'ProjectTypeController@search');
$router->post('/project-type/add', 'ProjectTypeController@add');
$router->get('/project-type/edit/{id}', 'ProjectTypeController@edit');
$router->put('/project-type/update/{id}', 'ProjectTypeController@update');
$router->delete('/project-type/delete/{id}', 'ProjectTypeController@delete');
$router->get('/project-type/list', 'ProjectTypeController@list');
$router->post('/user-to-project/assign', 'UserProyekController@assignUserProyek');
$router->post('/request-material/add', 'RequestMaterialController@add');
$router->post('/request-material/search', 'RequestMaterialController@search');
$router->get('/request-material/edit/{id}', 'RequestMaterialController@edit');
$router->put('/request-material/update/{id}', 'RequestMaterialController@update');
$router->delete('/request-material/delete/{id}', 'RequestMaterialController@delete');
$router->get('/request-material/list', 'RequestMaterialController@list');
$router->put('/request-material/update-warehouse-site/{id}', 'RequestMaterialController@updateWarehouseSite');
$router->post('/material-to-project/assign', 'MaterialProjectController@assignMaterial');
$router->post('/material-resource/add', 'MaterialResourceController@add');
$router->post('/material-resource/search', 'MaterialResourceController@search');
$router->get('/material-resource/update/{id}', 'MaterialResourceController@edit');
$router->put('/material-resource/update/{id}', 'MaterialResourceController@update');
$router->delete('/material-resource/delete/{id}', 'MaterialResourceController@delete');
$router->get('/material-resource/list', 'MaterialResourceController@list');
$router->get('/material-resource/select', 'MaterialResourceController@select');
$router->post('/tools-to-project/assign', 'ToolsProjectController@assignTools');
$router->get('/tools-to-project/search', 'ToolsProjectController@searchTools');
$router->post('/tools-resource/add', 'ToolsResourceController@add');
$router->post('/tools-resource/search', 'ToolsResourceController@search');
$router->get('/tools-resource/edit/{id}', 'ToolsResourceController@edit');
$router->put('/tools-resource/update/{id}', 'ToolsResourceController@update');
$router->delete('/tools-resource/delete/{id}', 'ToolsResourceController@delete');
$router->get('/tools-resource/list', 'ToolsResourceController@list');
$router->get('/tools-resource/select', 'ToolsResourceController@select');
$router->post('/req-tools/add', 'ToolsRequestController@add');
$router->get('/req-tools/edit/{id}', 'ToolsRequestController@edit');
$router->put('/req-tools/update/{id}', 'ToolsRequestController@update');
$router->post('/req-tools/search', 'ToolsRequestController@search');
$router->delete('/req-tools/delete/{id}', 'ToolsRequestController@delete');
$router->get('/req-tools/list', 'ToolsRequestController@list');
$router->post('/version-gantt/add', 'VersionGanttController@add');
$router->get('/version-gantt/edit/{id}', 'VersionGanttController@edit');
$router->put('/version-gantt/update/{id}', 'VersionGanttController@update');
$router->post('/version-gantt/search', 'VersionGanttController@search');
$router->delete('/version-gantt/delete/{id}', 'VersionGanttController@delete');
$router->get('/version-gantt/list', 'VersionGanttController@list');
$router->post('/user-to-version-gantt/add', 'UserToVersionGanttController@add');
$router->post('/user-to-version-gantt/add-multiple', 'UserToVersionGanttController@addMultiple');
$router->get('/user-to-version-gantt/edit/{id}', 'UserToVersionGanttController@edit');
$router->put('/user-to-version-gantt/update/{id}', 'UserToVersionGanttController@update');
$router->post('/user-to-version-gantt/search', 'UserToVersionGanttController@search');
$router->delete('/user-to-version-gantt/delete/{id}', 'UserToVersionGanttController@delete');
$router->get('/user-to-version-gantt/list', 'UserToVersionGanttController@list');
$router->get('/user-to-version-gantt/get-by-gantt/{gantt_id}', 'UserToVersionGanttController@getByUserGantt');
$router->post('/user-to-activity/add', 'UserToActivityController@add');
$router->post('/user-to-activity/add-multiple', 'UserToActivityController@addMultiple');
$router->get('/user-to-activity/edit/{id}', 'UserToActivityController@edit');
$router->put('/user-to-activity/update/{id}', 'UserToActivityController@update');
$router->post('/user-to-activity/search', 'UserToActivityController@search');
$router->delete('/user-to-activity/delete/{id}', 'UserToActivityController@delete');
$router->get('/user-to-activity/list', 'UserToActivityController@list');
$router->get('/user-to-activity/datatables', 'UserToActivityController@datatables');
$router->get('/sumVolActualM/{id}', 'ActivityController@sumVolumeActualMaterial');
$router->get('/activity/{id}/{proyek_id}/get', 'ActivityController@getByGanttId');
$router->get('/activity/search', 'ActivityController@search');
$router->post('/task', 'ActivityController@add');
$router->get('/task/edit/{id}', 'ActivityController@edit');
$router->put('/task/{id}', 'ActivityController@update');
$router->put('/task/update-regular/{id}', 'ActivityController@updateRegular');
$router->delete('/task/{id}', 'ActivityController@delete');
$router->get('/task/get-update/{id}', 'ActivityController@getUpdate');
$router->post('/activity/get-percentage', 'ActivityController@getPercentagePerDay');
$router->get('/activity/set-baseline/{gantt_id}', 'ActivityController@setBaseline');
$router->post('/activity/get-curva-s', 'ActivityController@getCalculateCurvaS');
$router->get('/activity/synchronize-report/{gantt_id}', 'ActivityController@synchronizeReport');
$router->post('/link', 'LinkController@add');
$router->put('/link/{id}', 'LinkController@update');
$router->delete('/link/{id}', 'LinkController@delete');
$router->post('/template-gantt/add', 'TemplateGanttController@add');
$router->get('/template-gantt/edit/{id}', 'TemplateGanttController@edit');
$router->put('/template-gantt/update/{id}', 'TemplateGanttController@update');
$router->post('/template-gantt/search', 'TemplateGanttController@search');
$router->delete('/template-gantt/delete/{id}', 'TemplateGanttController@delete');
$router->get('/template-gantt/list', 'TemplateGanttController@list');
$router->get('/template-gantt/get-tree/{id}', 'TemplateGanttController@getTreeByTypeProject');
$router->post('/comment-activity/add', 'CommentActivityController@add');
$router->get('/comment-activity/edit/{id}', 'CommentActivityController@edit');
$router->put('/comment-activity/update/{id}', 'CommentActivityController@update');
$router->post('/comment-activity/search', 'CommentActivityController@search');
$router->delete('/comment-activity/delete/{id}', 'CommentActivityController@delete');
$router->get('/comment-activity/list', 'CommentActivityController@list');
$router->post('/presence/add', 'PresenceController@add');
$router->get('/presence/edit/{id}', 'PresenceController@edit');
$router->put('/presence/update/{id}', 'PresenceController@update');
$router->post('/presence/search', 'PresenceController@search');
$router->delete('/presence/delete/{id}', 'PresenceController@delete');
$router->get('/presence/list', 'PresenceController@list');
$router->get('/presence/clockinout/{id}', 'PresenceController@clockinout');
$router->get('/presence/bulk-update-location', 'PresenceController@bulkUpdateLocation');
$router->post('/permit/add', 'AbsentController@add');
$router->get('/permit/edit/{id}', 'AbsentController@edit');
$router->put('/permit/update/{id}', 'AbsentController@update');
$router->post('/permit/search', 'AbsentController@search');
$router->delete('/permit/delete/{id}', 'AbsentController@delete');
$router->get('/permit/list', 'AbsentController@list');
$router->post('/assign-tools/add', 'AssignToolsController@add');
$router->get('/assign-tools/edit/{id}', 'AssignToolsController@edit');
$router->put('/assign-tools/update/{id}', 'AssignToolsController@update');
$router->post('/assign-tools/search', 'AssignToolsController@search');
$router->delete('/assign-tools/delete/{id}', 'AssignToolsController@delete');
$router->get('/assign-tools/list', 'AssignToolsController@list');
$router->get('/assign-tools/datatables', 'AssignToolsController@datatables');
$router->post('/assign-material/add', 'AssignMaterialController@add');
$router->get('/assign-material/edit/{id}', 'AssignMaterialController@edit');
$router->put('/assign-material/update/{id}', 'AssignMaterialController@update');
$router->post('/assign-material/search', 'AssignMaterialController@search');
$router->delete('/assign-material/delete/{id}', 'AssignMaterialController@delete');
$router->get('/assign-material/list', 'AssignMaterialController@list');
$router->get('/assign-material/datatables', 'AssignMaterialController@datatables');
$router->get('/assign-material/datatablesForReportActivity', 'AssignMaterialController@datatablesForReportActivity');
$router->post('/assign-material/ForReportActivityByMaterial', 'AssignMaterialController@ForReportActivityByMaterial');
$router->post('/image/search', 'ImageController@search');
$router->delete('/image/delete/{id}', 'ImageController@delete');
$router->delete('/image/delete/{id}/{category}', 'ImageController@deleteByRef');
$router->post('/image/upload', 'ImageController@uploadImage');
$router->get('/image/{id}/{category}', 'ImageController@getByRefId');
$router->post('/panic-button/add', 'PanicButtonController@add');
$router->get('/panic-button/edit/{id}', 'PanicButtonController@edit');
$router->put('/panic-button/update/{id}', 'PanicButtonController@update');
$router->post('/panic-button/search', 'PanicButtonController@search');
$router->delete('/panic-button/delete/{id}', 'PanicButtonController@delete');
$router->get('/panic-button/list', 'PanicButtonController@list');
$router->post('/rate-sallary/add', 'RateSallaryController@add');
$router->get('/rate-sallary/edit/{id}', 'RateSallaryController@edit');
$router->put('/rate-sallary/update/{id}', 'RateSallaryController@update');
$router->post('/rate-sallary/search', 'RateSallaryController@search');
$router->delete('/rate-sallary/delete/{id}', 'RateSallaryController@delete');
$router->get('/rate-sallary/list', 'RateSallaryController@list');
$router->post('/project-participants/add', 'ProjectParticipantsController@add');
$router->get('/project-participants/edit/{id}', 'ProjectParticipantsController@edit');
$router->put('/project-participants/update/{id}', 'ProjectParticipantsController@update');
$router->post('/project-participants/search', 'ProjectParticipantsController@search');
$router->delete('/project-participants/delete/{id}', 'ProjectParticipantsController@delete');
$router->delete('/project-participants/delete-by-proyek/{id}', 'ProjectParticipantsController@deleteByProyek');
$router->get('/project-participants/list', 'ProjectParticipantsController@list');
$router->get('/project-participants/{where}/{val}', 'ProjectParticipantsController@customWhere');
$router->post('/project-approval/add', 'ProjectApprovalController@add');
$router->get('/project-approval/edit/{id}', 'ProjectApprovalController@edit');
$router->put('/project-approval/update/{id}', 'ProjectApprovalController@update');
$router->post('/project-approval/search', 'ProjectApprovalController@search');
$router->delete('/project-approval/delete/{id}', 'ProjectApprovalController@delete');
$router->delete('/project-approval/delete-by-proyek/{id}', 'ProjectApprovalController@deleteByProyek');
$router->get('/project-approval/list', 'ProjectApprovalController@list');
$router->get('/project-approval/{where}/{val}', 'ProjectApprovalController@customWhere');
$router->post('/project-milestone/add', 'ProjectMileStoneController@add');
$router->get('/project-milestone/edit/{id}', 'ProjectMileStoneController@edit');
$router->put('/project-milestone/update/{id}', 'ProjectMileStoneController@update');
$router->post('/project-milestone/search', 'ProjectMileStoneController@search');
$router->delete('/project-milestone/delete/{id}', 'ProjectMileStoneController@delete');
$router->delete('/project-milestone/delete-by-proyek/{id}', 'ProjectMileStoneController@deleteByProyek');
$router->get('/project-milestone/list', 'ProjectMileStoneController@list');
$router->get('/project-milestone/select', 'ProjectMileStoneController@select');
$router->get('/project-milestone/{where}/{val}', 'ProjectMileStoneController@customWhere');
$router->post('/dashboard/cost-planning-actual', 'DashboardController@costPlanningActual');
$router->post('/dashboard/percentage-planning-actual', 'DashboardController@percentagePlanningActual');
$router->post('/dashboard/search-user-presence', 'DashboardController@searchUserPresencePoints');
$router->post('/dashboard/status-proyek', 'DashboardController@statusProyek');
$router->post('/dashboard/curva-s', 'DashboardController@curvaS');
$router->post('/report-activity/add', 'ReportActivityController@add');
$router->get('/report-activity/edit/{id}', 'ReportActivityController@edit');
$router->put('/report-activity/update/{id}', 'ReportActivityController@update');
$router->post('/report-activity/search', 'ReportActivityController@search');
$router->delete('/report-activity/delete/{id}', 'ReportActivityController@delete');
$router->get('/report-activity/list', 'ReportActivityController@list');
$router->post('/report-activity/search-point', 'ReportActivityController@searchPoint');
$router->get('/report-activity/datatables', 'ReportActivityController@datatables');
$router->post('/report-activity-material/add', 'ReportActivityMaterialController@add');
$router->post('/report-activity-material/search', 'ReportActivityMaterialController@search');
$router->delete('/report-activity-material/delete/{id}', 'ReportActivityMaterialController@delete');
$router->get('/report-activity-material/list', 'ReportActivityMaterialController@list');
$router->get('/report-activity-material/datatables', 'ReportActivityMaterialController@datatables');
$router->post('/report-activity-material/update-status', 'ReportActivityMaterialController@updateStatusStartFinish');
$router->get('/report-activity-material/test', 'ReportActivityMaterialController@countForProgressTest');
$router->post('/waypoint/add', 'WaypointController@add');
$router->get('/waypoint/edit/{id}', 'WaypointController@edit');
$router->put('/waypoint/update/{id}', 'WaypointController@update');
$router->post('/waypoint/search', 'WaypointController@search');
$router->delete('/waypoint/delete/{id}', 'WaypointController@delete');
$router->get('/waypoint/list', 'WaypointController@list');
$router->post('/holiday/add', 'HolidayController@add');
$router->get('/holiday/edit/{id}', 'HolidayController@edit');
$router->put('/holiday/update/{id}', 'HolidayController@update');
$router->post('/holiday/search', 'HolidayController@search');
$router->delete('/holiday/delete/{id}', 'HolidayController@delete');
$router->get('/holiday/list', 'HolidayController@list');
$router->get('/holiday/datatables', 'HolidayController@datatables');
$router->post('/satuan/add', 'SatuanController@add');
$router->get('/satuan/edit/{id}', 'SatuanController@edit');
$router->put('/satuan/update/{id}', 'SatuanController@update');
$router->post('/satuan/search', 'SatuanController@search');
$router->delete('/satuan/delete/{id}', 'SatuanController@delete');
$router->get('/satuan/list', 'SatuanController@list');
$router->post('/checklist-k3/add', 'ChecklistK3Controller@add');
$router->get('/checklist-k3/edit/{id}', 'ChecklistK3Controller@edit');
$router->put('/checklist-k3/update/{id}', 'ChecklistK3Controller@update');
$router->post('/checklist-k3/search', 'ChecklistK3Controller@search');
$router->delete('/checklist-k3/delete/{id}', 'ChecklistK3Controller@delete');
$router->get('/checklist-k3/list', 'ChecklistK3Controller@list');
$router->post('/report-k3/add', 'ReportK3Controller@add');
$router->get('/report-k3/edit/{id}', 'ReportK3Controller@edit');
$router->put('/report-k3/update/{id}', 'ReportK3Controller@update');
$router->post('/report-k3/search', 'ReportK3Controller@search');
$router->delete('/report-k3/delete/{id}', 'ReportK3Controller@delete');
$router->get('/report-k3/list', 'ReportK3Controller@list');
$router->post('/report-k3-detail/add', 'ReportK3DetailController@add');
$router->get('/report-k3-detail/edit/{id}', 'ReportK3DetailController@edit');
$router->put('/report-k3-detail/update/{id}', 'ReportK3DetailController@update');
$router->post('/report-k3-detail/search', 'ReportK3DetailController@search');
$router->delete('/report-k3-detail/delete/{id}', 'ReportK3DetailController@delete');
$router->get('/report-k3-detail/list', 'ReportK3DetailController@list');
$router->post('/user-to-proyek/add', 'UserToProyekController@add');
$router->get('/user-to-proyek/edit/{id}', 'UserToProyekController@edit');
$router->put('/user-to-proyek/update/{id}', 'UserToProyekController@update');
$router->post('/user-to-proyek/search', 'UserToProyekController@search');
$router->delete('/user-to-proyek/delete/{id}', 'UserToProyekController@delete');
$router->get('/user-to-proyek/list', 'UserToProyekController@list');
$router->get('/user-to-proyek/select', 'UserToProyekController@select');
$router->post('/folder-document-proyek/add', 'FolderDocumentProyekController@add');
$router->get('/folder-document-proyek/edit/{id}', 'FolderDocumentProyekController@edit');
$router->put('/folder-document-proyek/update/{id}', 'FolderDocumentProyekController@update');
$router->post('/folder-document-proyek/search', 'FolderDocumentProyekController@search');
$router->delete('/folder-document-proyek/delete/{id}', 'FolderDocumentProyekController@delete');
$router->get('/folder-document-proyek/list', 'FolderDocumentProyekController@list');
$router->get('/folder-document-proyek/get-tree/{id}', 'FolderDocumentProyekController@getTree');
$router->post('/office-hours/add', 'OfficeHoursController@add');
$router->get('/office-hours/edit/{id}', 'OfficeHoursController@edit');
$router->put('/office-hours/update/{id}', 'OfficeHoursController@update');
$router->post('/office-hours/search', 'OfficeHoursController@search');
$router->delete('/office-hours/delete/{id}', 'OfficeHoursController@delete');
$router->get('/office-hours/list', 'OfficeHoursController@list');
$router->get('/gantt-show-hide/get-by-gantt/{gantt_id}', 'ShowHideColumnController@getByUserGantt');
$router->post('/gantt-show-hide/add', 'ShowHideColumnController@add');
$router->post('/gantt-show-hide/update/{gantt_id}', 'ShowHideColumnController@update');
$router->post('/shift/add', 'ShiftController@add');
$router->get('/shift/edit/{id}', 'ShiftController@edit');
$router->put('/shift/update/{id}', 'ShiftController@update');
$router->post('/shift/search', 'ShiftController@search');
$router->delete('/shift/delete/{id}', 'ShiftController@delete');
$router->get('/shift/list', 'ShiftController@list');
$router->post('/user-monthly-shift/add', 'UserMonthlyShiftController@add');
$router->put('/user-monthly-shift/update/{id}', 'UserMonthlyShiftController@update');
$router->post('/user-monthly-shift/search', 'UserMonthlyShiftController@search');
$router->delete('/user-monthly-shift/delete/{id}', 'UserMonthlyShiftController@delete');
$router->delete('/user-monthly-shift/delete-at/{yyyymm}', 'UserMonthlyShiftController@deleteYYYYMM');
$router->get('/user-monthly-shift/list', 'UserMonthlyShiftController@list');
$router->post('/user-monthly-shift/import', 'UserMonthlyShiftController@import');
$router->get('/user-monthly-shift/list/{yyyymm}', 'UserMonthlyShiftController@listYYYYMM');
$router->post('/user-to-shift/add', 'UserToShiftController@add');
$router->get('/user-to-shift/edit/{id}', 'UserToShiftController@edit');
$router->put('/user-to-shift/update/{id}', 'UserToShiftController@update');
$router->post('/user-to-shift/search', 'UserToShiftController@search');
$router->delete('/user-to-shift/delete/{id}', 'UserToShiftController@delete');
$router->get('/user-to-shift/list', 'UserToShiftController@list');
$router->post('/control-monitoring/search', 'ControlMonitoringController@search');
$router->get('/currency/list', 'CurrencyController@list');
$router->post('/project-to-checklist-k3/add', 'ProjectToChecklistK3Controller@add');
$router->post('/project-to-checklist-k3/add-multiple', 'ProjectToChecklistK3Controller@addMultiple');
$router->get('/project-to-checklist-k3/edit/{id}', 'ProjectToChecklistK3Controller@edit');
$router->put('/project-to-checklist-k3/update/{id}', 'ProjectToChecklistK3Controller@update');
$router->post('/project-to-checklist-k3/search', 'ProjectToChecklistK3Controller@search');
$router->delete('/project-to-checklist-k3/delete/{id}', 'ProjectToChecklistK3Controller@delete');
$router->get('/project-to-checklist-k3/list', 'ProjectToChecklistK3Controller@list');
});
});
=======
<?php <?php
$router->get('/', function () use ($router) { $router->get('/', function () use ($router) {
@ -460,6 +48,7 @@ $router->group(['prefix'=>'api', 'middleware' => 'cors'], function () use ($rout
$router->get('/project/edit/{id}', 'ProjectController@edit'); $router->get('/project/edit/{id}', 'ProjectController@edit');
$router->delete('/project/delete/{id}', 'ProjectController@delete'); $router->delete('/project/delete/{id}', 'ProjectController@delete');
$router->get('/project/list', 'ProjectController@list'); $router->get('/project/list', 'ProjectController@list');
$router->get('/project/dashboard/{id}', 'ProjectController@dashboard');
$router->get('/project/list-user/{id}', 'ProjectController@getListProjectTask'); $router->get('/project/list-user/{id}', 'ProjectController@getListProjectTask');
$router->post('/project-charter/search', 'ProjectCharterController@search'); $router->post('/project-charter/search', 'ProjectCharterController@search');
$router->post('/project-charter/add', 'ProjectCharterController@add'); $router->post('/project-charter/add', 'ProjectCharterController@add');
@ -508,6 +97,13 @@ $router->group(['prefix'=>'api', 'middleware' => 'cors'], function () use ($rout
$router->put('/project-type/update/{id}', 'ProjectTypeController@update'); $router->put('/project-type/update/{id}', 'ProjectTypeController@update');
$router->delete('/project-type/delete/{id}', 'ProjectTypeController@delete'); $router->delete('/project-type/delete/{id}', 'ProjectTypeController@delete');
$router->get('/project-type/list', 'ProjectTypeController@list'); $router->get('/project-type/list', 'ProjectTypeController@list');
$router->post('/project-phase/search', 'ProjectPhaseController@search');
$router->post('/project-phase/add', 'ProjectPhaseController@add');
$router->get('/project-phase/edit/{id}', 'ProjectPhaseController@edit');
$router->put('/project-phase/update/{id}', 'ProjectPhaseController@update');
$router->delete('/project-phase/delete/{id}', 'ProjectPhaseController@delete');
$router->get('/project-phase/list', 'ProjectPhaseController@list');
$router->post('/user-to-project/assign', 'UserProyekController@assignUserProyek'); $router->post('/user-to-project/assign', 'UserProyekController@assignUserProyek');
@ -819,4 +415,3 @@ $router->group(['prefix'=>'api', 'middleware' => 'cors'], function () use ($rout
}); });
}); });
>>>>>>> d6dcff417710f6f13b2c20098213dfbeac52ff2d

Loading…
Cancel
Save