diff --git a/src/app/(dashboard)/customers/birthday/birthday-list.tsx b/src/app/(dashboard)/customers/birthday/birthday-list.tsx index 8ca4ec8..1abf59f 100644 --- a/src/app/(dashboard)/customers/birthday/birthday-list.tsx +++ b/src/app/(dashboard)/customers/birthday/birthday-list.tsx @@ -2,7 +2,7 @@ import { useEffect, useRef, useState, type ReactNode } from "react"; import { Columns3, RotateCcw } from "lucide-react"; -import { fmtDate, maskPhone } from "@/lib/utils"; +import { fmtDate } from "@/lib/utils"; import { lunarBirthdaySolarThisYear } from "@/lib/lunar"; import { Card } from "@/components/ui/card"; import { Table, THead, TR, TH, TD } from "@/components/ui/table"; @@ -192,14 +192,7 @@ function ColumnPicker({ ); } -export function BirthdayList({ - rows, - isAdmin, -}: { - rows: BirthdayRow[]; - /** 与商户列表一致:仅管理员看明文手机号 */ - isAdmin: boolean; -}) { +export function BirthdayList({ rows }: { rows: BirthdayRow[] }) { const [visible, setVisible] = useState(defaultBirthdayColumns); const [ready, setReady] = useState(false); @@ -223,9 +216,7 @@ export function BirthdayList({ const colSpan = Math.max(1, ordered.length); function phoneFor(v?: string | null) { - const value = v?.trim() || ""; - if (!value) return ""; - return isAdmin ? value : maskPhone(value); + return v?.trim() || ""; } return ( @@ -265,13 +256,13 @@ export function BirthdayList({ ) : col.key === "balanceUser" ? ( ) : ( renderCell(col.key, row) @@ -316,13 +307,13 @@ export function BirthdayList({ ) : col.key === "balanceUser" ? ( ) : ( renderCell(col.key, row) diff --git a/src/app/(dashboard)/customers/birthday/page.tsx b/src/app/(dashboard)/customers/birthday/page.tsx index 4a103ee..4eadcab 100644 --- a/src/app/(dashboard)/customers/birthday/page.tsx +++ b/src/app/(dashboard)/customers/birthday/page.tsx @@ -1,7 +1,5 @@ import { Prisma } from "@prisma/client"; import { prisma } from "@/lib/prisma"; -import { auth } from "@/lib/auth"; -import { isSuperAdmin } from "@/lib/acl"; import { birthdayMatchLists } from "@/lib/lunar"; import { Card } from "@/components/ui/card"; import { BirthdayControl } from "./birthday-control"; @@ -20,8 +18,6 @@ export default async function BirthdayPage({ }: { searchParams: Promise<{ mode?: string; date?: string }>; }) { - const session = await auth(); - const isAdmin = isSuperAdmin(session?.user?.roles); const sp = await searchParams; const mode = sp.mode === "week" ? "week" : "today"; const dateStr = sp.date ?? ""; @@ -67,7 +63,7 @@ export default async function BirthdayPage({ - + ); }