public ?Model $record = null;
protected static ?string $pollingInterval = '30s';
public function mount($record)
{
$this->record = $record;
}
protected function getCards(): array
{
dd($this->record);
$total = max(Konfirmasi::where('campaigns_id', $this->record)->count(), 1);
$pending = Campaign::find($this->record)
->konfirmasi()->pending()->count();
return [
Stat::make('Completed', $sukses)
->color('success')
->description('Rp ' . number_format(Campaign::find($this->record)
->konfirmasi()->sukses()->sum('dana'))
. ' (' . number_format($sukses / $total * 100, 1) . '%)')
->descriptionIcon('heroicon-m-check-badge'),
public ?Model $record = null;
protected static ?string $pollingInterval = '30s';
public function mount($record)
{
$this->record = $record;
}
protected function getCards(): array
{
dd($this->record);
$total = max(Konfirmasi::where('campaigns_id', $this->record)->count(), 1);
$pending = Campaign::find($this->record)
->konfirmasi()->pending()->count();
return [
Stat::make('Completed', $sukses)
->color('success')
->description('Rp ' . number_format(Campaign::find($this->record)
->konfirmasi()->sukses()->sum('dana'))
. ' (' . number_format($sukses / $total * 100, 1) . '%)')
->descriptionIcon('heroicon-m-check-badge'),