From 1d190a5dd4964be05c4ac28fd293cabb85b68d5d Mon Sep 17 00:00:00 2001 From: adriano Date: Fri, 29 Sep 2023 14:10:47 -0300 Subject: [PATCH] =?UTF-8?q?altera=C3=A7=C3=A3o=20do=20datetime=20para=20Fu?= =?UTF-8?q?so=20Espanhol=20date-fns/locale/es?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/src/controllers/ReportController.ts | 2 +- backend/src/controllers/TicketController.ts | 2 +- backend/src/helpers/AutoCloseTickets.ts | 2 +- backend/src/helpers/AutoRestore.ts | 2 +- backend/src/helpers/InternetConnection.ts | 2 +- backend/src/helpers/OnlineReporEmiterInfoByUser.ts | 2 +- backend/src/helpers/SchedulingNotifyCache.ts | 2 +- backend/src/helpers/SetTicketMessagesAsRead.ts | 2 +- backend/src/helpers/TicketConfig.ts | 2 +- backend/src/helpers/WhoIsOnlineMonitor.ts | 2 +- backend/src/libs/socket.ts | 2 +- backend/src/services/SLM/FindOrCreateQueryItemService.ts | 2 +- backend/src/services/TicketServices/CountTicketService.ts | 2 +- backend/src/services/TicketServices/CreateTicketService.ts | 2 +- backend/src/services/TicketServices/ListTicketServiceCache.ts | 2 +- backend/src/services/TicketServices/ListTicketTimeLife.ts | 2 +- backend/src/services/TicketServices/ListTicketsService.ts | 2 +- .../services/UserServices/CreateOrUpdateOnlineUserService.ts | 2 +- backend/src/services/WbotServices/StartWhatsAppSession.ts | 2 +- backend/src/services/WbotServices/wbotMessageListener.ts | 2 +- backend/src/services/WbotServices/wbotMonitor.ts | 2 +- frontend/src/components/ChatEnd/TimerPickerSelect/index.js | 2 +- frontend/src/components/ConfigModal/index.js | 2 +- .../components/ModalUpdateScheduleReminder/DatePicker2/index.js | 2 +- .../ModalUpdateScheduleReminder/TimerPickerSelect2/index.js | 2 +- frontend/src/components/Report/DatePicker/index.js | 2 +- 26 files changed, 26 insertions(+), 26 deletions(-) diff --git a/backend/src/controllers/ReportController.ts b/backend/src/controllers/ReportController.ts index a731ecf..588337f 100644 --- a/backend/src/controllers/ReportController.ts +++ b/backend/src/controllers/ReportController.ts @@ -12,7 +12,7 @@ import UserOnlineTime from "../models/UserOnlineTime"; import { Op, Sequelize, literal } from "sequelize"; import format from 'date-fns/format'; -import ptBR from 'date-fns/locale/pt-BR'; +import ptBR from 'date-fns/locale/es'; import { splitDateTime } from "../helpers/SplitDateTime"; import ListUserOnlineOffline from "../services/UserServices/ListUsersOnlineOfflineService"; import ListUserParamiterService from "../services/UserServices/ListUserParamiterService"; diff --git a/backend/src/controllers/TicketController.ts b/backend/src/controllers/TicketController.ts index f19751d..549d45e 100644 --- a/backend/src/controllers/TicketController.ts +++ b/backend/src/controllers/TicketController.ts @@ -15,7 +15,7 @@ import ListSchedulingNotifyContactService from "../services/SchedulingNotifyServ import { isScheduling } from "../helpers/CheckSchedulingReminderNotify" -import ptBR from 'date-fns/locale/pt-BR'; +import ptBR from 'date-fns/locale/es'; import { splitDateTime } from "../helpers/SplitDateTime"; import format from 'date-fns/format'; diff --git a/backend/src/helpers/AutoCloseTickets.ts b/backend/src/helpers/AutoCloseTickets.ts index d2fc937..d98233e 100644 --- a/backend/src/helpers/AutoCloseTickets.ts +++ b/backend/src/helpers/AutoCloseTickets.ts @@ -10,7 +10,7 @@ import { subMinutes } from "date-fns"; -import ptBR from "date-fns/locale/pt-BR"; +import ptBR from "date-fns/locale/es"; import { splitDateTime } from "./SplitDateTime"; const fsPromises = require("fs/promises"); diff --git a/backend/src/helpers/AutoRestore.ts b/backend/src/helpers/AutoRestore.ts index 1eaf583..7deb18c 100644 --- a/backend/src/helpers/AutoRestore.ts +++ b/backend/src/helpers/AutoRestore.ts @@ -9,7 +9,7 @@ import { getIO } from "../libs/socket"; import path from "path"; import { splitDateTime } from "./SplitDateTime"; import { format } from "date-fns"; -import ptBR from 'date-fns/locale/pt-BR'; +import ptBR from 'date-fns/locale/es'; import { number } from "yargs"; const autoRestore = async (whatsappId: string | number, started_action_by: string = '') => { diff --git a/backend/src/helpers/InternetConnection.ts b/backend/src/helpers/InternetConnection.ts index 3bfb0a9..2d3ae24 100644 --- a/backend/src/helpers/InternetConnection.ts +++ b/backend/src/helpers/InternetConnection.ts @@ -8,7 +8,7 @@ import ShowWhatsAppService from "../services/WhatsappService/ShowWhatsAppService import { Client } from "whatsapp-web.js"; import { splitDateTime } from "../helpers/SplitDateTime"; import { format } from "date-fns"; -import ptBR from 'date-fns/locale/pt-BR'; +import ptBR from 'date-fns/locale/es'; import dir from 'path'; import { getIO } from "../libs/socket"; diff --git a/backend/src/helpers/OnlineReporEmiterInfoByUser.ts b/backend/src/helpers/OnlineReporEmiterInfoByUser.ts index f68a5e0..5fdd8a1 100644 --- a/backend/src/helpers/OnlineReporEmiterInfoByUser.ts +++ b/backend/src/helpers/OnlineReporEmiterInfoByUser.ts @@ -1,4 +1,4 @@ -import ptBR from 'date-fns/locale/pt-BR'; +import ptBR from 'date-fns/locale/es'; import { splitDateTime } from "../helpers/SplitDateTime"; import format from 'date-fns/format'; import ShowUserServiceReport from '../services/UserServices/ShowUserServiceReport'; diff --git a/backend/src/helpers/SchedulingNotifyCache.ts b/backend/src/helpers/SchedulingNotifyCache.ts index f820dfd..0031f63 100644 --- a/backend/src/helpers/SchedulingNotifyCache.ts +++ b/backend/src/helpers/SchedulingNotifyCache.ts @@ -9,7 +9,7 @@ import { redisConn } from './TicketCache' import SchedulingNotify from '../models/SchedulingNotify' import { format } from "date-fns"; -import ptBR from 'date-fns/locale/pt-BR'; +import ptBR from 'date-fns/locale/es'; import { escapeCharCache } from './ContactsCache' diff --git a/backend/src/helpers/SetTicketMessagesAsRead.ts b/backend/src/helpers/SetTicketMessagesAsRead.ts index a14d97c..80905ff 100644 --- a/backend/src/helpers/SetTicketMessagesAsRead.ts +++ b/backend/src/helpers/SetTicketMessagesAsRead.ts @@ -11,7 +11,7 @@ import { Session } from "@sentry/types"; import { splitDateTime } from "./SplitDateTime"; import { format } from "date-fns"; -import ptBR from 'date-fns/locale/pt-BR'; +import ptBR from 'date-fns/locale/es'; import ListWhatsAppsNumber from "../services/WhatsappService/ListWhatsAppsNumber"; const SetTicketMessagesAsRead = async (ticket: Ticket): Promise => { diff --git a/backend/src/helpers/TicketConfig.ts b/backend/src/helpers/TicketConfig.ts index 69826a3..7ac622e 100644 --- a/backend/src/helpers/TicketConfig.ts +++ b/backend/src/helpers/TicketConfig.ts @@ -11,7 +11,7 @@ import { isSunday, parseISO } from "date-fns"; -import ptBR from "date-fns/locale/pt-BR"; +import ptBR from "date-fns/locale/es"; const isHoliday = async () => { let obj = { set: false, msg: "" }; diff --git a/backend/src/helpers/WhoIsOnlineMonitor.ts b/backend/src/helpers/WhoIsOnlineMonitor.ts index 3296df5..b9bdaa2 100644 --- a/backend/src/helpers/WhoIsOnlineMonitor.ts +++ b/backend/src/helpers/WhoIsOnlineMonitor.ts @@ -8,7 +8,7 @@ import ListUserParamiterService from "../services/UserServices/ListUserParamiter import createOrUpdateOnlineUserService from "../services/UserServices/CreateOrUpdateOnlineUserService"; import { splitDateTime } from "../helpers/SplitDateTime"; import format from 'date-fns/format'; -import ptBR from 'date-fns/locale/pt-BR'; +import ptBR from 'date-fns/locale/es'; import ListUserOnlineOffline from "../services/UserServices/ListUsersOnlineOfflineService"; import { check } from "prettier"; import { addHours, addMinutes, addSeconds, intervalToDuration, add } from "date-fns"; diff --git a/backend/src/libs/socket.ts b/backend/src/libs/socket.ts index 24c79c6..7f0962c 100644 --- a/backend/src/libs/socket.ts +++ b/backend/src/libs/socket.ts @@ -13,7 +13,7 @@ let io: SocketIO; import createOrUpdateOnlineUserService from "../services/UserServices/CreateOrUpdateOnlineUserService"; import { splitDateTime } from "../helpers/SplitDateTime"; import format from 'date-fns/format'; -import ptBR from 'date-fns/locale/pt-BR'; +import ptBR from 'date-fns/locale/es'; import ListUserOnlineOffline from "../services/UserServices/ListUsersOnlineOfflineService"; import { handleMessage, handleMsgAck } from "../services/WbotServices/wbotMessageListener"; import { join } from "path"; diff --git a/backend/src/services/SLM/FindOrCreateQueryItemService.ts b/backend/src/services/SLM/FindOrCreateQueryItemService.ts index e22c0f0..b42220e 100644 --- a/backend/src/services/SLM/FindOrCreateQueryItemService.ts +++ b/backend/src/services/SLM/FindOrCreateQueryItemService.ts @@ -9,7 +9,7 @@ import { getIO } from "../../libs/socket"; import ShowUserServiceReport from "../UserServices/ShowUserServiceReport"; import format from 'date-fns/format'; -import ptBR from 'date-fns/locale/pt-BR'; +import ptBR from 'date-fns/locale/es'; import { splitDateTime } from "../../helpers/SplitDateTime"; import TicketEmiterSumOpenClosedByUser from "../../helpers/OnlineReporEmiterInfoByUser"; diff --git a/backend/src/services/TicketServices/CountTicketService.ts b/backend/src/services/TicketServices/CountTicketService.ts index 2cdde93..7b872cb 100644 --- a/backend/src/services/TicketServices/CountTicketService.ts +++ b/backend/src/services/TicketServices/CountTicketService.ts @@ -4,7 +4,7 @@ import { Op, where } from "sequelize"; import { Sequelize } from "sequelize"; import { format } from "date-fns"; -import ptBR from 'date-fns/locale/pt-BR'; +import ptBR from 'date-fns/locale/es'; import { splitDateTime } from "../../helpers/SplitDateTime"; const dateToday = splitDateTime(new Date(format(new Date(), 'yyyy-MM-dd HH:mm:ss', { locale: ptBR }))) diff --git a/backend/src/services/TicketServices/CreateTicketService.ts b/backend/src/services/TicketServices/CreateTicketService.ts index 358346b..e200878 100644 --- a/backend/src/services/TicketServices/CreateTicketService.ts +++ b/backend/src/services/TicketServices/CreateTicketService.ts @@ -8,7 +8,7 @@ import { getIO } from "../../libs/socket"; import ShowUserServiceReport from "../UserServices/ShowUserServiceReport"; import format from "date-fns/format"; -import ptBR from "date-fns/locale/pt-BR"; +import ptBR from "date-fns/locale/es"; import { splitDateTime } from "../../helpers/SplitDateTime"; import TicketEmiterSumOpenClosedByUser from "../../helpers/OnlineReporEmiterInfoByUser"; diff --git a/backend/src/services/TicketServices/ListTicketServiceCache.ts b/backend/src/services/TicketServices/ListTicketServiceCache.ts index 7e51ed2..e294eb1 100644 --- a/backend/src/services/TicketServices/ListTicketServiceCache.ts +++ b/backend/src/services/TicketServices/ListTicketServiceCache.ts @@ -4,7 +4,7 @@ import { Op, where } from "sequelize"; import { Sequelize } from "sequelize"; import { format } from "date-fns"; -import ptBR from 'date-fns/locale/pt-BR'; +import ptBR from 'date-fns/locale/es'; import { splitDateTime } from "../../helpers/SplitDateTime"; import Contact from "../../models/Contact"; diff --git a/backend/src/services/TicketServices/ListTicketTimeLife.ts b/backend/src/services/TicketServices/ListTicketTimeLife.ts index 2d40a1e..9208e63 100644 --- a/backend/src/services/TicketServices/ListTicketTimeLife.ts +++ b/backend/src/services/TicketServices/ListTicketTimeLife.ts @@ -6,7 +6,7 @@ const { QueryTypes } = require("sequelize"); import { splitDateTime } from "../../helpers/SplitDateTime"; import format from "date-fns/format"; -import ptBR from "date-fns/locale/pt-BR"; +import ptBR from "date-fns/locale/es"; import BotIsOnQueue from "../../helpers/BotIsOnQueue"; interface Request { diff --git a/backend/src/services/TicketServices/ListTicketsService.ts b/backend/src/services/TicketServices/ListTicketsService.ts index 76c655b..99f63e2 100644 --- a/backend/src/services/TicketServices/ListTicketsService.ts +++ b/backend/src/services/TicketServices/ListTicketsService.ts @@ -1,6 +1,6 @@ import { Op, fn, where, col, Filterable, Includeable } from "sequelize"; import { startOfDay, endOfDay, parseISO, format } from "date-fns"; -import ptBR from 'date-fns/locale/pt-BR'; +import ptBR from 'date-fns/locale/es'; import Ticket from "../../models/Ticket"; import Contact from "../../models/Contact"; diff --git a/backend/src/services/UserServices/CreateOrUpdateOnlineUserService.ts b/backend/src/services/UserServices/CreateOrUpdateOnlineUserService.ts index 34d2148..6c9224d 100644 --- a/backend/src/services/UserServices/CreateOrUpdateOnlineUserService.ts +++ b/backend/src/services/UserServices/CreateOrUpdateOnlineUserService.ts @@ -4,7 +4,7 @@ import { splitDateTime } from "../../helpers/SplitDateTime"; import { Op, Sequelize } from "sequelize"; import { addHours, addMinutes, addSeconds, intervalToDuration, add } from "date-fns"; import format from 'date-fns/format'; -import ptBR from 'date-fns/locale/pt-BR'; +import ptBR from 'date-fns/locale/es'; import { stat } from "fs"; import { getIO } from "../../libs/socket"; diff --git a/backend/src/services/WbotServices/StartWhatsAppSession.ts b/backend/src/services/WbotServices/StartWhatsAppSession.ts index 716725f..62c4c4c 100644 --- a/backend/src/services/WbotServices/StartWhatsAppSession.ts +++ b/backend/src/services/WbotServices/StartWhatsAppSession.ts @@ -17,7 +17,7 @@ import { creationTime } from "../../helpers/CreationTime"; import { splitDateTime } from "../../helpers/SplitDateTime"; import { format } from "date-fns"; -import ptBR from 'date-fns/locale/pt-BR'; +import ptBR from 'date-fns/locale/es'; import path from "path"; const fs = require('fs') diff --git a/backend/src/services/WbotServices/wbotMessageListener.ts b/backend/src/services/WbotServices/wbotMessageListener.ts index dfcad00..1873059 100644 --- a/backend/src/services/WbotServices/wbotMessageListener.ts +++ b/backend/src/services/WbotServices/wbotMessageListener.ts @@ -22,7 +22,7 @@ import { isSunday, parseISO } from "date-fns"; -import ptBR from "date-fns/locale/pt-BR"; +import ptBR from "date-fns/locale/es"; import { utcToZonedTime, zonedTimeToUtc } from "date-fns-tz"; diff --git a/backend/src/services/WbotServices/wbotMonitor.ts b/backend/src/services/WbotServices/wbotMonitor.ts index c7216c6..588c14a 100644 --- a/backend/src/services/WbotServices/wbotMonitor.ts +++ b/backend/src/services/WbotServices/wbotMonitor.ts @@ -22,7 +22,7 @@ import { creationTime } from "../../helpers/CreationTime"; import { splitDateTime } from "../../helpers/SplitDateTime"; import { format } from "date-fns"; -import ptBR from 'date-fns/locale/pt-BR'; +import ptBR from 'date-fns/locale/es'; import path from "path"; import { restoreMonit } from "../../helpers/RestoreMonit"; const fs = require('fs') diff --git a/frontend/src/components/ChatEnd/TimerPickerSelect/index.js b/frontend/src/components/ChatEnd/TimerPickerSelect/index.js index b49ccf7..efaba98 100644 --- a/frontend/src/components/ChatEnd/TimerPickerSelect/index.js +++ b/frontend/src/components/ChatEnd/TimerPickerSelect/index.js @@ -44,7 +44,7 @@ import { } from '@material-ui/pickers'; -import ptBrLocale from "date-fns/locale/pt-BR"; +import ptBrLocale from "date-fns/locale/es"; const ResponsiveTimePickers = (props) => { diff --git a/frontend/src/components/ConfigModal/index.js b/frontend/src/components/ConfigModal/index.js index c221455..a8e58f9 100644 --- a/frontend/src/components/ConfigModal/index.js +++ b/frontend/src/components/ConfigModal/index.js @@ -10,7 +10,7 @@ import { TimePicker, DatePicker } from 'formik-material-ui-pickers' import DateFnsUtils from '@date-io/date-fns' -import ptBrLocale from "date-fns/locale/pt-BR" +import ptBrLocale from "date-fns/locale/es" diff --git a/frontend/src/components/ModalUpdateScheduleReminder/DatePicker2/index.js b/frontend/src/components/ModalUpdateScheduleReminder/DatePicker2/index.js index a4e953e..ab9d9fd 100644 --- a/frontend/src/components/ModalUpdateScheduleReminder/DatePicker2/index.js +++ b/frontend/src/components/ModalUpdateScheduleReminder/DatePicker2/index.js @@ -12,7 +12,7 @@ import { -import ptBrLocale from "date-fns/locale/pt-BR"; +import ptBrLocale from "date-fns/locale/es"; function formatDateDatePicker(data){ diff --git a/frontend/src/components/ModalUpdateScheduleReminder/TimerPickerSelect2/index.js b/frontend/src/components/ModalUpdateScheduleReminder/TimerPickerSelect2/index.js index f02731d..bc99537 100644 --- a/frontend/src/components/ModalUpdateScheduleReminder/TimerPickerSelect2/index.js +++ b/frontend/src/components/ModalUpdateScheduleReminder/TimerPickerSelect2/index.js @@ -44,7 +44,7 @@ import { } from '@material-ui/pickers'; -import ptBrLocale from "date-fns/locale/pt-BR"; +import ptBrLocale from "date-fns/locale/es"; function formatDate(strDate){ diff --git a/frontend/src/components/Report/DatePicker/index.js b/frontend/src/components/Report/DatePicker/index.js index 64e9b80..74c4b9a 100644 --- a/frontend/src/components/Report/DatePicker/index.js +++ b/frontend/src/components/Report/DatePicker/index.js @@ -14,7 +14,7 @@ import { // import { i18n } from "../../../translate/i18n"; -import ptBrLocale from "date-fns/locale/pt-BR"; +import ptBrLocale from "date-fns/locale/es"; function formatDateDatePicker(data){