fix value dashboard verified component

This commit is contained in:
arifal hidayat
2025-06-14 04:20:26 +07:00
parent 799e409ce2
commit a0666e78d2
2 changed files with 33 additions and 4 deletions

View File

@@ -227,7 +227,10 @@ class ServiceGoogleSheet
'BELUM_TERVERIFIKASI' => "•BERKAS AKTUAL BELUM TERVERIFIKASI (POTENSI):", 'BELUM_TERVERIFIKASI' => "•BERKAS AKTUAL BELUM TERVERIFIKASI (POTENSI):",
'TERVERIFIKASI' => "•BERKAS AKTUAL TERVERIFIKASI DINAS TEKNIS 2025:", 'TERVERIFIKASI' => "•BERKAS AKTUAL TERVERIFIKASI DINAS TEKNIS 2025:",
'NON_USAHA' => "•NON USAHA: HUNIAN, SOSBUD, KEAGAMAAN", 'NON_USAHA' => "•NON USAHA: HUNIAN, SOSBUD, KEAGAMAAN",
'USAHA' => "•USAHA: USAHA, CAMPURAN, KOLEKTIF, PRASARANA" 'USAHA' => "•USAHA: USAHA, CAMPURAN, KOLEKTIF, PRASARANA",
'PROSES_DINAS_TEKNIS' => "•TERPROSES DI DPUTR: belum selesai rekomtek'",
'WAITING_KLIK_DPMPTSP' => "•TERPROSES DI PTSP: Pengiriman SKRD/ Validasi di PTSP",
'REALISASI_TERBIT_PBG' => "•BERKAS YANG TERBIT PBG 2025:"
]; ];
$result = []; $result = [];
@@ -244,8 +247,6 @@ class ServiceGoogleSheet
} }
} }
Log::info("Leader data synced", ['result' => $result]);
BigdataResume::create([ BigdataResume::create([
'import_datasource_id' => $import_datasource->id, 'import_datasource_id' => $import_datasource->id,
'year' => now()->year, 'year' => now()->year,
@@ -264,8 +265,36 @@ class ServiceGoogleSheet
// TOTAL POTENSI BERKAS // TOTAL POTENSI BERKAS
'potention_count' => $this->convertToInteger($result['TOTAL_POTENSI_BERKAS']['total'] ?? null) ?? 0, 'potention_count' => $this->convertToInteger($result['TOTAL_POTENSI_BERKAS']['total'] ?? null) ?? 0,
'potention_sum' => $this->convertToDecimal($result['TOTAL_POTENSI_BERKAS']['nominal'] ?? null) ?? 0, 'potention_sum' => $this->convertToDecimal($result['TOTAL_POTENSI_BERKAS']['nominal'] ?? null) ?? 0,
// REALISASI TERBIT PBG
'issuance_realization_pbg_count' => $this->convertToInteger($result['REALISASI_TERBIT_PBG']['total'] ?? null) ?? 0,
'issuance_realization_pbg_sum' => $this->convertToDecimal($result['REALISASI_TERBIT_PBG']['nominal'] ?? null) ?? 0,
// WAITING KLIK DPMPTSP
'waiting_click_dpmptsp_count' => $this->convertToInteger($result['WAITING_KLIK_DPMPTSP']['total'] ?? null) ?? 0,
'waiting_click_dpmptsp_sum' => $this->convertToDecimal($result['WAITING_KLIK_DPMPTSP']['nominal'] ?? null) ?? 0,
// PROSES DINAS TEKNIS
'process_in_technical_office_count' => $this->convertToInteger($result['PROSES_DINAS_TEKNIS']['total'] ?? null) ?? 0,
'process_in_technical_office_sum' => $this->convertToDecimal($result['PROSES_DINAS_TEKNIS']['nominal'] ?? null) ?? 0
]); ]);
// Save data settings
$dataSettings = [
'TARGET_PAD' => $result['TARGET_PAD']['nominal'] ?? null,
'KEKURANGAN_POTENSI' => $result['KEKURANGAN_POTENSI']['nominal'] ?? null,
'REALISASI_TERBIT_PBG_COUNT' => $result['REALISASI_TERBIT_PBG']['total'] ?? null,
'REALISASI_TERBIT_PBG_SUM' => $result['REALISASI_TERBIT_PBG']['nominal'] ?? null,
'MENUNGGU_KLIK_DPMPTSP_COUNT' => $result['WAITING_KLIK_DPMPTSP']['total'] ?? null,
'MENUNGGU_KLIK_DPMPTSP_SUM' => $result['WAITING_KLIK_DPMPTSP']['nominal'] ?? null,
'PROSES_DINAS_TEKNIS_COUNT' => $result['PROSES_DINAS_TEKNIS']['total'] ?? null,
'PROSES_DINAS_TEKNIS_SUM' => $result['PROSES_DINAS_TEKNIS']['nominal'] ?? null,
];
foreach ($dataSettings as $key => $value) {
DataSetting::updateOrInsert(
['key' => $key],
['value' => $this->convertToInteger($value) ?? 0]
);
}
$import_datasource->update([ $import_datasource->update([
'status' => 'success', 'status' => 'success',
'response_body' => json_encode($result), 'response_body' => json_encode($result),

View File

@@ -183,5 +183,5 @@
@endsection @endsection
@section('scripts') @section('scripts')
@vite(['resources/js/dashboards/bigdata.js']) @vite(['resources/js/dashboards/leader.js'])
@endsection @endsection