Merge pull request #55 from CPSC319-Winter-term-2/home
removed unused mockdata
This commit is contained in:
commit
67a7216c95
@ -15,25 +15,16 @@ import { useAppSelector } from "../../redux/hooks";
|
|||||||
import { selectFavorites } from "../../redux/slices/favoritesSlice";
|
import { selectFavorites } from "../../redux/slices/favoritesSlice";
|
||||||
import { selectTeam, selectUsers } from "../../redux/slices/usersSlice";
|
import { selectTeam, selectUsers } from "../../redux/slices/usersSlice";
|
||||||
import GroupSelect from "../sidebar/GroupSelect";
|
import GroupSelect from "../sidebar/GroupSelect";
|
||||||
import { SidebarUserObj } from "./Home";
|
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
open: boolean;
|
open: boolean;
|
||||||
selectedValue: SidebarUserObj;
|
handleClose: () => void;
|
||||||
onClose: (value: SidebarUserObj) => void;
|
|
||||||
users: SidebarUserObj[];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const CallFavouritesDialog: React.FC<Props> = ({
|
const CallFavouritesDialog: React.FC<Props> = ({
|
||||||
open,
|
open,
|
||||||
selectedValue,
|
handleClose,
|
||||||
onClose,
|
|
||||||
users,
|
|
||||||
}: Props) => {
|
}: Props) => {
|
||||||
const handleClose = () => {
|
|
||||||
onClose(selectedValue);
|
|
||||||
};
|
|
||||||
console.log(users);
|
|
||||||
|
|
||||||
const [group, setGroup] = useState<string>("Favorites");
|
const [group, setGroup] = useState<string>("Favorites");
|
||||||
const [inputText, setInputText] = useState<string>("");
|
const [inputText, setInputText] = useState<string>("");
|
||||||
@ -60,6 +51,10 @@ const CallFavouritesDialog: React.FC<Props> = ({
|
|||||||
selectUsers(state, groupMembersUuids)
|
selectUsers(state, groupMembersUuids)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const handleCall = () => {
|
||||||
|
handleClose();
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Dialog onClose={handleClose} open={open} fullWidth maxWidth="sm">
|
<Dialog onClose={handleClose} open={open} fullWidth maxWidth="sm">
|
||||||
<DialogTitle>Select who to call:</DialogTitle>
|
<DialogTitle>Select who to call:</DialogTitle>
|
||||||
@ -107,7 +102,7 @@ const CallFavouritesDialog: React.FC<Props> = ({
|
|||||||
</DialogContent>
|
</DialogContent>
|
||||||
|
|
||||||
<DialogActions>
|
<DialogActions>
|
||||||
<Button color="success" onClick={handleClose}>
|
<Button color="success" onClick={handleCall}>
|
||||||
<Typography variant="button" color="black">
|
<Typography variant="button" color="black">
|
||||||
Call
|
Call
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|||||||
@ -3,7 +3,6 @@ import ShortCuts from "./ShortCuts";
|
|||||||
import Container from "@mui/material/Container";
|
import Container from "@mui/material/Container";
|
||||||
import Grid from "@mui/material/Grid";
|
import Grid from "@mui/material/Grid";
|
||||||
import { MeetingStatus } from "../../utils";
|
import { MeetingStatus } from "../../utils";
|
||||||
import { useState } from "react";
|
|
||||||
|
|
||||||
export interface SidebarUserObj {
|
export interface SidebarUserObj {
|
||||||
id: number;
|
id: number;
|
||||||
@ -15,12 +14,12 @@ const Home: React.FC = () => {
|
|||||||
/* Temporary data - this is the same as what's in ProtectedRoute.tsx so it should not
|
/* Temporary data - this is the same as what's in ProtectedRoute.tsx so it should not
|
||||||
be duplicated like this in the future (Route components were being weird when I tried
|
be duplicated like this in the future (Route components were being weird when I tried
|
||||||
to pass it down from App.tsx) */
|
to pass it down from App.tsx) */
|
||||||
const [mockUsers] = useState<SidebarUserObj[]>([
|
// const [mockUsers] = useState<SidebarUserObj[]>([
|
||||||
{ id: 0, name: "Jincheng L.", meetingStatus: MeetingStatus.NOT_IN_MEETING },
|
// { id: 0, name: "Jincheng L.", meetingStatus: MeetingStatus.NOT_IN_MEETING },
|
||||||
{ id: 1, name: "Matt B.", meetingStatus: MeetingStatus.IN_MEETING },
|
// { id: 1, name: "Matt B.", meetingStatus: MeetingStatus.IN_MEETING },
|
||||||
{ id: 2, name: "Taehee C.", meetingStatus: MeetingStatus.IN_MEETING },
|
// { id: 2, name: "Taehee C.", meetingStatus: MeetingStatus.IN_MEETING },
|
||||||
{ id: 3, name: "Bob A.", meetingStatus: MeetingStatus.NOT_IN_MEETING },
|
// { id: 3, name: "Bob A.", meetingStatus: MeetingStatus.NOT_IN_MEETING },
|
||||||
]);
|
// ]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Container className="main-home">
|
<Container className="main-home">
|
||||||
@ -29,7 +28,7 @@ const Home: React.FC = () => {
|
|||||||
<MeetingsPanel />
|
<MeetingsPanel />
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid item sm={4}>
|
<Grid item sm={4}>
|
||||||
<ShortCuts users={mockUsers} />
|
<ShortCuts />
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Container>
|
</Container>
|
||||||
|
|||||||
@ -1,27 +1,22 @@
|
|||||||
import PeopleIcon from "@mui/icons-material/People";
|
import PeopleIcon from "@mui/icons-material/People";
|
||||||
|
// import AddIcon from "@mui/icons-material/Add";
|
||||||
import PhoneEnabledIcon from "@mui/icons-material/PhoneEnabled";
|
import PhoneEnabledIcon from "@mui/icons-material/PhoneEnabled";
|
||||||
|
// import CircleIcon from "@mui/icons-material/Circle";
|
||||||
import Button from "@mui/material/Button";
|
import Button from "@mui/material/Button";
|
||||||
import Grid from "@mui/material/Grid";
|
import Grid from "@mui/material/Grid";
|
||||||
import Typography from "@mui/material/Typography";
|
import Typography from "@mui/material/Typography";
|
||||||
import { SidebarUserObj } from "./Home";
|
|
||||||
import CallFavouritesDialog from "./CallFavouritesDialog";
|
import CallFavouritesDialog from "./CallFavouritesDialog";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
|
|
||||||
interface Props {
|
const ShortCuts: React.FC = () => {
|
||||||
users: SidebarUserObj[];
|
|
||||||
}
|
|
||||||
|
|
||||||
const ShortCuts: React.FC<Props> = ({ users }: Props) => {
|
|
||||||
const [open, setOpen] = useState(false);
|
const [open, setOpen] = useState(false);
|
||||||
const [selectedValue, setSelectedValue] = useState(users[0]);
|
|
||||||
|
|
||||||
const handleClickOpen = () => {
|
const handleClickOpen = () => {
|
||||||
setOpen(true);
|
setOpen(true);
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleClose = (value: SidebarUserObj) => {
|
const handleClose = () => {
|
||||||
setOpen(false);
|
setOpen(false);
|
||||||
setSelectedValue(value);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -40,10 +35,8 @@ const ShortCuts: React.FC<Props> = ({ users }: Props) => {
|
|||||||
<PhoneEnabledIcon className="icon" />
|
<PhoneEnabledIcon className="icon" />
|
||||||
</Button>
|
</Button>
|
||||||
<CallFavouritesDialog
|
<CallFavouritesDialog
|
||||||
selectedValue={selectedValue}
|
|
||||||
open={open}
|
open={open}
|
||||||
onClose={handleClose}
|
handleClose={handleClose}
|
||||||
users={users}
|
|
||||||
/>
|
/>
|
||||||
<Typography variant="h6" className="mylabel" sx={{ ml: 1 }}>
|
<Typography variant="h6" className="mylabel" sx={{ ml: 1 }}>
|
||||||
Call Group
|
Call Group
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"version": 3,
|
"version": 3,
|
||||||
"mappings": "AG8CA,AAAA,WAAW,CAAC;EACR,KAAK,EAAE,IAAI;CAAG;;AAElB,AAAA,CAAC,CAAC;EACE,eAAe,EAAE,IAAI;CAAG;;AKlD5B,AAAA,UAAU,CAAC;EAGP,SAAS,EAAE,cAAc;CAsDO;;AAzDpC,AAII,UAJM,CAIN,eAAe,CAAC;EACZ,MAAM,EAAE,IAAI;EACZ,UAAU,EAAE,IAAI;EAChB,YAAY,EAAE,KAAK;EACnB,YAAY,EPRS,OAAO;EOS5B,YAAY,EAAE,GAAG;EACjB,aAAa,EAAE,IAAI;EACnB,KAAK,EAAE,GAAG;EACV,MAAM,EAAE,IAAI;EACZ,QAAQ,EAAE,MAAM;CAuBW;;AApCnC,AAcQ,UAdE,CAIN,eAAe,CAUX,IAAI,CAAC;EACD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MQ,MANF,CACF,eAAe,GAKT,CAAC,CAAC;EACA,KAAK,EAAE,GAAG;EACV,MAAM,EAAE,MAAM;CAAG;;AAR7B,AASQ,MATF,CACF,eAAe,CAQX,WAAW,CAAC;EACR,OAAO,EAAE,YAAY;EACrB,UAAU,EAAE,MAAM;EAClB,MAAM,EAAE,IAAI;CAAG;;AAZ3B,AAaQ,MAbF,CACF,eAAe,CAYX,UAAU,CAAE;EACR,MAAM,EAAE,IAAI;EACZ,KAAK,EAAE,GAAG;EACV,gBAAgB,EAAE,OAAO;CAAG;;AAhBxC,AAiBQ,MAjBF,CACF,eAAe,CAgBX,aAAa,CAAC;EACV,OAAO,EAAE,YAAY;EACrB,UAAU,EAAE,IAAI;EAChB,MAAM,EAAE,IAAI;EACZ,WAAW,EAAE,IAAI;CAAG;;AArBhC,AAsBQ,MAtBF,CACF,eAAe,CAqBX,UAAU,CAAC;EACP,KAAK,EAAE,IAAI;EACX,MAAM,EAAE,IAAI;CAEQ;;AA1BhC,AAyBY,MAzBN,CACF,eAAe,CAqBX,UAAU,CAGN,CAAC,CAAC;EACE,KAAK,EAAE,IAAI;CAAG",
|
||||||
"sources": [
|
"sources": [
|
||||||
"App.sass",
|
"App.sass",
|
||||||
"_variables.sass",
|
"_variables.sass",
|
||||||
|
|||||||
@ -3,20 +3,20 @@
|
|||||||
// width: 100% !important
|
// width: 100% !important
|
||||||
max-width: 85% !important
|
max-width: 85% !important
|
||||||
.meetings-panel
|
.meetings-panel
|
||||||
margin: auto
|
|
||||||
margin-top: 15vh
|
margin-top: 15vh
|
||||||
|
padding-bottom: 10vh
|
||||||
border-style: solid
|
border-style: solid
|
||||||
border-color: $main-home-background-color
|
border-color: mistyrose
|
||||||
border-width: 2px
|
border-width: 2px
|
||||||
border-radius: 40px
|
border-radius: 40px
|
||||||
width: 65%
|
width: 85%
|
||||||
height: 65vh
|
height: 65vh
|
||||||
overflow: hidden
|
overflow: hidden
|
||||||
.row
|
.row
|
||||||
width: 100%
|
width: 100%
|
||||||
.panel-label
|
.panel-label
|
||||||
text-align: center
|
text-align: center
|
||||||
background-color: grey
|
background-color: #AF000D
|
||||||
padding-top: 2%
|
padding-top: 2%
|
||||||
padding-bottom: 2%
|
padding-bottom: 2%
|
||||||
// .current-time
|
// .current-time
|
||||||
@ -29,8 +29,8 @@
|
|||||||
// background-color: grey
|
// background-color: grey
|
||||||
// padding-bottom: 1%
|
// padding-bottom: 1%
|
||||||
.meeting
|
.meeting
|
||||||
background-color: $main-home-background-color
|
background-color: lightcoral
|
||||||
text-align: center
|
text-align: left
|
||||||
margin-top: 15px
|
margin-top: 15px
|
||||||
line-height: 2
|
line-height: 2
|
||||||
.lastMeeting
|
.lastMeeting
|
||||||
@ -43,16 +43,17 @@
|
|||||||
margin-top: 5vh
|
margin-top: 5vh
|
||||||
.mylabel
|
.mylabel
|
||||||
display: inline-block
|
display: inline-block
|
||||||
margin: 0
|
margin-left: 25%
|
||||||
width: 100px
|
width: 125px
|
||||||
text-align: center
|
text-align: center
|
||||||
.tile
|
.tile
|
||||||
margin-right: 100%
|
margin-left: 25%
|
||||||
background-color: $main-home-background-color
|
margin-right: 50%
|
||||||
width: 100px
|
background-color: mistyrose
|
||||||
height: 100px
|
width: 125px
|
||||||
|
height: 125px
|
||||||
border-radius: 16px
|
border-radius: 16px
|
||||||
.icon
|
.icon
|
||||||
color: black
|
color: black
|
||||||
width: 70%
|
width: 80%
|
||||||
height: 70%
|
height: 80%
|
||||||
Reference in New Issue
Block a user