2023-07-20 15:30:26 +00:00
|
|
|
import React, { useState, useEffect, useContext } from 'react'
|
2024-05-09 18:59:02 +00:00
|
|
|
//import openSocket from 'socket.io-client'
|
|
|
|
import { socket } from '../../services/socket.js'
|
2022-01-06 01:26:15 +00:00
|
|
|
|
2023-07-20 15:30:26 +00:00
|
|
|
import { makeStyles } from '@material-ui/core/styles'
|
|
|
|
import Paper from '@material-ui/core/Paper'
|
|
|
|
import Typography from '@material-ui/core/Typography'
|
|
|
|
import Container from '@material-ui/core/Container'
|
|
|
|
import Select from '@material-ui/core/Select'
|
|
|
|
import { toast } from 'react-toastify'
|
2022-01-06 01:26:15 +00:00
|
|
|
|
2023-07-20 15:30:26 +00:00
|
|
|
import api from '../../services/api'
|
|
|
|
import { i18n } from '../../translate/i18n.js'
|
|
|
|
import toastError from '../../errors/toastError'
|
2022-01-06 01:26:15 +00:00
|
|
|
|
2024-04-23 22:51:11 +00:00
|
|
|
import TextField from '@material-ui/core/TextField'
|
|
|
|
import Button from '@material-ui/core/Button'
|
|
|
|
|
|
|
|
|
2022-01-10 23:43:32 +00:00
|
|
|
//--------
|
2023-07-20 15:30:26 +00:00
|
|
|
import { AuthContext } from '../../context/Auth/AuthContext'
|
|
|
|
|
|
|
|
import { Can } from '../../components/Can'
|
2024-04-23 22:51:11 +00:00
|
|
|
import { boolean } from 'yup'
|
2022-01-10 23:43:32 +00:00
|
|
|
|
2022-04-18 14:12:49 +00:00
|
|
|
// import Button from "@material-ui/core/Button";
|
2022-04-17 21:02:15 +00:00
|
|
|
|
2024-04-23 22:51:11 +00:00
|
|
|
const IntegerInput = ({ value, onChange }) => {
|
|
|
|
const handleChange = (event) => {
|
|
|
|
const inputValue = event.target.value
|
|
|
|
// Only allow digits 0-9
|
|
|
|
if (/^\d{0,3}$/.test(inputValue)) {
|
|
|
|
onChange(inputValue)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return (
|
|
|
|
<TextField
|
|
|
|
type="text"
|
|
|
|
variant="outlined"
|
|
|
|
value={value}
|
|
|
|
onChange={handleChange}
|
|
|
|
style={{ marginRight: '10px' }}
|
|
|
|
/>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
2023-07-20 15:30:26 +00:00
|
|
|
const useStyles = makeStyles((theme) => ({
|
|
|
|
root: {
|
|
|
|
display: 'flex',
|
|
|
|
alignItems: 'center',
|
|
|
|
padding: theme.spacing(4),
|
|
|
|
},
|
|
|
|
|
|
|
|
paper: {
|
|
|
|
padding: theme.spacing(2),
|
|
|
|
display: 'flex',
|
|
|
|
alignItems: 'center',
|
|
|
|
},
|
|
|
|
|
|
|
|
settingOption: {
|
|
|
|
marginLeft: 'auto',
|
|
|
|
},
|
|
|
|
margin: {
|
|
|
|
margin: theme.spacing(1),
|
|
|
|
},
|
|
|
|
}))
|
2022-01-06 01:26:15 +00:00
|
|
|
|
|
|
|
const Settings = () => {
|
2023-07-20 15:30:26 +00:00
|
|
|
const classes = useStyles()
|
|
|
|
|
|
|
|
//--------
|
|
|
|
const { user } = useContext(AuthContext)
|
|
|
|
|
|
|
|
const [settings, setSettings] = useState([])
|
|
|
|
|
2024-04-23 22:51:11 +00:00
|
|
|
|
|
|
|
const [number1, setNumber1] = useState('')
|
|
|
|
const [number2, setNumber2] = useState('')
|
|
|
|
|
|
|
|
const handleNumber1Change = (value) => {
|
|
|
|
setNumber1(value)
|
|
|
|
}
|
|
|
|
|
|
|
|
const handleNumber2Change = (value) => {
|
|
|
|
setNumber2(value)
|
|
|
|
}
|
|
|
|
|
|
|
|
const handleGetValues = () => {
|
|
|
|
let e = {
|
|
|
|
target: {
|
|
|
|
value: 'enabled', name: 'remoteTicketSendControll', obj: (number1.trim().length > 0 && number2.trim().length > 0) ? { seconds1: number1, seconds2: number2 } : null
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
handleChangeSetting(e)
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2023-07-20 15:30:26 +00:00
|
|
|
useEffect(() => {
|
|
|
|
const fetchSession = async () => {
|
|
|
|
try {
|
|
|
|
const { data } = await api.get('/settings')
|
2024-04-23 22:51:11 +00:00
|
|
|
console.log('data.settings: ', data.settings)
|
2023-08-08 15:09:03 +00:00
|
|
|
setSettings(data.settings)
|
2024-04-23 22:51:11 +00:00
|
|
|
|
|
|
|
if (data?.settings) {
|
|
|
|
let { obj } = data.settings.find((s) => s.key === 'remoteTicketSendControll')
|
|
|
|
|
|
|
|
if (!obj) return
|
|
|
|
|
|
|
|
obj = JSON.parse(obj)
|
|
|
|
console.log('SETTING obj: ', obj)
|
|
|
|
|
|
|
|
setNumber1(obj.seconds1)
|
|
|
|
setNumber2(obj.seconds2)
|
|
|
|
}
|
|
|
|
|
2023-07-20 15:30:26 +00:00
|
|
|
} catch (err) {
|
|
|
|
toastError(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
fetchSession()
|
|
|
|
}, [])
|
|
|
|
|
2024-04-23 22:51:11 +00:00
|
|
|
|
2023-07-20 15:30:26 +00:00
|
|
|
useEffect(() => {
|
2024-05-09 18:59:02 +00:00
|
|
|
//const socket = openSocket(process.env.REACT_APP_BACKEND_URL)
|
2023-07-20 15:30:26 +00:00
|
|
|
|
2024-05-09 18:59:02 +00:00
|
|
|
const onSettingsSettings = (data) => {
|
2023-07-20 15:30:26 +00:00
|
|
|
console.log('settings updated ----------------------------')
|
|
|
|
|
|
|
|
if (data.action === 'update') {
|
|
|
|
setSettings((prevState) => {
|
|
|
|
const aux = [...prevState]
|
|
|
|
const settingIndex = aux.findIndex((s) => s.key === data.setting.key)
|
|
|
|
aux[settingIndex].value = data.setting.value
|
|
|
|
return aux
|
|
|
|
})
|
|
|
|
}
|
2024-05-09 18:59:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
socket.on('settings', onSettingsSettings)
|
2023-07-20 15:30:26 +00:00
|
|
|
|
|
|
|
return () => {
|
2024-05-09 18:59:02 +00:00
|
|
|
socket.off("settings", onSettingsSettings)
|
2023-07-20 15:30:26 +00:00
|
|
|
}
|
|
|
|
}, [])
|
|
|
|
|
|
|
|
|
|
|
|
const handleChangeSetting = async (e) => {
|
|
|
|
const selectedValue = e.target.value
|
2024-04-23 22:51:11 +00:00
|
|
|
const settingKey = e.target.name
|
2023-07-20 15:30:26 +00:00
|
|
|
|
|
|
|
try {
|
|
|
|
await api.put(`/settings/${settingKey}`, {
|
|
|
|
value: selectedValue,
|
2024-04-23 22:51:11 +00:00
|
|
|
// obj: e.target?.obj ? e.target.obj : null
|
2023-07-20 15:30:26 +00:00
|
|
|
})
|
2024-04-12 21:33:15 +00:00
|
|
|
|
|
|
|
if (settingKey === 'farewellMessageByQueue' &&
|
|
|
|
selectedValue === 'enabled' &&
|
|
|
|
getSettingValue('farewellMessageByStatusChatEnd') === 'enabled') {
|
|
|
|
await api.put(`/settings/farewellMessageByStatusChatEnd`, {
|
|
|
|
value: 'disabled',
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
if (settingKey === 'farewellMessageByStatusChatEnd' &&
|
|
|
|
selectedValue === 'enabled' &&
|
|
|
|
getSettingValue('farewellMessageByQueue') === 'enabled') {
|
|
|
|
await api.put(`/settings/farewellMessageByQueue`, {
|
|
|
|
value: 'disabled',
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2023-07-20 15:30:26 +00:00
|
|
|
toast.success(i18n.t('settings.success'))
|
|
|
|
} catch (err) {
|
|
|
|
toastError(err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-04-23 22:51:11 +00:00
|
|
|
const getSettingValue = (key, _obj = false) => {
|
|
|
|
const { value, obj } = settings.find((s) => s.key === key)
|
|
|
|
|
|
|
|
if (_obj)
|
|
|
|
return obj
|
2023-07-20 15:30:26 +00:00
|
|
|
|
|
|
|
return value
|
|
|
|
}
|
|
|
|
|
2024-04-23 22:51:11 +00:00
|
|
|
const isSaveDisabled = (settings &&
|
|
|
|
settings.length > 0 &&
|
|
|
|
getSettingValue('remoteTicketSendControll') === 'disabled')
|
|
|
|
|
|
|
|
|
2023-07-20 15:30:26 +00:00
|
|
|
return (
|
|
|
|
<Can
|
|
|
|
role={user.profile}
|
|
|
|
perform="settings-view:show"
|
|
|
|
yes={() => (
|
|
|
|
<div>
|
|
|
|
<div className={classes.root}>
|
|
|
|
<Container className={classes.container} maxWidth="sm">
|
|
|
|
<Typography variant="body2" gutterBottom>
|
|
|
|
{i18n.t('settings.title')}
|
|
|
|
</Typography>
|
|
|
|
|
|
|
|
<Paper className={classes.paper}>
|
|
|
|
<Typography variant="body1">
|
|
|
|
{i18n.t('settings.settings.userCreation.name')}
|
|
|
|
</Typography>
|
|
|
|
|
|
|
|
<Select
|
|
|
|
margin="dense"
|
|
|
|
variant="outlined"
|
|
|
|
native
|
|
|
|
id="userCreation-setting"
|
|
|
|
name="userCreation"
|
|
|
|
value={
|
|
|
|
settings &&
|
|
|
|
settings.length > 0 &&
|
|
|
|
getSettingValue('userCreation')
|
|
|
|
}
|
|
|
|
className={classes.settingOption}
|
|
|
|
onChange={handleChangeSetting}
|
|
|
|
>
|
|
|
|
<option value="enabled">
|
|
|
|
{i18n.t('settings.settings.userCreation.options.enabled')}
|
|
|
|
</option>
|
|
|
|
<option value="disabled">
|
|
|
|
{i18n.t('settings.settings.userCreation.options.disabled')}
|
|
|
|
</option>
|
|
|
|
</Select>
|
|
|
|
</Paper>
|
|
|
|
</Container>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div className={classes.root}>
|
|
|
|
<Container className={classes.container} maxWidth="sm">
|
|
|
|
<Paper className={classes.paper}>
|
|
|
|
<Typography variant="body1">Editar ura</Typography>
|
|
|
|
|
|
|
|
<Select
|
|
|
|
margin="dense"
|
|
|
|
variant="outlined"
|
|
|
|
native
|
|
|
|
id="editURA-setting"
|
|
|
|
name="editURA"
|
|
|
|
value={
|
|
|
|
settings &&
|
|
|
|
settings.length > 0 &&
|
|
|
|
getSettingValue('editURA')
|
|
|
|
}
|
|
|
|
className={classes.settingOption}
|
|
|
|
onChange={handleChangeSetting}
|
|
|
|
>
|
|
|
|
<option value="enabled">Ativado</option>
|
|
|
|
<option value="disabled">Desativado</option>
|
|
|
|
</Select>
|
|
|
|
</Paper>
|
|
|
|
</Container>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div className={classes.root}>
|
|
|
|
<Container className={classes.container} maxWidth="sm">
|
|
|
|
<Paper className={classes.paper}>
|
|
|
|
<Typography variant="body1">Editar fila</Typography>
|
|
|
|
|
|
|
|
<Select
|
|
|
|
margin="dense"
|
|
|
|
variant="outlined"
|
|
|
|
native
|
|
|
|
id="editQueue-setting"
|
|
|
|
name="editQueue"
|
|
|
|
value={
|
|
|
|
settings &&
|
|
|
|
settings.length > 0 &&
|
|
|
|
getSettingValue('editQueue')
|
|
|
|
}
|
|
|
|
className={classes.settingOption}
|
|
|
|
onChange={handleChangeSetting}
|
|
|
|
>
|
|
|
|
<option value="enabled">Ativado</option>
|
|
|
|
<option value="disabled">Desativado</option>
|
|
|
|
</Select>
|
|
|
|
</Paper>
|
|
|
|
</Container>
|
|
|
|
</div>
|
2023-07-28 12:25:13 +00:00
|
|
|
|
|
|
|
<div className={classes.root}>
|
|
|
|
<Container className={classes.container} maxWidth="sm">
|
|
|
|
<Paper className={classes.paper}>
|
|
|
|
<Typography variant="body1">
|
|
|
|
Contato conversar com whatsapps distintos no omnihit
|
|
|
|
</Typography>
|
|
|
|
|
|
|
|
<Select
|
|
|
|
margin="dense"
|
|
|
|
variant="outlined"
|
|
|
|
native
|
|
|
|
id="oneContactChatWithManyWhats-setting"
|
|
|
|
name="oneContactChatWithManyWhats"
|
|
|
|
value={
|
|
|
|
settings &&
|
|
|
|
settings.length > 0 &&
|
|
|
|
getSettingValue('oneContactChatWithManyWhats')
|
|
|
|
}
|
|
|
|
className={classes.settingOption}
|
|
|
|
onChange={handleChangeSetting}
|
|
|
|
>
|
|
|
|
<option value="enabled">Ativado</option>
|
|
|
|
<option value="disabled">Desativado</option>
|
|
|
|
</Select>
|
|
|
|
</Paper>
|
|
|
|
</Container>
|
|
|
|
</div>
|
2023-08-28 17:05:53 +00:00
|
|
|
|
|
|
|
|
|
|
|
<div className={classes.root}>
|
|
|
|
<Container className={classes.container} maxWidth="sm">
|
|
|
|
<Paper className={classes.paper}>
|
|
|
|
<Typography variant="body1">
|
|
|
|
Whatsapp Cloud API
|
|
|
|
</Typography>
|
|
|
|
|
|
|
|
<Select
|
|
|
|
margin="dense"
|
|
|
|
variant="outlined"
|
|
|
|
native
|
|
|
|
id="whatsaAppCloudApi-setting"
|
|
|
|
name="whatsaAppCloudApi"
|
|
|
|
value={
|
|
|
|
settings &&
|
|
|
|
settings.length > 0 &&
|
|
|
|
getSettingValue('whatsaAppCloudApi')
|
|
|
|
}
|
|
|
|
className={classes.settingOption}
|
|
|
|
onChange={handleChangeSetting}
|
|
|
|
>
|
|
|
|
<option value="enabled">Ativado</option>
|
|
|
|
<option value="disabled">Desativado</option>
|
|
|
|
</Select>
|
|
|
|
</Paper>
|
|
|
|
</Container>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
2024-01-29 11:48:20 +00:00
|
|
|
<div className={classes.root}>
|
|
|
|
<Container className={classes.container} maxWidth="sm">
|
|
|
|
<Paper className={classes.paper}>
|
|
|
|
<Typography variant="body1">
|
|
|
|
Escopo de transferência de usuario por filas atribuidas a conexão e usuarios atribuido a filas
|
|
|
|
</Typography>
|
|
|
|
|
|
|
|
<Select
|
|
|
|
margin="dense"
|
|
|
|
variant="outlined"
|
|
|
|
native
|
|
|
|
id="queueTransferByWhatsappScope-setting"
|
|
|
|
name="queueTransferByWhatsappScope"
|
|
|
|
value={
|
|
|
|
settings &&
|
|
|
|
settings.length > 0 &&
|
|
|
|
getSettingValue('queueTransferByWhatsappScope')
|
|
|
|
}
|
|
|
|
className={classes.settingOption}
|
|
|
|
onChange={handleChangeSetting}
|
|
|
|
>
|
|
|
|
<option value="enabled">Ativado</option>
|
|
|
|
<option value="disabled">Desativado</option>
|
|
|
|
</Select>
|
|
|
|
</Paper>
|
|
|
|
</Container>
|
|
|
|
</div>
|
|
|
|
|
2024-02-01 20:16:56 +00:00
|
|
|
<div className={classes.root}>
|
|
|
|
<Container className={classes.container} maxWidth="sm">
|
|
|
|
<Paper className={classes.paper}>
|
|
|
|
<Typography variant="body1">
|
|
|
|
Modulo campanha
|
|
|
|
</Typography>
|
|
|
|
|
|
|
|
<Select
|
|
|
|
margin="dense"
|
|
|
|
variant="outlined"
|
|
|
|
native
|
|
|
|
id="hasCampaign-setting"
|
|
|
|
name="hasCampaign"
|
|
|
|
value={
|
|
|
|
settings &&
|
|
|
|
settings.length > 0 &&
|
|
|
|
getSettingValue('hasCampaign')
|
|
|
|
}
|
|
|
|
className={classes.settingOption}
|
|
|
|
onChange={handleChangeSetting}
|
|
|
|
>
|
|
|
|
<option value="enabled">Ativado</option>
|
|
|
|
<option value="disabled">Desativado</option>
|
|
|
|
</Select>
|
|
|
|
</Paper>
|
|
|
|
</Container>
|
|
|
|
</div>
|
2024-01-29 11:48:20 +00:00
|
|
|
|
2024-04-12 21:33:15 +00:00
|
|
|
|
|
|
|
<div className={classes.root}>
|
|
|
|
<Container className={classes.container} maxWidth="sm">
|
|
|
|
<Paper className={classes.paper}>
|
|
|
|
<Typography variant="body1">
|
|
|
|
Respostas rápidas por fila
|
|
|
|
</Typography>
|
|
|
|
|
|
|
|
<Select
|
|
|
|
margin="dense"
|
|
|
|
variant="outlined"
|
|
|
|
native
|
|
|
|
id="quickAnswerByQueue-setting"
|
|
|
|
name="quickAnswerByQueue"
|
|
|
|
value={
|
|
|
|
settings &&
|
|
|
|
settings.length > 0 &&
|
|
|
|
getSettingValue('quickAnswerByQueue')
|
|
|
|
}
|
|
|
|
className={classes.settingOption}
|
|
|
|
onChange={handleChangeSetting}
|
|
|
|
>
|
|
|
|
<option value="enabled">Ativado</option>
|
|
|
|
<option value="disabled">Desativado</option>
|
|
|
|
</Select>
|
|
|
|
</Paper>
|
|
|
|
</Container>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div className={classes.root}>
|
|
|
|
<Container className={classes.container} maxWidth="sm">
|
|
|
|
<Paper className={classes.paper}>
|
|
|
|
<Typography variant="body1">
|
|
|
|
Mensagem de encerramento por fila
|
|
|
|
</Typography>
|
|
|
|
|
|
|
|
<Select
|
|
|
|
margin="dense"
|
|
|
|
variant="outlined"
|
|
|
|
native
|
|
|
|
id="farewellMessageByQueue-setting"
|
|
|
|
name="farewellMessageByQueue"
|
|
|
|
value={
|
|
|
|
settings &&
|
|
|
|
settings.length > 0 &&
|
|
|
|
getSettingValue('farewellMessageByQueue')
|
|
|
|
}
|
|
|
|
className={classes.settingOption}
|
|
|
|
onChange={handleChangeSetting}
|
|
|
|
>
|
|
|
|
<option value="enabled">Ativado</option>
|
|
|
|
<option value="disabled">Desativado</option>
|
|
|
|
</Select>
|
|
|
|
</Paper>
|
|
|
|
</Container>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div className={classes.root}>
|
|
|
|
<Container className={classes.container} maxWidth="sm">
|
|
|
|
<Paper className={classes.paper}>
|
|
|
|
<Typography variant="body1">
|
|
|
|
Mensagem de encerramento por status de fechamento
|
|
|
|
</Typography>
|
|
|
|
|
|
|
|
<Select
|
|
|
|
margin="dense"
|
|
|
|
variant="outlined"
|
|
|
|
native
|
|
|
|
id="farewellMessageByStatusChatEnd-setting"
|
|
|
|
name="farewellMessageByStatusChatEnd"
|
|
|
|
value={
|
|
|
|
settings &&
|
|
|
|
settings.length > 0 &&
|
|
|
|
getSettingValue('farewellMessageByStatusChatEnd')
|
|
|
|
}
|
|
|
|
className={classes.settingOption}
|
|
|
|
onChange={handleChangeSetting}
|
|
|
|
>
|
|
|
|
<option value="enabled">Ativado</option>
|
|
|
|
<option value="disabled">Desativado</option>
|
|
|
|
</Select>
|
|
|
|
</Paper>
|
|
|
|
</Container>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div className={classes.root}>
|
|
|
|
<Container className={classes.container} maxWidth="sm">
|
|
|
|
<Paper className={classes.paper}>
|
|
|
|
<Typography variant="body1">
|
|
|
|
Exibir contatos por fila
|
|
|
|
</Typography>
|
|
|
|
|
|
|
|
<Select
|
|
|
|
margin="dense"
|
|
|
|
variant="outlined"
|
|
|
|
native
|
|
|
|
id="contactByqueues-setting"
|
|
|
|
name="contactByqueues"
|
|
|
|
value={
|
|
|
|
settings &&
|
|
|
|
settings.length > 0 &&
|
|
|
|
getSettingValue('contactByqueues')
|
|
|
|
}
|
|
|
|
className={classes.settingOption}
|
|
|
|
onChange={handleChangeSetting}
|
|
|
|
>
|
|
|
|
<option value="enabled">Ativado</option>
|
|
|
|
<option value="disabled">Desativado</option>
|
|
|
|
</Select>
|
|
|
|
</Paper>
|
|
|
|
</Container>
|
|
|
|
</div>
|
|
|
|
|
2024-04-23 22:51:11 +00:00
|
|
|
<div className={classes.root}>
|
|
|
|
<Container className={classes.container} maxWidth="sm">
|
|
|
|
<Paper className={classes.paper}>
|
|
|
|
<Typography variant="body1">
|
|
|
|
Controle de envio de mensagem de ticket remoto por numero
|
|
|
|
</Typography>
|
|
|
|
|
|
|
|
<Select
|
|
|
|
margin="dense"
|
|
|
|
variant="outlined"
|
|
|
|
native
|
|
|
|
id="remoteTicketSendControll-setting"
|
|
|
|
name="remoteTicketSendControll"
|
|
|
|
value={
|
|
|
|
settings &&
|
|
|
|
settings.length > 0 &&
|
|
|
|
getSettingValue('remoteTicketSendControll')
|
|
|
|
}
|
|
|
|
className={classes.settingOption}
|
|
|
|
onChange={handleChangeSetting}
|
|
|
|
>
|
|
|
|
<option value="enabled">Ativado</option>
|
|
|
|
<option value="disabled">Desativado</option>
|
|
|
|
</Select>
|
|
|
|
</Paper>
|
|
|
|
{/* <Paper>
|
|
|
|
<div style={{ padding: '10px', display: 'flex', flexDirection: 'column', alignItems: 'center' }}>
|
|
|
|
<h3>Tempo aleatorio em segundos</h3>
|
|
|
|
|
|
|
|
<div style={{ marginBottom: '20px', display: 'flex' }}>
|
|
|
|
<IntegerInput title="Number 1" value={number1} onChange={handleNumber1Change} />
|
|
|
|
<IntegerInput title="Number 2" value={number2} onChange={handleNumber2Change} />
|
|
|
|
<Button variant="contained" color="primary" onClick={handleGetValues} disabled={
|
|
|
|
(isSaveDisabled) ? true : false
|
|
|
|
}>
|
|
|
|
Save
|
|
|
|
</Button>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</Paper> */}
|
|
|
|
|
|
|
|
</Container>
|
|
|
|
</div>
|
|
|
|
|
2024-04-29 13:00:51 +00:00
|
|
|
<div className={classes.root}>
|
|
|
|
<Container className={classes.container} maxWidth="sm">
|
|
|
|
<Paper className={classes.paper}>
|
|
|
|
<Typography variant="body1">
|
|
|
|
Noficar quando entrar novo ticket na fila
|
|
|
|
</Typography>
|
|
|
|
|
|
|
|
<Select
|
|
|
|
margin="dense"
|
|
|
|
variant="outlined"
|
|
|
|
native
|
|
|
|
id="notificationTransferQueue-setting"
|
|
|
|
name="notificationTransferQueue"
|
|
|
|
value={
|
|
|
|
settings &&
|
|
|
|
settings.length > 0 &&
|
|
|
|
getSettingValue('notificationTransferQueue')
|
|
|
|
}
|
|
|
|
className={classes.settingOption}
|
|
|
|
onChange={handleChangeSetting}
|
|
|
|
>
|
|
|
|
<option value="enabled">Ativado</option>
|
|
|
|
<option value="disabled">Desativado</option>
|
|
|
|
</Select>
|
|
|
|
</Paper>
|
|
|
|
</Container>
|
|
|
|
</div>
|
|
|
|
<div className={classes.root}>
|
|
|
|
<Container className={classes.container} maxWidth="sm">
|
|
|
|
<Paper className={classes.paper}>
|
|
|
|
<Typography variant="body1">
|
|
|
|
Bloquear mídias de Audio e Video
|
|
|
|
</Typography>
|
|
|
|
|
|
|
|
<Select
|
|
|
|
margin="dense"
|
|
|
|
variant="outlined"
|
|
|
|
native
|
|
|
|
id="blockAudioVideoMedia-setting"
|
|
|
|
name="blockAudioVideoMedia"
|
|
|
|
value={
|
|
|
|
settings &&
|
|
|
|
settings.length > 0 &&
|
|
|
|
getSettingValue('blockAudioVideoMedia')
|
|
|
|
}
|
|
|
|
className={classes.settingOption}
|
|
|
|
onChange={handleChangeSetting}
|
|
|
|
>
|
|
|
|
<option value="enabled">Ativado</option>
|
|
|
|
<option value="disabled">Desativado</option>
|
|
|
|
</Select>
|
|
|
|
</Paper>
|
|
|
|
</Container>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div className={classes.root}>
|
|
|
|
<Container className={classes.container} maxWidth="sm">
|
|
|
|
<Paper className={classes.paper}>
|
|
|
|
<Typography variant="body1">
|
|
|
|
Mostrar tempo de espera dos tickets aguardando
|
|
|
|
</Typography>
|
|
|
|
|
|
|
|
<Select
|
|
|
|
margin="dense"
|
|
|
|
variant="outlined"
|
|
|
|
native
|
|
|
|
id="waitingTimeTickets-setting"
|
|
|
|
name="waitingTimeTickets"
|
|
|
|
value={
|
|
|
|
settings &&
|
|
|
|
settings.length > 0 &&
|
|
|
|
getSettingValue('waitingTimeTickets')
|
|
|
|
}
|
|
|
|
className={classes.settingOption}
|
|
|
|
onChange={handleChangeSetting}
|
|
|
|
>
|
|
|
|
<option value="enabled">Ativado</option>
|
|
|
|
<option value="disabled">Desativado</option>
|
|
|
|
</Select>
|
|
|
|
</Paper>
|
|
|
|
</Container>
|
2024-05-09 18:59:02 +00:00
|
|
|
</div>
|
2023-07-20 15:30:26 +00:00
|
|
|
</div>
|
|
|
|
)}
|
|
|
|
/>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
2024-04-23 22:51:11 +00:00
|
|
|
|
|
|
|
|
2023-07-20 15:30:26 +00:00
|
|
|
export default Settings
|