fix business data count and show

This commit is contained in:
arifal hidayat
2025-08-15 02:57:19 +07:00
parent bb63ea8084
commit e0ed007a39

View File

@@ -36,25 +36,24 @@ class RequestAssignmentController extends Controller
case 'non-business':
$query->where(function ($q) {
$q->where(function ($q2) {
$q2->whereRaw("LOWER(TRIM(function_type)) NOT LIKE ?", ['%fungsi usaha%'])
->whereRaw("LOWER(TRIM(function_type)) NOT LIKE ?", ['%sebagai tempat usaha%'])
->whereIn("status", PbgTaskStatus::getNonVerified());
$q2->where(function ($q3) {
$q3->whereRaw("LOWER(TRIM(function_type)) NOT LIKE ?", ['%fungsi usaha%'])
->whereRaw("LOWER(TRIM(function_type)) NOT LIKE ?", ['%sebagai tempat usaha%']);
})
->orWhereNull('function_type');
})
->orWhere(function ($q3) {
$q3->whereNull('function_type')
->whereIn("status", PbgTaskStatus::getNonVerified());
});
});
break;
case 'business':
$query->where(function ($q) {
$q->where(function ($q2) {
$q2->whereRaw("LOWER(TRIM(function_type)) LIKE ?", ['%fungsi usaha%'])
->orWhereRaw("LOWER(TRIM(function_type)) LIKE ?", ['%sebagai tempat usaha%'])
->orWhereRaw("LOWER(TRIM(function_type)) LIKE ?", ['%sebagai tempat usaha%']);
})
->whereIn("status", PbgTaskStatus::getNonVerified());
});
});
break;
case 'verified':