hidden from the user now in the form
This commit is contained in:
14
client/src/utils/columns.rs
Normal file
14
client/src/utils/columns.rs
Normal file
@@ -0,0 +1,14 @@
|
||||
// src/utils/columns.rs
|
||||
pub fn is_system_column(column_name: &str) -> bool {
|
||||
match column_name {
|
||||
"id" | "deleted" | "created_at" => true,
|
||||
name if name.ends_with("_id") => true,
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn filter_user_columns(all_columns: Vec<String>) -> Vec<String> {
|
||||
all_columns.into_iter()
|
||||
.filter(|col| !is_system_column(col))
|
||||
.collect()
|
||||
}
|
||||
4
client/src/utils/mod.rs
Normal file
4
client/src/utils/mod.rs
Normal file
@@ -0,0 +1,4 @@
|
||||
// src/utils/mod.rs
|
||||
|
||||
pub mod columns;
|
||||
pub use columns::*;
|
||||
Reference in New Issue
Block a user