Codificação de trycatch para timers do schedulerNotify e monitor do online offline ale de configuração da tabela do online offline
parent
8924e2a8e0
commit
70245a9904
|
@ -29,8 +29,10 @@ const monitor = async () => {
|
|||
try {
|
||||
|
||||
const { schedulingNotifies, count, hasMore } = await ListSchedulingNotifyService({ searchParam: dateParm, pageNumber: "1" });
|
||||
|
||||
if(schedulingNotifies.length){
|
||||
|
||||
// console.log('schedulingNotifies: ',schedulingNotifies)
|
||||
|
||||
if(schedulingNotifies && schedulingNotifies.length>0){
|
||||
|
||||
const ticket = await ShowTicketService(schedulingNotifies[0].ticketId);
|
||||
|
||||
|
|
|
@ -9,6 +9,8 @@ import { addHours, addMinutes, addSeconds, intervalToDuration, add } from "date-
|
|||
onlineTime.setUTCMinutes(new Date(oldOnlineTimeSum.onlineTime).getMinutes())
|
||||
onlineTime.setUTCSeconds(new Date(oldOnlineTimeSum.onlineTime).getSeconds())
|
||||
|
||||
// console.log('_________________oldOnlineTimeSum.updatedAt: ', oldOnlineTimeSum.updatedAt)
|
||||
|
||||
let newtTime = intervalToDuration({ start: new Date(oldOnlineTimeSum.updatedAt), end: new Date() })
|
||||
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ let deleted: boolean = false;
|
|||
|
||||
const emitterOnline = (user: any, status: string, showOnlineTime: boolean = true) => {
|
||||
|
||||
if (!user.id) return
|
||||
if (!user.id || !user.updatedAt || !user.onlineTime) return
|
||||
|
||||
let newOnlinetime = sumOnlineTimeNow(user)
|
||||
|
||||
|
|
|
@ -705,7 +705,7 @@ const Report = () => {
|
|||
[
|
||||
|
||||
// { title: 'Foto', field: 'ticket.contact.profilePicUrl', render: rowData => <img src={rowData['ticket.contact.profilePicUrl']} alt="imagem de perfil do whatsapp" style={{ width: 40, borderRadius: '50%' }} /> },
|
||||
{ title: 'Nome', field: 'name' },
|
||||
{ title: 'Nome', field: 'name', cellStyle: {whiteSpace: 'nowrap'}, },
|
||||
|
||||
{
|
||||
title: 'Status', field: 'statusOnline.status',
|
||||
|
|
Loading…
Reference in New Issue