fix relation, fix migration, fix all route use token, fix service sync simbg, fix detail pbg
This commit is contained in:
@@ -28,7 +28,7 @@ class DashboardController extends Controller
|
||||
->first();
|
||||
});
|
||||
|
||||
$taskCount = $query->total_data;
|
||||
$taskCount = $query->total_data ?? 0;
|
||||
$taskTotal = $query->total_retribution ?? 0;
|
||||
|
||||
return $this->resSuccess([
|
||||
@@ -54,7 +54,7 @@ class DashboardController extends Controller
|
||||
SUM(ptr.nilai_retribusi_bangunan) AS total_retribution') // Menambahkan SUM dari pbg_task_retributions
|
||||
->first();
|
||||
});
|
||||
$taskCount = $query->total_data;
|
||||
$taskCount = $query->total_data ?? 0;
|
||||
$taskTotal = $query->total_retribution ?? 0;
|
||||
return $this->resSuccess([
|
||||
"count" => $taskCount,
|
||||
@@ -71,8 +71,8 @@ class DashboardController extends Controller
|
||||
)
|
||||
->first();
|
||||
});
|
||||
$taskCount = $query->task_count;
|
||||
$taskTotal = $query->total_retribution;
|
||||
$taskCount = $query->task_count ?? 0;
|
||||
$taskTotal = $query->total_retribution ?? 0;
|
||||
return $this->resSuccess([
|
||||
"count" => $taskCount,
|
||||
"total" => $taskTotal
|
||||
@@ -90,8 +90,8 @@ class DashboardController extends Controller
|
||||
->first();
|
||||
});
|
||||
|
||||
$taskCount = $query->total_data;
|
||||
$taskTotal = $query->total_retribution;
|
||||
$taskCount = $query->total_data ?? 0;
|
||||
$taskTotal = $query->total_retribution ?? 0;
|
||||
|
||||
return $this->resSuccess([
|
||||
"count"=> $taskCount,
|
||||
@@ -113,7 +113,7 @@ class DashboardController extends Controller
|
||||
->first();
|
||||
});
|
||||
|
||||
$taskCount = $query->total_data;
|
||||
$taskCount = $query->total_data ?? 0;
|
||||
$taskTotal = $query->total_retribution ?? 0;
|
||||
|
||||
return $this->resSuccess([
|
||||
|
||||
@@ -70,7 +70,7 @@ class PbgTaskController extends Controller
|
||||
public function show(string $id)
|
||||
{
|
||||
try{
|
||||
$pbg_task = PbgTask::with(['pbg_task_retributions','pbg_task_index_integrations'])->findOrFail($id);
|
||||
$pbg_task = PbgTask::with(['pbg_task_retributions','pbg_task_index_integrations','pbg_task_retributions.pbg_task_prasarana'])->findOrFail($id);
|
||||
return response()->json([
|
||||
"success"=> true,
|
||||
"message"=> "Data ditemukan",
|
||||
|
||||
@@ -37,7 +37,7 @@ class PbgTaskController extends Controller
|
||||
*/
|
||||
public function show(string $id)
|
||||
{
|
||||
$data = PbgTask::with(['pbg_task_retributions','pbg_task_index_integrations'])->findOrFail($id);
|
||||
$data = PbgTask::with(['pbg_task_retributions','pbg_task_index_integrations', 'pbg_task_retributions.pbg_task_prasarana'])->findOrFail($id);
|
||||
return view("pbg_task.show", compact("data"));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user