mirror of
https://github.com/cheveguerra/whaticket-community.git
synced 2026-04-19 04:09:26 +00:00
fix: block adding attachment on closed ticket (CTRL + V)
This commit is contained in:
@@ -328,7 +328,9 @@ const MessageInput = ({ ticketStatus }) => {
|
||||
value={inputMessage}
|
||||
onChange={handleChangeInput}
|
||||
disabled={recording || loading || ticketStatus !== "open"}
|
||||
onPaste={handleInputPaste}
|
||||
onPaste={e => {
|
||||
ticketStatus === "open" && handleInputPaste();
|
||||
}}
|
||||
onKeyPress={e => {
|
||||
if (loading || e.shiftKey) return;
|
||||
else if (e.key === "Enter") {
|
||||
|
||||
@@ -385,6 +385,14 @@ const Ticket = () => {
|
||||
};
|
||||
}, [ticketId, history]);
|
||||
|
||||
const handleDrawerOpen = () => {
|
||||
setDrawerOpen(true);
|
||||
};
|
||||
|
||||
const handleDrawerClose = () => {
|
||||
setDrawerOpen(false);
|
||||
};
|
||||
|
||||
const handleOpenMessageOptionsMenu = (e, messageId) => {
|
||||
setAnchorEl(e.currentTarget);
|
||||
setSelectedMessageId(messageId);
|
||||
@@ -471,14 +479,6 @@ const Ticket = () => {
|
||||
}
|
||||
};
|
||||
|
||||
const handleDrawerOpen = () => {
|
||||
setDrawerOpen(true);
|
||||
};
|
||||
|
||||
const handleDrawerClose = () => {
|
||||
setDrawerOpen(false);
|
||||
};
|
||||
|
||||
const renderMessageAck = message => {
|
||||
if (message.ack === 0) {
|
||||
return <AccessTimeIcon fontSize="small" className={classes.ackIcons} />;
|
||||
|
||||
Reference in New Issue
Block a user