Adição de tradução para novos recursos

pull/21/head
adriano 2022-12-15 19:20:33 -03:00
parent 8ba8da8250
commit 3980814c5e
9 changed files with 193 additions and 38 deletions

View File

@ -26,6 +26,8 @@ import ErrorIcon from "@material-ui/icons/Error";
import RemoveCircleIcon from "@material-ui/icons/RemoveCircle";
import PowerSettingsNewIcon from "@material-ui/icons/PowerSettingsNew";
import { i18n } from "../../translate/i18n";
const TableUser = ({ classes, usersOnlineInfo, logout }) => {
const [search, setSearch] = React.useState("");
const [filterStatus, setFilterStatus] = React.useState(null);
@ -48,7 +50,8 @@ const TableUser = ({ classes, usersOnlineInfo, logout }) => {
color="primary"
style={{ marginBottom: "16px" }}
>
Lista de Usuários
{i18n.t("dashboard.table_users.title")}
</Typography>
</Grid>
<Grid item sx={8} width="100%">
@ -84,11 +87,11 @@ const TableUser = ({ classes, usersOnlineInfo, logout }) => {
<Table>
<TableHead>
<TableRow className={classes.tableRowHead}>
<TableCell>Nome</TableCell>
<TableCell>Em Atendimento/Finalizado(s)</TableCell>
<TableCell>abertos Por Fila</TableCell>
<TableCell>Fechados Por Fila</TableCell>
<TableCell>Tempo Online</TableCell>
<TableCell>{i18n.t("dashboard.table_users.column0")}</TableCell>
<TableCell>{i18n.t("dashboard.table_users.column1")}</TableCell>
<TableCell>{i18n.t("dashboard.table_users.column2")}</TableCell>
<TableCell>{i18n.t("dashboard.table_users.column3")}</TableCell>
<TableCell>{i18n.t("dashboard.table_users.column4")}</TableCell>
<TableCell>Ações</TableCell>
</TableRow>
</TableHead>

View File

@ -10,6 +10,8 @@ import chat from '@material-ui/icons/Chat';
import React from 'react';
import { i18n } from '../../../translate/i18n';
const MTable = (props) => {
const tableRef = React.useRef();
@ -79,7 +81,7 @@ const MTable = (props) => {
if (props.hasChild) {
render(<Modal data={selectedRow.messages}
hasChild={false}
modal_header={'Chat do atendimento pelo Whatsapp'}
modal_header={i18n.t("reports.listTitles.title2_1")}
user={selectedRow.user.name}
clientContactNumber={selectedRow.contact.number} />)
}

View File

@ -10,23 +10,25 @@ import DialogTitle from '@mui/material/DialogTitle';
//import DataGridTable from '../Table';
import MTable from "../MTable";
import { i18n } from '../../../translate/i18n';
import ExportCSV from '../ExportCSV'
//import { margin } from '@mui/system';
let columns = [
{
title: 'Atendente/Cliente',
title: `${i18n.t("reports.listColumns.column2_1")}`,
field: 'fromMe',
},
{
title: 'Mensagem',
title: `${i18n.t("reports.listColumns.column0_8")}`,
field: 'body',
//cellStyle: {whiteSpace: 'nowrap'},
},
{ title: 'Criado', field: 'createdAt' }
{ title: `${i18n.t("reports.listColumns.column1_7")}`, field: 'createdAt' }
/*cellStyle: {
backgroundColor: '#039be5',

View File

@ -88,7 +88,7 @@ const MainListItems = (props) => {
primary={i18n.t("mainDrawer.listItems.contacts")}
icon={<ContactPhoneOutlinedIcon />}
/>
<ListItemLink to="/schedulesReminder" primary="Lembretes" icon={<SendOutlined />} />
<ListItemLink to="/schedulesReminder" primary={i18n.t("mainDrawer.listItems.schedules")} icon={<SendOutlined />} />
<ListItemLink
to="/quickAnswers"
primary={i18n.t("mainDrawer.listItems.quickAnswers")}

View File

@ -23,6 +23,9 @@ import fileDownload from 'js-file-download'
import openSocket from "socket.io-client";
import { i18n } from "../../translate/i18n";
const report = [{ 'value': '1', 'label': 'Atendimento por atendentes' }, { 'value': '2', 'label': 'Usuários online/offline' }]
@ -206,17 +209,17 @@ Item.propTypes = {
let columnsData = [
{ title: 'Unidade', field: 'whatsapp.name' },
{ title: 'Atendente', field: 'user.name' },
{ title: 'Contato', field: 'contact.number' },
{ title: 'Nome', field: 'contact.name' },
{ title: 'Assunto', field: 'queue.name' },
{ title: `${i18n.t("reports.listColumns.column1_1")}`, field: 'whatsapp.name' },
{ title: `${i18n.t("reports.listColumns.column1_2")}`, field: 'user.name' },
{ title: `${i18n.t("reports.listColumns.column0_4")}`, field: 'contact.number' },
{ title: `${i18n.t("reports.listColumns.column0_3")}`, field: 'contact.name' },
{ title: `${i18n.t("reports.listColumns.column1_5")}`, field: 'queue.name' },
{ title: 'Status', field: 'status' },
{ title: 'Criado', field: 'createdAt' },
{title: 'Atualizado', field: 'updatedAt'},
{ title: 'Status de encerramento', field: 'statusChatEnd' }];
{ title: `${i18n.t("reports.listColumns.column1_7")}`, field: 'createdAt' },
{title: `${i18n.t("reports.listColumns.column1_8")}`, field: 'updatedAt'},
{ title: `${i18n.t("reports.listColumns.column1_9")}`, field: 'statusChatEnd' }];
const Report = () => {
@ -630,12 +633,12 @@ const Report = () => {
<MainContainer>
<Box sx={{ display: 'grid', gridTemplateColumns: 'repeat(3, 1fr)' }}>
<Item><SelectField func={textFieldSelectUser} emptyField={true} header={'Usuário'} currencies={users.map((obj) => {
<Item><SelectField func={textFieldSelectUser} emptyField={true} header={i18n.t("reports.user")} currencies={users.map((obj) => {
return { 'value': obj.id, 'label': obj.name }
})} /></Item>
<Item><DatePicker1 func={datePicker1Value} minDate={false} startEmpty={false} title={'Data inicio'} /></Item>
<Item><DatePicker2 func={datePicker2Value} minDate={false} startEmpty={false} title={'Data fim'} /></Item>
<Item><DatePicker1 func={datePicker1Value} minDate={false} startEmpty={false} title={i18n.t("reports.dateStart")} /></Item>
<Item><DatePicker2 func={datePicker2Value} minDate={false} startEmpty={false} title={i18n.t("reports.dateEnd")} /></Item>
<Item sx={{ display: 'grid', gridColumn: '4 / 5', }}>
@ -672,7 +675,7 @@ const Report = () => {
handleScroll={handleScroll}
table_title={'Atendimento por atendentes'} />
table_title={i18n.t("reports.listTitles.title1_1")} />
</>
@ -689,7 +692,7 @@ const Report = () => {
}}
title="Usuários online/offline"
title={i18n.t("reports.listTitles.title3_1")}
columns={
[
@ -724,8 +727,8 @@ const Report = () => {
},
{ title: 'Tempo online', field: 'sumOnlineTime.sum' },
{ title: 'Data inicio', field: 'startDate' },
{ title: 'Data fim', field: 'endDate' },
{ title: `${i18n.t("reports.dateStart")}`, field: 'startDate' },
{ title: `${i18n.t("reports.dateStart")}`, field: 'endDate' },
{ title: 'Em atendimento', field: 'sumOpen.count' },
{ title: 'Finalizado', field: 'sumClosed.count' },

View File

@ -37,7 +37,7 @@ import { toast } from "react-toastify";
import toastError from "../../errors/toastError";
import ConfirmationModal from "../../components/ConfirmationModal";
import { i18n } from "../../translate/i18n";
const reducerQ = (state, action) => {
@ -465,8 +465,8 @@ const SchedulesReminder = () => {
<Item><DatePicker1 func={datePicker1Value} minDate={false} startEmpty={true} reset={resetChild} setReset={setReset} title={'Data inicio'} /></Item>
<Item><DatePicker2 func={datePicker2Value} minDate={false} startEmpty={true} reset={resetChild} setReset={setReset} title={'Data fim'} /></Item>
<Item><DatePicker1 func={datePicker1Value} minDate={false} startEmpty={true} reset={resetChild} setReset={setReset} title={i18n.t("reports.dateStart")} /></Item>
<Item><DatePicker2 func={datePicker2Value} minDate={false} startEmpty={true} reset={resetChild} setReset={setReset} title={i18n.t("reports.dateEnd")} /></Item>
<Item sx={{ gridColumn: '4 / 5' }}>
{/* <Button size="small" variant="contained" onClick={()=>{handleQuery()}}>GO</Button>*/}
@ -501,17 +501,26 @@ const SchedulesReminder = () => {
</ConfirmationModal>
<MaterialTable
title="Lembretes/Agendamentos"
localization={{
header: {
actions: `${i18n.t("reports.listColumns.column0_1")}`
},
}}
title={i18n.t("reports.listTitles.title0_1")}
columns={
[
{ 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: 'ticket.contact.name' },
{ title: 'Contato', field: 'ticket.contact.number' },
{ title: 'Lemb/Agen', field: 'scheduleReminder' },
{ title: 'Envio', field: 'schedulingTime' },
{ title: 'Data', field: 'schedulingDate' },
{ title: 'Mensagem', field: 'message', width: "80%" },
{ title: `${i18n.t("reports.listColumns.column0_2")}`, field: 'ticket.contact.profilePicUrl', render: rowData => <img src={rowData['ticket.contact.profilePicUrl']} alt="imagem de perfil do whatsapp" style={{ width: 40, borderRadius: '50%' }} /> },
{ title: `${i18n.t("reports.listColumns.column0_3")}`, field: 'ticket.contact.name' },
{ title: `${i18n.t("reports.listColumns.column0_4")}`, field: 'ticket.contact.number' },
{ title: `${i18n.t("reports.listColumns.column0_5")}`, field: 'scheduleReminder' },
{ title: `${i18n.t("reports.listColumns.column0_6")}`, field: 'schedulingTime' },
{ title: `${i18n.t("reports.listColumns.column0_7")}`, field: 'schedulingDate' },
{ title: `${i18n.t("reports.listColumns.column0_8")}`, field: 'message', width: "80%" },
]
}

View File

@ -49,6 +49,16 @@ const messages = {
closed: {
title: "Closed"
}
},
table_users:{
title: 'User List',
column0: 'Name',
column1: 'In Service/Finished',
column2: 'Open by Queue',
column3: 'Closed by Queue',
column4: 'Online time',
column4: 'Actions',
}
},
connections: {
@ -283,7 +293,8 @@ const messages = {
queues: "Queues",
administration: "Administration",
users: "Users",
settings: "Settings",
settings: "Settings",
schedules: "Schedules"
},
appBar: {
user: {
@ -291,6 +302,40 @@ const messages = {
logout: "Logout",
},
},
},
reports: {
listTitles: {
title0_1: "Reminders/Schedulings",
title1_1: "Calls by attendants",
title2_1: "Whatsapp chat",
title3_1: "Users online/offline"
},
listColumns:{
column0_1: 'Actions',
column0_2: 'Pic',
column0_3: 'Name',
column0_4: 'Contact',
column0_5: 'Remin/Sched',
column0_6: 'Send',
column0_7: 'Date',
column0_8: 'Message',
column1_1: 'Store',
column1_2: 'Attendant',
column1_5: 'Subject',
column1_6: 'Status',
column1_7: 'Created',
column1_8: 'Updated',
column1_9: 'Closing status',
column2_1: 'Attendant/Client',
},
search: 'Number/Name...',
dateStart: 'Start date',
dateEnd: 'End date',
user: 'User'
},
notifications: {
noTickets: "No notifications.",

View File

@ -50,6 +50,17 @@ const messages = {
closed: {
title: "Finalizado"
}
},
table_users:{
title: 'Lista de usuarios',
column0: 'Nombre',
column1: 'En servicio/Terminado(S)',
column2: 'Abrir por cola',
column3: 'Cerrado por cola',
column4: 'Tiempo Online',
column4: 'Actions',
}
},
connections: {
@ -288,6 +299,7 @@ const messages = {
administration: "Administración",
users: "Usuarios",
settings: "Configuración",
schedules: "Recordatorio"
},
appBar: {
user: {
@ -296,6 +308,39 @@ const messages = {
},
},
},
reports: {
listTitles: {
title0_1: "Recordatorios/Programación",
title1_1: "Llamadas de asistentes",
title2_1: "Chat de whatsapp",
title3_1: "Usuarios online/offline"
},
listColumns:{
column0_1: 'Acción',
column0_2: 'Pic',
column0_3: 'Nombre',
column0_4: 'Contacto',
column0_5: 'Record/Progr',
column0_6: 'Envío',
column0_7: 'Fecha',
column0_8: 'Mensaje',
column1_1: 'Almacenar',
column1_2: 'Secretario',
column1_5: 'Tema',
column1_6: 'Status',
column1_7: 'Creado',
column1_8: 'Actualizado',
column1_9: 'Estado de cierre',
column2_1: 'Secretario/Cliente',
},
search: 'Número/Nombre...',
dateStart: 'Fecha de inicio',
dateEnd: 'Fecha final',
user: 'Usuario'
},
notifications: {
noTickets: "Sin notificaciones.",
},

View File

@ -49,6 +49,16 @@ const messages = {
closed: {
title: "Finalizado"
}
},
table_users:{
title: 'Lista De Usuários',
column0: 'Nome',
column1: 'Em Atendimento/Finalizado(S)',
column2: 'Abertos Por Fila',
column3: 'Fechados Por Fila',
column4: 'Tempo Online',
column4: 'Ações',
}
},
connections: {
@ -288,6 +298,7 @@ const messages = {
administration: "Administração",
users: "Usuários",
settings: "Configurações",
schedules: "Lembretes"
},
appBar: {
user: {
@ -295,6 +306,41 @@ const messages = {
logout: "Sair",
},
},
},
reports: {
listTitles: {
title0_1: "Lembretes/Agendamentos",
title1_1: "Atendimento por atendentes",
title2_1: "Chat do atendimento pelo Whatsapp",
title3_1: "Usuários online/offline"
},
listColumns:{
column0_1: 'Ações',
column0_2: 'Foto',
column0_3: 'Nome',
column0_4: 'Contato',
column0_5: 'Lemb/Agen',
column0_6: 'Envio',
column0_7: 'Data',
column0_8: 'Mensagem',
column1_1: 'Unidade',
column1_2: 'Atendente',
column1_5: 'Assunto',
column1_6: 'Status',
column1_7: 'Criado',
column1_8: 'Atualizado',
column1_9: 'Status de encerramento',
column2_1: 'Atendente/Cliente',
},
search: 'Numer/Nome...',
dateStart: 'Data início',
dateEnd: 'Data fim',
user: 'Usuário'
},
notifications: {
noTickets: "Nenhuma notificação.",