Creates a new scholarship edit form, which should be accessed from the provider dashboard. Requires providers to be signed in.
Assuming the provider is signed in, the application will present the provider with a list of scholarships that they own personally. They can choose to edit or delete each scholarship, along with the choice to create a new one.
Creating a new scholarship requires the server to "register" a new entry in the scholarships table. It then signals the client side to refetch the data. It also returns the ID of the new scholarship should we want to do anything with it.
As a side note, this PR also introduces a small change to the loaner application - it will now redirect to the main page after checking a loaner back in, instead of refetching the list of students. This should lower the number of database requests that the app is making.
Creates a new scholarship edit form, which should be accessed from the provider dashboard. Requires providers to be signed in.
Assuming the provider is signed in, the application will present the provider with a list of scholarships that they own personally. They can choose to edit or delete each scholarship, along with the choice to create a new one.
Creating a new scholarship requires the server to "register" a new entry in the scholarships table. It then signals the client side to refetch the data. It also returns the ID of the new scholarship should we want to do anything with it.
As a side note, this PR also introduces a small change to the loaner application - it will now redirect to the main page after checking a loaner back in, instead of refetching the list of students. This should lower the number of database requests that the app is making.
The list is never told to refresh after “Submit” (create/update), because the ScholarshipList resource lives inside ScholarshipList() and the submit_action lives inside ScholarshipForm(). They don’t share a refresh signal.
The list is never told to refresh after “Submit” (create/update), because the ScholarshipList resource lives inside ScholarshipList() and the submit_action lives inside ScholarshipForm(). They don’t share a refresh signal.
This is a whole issue in itself - Dynamo doesn't support checking this information against the whole table simply. From what I've read, the best approach to this requires creating a whole new table that contains "name lock" information, literally all the names of the scholarships that have already been used. This could require a significant rewrite of the database functions.
I'm going to create this as a separate issue. Right now, this approach works, although it does allow duplicate names. That's alright, as we've got at least a functional mechanism. I will handle the overarching server function rewrite another time, after this component is finished.
We'll have to discuss the best approach for that as well - sometimes the best thing to do would actually be using the scholarship's name as the primary key. This is enforced as unique all the time, but I personally think that's not our desired behavior because of the structure of our ExpandableInfo struct - the subject field is always a UUID, while the rest of the information is stored in the struct's HashMap<String, ValueType>.
This is a whole issue in itself - Dynamo doesn't support checking this information against the whole table simply. From what I've read, the best approach to this requires creating a whole new table that contains "name lock" information, literally all the names of the scholarships that have already been used. This could require a significant rewrite of the database functions.
I'm going to create this as a separate issue. Right now, this approach works, although it does allow duplicate names. That's alright, as we've got at least a functional mechanism. I will handle the overarching server function rewrite another time, after this component is finished.
We'll have to discuss the best approach for that as well - sometimes the best thing to do would actually be using the scholarship's name as the primary key. This is enforced as unique all the time, but I personally think that's not our desired behavior because of the structure of our `ExpandableInfo` struct - the subject field is always a UUID, while the rest of the information is stored in the struct's `HashMap<String, ValueType>`.
The styling of the modal isn't quite there, but I plan on making a modal window component that we can use across all pages. This means I won't have to keep creating the same modal dialog over and over.
The styling of the modal isn't quite there, but I plan on making a modal window component that we can use across all pages. This means I won't have to keep creating the same modal dialog over and over.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Creates a new scholarship edit form, which should be accessed from the provider dashboard. Requires providers to be signed in.
Assuming the provider is signed in, the application will present the provider with a list of scholarships that they own personally. They can choose to edit or delete each scholarship, along with the choice to create a new one.
Creating a new scholarship requires the server to "register" a new entry in the scholarships table. It then signals the client side to refetch the data. It also returns the ID of the new scholarship should we want to do anything with it.
As a side note, this PR also introduces a small change to the loaner application - it will now redirect to the main page after checking a loaner back in, instead of refetching the list of students. This should lower the number of database requests that the app is making.
@@ -92,0 +177,4 @@match client.delete_item().table_name("leptos-scholarship-test").key("subject", AttributeValue::S(scholarship_id))Ensure that no two scholarships can have the same name.
@@ -7,3 +1,1 @@use crate::components::{ActionButton, ChipsList, Loading, OutlinedTextField, Panel, RadioList, Row,};use leptos::either::Either;Add confirmation before deleting a scholarship to prevent accidental deletion.
@@ -131,0 +363,4 @@SubmitStatus::Sending => "Sending submission...".into(),SubmitStatus::Success => "Success".into(),SubmitStatus::Error(msg) => format!("Error: {}", msg),}of created scholarship doesn't update after submit.
Update the scholarship list after the user submits
The list is never told to refresh after “Submit” (create/update), because the ScholarshipList resource lives inside ScholarshipList() and the submit_action lives inside ScholarshipForm(). They don’t share a refresh signal.
@@ -92,0 +177,4 @@match client.delete_item().table_name("leptos-scholarship-test").key("subject", AttributeValue::S(scholarship_id))This is a whole issue in itself - Dynamo doesn't support checking this information against the whole table simply. From what I've read, the best approach to this requires creating a whole new table that contains "name lock" information, literally all the names of the scholarships that have already been used. This could require a significant rewrite of the database functions.
I'm going to create this as a separate issue. Right now, this approach works, although it does allow duplicate names. That's alright, as we've got at least a functional mechanism. I will handle the overarching server function rewrite another time, after this component is finished.
We'll have to discuss the best approach for that as well - sometimes the best thing to do would actually be using the scholarship's name as the primary key. This is enforced as unique all the time, but I personally think that's not our desired behavior because of the structure of our
ExpandableInfostruct - the subject field is always a UUID, while the rest of the information is stored in the struct'sHashMap<String, ValueType>.The styling of the modal isn't quite there, but I plan on making a modal window component that we can use across all pages. This means I won't have to keep creating the same modal dialog over and over.