diff --git a/package-lock.json b/package-lock.json index cd5205b..4350ac8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,7 +11,7 @@ "@babel/plugin-proposal-private-property-in-object": "^7.21.11", "@emotion/react": "^11.10.5", "@emotion/styled": "^11.10.5", - "@frontend/kitui": "^1.0.92", + "@frontend/kitui": "^1.0.96", "@mui/icons-material": "^5.10.14", "@mui/material": "^5.10.14", "@popperjs/core": "^2.11.8", @@ -2905,9 +2905,9 @@ } }, "node_modules/@frontend/kitui": { - "version": "1.0.92", - "resolved": "http://gitea.pena/api/packages/skeris/npm/%40frontend%2Fkitui/-/1.0.92/kitui-1.0.92.tgz", - "integrity": "sha512-r/+rJbo63XpaivtMalZ0x5rxj3oIfLWQxJ3OqvohFVy+JF/e2FEgePVl2BvomcjYDeTM1eJru+nmvzONdMTfCA==", + "version": "1.0.96", + "resolved": "http://gitea.pena/api/packages/skeris/npm/%40frontend%2Fkitui/-/1.0.96/kitui-1.0.96.tgz", + "integrity": "sha512-JT8eR3Q5w1cDgQIALUGBfklH1ubW1bolWuhBVgQKuMWsCLfZtZvoAFXU1T1M4Ma55H87eL0Lu0bVPI0ne3gAJQ==", "license": "MIT", "dependencies": { "immer": "^10.0.2", diff --git a/package.json b/package.json index eebc529..94bccbc 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "@babel/plugin-proposal-private-property-in-object": "^7.21.11", "@emotion/react": "^11.10.5", "@emotion/styled": "^11.10.5", - "@frontend/kitui": "^1.0.92", + "@frontend/kitui": "^1.0.96", "@mui/icons-material": "^5.10.14", "@mui/material": "^5.10.14", "@popperjs/core": "^2.11.8", diff --git a/src/components/FloatingSupportChat/Chat.tsx b/src/components/FloatingSupportChat/Chat.tsx index 4fb5317..97d9a05 100644 --- a/src/components/FloatingSupportChat/Chat.tsx +++ b/src/components/FloatingSupportChat/Chat.tsx @@ -157,6 +157,8 @@ export default function Chat({ open = false, onclickArrow, sx }: Props) { process.env.REACT_APP_DOMAIN + `/heruvym/v1.0.0/ticket?ticket=${sessionData?.ticketId}&s=${sessionData?.sessionId}`, onNewData: (ticketMessages) => { + console.log("ticketMessagesticketMessages") + console.log(ticketMessages) const isTicketClosed = ticketMessages.some( (message) => message.session_id === "close" ); diff --git a/src/pages/Support/SupportChat.tsx b/src/pages/Support/SupportChat.tsx index 6589f8f..6b61c40 100644 --- a/src/pages/Support/SupportChat.tsx +++ b/src/pages/Support/SupportChat.tsx @@ -306,6 +306,7 @@ function SupportChat() { > {ticket && messages.map((message) => { + console.log(message) const isFileVideo = () => { if (message.files) { return ACCEPT_SEND_MEDIA_TYPES_MAP.video.some( @@ -331,8 +332,8 @@ function SupportChat() { } }; if ( - message.files !== null && - message.files.length > 0 && + message?.files !== null && + message?.files?.length > 0 && isFileImage() ) { return ( diff --git a/src/stores/tickets.ts b/src/stores/tickets.ts index 12a6c90..51a3fcf 100644 --- a/src/stores/tickets.ts +++ b/src/stores/tickets.ts @@ -72,7 +72,8 @@ export const setTicketApiPage = (apiPage: number) => export const updateTickets = (receivedTickets: Ticket[]) => { const state = useTicketStore.getState(); const ticketIdToTicketMap: { [ticketId: string]: Ticket } = {}; - +//@ts-ignore + // [...state.tickets, ...receivedTickets].filter(t=>!Boolean(t?.top_message.system)).forEach( [...state.tickets, ...receivedTickets].forEach( (ticket) => (ticketIdToTicketMap[ticket.id] = ticket) );