identation code

pull/20/head
adriano 2023-06-19 21:02:50 -03:00
parent 8c44a21e89
commit 40f5840edf
2 changed files with 9 additions and 10 deletions

View File

@ -83,14 +83,14 @@ const Ticket = () => {
const [contact, setContact] = useState({}); const [contact, setContact] = useState({});
const [ticket, setTicket] = useState({}); const [ticket, setTicket] = useState({});
const [statusChatEnd, setStatusChatEnd] = useState({}) const [statusChatEnd, setStatusChatEnd] = useState({})
useEffect(() => { useEffect(() => {
setLoading(true); setLoading(true);
const delayDebounceFn = setTimeout(() => { const delayDebounceFn = setTimeout(() => {
const fetchTicket = async () => { const fetchTicket = async () => {
try { try {
// maria julia // maria julia
const { data } = await api.get("/tickets/" + ticketId); const { data } = await api.get("/tickets/" + ticketId);
@ -101,7 +101,7 @@ const Ticket = () => {
setContact(data.contact.contact); setContact(data.contact.contact);
setTicket(data.contact); setTicket(data.contact);
setStatusChatEnd(data.statusChatEnd) setStatusChatEnd(data.statusChatEnd)
setLoading(false); setLoading(false);
} catch (err) { } catch (err) {
@ -171,8 +171,8 @@ const Ticket = () => {
onClick={handleDrawerOpen} onClick={handleDrawerOpen}
/> />
</div> </div>
<div className={classes.ticketActionButtons}> <div className={classes.ticketActionButtons}>
<TicketActionButtons ticket={ticket} statusChatEnd={statusChatEnd}/> <TicketActionButtons ticket={ticket} statusChatEnd={statusChatEnd} />
</div> </div>
</TicketHeader> </TicketHeader>
<ReplyMessageProvider> <ReplyMessageProvider>

View File

@ -29,9 +29,10 @@ const useStyles = makeStyles(theme => ({
}, },
})); }));
const TicketActionButtons = ({ ticket, statusChatEnd }) => { const TicketActionButtons = ({ ticket, statusChatEnd }) => {
const classes = useStyles(); const classes = useStyles();
const history = useHistory(); const history = useHistory();
const [anchorEl, setAnchorEl] = useState(null); const [anchorEl, setAnchorEl] = useState(null);
const [loading, setLoading] = useState(false); const [loading, setLoading] = useState(false);
const [useDialogflow, setUseDialogflow] = useState(ticket.contact.useDialogflow); const [useDialogflow, setUseDialogflow] = useState(ticket.contact.useDialogflow);
@ -53,9 +54,7 @@ const TicketActionButtons = ({ ticket, statusChatEnd }) => {
if (data) { if (data) {
data = { ...data, 'ticketId': ticket.id } data = { ...data, 'ticketId': ticket.id }
handleUpdateTicketStatus(null, "closed", user?.id, data) handleUpdateTicketStatus(null, "closed", user?.id, data)