Enhance Feedback and Tender Approval Services with Toggle Functionality

- Updated the ToggleFeedback method in the feedback service to change the FeedbackType to "unlike" or "undislike" based on the current state, improving user interaction with feedback.
- Modified the ToggleTenderApproval method in the tender approval service to update the Status to "unapproved" or "unrejected" depending on the current approval state, streamlining tender approval management.
- These enhancements improve the overall functionality and user experience of the tender management system.
This commit is contained in:
n.nakhostin
2025-08-20 12:38:54 +03:30
parent 1b27ad5304
commit b26d77b4cf
2 changed files with 12 additions and 0 deletions
+6
View File
@@ -65,6 +65,12 @@ func (s *feedbackService) ToggleFeedback(ctx context.Context, req ToggleFeedback
return nil, err
}
if req.FeedbackType == FeedbackTypeLike {
existing.FeedbackType = "unlike"
} else {
existing.FeedbackType = "undislike"
}
return existing.ToResponse(), nil
}