templates are per profile from the global table

This commit is contained in:
Filipriec
2026-08-30 01:14:55 +02:00
parent d4781698fd
commit 80d61760a2
11 changed files with 397 additions and 3831 deletions

View File

@@ -100,28 +100,16 @@ pub struct GeneratedColumnAlias {
pub alias: ::prost::alloc::string::String,
}
/// Defines the input for explicitly creating tables backed by one invoice
/// template. typst_source must contain exactly one field declaration:
///
/// \#let komp_ac_fields = (
/// "sidlo.nazov",
/// "people\[\].name",
/// "people\[\].requested_quantity",
/// )
///
/// A path matching an existing profile table and column becomes a reference to
/// that table. Otherwise its final segment becomes a local TEXT column for an
/// administrator to refine later. Every \[\] creates a child table with a required
/// FK to its immediate generated parent.
/// Enables a stored global Typst template for one profile and immediately
/// creates the input-table family declared by that template.
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CreateInvoiceTemplateTableRequest {
#[prost(string, tag = "1")]
pub profile_name: ::prost::alloc::string::String,
#[prost(string, tag = "2")]
pub table_name: ::prost::alloc::string::String,
#[prost(string, tag = "3")]
pub typst_source: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "5")]
pub template_name: ::prost::alloc::string::String,
#[prost(string, repeated, tag = "3")]
pub row_display_columns: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
/// One physical dynamic table created for an invoice template scope. The root