partial update fix sync data pbg

This commit is contained in:
arifal
2025-08-07 22:04:40 +07:00
parent dd1cd72450
commit 3902a486f7
11 changed files with 114 additions and 9 deletions

View File

@@ -33,11 +33,24 @@ class RequestAssignmentController extends Controller
switch ($filter) {
case 'non-business':
$query->whereRaw("LOWER(function_type) != ?", ['sebagai tempat usaha'])->orWhereNull('function_type');
$query->where(function ($q) {
$q->where(function ($q2) {
$q2->whereRaw("LOWER(function_type) != ?", ['sebagai tempat usaha'])
->orWhereNull('function_type');
})
->whereDoesntHave('googleSheet', function ($sub) {
$sub->whereRaw("LOWER(status_verifikasi) = ?", ['selesai verifikasi']);
});
});
break;
case 'business':
$query->whereRaw("LOWER(function_type) = ?", ['sebagai tempat usaha']);
$query->where(function ($q) {
$q->whereRaw("LOWER(function_type) = ?", ['sebagai tempat usaha'])
->whereDoesntHave('googleSheet', function ($sub) {
$sub->whereRaw("LOWER(status_verifikasi) = ?", ['selesai verifikasi']);
});
});
break;
case 'verified':