Skip to content

Commit

Permalink
fix: missing closed/open check for citizen documents
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Trost <[email protected]>
  • Loading branch information
galexrt committed Aug 9, 2024
1 parent bce2b9d commit 14a679c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/components/citizens/info/CitizenDocuments.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ async function listUserDocuments(): Promise<ListUserDocumentsResponse> {
},
userId: props.userId,
relations: [],
closed: query.value.closed,
});
const { response } = await call;
Expand Down
6 changes: 6 additions & 0 deletions gen/go/proto/services/docstore/docstore_user.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ func (s *Server) ListUserDocuments(ctx context.Context, req *ListUserDocumentsRe
),
)

if req.Closed != nil {
condition = condition.AND(tDocument.Closed.EQ(
jet.Bool(*req.Closed),
))
}

countStmt := tDocRel.
SELECT(
jet.COUNT(jet.DISTINCT(tDocRel.DocumentID)).AS("datacount.totalcount"),
Expand Down

0 comments on commit 14a679c

Please sign in to comment.