mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-28 17:43:47 +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:
@@ -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