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::login::ProviderLoginContext;
use crate::pages::{student, FormClosedPage};
use crate::pages::{
AdminHomePage, AdminProviderPage, AdminScholarshipPage, AdminShell, AdminUtilsPage,
ApplicantsPageFallback, AuthCallbackPage, LoanerBorrowForm, LoanerFallback, LoanerReturnForm,
LoanerShell, ProviderContactPage, ProviderPortal,
};
use crate::pages::{FormClosedPage, student};
use leptos::prelude::*;
use leptos_meta::{MetaTags, Stylesheet, Title, provide_meta_context};
use leptos_oidc::AuthSignal;
@@ -90,10 +90,10 @@ fn ProviderRoutes() -> impl MatchNestedRoutes + Clone {
<Route path=path!("/callback") view=AuthCallbackPage />
<Route path=path!("/profile") view=ProviderContactPage />
<Route path=path!("/scholarships") view=FormClosedPage />
// <ParentRoute path=path!("/scholarships") view=FormClosedPage>
// <Route path=path!(":id") view=FormClosedPage />
// <Route path=path!("") view=FormClosedPage />
// </ParentRoute>
// <ParentRoute path=path!("/scholarships") view=FormClosedPage>
// <Route path=path!(":id") view=FormClosedPage />
// <Route path=path!("") view=FormClosedPage />
// </ParentRoute>
</ParentRoute>
}
.into_inner()
@@ -150,7 +150,10 @@ fn StudentRoutes() -> impl MatchNestedRoutes + Clone {
<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!("additional/specifics")
view=student::StudentSpecificRequirementsPage
/>
</ParentRoute>
}
.into_inner()
+4 -3
View File
@@ -43,8 +43,8 @@ pub fn DashboardButton(
<button
type="button"
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
shadow-[inset_0_0_6px_rgba(0,0,0,0.12)]"
hover:bg-gray-100 transition cursor-pointer w-full text-left
shadow-[inset_0_0_6px_rgba(0,0,0,0.12)]"
on:click=on_click
>
<div class="flex flex-col">
@@ -57,5 +57,6 @@ pub fn DashboardButton(
</div>
</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]
pub fn FormClosedPage() -> impl IntoView {
@@ -7,14 +7,13 @@ pub fn FormClosedPage() -> impl IntoView {
// about which form is closed right now.
view! {
<Banner
title="R15 Scholarships"
logo="/PHS_Stacked_Acronym.png"
path="/providers"
/>
<Banner 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="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>
}
}
+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::pages::student::form_setup::use_student_form;
use leptos::prelude::*;
#[component]
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::pages::student::form_setup::use_student_form;
use leptos::prelude::*;
#[component]
pub fn StudentDemographicsPage() -> impl IntoView {
@@ -49,7 +49,11 @@ pub fn StudentDemographicsPage() -> impl IntoView {
data_map=controller.data_map
data_member="dob"
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
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">
<Header
title="Financial Information"
description=
"Please upload your FAFSA SAR (Student Aid Report) here. This information is NOT required,
but some scholarships may recognize this as a requirement."
description="Please upload your FAFSA SAR (Student Aid Report) here. This information is NOT required,
but some scholarships may recognize this as a requirement."
/>
<Suspense fallback=Loading>
<FileDrop
+4 -2
View File
@@ -1,5 +1,5 @@
use leptos::prelude::*;
use crate::components::DashboardButton;
use leptos::prelude::*;
#[component]
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="text-lg">
"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 class="text-lg">"Here are some links to get you started:"</div>
<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 leptos::prelude::*;
#[component]
pub fn StudentSpecificRequirementsPage() -> impl IntoView {
@@ -8,71 +8,76 @@ pub fn StudentSpecificRequirementsPage() -> impl IntoView {
view! {
<Suspense fallback=Loading>
{move || controller.data_resource.get()
.map(move |_| {
view! {
<div class="flex-1" />
<div class="flex flex-col flex-2 mt-6">
<ValidatedForm
title="Scholarship-Specific Eligibility Requirements"
description="These questions are specific to some scholarships. Indicate yes or no for each question."
on_submit=controller.submit_action
>
<RadioList
label="Have you attended BAS?"
data_map=controller.data_map
data_member="attend_bas"
items=vec!["Yes".to_string(), "No".to_string()]
required=true
/>
<RadioList
label="Are you a member of Midd-South Catholic Church?"
data_map=controller.data_map
data_member="middsouth_church"
items=vec!["Yes".to_string(), "No".to_string()]
required=true
/>
<RadioList
label="Do you have a family member that is or has served in the US military?"
data_map=controller.data_map
data_member="family_military_service"
items=vec!["Yes".to_string(), "No".to_string()]
required=true
/>
<RadioList
label="Have you participated in Pomperaug Youth Baseball?"
data_map=controller.data_map
data_member="youth_baseball"
items=vec!["Yes".to_string(), "No".to_string()]
required=true
/>
<RadioList
label="Have you participated in the Panthers Aquatic Club?"
data_map=controller.data_map
data_member="aquatic_club"
items=vec!["Yes".to_string(), "No".to_string()]
required=true
/>
<RadioList
label="Are at least one of your parents a member of the Region 15 PEA?"
data_map=controller.data_map
data_member="pea_member"
items=vec!["Yes".to_string(), "No".to_string()]
required=true
/>
<RadioList
label="Have you participated in the PHS Music Program (Band, Chorus, etc)?"
data_map=controller.data_map
data_member="music_program"
items=vec!["Yes".to_string(), "No".to_string()]
required=true
/>
</ValidatedForm>
</div>
<div class="flex-1" />
}.into_any()
}).collect_view()
}
{move || {
controller
.data_resource
.get()
.map(move |_| {
view! {
<div class="flex-1" />
<div class="flex flex-col flex-2 mt-6">
<ValidatedForm
title="Scholarship-Specific Eligibility Requirements"
description="These questions are specific to some scholarships. Indicate yes or no for each question."
on_submit=controller.submit_action
>
<RadioList
label="Have you attended BAS?"
data_map=controller.data_map
data_member="attend_bas"
items=vec!["Yes".to_string(), "No".to_string()]
required=true
/>
<RadioList
label="Are you a member of Midd-South Catholic Church?"
data_map=controller.data_map
data_member="middsouth_church"
items=vec!["Yes".to_string(), "No".to_string()]
required=true
/>
<RadioList
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)"
data_map=controller.data_map
data_member="family_military_service"
items=vec!["Yes".to_string(), "No".to_string()]
required=true
/>
<RadioList
label="Have you participated in Pomperaug Youth Baseball?"
data_map=controller.data_map
data_member="youth_baseball"
items=vec!["Yes".to_string(), "No".to_string()]
required=true
/>
<RadioList
label="Have you participated in the Panthers Aquatic Club?"
data_map=controller.data_map
data_member="aquatic_club"
items=vec!["Yes".to_string(), "No".to_string()]
required=true
/>
<RadioList
label="Are at least one of your parents a member of the Region 15 PEA?"
data_map=controller.data_map
data_member="pea_member"
items=vec!["Yes".to_string(), "No".to_string()]
required=true
/>
<RadioList
label="Have you participated in the PHS Music Program (Band, Chorus, etc)?"
data_map=controller.data_map
data_member="music_program"
items=vec!["Yes".to_string(), "No".to_string()]
required=true
/>
</ValidatedForm>
</div>
<div class="flex-1" />
}
.into_any()
})
.collect_view()
}}
</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::pages::student::form_setup::use_student_form;
use leptos::prelude::*;
#[component]
pub fn StudentWorkExperiencePage() -> impl IntoView {
@@ -26,9 +26,15 @@ pub fn StudentWorkExperiencePage() -> impl IntoView {
Text, "job_title", "Job Title:", true, "Waiter, Cashier, etc..."
),
input!(Text, "employer", "Employer:", true, "Your employer's name..."),
input!(Text, "start_date", "Approximate start date:", true, "01/01/2000"),
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")
input!(
Text, "start_date", "Approximate start date:", true, "01/01/2000"
),
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>