refactor: update user table headers and data fields for clarity

This commit is contained in:
Ardeman 2025-03-15 22:30:09 +08:00
parent 680a0a88a2
commit c633397d7b

View File

@ -39,11 +39,11 @@ export const UsersPage = () => {
data: 'subscribe.start_date', data: 'subscribe.start_date',
}, },
{ {
title: 'Nama User', title: 'User',
}, },
{ {
title: 'Email', title: 'Phone',
data: 'email', data: 'phone',
}, },
{ {
title: 'Status', title: 'Status',
@ -54,10 +54,11 @@ export const UsersPage = () => {
1: (value: string) => formatDate(value), 1: (value: string) => formatDate(value),
2: (_value: unknown, _type: unknown, data: TUserResponse) => ( 2: (_value: unknown, _type: unknown, data: TUserResponse) => (
<div> <div>
<div>{data.phone}</div> <div>{data.email}</div>
<div className="text-sm text-[#7C7C7C]">ID: {data.id.slice(0, 8)}</div> <div className="text-sm text-[#7C7C7C]">ID: {data.id.slice(0, 8)}</div>
</div> </div>
), ),
3: (value: string) => <span>{value}</span>,
4: (value: TColorBadge, _type: unknown, data: TUserResponse) => ( 4: (value: TColorBadge, _type: unknown, data: TUserResponse) => (
<span <span
className={`rounded-lg px-2 text-sm ${getStatusBadge(data.subscribe.status as TColorBadge)}`} className={`rounded-lg px-2 text-sm ${getStatusBadge(data.subscribe.status as TColorBadge)}`}