mirror of
https://github.com/cheveguerra/whaticket-community.git
synced 2026-04-20 04:39:20 +00:00
feat: reopen same ticket when last ticket < 2h
This commit is contained in:
@@ -221,7 +221,7 @@ const MessagesList = () => {
|
||||
const classes = useStyles();
|
||||
|
||||
const token = localStorage.getItem("token");
|
||||
const userId = localStorage.getItem("userId");
|
||||
const userId = +localStorage.getItem("userId");
|
||||
|
||||
const [loading, setLoading] = useState(true);
|
||||
const [contact, setContact] = useState({});
|
||||
|
||||
@@ -288,6 +288,7 @@ const TicketsList = () => {
|
||||
let aux = [...prevState];
|
||||
aux[ticketIndex].unreadMessages++;
|
||||
aux[ticketIndex].lastMessage = data.message.body;
|
||||
aux[ticketIndex].status = data.ticket.status;
|
||||
aux.unshift(aux.splice(ticketIndex, 1)[0]);
|
||||
return aux;
|
||||
} else {
|
||||
@@ -488,6 +489,8 @@ const TicketsList = () => {
|
||||
}
|
||||
};
|
||||
|
||||
console.log(tickets);
|
||||
|
||||
return (
|
||||
<Paper elevation={0} variant="outlined" className={classes.contactsWrapper}>
|
||||
<NewTicketModal
|
||||
|
||||
Reference in New Issue
Block a user