Archived
meeting details page implemented and api bodies included
This commit is contained in:
@@ -1,11 +1,15 @@
|
||||
import { Box } from "@mui/material";
|
||||
import React from "react";
|
||||
import Body from "./Body";
|
||||
import Body from "./contacts-components/Body";
|
||||
|
||||
import ContactInfo from "./ContactInfo";
|
||||
import Sidebar from "./Sidebar";
|
||||
import Sidebar from "./contacts-components/Sidebar";
|
||||
|
||||
const Contacts: React.FC = () => {
|
||||
interface Props {
|
||||
setMeetingInfoOpen: (open: boolean) => void;
|
||||
}
|
||||
|
||||
const Contacts: React.FC<Props> = (props) => {
|
||||
const [contactSelected, setContactSelected] =
|
||||
React.useState<ContactInfo | null>(null);
|
||||
|
||||
@@ -13,7 +17,10 @@ const Contacts: React.FC = () => {
|
||||
<Box sx={{ display: "flex", height: "100%" }}>
|
||||
<Sidebar setContactSelected={setContactSelected} />
|
||||
{contactSelected !== null ? (
|
||||
<Body contactSelected={contactSelected} />
|
||||
<Body
|
||||
contactSelected={contactSelected}
|
||||
setMeetingInfoOpen={props.setMeetingInfoOpen}
|
||||
/>
|
||||
) : null}
|
||||
</Box>
|
||||
);
|
||||
|
||||
+8
-4
@@ -1,11 +1,12 @@
|
||||
import { Box, Toolbar } from "@mui/material";
|
||||
import React from "react";
|
||||
import UpperBody from "./UpperBody";
|
||||
import LowerBody from "./LowerBody";
|
||||
import ContactInfo from "./ContactInfo";
|
||||
import UpperBody from "./body-components/UpperBody";
|
||||
import LowerBody from "./body-components/LowerBody";
|
||||
import ContactInfo from "../ContactInfo";
|
||||
|
||||
interface Props {
|
||||
contactSelected: ContactInfo;
|
||||
setMeetingInfoOpen: (open: boolean) => void;
|
||||
}
|
||||
|
||||
const Body: React.FC<Props> = (props) => {
|
||||
@@ -20,7 +21,10 @@ const Body: React.FC<Props> = (props) => {
|
||||
>
|
||||
<Toolbar />
|
||||
<UpperBody contactInfo={props.contactSelected} />
|
||||
<LowerBody contactInfo={props.contactSelected} />
|
||||
<LowerBody
|
||||
contactInfo={props.contactSelected}
|
||||
setMeetingInfoOpen={props.setMeetingInfoOpen}
|
||||
/>
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
+3
-3
@@ -9,9 +9,9 @@ import {
|
||||
} from "@mui/material";
|
||||
import React from "react";
|
||||
import { ExpandLess, ExpandMore } from "@mui/icons-material";
|
||||
import ContactInfo from "./ContactInfo";
|
||||
import Status from "./Status";
|
||||
import ContactItem from "./ContactItem";
|
||||
import ContactInfo from "../ContactInfo";
|
||||
import Status from "../Status";
|
||||
import ContactItem from "./sidebar-components/ContactItem";
|
||||
|
||||
const contacts: ContactInfo[] = [
|
||||
{ name: "Taehee ...", status: Status.Online },
|
||||
+13
-6
@@ -1,6 +1,6 @@
|
||||
import { Box, List, Typography } from "@mui/material";
|
||||
import { Box, Button, List, Typography } from "@mui/material";
|
||||
import React from "react";
|
||||
import ContactInfo from "./ContactInfo";
|
||||
import ContactInfo from "../../ContactInfo";
|
||||
|
||||
const meetings: { name: string; duration: string }[] = [
|
||||
{ name: "Kanban Meeting", duration: "10:45 am - 11:45 am" },
|
||||
@@ -12,9 +12,10 @@ const meetings: { name: string; duration: string }[] = [
|
||||
|
||||
interface Props {
|
||||
contactInfo: ContactInfo;
|
||||
setMeetingInfoOpen: (open: boolean) => void;
|
||||
}
|
||||
|
||||
const LowerBody: React.FC<Props> = () => {
|
||||
const LowerBody: React.FC<Props> = (props) => {
|
||||
return (
|
||||
<Box
|
||||
sx={{
|
||||
@@ -23,7 +24,7 @@ const LowerBody: React.FC<Props> = () => {
|
||||
border: 1,
|
||||
borderRadius: 2,
|
||||
width: "70%",
|
||||
height: "70%",
|
||||
height: "60%",
|
||||
alignSelf: "center",
|
||||
}}
|
||||
>
|
||||
@@ -43,8 +44,14 @@ const LowerBody: React.FC<Props> = () => {
|
||||
}}
|
||||
key={i}
|
||||
>
|
||||
<Typography sx={{ pt: "12px" }}>{meeting.name}</Typography>
|
||||
<Typography sx={{ pt: "12px" }}>{meeting.duration}</Typography>
|
||||
<Button
|
||||
variant="text"
|
||||
color="secondary"
|
||||
onClick={() => props.setMeetingInfoOpen(true)}
|
||||
>
|
||||
{meeting.name}
|
||||
</Button>
|
||||
<Typography sx={{ pt: 1.5 }}>{meeting.duration}</Typography>
|
||||
</Box>
|
||||
))}
|
||||
</List>
|
||||
+1
-1
@@ -3,7 +3,7 @@ import React from "react";
|
||||
import PhoneIcon from "@mui/icons-material/Phone";
|
||||
import VideocamIcon from "@mui/icons-material/Videocam";
|
||||
import GroupsIcon from "@mui/icons-material/Groups";
|
||||
import ContactInfo from "./ContactInfo";
|
||||
import ContactInfo from "../../ContactInfo";
|
||||
|
||||
interface Props {
|
||||
contactInfo: ContactInfo;
|
||||
+2
-2
@@ -2,8 +2,8 @@ import { ListItemButton, ListItemIcon, ListItemText } from "@mui/material";
|
||||
import React from "react";
|
||||
import PersonOutlineIcon from "@mui/icons-material/PersonOutline";
|
||||
import CircleIcon from "@mui/icons-material/Circle";
|
||||
import ContactInfo from "./ContactInfo";
|
||||
import { returnStatusColor } from "./Utils";
|
||||
import ContactInfo from "../../ContactInfo";
|
||||
import { returnStatusColor } from "../../Utils";
|
||||
|
||||
interface Props {
|
||||
contactInfo: ContactInfo;
|
||||
Reference in New Issue
Block a user