Skip to content

Commit

Permalink
Extended navbar, removed unnecessary variables, imports, font weight …
Browse files Browse the repository at this point in the history
…on navbar text
  • Loading branch information
Daiki Narimoto committed Feb 8, 2025
1 parent 6edaa5e commit d992f22
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 71 deletions.
2 changes: 1 addition & 1 deletion client/src/assets/SettingsIcon.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from 'react';
export const SettingsIcon = () => {
return (
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="21" viewBox="0 0 20 21">
<path d="M9.02082 18.6278C8.64582 18.6278 8.32304 18.5028 8.05248 18.2528C7.78193 18.0028 7.6186 17.6973 7.56248 17.3362L7.37498 15.9612C7.19443 15.8917 7.02443 15.8084 6.86498 15.7112C6.70554 15.614 6.54915 15.5098 6.39582 15.3987L5.10415 15.9403C4.75693 16.0931 4.40971 16.107 4.06248 15.982C3.71526 15.857 3.44443 15.6348 3.24998 15.3153L2.27082 13.607C2.07637 13.2876 2.02082 12.9473 2.10415 12.5862C2.18748 12.2251 2.37498 11.9265 2.66665 11.6903L3.77082 10.857C3.75693 10.7598 3.74998 10.6659 3.74998 10.5753V10.0128C3.74998 9.92285 3.75693 9.82924 3.77082 9.73202L2.66665 8.89868C2.37498 8.66257 2.18748 8.36396 2.10415 8.00285C2.02082 7.64174 2.07637 7.30146 2.27082 6.98202L3.24998 5.27368C3.44443 4.95424 3.71526 4.73202 4.06248 4.60702C4.40971 4.48202 4.75693 4.4959 5.10415 4.64868L6.39582 5.19035C6.5486 5.07924 6.70832 4.97507 6.87498 4.87785C7.04165 4.78063 7.20832 4.69729 7.37498 4.62785L7.56248 3.25285C7.61804 2.89174 7.78137 2.58618 8.05248 2.33618C8.3236 2.08618 8.64637 1.96118 9.02082 1.96118H10.9792C11.3542 1.96118 11.6772 2.08618 11.9483 2.33618C12.2194 2.58618 12.3825 2.89174 12.4375 3.25285L12.625 4.62785C12.8055 4.69729 12.9758 4.78063 13.1358 4.87785C13.2958 4.97507 13.4519 5.07924 13.6042 5.19035L14.8958 4.64868C15.243 4.4959 15.5903 4.48202 15.9375 4.60702C16.2847 4.73202 16.5555 4.95424 16.75 5.27368L17.7292 6.98202C17.9236 7.30146 17.9792 7.64174 17.8958 8.00285C17.8125 8.36396 17.625 8.66257 17.3333 8.89868L16.2292 9.73202C16.243 9.82924 16.25 9.92313 16.25 10.0137V10.5753C16.25 10.6659 16.2361 10.7598 16.2083 10.857L17.3125 11.6903C17.6042 11.9265 17.7917 12.2251 17.875 12.5862C17.9583 12.9473 17.9028 13.2876 17.7083 13.607L16.7083 15.3153C16.5139 15.6348 16.243 15.857 15.8958 15.982C15.5486 16.107 15.2014 16.0931 14.8542 15.9403L13.6042 15.3987C13.4514 15.5098 13.2917 15.614 13.125 15.7112C12.9583 15.8084 12.7916 15.8917 12.625 15.9612L12.4375 17.3362C12.3819 17.6973 12.2189 18.0028 11.9483 18.2528C11.6778 18.5028 11.3547 18.6278 10.9792 18.6278H9.02082ZM10.0417 13.2112C10.8472 13.2112 11.5347 12.9265 12.1041 12.357C12.6736 11.7876 12.9583 11.1001 12.9583 10.2945C12.9583 9.48896 12.6736 8.80146 12.1041 8.23202C11.5347 7.66257 10.8472 7.37785 10.0417 7.37785C9.22221 7.37785 8.5311 7.66257 7.96832 8.23202C7.40554 8.80146 7.12443 9.48896 7.12498 10.2945C7.12554 11.1001 7.40693 11.7876 7.96915 12.357C8.53137 12.9265 9.22221 13.2112 10.0417 13.2112Z" fill="#474849"/>
<path d="M9.02082 18.6278C8.64582 18.6278 8.32304 18.5028 8.05248 18.2528C7.78193 18.0028 7.6186 17.6973 7.56248 17.3362L7.37498 15.9612C7.19443 15.8917 7.02443 15.8084 6.86498 15.7112C6.70554 15.614 6.54915 15.5098 6.39582 15.3987L5.10415 15.9403C4.75693 16.0931 4.40971 16.107 4.06248 15.982C3.71526 15.857 3.44443 15.6348 3.24998 15.3153L2.27082 13.607C2.07637 13.2876 2.02082 12.9473 2.10415 12.5862C2.18748 12.2251 2.37498 11.9265 2.66665 11.6903L3.77082 10.857C3.75693 10.7598 3.74998 10.6659 3.74998 10.5753V10.0128C3.74998 9.92285 3.75693 9.82924 3.77082 9.73202L2.66665 8.89868C2.37498 8.66257 2.18748 8.36396 2.10415 8.00285C2.02082 7.64174 2.07637 7.30146 2.27082 6.98202L3.24998 5.27368C3.44443 4.95424 3.71526 4.73202 4.06248 4.60702C4.40971 4.48202 4.75693 4.4959 5.10415 4.64868L6.39582 5.19035C6.5486 5.07924 6.70832 4.97507 6.87498 4.87785C7.04165 4.78063 7.20832 4.69729 7.37498 4.62785L7.56248 3.25285C7.61804 2.89174 7.78137 2.58618 8.05248 2.33618C8.3236 2.08618 8.64637 1.96118 9.02082 1.96118H10.9792C11.3542 1.96118 11.6772 2.08618 11.9483 2.33618C12.2194 2.58618 12.3825 2.89174 12.4375 3.25285L12.625 4.62785C12.8055 4.69729 12.9758 4.78063 13.1358 4.87785C13.2958 4.97507 13.4519 5.07924 13.6042 5.19035L14.8958 4.64868C15.243 4.4959 15.5903 4.48202 15.9375 4.60702C16.2847 4.73202 16.5555 4.95424 16.75 5.27368L17.7292 6.98202C17.9236 7.30146 17.9792 7.64174 17.8958 8.00285C17.8125 8.36396 17.625 8.66257 17.3333 8.89868L16.2292 9.73202C16.243 9.82924 16.25 9.92313 16.25 10.0137V10.5753C16.25 10.6659 16.2361 10.7598 16.2083 10.857L17.3125 11.6903C17.6042 11.9265 17.7917 12.2251 17.875 12.5862C17.9583 12.9473 17.9028 13.2876 17.7083 13.607L16.7083 15.3153C16.5139 15.6348 16.243 15.857 15.8958 15.982C15.5486 16.107 15.2014 16.0931 14.8542 15.9403L13.6042 15.3987C13.4514 15.5098 13.2917 15.614 13.125 15.7112C12.9583 15.8084 12.7916 15.8917 12.625 15.9612L12.4375 17.3362C12.3819 17.6973 12.2189 18.0028 11.9483 18.2528C11.6778 18.5028 11.3547 18.6278 10.9792 18.6278H9.02082ZM10.0417 13.2112C10.8472 13.2112 11.5347 12.9265 12.1041 12.357C12.6736 11.7876 12.9583 11.1001 12.9583 10.2945C12.9583 9.48896 12.6736 8.80146 12.1041 8.23202C11.5347 7.66257 10.8472 7.37785 10.0417 7.37785C9.22221 7.37785 8.5311 7.66257 7.96832 8.23202C7.40554 8.80146 7.12443 9.48896 7.12498 10.2945C7.12554 11.1001 7.40693 11.7876 7.96915 12.357C8.53137 12.9265 9.22221 13.2112 10.0417 13.2112Z" fill="#474849"/>
</svg>
);
};
2 changes: 1 addition & 1 deletion client/src/components/navbar/Navbar.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#navbarBody {
height: 100vh;
display: flex;
flex-direction: row;
justify-content: space-between;
Expand All @@ -16,6 +15,7 @@
.navText {
margin-left: 3%;
width: 90%;
font-weight: 500;
font-size: 150%;
color: #474849;
}
Expand Down
28 changes: 3 additions & 25 deletions client/src/components/programs/EditProgram.css
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,13 @@ input[type="date"]::-webkit-calendar-picker-indicator {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
width: 90%;
/* align-items: center; */
font-size: 170%;
margin-bottom: 5%;
}

#saveCancel {

height: 100%;
}

#save {
background-color: var(--indigo, #4E4AE7);
Expand All @@ -98,13 +96,6 @@ input[type="date"]::-webkit-calendar-picker-indicator {
border-radius: 30px;
}

#popTrigger {
justify-content: center;
align-items: center;
height: 100%;
width: 100%;
margin-right: 1%;
}

#select {
display: none;
Expand All @@ -117,16 +108,6 @@ input[type="date"]::-webkit-calendar-picker-indicator {
appearance: auto; /* Restores the dropdown behavior */
}

/* #instructorTags {
display: none;
appearance: none;
}
#instructorTags:focus {
background-color: white;
appearance: auto;
} */

#dateTimeDiv, #instructorContainer, #payeeContainer {
width: 100%;
height: 100%;
Expand Down Expand Up @@ -157,7 +138,7 @@ input[type="date"]::-webkit-calendar-picker-indicator {
width: 80%;
margin-right: auto;
margin-left: 2%;
flex: 1;
flex: 1;
}

#date1, #date2 {
Expand Down Expand Up @@ -270,9 +251,6 @@ flex: 1;
overflow-y: auto;
}




#location, #locationRate {
display: flex;
flex-direction: row;
Expand Down
51 changes: 7 additions & 44 deletions client/src/components/programs/EditProgram.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,15 @@ import './EditProgram.css';
import {
Box,
Button,
Link as ChakraLink,
Flex,
FormControl,
FormLabel,
Heading,
HStack,
Icon,
IconButton,
Input,
InputGroup,
InputLeftElement,
Link,
Select,
Table,
TableCaption,
TableContainer,
Tbody,
Td,
Text,
Textarea,
Th,
Thead,
Tag,
Tr,
VStack,
Kbd,
Portal,
Popover,
PopoverTrigger,
PopoverContent,
Expand All @@ -47,13 +29,8 @@ import {CloseFilledIcon} from '../../assets/CloseFilledIcon';
import {EmailIcon} from '../../assets/EmailIcon';
import {LocationIcon} from '../../assets/LocationIcon';
import {DollarIcon} from '../../assets/DollarIcon';

// import { useAuthContext } from "../../contexts/hooks/useAuthContext";
import { useBackendContext } from "../../contexts/hooks/useBackendContext";
import { useNavigate } from 'react-router-dom';
// import { useRoleContext } from "../../contexts/hooks/useRoleContext";
// import { User } from "../../types/user";
// import { RoleSelect } from "./RoleSelect";
import { IoCloseOutline } from "react-icons/io5";
import { CiCircleMore } from "react-icons/ci";
import { useParams } from "react-router";
Expand Down Expand Up @@ -85,16 +62,6 @@ export const EditProgram = () => {
const [bookingIds, setBookingIds] = useState([]);
const [instructorSearchTerm, setInstructorSearchTerm] = useState("");
const [payeeSearchTerm, setPayeeSearchTerm] = useState("");
<<<<<<< HEAD
const [instructorFocused, setInstructorFocused] = useState(false);
const [payeeFocused, setPayeeFocused] = useState(false);
const [dropInstructorFocused, setDropInstructorFocused] = useState(false);
const [dropPayeeFocused, setDropPayeeFocused] = useState(false);

// const [instructorDropdownVisible, setInstructorDropdownVisible] = useState(false);
// const [payeeDropdownVisible, setPayeeDropdownVisible] = useState(false);
=======
>>>>>>> 4fe8d86bdf4dfaea25b6560b19eafeb05566318a


useEffect(() => {
Expand Down Expand Up @@ -250,7 +217,7 @@ const payees = eventClientResponse.data
try {
await Promise.all(bookingIds.map(async (bookingId) => {
try {
const deletedCommentResponse = await backend.delete('/comments/booking/' + bookingId);
await backend.delete('/comments/booking/' + bookingId);
} catch (err) {
if (err.response?.status === 404) {
console.log(`No comments found for booking ${bookingId}`);
Expand All @@ -267,7 +234,7 @@ const payees = eventClientResponse.data

const deleteAllEventBookings = async () => {
try {
const deletedBookingResponse = await backend.delete('/bookings/event/' + id);
await backend.delete('/bookings/event/' + id);
} catch (error) {
if (error.response?.status === 404) {
console.log(`No bookings found for event ${id}`);
Expand All @@ -281,7 +248,7 @@ const payees = eventClientResponse.data

const deleteAllAssignments = async () => {
try {
const deletedAssignmentResponse = await backend.delete('/assignments/event/' + id);
await backend.delete('/assignments/event/' + id);
} catch (error) {
if (error.response?.status === 404) {
console.log(`No assignments found for event ${id}`);
Expand All @@ -295,7 +262,7 @@ const payees = eventClientResponse.data

const saveEvent = async () => {
try {
const eventsResponse = await backend.put('/events/' + id, {
await backend.put('/events/' + id, {
name: eventName,
description: generalInformation,
archived: eventArchived
Expand All @@ -316,7 +283,7 @@ const payees = eventClientResponse.data
archived: eventArchived,
};

const bookingsResponse = await backend.post('/bookings', bookingsData);
await backend.post('/bookings', bookingsData);
}

for (const instructor of selectedInstructors) {
Expand All @@ -334,11 +301,7 @@ const payees = eventClientResponse.data
role: "payee"
});
}
<<<<<<< HEAD
navigate('/programs/' + id);
=======
exit();
>>>>>>> 4fe8d86bdf4dfaea25b6560b19eafeb05566318a

} catch (error) {
console.error("Error getting instructors:", error);
Expand All @@ -358,12 +321,12 @@ const payees = eventClientResponse.data
<Button id="save" onClick={saveEvent}>Save</Button>
<Popover id="popTrigger">
<PopoverTrigger asChild>
<Icon fontSize="2x1"><CiCircleMore/></Icon>
<Icon boxSize="5"><CiCircleMore/></Icon>
</PopoverTrigger>
<PopoverContent style={{width:"100%"}}>
<PopoverBody onClick={exit}>
<div id="cancelBody">
<Icon fontSize="2xl"><CancelIcon id="cancelIcon"/></Icon>
<Icon fontSize="1xl"><CancelIcon id="cancelIcon"/></Icon>
<p id="cancel">Cancel</p>
</div>
</PopoverBody>
Expand Down

0 comments on commit d992f22

Please sign in to comment.