'bg-blue-lt',
'controle' => 'bg-green-lt',
'symptome' => 'bg-yellow-lt',
'diagnostic' => 'bg-purple-lt',
'acte' => 'bg-orange-lt',
'hosp' => 'bg-red-lt',
default => 'bg-secondary-lt',
};
}
function badgeStatus(string $status): array
{
// [class, label]
return match ($status) {
'refuge' => ['bg-blue-lt',t('status.refuge')],
'fa' => ['bg-cyan-lt',t('status.fa')],
'fa_permanente' => ['bg-indigo-lt',t('status.fa_permanente')],
'quarantaine' => ['bg-yellow-lt',t('status.quarantaine')],
'soin' => ['bg-red-lt',t('status.soin')],
'isolation' => ['bg-orange-lt',t('status.isolation')],
'hospitalise', 'hospitalisé' => ['bg-red-lt',t('status.hospitalise')],
'reserve', 'réservé' => ['bg-purple-lt',t('status.reserve')],
'adopte', 'adopté' => ['bg-green-lt',t('status.adopte')],
'decede', 'décédé' => ['bg-dark-lt',t('status.decede')],
'enfui' => ['bg-secondary-lt',t('status.enfui')],
default => ['bg-secondary-lt', $status],
};
}
?>
$q['days_left'] !== null && (int)$q['days_left'] <= 0);
$weightLosses = array_filter($weight_alerts ?? [], static fn (array $w): bool => (float)$w['pct'] < 0);
$urgentCount = count($vaccines_overdue) + count($treatments_overdue) + count($expiredQuarantines) + count($weightLosses) + count($careAlertsToday) + count($agendaDue);
$morning = $careToday['morning'] ?? ['expected' => 0,'checked' => 0,'alerts' => 0];
$evening = $careToday['evening'] ?? ['expected' => 0,'checked' => 0,'alerts' => 0];
?>
= h($urgentCount ? tn('dashboard.watch_point', 'dashboard.watch_points', $urgentCount) : t('dashboard.controlled')) ?>
= h(t('dashboard.open_round')) ?>
= h(t('dashboard.round_anomalies')) ?>
$alert): ?>= $i ? ', ' : '' ?>
= h($alert['name']) ?>
(= h(t($alert['period'] === 'morning' ? 'dashboard.morning' : 'dashboard.evening')) ?>)
= h(t('dashboard.overview')) ?>
= h(t('dashboard.overview_help')) ?>
= (int)($stats['total'] ?? 0) ?>
= h(tn('dashboard.adult', 'dashboard.adults', (int)($stats['adults'] ?? 0))) ?>
= h(tn('dashboard.kitten', 'dashboard.kittens', (int)($stats['kittens'] ?? 0))) ?>
0): ?>
= (int)$stats['age_unknown'] ?>
= h(t('dashboard.unknown_age')) ?>
= (int)($stats['refuge'] ?? 0) ?>
= (int)$room['count'] ?>
= h($room['name']) ?>
0): ?>
= (int)$stats['refuge_unassigned'] ?>
= h(t('dashboard.unassigned')) ?>
= $fosterTotal ?>
= (int)($stats['fa'] ?? 0) ?>
= h(t('dashboard.temporary')) ?>
= (int)($stats['fa_permanente'] ?? 0) ?>
= h(t('dashboard.permanent')) ?>
= $medicalPoleTotal ?>
= (int)($stats['quarantaine'] ?? 0) ?>
= h(t('dashboard.in_quarantine')) ?>
= (int)($stats['soin'] ?? 0) ?>
= h(t('dashboard.in_medical')) ?>
= h(t('dashboard.data_quality')) ?>
= h(t('dashboard.data_quality_help')) ?>
0): ?>= h(tn('dashboard.record_to_complete', 'dashboard.records_to_complete', (int)$quality['incomplete'])) ?>= h(t('dashboard.records_complete')) ?>
= h(t('dashboard.see_statistics')) ?>
= h(t('dashboard.quality_note')) ?>
0): ?>
📁
= h(t('dashboard.grants_check')) ?>
= h(t('dashboard.grants_summary', ['overdue' => (int)($grantAlerts['overdue'] ?? 0),'deadlines' => (int)($grantAlerts['deadlines'] ?? 0),'incomplete' => (int)($grantAlerts['incomplete'] ?? 0),'documents' => (int)($grantAlerts['documents'] ?? 0)])) ?>
= h(t('dashboard.open_grants')) ?>
= h(t('dashboard.medical')) ?>
= h(t('dashboard.medical_help')) ?>
| = h(t('dashboard.nothing')) ?> |
| = h($v['due_date']) ?> |
= h($v['name']) ?> = h($v['code'] ?? '') ?> |
= h($v['vaccine_name']) ?> |
| = h(t('dashboard.nothing')) ?> |
| = h($v['due_date']) ?> |
= h($v['name']) ?> |
= h($v['vaccine_name']) ?> |
| = h(t('dashboard.nothing')) ?> |
| = h($v['due_date']) ?> |
= h($v['name']) ?> = h($v['code'] ?? '') ?> |
= h($v['vaccine_name']) ?> |
| = h(t('common.animal')) ?> |
= h(t('dashboard.entry')) ?> |
= h(t('dashboard.expected_exit')) ?> |
= h(t('dashboard.exit_followup')) ?> |
| = h(t('dashboard.no_quarantine')) ?> |
abs($days)]);
} elseif ($days === 0) {
$timerClass = 'text-warning fw-bold';
$timerText = t('dashboard.exit_today');
} elseif ($days === 1) {
$timerClass = 'text-warning fw-bold';
$timerText = t('dashboard.exit_tomorrow');
} elseif ($days <= 5) {
$timerClass = 'text-warning fw-bold';
$timerText = t('dashboard.exit_days', ['days' => $days]);
} else {
$timerClass = 'text-success';
$timerText = t('dashboard.exit_days', ['days' => $days]);
}
}
?>
| = h($q['name']) ?> = h($q['code'] ?? '') ?> |
= h($q['intake_date'] ?? '—') ?> |
= h($q['quarantine_until'] ?? '—') ?> |
= h($timerText) ?> |
| = h(t('common.animal')) ?> |
J-30 |
= h(t('dashboard.current')) ?> |
= h(t('dashboard.variation')) ?> |
| = h(t('dashboard.no_alert')) ?> |
| = h($w['name']) ?> = h($w['code'] ?? '') ?> |
= h($w['w30_weight']) ?> kg (= h(substr((string)$w['w30_date'], 0, 10)) ?>)
|
= h($w['last_weight']) ?> kg |
= ($pct > 0 ? '+' : '') . h($w['pct']) ?>% |
| = h(t('dashboard.nothing')) ?> |
| = h($t['end_date']) ?> |
= h($t['name']) ?> |
= h($t['medication_name']) ?> |
| = h(t('common.animal')) ?> |
= h(t('dashboard.medication')) ?> |
= h(t('dashboard.start')) ?> |
= h(t('dashboard.end')) ?> |
| = h(t('dashboard.no_treatment')) ?> |
| = h($t['name']) ?> |
= h($t['medication_name']) ?>
= !empty($t['dose_text']) ? h($t['dose_text']) : '' ?>
= (!empty($t['dose_text']) && !empty($t['route'])) ? ' • ' : '' ?>
= !empty($t['route']) ? h($t['route']) : '' ?>
|
= h($t['start_date'] ?? '') ?> |
= h($t['end_date'] ?? '') ?> |
= h(t('dashboard.recent_activity')) ?>
= h(t('dashboard.recent_activity_help')) ?>
= (int)($activity['notes_7d'] ?? 0) ?>
= (int)($activity['vaccines_30d'] ?? 0) ?>
= (int)($activity['treatments_30d'] ?? 0) ?>
| = h(t('dashboard.date')) ?> |
= h(t('common.animal')) ?> |
= h(t('dashboard.type')) ?> |
= h(t('dashboard.reason')) ?> |
| = h(t('dashboard.no_note')) ?> |
| = h(substr((string)$n['noted_at'], 0, 16)) ?> |
= h($n['name']) ?> = h($n['code'] ?? '') ?> |
= h($kind) ?> |
= h($n['reason'] ?? '') ?> |