mirror of
https://github.com/cheveguerra/whaticket-community.git
synced 2026-04-21 05:09:18 +00:00
improvement: add translation to new components
This commit is contained in:
@@ -7,6 +7,7 @@ import Select from "@material-ui/core/Select";
|
||||
import Chip from "@material-ui/core/Chip";
|
||||
import toastError from "../../errors/toastError";
|
||||
import api from "../../services/api";
|
||||
import { i18n } from "../../translate/i18n";
|
||||
|
||||
const useStyles = makeStyles(theme => ({
|
||||
chips: {
|
||||
@@ -33,17 +34,17 @@ const QueueSelect = ({ selectedQueueIds, onChange }) => {
|
||||
})();
|
||||
}, []);
|
||||
|
||||
const handleChange = event => {
|
||||
onChange(event.target.value);
|
||||
const handleChange = e => {
|
||||
onChange(e.target.value);
|
||||
};
|
||||
|
||||
return (
|
||||
<div style={{ marginTop: 6 }}>
|
||||
<FormControl fullWidth margin="dense" variant="outlined">
|
||||
<InputLabel>Filas</InputLabel>
|
||||
<InputLabel>{i18n.t("queueSelect.inputLabel")}</InputLabel>
|
||||
<Select
|
||||
multiple
|
||||
labelWidth={40}
|
||||
labelWidth={60}
|
||||
value={selectedQueueIds}
|
||||
onChange={handleChange}
|
||||
MenuProps={{
|
||||
|
||||
@@ -175,7 +175,7 @@ const TicketsManager = () => {
|
||||
color="primary"
|
||||
onClick={() => setNewTicketModalOpen(true)}
|
||||
>
|
||||
Novo
|
||||
{i18n.t("ticketsManager.buttons.newTicket")}
|
||||
</Button>
|
||||
<Can
|
||||
role={user.profile}
|
||||
|
||||
@@ -4,6 +4,7 @@ import MenuItem from "@material-ui/core/MenuItem";
|
||||
import FormControl from "@material-ui/core/FormControl";
|
||||
import Select from "@material-ui/core/Select";
|
||||
import { Checkbox, ListItemText } from "@material-ui/core";
|
||||
import { i18n } from "../../translate/i18n";
|
||||
|
||||
const TicketsQueueSelect = ({
|
||||
userQueues,
|
||||
@@ -34,7 +35,7 @@ const TicketsQueueSelect = ({
|
||||
},
|
||||
getContentAnchorEl: null,
|
||||
}}
|
||||
renderValue={() => "Filas"}
|
||||
renderValue={() => i18n.t("ticketsQueueSelect.placeholder")}
|
||||
>
|
||||
{userQueues?.length > 0 &&
|
||||
userQueues.map(queue => (
|
||||
|
||||
Reference in New Issue
Block a user