36 lines
1.6 KiB
PHP
36 lines
1.6 KiB
PHP
<div class="flex flex-col gap-6">
|
|
<div class="grid grid-cols-1 md:grid-cols-3 gap-4">
|
|
<div>
|
|
<label class="block mb-1">Tanggal Mulai</label>
|
|
<input type="date" wire:model="startDate" class="w-full rounded-md border-gray-300">
|
|
</div>
|
|
<div>
|
|
<label class="block mb-1">Tanggal Akhir</label>
|
|
<input type="date" wire:model="endDate" class="w-full rounded-md border-gray-300">
|
|
</div>
|
|
<div class="flex items-end">
|
|
<button wire:click="generate" class="px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700">Generate Report</button>
|
|
</div>
|
|
</div>
|
|
|
|
@if ($reportData)
|
|
<div class="border p-4 rounded-lg shadow bg-white dark:bg-gray-800">
|
|
<h2 class="text-xl font-bold mb-4">Hasil Laporan</h2>
|
|
<ul class="mb-4">
|
|
<li>Total Pasien: <b>{{ $reportData['totalPatients'] }}</b></li>
|
|
<li>Total Pendaftaran: <b>{{ $reportData['totalRegistrations'] }}</b></li>
|
|
<li>Total Pendapatan: <b>Rp {{ number_format($reportData['totalIncome'], 0, ',', '.') }}</b></li>
|
|
</ul>
|
|
|
|
<div class="flex gap-4">
|
|
<button wire:click="exportPDF" class="px-4 py-2 bg-red-600 text-white rounded-md hover:bg-red-700">Export PDF</button>
|
|
<button wire:click="exportExcel" class="px-4 py-2 bg-green-600 text-white rounded-md hover:bg-green-700">Export Excel</button>
|
|
</div>
|
|
|
|
<div class="text-sm text-gray-500 mt-4">
|
|
Dibuat pada: {{ $generatedAt }}
|
|
</div>
|
|
</div>
|
|
@endif
|
|
</div>
|