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': case 'non-business':
$query->where(function ($q) { $query->where(function ($q) {
$q->where(function ($q2) { $q->where(function ($q2) {
$q2->whereRaw("LOWER(TRIM(function_type)) NOT LIKE ?", ['%fungsi usaha%']) $q2->where(function ($q3) {
->whereRaw("LOWER(TRIM(function_type)) NOT LIKE ?", ['%sebagai tempat usaha%']) $q3->whereRaw("LOWER(TRIM(function_type)) NOT LIKE ?", ['%fungsi usaha%'])
->whereIn("status", PbgTaskStatus::getNonVerified()); ->whereRaw("LOWER(TRIM(function_type)) NOT LIKE ?", ['%sebagai tempat usaha%']);
})
->orWhereNull('function_type');
}) })
->orWhere(function ($q3) {
$q3->whereNull('function_type')
->whereIn("status", PbgTaskStatus::getNonVerified()); ->whereIn("status", PbgTaskStatus::getNonVerified());
}); });
});
break; break;
case 'business': case 'business':
$query->where(function ($q) { $query->where(function ($q) {
$q->where(function ($q2) { $q->where(function ($q2) {
$q2->whereRaw("LOWER(TRIM(function_type)) LIKE ?", ['%fungsi usaha%']) $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()); ->whereIn("status", PbgTaskStatus::getNonVerified());
}); });
});
break; break;
case 'verified': case 'verified':