Enhance tender service to exclude company-rejected tenders from recommendations

- Updated the tender service to include a new dependency for listing rejected tenders by company, allowing for more refined tender recommendations.
- Introduced a new field in the SearchForm to specify whether to exclude rejected tenders from the recommendation results.
- Enhanced the Recommend method to filter out rejected tenders based on the new exclusion logic, improving the relevance of AI-ranked tender recommendations.
- Added unit tests to verify the exclusion logic for rejected tenders, ensuring robust functionality.

This update improves the tender recommendation process by ensuring that company-rejected tenders are not included in the results, enhancing user experience and satisfaction.
This commit is contained in:
Mazyar
2026-07-03 19:55:01 +03:30
parent ec7db8b9f0
commit fe3a71ba2b
8 changed files with 212 additions and 21 deletions
+1 -4
View File
@@ -176,7 +176,7 @@ func (h *Handler) PublicGetTenderApprovals(c echo.Context) error {
submissionMode = &mode
}
// Parse status filter; default to submitted so "Your Tenders" excludes rejected approvals
// Parse status filter
var status *ApprovalStatus
if statusStr != "" {
statusVal := ApprovalStatus(statusStr)
@@ -184,9 +184,6 @@ func (h *Handler) PublicGetTenderApprovals(c echo.Context) error {
return response.BadRequest(c, "Invalid status value", "Must be 'submitted' or 'rejected'")
}
status = &statusVal
} else {
defaultStatus := ApprovalStatusSubmitted
status = &defaultStatus
}
var from *int64