mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-28 09:33:46 +00:00
fix: bulk actions — add tariff info to user list, fix tariff column display
- Update UserListItem type to include tariff_id, tariff_name, traffic_used_gb, traffic_limit_gb, device_limit, days_remaining from the backend (now returned in user list API) - Fix tariff column: was showing subscription_status, now shows actual tariff_name from the API response
This commit is contained in:
@@ -1245,22 +1245,15 @@ export default function AdminBulkActions() {
|
||||
},
|
||||
{
|
||||
id: 'tariff',
|
||||
accessorFn: (row) => row.promo_group_name,
|
||||
accessorFn: (row) => row.tariff_name,
|
||||
header: t('admin.bulkActions.columns.tariff'),
|
||||
size: 120,
|
||||
cell: ({ row }) => {
|
||||
// UserListItem doesn't have tariff_name directly; we'll show subscription info
|
||||
const user = row.original;
|
||||
if (!user.has_subscription) {
|
||||
return <span className="text-xs text-dark-500">-</span>;
|
||||
if (!user.tariff_name) {
|
||||
return <span className="text-xs text-dark-500">—</span>;
|
||||
}
|
||||
return (
|
||||
<span className="text-xs text-dark-300">
|
||||
{user.subscription_status === 'trial'
|
||||
? t('admin.bulkActions.statuses.trial')
|
||||
: user.subscription_status || '-'}
|
||||
</span>
|
||||
);
|
||||
return <span className="text-xs text-dark-200">{user.tariff_name}</span>;
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user