style: rustfmt run
This commit is contained in:
1 parent
1427c51bd3
commit
05ef850f82
9 files changed
+123
-104
No files matched your search
+9
-6
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
@@ -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>
|
||||
}
|
||||
}
|
||||
@@ -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 {
|
||||
@@ -11,7 +11,7 @@ pub fn StudentAthleticsPage() -> impl IntoView {
|
||||
<Show when=move || controller.data_resource.get().is_some() fallback=Loading>
|
||||
<div class="flex flex-1" />
|
||||
<div class="flex flex-col flex-2 mt-6">
|
||||
<ValidatedForm
|
||||
<ValidatedForm
|
||||
title="Athletics Information"
|
||||
description="This information will allow you to be eligible for any scholarships that have specific sports requirements."
|
||||
on_submit=controller.submit_action
|
||||
@@ -60,4 +60,4 @@ pub fn StudentAthleticsPage() -> impl IntoView {
|
||||
<div class="flex flex-1" />
|
||||
</Show>
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,16 +1,16 @@
|
||||
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 {
|
||||
// This page should show a form that the students need to fill out.
|
||||
// It's a simple form, really nothing more than a contact form.
|
||||
// I'm going to test out creating this form without using a panel - we'll just use the page as
|
||||
// I'm going to test out creating this form without using a panel - we'll just use the page as
|
||||
// it is with a specially spaced invisible div instead of a shaded container.
|
||||
|
||||
let controller = use_student_form("demographics");
|
||||
|
||||
|
||||
view! {
|
||||
<Show when=move || controller.data_resource.get().is_some() fallback=Loading>
|
||||
<div class="flex flex-1" />
|
||||
@@ -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:"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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>
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
@@ -36,4 +42,4 @@ pub fn StudentWorkExperiencePage() -> impl IntoView {
|
||||
<div class="flex flex-1" />
|
||||
</Show>
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user