identation code
parent
8c44a21e89
commit
40f5840edf
|
@ -83,14 +83,14 @@ const Ticket = () => {
|
|||
const [contact, setContact] = useState({});
|
||||
const [ticket, setTicket] = useState({});
|
||||
|
||||
const [statusChatEnd, setStatusChatEnd] = useState({})
|
||||
const [statusChatEnd, setStatusChatEnd] = useState({})
|
||||
|
||||
useEffect(() => {
|
||||
setLoading(true);
|
||||
const delayDebounceFn = setTimeout(() => {
|
||||
const fetchTicket = async () => {
|
||||
try {
|
||||
|
||||
|
||||
// maria julia
|
||||
|
||||
const { data } = await api.get("/tickets/" + ticketId);
|
||||
|
@ -101,7 +101,7 @@ const Ticket = () => {
|
|||
setContact(data.contact.contact);
|
||||
setTicket(data.contact);
|
||||
|
||||
setStatusChatEnd(data.statusChatEnd)
|
||||
setStatusChatEnd(data.statusChatEnd)
|
||||
|
||||
setLoading(false);
|
||||
} catch (err) {
|
||||
|
@ -171,8 +171,8 @@ const Ticket = () => {
|
|||
onClick={handleDrawerOpen}
|
||||
/>
|
||||
</div>
|
||||
<div className={classes.ticketActionButtons}>
|
||||
<TicketActionButtons ticket={ticket} statusChatEnd={statusChatEnd}/>
|
||||
<div className={classes.ticketActionButtons}>
|
||||
<TicketActionButtons ticket={ticket} statusChatEnd={statusChatEnd} />
|
||||
</div>
|
||||
</TicketHeader>
|
||||
<ReplyMessageProvider>
|
||||
|
|
|
@ -29,9 +29,10 @@ const useStyles = makeStyles(theme => ({
|
|||
},
|
||||
}));
|
||||
|
||||
const TicketActionButtons = ({ ticket, statusChatEnd }) => {
|
||||
const TicketActionButtons = ({ ticket, statusChatEnd }) => {
|
||||
const classes = useStyles();
|
||||
const history = useHistory();
|
||||
const history = useHistory();
|
||||
|
||||
const [anchorEl, setAnchorEl] = useState(null);
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [useDialogflow, setUseDialogflow] = useState(ticket.contact.useDialogflow);
|
||||
|
@ -53,9 +54,7 @@ const TicketActionButtons = ({ ticket, statusChatEnd }) => {
|
|||
|
||||
if (data) {
|
||||
|
||||
data = { ...data, 'ticketId': ticket.id }
|
||||
|
||||
|
||||
data = { ...data, 'ticketId': ticket.id }
|
||||
|
||||
handleUpdateTicketStatus(null, "closed", user?.id, data)
|
||||
|
||||
|
|
Loading…
Reference in New Issue