feat: begin implementation of "sub tabs"
This commit is contained in:
1 parent
7ca78b607b
commit
3f1745a589
8 files changed
+135
-42
No files matched your search
@@ -15,9 +15,9 @@ pub fn AdminShell() -> impl IntoView {
|
||||
<Banner title="R15 Scholarships Admin" logo="/PHS_Stacked_Acronym.png" />
|
||||
// We'll put the tabs here.
|
||||
<TabSidebarList tabs=vec![
|
||||
TabInfo::new("Home", "/admin/home"),
|
||||
TabInfo::new("Providers", "/admin/providers"),
|
||||
TabInfo::new("Scholarships", "/admin/scholarships"),
|
||||
TabInfo::new("Home", "/admin/home", None),
|
||||
TabInfo::new("Providers", "/admin/providers", None),
|
||||
TabInfo::new("Scholarships", "/admin/scholarships", None),
|
||||
] />
|
||||
</AdminLoginContext>
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
use leptos::prelude::*;
|
||||
|
||||
#[component]
|
||||
pub fn AdditionalPage() -> impl IntoView {
|
||||
view! {
|
||||
<div class="flex flex-1 flex-col gap-4 items-center m-4">
|
||||
<div class="font-bold text-3xl">"Student Additional Forms"</div>
|
||||
<div class="text-lg">
|
||||
"This is just a placeholder for now. We'll show redirect buttons to each form."
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,9 @@ pub fn StudentHomePage() -> impl IntoView {
|
||||
view! {
|
||||
<div class="flex flex-1 flex-col gap-4 items-center m-4">
|
||||
<div class="font-bold text-3xl">"Student Home Page"</div>
|
||||
<div class="text-lg">"This is just a placeholder for now. We'll show some redirect buttons."</div>
|
||||
<div class="text-lg">
|
||||
"This is just a placeholder for now. We'll show some redirect buttons."
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,9 @@
|
||||
mod shell;
|
||||
mod home_page;
|
||||
mod demographics_page;
|
||||
mod additional_page;
|
||||
|
||||
pub use shell::*;
|
||||
pub use home_page::*;
|
||||
pub use demographics_page::*;
|
||||
pub use demographics_page::*;
|
||||
pub use additional_page::*;
|
||||
@@ -1,6 +1,6 @@
|
||||
use leptos::prelude::*;
|
||||
use leptos_oidc::{AuthLoaded, Authenticated};
|
||||
use crate::common::TabInfo;
|
||||
use crate::common::{SubTabInfo, TabInfo};
|
||||
use crate::components::{Banner, Loading, TabSidebarList};
|
||||
use crate::components::login::StudentLoginContext;
|
||||
use crate::pages::UnauthenticatedPage;
|
||||
@@ -14,9 +14,17 @@ pub fn StudentShell() -> impl IntoView {
|
||||
<AuthLoaded fallback=Loading>
|
||||
<Authenticated unauthenticated=UnauthenticatedPage>
|
||||
<TabSidebarList tabs=vec![
|
||||
TabInfo::new("Home", "/students/home"),
|
||||
TabInfo::new("Demographics", "/students/demographics"),
|
||||
TabInfo::new("Additional Info", "/students/additional"),
|
||||
TabInfo::new("Home", "/students/home", None),
|
||||
TabInfo::new("Demographics", "/students/demographics",
|
||||
Some(vec![
|
||||
SubTabInfo::new("Testing", "/students/testing"),
|
||||
SubTabInfo::new("Testing Again!", "/students/testing/again")
|
||||
])),
|
||||
TabInfo::new("Additional Info", "/students/additional",
|
||||
Some(vec![
|
||||
SubTabInfo::new("Testing", "/students/testing"),
|
||||
SubTabInfo::new("Testing Again!", "/students/testing/again")
|
||||
])),
|
||||
] />
|
||||
</Authenticated>
|
||||
</AuthLoaded>
|
||||
|
||||
Reference in new issue
Block a user