|
|
@ -107,7 +107,7 @@ class ActivityController extends Controller |
|
|
|
foreach($data as $objRow){ |
|
|
|
foreach($data as $objRow){ |
|
|
|
$objRow->parent = $parent_id; |
|
|
|
$objRow->parent = $parent_id; |
|
|
|
$objRow->text = $objRow->name; |
|
|
|
$objRow->text = $objRow->name; |
|
|
|
$objRow->progress = (int)$objRow->persentase_progress/100; |
|
|
|
$objRow->progress = (float)$objRow->persentase_progress/100; |
|
|
|
$startDate = date_create($objRow->start_date); |
|
|
|
$startDate = date_create($objRow->start_date); |
|
|
|
$endDate = date_create($objRow->end_date); |
|
|
|
$endDate = date_create($objRow->end_date); |
|
|
|
$objRow->start_date = date_format($startDate,"Y-m-d H:i:s"); |
|
|
|
$objRow->start_date = date_format($startDate,"Y-m-d H:i:s"); |
|
|
@ -323,7 +323,7 @@ class ActivityController extends Controller |
|
|
|
if(!$data = Activity::find($id)) |
|
|
|
if(!$data = Activity::find($id)) |
|
|
|
return response()->json(['status'=>'failed', 'action'=>'error','message'=> 'Data not found!','code'=>400], 400); |
|
|
|
return response()->json(['status'=>'failed', 'action'=>'error','message'=> 'Data not found!','code'=>400], 400); |
|
|
|
|
|
|
|
|
|
|
|
$data->progress = (int) $data->persentase_progress / 100; |
|
|
|
$data->progress = (float) $data->persentase_progress / 100; |
|
|
|
$data->rencana_biaya = str_replace(".", ",", $data->rencana_biaya); |
|
|
|
$data->rencana_biaya = str_replace(".", ",", $data->rencana_biaya); |
|
|
|
return response()->json(['status'=>'success', "data"=> $data,'code'=>200], 200); |
|
|
|
return response()->json(['status'=>'success', "data"=> $data,'code'=>200], 200); |
|
|
|
} |
|
|
|
} |
|
|
|