nisha-checking-wtd
This commit is contained in:
@@ -192,15 +192,10 @@ class WTDController extends Controller
|
||||
$startDate = $getReportDate($request->startDate);
|
||||
$endDate = $getReportDate($request->endDate);
|
||||
|
||||
|
||||
|
||||
// $summarywtd = Http::get($request->hostname . '/admin/wtd/summaryWtd', [
|
||||
// 'startDate' => $startDate,
|
||||
// 'endDate' => $endDate,
|
||||
// ])->effectiveUri()->__toString();
|
||||
|
||||
// dd($summarywtd);
|
||||
|
||||
// ])->effectiveUri()->__toString();
|
||||
|
||||
$summarywtd = Http::get($request->hostname . '/admin/wtd/summaryWtd', [
|
||||
'startDate' => $startDate,
|
||||
@@ -224,4 +219,36 @@ class WTDController extends Controller
|
||||
$request->endDate
|
||||
),"Detail_Laporan_WTD_{$kodcaw}.xlsx");
|
||||
}
|
||||
|
||||
public function home()
|
||||
{
|
||||
return view('wtd.debug.home');
|
||||
}
|
||||
|
||||
public function trail(Request $request)
|
||||
{
|
||||
$current = Carbon::now();
|
||||
|
||||
$getReportDate = function ($date_string) use ($current) {
|
||||
return $date_string ? $date_string : $current->toDateString();
|
||||
};
|
||||
|
||||
$request->hostname = config('api.url');
|
||||
|
||||
$startDate = $getReportDate($request->startDate);
|
||||
$endDate = $getReportDate($request->endDate);
|
||||
|
||||
$debugwtd = Http::get($request->hostname . '/admin/wtd/debugWtd', [
|
||||
'startDate' => $startDate,
|
||||
'endDate' => $endDate,
|
||||
])->json();
|
||||
|
||||
|
||||
if (!is_array($debugwtd)) {
|
||||
$debugwtd = [];
|
||||
}
|
||||
|
||||
return view('wtd.debug.index', compact('debugwtd', 'startDate', 'endDate'));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user