Skip to content

Commit

Permalink
fix compile error + TODO fix mes
Browse files Browse the repository at this point in the history
  • Loading branch information
lucia-gomez committed Aug 1, 2024
1 parent 1cdd028 commit d3708b5
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,11 @@ export const RoomDetails = styled(Grid)`
`;

const AlertHeader = styled(Alert)(({ theme }) => ({
//TODO: Fix later
//background: theme.palette.secondary.light,
background: theme.palette.secondary.light,
marginBottom: 0,

".MuiAlert-icon": {
//TODO: Fix later
//color: theme.palette.primary.main,
color: theme.palette.primary.main,
},
}));

Expand Down Expand Up @@ -55,8 +53,8 @@ export default function BookingSelection() {
<RoomDetails container>
<label>Time:</label>
<p>{`${formatTimeAmPm(
bookingCalendarInfo.startStr
)} - ${formatTimeAmPm(bookingCalendarInfo.endStr)}`}</p>
new Date(bookingCalendarInfo.startStr)
)} - ${formatTimeAmPm(new Date(bookingCalendarInfo.endStr))}`}</p>
</RoomDetails>
</AlertHeader>
{/* <Typography variant={'h5'}>Your Request</Typography>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@ const Empty = styled(Box)(({ theme }) => ({
justifyContent: "center",
alignItems: "center",
height: 500,
//TODO: Fix later
//color: theme.palette.custom.gray3",
color: theme.palette.custom.gray3,
}));

export default function CalendarVerticalResource({ rooms, dateView }: Props) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ const Container = styled(Box)(({ theme }) => ({
flexDirection: "column",
alignItems: "flex-start",
borderRadius: "4px",
//TODO: Fix later
//border: `1px solid ${theme.palette.custom.border}` || "#e3e3e3",
border: `1px solid ${theme.palette.custom.border}` || "#e3e3e3",
}));

export default function FormInput() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
"use client";

import { Box, Button, Typography } from "@mui/material";
import { Department, Role } from "../../../../types";
import React, { useContext, useEffect } from "react";

import { BookingContext } from "../bookingProvider";
import Dropdown from "../components/Dropdown";
import { styled } from "@mui/material/styles";
import { useRouter } from "next/navigation";
import { useAuth } from "../../components/AuthProvider";
import { useRouter } from "next/navigation";

const Center = styled(Box)`
width: 100%;
Expand All @@ -23,7 +24,6 @@ const Container = styled(Box)(({ theme }) => ({
flexDirection: "column",
alignItems: "center",
borderRadius: "4px",
//TODO: Fix later
border: `1px solid ${theme.palette.divider}`,
}));

Expand Down
6 changes: 2 additions & 4 deletions booking-app/components/src/client/routes/components/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ import React from "react";
import { styled } from "@mui/system";

const TableCustom = styled(MuiTable)(({ theme }) => ({
//TODO: Fix later
//border: `1px solid ${theme.palette.custom.border}`,
border: `1px solid ${theme.palette.custom.border}`,
borderCollapse: "separate",
borderRadius: "0px 0px 4px 4px",

Expand All @@ -24,8 +23,7 @@ const TableCustom = styled(MuiTable)(({ theme }) => ({
}));

const ShadedHeader = styled(TableHead)(({ theme }) => ({
//TODO: Fix later
//backgroundColor: theme.palette.custom.gray,
backgroundColor: theme.palette.custom.gray,
}));

export const TableTopRow = styled(MuiTable)`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
import { Booking, BookingRow } from '../../../../types';
import { TableCell, TableSortLabel } from '@mui/material';
import { Booking, BookingRow } from "../../../../types";
import { TableCell, TableSortLabel } from "@mui/material";

import React from 'react';
import React from "react";

interface Props {
createSortHandler: any;
property: keyof BookingRow;
label: string;
orderBy: keyof BookingRow;
order: 'asc' | 'desc';
order: "asc" | "desc";
}

export const COMPARATORS: {
[property: string]: (a: BookingRow, b: BookingRow) => number;
} = {
startDate: (a, b) =>
new Date(a.startDate).getTime() - new Date(b.startDate).getTime(),
a.startDate.toDate().getTime() - b.startDate.toDate().getTime(),
department: (a, b) => a.department.localeCompare(b.department),
netId: (a, b) => a.netId.localeCompare(b.netId),
status: (a, b) => a.status.localeCompare(b.status),
Expand All @@ -31,7 +31,7 @@ export default function SortableTableCell(props: Props) {
>
<TableSortLabel
active={orderBy === property}
direction={orderBy === property ? order : 'asc'}
direction={orderBy === property ? order : "asc"}
onClick={props.createSortHandler(property)}
>
{props.label}
Expand Down

0 comments on commit d3708b5

Please sign in to comment.