Corriger les dossiers animaux et le suivi médical
This commit is contained in:
parent
a55d27935f
commit
7b89fd5dfa
34 changed files with 440 additions and 39 deletions
|
|
@ -118,6 +118,28 @@ $evening = $careToday['evening'] ?? ['expected' => 0,'checked' => 0,'alerts' =>
|
|||
</div><?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
document.querySelectorAll('.reminder-list').forEach(table => {
|
||||
const rows = [...table.tBodies[0].rows];
|
||||
const limit = Number(table.dataset.visibleRows || 6);
|
||||
if (rows.length <= limit) return;
|
||||
rows.slice(limit).forEach(row => row.classList.add('d-none'));
|
||||
const button = document.createElement('button');
|
||||
button.type = 'button'; button.className = 'btn btn-sm btn-link w-100';
|
||||
button.textContent = <?= json_encode(t('common.show_more'), JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES) ?>;
|
||||
button.addEventListener('click', () => {
|
||||
const expanded = button.dataset.expanded === '1';
|
||||
rows.slice(limit).forEach(row => row.classList.toggle('d-none', expanded));
|
||||
button.dataset.expanded = expanded ? '0' : '1';
|
||||
button.textContent = expanded
|
||||
? <?= json_encode(t('common.show_more'), JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES) ?>
|
||||
: <?= json_encode(t('common.show_less'), JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES) ?>;
|
||||
});
|
||||
table.closest('.table-responsive')?.after(button);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<div class="row g-2 mb-3">
|
||||
<div class="col">
|
||||
|
|
@ -264,7 +286,7 @@ if ($grantAlertTotal > 0): ?><div class="alert alert-warning d-flex flex-wrap al
|
|||
<h3 class="card-title">🚨 <?= h(t('dashboard.vaccines_overdue')) ?></h3>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-vcenter card-table">
|
||||
<table class="table table-vcenter card-table reminder-list" data-visible-rows="6">
|
||||
<tbody>
|
||||
<?php if (empty($vaccines_overdue)): ?>
|
||||
<tr>
|
||||
|
|
@ -290,7 +312,7 @@ if ($grantAlertTotal > 0): ?><div class="alert alert-warning d-flex flex-wrap al
|
|||
<h3 class="card-title">⏳ <?= h(t('dashboard.vaccines_soon')) ?></h3>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-vcenter card-table">
|
||||
<table class="table table-vcenter card-table reminder-list" data-visible-rows="6">
|
||||
<tbody>
|
||||
<?php if (empty($vaccines_7d)): ?>
|
||||
<tr>
|
||||
|
|
@ -315,7 +337,7 @@ if ($grantAlertTotal > 0): ?><div class="alert alert-warning d-flex flex-wrap al
|
|||
<h3 class="card-title">📅 <?= h(t('dashboard.vaccines_month')) ?></h3>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-vcenter card-table">
|
||||
<table class="table table-vcenter card-table reminder-list" data-visible-rows="6">
|
||||
<tbody>
|
||||
<?php if (empty($vaccines_30d)): ?>
|
||||
<tr>
|
||||
|
|
|
|||
Loading…
Reference in a new issue