feat: add created_at field display to admin user edit page (#23805)
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
Devin AI
parent
a8154f9405
commit
7fcdaa1c46
@@ -3,6 +3,7 @@ import { noop } from "lodash";
|
||||
import { Controller, useForm } from "react-hook-form";
|
||||
|
||||
import { TimezoneSelect } from "@calcom/features/components/timezone-select";
|
||||
import { formatToLocalizedDate } from "@calcom/lib/dayjs";
|
||||
import { getUserAvatarUrl } from "@calcom/lib/getAvatarUrl";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { defaultLocaleOption, localeOptions } from "@calcom/lib/i18n";
|
||||
@@ -32,7 +33,7 @@ type OptionValues = {
|
||||
|
||||
type FormValues = Pick<
|
||||
User,
|
||||
"avatarUrl" | "name" | "username" | "email" | "bio" | "theme" | "defaultScheduleId" | "allowDynamicBooking"
|
||||
"avatarUrl" | "name" | "username" | "email" | "bio" | "createdDate" | "theme" | "defaultScheduleId" | "allowDynamicBooking"
|
||||
> &
|
||||
OptionValues;
|
||||
|
||||
@@ -146,6 +147,14 @@ export const UserForm = ({
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
{defaultValues?.createdDate && (
|
||||
<div>
|
||||
<Label className="text-default font-medium">{t("member_since")}</Label>
|
||||
<div className="text-default mt-1 text-sm">
|
||||
{formatToLocalizedDate(new Date(defaultValues.createdDate), localeProp)}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
<Controller
|
||||
name="role"
|
||||
control={form.control}
|
||||
|
||||
Reference in New Issue
Block a user