feat: port clinic dashboard components from clinic-pro-tauri

- Add NewAppointmentsTable for displaying today's appointments with status chips and formatted time.
- Implement TauriCharts for bar and line charts representing patient counts and revenue.
- Create TauriDashboardView to combine stat cards, charts, and new appointments list.
- Introduce TauriStatCards for displaying key statistics with icons.
- Add dashboardIcons for SVG icons used in stat cards.
- Implement tests for DashboardPage to ensure correct rendering and API calls.
- Create DashboardTodayAppointmentsTest to validate extended fields in today's appointments API response.
This commit is contained in:
hamed
2026-07-14 13:54:50 +03:30
parent 3b9c5056a3
commit d9f96b68cd
10 changed files with 883 additions and 127 deletions
@@ -96,11 +96,13 @@ class DashboardController extends BaseController
// ۵ نوبت امروز این کلینیک
$todayAppts = $this->em->createQuery('
SELECT a.uuid, u.realName AS patient_name, d.name AS doctor_name,
a.slotStart AS slot_start, a.status
SELECT a.uuid, u.realName AS patient_name, u.mobileNumber AS patient_mobile,
d.name AS doctor_name, si.name AS service_name,
a.slotStart AS slot_start, a.slotEnd AS slot_end, a.status
FROM App\Appointment\Entity\Appointment a
JOIN a.doctor d
JOIN a.user u
LEFT JOIN a.serviceItem si
JOIN App\Clinic\Entity\Clinic c WITH d MEMBER OF c.doctors
WHERE c.id = :clinicId
AND a.slotStart >= :todayStart AND a.slotStart <= :todayEnd
@@ -223,9 +225,12 @@ class DashboardController extends BaseController
// نوبت‌های امروز
$todayAppts = $this->em->createQuery('
SELECT a.uuid, u.realName AS patient_name, u.mobileNumber AS patient_mobile,
a.slotStart AS slot_start, a.status
d.name AS doctor_name, si.name AS service_name,
a.slotStart AS slot_start, a.slotEnd AS slot_end, a.status
FROM App\Appointment\Entity\Appointment a
JOIN a.user u
JOIN a.doctor d
LEFT JOIN a.serviceItem si
WHERE a.doctor = :doctor AND a.slotStart >= :s AND a.slotStart <= :e
ORDER BY a.slotStart ASC
')->setMaxResults(10)->setParameters([