fix handle redirect and add filter data pbg task same with dashboard
This commit is contained in:
@@ -13,6 +13,7 @@ use Exception;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Maatwebsite\Excel\Facades\Excel;
|
||||
use App\Enums\PbgTaskStatus;
|
||||
|
||||
class RequestAssignmentController extends Controller
|
||||
{
|
||||
@@ -37,8 +38,11 @@ class RequestAssignmentController extends Controller
|
||||
$q->where(function ($q2) {
|
||||
$q2->whereRaw("LOWER(function_type) NOT LIKE ?", ['%fungsi usaha%'])
|
||||
->whereRaw("LOWER(function_type) NOT LIKE ?", ['%sebagai tempat usaha%'])
|
||||
->whereRaw("status != ?", 20)
|
||||
->orWhereNull('function_type');
|
||||
->whereIn("status", PbgTaskStatus::getNonVerified());
|
||||
})
|
||||
->orWhere(function ($q3) {
|
||||
$q3->whereNull('function_type')
|
||||
->whereIn("status", PbgTaskStatus::getNonVerified());
|
||||
});
|
||||
});
|
||||
break;
|
||||
@@ -48,19 +52,30 @@ class RequestAssignmentController extends Controller
|
||||
$q->where(function ($q2) {
|
||||
$q2->whereRaw("LOWER(function_type) LIKE ?", ['%fungsi usaha%'])
|
||||
->orWhereRaw("LOWER(function_type) LIKE ?", ['%sebagai tempat usaha%'])
|
||||
->whereRaw("status != ?", 20);
|
||||
->whereIn("status", PbgTaskStatus::getNonVerified());
|
||||
});
|
||||
});
|
||||
break;
|
||||
|
||||
case 'verified':
|
||||
$query->whereRaw("status = ?", 20);
|
||||
$query->whereIn("status", PbgTaskStatus::getVerified());
|
||||
break;
|
||||
|
||||
case 'non-verified':
|
||||
$query->where(function ($q) {
|
||||
$q->whereRaw("status != ?", 20);
|
||||
});
|
||||
$query->whereIn("status", PbgTaskStatus::getNonVerified());
|
||||
break;
|
||||
|
||||
case 'potention':
|
||||
$query->whereIn("status", PbgTaskStatus::getPotention());
|
||||
break;
|
||||
case 'issuance-realization-pbg':
|
||||
$query->whereIn("status", PbgTaskStatus::getIssuanceRealizationPbg());
|
||||
break;
|
||||
case 'process-in-technical-office':
|
||||
$query->whereIn("status", PbgTaskStatus::getProcessInTechnicalOffice());
|
||||
break;
|
||||
case 'waiting-click-dpmptsp':
|
||||
$query->whereIn("status", PbgTaskStatus::getWaitingClickDpmptsp());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user