partial update fix redirect and add note in public, quick and pbg data

This commit is contained in:
arifal
2025-09-10 17:24:44 +07:00
parent 5c4cebd2b3
commit beb7d935c9
155 changed files with 161 additions and 91 deletions

View File

@@ -57,7 +57,8 @@ class RequestAssignmentController extends Controller
$q->whereIn('pbg_type', ['berita_acara', 'bukti_bayar']);
},
'pbg_task_retributions',
'pbg_task_detail'
'pbg_task_detail',
'pbg_status'
])->orderBy('id', 'desc');
// Log final query count for debugging
@@ -127,10 +128,10 @@ class RequestAssignmentController extends Controller
->whereIn("status", PbgTaskStatus::getNonVerified())
// Additional condition: unit IS NULL OR unit <= 1
->where(function ($q3) {
$q3->whereDoesntHave('pbg_task_details', function ($q4) {
$q3->whereDoesntHave('pbg_task_detail', function ($q4) {
$q4->where('unit', '>', 1);
})
->orWhereDoesntHave('pbg_task_details');
->orWhereDoesntHave('pbg_task_detail');
});
});
break;
@@ -153,7 +154,7 @@ class RequestAssignmentController extends Controller
})
->orWhereNull('function_type');
})
->whereHas('pbg_task_details', function ($q4) {
->whereHas('pbg_task_detail', function ($q4) {
$q4->where('unit', '>', 1);
});
});
@@ -205,10 +206,10 @@ class RequestAssignmentController extends Controller
->whereIn("status", PbgTaskStatus::getNonVerified())
// Additional condition: unit IS NULL OR unit <= 1
->where(function ($q3) {
$q3->whereDoesntHave('pbg_task_details', function ($q4) {
$q3->whereDoesntHave('pbg_task_detail', function ($q4) {
$q4->where('unit', '>', 1);
})
->orWhereDoesntHave('pbg_task_details');
->orWhereDoesntHave('pbg_task_detail');
});
})
->whereExists(function ($query) {
@@ -233,10 +234,10 @@ class RequestAssignmentController extends Controller
->whereIn("status", PbgTaskStatus::getNonVerified())
// Additional condition: unit IS NULL OR unit <= 1
->where(function ($q3) {
$q3->whereDoesntHave('pbg_task_details', function ($q4) {
$q3->whereDoesntHave('pbg_task_detail', function ($q4) {
$q4->where('unit', '>', 1);
})
->orWhereDoesntHave('pbg_task_details');
->orWhereDoesntHave('pbg_task_detail');
});
})
->whereExists(function ($query) {
@@ -266,7 +267,7 @@ class RequestAssignmentController extends Controller
})
->orWhereNull('function_type');
})
->whereHas('pbg_task_details', function ($q4) {
->whereHas('pbg_task_detail', function ($q4) {
$q4->where('unit', '>', 1);
});
});
@@ -300,7 +301,7 @@ class RequestAssignmentController extends Controller
})
->orWhereNull('function_type');
})
->whereHas('pbg_task_details', function ($q4) {
->whereHas('pbg_task_detail', function ($q4) {
$q4->where('unit', '>', 1);
});
});