Skip to content

Commit 1d7fbf0

Browse files
committed
Update transportation flow for 2025
1 parent df54c0d commit 1d7fbf0

File tree

9 files changed

+20
-83
lines changed

9 files changed

+20
-83
lines changed

backend/__mocks__/constants.ts

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ export var TYPE = {
2929
export var TRANSPORTATION_TYPE = {
3030
BUS: "bus",
3131
FLIGHT: "flight",
32+
TRAIN: "train",
3233
OTHER: "other",
3334
};
3435

backend/constants.ts

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ export var TYPE = {
3030
export var TRANSPORTATION_TYPE = {
3131
BUS: "bus",
3232
FLIGHT: "flight",
33+
TRAIN: "train",
3334
OTHER: "other",
3435
};
3536

backend/routes/transportation_info.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ export function submitTransportationInfo(req: Request, res: Response) {
3636
if (new Date(e.admin_info.transportation.deadline) < new Date()) {
3737
return res.status(403).send("Transportation deadline has passed.");
3838
}
39-
if (e.admin_info.transportation.type !== TRANSPORTATION_TYPE.FLIGHT && e.admin_info.transportation.type !== TRANSPORTATION_TYPE.OTHER) {
40-
return res.status(403).send("Transportation type is not FLIGHT or OTHER.");
39+
if (e.admin_info.transportation.type !== TRANSPORTATION_TYPE.FLIGHT && e.admin_info.transportation.type !== TRANSPORTATION_TYPE.TRAIN && e.admin_info.transportation.type !== TRANSPORTATION_TYPE.OTHER) {
40+
return res.status(403).send("Transportation type is not FLIGHT or TRAIN or OTHER.");
4141
}
4242
// todo: share this with the frontend in some common configuration.
4343
const requiredFields = {

backend/routes/user_bulk_change.ts

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ export function bulkChangeUsers(req: Request, res: Response) {
2525
switch (element.transportationType) {
2626
case TRANSPORTATION_TYPE.BUS:
2727
case TRANSPORTATION_TYPE.FLIGHT:
28+
case TRANSPORTATION_TYPE.TRAIN:
2829
case TRANSPORTATION_TYPE.OTHER:
2930
break;
3031
case "":

src/Dashboard/AdmittedScreen.tsx

+7-7
Original file line numberDiff line numberDiff line change
@@ -10,27 +10,27 @@ interface IAdmittedScreenProps {
1010
declineAdmission: () => void;
1111
confirmedYet: boolean;
1212
deadline: string;
13+
stanford?: boolean;
1314
}
1415
export const AdmittedScreen = (props: IAdmittedScreenProps) => (
1516
<div className="admitted-content">
1617
{props.confirmedYet && (
1718
<div>
18-
<h4>Complete the following by <strong>January 21st:</strong></h4>
19+
<h4>Complete the following by <strong>January 1st:</strong></h4>
1920
<ul style={{ textAlign: "left", margin: "20px auto", maxWidth: 575 }}>
20-
<li>Follow the steps in <Link to="/transportation">travel section</Link> <strong>as early as possible!</strong> </li>
21-
<li>Fill out the quick <a href="https://forms.gle/v44CrmU426cfhxwh6">Travel Acknowledgement Form</a></li>
22-
<li><a href="https://forms.gle/YwPqv684XYq3f4RZ7">Register for GrantEd</a> (this is required in order to receive a prize or a travel reimbursement)</li>
23-
<li>Complete the <a href="https://docs.google.com/forms/d/e/1FAIpQLSd5JHPbFsLVz4pKt6YtJuZdISozgmnTrRdRFKvI_AhPQE_mow/viewform">liability form </a></li>
21+
{!props.stanford && <li>Follow the steps in <Link to="/transportation">travel section</Link> <strong>as early as possible!</strong> </li>}
22+
<li>Fill out the quick <a href="https://forms.gle/NdxcXZWqmW5erSA27">Acceptance and Travel Acknowledgement Form</a></li>
2423
</ul>
2524
<p>
2625
Keep an eye on your inbox in the coming weeks -- we'll be sending more
2726
details to you shortly!
2827
</p>
29-
<button className="btn btn-custom">
28+
{/* Commenting out until updated */}
29+
{/* <button className="btn btn-custom">
3030
<a href="https://docs.google.com/document/d/162lC3yzvkURS1FZcVX-vpMckuWYkbqnoESZcPdxRdHk/edit?usp=sharing" style={{ color: "white" }}>
3131
Ultimate TreeHacks Guide
3232
</a>
33-
</button>
33+
</button> */}
3434
</div>
3535
)}
3636
{!props.confirmedYet && (

src/Dashboard/Dashboard.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export const Dashboard = (props: IDashboardProps) => {
9797
) : props.profile.status === STATUS.WAITLISTED ? (
9898
<WaitlistedScreen />
9999
) : (props.profile.status === STATUS.ADMISSION_CONFIRMED && props.profile.type === TYPE.STANFORD) ? (
100-
<AdmittedStanford confirmedYet={true} />
100+
<AdmittedScreen confirmedYet={true} stanford={true} />
101101
): props.profile.status === STATUS.ADMISSION_CONFIRMED ? (
102102
<AdmittedScreen confirmedYet={true} />
103103
) : props.profile.status === STATUS.ADMISSION_DECLINED ? (
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,8 @@
11
import React from "react";
22
import { HACKATHON_YEAR } from "../constants";
3-
import { Link } from "react-router-dom";
43

54
export default () => (
65
<div>
7-
<p style={{ maxWidth: 575, margin: "20px auto" }}>
8-
We have calculated your flight cap based on the location in your application, and above is the amount up to which we can reimburse the cost of your flight.<strong> If you do not book your flight through Egencia (details below) by the deadline, we will assume you are declining the reimbursement, and you will not be reimbursed. </strong>See the detailed steps below that walk you through booking a flight using Egencia! This should take about 15-20 minutes and must be completed by the deadline above.
9-
</p>
10-
<button className="btn btn-custom">
11-
<a href="https://www.egencia.com/pub/agent.dll?qscr=mtgd&mgid=84861&miid=87A6AC6D9057&gpid=9AE927F23FE9" style={{ color: "white" }}>
12-
Egencia
13-
</a>
14-
</button>
15-
<ul style={{ textAlign: "left", margin: "20px auto", maxWidth: 575 }}>
16-
<li> Create an account on Egencia
17-
<ul>
18-
<li>Select “Create an account for TreeHacks 2025”.</li>
19-
<li>Your name must match your government ID exactly.</li>
20-
<li>For Egencia user name, use the email address you applied to TreeHacks with.</li>
21-
<li>Select “Use password sign-in”.</li>
22-
<li>For SUNet ID, put “N/A”.</li>
23-
<li>For email, use the email address you applied to TreeHacks with.</li>
24-
<li>For Affiliation, put “Guest”.</li>
25-
<li>For Employee ID, put “0”.</li>
26-
<li>For Budget Unit, select “University General”.</li>
27-
<li>Click “Submit user account request”.</li>
28-
<li>You will then receive an email to create your password.</li>
29-
</ul>
30-
</li>
31-
<li>
32-
Book flight through Egencia
33-
<ul>
34-
<li>On your profile, select “Add a flight”.</li>
35-
<li>The name of your traveler must match your government ID exactly.</li>
36-
<li>Fly into SFO or SJC.</li>
37-
<li>Be sure to book a flight that will let you arrive at Stanford campus BEFORE 5:30pm on Friday, Feb 16.</li>
38-
<li>Be sure to book a flight that will let you leave campus no earlier than 2:30pm on Sunday, Feb 18.</li>
39-
<li>Leaving earlier than 2:30pm may mean you will not be able to receive your prize.</li>
40-
<li>Upon checkout:</li>
41-
<ul>
42-
<li>Use your own credit card to pay for your flight. If you meet all reimbursement criteria, you will be reimbursed after the event.</li>
43-
<li>Select “No” when responding to the ‘Is this trip Federally Funded?’ question.</li>
44-
<li>Select “Business” when responding to the ‘Business or Personal Travel’ question.</li>
45-
<li>Include “Test Event” in the ‘Expense Notes’ field.</li>
46-
<li>Read the flight reimbursement criteria below.</li>
47-
</ul>
48-
</ul>
49-
</li>
50-
</ul>
51-
<p style={{ textAlign: "left", margin: "20px auto", maxWidth: 575 }}>
52-
Your reimbursement will be rejected if you don't:
53-
</p>
54-
<ul style={{ textAlign: "left", margin: "20px auto", maxWidth: 575 }}>
55-
<li>Check-in at the event in person</li>
56-
<li>Submit a qualified project to the Devpost before hacking closes. A qualified project is one where: </li>
57-
<ul>
58-
<li>it is clear that thought and effort went into the project</li>
59-
<li>it contains original code and is not a fork/clone of an existing repo</li>
60-
<li>it adheres to the rules of the hackathon, which require all coding to be done during the 36 hours</li>
61-
</ul>
62-
<li>
63-
Follow any and all TreeHacks rules &amp; the{" "}
64-
<a
65-
target="_blank"
66-
href="https://github.com/TreeHacks/policies/blob/master/code-of-conduct.md"
67-
>
68-
TreeHacks Code of Conduct.
69-
</a>
70-
</li>
71-
</ul>
6+
Please read and complete the <a href="https://docs.google.com/document/d/1QVkvW3RKHdBwrWalww8Q3QGB-ukNai_m7BX0iqfzFGQ/edit?usp=sharing">TreeHacks {HACKATHON_YEAR} Travel Reimbursement Instructions</a>
727
</div>
738
);

src/Transportation/Transportation.tsx

+5-7
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ export class Transportation extends React.Component<ITransportationProps> {
109109
const dateNow = moment();
110110
const deadlinePassed = dateNow > transportationDeadline;
111111
let transportationForm = this.props.formData || {};
112+
112113
if (status !== STATUS.ADMITTED && status !== STATUS.ADMISSION_CONFIRMED) {
113114
// No travel info to show
114115
return (
@@ -140,7 +141,7 @@ export class Transportation extends React.Component<ITransportationProps> {
140141
</div>
141142
);
142143
}
143-
if (transportation_status === TRANSPORTATION_STATUS.UNAVAILABLE) {
144+
if (transportation_status === TRANSPORTATION_STATUS.UNAVAILABLE || transportationType === TRANSPORTATION_TYPES.OTHER) {
144145
return (
145146
<div
146147
style={{
@@ -289,7 +290,7 @@ export class Transportation extends React.Component<ITransportationProps> {
289290

290291
if (
291292
transportationType === TRANSPORTATION_TYPES.FLIGHT ||
292-
transportationType === TRANSPORTATION_TYPES.OTHER
293+
transportationType === TRANSPORTATION_TYPES.TRAIN
293294
) {
294295
if (
295296
dateNow > transportationDeadline &&
@@ -308,8 +309,6 @@ export class Transportation extends React.Component<ITransportationProps> {
308309
}}
309310
>
310311
<div className="treehacks-alert">
311-
{transportationType === TRANSPORTATION_TYPES.FLIGHT && (
312-
<>
313312
<h5>
314313
TreeHacks is reimbursing you up to{" "}
315314
<span className="treehacks-transportation-amount-text">
@@ -318,11 +317,10 @@ export class Transportation extends React.Component<ITransportationProps> {
318317
currency: "USD",
319318
})}
320319
</span>
320+
{" "}for your{" "}
321+
{transportationType === TRANSPORTATION_TYPES.TRAIN ? "train" : "flight"}
321322
</h5>
322323
<FlightReimbursementHeader />
323-
</>
324-
)}
325-
)}
326324
</div>
327325
</div>
328326
);

src/constants.ts

+1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ export var TRANSPORTATION_STATUS = {
4444
export var TRANSPORTATION_TYPES = {
4545
BUS: "bus",
4646
FLIGHT: "flight",
47+
TRAIN: "train",
4748
OTHER: "other",
4849
};
4950

0 commit comments

Comments
 (0)