fix data and dashboard count and sum

This commit is contained in:
arifal hidayat
2025-08-08 03:17:04 +07:00
parent 588e3ad5e2
commit 1288ab509d
19 changed files with 182 additions and 78 deletions

View File

@@ -23,14 +23,15 @@ class BigDataResumeController extends Controller
{
try{
$filterDate = $request->get("filterByDate");
$type = $request->get("type");
if (!$filterDate || $filterDate === "latest") {
$big_data_resume = BigdataResume::where('year', 'leader')->latest()->first();
$big_data_resume = BigdataResume::where('year', $type)->latest()->first();
if (!$big_data_resume) {
return $this->response_empty_resume();
}
} else {
$big_data_resume = BigdataResume::where('year', 'leader')
$big_data_resume = BigdataResume::where('year', $type)
->whereDate('created_at', $filterDate)
->orderBy('id', 'desc')
->first();