diff --git a/crates/frontend/src/components/default_config_form.rs b/crates/frontend/src/components/default_config_form.rs index 4257921d..c438f4d9 100644 --- a/crates/frontend/src/components/default_config_form.rs +++ b/crates/frontend/src/components/default_config_form.rs @@ -175,7 +175,6 @@ where view! {
-
-
-
-
-
} }} -
+ {move || { let input_format = match ( @@ -337,7 +331,7 @@ where {input_format} -
+ } }} diff --git a/crates/frontend/src/components/dimension_form.rs b/crates/frontend/src/components/dimension_form.rs index ba55d6c0..da7e1d4a 100644 --- a/crates/frontend/src/components/dimension_form.rs +++ b/crates/frontend/src/components/dimension_form.rs @@ -12,9 +12,11 @@ use utils::{create_dimension, update_dimension}; use web_sys::MouseEvent; use crate::components::{ + alert::AlertType, dropdown::{Dropdown, DropdownBtnType, DropdownDirection}, input::{Input, InputType}, }; +use crate::providers::alert_provider::enqueue_alert; use crate::providers::editor_provider::EditorProvider; use crate::schema::{JsonSchemaType, SchemaType}; use crate::types::FunctionsName; @@ -126,9 +128,20 @@ where match result { Ok(_) => { handle_submit(); + let success_message = if edit { + "Dimension updated successfully!" + } else { + "New Dimension created successfully!" + }; + enqueue_alert( + String::from(success_message), + AlertType::Success, + 5000, + ); } Err(e) => { - set_error_message.set(e); + set_error_message.set(e.clone()); + enqueue_alert(e, AlertType::Error, 5000); // Handle error // Consider logging or displaying the error } @@ -157,8 +170,6 @@ where -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
{move || { let loading = req_inprogess_rs.get(); diff --git a/crates/frontend/src/pages/context_override.rs b/crates/frontend/src/pages/context_override.rs index 53d7702c..f44f8acb 100644 --- a/crates/frontend/src/pages/context_override.rs +++ b/crates/frontend/src/pages/context_override.rs @@ -97,9 +97,20 @@ fn form( Ok(_) => { logging::log!("Context and overrides submitted successfully"); handle_submit.call(()); + let success_message = if edit { + "Context and overrides updated successfully!" + } else { + "Context and overrides created successfully!" + }; + enqueue_alert( + String::from(success_message), + AlertType::Success, + 5000, + ); } Err(e) => { logging::log!("Error submitting context and overrides: {:?}", e); + enqueue_alert(e, AlertType::Error, 5000); } } req_inprogress_ws.set(false); @@ -118,7 +129,6 @@ fn form( disabled=edit /> -
-
-
-
-