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

@@ -804,7 +804,7 @@ pub(crate) async fn create_from_invoice_template(
});
inputs.invoice = form.clone();
if form.table_name.trim().is_empty() || form.typst_source.trim().is_empty() {
if form.table_name.trim().is_empty() {
let message = tr!(
Locale::from_headers(&headers),
"td-err-template-required"
@@ -821,8 +821,7 @@ pub(crate) async fn create_from_invoice_template(
let request = CreateInvoiceTemplateTableRequest {
profile_name: form.profile.clone(),
table_name: form.table_name.trim().to_string(),
typst_source: form.typst_source.clone(),
template_name: form.table_name.trim().to_string(),
row_display_columns: form.display_columns(),
};
let Ok(request) = authenticated_request(&headers, request) else {