mirror of
https://github.com/cheveguerra/whaticket-community.git
synced 2026-04-18 11:49:19 +00:00
improvement: better names in pages, folders and routes
This commit is contained in:
@@ -304,7 +304,7 @@ const MessagesList = () => {
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
toast.error("Ticket não encontrado");
|
||||
history.push("/chat");
|
||||
history.push("/tickets");
|
||||
}
|
||||
};
|
||||
fetchMessages();
|
||||
@@ -418,7 +418,7 @@ const MessagesList = () => {
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
history.push("/chat");
|
||||
history.push("/tickets");
|
||||
};
|
||||
|
||||
const handleDrawerOpen = () => {
|
||||
|
||||
@@ -85,7 +85,7 @@ const NewTicketModal = ({ modalOpen, onClose, contactId }) => {
|
||||
userId: userId,
|
||||
status: "open",
|
||||
});
|
||||
history.push(`/chat/${ticket.id}`);
|
||||
history.push(`/tickets/${ticket.id}`);
|
||||
} catch (err) {
|
||||
alert(err);
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@ const NotificationsPopOver = () => {
|
||||
|
||||
notification.onclick = function (event) {
|
||||
event.preventDefault(); //
|
||||
window.open(`/chat/${ticket.id}`, "_self");
|
||||
window.open(`/tickets/${ticket.id}`, "_self");
|
||||
};
|
||||
|
||||
document.addEventListener("visibilitychange", () => {
|
||||
@@ -137,7 +137,7 @@ const NotificationsPopOver = () => {
|
||||
}, [setIsOpen]);
|
||||
|
||||
const handleSelectTicket = (e, ticket) => {
|
||||
history.push(`/chat/${ticket.id}`);
|
||||
history.push(`/tickets/${ticket.id}`);
|
||||
handleClickAway();
|
||||
};
|
||||
|
||||
|
||||
@@ -100,11 +100,11 @@ const TicketListItem = ({ ticket }) => {
|
||||
} catch (err) {
|
||||
alert(err);
|
||||
}
|
||||
history.push(`/chat/${ticketId}`);
|
||||
history.push(`/tickets/${ticketId}`);
|
||||
};
|
||||
|
||||
const handleSelectTicket = (e, ticket) => {
|
||||
history.push(`/chat/${ticket.id}`);
|
||||
history.push(`/tickets/${ticket.id}`);
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
@@ -18,7 +18,7 @@ const TicketOptionsMenu = ({ ticket, menuOpen, handleClose, anchorEl }) => {
|
||||
try {
|
||||
await api.delete(`/tickets/${ticket.id}`);
|
||||
toast.success("Ticket deletado com sucesso.");
|
||||
history.push("/chat");
|
||||
history.push("/tickets");
|
||||
} catch (err) {
|
||||
toast.error("Erro ao deletar o ticket");
|
||||
}
|
||||
|
||||
@@ -42,12 +42,12 @@ const MainListItems = () => {
|
||||
<div>
|
||||
<ListItemLink to="/" primary="Dashboard" icon={<DashboardIcon />} />
|
||||
<ListItemLink
|
||||
to="/whats-auth"
|
||||
to="/connection"
|
||||
primary={i18n.t("mainDrawer.listItems.connection")}
|
||||
icon={<SyncAltIcon />}
|
||||
/>
|
||||
<ListItemLink
|
||||
to="/chat"
|
||||
to="/tickets"
|
||||
primary={i18n.t("mainDrawer.listItems.tickets")}
|
||||
icon={<WhatsAppIcon />}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user