From ac20e601fbd67517c3ae635d7d939c11ef24e3a5 Mon Sep 17 00:00:00 2001 From: Ethan Tiger Wakefield Date: Mon, 20 Oct 2025 19:57:52 -0400 Subject: [PATCH 1/8] launch --- src/App.tsx | 12 +++---- src/components/Navbar.tsx | 37 ++++++++++----------- src/features/profile/components/Profile.tsx | 4 +-- 3 files changed, 23 insertions(+), 30 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 7825dde..b36e47f 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -6,8 +6,6 @@ import Login from "./pages/Login"; import Navbar from "./components/Navbar"; import Dashboard from "./pages/Dashboard"; -import { devTesting } from "./config"; - function App() { const { user, authIsReady } = useAuthContext(); @@ -32,12 +30,10 @@ function AppRoutes({ user }: { user: any }) { {!location.pathname.includes("/dashboard") && } } /> - {devTesting && ( - <> - : } /> - : } /> - - )} + <> + : } /> + : } /> + ); diff --git a/src/components/Navbar.tsx b/src/components/Navbar.tsx index d297fd2..b09baef 100644 --- a/src/components/Navbar.tsx +++ b/src/components/Navbar.tsx @@ -1,7 +1,6 @@ import React, { useState } from "react"; import { Link, useNavigate } from "react-router-dom"; import { useAuthContext } from "@/hooks/useAuthContext"; -import { devTesting } from "@/config"; import { IconMenu2, IconX } from "@tabler/icons-react"; import wccLogo from "@/assets/WCC-logo-symbol.png"; @@ -60,25 +59,23 @@ const Navbar: React.FC = () => { ))} - {devTesting && ( -
  • - {user ? ( - - Dashboard - - ) : ( - - Login - - )} -
  • - )} +
  • + {user ? ( + + Dashboard + + ) : ( + + Login + + )} +
  • {/* Hamburger button for -
    +
    @@ -91,7 +91,7 @@ export default function Profile() { return (
    -
    +
    {/* Header */}
    From 738f3a9d4393c978e7cc78ae323a43d7059c5d8f Mon Sep 17 00:00:00 2001 From: Ethan Tiger Wakefield Date: Mon, 20 Oct 2025 20:00:49 -0400 Subject: [PATCH 2/8] add rules test --- .github/workflows/firebase-rules.yml | 29 ++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/firebase-rules.yml diff --git a/.github/workflows/firebase-rules.yml b/.github/workflows/firebase-rules.yml new file mode 100644 index 0000000..9c4548e --- /dev/null +++ b/.github/workflows/firebase-rules.yml @@ -0,0 +1,29 @@ +name: Run Firebase Rules Tests + +# Trigger this workflow on push and pull request +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + test: + runs-on: ubuntu-latest + + steps: + # Step 1: Checkout the repository code + - name: Checkout code + uses: actions/checkout@v3 + + # Step 2: Set up Node.js environment + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: '20' # Or any node version that your project uses + + # Step 3: Install dependencies (you may need `npm ci` for better performance) + - name: Install dependencies and run tests + run: npm install && npm run test:rules \ No newline at end of file From b6bad48c586361ef9b09aa1a35a380aeac256323 Mon Sep 17 00:00:00 2001 From: Ethan Tiger Wakefield Date: Mon, 20 Oct 2025 20:03:56 -0400 Subject: [PATCH 3/8] try --- .github/workflows/firebase-rules.yml | 34 ++++++++-------------------- 1 file changed, 9 insertions(+), 25 deletions(-) diff --git a/.github/workflows/firebase-rules.yml b/.github/workflows/firebase-rules.yml index 9c4548e..adce911 100644 --- a/.github/workflows/firebase-rules.yml +++ b/.github/workflows/firebase-rules.yml @@ -1,29 +1,13 @@ -name: Run Firebase Rules Tests - -# Trigger this workflow on push and pull request -on: - push: - branches: - - main - pull_request: - branches: - - main - +name: Test Firebase rules on PR +'on': pull_request jobs: - test: + test_rules: runs-on: ubuntu-latest - steps: - # Step 1: Checkout the repository code - - name: Checkout code - uses: actions/checkout@v3 - - # Step 2: Set up Node.js environment - - name: Setup Node.js - uses: actions/setup-node@v3 + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 with: - node-version: '20' # Or any node version that your project uses - - # Step 3: Install dependencies (you may need `npm ci` for better performance) - - name: Install dependencies and run tests - run: npm install && npm run test:rules \ No newline at end of file + node-version: '20' + - run: npm install -g firebase-tools + - run: npm ci + - run: npm run test:rules \ No newline at end of file From 9e93e34bd23779cd8a7869feef925475e4b2a9da Mon Sep 17 00:00:00 2001 From: Ethan Tiger Wakefield Date: Tue, 13 Jan 2026 13:22:37 -0500 Subject: [PATCH 4/8] try adding java --- .github/workflows/firebase-rules.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/firebase-rules.yml b/.github/workflows/firebase-rules.yml index adce911..4f7fdca 100644 --- a/.github/workflows/firebase-rules.yml +++ b/.github/workflows/firebase-rules.yml @@ -5,6 +5,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: '21' - uses: actions/setup-node@v3 with: node-version: '20' From 933b3525b708eecb5a72cee2e2699f8237c06d05 Mon Sep 17 00:00:00 2001 From: Ethan Tiger Wakefield Date: Tue, 13 Jan 2026 15:47:27 -0500 Subject: [PATCH 5/8] remove gradient --- src/features/carpool/components/Carpool.tsx | 2 +- src/features/carpool/components/CarpoolDetails.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/features/carpool/components/Carpool.tsx b/src/features/carpool/components/Carpool.tsx index a5f728e..0a6083c 100644 --- a/src/features/carpool/components/Carpool.tsx +++ b/src/features/carpool/components/Carpool.tsx @@ -86,7 +86,7 @@ export default function Carpool() {
    -

    +

    Available Carpools

    diff --git a/src/features/carpool/components/CarpoolDetails.tsx b/src/features/carpool/components/CarpoolDetails.tsx index c126b01..d8d9b27 100644 --- a/src/features/carpool/components/CarpoolDetails.tsx +++ b/src/features/carpool/components/CarpoolDetails.tsx @@ -587,7 +587,7 @@ export default function CarpoolDetails() {
    -

    +

    Carpool Details

    From 9bc2dd4a0ffec61f69656df34756479cf66fef95 Mon Sep 17 00:00:00 2001 From: Ethan Tiger Wakefield Date: Tue, 13 Jan 2026 16:38:20 -0500 Subject: [PATCH 6/8] open email --- .../carpool/components/CarpoolDetails.tsx | 48 ++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) diff --git a/src/features/carpool/components/CarpoolDetails.tsx b/src/features/carpool/components/CarpoolDetails.tsx index d8d9b27..2bc2294 100644 --- a/src/features/carpool/components/CarpoolDetails.tsx +++ b/src/features/carpool/components/CarpoolDetails.tsx @@ -1,7 +1,7 @@ import { useParams, Link, useNavigate } from "react-router-dom"; import { useCarpoolWithUser } from "@/hooks/useCarpoolWithUser"; import { CarpoolStatusEnum } from "../enums/CarpoolStatusEnum"; -import { IconArrowLeft, IconCalendar, IconUser, IconUsers, IconMapPin, IconClock, IconFileText, IconEdit, IconTrash, IconChevronDown, IconPhone, IconMail, IconX, IconAlertTriangle } from "@tabler/icons-react"; +import { IconArrowLeft, IconCalendar, IconUser, IconUsers, IconMapPin, IconClock, IconFileText, IconEdit, IconTrash, IconChevronDown, IconPhone, IconMail, IconX, IconAlertTriangle, IconMailForward } from "@tabler/icons-react"; import { convertTimestampToDate } from "@/utils/firebaseDateConvert"; import { useAuthContext } from "@/hooks/useAuthContext"; import { doc, updateDoc, arrayUnion, arrayRemove, deleteDoc } from "firebase/firestore"; @@ -380,6 +380,44 @@ export default function CarpoolDetails() { window.location.reload(); }; + // Function to handle emailing all carpool members + const handleEmailAll = () => { + if (!carpoolUsers || carpoolUsers.length === 0) { + setMessage({ text: "No participants to email.", type: 'info' }); + return; + } + + if (!carpool) return; + // Collect all emails from carpool users + const emails = carpoolUsers + .map(user => user.email) + .filter(email => email); // Filter out undefined/null emails + + if (emails.length === 0) { + setMessage({ text: "No email addresses available for participants.", type: 'error' }); + return; + } + + // Create subject and body for the email + const subject = encodeURIComponent(`Carpool Update: ${carpool.location} → ${carpool.destination}`); + const body = encodeURIComponent( + `Hello everyone,\n\n` + + `This is an update about our carpool:\n\n` + + `From: ${carpool.location}\n` + + `To: ${carpool.destination}\n` + + `Date: ${convertTimestampToDate(carpool.targetDate).date}\n` + + `Time: ${convertTimestampToDate(carpool.targetDate).time}\n\n` + + `[Your message here]\n\n` + + `Best regards` + ); + + // Create mailto link with all emails in TO field + const mailtoLink = `mailto:${emails.join(',')}?subject=${subject}&body=${body}`; + + // Open the mailto link + window.location.href = mailtoLink; + }; + // Function to render the appropriate action button based on carpool status and user relationship const renderActionButton = () => { if (!carpool) return null; @@ -600,6 +638,14 @@ export default function CarpoolDetails() { {/* Owner Actions */} {currentUser && carpool.userId === currentUser.uid && (

    +