minor fixes
This commit is contained in:
parent
667886224c
commit
7e97501269
@ -25,13 +25,16 @@ const LowerBody: React.FC<Props> = (props) => {
|
|||||||
border: 1,
|
border: 1,
|
||||||
borderRadius: 2,
|
borderRadius: 2,
|
||||||
borderColor: "#af000d",
|
borderColor: "#af000d",
|
||||||
backgroundColor: "#af000d",
|
|
||||||
width: "70%",
|
width: "70%",
|
||||||
height: "60%",
|
height: "60%",
|
||||||
alignSelf: "center",
|
alignSelf: "center",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Typography sx={{ color: "white", my: 1 }} variant="h4" textAlign="center">
|
<Typography
|
||||||
|
sx={{ color: "white", my: 1 }}
|
||||||
|
variant="h4"
|
||||||
|
textAlign="center"
|
||||||
|
>
|
||||||
Upcoming meetings
|
Upcoming meetings
|
||||||
</Typography>
|
</Typography>
|
||||||
{meetings.length === 0 ? (
|
{meetings.length === 0 ? (
|
||||||
|
|||||||
@ -96,7 +96,7 @@ const UpperBody: React.FC<Props> = ({ contactInfo }) => {
|
|||||||
</Button>
|
</Button>
|
||||||
) : (
|
) : (
|
||||||
<Button
|
<Button
|
||||||
variant="contained"
|
variant="outlined"
|
||||||
color="secondary"
|
color="secondary"
|
||||||
startIcon={<RemoveIcon />}
|
startIcon={<RemoveIcon />}
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
@ -133,7 +133,9 @@ const UpperBody: React.FC<Props> = ({ contactInfo }) => {
|
|||||||
</IconButton>
|
</IconButton>
|
||||||
</Box>
|
</Box>
|
||||||
<Box sx={{ display: "flex", flexDirection: "column" }}>
|
<Box sx={{ display: "flex", flexDirection: "column" }}>
|
||||||
<Typography variant="button" sx={{ textAlign: "right" }}>{meetingStatus}</Typography>
|
<Typography variant="button" sx={{ textAlign: "right" }}>
|
||||||
|
{meetingStatus}
|
||||||
|
</Typography>
|
||||||
{detailedMeeting ? (
|
{detailedMeeting ? (
|
||||||
<Typography variant="h6">{detailedMeeting.topic}</Typography>
|
<Typography variant="h6">{detailedMeeting.topic}</Typography>
|
||||||
) : null}
|
) : null}
|
||||||
|
|||||||
@ -40,7 +40,11 @@ const MeetingsPanel: React.FC = () => {
|
|||||||
return (
|
return (
|
||||||
<div className="meetings-panel">
|
<div className="meetings-panel">
|
||||||
<div className="row panel-label">
|
<div className="row panel-label">
|
||||||
<Typography className="mylabel" variant="h5" sx={{ color: "white", ml: 1 }}>
|
<Typography
|
||||||
|
className="mylabel"
|
||||||
|
variant="h5"
|
||||||
|
sx={{ color: "white", ml: 1 }}
|
||||||
|
>
|
||||||
Meetings in progress
|
Meetings in progress
|
||||||
</Typography>
|
</Typography>
|
||||||
</div>
|
</div>
|
||||||
@ -65,16 +69,25 @@ const MeetingsPanel: React.FC = () => {
|
|||||||
|
|
||||||
const meetingMembersString = () => {
|
const meetingMembersString = () => {
|
||||||
if (meetingMembers.length > 3) {
|
if (meetingMembers.length > 3) {
|
||||||
return "Participants: " +
|
return (
|
||||||
meetingMembers[0].name + ", " +
|
"Participants: " +
|
||||||
meetingMembers[1].name + ", " +
|
meetingMembers[0].name +
|
||||||
meetingMembers[2].name + ", and " +
|
", " +
|
||||||
(meetingMembers.length - 3).toString() + " more...";
|
meetingMembers[1].name +
|
||||||
|
", " +
|
||||||
|
meetingMembers[2].name +
|
||||||
|
", and " +
|
||||||
|
(meetingMembers.length - 3).toString() +
|
||||||
|
" more..."
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
return "Participants: " + meetingMembers.map((userLite) => (" " + userLite.name)).toString();
|
return (
|
||||||
|
"Participants: " +
|
||||||
|
meetingMembers.map((userLite) => " " + userLite.name).toString()
|
||||||
|
);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
console.log(meetingMembersString);
|
||||||
if (currentDatemil >= startDatemil && currentDatemil <= endDatemil) {
|
if (currentDatemil >= startDatemil && currentDatemil <= endDatemil) {
|
||||||
const lastMeetingClass = meetings.length == i ? " lastMeeting" : "";
|
const lastMeetingClass = meetings.length == i ? " lastMeeting" : "";
|
||||||
i += 1;
|
i += 1;
|
||||||
|
|||||||
@ -13,7 +13,6 @@ import DetailedMeeting from "../../../api-bodies/DetailedMeeting";
|
|||||||
import { useAppSelector } from "../../../redux/hooks";
|
import { useAppSelector } from "../../../redux/hooks";
|
||||||
import { selectUsers } from "../../../redux/slices/usersSlice";
|
import { selectUsers } from "../../../redux/slices/usersSlice";
|
||||||
import UserLite from "../../../api-bodies/UserLite";
|
import UserLite from "../../../api-bodies/UserLite";
|
||||||
import { getMeetingDuration } from "../Utils";
|
|
||||||
|
|
||||||
enum MeetingStatus {
|
enum MeetingStatus {
|
||||||
Live = "Live",
|
Live = "Live",
|
||||||
@ -45,21 +44,41 @@ const Body: React.FC<Props> = ({ meeting }) => {
|
|||||||
selectUsers(state, meeting.registrantIds)
|
selectUsers(state, meeting.registrantIds)
|
||||||
);
|
);
|
||||||
const liveParticipants: UserLite[] = useAppSelector((state) =>
|
const liveParticipants: UserLite[] = useAppSelector((state) =>
|
||||||
selectUsers(state, props.meeting.liveParticipantIds)
|
selectUsers(state, meeting.liveParticipantIds)
|
||||||
);
|
);
|
||||||
|
|
||||||
const parseIsoString = (s: string) => {
|
const parseIsoString = (s: string) => {
|
||||||
const month = ["January", "February", "March", "April",
|
const month = [
|
||||||
"May", "June", "July", "August",
|
"January",
|
||||||
"September", "October", "November", "December"][parseInt(s.slice(5,7)) - 1];
|
"February",
|
||||||
|
"March",
|
||||||
|
"April",
|
||||||
|
"May",
|
||||||
|
"June",
|
||||||
|
"July",
|
||||||
|
"August",
|
||||||
|
"September",
|
||||||
|
"October",
|
||||||
|
"November",
|
||||||
|
"December",
|
||||||
|
][parseInt(s.slice(5, 7)) - 1];
|
||||||
const day = s.slice(8, 10);
|
const day = s.slice(8, 10);
|
||||||
const isoTime: string = s.slice(11, 16);
|
const isoTime: string = s.slice(11, 16);
|
||||||
const hour: number = parseInt(isoTime.slice(0, 2));
|
const hour: number = parseInt(isoTime.slice(0, 2));
|
||||||
const hourMod: string = hour % 12 == 0 ? "12" : (hour % 12).toString();
|
const hourMod: string = hour % 12 == 0 ? "12" : (hour % 12).toString();
|
||||||
return month + " " + day + ", " + hourMod + ":" + isoTime.slice(3, 5) + (hour > 11 ? "PM" : "AM");
|
return (
|
||||||
|
month +
|
||||||
|
" " +
|
||||||
|
day +
|
||||||
|
", " +
|
||||||
|
hourMod +
|
||||||
|
":" +
|
||||||
|
isoTime.slice(3, 5) +
|
||||||
|
(hour > 11 ? "PM" : "AM")
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
const start = props.meeting.start;
|
const start = meeting.startTime;
|
||||||
const startDateString = parseIsoString(start);
|
const startDateString = parseIsoString(start);
|
||||||
const listLiveParticipants = () => {
|
const listLiveParticipants = () => {
|
||||||
const s: string[] = liveParticipants.map((user) => user.name + ", ");
|
const s: string[] = liveParticipants.map((user) => user.name + ", ");
|
||||||
@ -83,16 +102,29 @@ const Body: React.FC<Props> = ({ meeting }) => {
|
|||||||
flexDirection: "column",
|
flexDirection: "column",
|
||||||
width: "70%",
|
width: "70%",
|
||||||
height: "100%",
|
height: "100%",
|
||||||
mt: 10
|
mt: 10,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Typography sx={{ pl: 5 }} variant="overline">Meeting ID: {meeting.meetingId}</Typography>
|
<Typography sx={{ pl: 5 }} variant="overline">
|
||||||
<Typography sx={{ pl: 5, color: "#af000d" }} variant="h2">{meeting.topic}</Typography>
|
Meeting ID: {meeting.meetingId}
|
||||||
|
</Typography>
|
||||||
|
<Typography sx={{ pl: 5, color: "#af000d" }} variant="h2">
|
||||||
|
{meeting.topic}
|
||||||
|
</Typography>
|
||||||
<Divider sx={{ mb: 3 }} />
|
<Divider sx={{ mb: 3 }} />
|
||||||
<Typography sx={{ pl: 5 }} variant="h4">Start: {startDateString}</Typography>
|
<Typography sx={{ pl: 5 }} variant="h4">
|
||||||
<Typography sx={{ pl: 5 }} variant="h4">Duration: {meeting.duration.toString() + " minutes"}</Typography>
|
Start: {startDateString}
|
||||||
<Typography sx= {{ my: 1 }} />
|
</Typography>
|
||||||
<Typography sx={{ pl: 5 }} variant="button">Currently inside: {listLiveParticipants()}</Typography>
|
<Typography sx={{ pl: 5 }} variant="h4">
|
||||||
|
Duration: {meeting.duration.toString() + " minutes"}
|
||||||
|
</Typography>
|
||||||
|
<Typography sx={{ my: 1 }} />
|
||||||
|
<Typography sx={{ pl: 5 }} variant="button">
|
||||||
|
Currently inside: {listLiveParticipants()}
|
||||||
|
</Typography>
|
||||||
|
<Typography sx={{ pl: 5 }} variant="button">
|
||||||
|
Status: {meetingStatus}
|
||||||
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
|
|||||||
Reference in New Issue
Block a user