2022-02-27 20:05:21 +00:00
|
|
|
|
|
|
|
import React, { useState, useEffect, useRef } from 'react';
|
2022-02-27 04:35:56 +00:00
|
|
|
import Button from '@mui/material/Button';
|
|
|
|
import Dialog from '@mui/material/Dialog';
|
|
|
|
import DialogActions from '@mui/material/DialogActions';
|
|
|
|
|
|
|
|
import DialogContent from '@mui/material/DialogContent';
|
|
|
|
import DialogContentText from '@mui/material/DialogContentText';
|
2022-03-10 11:24:10 +00:00
|
|
|
import DialogTitle from '@mui/material/DialogTitle';
|
2022-02-27 04:35:56 +00:00
|
|
|
import PropTypes from 'prop-types';
|
2022-03-10 11:24:10 +00:00
|
|
|
import Box from '@mui/material/Box';
|
2022-02-27 04:35:56 +00:00
|
|
|
import SelectField from "../../Report/SelectField";
|
2022-03-11 03:01:58 +00:00
|
|
|
|
|
|
|
import TextFieldSelectHourBefore from '@mui/material/TextField';
|
|
|
|
import MenuItem from '@mui/material/MenuItem';
|
|
|
|
|
2022-03-10 11:24:10 +00:00
|
|
|
import DatePicker from '../../Report/DatePicker'
|
2022-02-27 04:35:56 +00:00
|
|
|
import TimerPickerSelect from '../TimerPickerSelect'
|
2022-03-10 11:24:10 +00:00
|
|
|
|
|
|
|
// import MainHeader from "../../components/MainHeader";
|
|
|
|
// import MainHeaderButtonsWrapper from "../../components/MainHeaderButtonsWrapper";
|
|
|
|
// import TableRowSkeleton from "../../components/TableRowSkeleton";
|
|
|
|
// import Title from "../../components/Title";
|
2022-03-06 19:37:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
import TextareaAutosize from '@mui/material/TextareaAutosize';
|
2022-02-27 04:35:56 +00:00
|
|
|
|
2022-03-11 03:01:58 +00:00
|
|
|
import { addHours, subHours, subMinutes } from "date-fns";
|
2022-03-10 11:24:10 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import {
|
|
|
|
IconButton,
|
|
|
|
makeStyles,
|
|
|
|
Paper,
|
|
|
|
Table,
|
|
|
|
TableBody,
|
|
|
|
TableCell,
|
|
|
|
TableHead,
|
|
|
|
TableRow,
|
|
|
|
Typography,
|
|
|
|
} from "@material-ui/core";
|
|
|
|
|
|
|
|
const useStyles = makeStyles((theme) => ({
|
|
|
|
mainPaper: {
|
|
|
|
flex: 1,
|
|
|
|
padding: theme.spacing(1),
|
|
|
|
overflowY: "scroll",
|
|
|
|
...theme.scrollbarStyles,
|
|
|
|
},
|
|
|
|
customTableCell: {
|
|
|
|
display: "flex",
|
|
|
|
alignItems: "center",
|
|
|
|
justifyContent: "center",
|
|
|
|
},
|
|
|
|
}));
|
2022-02-27 04:35:56 +00:00
|
|
|
|
2022-02-27 20:05:21 +00:00
|
|
|
const Item = (props) => {
|
|
|
|
|
2022-02-27 04:35:56 +00:00
|
|
|
const { sx, ...other } = props;
|
|
|
|
return (
|
|
|
|
<Box
|
|
|
|
sx={{
|
|
|
|
bgcolor: (theme) => (theme.palette.mode === 'dark' ? '#101010' : '#fff'),
|
|
|
|
color: (theme) => (theme.palette.mode === 'dark' ? 'grey.300' : 'grey.800'),
|
|
|
|
border: '1px solid',
|
|
|
|
borderColor: (theme) =>
|
|
|
|
theme.palette.mode === 'dark' ? 'grey.800' : 'grey.300',
|
|
|
|
p: 1,
|
|
|
|
m: 1,
|
|
|
|
borderRadius: 2,
|
|
|
|
fontSize: '0.875rem',
|
|
|
|
fontWeight: '700',
|
|
|
|
...sx,
|
|
|
|
}}
|
|
|
|
{...other}
|
|
|
|
/>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
Item.propTypes = {
|
|
|
|
sx: PropTypes.oneOfType([
|
|
|
|
PropTypes.arrayOf(
|
|
|
|
PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool]),
|
|
|
|
),
|
|
|
|
PropTypes.func,
|
|
|
|
PropTypes.object,
|
|
|
|
]),
|
|
|
|
};
|
|
|
|
|
2022-03-11 03:01:58 +00:00
|
|
|
|
2022-02-27 04:35:56 +00:00
|
|
|
|
|
|
|
const Modal = (props) => {
|
2022-03-07 02:19:35 +00:00
|
|
|
|
2022-03-10 11:24:10 +00:00
|
|
|
const classes = useStyles();
|
2022-03-07 02:19:35 +00:00
|
|
|
|
2022-02-27 20:05:21 +00:00
|
|
|
const [open, setOpen] = useState(true);
|
|
|
|
const [scroll, /*setScroll*/] = useState('body');
|
2022-02-28 18:17:36 +00:00
|
|
|
const [scheduleId, setScheduling] = useState(null)
|
2022-03-07 02:19:35 +00:00
|
|
|
const [startDate, setDatePicker] = useState(new Date())
|
2022-02-27 20:05:21 +00:00
|
|
|
const [timerPicker, setTimerPicker] = useState(new Date())
|
2022-03-07 02:19:35 +00:00
|
|
|
const [textArea1, setTextArea1] = useState()
|
2022-03-06 19:37:09 +00:00
|
|
|
|
2022-02-28 13:51:11 +00:00
|
|
|
|
2022-03-07 02:19:35 +00:00
|
|
|
const [data] = useState(props.schedules)
|
2022-03-11 03:01:58 +00:00
|
|
|
|
2022-03-10 11:24:10 +00:00
|
|
|
const [schedulesContact] = useState(props.schedulesContact)
|
2022-03-11 03:01:58 +00:00
|
|
|
|
|
|
|
const [currencyHourBefore, setCurrency] = useState(formatedTimeHour(subHours(timerPicker,1)));
|
|
|
|
const [currenciesTimeBefore, setCurrenciesTimeBefore] = useState( );
|
|
|
|
const [test, setTest] = useState(null);
|
2022-02-27 04:35:56 +00:00
|
|
|
|
2022-02-28 13:51:11 +00:00
|
|
|
const handleCancel = (event, reason) => {
|
2022-02-27 04:35:56 +00:00
|
|
|
|
2022-02-27 20:05:21 +00:00
|
|
|
if (reason && reason === "backdropClick")
|
2022-02-27 04:35:56 +00:00
|
|
|
return;
|
2022-03-07 02:19:35 +00:00
|
|
|
|
2022-02-27 04:35:56 +00:00
|
|
|
setOpen(false);
|
|
|
|
};
|
2022-03-06 19:37:09 +00:00
|
|
|
|
2022-03-07 02:19:35 +00:00
|
|
|
|
2022-03-11 03:01:58 +00:00
|
|
|
|
2022-03-06 19:37:09 +00:00
|
|
|
|
|
|
|
function greetMessageSchedule(scheduleDate){
|
|
|
|
return `podemos confirmar sua consulta agendada para hoje às ${scheduleDate}?`
|
|
|
|
}
|
2022-02-28 13:51:11 +00:00
|
|
|
|
2022-03-06 19:37:09 +00:00
|
|
|
function formatedTimeHour(timer){
|
|
|
|
return `${timer.getHours().toString().padStart(2, '0')}:${timer.getMinutes().toString().padStart(2, '0')}`
|
|
|
|
}
|
2022-02-27 04:35:56 +00:00
|
|
|
|
2022-03-11 03:01:58 +00:00
|
|
|
function hoursBeforeAvalible(timer){
|
|
|
|
|
|
|
|
|
|
|
|
let hours = []
|
|
|
|
let hour = 1
|
|
|
|
|
|
|
|
while(subHours(timer, hour).getHours()>=6 /*&& subHours(timer, hour).getHours()>=new Date().getHours()*/){
|
|
|
|
|
|
|
|
console.log('******** TIMER: ', formatedTimeHour(subHours(timer,hour)))
|
|
|
|
|
|
|
|
hours.push(
|
|
|
|
{value: formatedTimeHour(subHours(timer,hour)),
|
|
|
|
label: `${hour} HORA ANTES DO HORÁRIO DO AGENDAMENTO`})
|
|
|
|
|
|
|
|
hour++;
|
|
|
|
}
|
|
|
|
|
|
|
|
if(hours){
|
|
|
|
setCurrency(hours[0].value)
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return hours
|
|
|
|
|
|
|
|
console.log('HOURS: ',hours)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2022-03-07 02:19:35 +00:00
|
|
|
|
|
|
|
// Get from child 2
|
|
|
|
const datePickerValue = (data) => {
|
|
|
|
console.log('datePickerValue: ',(data));
|
|
|
|
setDatePicker(data)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Get from child 3
|
|
|
|
const timerPickerValue = (data) => {
|
|
|
|
console.log('timerPickerValue: ',(data));
|
|
|
|
setTimerPicker(data)
|
|
|
|
}
|
|
|
|
|
|
|
|
const dateCurrentFormated = () => {
|
|
|
|
|
|
|
|
let date = new Date()
|
|
|
|
let day = date.getDate().toString().padStart(2, '0');
|
|
|
|
let month = (date.getMonth()+1).toString().padStart(2, '0');
|
|
|
|
let year = date.getFullYear();
|
|
|
|
|
|
|
|
return `${year}-${month}-${day}`
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
const handleChatEnd = (event, reason) => {
|
2022-03-11 03:01:58 +00:00
|
|
|
|
2022-02-27 21:04:31 +00:00
|
|
|
|
|
|
|
if (reason && reason === "backdropClick")
|
|
|
|
return;
|
2022-03-06 19:37:09 +00:00
|
|
|
|
|
|
|
if (scheduleId === '1'){
|
|
|
|
}
|
|
|
|
else if(textArea1.trim().length<10){
|
|
|
|
alert('Mensagem muito curta!\nMínimo 10 caracteres.')
|
|
|
|
return
|
|
|
|
}
|
2022-03-10 11:24:10 +00:00
|
|
|
else if((new Date(timerPicker).getHours() > 20 && new Date(timerPicker).getMinutes() > 0) ||
|
2022-03-06 19:37:09 +00:00
|
|
|
(new Date(timerPicker).getHours() < 7)){
|
2022-03-10 11:24:10 +00:00
|
|
|
alert('Horário comercial inválido!\n Selecione um horário de lembrete válido entre às 07:00 e 20:00')
|
2022-03-06 19:37:09 +00:00
|
|
|
return
|
|
|
|
}
|
2022-03-11 03:01:58 +00:00
|
|
|
// else if(startDate === dateCurrentFormated()){
|
|
|
|
// if(
|
|
|
|
// (new Date(subHours(timerPicker, 1)).getHours() <= new Date().getHours() &&
|
|
|
|
// new Date(subHours(timerPicker, 1)).getMinutes() <= new Date().getMinutes()) ||
|
2022-03-10 11:24:10 +00:00
|
|
|
|
2022-03-11 03:01:58 +00:00
|
|
|
// (new Date(subHours(timerPicker, 1)).getHours() == new Date().getHours() &&
|
|
|
|
// new Date(subHours(timerPicker, 1)).getMinutes() <= new Date().getMinutes())
|
|
|
|
|
|
|
|
// )
|
|
|
|
// {
|
|
|
|
|
|
|
|
// alert('Para agendamentos do dia, é necessário que o horário do lembrete seja no mínimo uma hora adiantado!')
|
|
|
|
|
|
|
|
// return
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-02-28 13:51:11 +00:00
|
|
|
|
2022-03-07 02:19:35 +00:00
|
|
|
props.func({
|
2022-03-11 03:01:58 +00:00
|
|
|
'scheduleId': scheduleId,
|
|
|
|
// 'schedulingDate': startDate+' '+formatedTimeHour(subHours(new Date(`${startDate} ${timerPicker.getHours()}:${timerPicker.getMinutes()}:${timerPicker.getSeconds()}`), 1))+':00',
|
2022-03-10 11:24:10 +00:00
|
|
|
// 'schedulingDate': `${startDate} ${timerPicker.getHours()}:${timerPicker.getMinutes()}:${timerPicker.getSeconds()}`,
|
2022-03-11 03:01:58 +00:00
|
|
|
'schedulingDate': `${startDate} ${currencyHourBefore}:00`,
|
2022-03-07 02:19:35 +00:00
|
|
|
'message': textArea1
|
2022-03-11 03:01:58 +00:00
|
|
|
});
|
|
|
|
|
2022-03-10 11:24:10 +00:00
|
|
|
|
2022-02-27 21:04:31 +00:00
|
|
|
setOpen(false);
|
|
|
|
};
|
2022-03-06 19:37:09 +00:00
|
|
|
|
2022-02-27 21:04:31 +00:00
|
|
|
|
2022-02-27 20:05:21 +00:00
|
|
|
const descriptionElementRef = useRef(null);
|
|
|
|
useEffect(() => {
|
2022-02-27 04:35:56 +00:00
|
|
|
if (open) {
|
|
|
|
const { current: descriptionElement } = descriptionElementRef;
|
|
|
|
if (descriptionElement !== null) {
|
|
|
|
descriptionElement.focus();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}, [open]);
|
|
|
|
|
|
|
|
|
|
|
|
// Get from child 1
|
|
|
|
const textFieldSelect = (data) => {
|
|
|
|
console.log('textFieldSelect: ',data);
|
|
|
|
setScheduling(data)
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2022-03-11 03:01:58 +00:00
|
|
|
const handleChangeHourBefore = (event) => {
|
|
|
|
|
|
|
|
console.log('textFihandleChangeHourBefore: ',event.target.value);
|
|
|
|
|
|
|
|
setCurrency(event.target.value);
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-02-27 04:35:56 +00:00
|
|
|
|
|
|
|
// Get from child 4
|
2022-03-06 19:37:09 +00:00
|
|
|
// const textArea1Value = (data) => {
|
|
|
|
// console.log('textArea1Value: ',(data));
|
|
|
|
// setTextArea1(data)
|
|
|
|
// }
|
|
|
|
|
|
|
|
useEffect(()=>{
|
|
|
|
|
2022-03-10 11:24:10 +00:00
|
|
|
if (parseInt(timerPicker.getHours()) > 11 && parseInt(timerPicker.getHours()) < 18){
|
|
|
|
// setTextArea1('Boa tarde, '+greetMessageSchedule( formatedTimeHour(addHours(new Date(timerPicker), 1))))
|
|
|
|
setTextArea1('Boa tarde, '+greetMessageSchedule( formatedTimeHour(new Date(timerPicker), 1)))
|
2022-03-06 19:37:09 +00:00
|
|
|
}
|
|
|
|
else if(parseInt(timerPicker.getHours()) < 12){
|
2022-03-10 11:24:10 +00:00
|
|
|
// setTextArea1('Bom dia, '+greetMessageSchedule( formatedTimeHour(addHours(new Date(timerPicker), 1))))
|
|
|
|
setTextArea1('Bom dia, '+greetMessageSchedule( formatedTimeHour(new Date(timerPicker), 1)))
|
2022-03-06 19:37:09 +00:00
|
|
|
}
|
2022-03-10 11:24:10 +00:00
|
|
|
else if(parseInt(timerPicker.getHours()) > 17){
|
2022-03-06 19:37:09 +00:00
|
|
|
|
2022-03-10 11:24:10 +00:00
|
|
|
// setTextArea1('Boa noite, '+greetMessageSchedule( formatedTimeHour(addHours(new Date(timerPicker), 1))))
|
|
|
|
setTextArea1('Boa noite, '+greetMessageSchedule( formatedTimeHour(new Date(timerPicker), 1)))
|
2022-03-06 19:37:09 +00:00
|
|
|
}
|
2022-03-11 03:01:58 +00:00
|
|
|
|
|
|
|
setCurrenciesTimeBefore(hoursBeforeAvalible(timerPicker))
|
|
|
|
|
2022-03-06 19:37:09 +00:00
|
|
|
|
|
|
|
},[timerPicker])
|
|
|
|
|
|
|
|
|
|
|
|
const handleChange = (event) => {
|
|
|
|
|
|
|
|
setTextArea1(event.target.value);
|
2022-02-27 21:04:31 +00:00
|
|
|
|
|
|
|
};
|
2022-03-11 03:01:58 +00:00
|
|
|
|
|
|
|
|
2022-02-27 04:35:56 +00:00
|
|
|
|
2022-02-27 20:05:21 +00:00
|
|
|
return (
|
|
|
|
|
|
|
|
|
|
|
|
<Dialog
|
2022-02-27 04:35:56 +00:00
|
|
|
open={open}
|
2022-02-28 13:51:11 +00:00
|
|
|
onClose={handleCancel}
|
2022-02-27 04:35:56 +00:00
|
|
|
// fullWidth={true}
|
|
|
|
// maxWidth={true}
|
|
|
|
disableEscapeKeyDown
|
|
|
|
|
|
|
|
scroll={scroll}
|
|
|
|
aria-labelledby="scroll-dialog-title"
|
|
|
|
aria-describedby="scroll-dialog-description"
|
|
|
|
>
|
|
|
|
|
|
|
|
<DialogTitle id="scroll-dialog-title">{props.modal_header}</DialogTitle>
|
|
|
|
<DialogContent dividers={scroll === 'body'}>
|
2022-02-27 20:05:21 +00:00
|
|
|
|
2022-02-27 04:35:56 +00:00
|
|
|
<DialogContentText
|
|
|
|
id="scroll-dialog-description"
|
|
|
|
ref={descriptionElementRef}
|
|
|
|
tabIndex={-1}
|
|
|
|
>
|
2022-02-27 20:05:21 +00:00
|
|
|
|
|
|
|
</DialogContentText>
|
2022-03-06 19:37:09 +00:00
|
|
|
|
|
|
|
|
2022-02-27 04:35:56 +00:00
|
|
|
<Box
|
|
|
|
sx={{
|
|
|
|
width: 500,
|
2022-03-06 19:37:09 +00:00
|
|
|
height: '100%',
|
2022-02-27 04:35:56 +00:00
|
|
|
// backgroundColor: 'primary.dark',
|
|
|
|
// '&:hover': {backgroundColor: 'primary.main', opacity: [0.9, 0.8, 0.7],},
|
2022-02-27 21:04:31 +00:00
|
|
|
}}>
|
2022-02-27 20:05:21 +00:00
|
|
|
|
|
|
|
<Box sx={{
|
2022-02-27 04:35:56 +00:00
|
|
|
display: 'grid',
|
|
|
|
}}>
|
|
|
|
<Item>
|
2022-03-11 03:01:58 +00:00
|
|
|
<span>Selecione uma opção para encerrar o Atendimento</span>
|
|
|
|
|
|
|
|
<SelectField func={textFieldSelect}
|
|
|
|
emptyField={false}
|
|
|
|
header={'Opções de encerramento do atendimento'}
|
|
|
|
currencies={data.map((obj)=>{
|
2022-02-27 04:35:56 +00:00
|
|
|
return {'value': obj.id, 'label': obj.name}
|
|
|
|
})}/>
|
2022-03-11 03:01:58 +00:00
|
|
|
|
2022-02-27 04:35:56 +00:00
|
|
|
|
|
|
|
</Item>
|
|
|
|
|
2022-02-27 20:05:21 +00:00
|
|
|
</Box>
|
2022-03-06 19:37:09 +00:00
|
|
|
|
|
|
|
{scheduleId==='2' &&
|
|
|
|
|
|
|
|
<Item>
|
2022-02-27 20:05:21 +00:00
|
|
|
|
|
|
|
<span>Lembrete de retorno</span>
|
2022-02-27 04:35:56 +00:00
|
|
|
|
|
|
|
<Box sx={{ display: 'grid', gridTemplateColumns: 'repeat(2, 1fr)' }}>
|
|
|
|
|
2022-03-11 03:01:58 +00:00
|
|
|
<Item><DatePicker func={datePickerValue} minDate = {true} title={'Data do agendamento'}/></Item>
|
2022-02-27 04:35:56 +00:00
|
|
|
|
2022-03-11 03:01:58 +00:00
|
|
|
<Item><TimerPickerSelect func={timerPickerValue} title={'Hora do agendamento'}/></Item>
|
2022-02-27 04:35:56 +00:00
|
|
|
|
|
|
|
</Box>
|
|
|
|
|
|
|
|
|
2022-03-11 03:01:58 +00:00
|
|
|
<Box sx={{display: 'flex', flexDirection: 'column' }}>
|
|
|
|
|
|
|
|
<Item>
|
|
|
|
<TextFieldSelectHourBefore
|
|
|
|
id="outlined-select-currency"
|
|
|
|
select
|
|
|
|
label="Enviar mensagem para cliente"
|
|
|
|
value={currencyHourBefore}
|
|
|
|
size="small"
|
|
|
|
onChange={handleChangeHourBefore}
|
|
|
|
>
|
|
|
|
{currenciesTimeBefore.map((option) => (
|
|
|
|
<MenuItem key={option.value} value={option.value}>
|
|
|
|
{option.label}
|
|
|
|
</MenuItem>
|
|
|
|
))}
|
|
|
|
</TextFieldSelectHourBefore>
|
|
|
|
</Item>
|
|
|
|
|
2022-02-27 04:35:56 +00:00
|
|
|
|
2022-03-11 03:01:58 +00:00
|
|
|
<Item>
|
|
|
|
<TextareaAutosize
|
|
|
|
aria-label="minimum height"
|
|
|
|
minRows={3}
|
|
|
|
value={textArea1}
|
|
|
|
placeholder={'Mensagem para lembrar cliente'}
|
|
|
|
onChange={ handleChange}
|
|
|
|
style={{ width: '100%' }}
|
|
|
|
/>
|
|
|
|
</Item>
|
2022-02-27 21:04:31 +00:00
|
|
|
</Box>
|
2022-02-27 04:35:56 +00:00
|
|
|
|
|
|
|
</Item>
|
2022-03-06 19:37:09 +00:00
|
|
|
}
|
2022-03-10 11:24:10 +00:00
|
|
|
|
|
|
|
{/* <Item>
|
|
|
|
<MainHeader>
|
|
|
|
<Title>Titulo 1</Title>
|
|
|
|
<MainHeaderButtonsWrapper>
|
|
|
|
<Button
|
|
|
|
variant="contained"
|
|
|
|
color="primary"
|
|
|
|
// onClick={handleOpenQueueModal}
|
|
|
|
>
|
|
|
|
buttons add
|
|
|
|
</Button>
|
|
|
|
</MainHeaderButtonsWrapper>
|
|
|
|
</MainHeader>
|
|
|
|
<Paper variant="outlined">
|
|
|
|
<Table size="small">
|
|
|
|
<TableHead>
|
|
|
|
<TableRow>
|
|
|
|
<TableCell align="center">
|
|
|
|
table name
|
|
|
|
</TableCell>
|
|
|
|
<TableCell align="center">
|
|
|
|
table color
|
|
|
|
</TableCell>
|
|
|
|
<TableCell align="center">
|
|
|
|
table greeting
|
|
|
|
</TableCell>
|
|
|
|
<TableCell align="center">
|
|
|
|
table actions
|
|
|
|
</TableCell>
|
|
|
|
</TableRow>
|
|
|
|
</TableHead>
|
|
|
|
<TableBody>
|
|
|
|
<>
|
|
|
|
{schedulesContact.map((queue) => (
|
|
|
|
<TableRow key={queue.id}>
|
|
|
|
<TableCell align="center">{queue.name}</TableCell>
|
|
|
|
<TableCell align="center">
|
|
|
|
<div className={classes.customTableCell}>
|
|
|
|
<span
|
|
|
|
style={{
|
|
|
|
backgroundColor: queue.color,
|
|
|
|
width: 60,
|
|
|
|
height: 20,
|
|
|
|
alignSelf: "center",
|
|
|
|
}}
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</TableCell>
|
|
|
|
<TableCell align="center">
|
|
|
|
<div className={classes.customTableCell}>
|
|
|
|
<Typography
|
|
|
|
style={{ width: 300, align: "center" }}
|
|
|
|
noWrap
|
|
|
|
variant="body2"
|
|
|
|
>
|
|
|
|
{queue.greetingMessage}
|
|
|
|
</Typography>
|
|
|
|
</div>
|
|
|
|
</TableCell>
|
|
|
|
<TableCell align="center">
|
|
|
|
<IconButton
|
|
|
|
size="small"
|
|
|
|
// onClick={() => handleEditQueue(queue)}
|
|
|
|
>
|
|
|
|
<Edit />
|
|
|
|
</IconButton>
|
|
|
|
|
|
|
|
<IconButton
|
|
|
|
size="small"
|
|
|
|
onClick={() => {
|
|
|
|
setSelectedQueue(queue);
|
|
|
|
setConfirmModalOpen(true);
|
|
|
|
}}
|
|
|
|
>
|
|
|
|
<DeleteOutline />
|
|
|
|
</IconButton>
|
|
|
|
</TableCell>
|
|
|
|
</TableRow>
|
|
|
|
))}
|
|
|
|
{loading && <TableRowSkeleton columns={4} />}
|
|
|
|
</>
|
|
|
|
</TableBody>
|
|
|
|
</Table>
|
|
|
|
</Paper>
|
|
|
|
|
|
|
|
</Item> */}
|
2022-02-27 04:35:56 +00:00
|
|
|
|
2022-02-27 20:05:21 +00:00
|
|
|
</Box>
|
2022-02-27 04:35:56 +00:00
|
|
|
</DialogContent>
|
|
|
|
|
|
|
|
|
|
|
|
<DialogActions>
|
|
|
|
<div style={{marginRight:'50px'}}>
|
2022-02-28 13:51:11 +00:00
|
|
|
<Button onClick={handleCancel}>Cancelar</Button>
|
2022-02-27 04:35:56 +00:00
|
|
|
</div>
|
2022-02-27 21:04:31 +00:00
|
|
|
<Button onClick={handleChatEnd}>Ok</Button>
|
2022-02-27 04:35:56 +00:00
|
|
|
</DialogActions>
|
2022-02-27 20:05:21 +00:00
|
|
|
</Dialog>
|
|
|
|
|
2022-02-27 04:35:56 +00:00
|
|
|
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
export default Modal
|