feat: datetimes with timezones

This commit is contained in:
2025-08-24 14:54:10 +04:00
parent d5be9ce61a
commit e5602551c5
7 changed files with 53 additions and 4 deletions

View File

@ -1,9 +1,10 @@
import { FC, useState } from "react";
import { isEqual } from "lodash";
import { Button, Group, Stack, TextInput } from "@mantine/core";
import { Button, Group, Stack, Text, TextInput } from "@mantine/core";
import { useForm } from "@mantine/form";
import { DealsCrud } from "@/hooks/cruds/useDealsCrud";
import { DealSchema } from "@/lib/client";
import { utcDateTimeToLocalString } from "@/utils/datetime";
type Props = {
dealsCrud: DealsCrud;
@ -36,8 +37,11 @@ const GeneralTab: FC<Props> = ({ deal, dealsCrud, onClose }) => {
label={"Название"}
{...form.getInputProps("name")}
/>
<Group justify={"space-between"}>
<Group>
<Text>Создано: {utcDateTimeToLocalString(deal.createdAt)}</Text>
<Group
justify={"space-between"}
wrap={"nowrap"}>
<Group wrap={"nowrap"}>
<Button
type={"submit"}
disabled={isEqual(form.values, initialValues)}