diff --git a/src/app.rs b/src/app.rs index 200270d..0ecab58 100644 --- a/src/app.rs +++ b/src/app.rs @@ -125,11 +125,17 @@ fn StudentRoutes() -> impl MatchNestedRoutes + Clone { - + - - + + } .into_inner() diff --git a/src/components/multi_entry.rs b/src/components/multi_entry.rs index 8f7449b..41ad518 100644 --- a/src/components/multi_entry.rs +++ b/src/components/multi_entry.rs @@ -113,43 +113,40 @@ pub fn MultiEntry( // Render the entries "You haven't added any entries yet." + fallback=|| { + view! {
"You haven't added any entries yet."
} } > - } + view! { } } />
- "Add entry" + "Add entry" } } @@ -194,11 +191,11 @@ fn Entry( ) -> impl IntoView { view! {
- {schema.get().iter() - .map(|input_type| { - input_type.clone().into_view(data_map.clone()) - }).collect_view() - } + {schema + .get() + .iter() + .map(|input_type| { input_type.clone().into_view(data_map.clone()) }) + .collect_view()}
} } diff --git a/src/components/tabs/sidebar.rs b/src/components/tabs/sidebar.rs index 72ca9ef..4ecaf33 100644 --- a/src/components/tabs/sidebar.rs +++ b/src/components/tabs/sidebar.rs @@ -1,5 +1,4 @@ -use leptos::logging::log; -use leptos::prelude::*; +use leptos::prelude::*; use leptos_router::components::{Outlet, A}; use leptos_router::hooks::use_location; use crate::common::{SubTabInfo, TabInfo}; @@ -94,17 +93,13 @@ fn SidebarTab( }); view! { -
-
- {text} -
+
{text}
+ {text} } diff --git a/src/pages/admin/shell.rs b/src/pages/admin/shell.rs index d52b219..77c5192 100644 --- a/src/pages/admin/shell.rs +++ b/src/pages/admin/shell.rs @@ -14,7 +14,7 @@ pub fn AdminShell() -> impl IntoView { // We'll put the tabs here. - impl IntoView { view! {
-
"This utility page provides buttons to initialize the corresponding lists of information."
+
+ "This utility page provides buttons to initialize the corresponding lists of information." +
"Create Comparisons" "Create Dates"
diff --git a/src/pages/student/athletics_page.rs b/src/pages/student/athletics_page.rs index 78e7ce3..7030ab7 100644 --- a/src/pages/student/athletics_page.rs +++ b/src/pages/student/athletics_page.rs @@ -17,7 +17,8 @@ pub fn StudentAthleticsPage() -> impl IntoView { data_map=data_map data_member="athletic_participation" schema=vec![ - input!(Select, "sport_name", "Sport Name:", true, [ + input!( + Select, "sport_name", "Sport Name:", true, [ "Football", "Soccer", "Cheerleading", @@ -34,14 +35,19 @@ pub fn StudentAthleticsPage() -> impl IntoView { "Softball", "Tennis", "Baseball" - ]), - input!(Checkbox, "grades", "Grades Participated:", true, [ + ] + ), + input!( + Checkbox, "grades", "Grades Participated:", true, [ "9th", "10th", "11th", "12th" - ]), - input!(Text, "achievements", "Special Achievements:", false, "Example 1, Example 2, etc...") + ] + ), + input!( + Text, "achievements", "Special Achievements:", false, "Example 1, Example 2, etc..." + ), ] /> diff --git a/src/pages/student/extracurriculars_page.rs b/src/pages/student/extracurriculars_page.rs index 1ec3a39..37f93e1 100644 --- a/src/pages/student/extracurriculars_page.rs +++ b/src/pages/student/extracurriculars_page.rs @@ -30,7 +30,9 @@ pub fn StudentExtracurricularsPage() -> impl IntoView { 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"]) + input!( + Checkbox, "grades", "Grades Participated:", true, ["9th", "10th", "11th", "12th"] + ), ] /> diff --git a/src/pages/student/shell.rs b/src/pages/student/shell.rs index 1422671..a85cbb9 100644 --- a/src/pages/student/shell.rs +++ b/src/pages/student/shell.rs @@ -18,15 +18,20 @@ pub fn StudentShell() -> impl IntoView { tabs=vec![ TabInfo::new("Home", "home", None), TabInfo::new("Demographics", "demographics", None), - TabInfo::new("Additional Info", "additional", - Some(vec![ - SubTabInfo::new("Academics", "academics"), - SubTabInfo::new("Athletics", "athletics"), - SubTabInfo::new("Work Experience", "work-experience"), - SubTabInfo::new("Extracurriculars", "extracurriculars"), - SubTabInfo::new("University Info", "university"), - SubTabInfo::new("Parent Info", "parent-info") - ])), + TabInfo::new( + "Additional Info", + "additional", + Some( + vec![ + SubTabInfo::new("Academics", "academics"), + SubTabInfo::new("Athletics", "athletics"), + SubTabInfo::new("Work Experience", "work-experience"), + SubTabInfo::new("Extracurriculars", "extracurriculars"), + SubTabInfo::new("University Info", "university"), + SubTabInfo::new("Parent Info", "parent-info"), + ], + ), + ), ] />