-
Notifications
You must be signed in to change notification settings - Fork 2
[BE] 購入報告一覧ページに立替者絞り込み・合計表示を追加 #1028
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
Summary of ChangesHello @TkymHrt, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! このプルリクエストは、購入報告一覧ページにおけるユーザーエクスペリエンスを向上させることを目的としています。具体的には、購入報告の検索機能に局名と立替者による絞り込みオプションを追加し、さらに未精算・未封詰めの合計金額を迅速に確認できる新しいサマリーAPIを導入しました。これにより、財務管理の効率化とデータアクセスの柔軟性が向上します。 Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
このプルリクエストは、購入報告一覧ページに立替者による絞り込み機能と合計金額の表示機能を追加するもので、全体的にうまく実装されています。
APIの拡張、データベースクエリの追加、そして関連する各レイヤー(コントローラ、ユースケース、リポジトリ)の修正が、設計に沿って適切に行われています。
特に、applyBuyReportFiltersヘルパー関数を導入してフィルタリングロジックを共通化した点は、コードの再利用性と保守性を高める良い改善です。
いくつかの改善点についてコメントしました。
GetBuyReportsSummaryコントローラにおけるyearパラメータのバリデーション強化- エラーハンドリングにおけるロギングの追加
これらの点を修正することで、APIの堅牢性とデバッグの容易さがさらに向上するでしょう。
素晴らしい作業です!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds filtering capabilities and summary functionality to the buy reports (購入報告) feature. It introduces query parameters for filtering by financial record name and payer (立替者), and adds a new summary endpoint that calculates unsettled and unpacked totals.
- Updates the OpenAPI specification to define new query parameters and the summary endpoint
- Regenerates frontend TypeScript and backend Go code from the updated OpenAPI spec
- Implements filtering logic in the repository layer using a shared filter helper function
- Adds a new summary endpoint that aggregates unsettled/unpacked amounts with SQL CASE expressions
Reviewed changes
Copilot reviewed 5 out of 11 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| openapi/openapi.yaml | Adds financial_record_name and paid_by query parameters to /buy_reports/details, defines new /buy_reports/summary endpoint and buyReportSummary schema |
| api/generated/openapi_gen.go | Generated code with new parameter types and endpoint handlers for filtering and summary |
| api/router/router.go | Registers the new /buy_reports/summary route |
| api/externals/controller/buy_report_controller.go | Implements GetBuyReportsSummary handler and updates existing handlers to accept filter parameters |
| api/internals/usecase/buy_report_usecase.go | Adds summary use case method and updates GetBuyReports signature to accept filter parameters |
| api/externals/repository/buy_report_repository.go | Replaces AllByPeriod with AllByFilters, adds SummaryByFilters and shared applyBuyReportFilters helper |
| view/next-project/src/generated/model/*.ts | Generated TypeScript types for new parameters and summary response |
| view/next-project/src/generated/hooks.ts | Generated React hooks for the new summary endpoint |
Kubosaka
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
コメントしました
実装自体は良さそう!
考えすぎかもだけど、運用考えたらデータ周り変更加えた方がいいかなって思いました!
…serID parameters for enhanced filtering
Deploying finansu with
|
| Latest commit: |
693c165
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://310b0a19.finansu.pages.dev |
| Branch Preview URL: | https://feat-yama-purchase-report-so.finansu.pages.dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 7 out of 15 changed files in this pull request and generated 4 comments.
…_by_user_id to enhance filtering in buy reports
対応Issue
https://www.notion.so/nutfes-nutmeg/FinanSu-2b941f19206380518f1af6de573da465
https://nut-m-e-g.slack.com/archives/C020WQ3GY07/p1765010563203229
概要
financial_record_name/paid_byクエリを追加し、AND 条件で絞り込み可能にGET /buy_reports/summaryを追加し、未精算・未封詰めの合計額を返却主要変更ファイル
openapi/openapi.yaml,api/generated/openapi_gen.go,api/router/router.go,api/externals/controller/buy_report_controller.go,api/internals/usecase/buy_report_usecase.go,api/externals/repository/buy_report_repository.go画面スクリーンショット等
テスト項目