Adaptação para ura funcionar com opção e sem opção e identação de código

pull/1/head
adriano 2022-01-25 13:25:37 -03:00
parent 3b4bef8266
commit 39453e791d
2 changed files with 18 additions and 11 deletions

View File

@ -143,21 +143,28 @@ const verifyQueue = async (
const { queues, greetingMessage } = await ShowWhatsAppService(wbot.id!); const { queues, greetingMessage } = await ShowWhatsAppService(wbot.id!);
if (queues.length === 1) { /*if (queues.length === 1) {
await UpdateTicketService({ await UpdateTicketService({
ticketData: { queueId: queues[0].id }, ticketData: { queueId: queues[0].id },
ticketId: ticket.id ticketId: ticket.id
}); });
return; return;
}*/
let selectedOption = null;
let choosenQueue = null
if (queues.length === 1) {
selectedOption = 1;
choosenQueue = queues[+selectedOption - 1];
}
else{
selectedOption = msg.body;
choosenQueue = queues[+selectedOption - 1];
} }
console.log('queues.lengthqueues.lengthqueues.lengthqueues.lengthqueues.length: ',queues.length) // const selectedOption = msg.body;
const selectedOption = msg.body;
const choosenQueue = queues[+selectedOption - 1];
//apagar essa gambiarra e ativar as 2 linhas acima thuanny
//const selectedOption = 1;
// const choosenQueue = queues[+selectedOption - 1]; // const choosenQueue = queues[+selectedOption - 1];

View File

@ -220,7 +220,7 @@ const LoggedInLayout = ({ children }) => {
className={classes.title} className={classes.title}
> >
GRUPO HIT BETAGROUP
</Typography> </Typography>
{user.id && <NotificationsPopOver />} {user.id && <NotificationsPopOver />}