feat: integrate Combobox component for timezone selection in CreateTaskDialog and AccountPage
Some checks failed
Frontend CI / lint (push) Failing after 19s
Frontend CI / build (push) Has been skipped

This commit is contained in:
JSC
2025-08-29 03:33:38 +02:00
parent 70de6ad919
commit 851738f04f
3 changed files with 215 additions and 216 deletions

View File

@@ -2,6 +2,7 @@ import { AppLayout } from '@/components/AppLayout'
import { Badge } from '@/components/ui/badge'
import { Button } from '@/components/ui/button'
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'
import { Combobox, type ComboboxOption } from '@/components/ui/combobox'
import {
Dialog,
DialogContent,
@@ -75,6 +76,13 @@ export function AccountPage() {
const [providers, setProviders] = useState<UserProvider[]>([])
const [providersLoading, setProvidersLoading] = useState(true)
// Prepare timezone options for combobox
const timezoneOptions: ComboboxOption[] = getSupportedTimezones().map((tz) => ({
value: tz,
label: tz.replace('_', ' '),
searchValue: tz.replace('_', ' ')
}))
useEffect(() => {
if (user) {
setProfileName(user.name)
@@ -390,21 +398,14 @@ export function AccountPage() {
<div className="space-y-2">
<Label>Timezone</Label>
<Select
<Combobox
value={timezone}
onValueChange={setTimezone}
>
<SelectTrigger>
<SelectValue />
</SelectTrigger>
<SelectContent>
{getSupportedTimezones().map((tz) => (
<SelectItem key={tz} value={tz}>
{tz.replace('_', ' ')}
</SelectItem>
))}
</SelectContent>
</Select>
options={timezoneOptions}
placeholder="Select timezone..."
searchPlaceholder="Search timezone..."
emptyMessage="No timezone found."
/>
<p className="text-xs text-muted-foreground">
Choose your timezone for date and time display
</p>