feat: add show_in_gift toggle UI for tariffs in admin panel

Add pill toggle in tariff create/edit form and purple gift badge
in tariff list. Includes i18n for ru, en, zh, fa locales.
This commit is contained in:
Fringg
2026-03-12 04:16:04 +03:00
parent 01e811bdfc
commit 5a5a987893
7 changed files with 61 additions and 0 deletions

View File

@@ -173,6 +173,24 @@ function SortableTariffCard({
{t('admin.tariffs.trial')}
</span>
)}
{tariff.show_in_gift && (
<span className="inline-flex items-center gap-1 rounded bg-purple-500/20 px-2 py-0.5 text-xs text-purple-400">
<svg
className="h-3 w-3"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
strokeWidth={2}
>
<path
strokeLinecap="round"
strokeLinejoin="round"
d="M21 11.25v8.25a1.5 1.5 0 01-1.5 1.5H5.25a1.5 1.5 0 01-1.5-1.5v-8.25M12 4.875A2.625 2.625 0 109.375 7.5H12m0-2.625V7.5m0-2.625A2.625 2.625 0 1114.625 7.5H12m0 0V21m-8.625-9.75h18c.621 0 1.125-.504 1.125-1.125v-1.5c0-.621-.504-1.125-1.125-1.125h-18c-.621 0-1.125.504-1.125 1.125v1.5c0 .621.504 1.125 1.125 1.125z"
/>
</svg>
{t('admin.tariffs.giftBadge')}
</span>
)}
{!tariff.is_active && (
<span className="rounded bg-dark-600 px-2 py-0.5 text-xs text-dark-400">
{t('admin.tariffs.inactive')}