Refactor Tender Approval Management and Update API Documentation
- Replaced the existing tender approval update and delete endpoints with a new toggle functionality, allowing for more streamlined management of tender approvals. - Introduced the `ToggleTenderApproval` method in the service layer to handle both approval and rejection actions based on the current state of the tender approval. - Updated the API documentation to reflect the new endpoint structure and response formats, including the `TenderApprovalWithTenderResponse`. - Enhanced Swagger documentation to ensure accurate representation of the updated tender approval operations. - Removed obsolete methods and routes to maintain a clean and efficient codebase, adhering to Clean Architecture principles.
This commit is contained in:
@@ -137,13 +137,13 @@ func (ta *TenderApproval) HasDecision() bool {
|
||||
}
|
||||
|
||||
// Approve approves the tender with optional notes
|
||||
func (ta *TenderApproval) Approve(notes *string) {
|
||||
func (ta *TenderApproval) Approve() {
|
||||
ta.Status = ApprovalStatusApproved
|
||||
ta.CreatedAt = time.Now().Unix()
|
||||
}
|
||||
|
||||
// Reject rejects the tender with a reason
|
||||
func (ta *TenderApproval) Reject(reason string) {
|
||||
func (ta *TenderApproval) Reject() {
|
||||
ta.Status = ApprovalStatusRejected
|
||||
ta.CreatedAt = time.Now().Unix()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user