chore: push current changes to different PC

This commit is contained in:
alphafetus committed 2026-02-16 12:21:35 -05:00
1 parent dddc9e4192
commit f10f01534c
6 files changed
+140 -38

No files matched your search

+21 -12
View File
@@ -1,12 +1,20 @@
use crate::pages::{ProviderPortal, ScholarshipInfoPage, ProviderContactPage, LoanerShell, LoanerFallback, LoanerBorrowForm, LoanerReturnForm, AuthCallbackPage, ApplicantsPageFallback, AdminShell, AdminHomePage, AdminProviderPage, AdminScholarshipPage, AdminUtilsPage};
use crate::components::ToastList;
use crate::components::login::ProviderLoginContext;
use crate::pages::student;
use crate::pages::{
AdminHomePage, AdminProviderPage, AdminScholarshipPage, AdminShell, AdminUtilsPage,
ApplicantsPageFallback, AuthCallbackPage, LoanerBorrowForm, LoanerFallback, LoanerReturnForm,
LoanerShell, ProviderContactPage, ProviderPortal, ScholarshipInfoPage,
};
use leptos::prelude::*;
use leptos_meta::{MetaTags, Stylesheet, Title, provide_meta_context};
use leptos_oidc::AuthSignal;
use leptos_router::{components::{Route, Router, Routes, ParentRoute}, path, MatchNestedRoutes};
use leptos_router::any_nested_route::IntoAnyNestedRoute;
use crate::components::login::ProviderLoginContext;
use crate::components::ToastList;
use leptos_router::{
MatchNestedRoutes,
components::{ParentRoute, Route, Router, Routes},
path,
};
pub fn shell(options: LeptosOptions) -> impl IntoView {
view! {
@@ -86,8 +94,8 @@ fn ProviderRoutes() -> impl MatchNestedRoutes + Clone {
</ParentRoute>
</ParentRoute>
}
.into_inner()
.into_any_nested_route()
.into_inner()
.into_any_nested_route()
}
#[component(transparent)]
@@ -99,8 +107,8 @@ fn LoanerRoutes() -> impl MatchNestedRoutes + Clone {
<Route path=path!("returning") view=LoanerReturnForm />
</ParentRoute>
}
.into_inner()
.into_any_nested_route()
.into_inner()
.into_any_nested_route()
}
#[component(transparent)]
@@ -113,8 +121,8 @@ fn AdminRoutes() -> impl MatchNestedRoutes + Clone {
<Route path=path!("utilities") view=AdminUtilsPage />
</ParentRoute>
}
.into_inner()
.into_any_nested_route()
.into_inner()
.into_any_nested_route()
}
#[component(transparent)]
@@ -126,6 +134,7 @@ fn StudentRoutes() -> impl MatchNestedRoutes + Clone {
<Route path=path!("demographics") view=student::StudentDemographicsPage />
<Route path=path!("eligibility") view=student::StudentEligibilityPage />
<Route path=path!("additional") view=student::AdditionalPage />
<Route path=path!("testing") view=student::StudentTestDisplay />
<Route path=path!("additional/academics") view=student::StudentAcademicsPage />
<Route path=path!("additional/athletics") view=student::StudentAthleticsPage />
<Route
@@ -140,8 +149,8 @@ fn StudentRoutes() -> impl MatchNestedRoutes + Clone {
<Route path=path!("additional/family-info") view=student::StudentFamilyPage />
</ParentRoute>
}
.into_inner()
.into_any_nested_route()
.into_inner()
.into_any_nested_route()
}
#[component]
+38
View File
@@ -0,0 +1,38 @@
use crate::common::ValueType;
use leptos::prelude::*;
use std::collections::HashMap;
#[component]
pub fn ValueDisplay(
#[prop(into)] data_member: Signal<String>,
#[prop(into)] data_map: Signal<HashMap<String, ValueType>>,
#[prop(into)] header: Signal<String>,
) -> impl IntoView {
let display_value = Memo::new(move |_| {
data_map
.get()
.get(&data_member.get())
.unwrap_or(&ValueType::String(None))
.clone()
});
// I've chosen to display all information - we're not going to worry about the depth of the
// information, but we are going to provide a way to collapse information like maps and lists.
// This means we need some capsule-like appearance for the information in order to facilitate
// having a header and a series of information that's buried underneath. Also, we need to consider
// how we determine what the header is because that's not really procedurally possible.
// One possible way to handle this is a "schema." We would plan out the information beforehand
// and pass through this schema struct, allowing us to limit what's displayed, relative to the
// starting data_map. I'll write this out in a scratch file for now.
view! {
<div class="flex flex-1 flex-col">
<div class="font-bold">{header}</div>
<div>{move || display_value.get().to_string()}</div>
</div>
}
}
#[component]
pub fn MapDisplay() {}
+9 -8
View File
@@ -1,22 +1,23 @@
mod action_button;
mod banner;
mod dashboard_button;
mod data_display;
mod date;
mod header;
mod lists;
mod loading;
pub mod login;
mod multi_entry;
mod panel;
mod row;
mod tabs;
mod text_field;
mod toasts;
mod utils;
mod validated_form;
mod lists;
mod toasts;
mod header;
pub mod login;
mod tabs;
pub use self::{
action_button::*, banner::*, dashboard_button::*, lists::*,
loading::*, multi_entry::*, panel::*, row::*, text_field::*,
validated_form::*, toasts::*, header::*, date::*, tabs::*
action_button::*, banner::*, dashboard_button::*, data_display::*, date::*, header::*,
lists::*, loading::*, multi_entry::*, panel::*, row::*, tabs::*, text_field::*, toasts::*,
validated_form::*,
};
+16 -14
View File
@@ -1,24 +1,26 @@
mod shell;
mod home_page;
mod demographics_page;
mod academics_page;
mod additional_page;
mod athletics_page;
mod academics_page;
mod demographics_page;
mod eligibility_page;
mod extracurriculars_page;
mod work_experience_page;
mod university_page;
mod family_info_page;
mod form_setup;
mod eligibility_page;
mod home_page;
mod shell;
mod test_display;
mod university_page;
mod work_experience_page;
pub use shell::*;
pub use home_page::*;
pub use demographics_page::*;
pub use academics_page::*;
pub use additional_page::*;
pub use athletics_page::*;
pub use academics_page::*;
pub use demographics_page::*;
pub use eligibility_page::*;
pub use extracurriculars_page::*;
pub use work_experience_page::*;
pub use university_page::*;
pub use family_info_page::*;
pub use eligibility_page::*;
pub use home_page::*;
pub use shell::*;
pub use test_display::*;
pub use university_page::*;
pub use work_experience_page::*;
+5 -4
View File
@@ -1,9 +1,9 @@
use crate::common::{SubTabInfo, TabInfo};
use crate::components::login::StudentLoginContext;
use crate::components::{Banner, Loading, TabSidebarList};
use crate::pages::UnauthenticatedPage;
use leptos::prelude::*;
use leptos_oidc::{AuthLoaded, Authenticated};
use crate::common::{SubTabInfo, TabInfo};
use crate::components::{Banner, Loading, TabSidebarList};
use crate::components::login::StudentLoginContext;
use crate::pages::UnauthenticatedPage;
#[component]
pub fn StudentShell() -> impl IntoView {
@@ -39,6 +39,7 @@ pub fn StudentShell() -> impl IntoView {
),
),
TabInfo::new("Eligible Scholarships", "eligibility", None),
TabInfo::new("Testing Display", "testing", None)
]
/>
</Authenticated>
+51
View File
@@ -0,0 +1,51 @@
use crate::components::{Loading, ValueDisplay};
use crate::pages::api::students::get_all_student_data;
use crate::utils::get_user_claims;
use leptos::prelude::*;
#[component]
pub fn StudentTestDisplay() -> impl IntoView {
let user_claims = get_user_claims();
let user_id = Memo::new(move |_| user_claims.get().map(|info| info.claims.subject.clone()));
let resource = Resource::new(
move || user_id.get().unwrap_or_default(),
async move |id| get_all_student_data(id).await,
);
view! {
<Suspense fallback=Loading>
{move || {
resource
.get()
.map(|data_map| {
let Ok(map) = data_map else {
return view! {}.into_any();
};
let data_map = StoredValue::new(map);
view! {
<div>
<For
each=move || data_map.get_value()
key=|(k, v)| k.clone()
children=move |(k, v)| {
let member = StoredValue::new(k.clone());
view! {
<ValueDisplay
data_map=data_map.get_value()
data_member=member.get_value()
header=member.get_value()
/>
}
}
/>
</div>
}
.into_any()
})
}}
</Suspense>
}
}