diff --git a/backend/src/services/TicketServices/ListTicketsService.ts b/backend/src/services/TicketServices/ListTicketsService.ts index 29e165c..b8d8dd6 100644 --- a/backend/src/services/TicketServices/ListTicketsService.ts +++ b/backend/src/services/TicketServices/ListTicketsService.ts @@ -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; @@ -50,6 +51,11 @@ const ListTicketsService = async ({ model: Queue, as: "queue", attributes: ["id", "name", "color"] + }, + { + model: Whatsapp, + as: "whatsapp", + attributes: ["name"] } ]; diff --git a/frontend/src/components/TicketListItem/index.js b/frontend/src/components/TicketListItem/index.js index 8ddff74..d0fc01b 100644 --- a/frontend/src/components/TicketListItem/index.js +++ b/frontend/src/components/TicketListItem/index.js @@ -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 }) => { @@ -196,6 +211,9 @@ const TicketListItem = ({ ticket }) => { )} )} + {ticket.whatsappId && ( +