feat: implement most of the family page
This commit is contained in:
1 parent
06364236c5
commit
54a0753599
3 files changed
+110
-1
No files matched your search
@@ -140,6 +140,10 @@ fn StudentRoutes() -> impl MatchNestedRoutes + Clone {
|
||||
path=path!("additional/university")
|
||||
view=student::StudentUniversityPage
|
||||
/>
|
||||
<Route
|
||||
path=path!("additional/family-info")
|
||||
view=student::StudentFamilyPage
|
||||
/>
|
||||
</ParentRoute>
|
||||
}
|
||||
.into_inner()
|
||||
|
||||
@@ -0,0 +1,103 @@
|
||||
use std::collections::HashMap;
|
||||
use leptos::prelude::*;
|
||||
use crate::components::{OutlinedTextField, TextFieldType, ValidatedForm};
|
||||
|
||||
#[component]
|
||||
pub fn StudentFamilyPage() -> 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="Family Information" on_submit=move || {}>
|
||||
// Inputs here.
|
||||
<OutlinedTextField
|
||||
label="Total number of children in family:"
|
||||
data_map=data_map
|
||||
data_member="num_children"
|
||||
placeholder="Any number..."
|
||||
input_type=TextFieldType::Number
|
||||
required=true
|
||||
/>
|
||||
<OutlinedTextField
|
||||
label="Total number of children currently attending college:"
|
||||
data_map=data_map
|
||||
data_member="num_children_college"
|
||||
placeholder="Any number..."
|
||||
input_type=TextFieldType::Number
|
||||
required=true
|
||||
/>
|
||||
<OutlinedTextField
|
||||
label="Parent/Guardian 1 Name:"
|
||||
data_map=data_map
|
||||
data_member="parent_one_name"
|
||||
placeholder="John Smith"
|
||||
input_type=TextFieldType::Text
|
||||
required=true
|
||||
/>
|
||||
// TODO Could this be a select dropdown?
|
||||
<OutlinedTextField
|
||||
label="Parent/Guardian 1 Relationship:"
|
||||
data_map=data_map
|
||||
data_member="parent_one_relationship"
|
||||
placeholder="Mother/Father"
|
||||
input_type=TextFieldType::Text
|
||||
required=true
|
||||
/>
|
||||
// TODO Get a better example
|
||||
<OutlinedTextField
|
||||
label="Parent/Guardian 1 Occupation:"
|
||||
data_map=data_map
|
||||
data_member="parent_one_occupation"
|
||||
placeholder="Milkman"
|
||||
input_type=TextFieldType::Text
|
||||
required=true
|
||||
/>
|
||||
<OutlinedTextField
|
||||
label="Parent/Guardian 1 Employer:"
|
||||
data_map=data_map
|
||||
data_member="parent_one_employer"
|
||||
placeholder="Example Employer"
|
||||
input_type=TextFieldType::Text
|
||||
required=true
|
||||
/>
|
||||
|
||||
<OutlinedTextField
|
||||
label="Parent/Guardian 2 Name:"
|
||||
data_map=data_map
|
||||
data_member="parent_one_name"
|
||||
placeholder="John Smith"
|
||||
input_type=TextFieldType::Text
|
||||
required=false
|
||||
/>
|
||||
// TODO Could this be a select dropdown?
|
||||
<OutlinedTextField
|
||||
label="Parent/Guardian 2 Relationship:"
|
||||
data_map=data_map
|
||||
data_member="parent_one_relationship"
|
||||
placeholder="Mother/Father"
|
||||
input_type=TextFieldType::Text
|
||||
required=false
|
||||
/>
|
||||
// TODO Get a better example
|
||||
<OutlinedTextField
|
||||
label="Parent/Guardian 2 Occupation:"
|
||||
data_map=data_map
|
||||
data_member="parent_one_occupation"
|
||||
placeholder="Milkman"
|
||||
input_type=TextFieldType::Text
|
||||
required=false
|
||||
/>
|
||||
<OutlinedTextField
|
||||
label="Parent/Guardian 2 Employer:"
|
||||
data_map=data_map
|
||||
data_member="parent_one_employer"
|
||||
placeholder="Example Employer"
|
||||
input_type=TextFieldType::Text
|
||||
required=false
|
||||
/>
|
||||
</ValidatedForm>
|
||||
</div>
|
||||
<div class="flex flex-1" />
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,7 @@ mod academics_page;
|
||||
mod extracurriculars_page;
|
||||
mod work_experience_page;
|
||||
mod university_page;
|
||||
mod family_info_page;
|
||||
|
||||
pub use shell::*;
|
||||
pub use home_page::*;
|
||||
@@ -16,4 +17,5 @@ pub use athletics_page::*;
|
||||
pub use academics_page::*;
|
||||
pub use extracurriculars_page::*;
|
||||
pub use work_experience_page::*;
|
||||
pub use university_page::*;
|
||||
pub use university_page::*;
|
||||
pub use family_info_page::*;
|
||||
Reference in new issue
Block a user