Initial role user app
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
export function formatDateTime(value?: string | null) {
|
||||
if (!value) return "暂未设置";
|
||||
|
||||
return new Intl.DateTimeFormat("zh-CN", {
|
||||
month: "2-digit",
|
||||
day: "2-digit",
|
||||
hour: "2-digit",
|
||||
minute: "2-digit"
|
||||
}).format(new Date(value));
|
||||
}
|
||||
|
||||
export function roleNames(roles: { name: string }[]) {
|
||||
return roles.map((role) => role.name).join("、") || "未分配角色";
|
||||
}
|
||||
Reference in New Issue
Block a user