feat: implement student extracurricular information page
This commit is contained in:
1 parent
8df0d10166
commit
f9d9e400d3
4 files changed
+51
-9
No files matched your search
+9
-7
@@ -1,4 +1,5 @@
|
||||
use crate::pages::{ProviderPortal, ScholarshipInfoPage, ProviderContactPage, LoanerShell, LoanerFallback, LoanerBorrowForm, LoanerReturnForm, AuthCallbackPage, ApplicantsPageFallback, AdminShell, AdminHomePage, AdminProviderPage, AdminScholarshipPage, StudentShell, StudentHomePage, StudentDemographicsPage, AdditionalPage, AdminUtilsPage, StudentAthleticsPage, StudentAcademicsPage};
|
||||
use crate::pages::{ProviderPortal, ScholarshipInfoPage, ProviderContactPage, LoanerShell, LoanerFallback, LoanerBorrowForm, LoanerReturnForm, AuthCallbackPage, ApplicantsPageFallback, AdminShell, AdminHomePage, AdminProviderPage, AdminScholarshipPage, AdminUtilsPage};
|
||||
use crate::pages::student;
|
||||
use leptos::prelude::*;
|
||||
use leptos_meta::{MetaTags, Stylesheet, Title, provide_meta_context};
|
||||
use leptos_oidc::AuthSignal;
|
||||
@@ -120,13 +121,14 @@ fn AdminRoutes() -> impl MatchNestedRoutes + Clone {
|
||||
#[component(transparent)]
|
||||
fn StudentRoutes() -> impl MatchNestedRoutes + Clone {
|
||||
view! {
|
||||
<ParentRoute path=path!("students") view=StudentShell>
|
||||
<ParentRoute path=path!("students") view=student::StudentShell>
|
||||
<Route path=path!("callback") view=AuthCallbackPage />
|
||||
<Route path=path!("home") view=StudentHomePage />
|
||||
<Route path=path!("demographics") view=StudentDemographicsPage />
|
||||
<Route path=path!("additional") view=AdditionalPage/>
|
||||
<Route path=path!("additional/academics") view=StudentAcademicsPage />
|
||||
<Route path=path!("additional/athletics") view=StudentAthleticsPage />
|
||||
<Route path=path!("home") view=student::StudentHomePage />
|
||||
<Route path=path!("demographics") view=student::StudentDemographicsPage />
|
||||
<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 />
|
||||
</ParentRoute>
|
||||
}
|
||||
.into_inner()
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ mod provider_contact;
|
||||
mod auth_callback;
|
||||
mod provider_applicants;
|
||||
mod admin;
|
||||
mod student;
|
||||
pub(crate) mod student;
|
||||
|
||||
pub use self::{
|
||||
about_page::*, comparison_test::*, home_page::*, loaner_page::*, provider_portal::*,
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
use std::collections::HashMap;
|
||||
use leptos::prelude::*;
|
||||
use crate::components::{MultiEntry, OutlinedTextField, TextFieldType, ValidatedForm};
|
||||
use crate::input;
|
||||
|
||||
#[component]
|
||||
pub fn StudentExtracurricularsPage() -> impl IntoView {
|
||||
let data_map = RwSignal::new(HashMap::new());
|
||||
|
||||
view! {
|
||||
<div class="flex flex-1" />
|
||||
<div class="flex flex-col flex-2 mt-6">
|
||||
<ValidatedForm title="Extracurricular Information" on_submit=move || {}>
|
||||
// Inputs here.
|
||||
<OutlinedTextField
|
||||
label="Total number of service hours:"
|
||||
data_map=data_map
|
||||
data_member="service_hours"
|
||||
placeholder="Any number..."
|
||||
input_type=TextFieldType::Number
|
||||
required=true
|
||||
/>
|
||||
<MultiEntry
|
||||
data_map=data_map
|
||||
data_member="extracurricular"
|
||||
schema=vec![
|
||||
input!(Text, "activity_name", "Activity Name:", true, "Some activity..."),
|
||||
input!(Number, "num_hours", "Number of hours completed:", true, "40"),
|
||||
input!(Number, "num_weeks", "Number of weeks participated:", true, "3"),
|
||||
input!(Text, "special_involvement", "Any special involvement:", false, ""),
|
||||
input!(Checkbox, "grades", "Grades Participated:", true, ["9th", "10th", "11th", "12th"])
|
||||
]
|
||||
/>
|
||||
</ValidatedForm>
|
||||
</div>
|
||||
<div class="flex flex-1" />
|
||||
}
|
||||
}
|
||||
@@ -4,10 +4,12 @@ mod demographics_page;
|
||||
mod additional_page;
|
||||
mod athletics_page;
|
||||
mod academics_page;
|
||||
mod extracurriculars_page;
|
||||
|
||||
pub use shell::*;
|
||||
pub use home_page::*;
|
||||
pub use demographics_page::*;
|
||||
pub use additional_page::*;
|
||||
pub use athletics_page::*;
|
||||
pub use academics_page::*;
|
||||
pub use academics_page::*;
|
||||
pub use extracurriculars_page::*;
|
||||
Reference in new issue
Block a user