fix update dashboard external

This commit is contained in:
arifal
2025-08-20 00:23:30 +07:00
parent 4b28bebcc2
commit 0a9d9071e4
9 changed files with 383 additions and 180 deletions

View File

@@ -8,6 +8,7 @@ use App\Models\Customer;
use App\Models\SpatialPlanning;
use Illuminate\Http\Request;
use App\Models\TourismBasedKBLI;
use App\Models\Tax;
class LackOfPotentialController extends Controller
{
@@ -20,6 +21,11 @@ class LackOfPotentialController extends Controller
$total_tata_ruang_usaha = SpatialPlanning::where('building_function','like', '%usaha%')->count();
$total_tata_ruang_non_usaha = SpatialPlanning::where('building_function','not like', '%usaha%')->count();
$data_report_tourism = TourismBasedKBLI::all();
$data_pajak_reklame = Tax::where('tax_code','Reklame')->count();
$data_pajak_restoran = Tax::where('tax_code','Restoran')->count();
$data_pajak_hiburan = Tax::where('tax_code','Hiburan')->count();
$data_pajak_hotel = Tax::where('tax_code','Hotel')->count();
$data_pajak_parkir = Tax::where('tax_code','Parkir')->count();
return response()->json([
'total_reklame' => $total_reklame,
@@ -28,6 +34,11 @@ class LackOfPotentialController extends Controller
'total_tata_ruang_usaha' => $total_tata_ruang_usaha,
'total_tata_ruang_non_usaha' => $total_tata_ruang_non_usaha,
'data_report' => $data_report_tourism,
'data_pajak_reklame' => $data_pajak_reklame,
'data_pajak_restoran' => $data_pajak_restoran,
'data_pajak_hiburan' => $data_pajak_hiburan,
'data_pajak_hotel' => $data_pajak_hotel,
'data_pajak_parkir' => $data_pajak_parkir,
], 200);
}catch(\Exception $e){
return response()->json([