diff --git a/resources/js/Components/ActivityLog/ActivityDetailDialog.tsx b/resources/js/Components/ActivityLog/ActivityDetailDialog.tsx index 79be7a5..b524e5d 100644 --- a/resources/js/Components/ActivityLog/ActivityDetailDialog.tsx +++ b/resources/js/Components/ActivityLog/ActivityDetailDialog.tsx @@ -45,6 +45,7 @@ interface Props { const fieldLabels: Record = { name: '名稱', code: '代碼', + username: '登入帳號', description: '描述', price: '價格', cost: '成本', @@ -146,8 +147,6 @@ export default function ActivityDetailDialog({ open, onOpenChange, activity }: P return a.localeCompare(b); }); - // Helper to check if a key is a snapshot name field - // Helper to check if a key is a snapshot name field const isSnapshotField = (key: string) => { return [ @@ -176,6 +175,9 @@ export default function ActivityDetailDialog({ open, onOpenChange, activity }: P }; const formatValue = (key: string, value: any) => { + // Mask password + if (key === 'password') return '******'; + if (value === null || value === undefined) return '-'; if (typeof value === 'boolean') return value ? '是' : '否'; if (key === 'is_active') return value ? '啟用' : '停用';