Add timestamps to ticket chat bubbles

This commit is contained in:
N-Pex 2024-10-08 10:34:00 +02:00
parent 66741f855d
commit fa931f35b2
2 changed files with 5 additions and 2 deletions

View file

@ -109,13 +109,15 @@ export const TicketDetail: FC<TicketDetailProps> = ({ id }) => {
} }
model={{ model={{
message: article.bodyWithUrls, message: article.bodyWithUrls,
sentTime: article.updated_at, sentTime: article.updatedAt,
sender: article.from, sender: article.from,
direction: direction:
article.sender === "Agent" ? "outgoing" : "incoming", article.sender === "Agent" ? "outgoing" : "incoming",
position: "single", position: "single",
}} }}
/> >
<Message.Header sender={article.sender?.name} sentTime={new Date(article.updatedAt).toLocaleString()} />
</Message>
))} ))}
</MessageList> </MessageList>
</ChatContainer> </ChatContainer>

View file

@ -19,6 +19,7 @@ query getTicketArticles($ticketId: ID!) {
emailAddress emailAddress
} }
} }
updatedAt
} }
} }
} }