增加客户端标识 & 套餐管理重置今日限额字段 &提取IP/IP管理模块新增字段
This commit is contained in:
@@ -265,20 +265,19 @@ export default function LongResource(props: LongResourceProps) {
|
||||
<div className="flex gap-1">
|
||||
{row.original.long.type === 1 ? (
|
||||
<div className="flex gap-1">
|
||||
{isAfter(row.original.long.expire, new Date())
|
||||
{isAfter(row.original.long.expire_at, new Date())
|
||||
? <span className="text-green-500">正常</span>
|
||||
: <span className="text-red-500">过期</span>}
|
||||
<span>|</span>
|
||||
<span>
|
||||
今日限额:
|
||||
{row.original.long.daily_used}
|
||||
{' '}
|
||||
/
|
||||
{row.original.long.daily_limit}
|
||||
今日限额: {row.original.long.last_at
|
||||
&& new Date(row.original.long.last_at).toDateString() === new Date().toDateString()
|
||||
? row.original.long.daily
|
||||
: 0}/{row.original.long.quota}
|
||||
</span>
|
||||
<span>|</span>
|
||||
<span>
|
||||
{intlFormatDistance(row.original.long.expire, new Date())}
|
||||
{intlFormatDistance(row.original.long.expire_at, new Date())}
|
||||
{' '}
|
||||
到期
|
||||
</span>
|
||||
@@ -304,12 +303,14 @@ export default function LongResource(props: LongResourceProps) {
|
||||
),
|
||||
},
|
||||
{
|
||||
accessorKey: 'daily_last', header: '最近使用时间', cell: ({row}) => {
|
||||
return (
|
||||
format(row.original.long.daily_last, 'yyyy-MM-dd') === '0001-01-01'
|
||||
? '-'
|
||||
: format(row.original.long.daily_last, 'yyyy-MM-dd HH:mm')
|
||||
)
|
||||
accessorKey: 'last_at',
|
||||
header: '最近使用时间',
|
||||
cell: ({row}) => {
|
||||
const lastAt = row.original.long.last_at
|
||||
if (!lastAt) {
|
||||
return '暂未使用'
|
||||
}
|
||||
return format(lastAt, 'yyyy-MM-dd HH:mm')
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
@@ -265,22 +265,19 @@ export default function ShortResource(props: ShortResourceProps) {
|
||||
<div className="flex gap-1">
|
||||
{row.original.short.type === 1 ? (
|
||||
<div className="flex gap-1">
|
||||
{isAfter(row.original.short.expire, new Date())
|
||||
{isAfter(row.original.short.expire_at, new Date())
|
||||
? <span className="text-green-500">正常</span>
|
||||
: <span className="text-red-500">过期</span>}
|
||||
<span>|</span>
|
||||
<span>
|
||||
今日限额:
|
||||
{row.original.short.daily_used}
|
||||
{' '}
|
||||
/
|
||||
{row.original.short.daily_limit}
|
||||
今日限额: {row.original.short.last_at
|
||||
&& new Date(row.original.short.last_at).toDateString() === new Date().toDateString()
|
||||
? row.original.short.daily
|
||||
: 0}/{row.original.short.quota}
|
||||
</span>
|
||||
<span>|</span>
|
||||
<span>
|
||||
{intlFormatDistance(row.original.short.expire, new Date())}
|
||||
{' '}
|
||||
到期
|
||||
{intlFormatDistance(row.original.short.expire_at, new Date())}到期
|
||||
</span>
|
||||
</div>
|
||||
) : row.original.short.type === 2 ? (
|
||||
@@ -304,12 +301,14 @@ export default function ShortResource(props: ShortResourceProps) {
|
||||
),
|
||||
},
|
||||
{
|
||||
accessorKey: 'daily_last', header: '最近使用时间', cell: ({row}) => {
|
||||
return (
|
||||
format(row.original.short.daily_last, 'yyyy-MM-dd') === '0001-01-01'
|
||||
? '-'
|
||||
: format(row.original.short.daily_last, 'yyyy-MM-dd HH:mm')
|
||||
)
|
||||
accessorKey: 'last_at',
|
||||
header: '最近使用时间',
|
||||
cell: ({row}) => {
|
||||
const lastAt = row.original.short.last_at
|
||||
if (!lastAt) {
|
||||
return '暂未使用'
|
||||
}
|
||||
return format(lastAt, 'yyyy-MM-dd HH:mm')
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user