diff --git a/src/main.tsx b/src/main.tsx index 6561d4e..9bd9f05 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -128,7 +128,11 @@ const router = createBrowserRouter([ }, { path: "/dashboard/settings", - element: , + element: ( + + + + ), }, { path: "/dashboard/settings/user", diff --git a/src/routes/settings.tsx b/src/routes/settings.tsx index 3416049..dd0d6d8 100644 --- a/src/routes/settings.tsx +++ b/src/routes/settings.tsx @@ -21,6 +21,8 @@ import { SelectValue, } from "@/components/ui/select" import { Textarea } from "@/components/ui/textarea" +import { Combobox } from "@/components/ui/combobox" +import { useNotification } from "@/hooks/useNotfication" import { useAuth } from "@/hooks/useAuth" import useSetting from "@/hooks/useSetting" import { asOptionalField } from "@/lib/utils" @@ -58,6 +60,12 @@ export default function SettingsPage() { const { profile } = useAuth() const navigate = useNavigate() + const { notifierGroup } = useNotification() + const ngroupList = notifierGroup?.map((ng) => ({ + value: `${ng.group.id}`, + label: ng.group.name, + })) || [{ value: "", label: "" }] + const isAdmin = profile?.role === 0 if (!isAdmin) { @@ -448,12 +456,13 @@ export default function SettingsPage() { name="ip_change_notification_group_id" render={({ field }) => ( - {t("NotifierGroupID")} + {t("NotifierGroup")} -