Add tender submission functionality and related routes

- Introduced the `tender_submission` domain, including entity, repository, service, and handler implementations for managing tender submissions.
- Added new routes for both admin and public access to tender submissions, allowing for listing, ensuring, and retrieving submissions by ID and tender.
- Enhanced the tender approval service to synchronize submission workflows with approval changes, ensuring proper state management.
- Implemented validation and response structures for tender submission operations, improving API consistency and usability.
- Added unit tests for tender submission status transitions and workflow logic, ensuring robust functionality.

This update enhances the tender management system by providing comprehensive support for tender submissions, improving overall workflow and user experience.
This commit is contained in:
Mazyar
2026-07-12 14:54:42 +03:30
parent 10385e997b
commit 0cce9ef1b5
12 changed files with 1598 additions and 18 deletions
+2 -1
View File
@@ -60,7 +60,8 @@ func (h *Handler) ToggleTenderApproval(c echo.Context) error {
return response.BadRequest(c, "Company ID is required", "")
}
tenderApproval, err := h.service.ToggleTenderApproval(c.Request().Context(), form, companyID)
customerID, _ := customer.GetCustomerIDFromContext(c)
tenderApproval, err := h.service.ToggleTenderApproval(c.Request().Context(), form, companyID, customerID)
if err != nil {
if errors.Is(err, ErrTenderNotFound) {
return response.NotFound(c, "Tender not found")