mirror of
https://github.com/cheveguerra/whaticket-community.git
synced 2026-04-20 20:59:16 +00:00
Some style improovement
This commit is contained in:
@@ -26,9 +26,10 @@ const useStyles = makeStyles(theme => ({
|
|||||||
width: drawerWidth,
|
width: drawerWidth,
|
||||||
display: "flex",
|
display: "flex",
|
||||||
borderTop: "1px solid rgba(0, 0, 0, 0.12)",
|
borderTop: "1px solid rgba(0, 0, 0, 0.12)",
|
||||||
|
borderRight: "1px solid rgba(0, 0, 0, 0.12)",
|
||||||
|
borderBottom: "1px solid rgba(0, 0, 0, 0.12)",
|
||||||
borderTopRightRadius: 4,
|
borderTopRightRadius: 4,
|
||||||
borderBottomRightRadius: 4,
|
borderBottomRightRadius: 4,
|
||||||
backgroundColor: "#eee",
|
|
||||||
},
|
},
|
||||||
header: {
|
header: {
|
||||||
display: "flex",
|
display: "flex",
|
||||||
@@ -41,17 +42,16 @@ const useStyles = makeStyles(theme => ({
|
|||||||
},
|
},
|
||||||
content: {
|
content: {
|
||||||
display: "flex",
|
display: "flex",
|
||||||
|
backgroundColor: "#eee",
|
||||||
flexDirection: "column",
|
flexDirection: "column",
|
||||||
padding: "8px 0px 8px 8px",
|
padding: "8px 0px 8px 8px",
|
||||||
// backgroundColor: "red",
|
|
||||||
height: "100%",
|
height: "100%",
|
||||||
overflow: "scroll",
|
overflowY: "scroll",
|
||||||
"&::-webkit-scrollbar": {
|
"&::-webkit-scrollbar": {
|
||||||
width: "8px",
|
width: "8px",
|
||||||
height: "8px",
|
height: "8px",
|
||||||
},
|
},
|
||||||
"&::-webkit-scrollbar-thumb": {
|
"&::-webkit-scrollbar-thumb": {
|
||||||
// borderRadius: "2px",
|
|
||||||
boxShadow: "inset 0 0 6px rgba(0, 0, 0, 0.3)",
|
boxShadow: "inset 0 0 6px rgba(0, 0, 0, 0.3)",
|
||||||
backgroundColor: "#e8e8e8",
|
backgroundColor: "#e8e8e8",
|
||||||
},
|
},
|
||||||
@@ -97,13 +97,7 @@ const useStyles = makeStyles(theme => ({
|
|||||||
},
|
},
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const ContactDrawer = ({
|
const ContactDrawer = ({ open, handleDrawerClose, contact, loading }) => {
|
||||||
open,
|
|
||||||
children,
|
|
||||||
handleDrawerClose,
|
|
||||||
contact,
|
|
||||||
loading,
|
|
||||||
}) => {
|
|
||||||
const classes = useStyles();
|
const classes = useStyles();
|
||||||
|
|
||||||
const [modalOpen, setModalOpen] = useState(false);
|
const [modalOpen, setModalOpen] = useState(false);
|
||||||
|
|||||||
@@ -65,6 +65,7 @@ const useStyles = makeStyles(theme => ({
|
|||||||
|
|
||||||
messagesHeader: {
|
messagesHeader: {
|
||||||
display: "flex",
|
display: "flex",
|
||||||
|
cursor: "pointer",
|
||||||
backgroundColor: "#eee",
|
backgroundColor: "#eee",
|
||||||
flex: "none",
|
flex: "none",
|
||||||
borderBottom: "1px solid rgba(0, 0, 0, 0.12)",
|
borderBottom: "1px solid rgba(0, 0, 0, 0.12)",
|
||||||
@@ -229,10 +230,9 @@ const MessagesList = () => {
|
|||||||
const [hasMore, setHasMore] = useState(false);
|
const [hasMore, setHasMore] = useState(false);
|
||||||
const [searchParam, setSearchParam] = useState("");
|
const [searchParam, setSearchParam] = useState("");
|
||||||
const [pageNumber, setPageNumber] = useState(0);
|
const [pageNumber, setPageNumber] = useState(0);
|
||||||
|
const [drawerOpen, setDrawerOpen] = useState(false);
|
||||||
const lastMessageRef = useRef();
|
const lastMessageRef = useRef();
|
||||||
|
|
||||||
const [open, setOpen] = useState(true);
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setMessagesList([]);
|
setMessagesList([]);
|
||||||
}, [searchParam]);
|
}, [searchParam]);
|
||||||
@@ -366,7 +366,9 @@ const MessagesList = () => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleUpdateTicketStatus = async (status, userId) => {
|
const handleUpdateTicketStatus = async (e, status, userId) => {
|
||||||
|
e.preventDefault();
|
||||||
|
e.stopPropagation();
|
||||||
try {
|
try {
|
||||||
await api.put(`/tickets/${ticketId}`, {
|
await api.put(`/tickets/${ticketId}`, {
|
||||||
status: status,
|
status: status,
|
||||||
@@ -479,10 +481,10 @@ const MessagesList = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const handleDrawerOpen = () => {
|
const handleDrawerOpen = () => {
|
||||||
setOpen(true);
|
setDrawerOpen(true);
|
||||||
};
|
};
|
||||||
const handleDrawerClose = () => {
|
const handleDrawerClose = () => {
|
||||||
setOpen(false);
|
setDrawerOpen(false);
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -491,10 +493,14 @@ const MessagesList = () => {
|
|||||||
variant="outlined"
|
variant="outlined"
|
||||||
elevation={0}
|
elevation={0}
|
||||||
className={clsx(classes.mainWrapper, {
|
className={clsx(classes.mainWrapper, {
|
||||||
[classes.mainWrapperShift]: open,
|
[classes.mainWrapperShift]: drawerOpen,
|
||||||
})}
|
})}
|
||||||
>
|
>
|
||||||
<Card square className={classes.messagesHeader}>
|
<Card
|
||||||
|
square
|
||||||
|
className={classes.messagesHeader}
|
||||||
|
onClick={handleDrawerOpen}
|
||||||
|
>
|
||||||
<CardHeader
|
<CardHeader
|
||||||
titleTypographyProps={{ noWrap: true }}
|
titleTypographyProps={{ noWrap: true }}
|
||||||
subheaderTypographyProps={{ noWrap: true }}
|
subheaderTypographyProps={{ noWrap: true }}
|
||||||
@@ -528,7 +534,7 @@ const MessagesList = () => {
|
|||||||
<Button
|
<Button
|
||||||
startIcon={<ReplayIcon />}
|
startIcon={<ReplayIcon />}
|
||||||
size="small"
|
size="small"
|
||||||
onClick={e => handleUpdateTicketStatus("open", userId)}
|
onClick={e => handleUpdateTicketStatus(e, "open", userId)}
|
||||||
>
|
>
|
||||||
Reabrir
|
Reabrir
|
||||||
</Button>
|
</Button>
|
||||||
@@ -537,22 +543,15 @@ const MessagesList = () => {
|
|||||||
<Button
|
<Button
|
||||||
startIcon={<ReplayIcon />}
|
startIcon={<ReplayIcon />}
|
||||||
size="small"
|
size="small"
|
||||||
onClick={e => handleUpdateTicketStatus("pending", null)}
|
onClick={e => handleUpdateTicketStatus(e, "pending", null)}
|
||||||
>
|
>
|
||||||
Retornar
|
Retornar
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
|
||||||
startIcon={<ReplayIcon />}
|
|
||||||
size="small"
|
|
||||||
onClick={handleDrawerOpen}
|
|
||||||
>
|
|
||||||
Drawer
|
|
||||||
</Button>
|
|
||||||
<Button
|
<Button
|
||||||
size="small"
|
size="small"
|
||||||
variant="contained"
|
variant="contained"
|
||||||
color="primary"
|
color="primary"
|
||||||
onClick={e => handleUpdateTicketStatus("closed", userId)}
|
onClick={e => handleUpdateTicketStatus(e, "closed", userId)}
|
||||||
>
|
>
|
||||||
Resolver
|
Resolver
|
||||||
</Button>
|
</Button>
|
||||||
@@ -581,7 +580,7 @@ const MessagesList = () => {
|
|||||||
</Paper>
|
</Paper>
|
||||||
|
|
||||||
<ContactDrawer
|
<ContactDrawer
|
||||||
open={open}
|
open={drawerOpen}
|
||||||
handleDrawerClose={handleDrawerClose}
|
handleDrawerClose={handleDrawerClose}
|
||||||
contact={contact}
|
contact={contact}
|
||||||
loading={loading}
|
loading={loading}
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ const useStyles = makeStyles(theme => ({
|
|||||||
},
|
},
|
||||||
|
|
||||||
chatPapper: {
|
chatPapper: {
|
||||||
// backgroundColor: "#eee",
|
// backgroundColor: "red",
|
||||||
display: "flex",
|
display: "flex",
|
||||||
height: "100%",
|
height: "100%",
|
||||||
},
|
},
|
||||||
@@ -49,7 +49,7 @@ const Chat = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={classes.chatContainer}>
|
<div className={classes.chatContainer}>
|
||||||
<Paper square className={classes.chatPapper}>
|
<div className={classes.chatPapper}>
|
||||||
<Grid container spacing={0}>
|
<Grid container spacing={0}>
|
||||||
<Grid item xs={4} className={classes.contactsWrapper}>
|
<Grid item xs={4} className={classes.contactsWrapper}>
|
||||||
<TicketsList />
|
<TicketsList />
|
||||||
@@ -66,7 +66,7 @@ const Chat = () => {
|
|||||||
)}
|
)}
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Paper>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,15 +1,13 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
|
import Paper from "@material-ui/core/Paper";
|
||||||
|
|
||||||
const Dashboard = () => {
|
const Dashboard = () => {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<a
|
<Paper variant="outlined" style={{ margin: 50 }}>
|
||||||
rel="bookmark"
|
|
||||||
target="_parent"
|
|
||||||
href="https://economicros.ddns.com.br:4043/"
|
|
||||||
>
|
|
||||||
teste
|
teste
|
||||||
</a>
|
</Paper>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user