mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-28 09:33:46 +00:00
fix: improve tariff delete button visibility
- Added visual styling for disabled delete button (when tariff has active subscriptions) - Added tooltip explaining why delete is disabled - Added i18n translations for cannotDeleteHasSubscriptions
This commit is contained in:
@@ -1215,6 +1215,7 @@
|
||||
"deactivate": "Deactivate",
|
||||
"toggleTrial": "Toggle Trial",
|
||||
"delete": "Delete",
|
||||
"cannotDeleteHasSubscriptions": "Cannot delete: has active subscriptions",
|
||||
"confirmDelete": "Delete tariff?",
|
||||
"confirmDeleteText": "This action cannot be undone. The tariff will be permanently deleted.",
|
||||
"days": "days",
|
||||
|
||||
@@ -989,6 +989,7 @@
|
||||
"deactivate": "غیرفعالسازی",
|
||||
"toggleTrial": "تغییر آزمایشی",
|
||||
"delete": "حذف",
|
||||
"cannotDeleteHasSubscriptions": "حذف ممکن نیست: اشتراکهای فعال وجود دارد",
|
||||
"confirmDelete": "تعرفه حذف شود؟",
|
||||
"confirmDeleteText": "این عمل قابل بازگشت نیست. تعرفه برای همیشه حذف میشود.",
|
||||
"days": "روز",
|
||||
|
||||
@@ -1725,6 +1725,7 @@
|
||||
"deactivate": "Деактивировать",
|
||||
"toggleTrial": "Переключить триал",
|
||||
"delete": "Удалить",
|
||||
"cannotDeleteHasSubscriptions": "Нельзя удалить: есть активные подписки",
|
||||
"confirmDelete": "Удалить тариф?",
|
||||
"confirmDeleteText": "Это действие нельзя отменить. Тариф будет удален навсегда.",
|
||||
"days": "дней",
|
||||
|
||||
@@ -1027,6 +1027,7 @@
|
||||
"deactivate": "停用",
|
||||
"toggleTrial": "切换试用",
|
||||
"delete": "删除",
|
||||
"cannotDeleteHasSubscriptions": "无法删除:有活跃订阅",
|
||||
"confirmDelete": "删除套餐?",
|
||||
"confirmDeleteText": "此操作不可撤销。套餐将被永久删除。",
|
||||
"days": "天",
|
||||
|
||||
@@ -205,8 +205,16 @@ export default function AdminTariffs() {
|
||||
{/* Delete */}
|
||||
<button
|
||||
onClick={() => setDeleteConfirm(tariff.id)}
|
||||
className="rounded-lg bg-dark-700 p-2 text-dark-300 transition-colors hover:bg-error-500/20 hover:text-error-400"
|
||||
title={t('admin.tariffs.delete')}
|
||||
className={`rounded-lg p-2 transition-colors ${
|
||||
tariff.subscriptions_count > 0
|
||||
? 'cursor-not-allowed bg-dark-700/50 text-dark-500'
|
||||
: 'bg-dark-700 text-dark-300 hover:bg-error-500/20 hover:text-error-400'
|
||||
}`}
|
||||
title={
|
||||
tariff.subscriptions_count > 0
|
||||
? t('admin.tariffs.cannotDeleteHasSubscriptions')
|
||||
: t('admin.tariffs.delete')
|
||||
}
|
||||
disabled={tariff.subscriptions_count > 0}
|
||||
>
|
||||
<TrashIcon />
|
||||
|
||||
Reference in New Issue
Block a user