web interface for table_definition improved
This commit is contained in:
36
web/src/pages/admin/table_definition/mod.rs
Normal file
36
web/src/pages/admin/table_definition/mod.rs
Normal 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),
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user