fix kit + add ticket check shown
This commit is contained in:
parent
0e352f36ee
commit
de5ef7e925
@ -1 +1 @@
|
|||||||
REACT_APP_DOMAIN="https://hub.pena.digital"
|
REACT_APP_DOMAIN=""
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
|
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
|
||||||
"@emotion/react": "^11.10.5",
|
"@emotion/react": "^11.10.5",
|
||||||
"@emotion/styled": "^11.10.5",
|
"@emotion/styled": "^11.10.5",
|
||||||
"@frontend/kitui": "^1.0.96",
|
"@frontend/kitui": "^1.0.99",
|
||||||
"@mui/icons-material": "^5.10.14",
|
"@mui/icons-material": "^5.10.14",
|
||||||
"@mui/material": "^5.10.14",
|
"@mui/material": "^5.10.14",
|
||||||
"@popperjs/core": "^2.11.8",
|
"@popperjs/core": "^2.11.8",
|
||||||
@ -36,7 +36,7 @@
|
|||||||
"react-error-boundary": "^4.0.11",
|
"react-error-boundary": "^4.0.11",
|
||||||
"react-pdf": "^7.1.2",
|
"react-pdf": "^7.1.2",
|
||||||
"react-router-dom": "^6.23.0",
|
"react-router-dom": "^6.23.0",
|
||||||
"react-slick": "^0.29.0",
|
"react-slick": "^0.30.3",
|
||||||
"slick-carousel": "^1.8.1",
|
"slick-carousel": "^1.8.1",
|
||||||
"swr": "^2.2.5",
|
"swr": "^2.2.5",
|
||||||
"use-debounce": "^10.0.0",
|
"use-debounce": "^10.0.0",
|
||||||
@ -53,7 +53,7 @@
|
|||||||
"@types/node": "^16.7.13",
|
"@types/node": "^16.7.13",
|
||||||
"@types/react": "^18.0.0",
|
"@types/react": "^18.0.0",
|
||||||
"@types/react-dom": "^18.0.0",
|
"@types/react-dom": "^18.0.0",
|
||||||
"@types/react-slick": "^0.23.10",
|
"@types/react-slick": "^0.23.13",
|
||||||
"@typescript-eslint/eslint-plugin": "^6.9.1",
|
"@typescript-eslint/eslint-plugin": "^6.9.1",
|
||||||
"@typescript-eslint/parser": "^6.9.1",
|
"@typescript-eslint/parser": "^6.9.1",
|
||||||
"craco-alias": "^3.0.1",
|
"craco-alias": "^3.0.1",
|
||||||
|
@ -151,6 +151,8 @@ export default function Chat({ open = false, onclickArrow, sx }: Props) {
|
|||||||
}, []),
|
}, []),
|
||||||
onFetchStateChange: setUnauthTicketMessageFetchState,
|
onFetchStateChange: setUnauthTicketMessageFetchState,
|
||||||
});
|
});
|
||||||
|
console.log("sessionData")
|
||||||
|
console.log(sessionData)
|
||||||
useSSESubscription<TicketMessage>({
|
useSSESubscription<TicketMessage>({
|
||||||
enabled: sseEnabled && isActiveSSETab && Boolean(sessionData),
|
enabled: sseEnabled && isActiveSSETab && Boolean(sessionData),
|
||||||
url:
|
url:
|
||||||
@ -247,12 +249,18 @@ export default function Chat({ open = false, onclickArrow, sx }: Props) {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (open) {
|
if (open) {
|
||||||
|
if (user !== undefined && messages.length > 1) {
|
||||||
|
console.log("SHOWN")
|
||||||
|
console.log("user")
|
||||||
|
console.log(user)
|
||||||
|
console.log(messages[messages.length - 1])
|
||||||
const newMessages = messages.filter(({ shown }) => shown.me !== 1);
|
const newMessages = messages.filter(({ shown }) => shown.me !== 1);
|
||||||
|
|
||||||
newMessages.map(async ({ id }) => {
|
newMessages.map(async ({ id }) => {
|
||||||
await shownMessage(id);
|
await shownMessage(id);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}, [open, messages]);
|
}, [open, messages]);
|
||||||
|
|
||||||
const loadNewMessages = (
|
const loadNewMessages = (
|
||||||
@ -527,6 +535,13 @@ export default function Chat({ open = false, onclickArrow, sx }: Props) {
|
|||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
console.log("isSelf " + message.message)
|
||||||
|
console.log("ticket.sessionData?.sessionId " + ticket.sessionData?.sessionId)
|
||||||
|
console.log("user_id ")
|
||||||
|
console.log("message.user_id " + message.user_id)
|
||||||
|
console.log("---------boolean result-----------")
|
||||||
|
console.log((ticket.sessionData?.sessionId || user) ===
|
||||||
|
message.user_id)
|
||||||
return (
|
return (
|
||||||
<ChatMessage
|
<ChatMessage
|
||||||
unAuthenticated
|
unAuthenticated
|
||||||
|
@ -1 +1,2 @@
|
|||||||
export { Slider } from "./slider"
|
export { Slider } from "./slider"
|
||||||
|
import Slider from "react-slick";
|
@ -104,7 +104,7 @@ export const Slider = ({ items }: SliderProps) => {
|
|||||||
sx={{ "& .slick-track": { marginLeft: marginLeft + "px", columnGap: items.length === 1 ? "0px" : "40px" } }}
|
sx={{ "& .slick-track": { marginLeft: marginLeft + "px", columnGap: items.length === 1 ? "0px" : "40px" } }}
|
||||||
ref={sliderRef}
|
ref={sliderRef}
|
||||||
>
|
>
|
||||||
{(items.length < 4 && !isMiddle && !isTablet) ||
|
{/* {(items.length < 4 && !isMiddle && !isTablet) ||
|
||||||
(items.length < 3 && isMiddle && !isTablet) ||
|
(items.length < 3 && isMiddle && !isTablet) ||
|
||||||
(items.length < 1 && isTablet) ? (
|
(items.length < 1 && isTablet) ? (
|
||||||
<Box
|
<Box
|
||||||
@ -140,7 +140,7 @@ export const Slider = ({ items }: SliderProps) => {
|
|||||||
>
|
>
|
||||||
{items}
|
{items}
|
||||||
</SliderSlick>
|
</SliderSlick>
|
||||||
)}
|
)} */}
|
||||||
</Box>
|
</Box>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user