调整模型枚举字段值
This commit is contained in:
@@ -19,7 +19,7 @@ import Page from '@/components/page'
|
|||||||
import Link from 'next/link'
|
import Link from 'next/link'
|
||||||
|
|
||||||
const filterSchema = zod.object({
|
const filterSchema = zod.object({
|
||||||
type: zod.enum(['all', '0', '1', '2']).default('all'),
|
type: zod.enum(['all', '3', '1', '2']).default('all'),
|
||||||
create_after: zod.date().optional(),
|
create_after: zod.date().optional(),
|
||||||
create_before: zod.date().optional(),
|
create_before: zod.date().optional(),
|
||||||
})
|
})
|
||||||
@@ -111,7 +111,7 @@ export default function BillsPage(props: BillsPageProps) {
|
|||||||
</SelectTrigger>
|
</SelectTrigger>
|
||||||
<SelectContent>
|
<SelectContent>
|
||||||
<SelectItem value={`all`}>全部</SelectItem>
|
<SelectItem value={`all`}>全部</SelectItem>
|
||||||
<SelectItem value={`0`}>充值</SelectItem>
|
<SelectItem value={`3`}>充值</SelectItem>
|
||||||
<SelectItem value={`1`}>消费</SelectItem>
|
<SelectItem value={`1`}>消费</SelectItem>
|
||||||
<SelectItem value={`2`}>退款</SelectItem>
|
<SelectItem value={`2`}>退款</SelectItem>
|
||||||
</SelectContent>
|
</SelectContent>
|
||||||
@@ -176,7 +176,7 @@ export default function BillsPage(props: BillsPageProps) {
|
|||||||
}, {
|
}, {
|
||||||
accessorKey: 'type', header: `类型`, cell: ({row}) => (
|
accessorKey: 'type', header: `类型`, cell: ({row}) => (
|
||||||
<div className={`flex gap-2 items-center`}>
|
<div className={`flex gap-2 items-center`}>
|
||||||
{row.original.type === 0 && (
|
{row.original.type === 2 && (
|
||||||
<div className={`flex gap-2 items-center bg-blue-50 w-fit px-2 py-1 rounded-md`}>
|
<div className={`flex gap-2 items-center bg-blue-50 w-fit px-2 py-1 rounded-md`}>
|
||||||
<CreditCard size={16}/>
|
<CreditCard size={16}/>
|
||||||
<span>充值</span>
|
<span>充值</span>
|
||||||
|
|||||||
Reference in New Issue
Block a user