identation code
parent
8c44a21e89
commit
40f5840edf
|
@ -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>
|
||||||
|
|
|
@ -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)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue