chore: pc change 1/8/26
This commit is contained in:
1 parent
af1250350a
commit
247d0dfa73
2 files changed
+40
-23
No files matched your search
@@ -299,6 +299,7 @@ fn make_comp_list() -> Vec<ComparisonData> {
|
||||
let mut major_comps = Vec::<ComparisonData>::new();
|
||||
|
||||
let mut comp_list = vec![
|
||||
gpa_3,
|
||||
test_comp,
|
||||
service_hours_20,
|
||||
service_hours_25,
|
||||
|
||||
@@ -3,13 +3,14 @@ use leptos::either::Either;
|
||||
use leptos::html::Dialog;
|
||||
use leptos::logging::log;
|
||||
use leptos::prelude::*;
|
||||
use leptos::task::spawn_local;
|
||||
use leptos_oidc::{AuthLoaded, Authenticated};
|
||||
use leptos_router::hooks::{use_navigate, use_params};
|
||||
use crate::common::{ExpandableInfo, ScholarshipFormParams, SubmitStatus, ValueType};
|
||||
use crate::components::{ActionButton, Banner, ChipsList, Loading, OutlinedTextField, Panel, RadioList, Row, TextFieldType, ValidatedForm};
|
||||
use super::UnauthenticatedPage;
|
||||
use crate::pages::utils::get_user_claims;
|
||||
use super::api::{get_comparison_info, get_provider_scholarships, get_scholarship_info, CreateScholarshipInfo, RegisterScholarship, DeleteProviderScholarship, get_comparisons_categorized};
|
||||
use super::api::{get_comparison_info, get_provider_scholarships, get_scholarship_info, CreateScholarshipInfo, RegisterScholarship, DeleteProviderScholarship, get_comparisons_categorized, create_test_comparisons, CreateTestComparisons};
|
||||
|
||||
|
||||
/// # Scholarship Info Page
|
||||
@@ -457,29 +458,20 @@ fn ScholarshipForm(
|
||||
};
|
||||
|
||||
// Get comparison lists.
|
||||
let sports_ids = Signal::derive(move || {
|
||||
get_comp_ids("Sports Participation")
|
||||
});
|
||||
let sports_ids = Signal::derive(move || get_comp_ids("Sports Participation"));
|
||||
let sports_text = Signal::derive(move || get_comp_text("Sports Participation"));
|
||||
|
||||
let sports_text = Signal::derive(move || {
|
||||
get_comp_text("Sports Participation")
|
||||
});
|
||||
let misc_ids = Signal::derive(move || get_comp_ids("Miscellaneous"));
|
||||
let misc_text = Signal::derive(move || get_comp_text("Miscellaneous"));
|
||||
|
||||
let misc_ids = Signal::derive(move || {
|
||||
get_comp_ids("Miscellaneous")
|
||||
});
|
||||
let comm_ids = Signal::derive(move || get_comp_ids("Community Service"));
|
||||
let comm_text = Signal::derive(move || get_comp_text("Community Service"));
|
||||
|
||||
let misc_text = Signal::derive(move || {
|
||||
get_comp_text("Miscellaneous")
|
||||
});
|
||||
let res_ids = Signal::derive(move || get_comp_ids("Residency"));
|
||||
let res_text = Signal::derive(move || get_comp_text("Residency"));
|
||||
|
||||
let comm_ids = Signal::derive(move || {
|
||||
get_comp_ids("Community Involvement")
|
||||
});
|
||||
|
||||
let comm_text = Signal::derive(move || {
|
||||
get_comp_text("Community Involvement")
|
||||
});
|
||||
let gpa_ids = Signal::derive(move || get_comp_ids("GPA Limits"));
|
||||
let gpa_text = Signal::derive(move || get_comp_text("GPA Limits"));
|
||||
|
||||
// We'll collect the scholarship's name, num_awards, amount_per_award, total_awards,
|
||||
// fafsa_required, award_to, transcript_required, recipient_selection, essay_requirement (and prompt)
|
||||
@@ -495,6 +487,8 @@ fn ScholarshipForm(
|
||||
});
|
||||
};
|
||||
|
||||
let create_comps = ServerAction::<CreateTestComparisons>::new();
|
||||
|
||||
view! {
|
||||
<Panel>
|
||||
<Show
|
||||
@@ -598,6 +592,15 @@ fn ScholarshipForm(
|
||||
label="If so, select a prompt from the list below."
|
||||
/>
|
||||
</Row>
|
||||
<Row>
|
||||
<ChipsList
|
||||
label="GPA Requirements"
|
||||
data_member="gpa"
|
||||
data_map=chips_data
|
||||
values=gpa_ids
|
||||
displayed_text=gpa_text
|
||||
/>
|
||||
</Row>
|
||||
<Row>
|
||||
<ChipsList
|
||||
label="Sports Participation"
|
||||
@@ -605,18 +608,26 @@ fn ScholarshipForm(
|
||||
data_map=chips_data
|
||||
values=sports_ids
|
||||
displayed_text=sports_text
|
||||
allows_multiple=true
|
||||
/>
|
||||
</Row>
|
||||
<Row>
|
||||
<ChipsList
|
||||
label="Community Involvement"
|
||||
data_member="community_involvement"
|
||||
label="Community Service"
|
||||
data_member="community_service"
|
||||
data_map=chips_data
|
||||
values=comm_ids
|
||||
displayed_text=comm_text
|
||||
/>
|
||||
</Row>
|
||||
<Row>
|
||||
<ChipsList
|
||||
label="Residency"
|
||||
data_member="residency"
|
||||
data_map=chips_data
|
||||
values=res_ids
|
||||
displayed_text=res_text
|
||||
/>
|
||||
</Row>
|
||||
<Row>
|
||||
<ChipsList
|
||||
label="Miscellaneous"
|
||||
@@ -637,6 +648,11 @@ fn ScholarshipForm(
|
||||
}).collect_view()
|
||||
}}
|
||||
</ValidatedForm>
|
||||
<ActionButton
|
||||
on:click=move |_| {
|
||||
create_comps.dispatch(CreateTestComparisons {});
|
||||
}
|
||||
>"Create Comparisons"</ActionButton>
|
||||
</Suspense>
|
||||
</Show>
|
||||
</Panel>
|
||||
|
||||
Reference in new issue
Block a user