Refactor Tender Approval Logic and Update Statistics Structure
- Modified the Reject method in the TenderApproval entity to reset the SubmissionMode field upon rejection, ensuring proper state management. - Simplified the TenderApprovalStatsResponse and CompanyTenderApprovalStatsResponse structures by removing unnecessary fields related to submission modes, streamlining the data model for tender approval statistics. - Updated the GetTenderApprovalStats and GetCompanyTenderApprovalStats methods in the repository to reflect the changes in the statistics structure, enhancing clarity and maintainability. - These adjustments improve the overall functionality and data handling of the tender management system.
This commit is contained in:
@@ -145,6 +145,7 @@ func (ta *TenderApproval) Approve() {
|
||||
// Reject rejects the tender with a reason
|
||||
func (ta *TenderApproval) Reject() {
|
||||
ta.Status = ApprovalStatusRejected
|
||||
ta.SubmissionMode = ""
|
||||
ta.CreatedAt = time.Now().Unix()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user