links to the other tables
This commit is contained in:
@@ -98,6 +98,7 @@ pub async fn run_ui() -> Result<()> {
|
||||
initial_profile.clone(),
|
||||
initial_table.clone(),
|
||||
filtered_columns,
|
||||
vec![], // FIX 1: Provide the missing 4th argument
|
||||
);
|
||||
|
||||
UiService::fetch_and_set_table_count(&mut grpc_client, &mut form_state)
|
||||
@@ -339,11 +340,30 @@ pub async fn run_ui() -> Result<()> {
|
||||
.map(|c| c.name.clone())
|
||||
.collect();
|
||||
|
||||
let filtered_columns = filter_user_columns(new_columns);
|
||||
// FIX 2: Look up links in the profile_tree
|
||||
let new_links: Vec<String> = app_state
|
||||
.profile_tree
|
||||
.profiles
|
||||
.iter()
|
||||
.find(|p| p.name == *prof_name)
|
||||
.and_then(|profile| {
|
||||
profile
|
||||
.tables
|
||||
.iter()
|
||||
.find(|t| t.name == *tbl_name)
|
||||
})
|
||||
.map_or(vec![], |table| {
|
||||
table.depends_on.clone()
|
||||
});
|
||||
|
||||
let filtered_columns =
|
||||
filter_user_columns(new_columns);
|
||||
|
||||
form_state = FormState::new(
|
||||
prof_name.clone(),
|
||||
tbl_name.clone(),
|
||||
filtered_columns,
|
||||
new_links,
|
||||
);
|
||||
|
||||
if let Err(e) = UiService::fetch_and_set_table_count(
|
||||
|
||||
Reference in New Issue
Block a user