From 07e55abd8edef69c5292b6d6673d8c19dc9ccd67 Mon Sep 17 00:00:00 2001 From: Filipriec Date: Sun, 30 Aug 2026 16:44:34 +0200 Subject: [PATCH] strenghten of invoices --- client | 2 +- client-gui2 | 2 +- common/proto/document_data.proto | 3 + common/src/proto/descriptor.bin | Bin 205480 -> 205895 bytes common/src/proto/komp_ac.document_data.rs | 6 ++ komp-app/src/grpc.rs | 78 +++++++++++++++++++++- server | 2 +- 7 files changed, 87 insertions(+), 6 deletions(-) diff --git a/client b/client index 2e4b1589..dea91c5b 160000 --- a/client +++ b/client @@ -1 +1 @@ -Subproject commit 2e4b158935ea31e1cf0c8504b6293d36ec703edb +Subproject commit dea91c5be6b0767c2f575102abe2bea31b3c34cb diff --git a/client-gui2 b/client-gui2 index cc532d80..20ef0526 160000 --- a/client-gui2 +++ b/client-gui2 @@ -1 +1 @@ -Subproject commit cc532d80270212a81d6d5075df0daaef48fa1d08 +Subproject commit 20ef05269ef999d159e6668599baa4c8de540363 diff --git a/common/proto/document_data.proto b/common/proto/document_data.proto index 9604ac4e..4e2add87 100644 --- a/common/proto/document_data.proto +++ b/common/proto/document_data.proto @@ -24,6 +24,7 @@ message SaveDocumentRequest { repeated SourceRecord source_records = 1; string template_name = 2; string data_json = 3; + int64 expected_template_version_id = 4; } message RegisterTypstTemplateRequest { @@ -73,6 +74,8 @@ message GetDocumentsRequest { optional int64 schema_id = 1; uint32 limit = 2; optional string template_name = 3; + optional string source_profile_name = 4; + optional string source_table_name = 5; } message Document { diff --git a/common/src/proto/descriptor.bin b/common/src/proto/descriptor.bin index 8e339ff04577a10153e741db2bcb63fc8331e4cd..9fe717027e3c7efa8115aa5aafae70c79e8ab7cc 100644 GIT binary patch delta 3839 zcmX|ETTfJ16h3F4JeetP3q2Jnjo&CngTHklRwf5TUocZd<%+J4M zUhI4&z8$G_zWUz%r}FQsFRInCu(kYXsXVt_zEP^Y_`RWW?boV&OY*PD^4+C{+2!(7 z`Tm1ji}yxvbo}Iot(Dn7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8rL?@^y={x7;B`aUd!wjWqntGW!i{n` zAUKY4)<6h1%EeNYSTZIWjeH>R#<*!fFph;fwShNwuEEF%wY=%QV`YT!x~bYsS|Q08 zXBhwpH_kGE;5g1QfDmrn$Vj9NNymiak&Fq)BN-EpM@^ex`Jq71Cb?$-piMd&g`DJ` z!3NqSdPXA`X?e?g*Q$?vodmbgBU*M5$)6JT4gjD>Q@9{>KY$Q@Dy~ZrqEF@Ro`Mb0 zr&?_dB0BgsUs?drZgWY2$i|lz2(;VzMDyWDW}0_cBm@qhc861H({Y{;rxT`iDw9&1 z=8YC>dB=OtrWV8Nj;b@kW6ErX3k-m8GhC@SF`b#=3d4waGhE@Aj+%8mN@h0YnPg@i zjgpylG~{xZH)d=abJx)*(8-F1ep_8OrEg_P=h(H0T33{Tx>@b2vO#m zE~cKu>$%K9K%3{8j?LAY=LP_QHqSE+1loLpp{DM~ROEZYewP3YvY$F2@a~0ng9Cwg zud#_~(6zur7>g><7F@2hAQyNDVFPV}7e_3zI#{I2CKxXu@D`m+T7-+C-EXjgx9Cc% zbg<+)qCi`6G+GHuj;26ca<}n~p~NWs~O(HqbVC>D6iZ*!$SZ zsDsyIeiYP+1Uj}j$vTtd7AFaWB)2$8An>+0Ngzbu;w1B0KJh-W(evlZ;(q-&g<$x69!)@`vZHvU?sz#M`Z|G4eIZ*kc(0;O#jc$=G8Vuz|M6EziZ6!~s7OHGL}%d2s=N zcIb|yg?Gqz6gJQfd2wmd^-OU6fef?@4+y+xP9`n9XHF%C;)p*~+AO>ycN{IeBYted z2HFumO|)J$Excn_OWJqGhL&W=2Hr7mE+FuZT`{rnPWV?s3tD(5?l@X_C;Te`8)zr^ zlgQyCU(i+0eeb336!;Ba3P10r3, + #[prost(string, optional, tag = "4")] + pub source_profile_name: ::core::option::Option<::prost::alloc::string::String>, + #[prost(string, optional, tag = "5")] + pub source_table_name: ::core::option::Option<::prost::alloc::string::String>, } #[derive(serde::Serialize, serde::Deserialize)] #[derive(Clone, PartialEq, ::prost::Message)] diff --git a/komp-app/src/grpc.rs b/komp-app/src/grpc.rs index bbb30c37..63558397 100644 --- a/komp-app/src/grpc.rs +++ b/komp-app/src/grpc.rs @@ -15,7 +15,10 @@ use common::proto::komp_ac::accounting::{ use common::proto::komp_ac::common::Empty; use common::proto::komp_ac::document_data::{ GetDocumentRequest, GetDocumentResponse, GetDocumentVersionRequest, GetDocumentVersionResponse, - GetDocumentsRequest, GetDocumentsResponse, SaveDocumentRequest, SaveDocumentResponse, + GetDocumentsRequest, GetDocumentsResponse, GetTypstTemplateVersionRequest, + GetTypstTemplateVersionResponse, ListEnabledTypstTemplatesRequest, + ListTypstTemplatesRequest, ListTypstTemplatesResponse, RegisterTypstTemplateRequest, + RegisterTypstTemplateResponse, SaveDocumentRequest, SaveDocumentResponse, UpdateDocumentRequest, UpdateDocumentResponse, document_data_service_client::DocumentDataServiceClient, }; @@ -32,8 +35,9 @@ use common::proto::komp_ac::table_definition::{ GetProfileDetailsRequest, GetProfileDetailsResponse, GetTableCatalogRequest, GetTableCatalogResponse, ListColumnTypesResponse, PostTableDefinitionRequest, ProfileTreeResponse, PutTableDefinitionRequest, PutTableDefinitionResponse, - SetColumnPresentationRequest, SetColumnPresentationResponse, TableDefinitionResponse, - table_definition_client::TableDefinitionClient, + SetColumnFormVisibilityRequest, SetColumnFormVisibilityResponse, + SetColumnPresentationRequest, SetColumnPresentationResponse, + TableDefinitionResponse, table_definition_client::TableDefinitionClient, }; use common::proto::komp_ac::table_script::{ GetTableScriptsRequest, GetTableScriptsResponse, HydrateScriptDependenciesRequest, @@ -561,6 +565,19 @@ impl GrpcClient { Ok(response.into_inner()) } + pub async fn set_column_form_visibility( + &mut self, + request: SetColumnFormVisibilityRequest, + ) -> Result { + let tonic_request = self.authenticated_request(request)?; + let response = self + .table_definition_client + .set_column_form_visibility(tonic_request) + .await + .context("gRPC SetColumnFormVisibility call failed")?; + Ok(response.into_inner()) + } + pub async fn post_table_script( &mut self, request: PostTableScriptRequest, @@ -941,6 +958,48 @@ impl GrpcClient { Ok(response.into_inner()) } + pub async fn list_enabled_typst_templates( + &mut self, + profile_name: String, + ) -> Result { + let request = self.authenticated_request(ListEnabledTypstTemplatesRequest { + profile_name, + })?; + let response = self + .document_data_client + .list_enabled_typst_templates(request) + .await + .context("gRPC ListEnabledTypstTemplates call failed")?; + Ok(response.into_inner()) + } + + pub async fn list_typst_templates( + &mut self, + search: String, + limit: u32, + ) -> Result { + let request = self.authenticated_request(ListTypstTemplatesRequest { search, limit })?; + let response = self + .document_data_client + .list_typst_templates(request) + .await + .context("gRPC ListTypstTemplates call failed")?; + Ok(response.into_inner()) + } + + pub async fn register_typst_template( + &mut self, + request: RegisterTypstTemplateRequest, + ) -> Result { + let request = self.authenticated_request(request)?; + let response = self + .document_data_client + .register_typst_template(request) + .await + .context("gRPC RegisterTypstTemplate call failed")?; + Ok(response.into_inner()) + } + pub async fn update_document( &mut self, request: UpdateDocumentRequest, @@ -993,6 +1052,19 @@ impl GrpcClient { Ok(response.into_inner()) } + pub async fn get_typst_template_version( + &mut self, + request: GetTypstTemplateVersionRequest, + ) -> Result { + let request = self.authenticated_request(request)?; + let response = self + .document_data_client + .get_typst_template_version(request) + .await + .context("gRPC GetTypstTemplateVersion call failed")?; + Ok(response.into_inner()) + } + pub async fn search( &mut self, profile_name: String, diff --git a/server b/server index 9d960ff7..4852641e 160000 --- a/server +++ b/server @@ -1 +1 @@ -Subproject commit 9d960ff719c29b92a4fb43a1a19747d883d0659d +Subproject commit 4852641efd0afa868bd4870693ac814e44416100