use Filament\Widgets\TableWidget;
use Filament\Tables;
use App\Models\ApplicantApplication;

class PendingApplicants extends TableWidget
{
    protected function getTableQuery()
    {
        return ApplicantApplication::where('status', 'pending')
            ->latest();
    }

    protected function getTableColumns(): array
    {
        return [
            Tables\Columns\TextColumn::make('user.name')->label('Nama'),
            Tables\Columns\TextColumn::make('job.title')->label('Posisi'),
            Tables\Columns\TextColumn::make('created_at')->dateTime('d M Y'),
        ];
    }
}use Filament\Widgets\ChartWidget;
use App\Models\ApplicantApplication;

class RecruitmentChart extends ChartWidget
{
    protected static ?string $heading = 'Pelamar 7 Hari Terakhir';

    protected function getData(): array
    {
        $data = collect(range(0, 6))->map(function ($day) {
            return ApplicantApplication::whereDate(
                'created_at',
                now()->subDays($day)
            )->count();
        })->reverse()->values();

        return [
            'datasets' => [
                [
                    'label' => 'Pelamar',
                    'data' => $data,
                ],
            ],
            'labels' => collect(range(0, 6))
                ->map(fn ($day) => now()->subDays($day)->format('d M'))
                ->reverse()
                ->values()
                ->toArray(),
        ];
    }

    protected function getType(): string
    {
        return 'line';
    }
}<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
    <sitemap>
        <loc>https://tigadaunhijau.id/sitemap-pages.xml</loc>
    </sitemap>
    <sitemap>
        <loc>https://tigadaunhijau.id/sitemap-articles.xml</loc>
    </sitemap>
    <sitemap>
        <loc>https://tigadaunhijau.id/sitemap-categories.xml</loc>
    </sitemap>
    <sitemap>
        <loc>https://tigadaunhijau.id/sitemap-tags.xml</loc>
    </sitemap>
</sitemapindex>
