Skip to content

Commit

Permalink
Mostrar a conexão que está sendo usada no momento
Browse files Browse the repository at this point in the history
  • Loading branch information
rtenorioh authored Mar 23, 2022
1 parent d30a856 commit 6165724
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 2 deletions.
6 changes: 6 additions & 0 deletions backend/src/services/TicketServices/ListTicketsService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import Contact from "../../models/Contact";
import Message from "../../models/Message";
import Queue from "../../models/Queue";
import ShowUserService from "../UserServices/ShowUserService";
import Whatsapp from "../../models/Whatsapp";

interface Request {
searchParam?: string;
Expand Down Expand Up @@ -50,6 +51,11 @@ const ListTicketsService = async ({
model: Queue,
as: "queue",
attributes: ["id", "name", "color"]
},
{
model: Whatsapp,
as: "whatsapp",
attributes: ["name"]
}
];

Expand Down
18 changes: 18 additions & 0 deletions frontend/src/components/TicketListItem/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,21 @@ const useStyles = makeStyles(theme => ({
top: "0%",
left: "0%",
},

userTag: {
position: "absolute",
marginRight: 5,
right: 5,
bottom: 5,
background:"#2576D2",
color: "#ffffff",
border:"1px solid #CCC",
padding: 1,
paddingLeft: 5,
paddingRight: 5,
borderRadius: 10,
fontSize: "1em"
},
}));

const TicketListItem = ({ ticket }) => {
Expand Down Expand Up @@ -196,6 +211,9 @@ const TicketListItem = ({ ticket }) => {
)}
</Typography>
)}
{ticket.whatsappId && (
<div className={classes.userTag} title={i18n.t("ticketsList.connectionTitle")}>{ticket.whatsapp.name}</div>
)}
</span>
}
secondary={
Expand Down
1 change: 1 addition & 0 deletions frontend/src/translate/languages/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ const messages = {
pendingHeader: "Queue",
assignedHeader: "Working on",
noTicketsTitle: "Nothing here!",
connectionTitle: "Connection that is currently being used.",
noTicketsMessage: "No tickets found with this status or search term.",
buttons: {
accept: "Accept",
Expand Down
1 change: 1 addition & 0 deletions frontend/src/translate/languages/es.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ const messages = {
pendingHeader: "Cola",
assignedHeader: "Trabajando en",
noTicketsTitle: "¡Nada acá!",
connectionTitle: "Conexión que se está utilizando actualmente.",
noTicketsMessage:
"No se encontraron tickets con este estado o término de búsqueda",
buttons: {
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/translate/languages/pt.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,8 @@ const messages = {
pendingHeader: "Aguardando",
assignedHeader: "Atendendo",
noTicketsTitle: "Nada aqui!",
noTicketsMessage:
"Nenhum ticket encontrado com esse status ou termo pesquisado",
noTicketsMessage: "Nenhum ticket encontrado com esse status ou termo pesquisado",
connectionTitle: "Conexão que está sendo utilizada atualmente.",
buttons: {
accept: "Responder",
},
Expand Down

0 comments on commit 6165724

Please sign in to comment.