Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions app/apply/org/page.tsx

This file was deleted.

126 changes: 126 additions & 0 deletions app/apply/organization/page.tsx
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(FIX THIS LATER ONCE BSL-24 MERGED IN)

For lines 49–51, 52–60, 66–68, 69–77, 83–85, 86–94, 99–101, 102–110, 115–120:

use shared UI components that were created in BSL-24, once that is merged in...
Currently every form element in the file is a raw HTML element with inline Tailwind instead of the , , <textarea>, and components built in BSL-24.. so once that is merged in use that instead

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once BSL-24 is merged in, you will have to rebase on main to be able to use the shared components

Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
"use client";

import { useState } from "react";
import PublicLayout from "@/components/layout/PublicLayout";

type ProjectFormState = {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add:
submitterName: string;
submitterEmail: string;
skillsNeeded: string;

the application DB model requires submitterName and submitterEmail as top-level fields on every application record.

and add the corresponding form fields for submitterName and submitterEmail

companyName: string;
projectTitle: string;
budget: string;
description: string;
};

export default function CompanyProjectPage() {
const [form, setForm] = useState<ProjectFormState>({
companyName: "",
projectTitle: "",
budget: "",
description: "",
});

function updateField<K extends keyof ProjectFormState>(
key: K,
value: string,
) {
setForm((prev) => ({ ...prev, [key]: value }));
}

function handleSubmit(e: React.FormEvent) {
e.preventDefault();
console.log("Submitting Company Project:", form);
alert("Project details logged to console!");
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove the alert()

}

return (
<PublicLayout>
<div className="mx-auto max-w-2xl px-6 py-12">
<header className="mb-10">
<h1 className="text-3xl font-bold text-gray-900">
New Company Project
</h1>
<p className="mt-2 text-gray-600">
Submit your project proposal for review. All fields are required.
</p>
</header>

<form onSubmit={handleSubmit} className="space-y-6">
{/* Company Name Field */}
<div className="flex flex-col gap-2">
<label htmlFor="companyName" className="text-sm font-semibold">
Company / Organization Name
</label>
<input
id="companyName"
type="text"
required
value={form.companyName}
onChange={(e) => updateField("companyName", e.target.value)}
className="rounded-md border border-gray-300 px-3 py-2 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500"
placeholder="Acme Corp"
/>
</div>

<div className="grid grid-cols-1 gap-6 md:grid-cols-2">
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This grid has only one child.. projectTitle is rendering at half-width on desktop with nothing next to it. So either remove the grid wrapper and use the same flex flex-col gap-2 as your other fields, or place the skillsNeeded field which I recommended as the second column here if that layout makes sense.

Would probably just remove the grid, but you can experiment.

{/* Project Title Field */}
<div className="flex flex-col gap-2">
<label htmlFor="projectTitle" className="text-sm font-semibold">
Project Title
</label>
<input
id="projectTitle"
type="text"
required
value={form.projectTitle}
onChange={(e) => updateField("projectTitle", e.target.value)}
className="rounded-md border border-gray-300 px-3 py-2"
placeholder="Internal CRM Redesign"
/>
</div>
</div>

{/* Budget Field */}
<div className="flex flex-col gap-2">
<label htmlFor="budget" className="text-sm font-semibold">
Estimated Budget
</label>
<input
id="budget"
type="text"
required
value={form.budget}
onChange={(e) => updateField("budget", e.target.value)}
className="rounded-md border border-gray-300 px-3 py-2"
placeholder="e.g. $25,000"
/>
</div>

{/* Description Field */}
<div className="flex flex-col gap-2">
<label htmlFor="description" className="text-sm font-semibold">
Project Description
</label>
<textarea
id="description"
required
rows={4}
value={form.description}
onChange={(e) => updateField("description", e.target.value)}
className="rounded-md border border-gray-300 px-3 py-2"
placeholder="Outline the main objectives and deliverables..."
/>
</div>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's also add a skills needed part as part of the org application... something like this would do:

{/* Skills / Expertise Needed */}
<div className="flex flex-col gap-2">
  <Label htmlFor="skillsNeeded">Skills / Expertise Needed</Label>
  <Input
    id="skillsNeeded"
    type="text"
    required
    value={form.skillsNeeded}
    onChange={(e) => updateField("skillsNeeded", e.target.value)}
    placeholder="e.g. React, Node.js, UI/UX Design"
  />
</div>

(also I made the comment above to add the skillsNeeded: string to ProjectFormState

{/* Form Actions */}
<div className="pt-4">
<button
type="submit"
className="w-full rounded-md bg-blue-600 px-4 py-2 text-white font-medium hover:bg-blue-700 transition-colors"
>
Submit
</button>
</div>
</form>
</div>
</PublicLayout>
);
}
17 changes: 13 additions & 4 deletions app/apply/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,27 @@ export default function ApplyPage() {
<section className="mt-10">
<h2 className="text-2xl font-semibold mb-3">Application Types</h2>
<div className="flex flex-col gap-4">
<Link href="/apply/startup" className="underline text-gray-700 hover:text-black">
<Link
href="/apply/startup"
className="underline text-gray-700 hover:text-black"
>
Startup Application
</Link>
<Link href="/apply/org" className="underline text-gray-700 hover:text-black">
<Link
href="/apply/organization"
className="underline text-gray-700 hover:text-black"
>
Org Application
</Link>
<Link href="/apply/team" className="underline text-gray-700 hover:text-black">
<Link
href="/apply/team"
className="underline text-gray-700 hover:text-black"
>
Team Application
</Link>
</div>
</section>
</div>
</PublicLayout>
);
}
}
1 change: 1 addition & 0 deletions auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ export const { auth, handlers, signIn, signOut } = NextAuth({
strategy: "jwt",
maxAge: 30 * 24 * 60 * 60, // 30 days
},
secret: process.env.AUTH_SECRET,
});
2 changes: 1 addition & 1 deletion components/layout/PublicLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default function PublicLayout({
<main>{children}</main>

<footer>
<h3>Public Footer</h3>
<h3>Footer placeholder</h3>
</footer>
</>
);
Expand Down
35 changes: 34 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.