feat: implement student athletics page
This commit is contained in:
1 parent
b4f7ff6382
commit
c97074f163
2 files changed
+42
-10
No files matched your search
@@ -137,10 +137,6 @@ pub fn MultiEntry(
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ActionButton on:click = add_entry>"Add entry"</ActionButton>
|
<ActionButton on:click = add_entry>"Add entry"</ActionButton>
|
||||||
<ActionButton on:click=move |_| {
|
|
||||||
console_log(format!("Entry list: {:?}", data_reactive.get()).as_str());
|
|
||||||
}
|
|
||||||
>"Print Info"</ActionButton>
|
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +1,49 @@
|
|||||||
use leptos::prelude::*;
|
use std::collections::HashMap;
|
||||||
|
use leptos::prelude::*;
|
||||||
|
use crate::components::{MultiEntry, ValidatedForm};
|
||||||
|
use crate::input;
|
||||||
|
|
||||||
#[component]
|
#[component]
|
||||||
pub fn StudentAthleticsPage() -> impl IntoView {
|
pub fn StudentAthleticsPage() -> impl IntoView {
|
||||||
|
let data_map = RwSignal::new(HashMap::new());
|
||||||
|
|
||||||
view! {
|
view! {
|
||||||
<div class="flex flex-1 flex-col gap-4 items-center m-4">
|
<div class="flex flex-1" />
|
||||||
<div class="font-bold text-3xl">"Student Athletics Form"</div>
|
<div class="flex flex-col flex-2 mt-6">
|
||||||
<div class="text-lg">
|
<ValidatedForm title="Athletics Information" on_submit=move || {}>
|
||||||
"This is just a placeholder for now. This will display the athletics form."
|
<MultiEntry
|
||||||
</div>
|
data_map=data_map
|
||||||
|
data_member="athletic_participation"
|
||||||
|
schema=vec![
|
||||||
|
input!(Select, "sport_name", "Sport Name:", true, [
|
||||||
|
"Football",
|
||||||
|
"Soccer",
|
||||||
|
"Cheerleading",
|
||||||
|
"Field Hockey",
|
||||||
|
"Swimming",
|
||||||
|
"Golf",
|
||||||
|
"Basketball",
|
||||||
|
"Track",
|
||||||
|
"Gymnastics",
|
||||||
|
"Ice Hockey",
|
||||||
|
"Ski",
|
||||||
|
"Wrestling",
|
||||||
|
"Lacrosse",
|
||||||
|
"Softball",
|
||||||
|
"Tennis",
|
||||||
|
"Baseball"
|
||||||
|
]),
|
||||||
|
input!(Checkbox, "grades", "Grades Participated:", true, [
|
||||||
|
"9th",
|
||||||
|
"10th",
|
||||||
|
"11th",
|
||||||
|
"12th"
|
||||||
|
]),
|
||||||
|
input!(Text, "achievements", "Special Achievements:", false, "Example 1, Example 2, etc...")
|
||||||
|
]
|
||||||
|
/>
|
||||||
|
</ValidatedForm>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="flex flex-1" />
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user