feat: add queue color to tickets list item

This commit is contained in:
canove
2021-01-11 07:22:56 -03:00
parent f642f2c788
commit 90b438025b
6 changed files with 25 additions and 24 deletions

View File

@@ -4,6 +4,7 @@ import { startOfDay, endOfDay, parseISO } from "date-fns";
import Ticket from "../../models/Ticket";
import Contact from "../../models/Contact";
import Message from "../../models/Message";
import Queue from "../../models/Queue";
interface Request {
searchParam?: string;
@@ -40,6 +41,11 @@ const ListTicketsService = async ({
model: Contact,
as: "contact",
attributes: ["id", "name", "number", "profilePicUrl"]
},
{
model: Queue,
as: "queue",
attributes: ["id", "name", "color"]
}
];