diff --git a/backend/src/controllers/ContactController.ts b/backend/src/controllers/ContactController.ts index 4bd8899a..ab5841f6 100644 --- a/backend/src/controllers/ContactController.ts +++ b/backend/src/controllers/ContactController.ts @@ -7,6 +7,7 @@ import CreateContactService from "../services/ContactServices/CreateContactServi import ShowContactService from "../services/ContactServices/ShowContactService"; import UpdateContactService from "../services/ContactServices/UpdateContactService"; import DeleteContactService from "../services/ContactServices/DeleteContactService"; +import DeleteAllContactService from "../services/ContactServices/DeleteAllContactService"; import CheckContactNumber from "../services/WbotServices/CheckNumber" import CheckIsValidContact from "../services/WbotServices/CheckIsValidContact"; @@ -111,9 +112,7 @@ export const store = async (req: Request, res: Response): Promise => { export const show = async (req: Request, res: Response): Promise => { const { contactId } = req.params; - const contact = await ShowContactService(contactId); - return res.status(200).json(contact); }; @@ -168,3 +167,14 @@ export const remove = async ( return res.status(200).json({ message: "Contact deleted" }); }; + +export const removeAll = async ( + req: Request, + res: Response +): Promise => { + const { contactId } = req.params; + + await DeleteAllContactService(); + + return res.send(); +}; \ No newline at end of file diff --git a/backend/src/routes/contactRoutes.ts b/backend/src/routes/contactRoutes.ts index 1e8ff2b4..c12e263e 100644 --- a/backend/src/routes/contactRoutes.ts +++ b/backend/src/routes/contactRoutes.ts @@ -6,22 +6,13 @@ import * as ImportPhoneContactsController from "../controllers/ImportPhoneContac const contactRoutes = express.Router(); -contactRoutes.post( - "/contacts/import", - isAuth, - ImportPhoneContactsController.store -); - +contactRoutes.post("/contacts/import", isAuth, ImportPhoneContactsController.store); contactRoutes.get("/contacts", isAuth, ContactController.index); - contactRoutes.get("/contacts/:contactId", isAuth, ContactController.show); - contactRoutes.post("/contacts", isAuth, ContactController.store); - contactRoutes.post("/contact", isAuth, ContactController.getContact); - contactRoutes.put("/contacts/:contactId", isAuth, ContactController.update); - contactRoutes.delete("/contacts/:contactId", isAuth, ContactController.remove); +contactRoutes.delete("/contacts", isAuth, ContactController.removeAll); export default contactRoutes; diff --git a/backend/src/services/ContactServices/DeleteAllContactService.ts b/backend/src/services/ContactServices/DeleteAllContactService.ts new file mode 100644 index 00000000..dc57c36d --- /dev/null +++ b/backend/src/services/ContactServices/DeleteAllContactService.ts @@ -0,0 +1,14 @@ +import Contact from "../../models/Contact"; +import AppError from "../../errors/AppError"; + +const DeleteAllContactService = async (): Promise => { + await Contact.findAll(); + + if (!Contact) { + throw new AppError("ERR_NO_CONTACT_FOUND", 404); + } + + await Contact.destroy({where: {} }) +}; + +export default DeleteAllContactService; \ No newline at end of file diff --git a/frontend/package.json b/frontend/package.json index 3b5e100d..d616c941 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -2,7 +2,7 @@ "name": "frontend", "version": "0.1.0", "system": { - "version": "1.0.8", + "version": "1.1.0", "name": "Press Ticket", "url": "https://pressticket.com.br" }, @@ -25,6 +25,7 @@ "qrcode.react": "^1.0.0", "react": "^16.13.1", "react-color": "^2.19.3", + "react-csv": "^2.2.2", "react-dom": "^16.13.1", "react-modal-image": "^2.5.0", "react-router-dom": "^5.2.0", diff --git a/frontend/src/pages/Contacts/index.js b/frontend/src/pages/Contacts/index.js index 110a3b90..28effd53 100644 --- a/frontend/src/pages/Contacts/index.js +++ b/frontend/src/pages/Contacts/index.js @@ -2,38 +2,50 @@ import React, { useState, useEffect, useReducer, useContext } from "react"; import openSocket from "../../services/socket-io"; import { toast } from "react-toastify"; import { useHistory } from "react-router-dom"; +import { CSVLink } from "react-csv"; import { makeStyles } from "@material-ui/core/styles"; -import Table from "@material-ui/core/Table"; -import TableBody from "@material-ui/core/TableBody"; -import TableCell from "@material-ui/core/TableCell"; -import TableHead from "@material-ui/core/TableHead"; -import TableRow from "@material-ui/core/TableRow"; -import Paper from "@material-ui/core/Paper"; -import Button from "@material-ui/core/Button"; -import Avatar from "@material-ui/core/Avatar"; -import WhatsAppIcon from "@material-ui/icons/WhatsApp"; -import SearchIcon from "@material-ui/icons/Search"; -import TextField from "@material-ui/core/TextField"; -import InputAdornment from "@material-ui/core/InputAdornment"; - -import IconButton from "@material-ui/core/IconButton"; -import DeleteOutlineIcon from "@material-ui/icons/DeleteOutline"; -import EditIcon from "@material-ui/icons/Edit"; + +import { + Avatar, + Button, + IconButton, + InputAdornment, + Paper, + Table, + TableBody, + TableCell, + TableHead, + TableRow, + TextField, + Tooltip +} from "@material-ui/core"; + +import { + AddCircleOutline, + DeleteForever, + DeleteOutline, + ImportContacts, + Archive, + Edit, + Search, + WhatsApp +} from "@material-ui/icons"; import api from "../../services/api"; +import { i18n } from "../../translate/i18n"; + import TableRowSkeleton from "../../components/TableRowSkeleton"; import ContactModal from "../../components/ContactModal"; import ConfirmationModal from "../../components/ConfirmationModal/"; - -import { i18n } from "../../translate/i18n"; import MainHeader from "../../components/MainHeader"; import Title from "../../components/Title"; import MainHeaderButtonsWrapper from "../../components/MainHeaderButtonsWrapper"; import MainContainer from "../../components/MainContainer"; +import { Can } from "../../components/Can"; + import toastError from "../../errors/toastError"; import { AuthContext } from "../../context/Auth/AuthContext"; -import { Can } from "../../components/Can"; const reducer = (state, action) => { if (action.type === "LOAD_CONTACTS") { @@ -86,6 +98,14 @@ const useStyles = makeStyles((theme) => ({ overflowY: "scroll", ...theme.scrollbarStyles, }, + csvbtn: { + textDecoration: 'none' + }, + avatar: { + width: "50px", + height: "50px", + borderRadius:"25%" + } })); const Contacts = () => { @@ -101,6 +121,7 @@ const Contacts = () => { const [selectedContactId, setSelectedContactId] = useState(null); const [contactModalOpen, setContactModalOpen] = useState(false); const [deletingContact, setDeletingContact] = useState(null); + const [deletingAllContact, setDeletingAllContact] = useState(null); const [confirmOpen, setConfirmOpen] = useState(false); const [hasMore, setHasMore] = useState(false); @@ -194,6 +215,19 @@ const Contacts = () => { setPageNumber(1); }; + const handleDeleteAllContact = async () => { + try { + await api.delete("/contacts"); + toast.success(i18n.t("contacts.toasts.deletedAll")); + history.go(0); + } catch (err) { + toastError(err); + } + setDeletingAllContact(null); + setSearchParam(""); + setPageNumber(); + }; + const handleimportContact = async () => { try { await api.post("/contacts/import"); @@ -225,25 +259,26 @@ const Contacts = () => { > - deletingContact - ? handleDeleteContact(deletingContact.id) - : handleimportContact() + deletingContact ? handleDeleteContact(deletingContact.id) + : deletingAllContact ? handleDeleteAllContact(deletingAllContact) + : handleimportContact() } > - {deletingContact - ? `${i18n.t("contacts.confirmationModal.deleteMessage")}` - : `${i18n.t("contacts.confirmationModal.importMessage")}`} + { + deletingContact ? `${i18n.t("contacts.confirmationModal.deleteMessage")}` + : deletingAllContact ? `${i18n.t("contacts.confirmationModal.deleteAllMessage")}` + : `${i18n.t("contacts.confirmationModal.importMessage")}` + } - {i18n.t("contacts.title")} + {i18n.t("contacts.title")} ({contacts.length}) { InputProps={{ startAdornment: ( - + ), }} @@ -263,23 +298,66 @@ const Contacts = () => { perform="drawer-admin-items:view" yes={() => ( <> - + + + + + )} + /> + + + + + ({ + name: contact.name, + number: contact.number, + email: contact.email + })) + }> + + + + ( + <> + + + )} /> - { - {i18n.t("contacts.table.name")} + + {i18n.t("contacts.table.name")} + {i18n.t("contacts.table.whatsapp")} @@ -308,7 +388,7 @@ const Contacts = () => { {contacts.map((contact) => ( - {} + {} {contact.name} {contact.number} @@ -318,13 +398,13 @@ const Contacts = () => { size="small" onClick={() => handleSaveTicket(contact.id)} > - + hadleEditContact(contact.id)} > - + { setDeletingContact(contact); }} > - + )} /> ))} - {loading && } + {loading && } diff --git a/frontend/src/translate/languages/en.js b/frontend/src/translate/languages/en.js index 0d214582..9436264f 100644 --- a/frontend/src/translate/languages/en.js +++ b/frontend/src/translate/languages/en.js @@ -2,10 +2,10 @@ const messages = { en: { translations: { signup: { - title: "Sign up", + title: "Register", toasts: { - success: "User created successfully! Please login!", - fail: "Error creating user. Check the reported data.", + success: "User created successfully! Please login!!!.", + fail: "Error creating user. Please check the entered data.", }, form: { name: "Name", @@ -14,86 +14,84 @@ const messages = { }, buttons: { submit: "Register", - login: "Already have an account? Log in!", + login: "Already have an account? Login!", }, }, - login: { - title: "Login", + Login: { + title: "Login now", form: { - email: "Email", - password: "Password", + email: "Enter email", + password: "Enter your password", }, buttons: { - submit: "Enter", + submit: "Sign in", register: "Don't have an account? Register!", }, }, auth: { toasts: { - success: "Login successfully!", + success: "Login was successful!", }, }, dashboard: { charts: { perDay: { - title: "Tickets today: ", + title: "Today's Tickets: ", }, }, messages: { inAttendance: { - title: "In Service" + title: "In Attendance" }, waiting: { title: "Waiting" }, closed: { - title: "Closed" + title: "Solved" } } }, connections: { title: "Connections", toasts: { - deleted: "WhatsApp connection deleted sucessfully!", + deleted: "WhatsApp connection deleted successfully!", }, confirmationModal: { deleteTitle: "Delete", - deleteMessage: "Are you sure? It cannot be reverted.", + deleteMessage: "Are you sure? This action cannot be reversed.", disconnectTitle: "Disconnect", - disconnectMessage: "Are you sure? You'll need to read QR Code again.", + disconnectMessage: "Are you sure? You will need to scan the QR Code again.", }, buttons: { add: "Add WhatsApp", - disconnect: "Disconnect", - tryAgain: "Try Again", + disconnect: "disconnect", + tryAgain: "Try again", qrcode: "QR CODE", newQr: "New QR CODE", - connecting: "Connectiing", + connecting: "Connecting", }, toolTips: { disconnected: { - title: "Failed to start WhatsApp session", - content: - "Make sure your cell phone is connected to the internet and try again, or request a new QR Code", + title: "Failed to sign in to WhatsApp", + content: "Make sure your cell phone is connected to the internet and try again, or request a new QR Code", }, qrcode: { - title: "Waiting for QR Code read", - content: - "Click on 'QR CODE' button and read the QR Code with your cell phone to start session", + title: "Waiting to read QR Code", + content: "Click the 'QR CODE' button and scan the QR Code with your cell phone to log in", }, connected: { - title: "Connection established", + title: "Connection established!", }, timeout: { - title: "Connection with cell phone has been lost", - content: - "Make sure your cell phone is connected to the internet and WhatsApp is open, or click on 'Disconnect' button to get a new QRcode", + title: "Connection to cell phone was lost", + content: "Make sure your mobile is connected to the internet and WhatsApp is open, or click the 'Disconnect' button to get a new QR Code", }, }, table: { + id: "Instance ID", name: "Name", status: "Status", - lastUpdate: "Last Update", + lastUpdate: "Last update", default: "Default", actions: "Actions", session: "Session", @@ -107,6 +105,7 @@ const messages = { form: { name: "Name", default: "Default", + farewellMessage: "Farewell Message" }, buttons: { okAdd: "Add", @@ -116,24 +115,28 @@ const messages = { success: "WhatsApp saved successfully.", }, qrCode: { - message: "Read QrCode to start the session", + message: "Read the QRCode to start the session", }, contacts: { title: "Contacts", toasts: { - deleted: "Contact deleted sucessfully!", + deleted: "Contact deleted successfully!", + deletedAll: "All contacts deleted successfully!", }, - searchPlaceholder: "Search ...", + searchPlaceholder: "Search...", confirmationModal: { deleteTitle: "Delete", - importTitlte: "Import contacts", - deleteMessage: - "Are you sure you want to delete this contact? All related tickets will be lost.", - importMessage: "Do you want to import all contacts from the phone?", + deleteAllTitle: "Delete All", + importTitle: "Import Contacts", + deleteMessage: "Are you sure you want to delete this contact? All related tickets will be lost.", + deleteAllMessage: "Are you sure you want to delete all contacts? All related tickets will be lost.", + importMessage: "Do you want to import all phone contacts?", }, buttons: { import: "Import Contacts", add: "Add Contact", + export: "Export Contacts", + delete: "Delete All Contacts" }, table: { name: "Name", @@ -145,13 +148,13 @@ const messages = { contactModal: { title: { add: "Add contact", - edit: "Edit contact", + edit: "Edit Contact", }, form: { - mainInfo: "Contact details", - extraInfo: "Additional information", + mainInfo: "Contact Data", + extraInfo: "Additional Information", name: "Name", - number: "Whatsapp number", + number: "WhatsApp number", email: "Email", extraName: "Field name", extraValue: "Value", @@ -167,7 +170,7 @@ const messages = { quickAnswersModal: { title: { add: "Add Quick Reply", - edit: "Edit Quick Answer", + edit: "Edit Quick Reply", }, form: { shortcut: "Shortcut", @@ -182,8 +185,8 @@ const messages = { }, queueModal: { title: { - add: "Add queue", - edit: "Edit queue", + add: "Add Sector", + edit: "Edit Sector", }, notification: { title: "Sector saved successfully!", @@ -193,8 +196,8 @@ const messages = { color: "Color", greetingMessage: "Greeting Message", startWork: "Opening", - endWork: "Close", - absenceMessage: "Absence message", + endWork: "Closing", + absenceMessage: "Absence Message", }, buttons: { okAdd: "Add", @@ -204,15 +207,17 @@ const messages = { }, userModal: { title: { - add: "Add user", - edit: "Edit user", + add: "Add User", + edit: "Edit User", }, form: { name: "Name", email: "Email", password: "Password", profile: "Profile", - whatsapp: "Default Connection", + admin: "Administrator", + whatsapp: "Standard Connection", + user: "User", }, buttons: { okAdd: "Add", @@ -230,7 +235,7 @@ const messages = { }, }, ticketsQueueSelect: { - placeholder: "Queues", + placeholder: "Sectors", }, tickets: { toasts: { @@ -245,7 +250,7 @@ const messages = { search: { title: "Search" }, }, search: { - placeholder: "Search tickets and messages.", + placeholder: "Fetch tickets and messages", }, buttons: { showAll: "All", @@ -253,23 +258,22 @@ const messages = { }, transferTicketModal: { title: "Transfer Ticket", - fieldLabel: "Type to search for users", - fieldQueueLabel: "Transfer to queue", + fieldLabel: "Type to fetch users", fieldConnectionLabel: "Transfer to connection", - fieldQueuePlaceholder: "Please select a queue", - fieldConnectionPlaceholder: "Please select a connection", - noOptions: "No user found with this name", + fieldQueuePlaceholder: "Transfer to Sector", + fieldConnectionPlaceholder: "Select a connection", + noOptions: "No user found with that name", buttons: { ok: "Transfer", cancel: "Cancel", }, }, ticketsList: { - pendingHeader: "Queue", - assignedHeader: "Working on", + pendingHeader: "Waiting", + assignedHeader: "Assigned", noTicketsTitle: "Nothing here!", - connectionTitle: "Connection that is currently being used.", - noTicketsMessage: "No tickets found with this status or search term.", + noTicketsMessage: "No tickets found with this status or search term", + connectionTitle: "Connection currently being used.", items: { queueless: "Without Sector", accept: "Accept", @@ -290,7 +294,7 @@ const messages = { }, newTicketModal: { title: "Create Ticket", - fieldLabel: "Type to search for a contact", + fieldLabel: "Enter to search for contact", add: "Add", buttons: { ok: "Save", @@ -304,11 +308,13 @@ const messages = { tickets: "Tickets", contacts: "Contacts", quickAnswers: "Quick Answers", - queues: "Queues", + queues: "Sectors", administration: "Administration", users: "Users", settings: "Settings", - api: "API usage", + sendMsg: "Sending Messages", + sendMedia: "Sending Media", + api: "API Usage", apidocs: "Documentation", apititle: "API", apikey: "API Key", @@ -325,7 +331,7 @@ const messages = { noTickets: "No notifications.", }, queues: { - title: "Queues", + title: "Sectors", notifications: { queueDeleted: "The sector has been deleted.", }, @@ -335,203 +341,210 @@ const messages = { greeting: "Greeting message", actions: "Actions", startWork: "Opening", - endWork: "Close", - }, - buttons: { - add: "Add queue", - }, - confirmationModal: { - deleteTitle: "Delete", - deleteMessage: - "Are you sure? It cannot be reverted! Tickets in this queue will still exist, but will not have any queues assigned.", - }, - }, - queueSelect: { - inputLabel: "Queues", - }, - quickAnswers: { - title: "Quick Answers", - table: { - shortcut: "Shortcut", - message: "Quick Reply", - actions: "Actions", + endWork: "Closing", }, - buttons: { - add: "Add Quick Reply", - }, - toasts: { - deleted: "Quick Reply deleted successfully.", - }, - searchPlaceholder: "Search...", - confirmationModal: { - deleteTitle: "Are you sure you want to delete this Quick Reply: ", - deleteMessage: "This action cannot be undone.", - }, - }, - users: { - title: "Users", - table: { - name: "Name", - email: "Email", - profile: "Profile", - whatsapp: "Default Connection", - actions: "Actions", + buttons: { + add: "Add sector", + }, + confirmationModal: { + deleteTitle: "Delete", + deleteMessage: "Are you sure? This action cannot be reversed! Tickets from this sector will still exist, but will no longer have any sectors assigned.", + }, }, - buttons: { - add: "Add user", + queueSelect: { + inputLabel: "Sectors", }, - toasts: { - deleted: "User deleted sucessfully.", + quickAnswers: { + title: "Quick Answers", + table: { + shortcut: "Shortcut", + message: "Quick Reply", + actions: "Actions", + }, + buttons: { + add: "Add Quick Reply", + }, + toasts: { + deleted: "Quick Reply deleted successfully.", + }, + searchPlaceholder: "Search...", + confirmationModal: { + deleteTitle: "Are you sure you want to delete this Quick Reply: ", + deleteMessage: "This action cannot be reversed.", + }, }, - confirmationModal: { - deleteTitle: "Delete", - deleteMessage: - "All user data will be lost. Users' open tickets will be moved to queue.", + users: { + title: "Users", + table: { + name: "Name", + email: "Email", + profile: "Profile", + whatsapp: "Standard Connection", + actions: "Actions", + }, + buttons: { + add: "Add User", + }, + toasts: { + deleted: "User deleted successfully.", + }, + confirmationModal: { + deleteTitle: "Delete", + deleteMessage: "All user data will be lost. Open tickets for this user will be moved to hold.", + }, }, - }, - settings: { - success: "Settings saved successfully.", - title: "Settings", settings: { - userCreation: { - name: "User creation", - options: { - enabled: "Enabled", - disabled: "Disabled", + success: "Settings saved successfully.", + title: "Settings", + settings: { + userCreation: { + name: "User Creation", + note: "Allow user creation", + options: { + enabled: "Enabled", + disabled: "Disabled", + }, + }, + CheckMsgIsGroup: { + name: "Group Messages", + note: "Receive messages from groups", + options: { + enabled: "Enabled", + disabled: "Disabled", + }, + }, + call: { + name: "Accept calls", + note: "If disabled, the customer will receive a message that they do not accept voice/video calls", + options: { + enabled: "Enabled", + disabled: "Disabled", + }, + }, + sideMenu: { + name: "Home Side Menu", + note: "If enabled, the side menu will start closed", + options: { + enabled: "Open", + disabled: "Closed", + }, + }, + closeTicketApi: { + name: "Close Ticket sent API", + note: "Automatically closes ticket when submitted via API", + options: { + enabled: "Enabled", + disabled: "Disabled", + }, + }, + darkMode: { + name: "Enable Dark Mode", + note: "Switch between light mode and dark mode", + options: { + enabled: "Enabled", + disabled: "Disabled", + }, + }, + timeCreateNewTicket: { + name: "Create new ticket after", + note: "Select the time it will take to open a new ticket if the customer contacts you again", + options: { + "10": "10 Seconds", + "30": "30 Seconds", + "60": "1 minute", + "300": "5 minutes", + "1800" : "30 minutes", + "3600" : "1 hour", + "7200" : "2 hours", + "21600" : "6 hours", + "43200" : "12 hours", + "86400" : "24 hours", + "604800" : "7 days", + "1296000" : "15 days", + "2592000" : "30 days", + }, }, }, }, - }, - timeCreateNewTicket: { - name: "Create new ticket after", - note: "Select the time it will take to open a new ticket if the customer contacts you again", - options: { - "10": "10 seconds", - "30": "30 seconds", - "60": "1 minute", - "300": "5 minutes", - "1800": "30 minutes", - "3600": "1 hour", - "7200": "2 hours", - "21600": "6 hours", - "43200": "12 hours", - "86400": "24 hours", - "604800": "7 days", - "1296000": "15 days", - "2592000": "30 days", - }, - }, - CheckMsgIsGroup: { - name: "Ignore Groups Msgs", - options: { - enabled: "Enabled", - disabled: "Disabled", - }, - }, - sideMenu: { - name: "Home Side Menu", - note: "If enabled, the side menu will start closed", - options: { - enabled: "Open", - disabled: "Closed", - }, - }, - closeTicketApi: { - name: "Close Ticket sent API", - note: "Automatically closes ticket when submitted via API", - options: { - enabled: "Enabled", - disabled: "Disabled", + messagesList: { + header: { + assignedTo: "Assignee:", + buttons: { + return: "Return", + resolve: "Solve", + reopen: "Reopen", + accept: "Accept", + }, + }, }, - }, - darkMode: { - name: "Enable Dark Mode", - note: "Switch between light mode and dark mode", - options: { - enabled: "Enabled", - disabled: "Disabled", + messagesInput: { + placeholderOpen: "Enter a message", + placeholderClosed: "Reopen or accept this ticket to send a message.", + signMessage: "Subscribe", }, - }, - messagesList: { - header: { - assignedTo: "Assigned to:", + contactDrawer: { + header: "Contact Data", buttons: { - return: "Return", - resolve: "Resolve", - reopen: "Reopen", - accept: "Accept", + edit: "Edit Contact", }, + extraInfo: "Other information", }, - }, - messagesInput: { - placeholderOpen: "Type a message or press ''/'' to use the registered quick responses", - placeholderClosed: "Reopen or accept this ticket to send a message.", - signMessage: "Sign", - }, - contactDrawer: { - header: "Contact details", - buttons: { - edit: "Edit contact", + ticketOptionsMenu: { + delete: "Delete", + transfer: "Transfer", + confirmationModal: { + title: "Delete contact ticket", + message: "Attention! All messages related to the ticket will be lost.", + }, + buttons: { + delete: "Delete", + cancel: "Cancel", + }, }, - extraInfo: "Other information", - }, - ticketOptionsMenu: { - delete: "Delete", - transfer: "Transfer", confirmationModal: { - title: "Delete ticket #", - titleFrom: "from contact ", - message: "Attention! All ticket's related messages will be lost.", + buttons: { + confirm: "Okay", + cancel: "Cancel", + }, }, - buttons: { + tablegeoOptionsMenu: { delete: "Delete", - cancel: "Cancel", - }, - }, - confirmationModal: { - buttons: { - confirm: "Ok", - cancel: "Cancel", + reply: "Reply", + confirmationModal: { + title: "Delete message?", + message: "This action cannot be reversed.", + }, }, - }, - messageOptionsMenu: { - delete: "Delete", - reply: "Reply", - confirmationModal: { - title: "Delete message?", - message: "This action cannot be reverted.", + backendErrors: { + ERR_NO_OTHER_WHATSAPP: "There must be at least one default WhatsApp.", + ERR_NO_DEF_WAPP_FOUND: "No default WhatsApp found. Check connections page.", + ERR_WAPP_NOT_INITIALIZED: "This WhatsApp session was not initialized. Please check the connections page.", + ERR_WAPP_CHECK_CONTACT: "Could not verify WhatsApp contact. Please check connections page", + ERR_WAPP_INVALID_CONTACT: "This is not a valid Whatsapp number.", + ERR_WAPP_DOWNLOAD_MEDIA: "Unable to download media from WhatsApp. Please check connections page.", + ERR_INVALID_CREDENTIALS: "Authentication error. Please try again.", + ERR_SENDING_WAPP_MSG: "Error sending WhatsApp message. Check connections page.", + ERR_DELETE_WAPP_MSG: "Unable to delete WhatsApp message.", + ERR_OTHER_OPEN_TICKET: "There is already an open ticket for this contact.", + ERR_SESSION_EXPIRED: "Session expired. Please sign in.", + ERR_USER_CREATION_DISABLED: "User creation has been disabled by administrator.", + ERR_NO_PERMISSION: "You do not have permission to access this resource.", + ERR_DUPLICATED_CONTACT: "A contact with this number already exists.", + ERR_NO_SETTING_FOUND: "No settings found with this ID.", + ERR_NO_CONTACT_FOUND: "No contact found with this ID.", + ERR_NO_TICKET_FOUND: "No tickets found with this ID.", + ERR_NO_USER_FOUND: "No user found with this ID.", + ERR_NO_WAPP_FOUND: "No WhatsApp found with this ID.", + ERR_CREATING_MESSAGE: "Error creating message in database.", + ERR_CREATING_TICKET: "Error creating ticket in database.", + ERR_FETCH_WAPP_MSG: "Error fetching message on WhatsApp, it may be too old.", + ERR_QUEUE_COLOR_ALREADY_EXISTS: "This color is already in use, choose another one.", + ERR_WAPP_GREETING_REQUIRED: "The greeting message is required when there is more than one Sector.", + ERR_USER_CREATION_COUNT: "User limit reached, contact support to change.", + ERR_CONNECTION_CREATION_COUNT: "Connection limit reached, contact support to change.", }, }, - backendErrors: { - ERR_NO_OTHER_WHATSAPP: "There must be at lest one default WhatsApp connection.", - ERR_NO_DEF_WAPP_FOUND: "No default WhatsApp found. Check connections page.", - ERR_WAPP_NOT_INITIALIZED: "This WhatsApp session is not initialized. Check connections page.", - ERR_WAPP_CHECK_CONTACT: "Could not check WhatsApp contact. Check connections page.", - ERR_WAPP_INVALID_CONTACT: "This is not a valid whatsapp number.", - ERR_WAPP_DOWNLOAD_MEDIA: "Could not download media from WhatsApp. Check connections page.", - ERR_INVALID_CREDENTIALS: "Authentication error. Please try again.", - ERR_SENDING_WAPP_MSG: "Error sending WhatsApp message. Check connections page.", - ERR_DELETE_WAPP_MSG: "Couldn't delete message from WhatsApp.", - ERR_OTHER_OPEN_TICKET: "There's already an open ticket for this contact.", - ERR_SESSION_EXPIRED: "Session expired. Please login.", - ERR_USER_CREATION_DISABLED: "User creation was disabled by administrator.", - ERR_NO_PERMISSION: "You don't have permission to access this resource.", - ERR_DUPLICATED_CONTACT: "A contact with this number already exists.", - ERR_NO_SETTING_FOUND: "No setting found with this ID.", - ERR_NO_CONTACT_FOUND: "No contact found with this ID.", - ERR_NO_TICKET_FOUND: "No ticket found with this ID.", - ERR_NO_USER_FOUND: "No user found with this ID.", - ERR_NO_WAPP_FOUND: "No WhatsApp found with this ID.", - ERR_CREATING_MESSAGE: "Error while creating message on database.", - ERR_CREATING_TICKET: "Error while creating ticket on database.", - ERR_FETCH_WAPP_MSG: "Error fetching the message in WhtasApp, maybe it is too old.", - ERR_QUEUE_COLOR_ALREADY_EXISTS: "This color is already in use, pick another one.", - ERR_WAPP_GREETING_REQUIRED: "Greeting message is required if there is more than one queue.", - ERR_USER_CREATION_COUNT: "User limit reached, to change please contact support.", - ERR_CONNECTION_CREATION_COUNT: "Connection limit reached, to change contact support.", - }, }, - }, -}; - -export { messages }; \ No newline at end of file + }; + + export { messages }; \ No newline at end of file diff --git a/frontend/src/translate/languages/es.js b/frontend/src/translate/languages/es.js index 8785eb2f..7b574268 100644 --- a/frontend/src/translate/languages/es.js +++ b/frontend/src/translate/languages/es.js @@ -2,146 +2,146 @@ const messages = { es: { translations: { signup: { - title: "Registro", + title: "Registrarse", toasts: { - success: - "¡El usuario ha sido creado satisfactoriamente! ¡Ahora inicia sesión!", - fail: "Error creando el usuario. Verifica la data reportada.", + success: "¡Usuario creado con éxito! ¡Inicia sesión!", + fail: "Error al crear el usuario. Verifique los datos ingresados.", }, form: { name: "Nombre", - email: "Correo Electrónico", + email: "Correo electrónico", password: "Contraseña", }, buttons: { - submit: "Regístrate", + submit: "Registrarse", login: "¿Ya tienes una cuenta? ¡Inicia sesión!", }, }, - login: { - title: "Inicio de Sesión", + Login: { + title: "Iniciar sesión ahora", form: { - email: "Correo Electrónico", - password: "Contraseña", + email: "Ingrese correo electrónico", + password: "Ingrese su contraseña", }, buttons: { - submit: "Ingresa", - register: "¿No tienes cuenta? ¡Regístrate!", + submit: "Iniciar sesión", + register: "¿No tienes una cuenta? ¡Regístrate!", }, }, auth: { toasts: { - success: "¡Inicio de sesión exitoso!", + success: "¡El inicio de sesión fue exitoso!", }, }, dashboard: { charts: { perDay: { - title: "Tickets hoy: ", + title: "Boletos de hoy:", }, }, messages: { inAttendance: { - title: "En servicio" + title: "En asistencia" }, waiting: { title: "Esperando" }, closed: { - title: "Finalizado" + title: "Resuelto" } } }, connections: { title: "Conexiones", toasts: { - deleted: - "¡La conexión de WhatsApp ha sido borrada satisfactoriamente!", + deleted: "¡La conexión de WhatsApp se eliminó correctamente!", }, confirmationModal: { - deleteTitle: "Borrar", - deleteMessage: "¿Estás seguro? Este proceso no puede ser revertido.", + deleteTitle: "Eliminar", + deleteMessage: "¿Estás seguro? Esta acción no se puede revertir.", disconnectTitle: "Desconectar", - disconnectMessage: "Estás seguro? Deberá volver a leer el código QR", + disconnectMessage: "¿Estás seguro? Deberás escanear el código QR nuevamente.", }, buttons: { - add: "Agrega WhatsApp", - disconnect: "Desconectar", - tryAgain: "Inténtalo de nuevo", - qrcode: "QR CODE", - newQr: "Nuevo QR CODE", + add: "Agregar WhatsApp", + disconnect: "desconectar", + tryAgain: "Intentar de nuevo", + qrcode: "CÓDIGO QR", + newQr: "Nuevo CÓDIGO QR", connecting: "Conectando", }, toolTips: { disconnected: { - title: "No se pudo iniciar la sesión de WhatsApp", - content: - "Asegúrese de que su teléfono celular esté conectado a Internet y vuelva a intentarlo o solicite un nuevo código QR", + title: "Error al iniciar sesión en WhatsApp", + content: "Asegúrese de que su teléfono celular esté conectado a Internet y vuelva a intentarlo, o solicite un nuevo Código QR", }, qrcode: { - title: "Esperando la lectura del código QR", - content: - "Haga clic en el botón 'CÓDIGO QR' y lea el Código QR con su teléfono celular para iniciar la sesión", + title: "Esperando para leer el código QR", + content: "Haga clic en el botón 'CÓDIGO QR' y escanee el código QR con su teléfono celular para iniciar sesión.", }, connected: { - title: "Conexión establecida", + title: "¡Conexión establecida!", }, timeout: { - title: "Se perdió la conexión con el teléfono celular", - content: - "Asegúrese de que su teléfono celular esté conectado a Internet y que WhatsApp esté abierto, o haga clic en el botón 'Desconectar' para obtener un nuevo código QR", + title: "Se perdió la conexión con el celular", + content: "Asegúrese de que su móvil esté conectado a Internet y WhatsApp esté abierto, o haga clic en el botón 'Desconectar' para obtener un nuevo código QR", }, }, table: { + id: "ID de instancia", name: "Nombre", status: "Estado", - lastUpdate: "Última Actualización", - default: "Por Defecto", + lastUpdate: "Última actualización", + default: "Predeterminado", actions: "Acciones", session: "Sesión", }, }, whatsappModal: { title: { - add: "Agrega WhatsApp", - edit: "Edita WhatsApp", + add: "Agregar WhatsApp", + edit: "Editar WhatsApp", }, form: { name: "Nombre", - default: "Por Defecto", + default: "Predeterminado", + farewellMessage: "Mensaje de despedida" }, buttons: { okAdd: "Agregar", okEdit: "Guardar", cancel: "Cancelar", }, - success: "WhatsApp guardado satisfactoriamente.", + success: "WhatsApp se guardó correctamente.", }, qrCode: { - message: "Lée el código QR para empezar la sesión.", + message: "Lee el QRCode para iniciar sesión", }, contacts: { title: "Contactos", toasts: { - deleted: "¡Contacto borrado satisfactoriamente!", + deleted: "¡Contacto eliminado con éxito!", + deletedAll: "¡Todos los contactos se eliminaron con éxito!", }, searchPlaceholder: "Buscar...", confirmationModal: { - deleteTitle: "Borrar", - importTitlte: "Importar contactos", - deleteMessage: - "¿Estás seguro que deseas borrar este contacto? Todos los tickets relacionados se perderán.", - importMessage: - "¿Quieres importar todos los contactos desde tu teléfono?", + deleteTitle: "Eliminar", + deleteAllTitle: "Borrar todo", + importTitle: "Importar contactos", + deleteMessage: "¿Está seguro de que desea eliminar este contacto? Se perderán todos los tickets relacionados.", + deleteAllMessage: "¿Está seguro de que desea eliminar todos los contactos? Se perderán todos los tickets relacionados.", + importMessage: "¿Quieres importar todos los contactos del teléfono?", }, buttons: { - import: "Importar Contactos", - add: "Agregar Contacto", + import: "Importar contactos", + add: "Agregar contacto", + export: "Exportar contactos", + delete: "Eliminar todos los contactos" }, table: { name: "Nombre", whatsapp: "WhatsApp", - email: "Correo Electrónico", + email: "Correo electrónico", actions: "Acciones", }, }, @@ -151,21 +151,21 @@ const messages = { edit: "Editar contacto", }, form: { - mainInfo: "Detalles del contacto", + mainInfo: "Datos de contacto", extraInfo: "Información adicional", name: "Nombre", - number: "Número de Whatsapp", - email: "Correo Electrónico", - extraName: "Nombre del Campo", + number: "Número de WhatsApp", + email: "Correo electrónico", + extraName: "Nombre de campo", extraValue: "Valor", }, buttons: { - addExtraInfo: "Agregar información", + addExtraInfo: "Añadir información", okAdd: "Agregar", okEdit: "Guardar", cancel: "Cancelar", }, - success: "Contacto guardado satisfactoriamente.", + success: "Contacto guardado con exito.", }, quickAnswersModal: { title: { @@ -181,51 +181,53 @@ const messages = { okEdit: "Guardar", cancel: "Cancelar", }, - success: "Respuesta rápida guardada correctamente.", + success: "Respuesta rápida guardada con éxito.", }, queueModal: { title: { - add: "Agregar cola", - edit: "Editar cola", + add: "Agregar Sector", + edit: "Editar Sector", }, notification: { title: "¡Sector guardado con éxito!", }, form: { name: "Nombre", - color: "Color", - greetingMessage: "Mensaje de saludo", + color: "Mensaje de saludo", + greetingMessage: "Apertura", startWork: "Apertura", endWork: "Cierre", absenceMessage: "Mensaje de ausencia", }, buttons: { - okAdd: "Añadir", - okEdit: "Ahorrar", + okAdd: "Agregar", + okEdit: "Guardar", cancel: "Cancelar", }, }, userModal: { title: { - add: "Agregar usuario", + add: "Agregar Usuario", edit: "Editar usuario", }, form: { name: "Nombre", - email: "Correo Electrónico", + email: "Correo electrónico", password: "Contraseña", - whatsapp: "Conexión estándar", profile: "Perfil", + admin: "Administrador", + whatsapp: "Conexión estándar", + user: "Usuario", }, buttons: { okAdd: "Agregar", okEdit: "Guardar", cancel: "Cancelar", }, - success: "Usuario guardado satisfactoriamente.", + success: "Usuario guardado con exito.", }, chat: { - noTicketMessage: "Selecciona un ticket para empezar a chatear.", + noTicketMessage: "Seleccione un ticket para comenzar a chatear.", }, ticketsManager: { buttons: { @@ -233,51 +235,50 @@ const messages = { }, }, ticketsQueueSelect: { - placeholder: "Linhas", + placeholder: "Sectores", }, tickets: { toasts: { - deleted: "El ticket en el que estabas ha sido borrado.", + deleted: "El ticket en el que estabas ha sido eliminado.", }, notification: { message: "Mensaje de", }, tabs: { - open: { title: "Bandeja" }, - closed: { title: "Resueltos" }, + open: { title: "Bandeja de entrada" }, + closed: { title: "Resuelto" }, search: { title: "Buscar" }, }, search: { - placeholder: "Buscar tickets y mensajes.", + placeholder: "Obtener tickets y mensajes", }, buttons: { showAll: "Todos", }, }, transferTicketModal: { - title: "Transferir Ticket", - fieldLabel: "Escriba para buscar usuarios", - fieldQueueLabel: "Transferir a la cola", - fieldConnectionLabel: "Transferir to conexión", - fieldQueuePlaceholder: "Seleccione una cola", + title: "Boleto de transferencia", + fieldLabel: "Escriba para obtener usuarios", + fieldConnectionLabel: "Transferir a conexión", + fieldQueuePlaceholder: "Transferir a Sector", fieldConnectionPlaceholder: "Seleccione una conexión", - noOptions: "No se encontraron usuarios con ese nombre", + noOptions: "No se encontró ningún usuario con ese nombre", buttons: { ok: "Transferir", cancel: "Cancelar", }, }, ticketsList: { - pendingHeader: "Cola", - assignedHeader: "Trabajando en", - noTicketsTitle: "¡Nada acá!", - connectionTitle: "Conexión que se está utilizando actualmente.", - noTicketsMessage: "No se encontraron tickets con este estado o término de búsqueda", + pendingHeader: "Esperando", + assignedHeader: "Asignado", + noTicketsTitle: "¡Aquí no hay nada!", + noTicketsMessage: "No se encontraron boletos con este estado o término de búsqueda", + connectionTitle: "Conexión actualmente en uso.", items: { queueless: "Sin sector", accept: "Aceptar", spy: "Espía", - close: "cerca", + close: "Cerca", reopen: "Reabrir" }, buttons: { @@ -292,9 +293,9 @@ const messages = { }, }, newTicketModal: { - title: "Crear Ticket", - fieldLabel: "Escribe para buscar un contacto", - add: "Añadir", + title: "Crear ticket", + fieldLabel: "Entrar para buscar contacto", + add: "Agregar", buttons: { ok: "Guardar", cancel: "Cancelar", @@ -302,25 +303,27 @@ const messages = { }, mainDrawer: { listItems: { - dashboard: "Dashboard", + dashboard: "Tablero", connections: "Conexiones", - tickets: "Tickets", + tickets: "Boletos", contacts: "Contactos", quickAnswers: "Respuestas rápidas", - queues: "Linhas", + queues: "Sectores", administration: "Administración", users: "Usuarios", settings: "Configuración", - api: "uso de la API", + sendMsg: "Enviando Mensajes", + sendMedia: "Enviando medios", + api: "Uso de la API", apidocs: "Documentación", apititle: "API", - apikey: "API Key", - token: "Token" + apikey: "Clave API", + token: "Ficha" }, appBar: { user: { profile: "Perfil", - logout: "Cerrar Sesión", + logout: "Cerrar sesión", }, }, }, @@ -328,7 +331,7 @@ const messages = { noTickets: "Sin notificaciones.", }, queues: { - title: "Linhas", + title: "Sectores", notifications: { queueDeleted: "El sector ha sido eliminado.", }, @@ -336,205 +339,212 @@ const messages = { name: "Nombre", color: "Color", greeting: "Mensaje de saludo", - actions: "Comportamiento", + actions: "Acciones", startWork: "Apertura", endWork: "Cierre", }, - buttons: { - add: "Agregar cola", - }, - confirmationModal: { - deleteTitle: "Eliminar", - deleteMessage: "¿Estás seguro? ¡Esta acción no se puede revertir! Los tickets en esa cola seguirán existiendo, pero ya no tendrán ninguna cola asignada.", - }, - }, - queueSelect: { - inputLabel: "Linhas", - }, - quickAnswers: { - title: "Respuestas rápidas", - table: { - shortcut: "Atajo", - message: "Respuesta rápida", - actions: "Acciones", - }, - buttons: { - add: "Agregar respuesta rápida", - }, - toasts: { - deleted: "Respuesta rápida eliminada correctamente", - }, - searchPlaceholder: "Buscar ...", - confirmationModal: { - deleteTitle: "¿Está seguro de que desea eliminar esta respuesta rápida?", - deleteMessage: "Esta acción no se puede deshacer.", - }, - }, - users: { - title: "Usuarios", - table: { - name: "Nombre", - email: "Correo Electrónico", - profile: "Perfil", - whatsapp: "Conexión estándar", - actions: "Acciones", + buttons: { + add: "Agregar sector", + }, + confirmationModal: { + deleteTitle: "Eliminar", + deleteMessage: "¿Estás seguro? ¡Esta acción no se puede revertir! Los tickets de este sector seguirán existiendo, pero ya no tendrán ningún sector asignado.", + }, }, - buttons: { - add: "Agregar usuario", + queueSelect: { + inputLabel: "Sectores", }, - toasts: { - deleted: "Usuario borrado satisfactoriamente.", + quickAnswers: { + title: "Respuestas rápidas", + table: { + shortcut: "Atajo", + message: "Respuesta rápida", + actions: "Acciones", + }, + buttons: { + add: "Agregar respuesta rápida", + }, + toasts: { + deleted: "Respuesta rápida eliminada con éxito.", + }, + searchPlaceholder: "Buscar...", + confirmationModal: { + deleteTitle: "¿Está seguro de que desea eliminar esta respuesta rápida: ", + deleteMessage: "Esta acción no se puede revertir.", + }, }, - confirmationModal: { - deleteTitle: "Borrar", - deleteMessage: "Toda la información del usuario se perderá. Los tickets abiertos de los usuarios se moverán a la cola.", + users: { + title: "Usuarios", + table: { + name: "Nombre", + email: "Correo electrónico", + profile: "Perfil", + whatsapp: "Conexión estándar", + actions: "Acciones", + }, + buttons: { + add: "Agregar Usuario", + }, + toasts: { + deleted: "Usuario eliminado con éxito.", + }, + confirmationModal: { + deleteTitle: "Eliminar", + deleteMessage: "Se perderán todos los datos del usuario. Los tickets abiertos para este usuario se moverán a espera.", + }, }, - }, - settings: { - success: "Configuración guardada satisfactoriamente.", - title: "Configuración", settings: { - userCreation: { - name: "Creación de usuarios", - options: { - enabled: "Habilitado", - disabled: "Deshabilitado", + success: "Configuración guardada con éxito.", + title: "Configuración", + settings: { + userCreation: { + name: "Creación de usuario", + note: "Permitir la creación de usuarios", + options: { + enabled: "Habilitado", + disabled: "Deshabilitado", + }, + }, + CheckMsgIsGroup: { + name: "Mensajes de grupo", + note: "Recibir mensajes de grupos", + options: { + enabled: "Habilitado", + disabled: "Deshabilitado", + }, + }, + call: { + name: "Aceptar llamadas", + note: "Si está deshabilitado, el cliente recibirá un mensaje de que no acepta llamadas de voz/video", + options: { + enabled: "Habilitado", + disabled: "Deshabilitado", + }, + }, + sideMenu: { + name: "Menú lateral de inicio", + note: "Si está habilitado, el menú lateral comenzará cerrado", + options: { + enabled: "Abrir", + disabled: "Cerrado", + }, + }, + closeTicketApi: { + name: "Cerrar ticket enviado API", + note: "Cierra automáticamente el ticket cuando se envía a través de API", + options: { + enabled: "Habilitado", + disabled: "Deshabilitado", + }, + }, + darkMode: { + name: "Habilitar modo oscuro", + note: "Cambiar entre el modo claro y el modo oscuro", + options: { + enabled: "Habilitado", + disabled: "Deshabilitado", + }, + }, + timeCreateNewTicket: { + name: "Crear nuevo ticket después", + note: "Seleccione el tiempo que tardará en abrir un nuevo ticket si el cliente lo contacta nuevamente", + options: { + "10": "10 segundos", + "30": "30 segundos", + "60": "1 minuto", + "300": "5 minutos", + "1800" : "30 minutos", + "3600" : "1 hora", + "7200" : "2 horas", + "21600" : "6 horas", + "43200" : "12 horas", + "86400" : "24 horas", + "604800" : "7 días", + "1296000" : "15 días", + "2592000" : "30 días", + }, }, }, }, - }, - CheckMsgIsGroup: { - name: "Ignorar Mensajes Grupales", - options: { - enabled: "Habilitado", - disabled: "Deshabilitado", - }, - }, - sideMenu: { - name: "Menú lateral de inicio", - note: "Si está habilitado, el menú lateral comenzará cerrado", - options: { - enabled: "Abrir", - disabled: "Cerrado", - }, - }, - closeTicketApi: { - name: "Cerrar ticket enviado API", - note: "Cierra automáticamente el ticket cuando se envía a través de API", - options: { - enabled: "Habilitado", - disabled: "Deshabilitado", - }, - }, - darkMode: { - name: "Habilitar modo oscuro", - note: "Cambiar entre el modo claro y el modo oscuro", - options: { - enabled: "Habilitado", - disabled: "Deshabilitado", + messagesList: { + header: { + assignedTo: "Asignado:", + buttons: { + return: "Volver", + resolve: "Resolver", + reopen: "Reabrir", + accept: "Aceptar", + }, + }, }, - }, - timeCreateNewTicket: { - name: "Crear nuevo ticket después", - note: "Selecciona el tiempo que tardará en abrir un nuevo ticket si el cliente te vuelve a contactar", - options: { - "10": "10 Segundos", - "30": "30 Segundos", - "60": "1 minuto", - "300": "5 minutos", - "1800": "30 minutos", - "3600": "1 hora", - "7200": "2 horas", - "21600": "6 horas", - "43200": "12 horas", - "86400": "24 horas", - "604800": "7 días", - "1296000": "15 días", - "2592000": "30 días", + messagesInput: { + placeholderOpen: "Ingrese un mensaje", + placeholderClosed: "Reabrir o aceptar este ticket para enviar un mensaje.", + signMessage: "Suscribirse", }, - }, - messagesList: { - header: { - assignedTo: "Asignado a:", + contactDrawer: { + header: "Datos de contacto", buttons: { - return: "Devolver", - resolve: "Resolver", - reopen: "Reabrir", - accept: "Aceptar", + edit: "Editar contacto", + }, + extraInfo: "Otra información", + }, + ticketOptionsMenu: { + delete: "Eliminar", + transfer: "Transferir", + confirmationModal: { + title: "Eliminar ticket de contacto", + message: "¡Atención! Todos los mensajes relacionados con el ticket se perderán.", + }, + buttons: { + delete: "Eliminar", + cancel: "Cancelar", }, }, - }, - messagesInput: { - placeholderOpen: "Escriba un mensaje o presione '' / '' para usar las respuestas rápidas registradas", - placeholderClosed: - "Vuelva a abrir o acepte este ticket para enviar un mensaje.", - signMessage: "Firmar", - }, - contactDrawer: { - header: "Detalles del contacto", - buttons: { - edit: "Editar contacto", - }, - extraInfo: "Otra información", - }, - ticketOptionsMenu: { - delete: "Borrar", - transfer: "Transferir", confirmationModal: { - title: "¿Borrar ticket #", - titleFrom: "del contacto ", - message: - "¡Atención! Todos los mensajes Todos los mensajes relacionados con el ticket se perderán.", - }, - buttons: { - delete: "Borrar", - cancel: "Cancelar", + buttons: { + confirm: "Está bien", + cancel: "Cancelar", + }, }, - }, - confirmationModal: { - buttons: { - confirm: "Ok", - cancel: "Cancelar", + tablegeoOptionsMenu: { + delete: "Eliminar", + reply: "Responder", + confirmationModal: { + title: "¿Eliminar mensaje?", + message: "Esta acción no se puede revertir.", + }, }, - }, - messageOptionsMenu: { - delete: "Borrar", - reply: "Responder", - confirmationModal: { - title: "¿Borrar mensaje?", - message: "Esta acción no puede ser revertida.", + backendErrors: { + ERR_NO_OTHER_WHATSAPP: "Debe haber al menos un WhatsApp predeterminado.", + ERR_NO_DEF_WAPP_FOUND: "No se encontró WhatsApp predeterminado. Verifique la página de conexiones.", + ERR_WAPP_NOT_INITIALIZED: "Esta sesión de WhatsApp no ​​fue inicializada. Por favor revisa la página de conexiones.", + ERR_WAPP_CHECK_CONTACT: "No se pudo verificar el contacto de WhatsApp. Verifique la página de conexiones.", + ERR_WAPP_INVALID_CONTACT: "Este no es un número de Whatsapp válido.", + ERR_WAPP_DOWNLOAD_MEDIA: "No se pueden descargar medios de WhatsApp. Verifique la página de conexiones", + ERR_INVALID_CREDENTIALS: "Error de autenticación. Vuelva a intentarlo", + ERR_SENDING_WAPP_MSG: "Error al enviar el mensaje de WhatsApp. Verificar página de conexiones.", + ERR_DELETE_WAPP_MSG: "No se pudo eliminar el mensaje de WhatsApp.", + ERR_OTHER_OPEN_TICKET: "Ya hay un ticket abierto para este contacto.", + ERR_SESSION_EXPIRED: "Sesión caducada. Inicie sesión.", + ERR_USER_CREATION_DISABLED: "La creación de usuarios ha sido deshabilitada por el administrador.", + ERR_NO_PERMISSION: "No tienes permiso para acceder a este recurso.", + ERR_DUPLICATED_CONTACT: "Ya existe un contacto con este número.", + ERR_NO_SETTING_FOUND: "No se encontraron configuraciones con esta ID.", + ERR_NO_CONTACT_FOUND: "No se encontró ningún contacto con esta ID.", + ERR_NO_TICKET_FOUND: "No se encontraron boletos con esta ID.", + ERR_NO_USER_FOUND: "No se encontró ningún usuario con esta ID.", + ERR_NO_WAPP_FOUND: "No se encontró WhatsApp con este ID.", + ERR_CREATING_MESSAGE: "Error al crear el mensaje en la base de datos.", + ERR_CREATING_TICKET: "Error al crear el ticket en la base de datos.", + ERR_FETCH_WAPP_MSG: "Error al obtener el mensaje en WhatsApp, puede ser demasiado antiguo.", + ERR_QUEUE_COLOR_ALREADY_EXISTS: "Este color ya está en uso, elige otro.", + ERR_WAPP_GREETING_REQUIRED: "El mensaje de saludo es obligatorio cuando hay más de un Sector.", + ERR_USER_CREATION_COUNT: "Límite de usuarios alcanzado, comuníquese con soporte para cambiar", + ERR_CONNECTION_CREATION_COUNT: "Límite de conexión alcanzado, comuníquese con soporte para cambiar.", }, }, - backendErrors: { - ERR_NO_OTHER_WHATSAPP: "Debe haber al menos una conexión de WhatsApp predeterminada.", - ERR_NO_DEF_WAPP_FOUND: "No se encontró WhatsApp predeterminado. Verifique la página de conexiones.", - ERR_WAPP_NOT_INITIALIZED: "Esta sesión de WhatsApp no ​​está inicializada. Verifique la página de conexiones.", - ERR_WAPP_CHECK_CONTACT: "No se pudo verificar el contacto de WhatsApp. Verifique la página de conexiones.", - ERR_WAPP_INVALID_CONTACT: "Este no es un número de whatsapp válido.", - ERR_WAPP_DOWNLOAD_MEDIA: "No se pudieron descargar los medios de WhatsApp. Verifique la página de conexiones.", - ERR_INVALID_CREDENTIALS: "Error de autenticación. Vuelva a intentarlo.", - ERR_SENDING_WAPP_MSG: "Error al enviar el mensaje de WhatsApp. Verifique la página de conexiones.", - ERR_DELETE_WAPP_MSG: "No se pudo borrar el mensaje de WhatsApp.", - ERR_OTHER_OPEN_TICKET: "Ya hay un ticket abierto para este contacto.", - ERR_SESSION_EXPIRED: "Sesión caducada. Inicie sesión.", - ERR_USER_CREATION_DISABLED: "La creación de usuarios fue deshabilitada por el administrador.", - ERR_NO_PERMISSION: "No tienes permiso para acceder a este recurso.", - ERR_DUPLICATED_CONTACT: "Ya existe un contacto con este número.", - ERR_NO_SETTING_FOUND: "No se encontró ninguna configuración con este ID.", - ERR_NO_CONTACT_FOUND: "No se encontró ningún contacto con este ID.", - ERR_NO_TICKET_FOUND: "No se encontró ningún ticket con este ID.", - ERR_NO_USER_FOUND: "No se encontró ningún usuario con este ID.", - ERR_NO_WAPP_FOUND: "No se encontró WhatsApp con este ID.", - ERR_CREATING_MESSAGE: "Error al crear el mensaje en la base de datos.", - ERR_CREATING_TICKET: "Error al crear el ticket en la base de datos.", - ERR_FETCH_WAPP_MSG: "Error al obtener el mensaje en WhtasApp, tal vez sea demasiado antiguo.", - ERR_QUEUE_COLOR_ALREADY_EXISTS: "Este color ya está en uso, elija otro.", - ERR_WAPP_GREETING_REQUIRED: "El mensaje de saludo es obligatorio cuando hay más de una cola.", - ERR_USER_CREATION_COUNT: "Se alcanzó el límite de usuarios; para cambiar, comuníquese con el soporte.", - ERR_CONNECTION_CREATION_COUNT: "Se alcanzó el límite de conexión, para cambiar, comuníquese con el soporte.", - }, }, - }, -}; - -export { messages }; \ No newline at end of file + }; + + export { messages }; \ No newline at end of file diff --git a/frontend/src/translate/languages/pt.js b/frontend/src/translate/languages/pt.js index 74d63844..1bfda627 100644 --- a/frontend/src/translate/languages/pt.js +++ b/frontend/src/translate/languages/pt.js @@ -60,8 +60,7 @@ const messages = { deleteTitle: "Deletar", deleteMessage: "Você tem certeza? Essa ação não pode ser revertida.", disconnectTitle: "Desconectar", - disconnectMessage: - "Tem certeza? Você precisará ler o QR Code novamente.", + disconnectMessage: "Tem certeza? Você precisará ler o QR Code novamente.", }, buttons: { add: "Adicionar WhatsApp", @@ -74,21 +73,18 @@ const messages = { toolTips: { disconnected: { title: "Falha ao iniciar sessão do WhatsApp", - content: - "Certifique-se de que seu celular esteja conectado à internet e tente novamente, ou solicite um novo QR Code", + content: "Certifique-se de que seu celular esteja conectado à internet e tente novamente, ou solicite um novo QR Code", }, qrcode: { title: "Esperando leitura do QR Code", - content: - "Clique no botão 'QR CODE' e leia o QR Code com o seu celular para iniciar a sessão", + content: "Clique no botão 'QR CODE' e leia o QR Code com o seu celular para iniciar a sessão", }, connected: { title: "Conexão estabelecida!", }, timeout: { title: "A conexão com o celular foi perdida", - content: - "Certifique-se de que seu celular esteja conectado à internet e o WhatsApp esteja aberto, ou clique no botão 'Desconectar' para obter um novo QR Code", + content: "Certifique-se de que seu celular esteja conectado à internet e o WhatsApp esteja aberto, ou clique no botão 'Desconectar' para obter um novo QR Code", }, }, table: { @@ -97,7 +93,6 @@ const messages = { status: "Status", lastUpdate: "Última atualização", default: "Padrão", - battery: "Bateria", actions: "Ações", session: "Sessão", }, @@ -126,18 +121,22 @@ const messages = { title: "Contatos", toasts: { deleted: "Contato excluído com sucesso!", + deletedAll: "Todos contatos excluídos com sucesso!", }, searchPlaceholder: "Pesquisar...", confirmationModal: { deleteTitle: "Deletar ", - importTitlte: "Importar contatos", - deleteMessage: - "Tem certeza que deseja deletar este contato? Todos os tickets relacionados serão perdidos.", - importMessage: "Deseja importas todos os contatos do telefone?", + deleteAllTitle: "Deletar Todos", + importTitle: "Importar contatos", + deleteMessage: "Tem certeza que deseja deletar este contato? Todos os tickets relacionados serão perdidos.", + deleteAllMessage: "Tem certeza que deseja deletar todos os contatos? Todos os tickets relacionados serão perdidos.", + importMessage: "Deseja importar todos os contatos do telefone?", }, buttons: { import: "Importar Contatos", add: "Adicionar Contato", + export: "Exportar Contatos", + delete: "Excluir Todos Contatos" }, table: { name: "Nome", @@ -322,9 +321,6 @@ const messages = { token: "Token" }, appBar: { - site: { - title: "Press Ticket" - }, user: { profile: "Perfil", logout: "Sair", @@ -394,8 +390,7 @@ const messages = { }, confirmationModal: { deleteTitle: "Excluir", - deleteMessage: - "Todos os dados do usuário serão perdidos. Os tickets abertos deste usuário serão movidos para a espera.", + deleteMessage: "Todos os dados do usuário serão perdidos. Os tickets abertos deste usuário serão movidos para a espera.", }, }, settings: { @@ -404,13 +399,15 @@ const messages = { settings: { userCreation: { name: "Criação de usuário", + note: "Permitir a criação de usuário", options: { enabled: "Ativado", disabled: "Desativado", }, }, CheckMsgIsGroup: { - name: "Ignorar Mensagens de Grupos", + name: "Mensagens de Grupos", + note: "Receber mensagens de grupos", options: { enabled: "Ativado", disabled: "Desativado", @@ -482,8 +479,7 @@ const messages = { }, messagesInput: { placeholderOpen: "Digite uma mensagem", - placeholderClosed: - "Reabra ou aceite esse ticket para enviar uma mensagem.", + placeholderClosed: "Reabra ou aceite esse ticket para enviar uma mensagem.", signMessage: "Assinar", }, contactDrawer: { @@ -498,8 +494,7 @@ const messages = { transfer: "Transferir", confirmationModal: { title: "Deletar o ticket do contato", - message: - "Atenção! Todas as mensagens relacionadas ao ticket serão perdidas.", + message: "Atenção! Todas as mensagens relacionadas ao ticket serão perdidas.", }, buttons: { delete: "Excluir",