Implement template student portal #62

Merged
BobdaFett merged 21 commits from feat/value-display into main 2026-03-02 21:38:31 +00:00
3 changed files with 16 additions and 11 deletions
Showing only changes of commit b422e43288 - Show all commits

No files matched your search

+1
View File
@@ -116,6 +116,7 @@ fn LoanerRoutes() -> impl MatchNestedRoutes + Clone {
fn AdminRoutes() -> impl MatchNestedRoutes + Clone { fn AdminRoutes() -> impl MatchNestedRoutes + Clone {
view! { view! {
<ParentRoute path=path!("admin") view=AdminShell> <ParentRoute path=path!("admin") view=AdminShell>
<Route path=path!("callback") view=AuthCallbackPage />
<Route path=path!("home") view=AdminHomePage /> <Route path=path!("home") view=AdminHomePage />
<Route path=path!("providers") view=AdminProviderPage /> <Route path=path!("providers") view=AdminProviderPage />
<Route path=path!("scholarships") view=AdminScholarshipPage /> <Route path=path!("scholarships") view=AdminScholarshipPage />
+6 -8
View File
@@ -1,15 +1,13 @@
use leptos::prelude::*; use crate::components::login::setup::provide_auth_context;
use crate::components::login::setup::provide_auth_context; use leptos::prelude::*;
#[component] #[component]
pub fn AdminLoginContext( pub fn AdminLoginContext(children: Children) -> impl IntoView {
children: Children
) -> impl IntoView {
provide_auth_context( provide_auth_context(
crate::utils::use_origin(), crate::utils::use_origin(),
"https://cognito-idp.us-east-1.amazonaws.com/us-east-1_Lfjuy5zaM", "https://cognito-idp.us-east-1.amazonaws.com/us-east-1_rvCU4Xy4j",
"56c2bqvl021rv8d5mq36blt7jv", "1vh1q994rid6cgi6tjf58r9jp4",
"/providers/callback" "/admin/callback",
); );
view! { {children()} } view! { {children()} }
+9 -3
View File
@@ -1,7 +1,9 @@
use leptos::prelude::*; use crate::common::TabInfo;
use crate::common::TabInfo;
use crate::components::{Banner, TabSidebarList};
use crate::components::login::AdminLoginContext; use crate::components::login::AdminLoginContext;
use crate::components::{Banner, Loading, TabSidebarList};
use crate::pages::UnauthenticatedPage;
use leptos::prelude::*;
use leptos_oidc::{AuthLoaded, Authenticated};
/// # Admin Shell Component /// # Admin Shell Component
/// ///
@@ -13,6 +15,8 @@ pub fn AdminShell() -> impl IntoView {
view! { view! {
<AdminLoginContext> <AdminLoginContext>
<Banner title="R15 Scholarships Admin" logo="/PHS_Stacked_Acronym.png" /> <Banner title="R15 Scholarships Admin" logo="/PHS_Stacked_Acronym.png" />
<AuthLoaded fallback=Loading>
<Authenticated unauthenticated=UnauthenticatedPage>
// We'll put the tabs here. // We'll put the tabs here.
<TabSidebarList <TabSidebarList
base_path="admin" base_path="admin"
@@ -23,6 +27,8 @@ pub fn AdminShell() -> impl IntoView {
TabInfo::new("Utilities", "utilities", None), TabInfo::new("Utilities", "utilities", None),
] ]
/> />
</Authenticated>
</AuthLoaded>
</AdminLoginContext> </AdminLoginContext>
} }
} }