style: rustfmt run

This commit is contained in:
alphafetus committed 2026-03-06 07:39:28 -05:00
1 parent 1427c51bd3
commit 05ef850f82
9 files changed
+117 -98

No files matched your search

+9 -6
View File
@@ -1,11 +1,11 @@
use crate::components::ToastList; use crate::components::ToastList;
use crate::components::login::ProviderLoginContext; use crate::components::login::ProviderLoginContext;
use crate::pages::{student, FormClosedPage};
use crate::pages::{ use crate::pages::{
AdminHomePage, AdminProviderPage, AdminScholarshipPage, AdminShell, AdminUtilsPage, AdminHomePage, AdminProviderPage, AdminScholarshipPage, AdminShell, AdminUtilsPage,
ApplicantsPageFallback, AuthCallbackPage, LoanerBorrowForm, LoanerFallback, LoanerReturnForm, ApplicantsPageFallback, AuthCallbackPage, LoanerBorrowForm, LoanerFallback, LoanerReturnForm,
LoanerShell, ProviderContactPage, ProviderPortal, LoanerShell, ProviderContactPage, ProviderPortal,
}; };
use crate::pages::{FormClosedPage, student};
use leptos::prelude::*; use leptos::prelude::*;
use leptos_meta::{MetaTags, Stylesheet, Title, provide_meta_context}; use leptos_meta::{MetaTags, Stylesheet, Title, provide_meta_context};
use leptos_oidc::AuthSignal; use leptos_oidc::AuthSignal;
@@ -90,10 +90,10 @@ fn ProviderRoutes() -> impl MatchNestedRoutes + Clone {
<Route path=path!("/callback") view=AuthCallbackPage /> <Route path=path!("/callback") view=AuthCallbackPage />
<Route path=path!("/profile") view=ProviderContactPage /> <Route path=path!("/profile") view=ProviderContactPage />
<Route path=path!("/scholarships") view=FormClosedPage /> <Route path=path!("/scholarships") view=FormClosedPage />
// <ParentRoute path=path!("/scholarships") view=FormClosedPage> // <ParentRoute path=path!("/scholarships") view=FormClosedPage>
// <Route path=path!(":id") view=FormClosedPage /> // <Route path=path!(":id") view=FormClosedPage />
// <Route path=path!("") view=FormClosedPage /> // <Route path=path!("") view=FormClosedPage />
// </ParentRoute> // </ParentRoute>
</ParentRoute> </ParentRoute>
} }
.into_inner() .into_inner()
@@ -150,7 +150,10 @@ fn StudentRoutes() -> impl MatchNestedRoutes + Clone {
<Route path=path!("additional/university") view=student::StudentUniversityPage /> <Route path=path!("additional/university") view=student::StudentUniversityPage />
<Route path=path!("additional/family-info") view=student::StudentFamilyPage /> <Route path=path!("additional/family-info") view=student::StudentFamilyPage />
<Route path=path!("additional/financials") view=student::StudentFinancialPage /> <Route path=path!("additional/financials") view=student::StudentFinancialPage />
<Route path=path!("additional/specifics") view=student::StudentSpecificRequirementsPage /> <Route
path=path!("additional/specifics")
view=student::StudentSpecificRequirementsPage
/>
</ParentRoute> </ParentRoute>
} }
.into_inner() .into_inner()
+4 -3
View File
@@ -43,8 +43,8 @@ pub fn DashboardButton(
<button <button
type="button" type="button"
class="dashboard-button flex items-start gap-3 rounded-lg bg-white border-grey-300 p-6 class="dashboard-button flex items-start gap-3 rounded-lg bg-white border-grey-300 p-6
hover:bg-gray-100 transition cursor-pointer w-full text-left hover:bg-gray-100 transition cursor-pointer w-full text-left
shadow-[inset_0_0_6px_rgba(0,0,0,0.12)]" shadow-[inset_0_0_6px_rgba(0,0,0,0.12)]"
on:click=on_click on:click=on_click
> >
<div class="flex flex-col"> <div class="flex flex-col">
@@ -57,5 +57,6 @@ pub fn DashboardButton(
</div> </div>
</button> </button>
}.into_any() }
.into_any()
} }
+7 -8
View File
@@ -1,5 +1,5 @@
use leptos::prelude::*; use crate::components::Banner;
use crate::components::Banner; use leptos::prelude::*;
#[component] #[component]
pub fn FormClosedPage() -> impl IntoView { pub fn FormClosedPage() -> impl IntoView {
@@ -7,14 +7,13 @@ pub fn FormClosedPage() -> impl IntoView {
// about which form is closed right now. // about which form is closed right now.
view! { view! {
<Banner <Banner title="R15 Scholarships" logo="/PHS_Stacked_Acronym.png" path="/providers" />
title="R15 Scholarships"
logo="/PHS_Stacked_Acronym.png"
path="/providers"
/>
<div class="flex flex-1 flex-col gap-4 items-center m-4"> <div class="flex flex-1 flex-col gap-4 items-center m-4">
<div class="font-bold text-3xl">"This form has been closed!"</div> <div class="font-bold text-3xl">"This form has been closed!"</div>
<div class="text-lg">"If you believe this is an error, please contact Sara Smith at "<a href="mailto:ssmith@region15.org">"ssmith@region15.org"</a></div> <div class="text-lg">
"If you believe this is an error, please contact Sara Smith at "
<a href="mailto:ssmith@region15.org">"ssmith@region15.org"</a>
</div>
</div> </div>
} }
} }
+2 -2
View File
@@ -1,7 +1,7 @@
use leptos::prelude::*; use crate::components::{Loading, MultiEntry, ValidatedForm};
use crate::components::{Loading, MultiEntry, ValidatedForm};
use crate::input; use crate::input;
use crate::pages::student::form_setup::use_student_form; use crate::pages::student::form_setup::use_student_form;
use leptos::prelude::*;
#[component] #[component]
pub fn StudentAthleticsPage() -> impl IntoView { pub fn StudentAthleticsPage() -> impl IntoView {
+6 -2
View File
@@ -1,6 +1,6 @@
use leptos::prelude::*;
use crate::components::{Loading, OutlinedTextField, Select, TextFieldType, ValidatedForm}; use crate::components::{Loading, OutlinedTextField, Select, TextFieldType, ValidatedForm};
use crate::pages::student::form_setup::use_student_form; use crate::pages::student::form_setup::use_student_form;
use leptos::prelude::*;
#[component] #[component]
pub fn StudentDemographicsPage() -> impl IntoView { pub fn StudentDemographicsPage() -> impl IntoView {
@@ -49,7 +49,11 @@ pub fn StudentDemographicsPage() -> impl IntoView {
data_map=controller.data_map data_map=controller.data_map
data_member="dob" data_member="dob"
required=true required=true
value_list=vec!["Male".to_string(), "Female".to_string(), "Prefer not to answer/Other".to_string()] value_list=vec![
"Male".to_string(),
"Female".to_string(),
"Prefer not to answer/Other".to_string(),
]
/> />
<OutlinedTextField <OutlinedTextField
label="Student ID Number:" label="Student ID Number:"
+2 -3
View File
@@ -30,9 +30,8 @@ pub fn StudentFinancialPage() -> impl IntoView {
<div class="flex flex-col flex-2 mt-6"> <div class="flex flex-col flex-2 mt-6">
<Header <Header
title="Financial Information" title="Financial Information"
description= description="Please upload your FAFSA SAR (Student Aid Report) here. This information is NOT required,
"Please upload your FAFSA SAR (Student Aid Report) here. This information is NOT required, but some scholarships may recognize this as a requirement."
but some scholarships may recognize this as a requirement."
/> />
<Suspense fallback=Loading> <Suspense fallback=Loading>
<FileDrop <FileDrop
+4 -2
View File
@@ -1,5 +1,5 @@
use leptos::prelude::*;
use crate::components::DashboardButton; use crate::components::DashboardButton;
use leptos::prelude::*;
#[component] #[component]
pub fn StudentHomePage() -> impl IntoView { pub fn StudentHomePage() -> impl IntoView {
@@ -9,7 +9,9 @@ pub fn StudentHomePage() -> impl IntoView {
<div class="font-bold text-3xl">"Region 15 Scholarship Application"</div> <div class="font-bold text-3xl">"Region 15 Scholarship Application"</div>
<div class="text-lg"> <div class="text-lg">
"Welcome to the R15 general scholarship application! If you have any questions, please direct them to Sara Smith at " "Welcome to the R15 general scholarship application! If you have any questions, please direct them to Sara Smith at "
<a class="text-blue-500 underline" href="mailto:ssmith@region15.org">"ssmith@region15.org"</a>"." <a class="text-blue-500 underline" href="mailto:ssmith@region15.org">
"ssmith@region15.org"
</a>"."
</div> </div>
<div class="text-lg">"Here are some links to get you started:"</div> <div class="text-lg">"Here are some links to get you started:"</div>
<DashboardButton <DashboardButton
+72 -67
View File
@@ -1,6 +1,6 @@
use leptos::prelude::*; use crate::components::{Loading, RadioList, ValidatedForm};
use crate::components::{Loading, RadioList, ValidatedForm};
use crate::pages::student::form_setup::use_student_form; use crate::pages::student::form_setup::use_student_form;
use leptos::prelude::*;
#[component] #[component]
pub fn StudentSpecificRequirementsPage() -> impl IntoView { pub fn StudentSpecificRequirementsPage() -> impl IntoView {
@@ -8,71 +8,76 @@ pub fn StudentSpecificRequirementsPage() -> impl IntoView {
view! { view! {
<Suspense fallback=Loading> <Suspense fallback=Loading>
{move || controller.data_resource.get() {move || {
.map(move |_| { controller
view! { .data_resource
<div class="flex-1" /> .get()
<div class="flex flex-col flex-2 mt-6"> .map(move |_| {
<ValidatedForm view! {
title="Scholarship-Specific Eligibility Requirements" <div class="flex-1" />
description="These questions are specific to some scholarships. Indicate yes or no for each question." <div class="flex flex-col flex-2 mt-6">
on_submit=controller.submit_action <ValidatedForm
> title="Scholarship-Specific Eligibility Requirements"
<RadioList description="These questions are specific to some scholarships. Indicate yes or no for each question."
label="Have you attended BAS?" on_submit=controller.submit_action
data_map=controller.data_map >
data_member="attend_bas" <RadioList
items=vec!["Yes".to_string(), "No".to_string()] label="Have you attended BAS?"
required=true data_map=controller.data_map
/> data_member="attend_bas"
<RadioList items=vec!["Yes".to_string(), "No".to_string()]
label="Are you a member of Midd-South Catholic Church?" required=true
data_map=controller.data_map />
data_member="middsouth_church" <RadioList
items=vec!["Yes".to_string(), "No".to_string()] label="Are you a member of Midd-South Catholic Church?"
required=true data_map=controller.data_map
/> data_member="middsouth_church"
<RadioList items=vec!["Yes".to_string(), "No".to_string()]
label="Do you have a family member that is or has served in the US military?" required=true
data_map=controller.data_map />
data_member="family_military_service" <RadioList
items=vec!["Yes".to_string(), "No".to_string()] label="Do you have a family member that is or has served in the US military? (Note: you may be asked for proof of service)"
required=true data_map=controller.data_map
/> data_member="family_military_service"
<RadioList items=vec!["Yes".to_string(), "No".to_string()]
label="Have you participated in Pomperaug Youth Baseball?" required=true
data_map=controller.data_map />
data_member="youth_baseball" <RadioList
items=vec!["Yes".to_string(), "No".to_string()] label="Have you participated in Pomperaug Youth Baseball?"
required=true data_map=controller.data_map
/> data_member="youth_baseball"
<RadioList items=vec!["Yes".to_string(), "No".to_string()]
label="Have you participated in the Panthers Aquatic Club?" required=true
data_map=controller.data_map />
data_member="aquatic_club" <RadioList
items=vec!["Yes".to_string(), "No".to_string()] label="Have you participated in the Panthers Aquatic Club?"
required=true data_map=controller.data_map
/> data_member="aquatic_club"
<RadioList items=vec!["Yes".to_string(), "No".to_string()]
label="Are at least one of your parents a member of the Region 15 PEA?" required=true
data_map=controller.data_map />
data_member="pea_member" <RadioList
items=vec!["Yes".to_string(), "No".to_string()] label="Are at least one of your parents a member of the Region 15 PEA?"
required=true data_map=controller.data_map
/> data_member="pea_member"
<RadioList items=vec!["Yes".to_string(), "No".to_string()]
label="Have you participated in the PHS Music Program (Band, Chorus, etc)?" required=true
data_map=controller.data_map />
data_member="music_program" <RadioList
items=vec!["Yes".to_string(), "No".to_string()] label="Have you participated in the PHS Music Program (Band, Chorus, etc)?"
required=true data_map=controller.data_map
/> data_member="music_program"
</ValidatedForm> items=vec!["Yes".to_string(), "No".to_string()]
</div> required=true
<div class="flex-1" /> />
}.into_any() </ValidatedForm>
}).collect_view() </div>
} <div class="flex-1" />
}
.into_any()
})
.collect_view()
}}
</Suspense> </Suspense>
} }
} }
+11 -5
View File
@@ -1,7 +1,7 @@
use leptos::prelude::*; use crate::components::{Loading, MultiEntry, ValidatedForm};
use crate::components::{Loading, MultiEntry, ValidatedForm};
use crate::input; use crate::input;
use crate::pages::student::form_setup::use_student_form; use crate::pages::student::form_setup::use_student_form;
use leptos::prelude::*;
#[component] #[component]
pub fn StudentWorkExperiencePage() -> impl IntoView { pub fn StudentWorkExperiencePage() -> impl IntoView {
@@ -26,9 +26,15 @@ pub fn StudentWorkExperiencePage() -> impl IntoView {
Text, "job_title", "Job Title:", true, "Waiter, Cashier, etc..." Text, "job_title", "Job Title:", true, "Waiter, Cashier, etc..."
), ),
input!(Text, "employer", "Employer:", true, "Your employer's name..."), input!(Text, "employer", "Employer:", true, "Your employer's name..."),
input!(Text, "start_date", "Approximate start date:", true, "01/01/2000"), input!(
input!(Text, "end_date", "End date:", true, "01/01/2026, or current if not applicable"), Text, "start_date", "Approximate start date:", true, "01/01/2000"
input!(Number, "num_hours", "Approximate number of hours per week:", true, "25") ),
input!(
Text, "end_date", "End date:", true, "01/01/2026, or current if not applicable"
),
input!(
Number, "num_hours", "Approximate number of hours per week:", true, "25"
),
] ]
/> />
</ValidatedForm> </ValidatedForm>