web interface for table_definition improved

This commit is contained in:
Priec
2026-08-04 17:20:58 +02:00
parent c2002c7da3
commit 803207b1af
20 changed files with 2989 additions and 612 deletions

View File

@@ -0,0 +1,36 @@
//! The table-definition workspace: pick a profile and a table, then do
//! anything the `TableDefinition` service offers to it.
//!
//! Creating a table is the one operation that lives elsewhere — it is a form
//! long enough to want its own page, `pages/add_table` — and the workspace
//! links to it with the chosen profile already filled in.
mod loader;
mod logic;
mod state;
mod ui;
use axum::{
Router,
routing::{get, post},
};
use crate::AppState;
pub(crate) fn router() -> Router<AppState> {
Router::new()
.route("/admin/table-definition", get(logic::page))
.route("/admin/table-definition/workspace", get(logic::workspace))
.route(
"/admin/table-definition/columns/builder",
post(logic::update_columns),
)
.route("/admin/table-definition/columns", post(logic::add_columns))
.route("/admin/table-definition/rename", post(logic::rename_column))
.route("/admin/table-definition/delete", post(logic::delete_table))
.route("/admin/table-definition/copy", post(logic::copy_profile))
.route(
"/admin/table-definition/invoice-template",
post(logic::create_from_invoice_template),
)
}