link in table definition
This commit is contained in:
@@ -48,6 +48,8 @@ pub(crate) struct BuilderForm {
|
||||
#[serde(default)]
|
||||
pub gtin_type_input: String,
|
||||
#[serde(default)]
|
||||
pub link_table_input: String,
|
||||
#[serde(default)]
|
||||
pub decimal_precision_input: String,
|
||||
#[serde(default)]
|
||||
pub decimal_scale_input: String,
|
||||
@@ -96,6 +98,7 @@ impl BuilderForm {
|
||||
type_input: self.column_type_input.clone(),
|
||||
temporal_type_input: self.temporal_type_input.clone(),
|
||||
gtin_type_input: self.gtin_type_input.clone(),
|
||||
link_table_input: self.link_table_input.clone(),
|
||||
decimal_precision_input: self.decimal_precision_input.clone(),
|
||||
decimal_scale_input: self.decimal_scale_input.clone(),
|
||||
indexing_input: self.column_indexing_input.clone(),
|
||||
|
||||
@@ -169,6 +169,12 @@ mod tests {
|
||||
let html = render_builder(&state);
|
||||
assert!(html.contains(r#"name="column_rounding_input""#));
|
||||
assert!(html.contains(r#"list="currency-codes""#));
|
||||
|
||||
state.draft.columns.type_input = "link".to_string();
|
||||
let html = render_builder(&state);
|
||||
assert!(html.contains("Link alias"));
|
||||
assert!(html.contains(r#"name="link_table_input""#));
|
||||
assert!(html.contains(r#"<option value="customer""#));
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user