mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-28 17:43:47 +00:00
fix: improve Toast visibility and allow tariff deletion with subscriptions
- Toast: use solid bg-dark-800 background instead of transparent gradient - Toast: increase border opacity for better visibility - Tariffs: allow deletion even with active subscriptions (shows warning) - Add confirmDeleteWithSubscriptions translation to all locales
This commit is contained in:
@@ -67,13 +67,16 @@ export default function AdminTariffs() {
|
||||
});
|
||||
|
||||
const handleDelete = async (tariff: TariffListItem) => {
|
||||
if (tariff.subscriptions_count > 0) {
|
||||
notify.warning(t('admin.tariffs.cannotDeleteHasSubscriptions'));
|
||||
return;
|
||||
}
|
||||
// If tariff has active subscriptions, show warning but still allow deletion
|
||||
const confirmText =
|
||||
tariff.subscriptions_count > 0
|
||||
? t('admin.tariffs.confirmDeleteWithSubscriptions', {
|
||||
count: tariff.subscriptions_count,
|
||||
})
|
||||
: t('admin.tariffs.confirmDeleteText');
|
||||
|
||||
const confirmed = await confirmDelete(
|
||||
t('admin.tariffs.confirmDeleteText'),
|
||||
confirmText,
|
||||
t('common.delete'),
|
||||
t('admin.tariffs.confirmDelete'),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user