nisha-checking-wtd

This commit is contained in:
Nisha Muhd
2026-01-15 12:59:18 +08:00
parent 8992340788
commit 361eb481c1
5 changed files with 295 additions and 6 deletions
+33 -6
View File
@@ -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'));
}
}