now properly not displaying in the frontend form fields that should be hidden from the user
This commit is contained in:
@@ -320,7 +320,12 @@ pub async fn run_ui() -> Result<()> {
|
|||||||
match grpc_client.get_table_structure(prof_name.clone(), tbl_name.clone()).await {
|
match grpc_client.get_table_structure(prof_name.clone(), tbl_name.clone()).await {
|
||||||
Ok(structure_response) => {
|
Ok(structure_response) => {
|
||||||
let new_columns: Vec<String> = structure_response.columns.iter().map(|c| c.name.clone()).collect();
|
let new_columns: Vec<String> = structure_response.columns.iter().map(|c| c.name.clone()).collect();
|
||||||
form_state = FormState::new(prof_name.clone(), tbl_name.clone(), new_columns);
|
|
||||||
|
// --- START FIX ---
|
||||||
|
// Apply the same filtering logic here that is used on initial load.
|
||||||
|
let filtered_columns = filter_user_columns(new_columns);
|
||||||
|
form_state = FormState::new(prof_name.clone(), tbl_name.clone(), filtered_columns);
|
||||||
|
// --- END FIX ---
|
||||||
|
|
||||||
if let Err(e) = UiService::fetch_and_set_table_count(&mut grpc_client, &mut form_state).await {
|
if let Err(e) = UiService::fetch_and_set_table_count(&mut grpc_client, &mut form_state).await {
|
||||||
app_state.update_dialog_content(&format!("Error fetching count: {}", e), vec!["OK".to_string()], DialogPurpose::LoginFailed);
|
app_state.update_dialog_content(&format!("Error fetching count: {}", e), vec!["OK".to_string()], DialogPurpose::LoginFailed);
|
||||||
|
|||||||
Reference in New Issue
Block a user