change display
This commit is contained in:
parent
22af275489
commit
9991d51541
@ -119,10 +119,12 @@ qh_page_start(
|
||||
<div class="card border-0 shadow-sm h-100">
|
||||
<div class="card-body p-2 d-flex flex-column justify-content-center">
|
||||
<h6 class="fw-bold text-primary text-center mb-2 text-truncate" title="<?= qh_h(qh_name($row)) ?>"><?= qh_h(qh_name($row)) ?></h6>
|
||||
<?php if ((int) ($row['requires_vitals'] ?? 0) === 1): ?>
|
||||
<div class="d-flex justify-content-between align-items-center mb-2">
|
||||
<span class="text-muted fw-semibold lh-sm" style="font-size: 0.7rem;"><?= qh_h(qh_t('Vitals Wait', 'غرفة المعاينة الأولية')) ?></span>
|
||||
<span class="badge bg-warning text-dark rounded-pill px-2"><?= qh_h((string) $row['vitals_waiting']) ?></span>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<span class="text-muted fw-semibold lh-sm" style="font-size: 0.7rem;"><?= qh_h(qh_t('Doctor Wait', 'انتظار الطبيب')) ?></span>
|
||||
<span class="badge bg-info text-dark rounded-pill px-2"><?= qh_h((string) $row['doctor_waiting']) ?></span>
|
||||
|
||||
@ -850,7 +850,7 @@ function qh_fetch_tickets(array $statuses = [], ?int $doctorId = null, ?int $lim
|
||||
|
||||
function qh_queue_overview(): array
|
||||
{
|
||||
$sql = "SELECT c.id, c.name_en, c.name_ar, c.code,
|
||||
$sql = "SELECT c.id, c.name_en, c.name_ar, c.code, c.requires_vitals,
|
||||
SUM(CASE WHEN t.status IN ('waiting_vitals', 'nursing_called') THEN 1 ELSE 0 END) AS vitals_waiting,
|
||||
SUM(CASE WHEN t.status = 'ready_for_doctor' THEN 1 ELSE 0 END) AS doctor_waiting,
|
||||
SUM(CASE WHEN t.status IN ('called', 'in_progress') THEN 1 ELSE 0 END) AS active_calls,
|
||||
@ -861,7 +861,7 @@ function qh_queue_overview(): array
|
||||
AND t.item_type = 'ticket'
|
||||
AND DATE(t.created_at) = CURDATE()
|
||||
WHERE c.item_type = 'clinic'
|
||||
GROUP BY c.id, c.name_en, c.name_ar, c.code
|
||||
GROUP BY c.id, c.name_en, c.name_ar, c.code, c.requires_vitals
|
||||
ORDER BY c.sort_order ASC, c.name_en ASC";
|
||||
|
||||
return db()->query($sql)->fetchAll();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user