Allège les actions du catalogue vétérinaire

This commit is contained in:
Alexandre NOEL 2026-09-08 01:01:10 +02:00
commit ccaeb2b535
5 changed files with 17 additions and 6 deletions

View file

@ -167,14 +167,15 @@
class="badge <?= $t['active'] ? 'bg-green-lt' : 'bg-secondary-lt' ?>"><?= $t['active'] ? t('pricing.active') : t('pricing.inactive') ?></span>
</td>
<td class="text-end"><div class="btn-list justify-content-end">
<button class="btn btn-sm btn-outline-primary tariff-edit" type="button"
<button class="btn btn-sm btn-icon btn-outline-primary tariff-edit" type="button"
title="<?= h(t('pricing.edit_tariff')) ?>" aria-label="<?= h(t('pricing.edit_tariff')) ?>"
data-id="<?= (int)$t['id'] ?>" data-clinic="<?= (int)$t['clinic_contact_id'] ?>"
data-label="<?= h($t['label']) ?>" data-amount="<?= h(number_format($t['amount_cents'] / 100, 2, '.', '')) ?>"
data-category="<?= h($t['category']) ?>" data-group="<?= h($t['discount_group']) ?>"
data-unit="<?= h($t['unit_label']) ?>" data-medication="<?= (int)($t['medication_id'] ?? 0) ?>"
data-active="<?= (int)$t['active'] ?>"><?= h(t('common.edit')) ?></button>
data-active="<?= (int)$t['active'] ?>"><span aria-hidden="true">✏️</span></button>
<form method="post" action="/settings/pricing/tariff/delete" onsubmit="return confirm(<?= h(json_encode(t('pricing.delete_confirm'), JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES)) ?>)">
<input type="hidden" name="id" value="<?= (int)$t['id'] ?>"><button class="btn btn-sm btn-outline-danger" type="submit"><?= h(t('common.delete')) ?></button>
<input type="hidden" name="id" value="<?= (int)$t['id'] ?>"><button class="btn btn-sm btn-icon btn-outline-danger" type="submit" title="<?= h(t('common.delete')) ?>" aria-label="<?= h(t('common.delete')) ?>"><span aria-hidden="true">🗑️</span></button>
</form>
</div></td>
</tr><?php endforeach; ?></tbody>