Add timezone display to admin Next.js frontend
Display user timezone in: - Notification Preferences table (new Timezone column) - User detail page (Basic Information card) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -193,6 +193,15 @@ export default function NotificationPrefsPage() {
|
||||
/>
|
||||
),
|
||||
},
|
||||
{
|
||||
accessorKey: 'timezone',
|
||||
header: 'Timezone',
|
||||
cell: ({ row }) => (
|
||||
<span className="text-sm">
|
||||
{row.original.timezone || <span className="text-muted-foreground">-</span>}
|
||||
</span>
|
||||
),
|
||||
},
|
||||
{
|
||||
id: 'notification_times',
|
||||
header: () => (
|
||||
|
||||
@@ -239,6 +239,12 @@ export function UserDetailClient() {
|
||||
</div>
|
||||
<div>{new Date(user.date_joined).toLocaleDateString()}</div>
|
||||
</div>
|
||||
<div>
|
||||
<div className="text-sm font-medium text-muted-foreground">
|
||||
Timezone
|
||||
</div>
|
||||
<div>{user.timezone || '-'}</div>
|
||||
</div>
|
||||
</div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
||||
@@ -652,6 +652,8 @@ export interface NotificationPreference {
|
||||
task_overdue_hour: number | null;
|
||||
warranty_expiring_hour: number | null;
|
||||
daily_digest_hour: number | null;
|
||||
// User timezone (IANA name, auto-captured from X-Timezone header)
|
||||
timezone: string | null;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@ export interface User {
|
||||
export interface UserDetail extends User {
|
||||
residences?: ResidenceSummary[];
|
||||
devices?: DeviceSummary[];
|
||||
timezone?: string; // IANA timezone (auto-captured from mobile app)
|
||||
}
|
||||
|
||||
export interface ResidenceSummary {
|
||||
|
||||
Reference in New Issue
Block a user