talbe definition web

This commit is contained in:
Priec
2026-08-06 17:47:53 +02:00
parent f13def52c1
commit 5f4b026624
14 changed files with 870 additions and 273 deletions

View File

@@ -11,7 +11,7 @@
//! by [`crate::schema::columns_from_rows`], so the two screens that describe
//! columns cannot drift apart.
use crate::schema::{ColumnDraft, columns_from_rows};
use crate::schema::{ColumnCatalog, ColumnDraft, columns_from_rows};
use super::draft::{LinkDefinition, LinkMode, TableDraft};
@@ -110,8 +110,12 @@ impl BuilderForm {
&self.column_rounding,
&self.column_currencies,
),
// The table is being created here, so ACCOUNTING is on the table.
accounting_allowed: true,
// Filled in by the loader from `ListColumnTypes`, never by the
// form: it is the vocabulary the draft is validated against.
catalog: ColumnCatalog::default(),
// The table is being created here, so the creation-only types are
// on the table.
creating_table: true,
};
let link_count = self.link_tables.len().min(self.link_modes.len());
@@ -189,6 +193,9 @@ impl AddTablePageState {
.added
.iter()
.enumerate()
// A compound column expands into schema-managed companions, so
// there is no column of that name for a row to be shown by.
.filter(|(index, _)| self.draft.columns.is_indexable(*index))
.map(|(index, column)| RowDisplayCandidate {
index: index + 1,
name: column.name.clone(),