journal id is now part of the db
This commit is contained in:
2
client
2
client
Submodule client updated: 88902a4b5d...baa60556d0
@@ -121,6 +121,11 @@ message PostTableDataRequest {
|
||||
// - Some application-specific validations may apply (e.g., max length for
|
||||
// certain fields like "telefon")
|
||||
map<string, google.protobuf.Value> 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<string, google.protobuf.Value> data = 1;
|
||||
|
||||
// Optional. Existing journal that receives the posting generated for this row.
|
||||
optional int64 journal_id = 2;
|
||||
}
|
||||
|
||||
// Bulk insert request.
|
||||
|
||||
Binary file not shown.
@@ -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<i64>,
|
||||
}
|
||||
/// 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<i64>,
|
||||
}
|
||||
/// Bulk insert request.
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
|
||||
@@ -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<super::state::ImportPageState, LoadError>) -> Response {
|
||||
|
||||
2
server
2
server
Submodule server updated: 255f334bf4...8a6be133f1
Submodule tui-pages updated: f8f70f1fbb...30b2bf7891
Reference in New Issue
Block a user