feat: create closed form page and close all student forms

This commit is contained in:
alphafetus committed 2026-04-09 11:08:28 -04:00
1 parent 467f8c9020
commit 3cf5e6342b
4 files changed
+31 -23

No files matched your search

+11 -20
View File
@@ -134,26 +134,17 @@ fn StudentRoutes() -> impl MatchNestedRoutes + Clone {
<ParentRoute path=path!("students") view=student::StudentShell>
<Route path=path!("callback") view=AuthCallbackPage />
<Route path=path!("home") view=student::StudentHomePage />
<Route path=path!("demographics") view=student::StudentDemographicsPage />
<Route path=path!("eligibility") view=student::StudentEligibilityPage />
<Route path=path!("additional") view=student::AdditionalPage />
<Route path=path!("additional/academics") view=student::StudentAcademicsPage />
<Route path=path!("additional/athletics") view=student::StudentAthleticsPage />
<Route
path=path!("additional/extracurriculars")
view=student::StudentExtracurricularsPage
/>
<Route
path=path!("additional/work-experience")
view=student::StudentWorkExperiencePage
/>
<Route path=path!("additional/university") view=student::StudentUniversityPage />
<Route path=path!("additional/family-info") view=student::StudentFamilyPage />
<Route path=path!("additional/financials") view=student::StudentFinancialPage />
<Route
path=path!("additional/specifics")
view=student::StudentSpecificRequirementsPage
/>
<Route path=path!("demographics") view=student::ClosedForm />
<Route path=path!("eligibility") view=student::ClosedForm />
<Route path=path!("additional") view=student::ClosedForm />
<Route path=path!("additional/academics") view=student::ClosedForm />
<Route path=path!("additional/athletics") view=student::ClosedForm />
<Route path=path!("additional/extracurriculars") view=student::ClosedForm />
<Route path=path!("additional/work-experience") view=student::ClosedForm />
<Route path=path!("additional/university") view=student::ClosedForm />
<Route path=path!("additional/family-info") view=student::ClosedForm />
<Route path=path!("additional/financials") view=student::ClosedForm />
<Route path=path!("additional/specifics") view=student::ClosedForm />
</ParentRoute>
}
.into_inner()
+13
View File
@@ -0,0 +1,13 @@
use leptos::prelude::*;
#[component]
pub fn ClosedForm() -> impl IntoView {
view! {
<div class="flex flex-col items-center mx-auto mt-10">
<h1 class="text-2xl font-bold">"Form Closed"</h1>
<p class="text-lg">
"This form is now closed. If you believe this is an error, please contact the guidance office."
</p>
</div>
}
}
+3 -1
View File
@@ -146,7 +146,9 @@ pub fn StudentEligibilityPage() -> impl IntoView {
),
async move |(access_token, form_id, scholarship_id)| {
let Some(access_token) = access_token else {
return Err(ServerFnError::new("Couldn't find access token"));
return Err(
ServerFnError::new("Couldn't find access token"),
);
};
list_files(access_token, form_id, scholarship_id).await
},
+4 -2
View File
@@ -1,6 +1,7 @@
mod academics_page;
mod additional_page;
mod athletics_page;
mod closed_form;
mod demographics_page;
mod eligibility_page;
mod extracurriculars_page;
@@ -9,14 +10,15 @@ mod financial_page;
mod form_setup;
mod home_page;
mod shell;
mod specific_requirements_page;
mod test_display;
mod university_page;
mod work_experience_page;
mod specific_requirements_page;
pub use academics_page::*;
pub use additional_page::*;
pub use athletics_page::*;
pub use closed_form::*;
pub use demographics_page::*;
pub use eligibility_page::*;
pub use extracurriculars_page::*;
@@ -24,7 +26,7 @@ pub use family_info_page::*;
pub use financial_page::*;
pub use home_page::*;
pub use shell::*;
pub use specific_requirements_page::*;
pub use test_display::*;
pub use university_page::*;
pub use work_experience_page::*;
pub use specific_requirements_page::*;