Skip to content

Commit

Permalink
Merge pull request #455 from TAMUSHPE/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
JasonIsAzn authored Aug 23, 2024
2 parents 9d9eeeb + a9d0b5c commit 75cd460
Show file tree
Hide file tree
Showing 20 changed files with 2,286 additions and 1,628 deletions.
4 changes: 2 additions & 2 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"expo": {
"name": "TAMU SHPE",
"slug": "TAMU-SHPE",
"version": "1.0.6",
"version": "1.0.7",
"owner": "tamu-shpe",
"orientation": "portrait",
"icon": "./assets/icon.png",
Expand Down Expand Up @@ -54,7 +54,7 @@
"permissions": [
"android.permission.RECORD_AUDIO"
],
"versionCode": 60,
"versionCode": 65,
"userInterfaceStyle": "automatic"
},
"ios": {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "shpe-app",
"version": "1.0.6",
"version": "1.0.7",
"scripts": {
"start": "npx expo start --dev-client",
"test": "jest --coverage=true --verbose --bail --config ./jest.config.ts",
Expand Down
1 change: 0 additions & 1 deletion shpe-app-web/app/(main)/committees/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { Committee } from "@/types/committees";
import Header from "@/components/Header";
import CommitteeCard from "./components/CommitteeCard";


const Committees = () => {
const router = useRouter();
const [loading, setLoading] = useState(true);
Expand Down
7 changes: 4 additions & 3 deletions shpe-app-web/app/(main)/events/components/DayModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ interface DayModalProps {
events: SHPEEvent[];
isShowing: boolean;
hide: () => void;
toggleEventPage: (event?: SHPEEvent) => void;
}

export const DayModal: React.FC<DayModalProps> = ({ day, events, isShowing, hide }) => {
export const DayModal: React.FC<DayModalProps> = ({ day, events, isShowing, hide, toggleEventPage }) => {
const modal = (
<>
{/* Filter */}
Expand All @@ -25,7 +26,7 @@ export const DayModal: React.FC<DayModalProps> = ({ day, events, isShowing, hide
<div className="flex flex-col gap-2 w-5/6 mt-3 overflow-auto">
{events.map((event) => {
return (
<div key={event.id} className="flex bg-red-300 rounded-lg text-center font-medium p-1">
<div key={event.id} onClick={() => toggleEventPage(event)} className="flex bg-red-300 cursor-pointer rounded-lg text-center font-medium p-1">
<div className="flex flex-col items-start w-full text-black ml-6">
<p className="text-md font-semibold">{event.name}</p>
<p className="text-sm ml-4">
Expand All @@ -42,7 +43,7 @@ export const DayModal: React.FC<DayModalProps> = ({ day, events, isShowing, hide
onClick={hide}
className="absolute left-5 bg-[#500000] text-white text-sm font-semibold rounded-md p-2"
>
<img src="plus-icon.svg" className="rotate-45" />
<img src="plus-icon.svg" alt="X" className="rotate-45" />
</button>
</div>
</div>
Expand Down
23 changes: 17 additions & 6 deletions shpe-app-web/app/(main)/events/components/EventCalendar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ import WeekView from './WeekView';

interface EventCalendarProps {
events: SHPEEvent[];
toggleEventPage: (event?: SHPEEvent) => void;
}

const EventCalendar: React.FC<EventCalendarProps> = ({ events }) => {
const EventCalendar: React.FC<EventCalendarProps> = ({ events, toggleEventPage }) => {
const [focusDate, setFocusDate] = useState(new Date());
const [isMonthSelected, setIsMonthSelected] = useState(true);

Expand All @@ -33,11 +34,11 @@ const EventCalendar: React.FC<EventCalendarProps> = ({ events }) => {
<h2 className="font-semibold text-2xl mb-5">Filters</h2>
<div className="w-full h-fit flex flex-row items-center gap-3">
<button className="w-9 h-9 bg-red-300 rounded-md"></button>
<p className="text-lg font-medium">General</p>
<p className="text-lg font-medium">WIP</p>
</div>
</div>
{/* Small Calendar */}
<div className="bg-blue-500 w-full h-44 justify-self-end mb-3"></div>
<div className="bg-blue-500 w-full h-44 justify-self-end mb-3 text-center font-bold text-white content-center text-4xl">WIP</div>
</div>

<div className="flex-grow flex flex-col">
Expand Down Expand Up @@ -89,12 +90,22 @@ const EventCalendar: React.FC<EventCalendarProps> = ({ events }) => {
</button>
</div>
</div>

{/* Main Calendar */}
{isMonthSelected ? (
<MonthView eventsByDate={eventsByDate} focusDate={focusDate} setFocusDate={setFocusDate} />
<MonthView
eventsByDate={eventsByDate}
focusDate={focusDate}
setFocusDate={setFocusDate}
toggleEventPage={toggleEventPage}
/>
) : (
<WeekView eventsByDate={eventsByDate} focusDate={focusDate} setFocusDate={setFocusDate} />
<WeekView
eventsByDate={eventsByDate}
focusDate={focusDate}
setFocusDate={setFocusDate}
toggleEventPage={toggleEventPage}
/>
)}
</div>
</div>
Expand Down
Loading

0 comments on commit 75cd460

Please sign in to comment.