diff --git a/client b/client index 88902a4..baa6055 160000 --- a/client +++ b/client @@ -1 +1 @@ -Subproject commit 88902a4b5d10e3f771e288a27afda3f5a7cab56f +Subproject commit baa60556d04c114ca23117d195ef5c5411761f13 diff --git a/common/proto/tables_data.proto b/common/proto/tables_data.proto index c406780..2cb57bf 100644 --- a/common/proto/tables_data.proto +++ b/common/proto/tables_data.proto @@ -121,6 +121,11 @@ message PostTableDataRequest { // - Some application-specific validations may apply (e.g., max length for // certain fields like "telefon") map data = 3; + + // Optional. Existing journal that receives the posting generated for this row. + // Required when the table has an active after-insert posting script and rejected + // when the table has no active posting script. + optional int64 journal_id = 4; } // Insert response. @@ -145,6 +150,9 @@ message PostTableDataResponse { message PostTableDataBulkRow { // Required. Same data payload as PostTableDataRequest.data. map data = 1; + + // Optional. Existing journal that receives the posting generated for this row. + optional int64 journal_id = 2; } // Bulk insert request. diff --git a/common/src/proto/descriptor.bin b/common/src/proto/descriptor.bin index fb258fa..08d5faa 100644 Binary files a/common/src/proto/descriptor.bin and b/common/src/proto/descriptor.bin differ diff --git a/common/src/proto/komp_ac.tables_data.rs b/common/src/proto/komp_ac.tables_data.rs index 0bf47fa..a77bc59 100644 --- a/common/src/proto/komp_ac.tables_data.rs +++ b/common/src/proto/komp_ac.tables_data.rs @@ -45,6 +45,11 @@ pub struct PostTableDataRequest { ::prost::alloc::string::String, ::prost_types::Value, >, + /// Optional. Existing journal that receives the posting generated for this row. + /// Required when the table has an active after-insert posting script and rejected + /// when the table has no active posting script. + #[prost(int64, optional, tag = "4")] + pub journal_id: ::core::option::Option, } /// Insert response. #[derive(Clone, PartialEq, ::prost::Message)] @@ -74,6 +79,9 @@ pub struct PostTableDataBulkRow { ::prost::alloc::string::String, ::prost_types::Value, >, + /// Optional. Existing journal that receives the posting generated for this row. + #[prost(int64, optional, tag = "2")] + pub journal_id: ::core::option::Option, } /// Bulk insert request. #[derive(Clone, PartialEq, ::prost::Message)] diff --git a/graphs/src/pages/import_export/import/logic.rs b/graphs/src/pages/import_export/import/logic.rs index 784b151..17dbdc6 100644 --- a/graphs/src/pages/import_export/import/logic.rs +++ b/graphs/src/pages/import_export/import/logic.rs @@ -182,7 +182,10 @@ fn row_for_table(table: &ImportTable, positions: &[(usize, String)], row: &[Stri let value = csv_value(row.get(*index).map(String::as_str).unwrap_or_default(), data_type)?; data.insert(column.clone(), value); } - Ok(PostTableDataBulkRow { data }) + Ok(PostTableDataBulkRow { + data, + journal_id: None, + }) } fn render_loaded(result: Result) -> Response { diff --git a/server b/server index 255f334..8a6be13 160000 --- a/server +++ b/server @@ -1 +1 @@ -Subproject commit 255f334bf48599ab53e1dad02f7334a8611ef2df +Subproject commit 8a6be133f168746f25840acf925d99cde2b768a2 diff --git a/tui-pages b/tui-pages index f8f70f1..30b2bf7 160000 --- a/tui-pages +++ b/tui-pages @@ -1 +1 @@ -Subproject commit f8f70f1fbb097d24082ad55f30b73c2e4175dc3f +Subproject commit 30b2bf78914c0a18a872e0680059e7fd4bd18867