fix(chat): bug fixes for chat and send MessageEntriesModal.tsx
Build and Push Docker image / build-and-push (push) Successful in 5m18s
Details
Build and Push Docker image / build-and-push (push) Successful in 5m18s
Details
This commit is contained in:
parent
5b96f2508c
commit
5b85f91bb1
|
@ -1,7 +1,7 @@
|
|||
import {MessagesModel} from "@/models/MessageTypes.ts";
|
||||
import TextEditor from "@/components/input/Editor";
|
||||
import {useForm} from "@mantine/form";
|
||||
import {ActionIcon, Button, Center, Group, Text} from "@mantine/core";
|
||||
import {ActionIcon, Button, Center, Divider, Group, Text} from "@mantine/core";
|
||||
import {IconMessageCircleUp, IconSend} from "@tabler/icons-react";
|
||||
import classes from './Messages.module.css'
|
||||
import {useInfiniteQuery, useMutation} from "@tanstack/react-query";
|
||||
|
@ -86,6 +86,11 @@ export default function Messages({eventList}: {
|
|||
|
||||
<InnerHtml html={message.content}/>
|
||||
|
||||
{message.comment && <>
|
||||
<Divider mt={"sm"} mb={"sm"} label="Kommentar"/>
|
||||
<InnerHtml html={message.comment}/>
|
||||
</>}
|
||||
|
||||
<div className={classes.messageSender}>
|
||||
{humanDeltaFromNow(message.created).message} • {pprintDateTime(message.created)}
|
||||
</div>
|
||||
|
|
|
@ -56,6 +56,7 @@ export default function MessageEntriesModal({opened, event, onClose, query}: {
|
|||
await pb.collection("messages").create({
|
||||
content: formValues.values.content,
|
||||
comment: formValues.values.comment ?? undefined,
|
||||
sender: user?.id,
|
||||
eventList: l.id,
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue