fix handle redirect and add filter data pbg task same with dashboard

This commit is contained in:
arifal hidayat
2025-08-14 23:11:36 +07:00
parent f7497cbec8
commit fa6a0079dc
4 changed files with 38 additions and 12 deletions

View File

@@ -5,6 +5,7 @@ namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\DB;
use App\Enums\PbgTaskStatus;
use App\Services\ServiceGoogleSheet;
class BigdataResume extends Model
{
@@ -73,10 +74,12 @@ class BigdataResume extends Model
")
->first();
$service_google_sheet = app(ServiceGoogleSheet::class);
return self::create([
'import_datasource_id' => $import_datasource_id,
'spatial_count' => $data_setting['SPATIAL_PLANNING_COUNT'] ?? 0,
'spatial_sum' => $data_setting['SPATIAL_PLANNING_SUM'] ?? 0.00,
'spatial_count' => $service_google_sheet->getSpatialPlanningWithCalculationCount() ?? 0,
'spatial_sum' => $service_google_sheet->getSpatialPlanningCalculationSum() ?? 0.00,
'potention_count' => ($stats->potention_count ?? 0),
'potention_sum' => ($stats->potention_total ?? 0),
'non_verified_count' => $stats->non_verified_count ?? 0,