Update View

This commit is contained in:
servdal
2025-09-05 08:07:58 +07:00
parent 7794fc6fdf
commit ab65bfb585
3 changed files with 13 additions and 43 deletions
+3 -5
View File
@@ -178,16 +178,14 @@ class Controller extends BaseController
protected function getDefaultData($jenis, $master, $mulai, $akhir, $valcari) {
$query = Periksa::whereNotNull('nofoto');
if ($jenis == 'ThisDay') {
if (Session('previlage') == 'admin'){
return $query->whereDate('daftar', Carbon::today());
} else {
return $query->where(function($q) {
return $query->where(function($q) {
$q->where(function($sub) {
$sub->where('status', '!=', 'Selesai')
->where('status', 'not like', 'Dibatalkan%');
})->orWhereNull('status');
});
}
} else if ($jenis == 'ThisDayPendaftaran') {
return $query->whereDate('daftar', Carbon::today());
} else if ($jenis == 'mundur2') {
return $query->whereDate('daftar', '>=', Carbon::today()->subDays(2));
} else if ($jenis == 'mundur3') {