diff --git a/Response/CandidateStatusResponse.cs b/Response/CandidateStatusResponse.cs index e36d0a7..ac6b699 100644 --- a/Response/CandidateStatusResponse.cs +++ b/Response/CandidateStatusResponse.cs @@ -9,5 +9,8 @@ namespace BMA.EHR.Recurit.Exam.Service.Response public string? RejectDetail { get; set; } public bool? IsShowExamInfo { get; set; } + + public bool? IsShowResult { get; set; } + } } diff --git a/Services/CandidateService.cs b/Services/CandidateService.cs index fc1ba9f..64c57a6 100644 --- a/Services/CandidateService.cs +++ b/Services/CandidateService.cs @@ -1978,7 +1978,19 @@ namespace BMA.EHR.Recurit.Exam.Service.Services if (candidate == null) throw new Exception(GlobalMessages.CandidateNotFound); - return new CandidateStatusResponse { Status = candidate.Status, RejectDetail = candidate.RejectDetail, IsShowExamInfo = candidate.IsShowExamInfo }; + bool IsShowResult = true; + if (exam.AnnouncementDate != null) + { + var showResultEndDate = exam.AnnouncementDate.Value.Date.AddDays(15); + IsShowResult = DateTime.Now.Date <= showResultEndDate; + } + + return new CandidateStatusResponse { + Status = candidate.Status, + RejectDetail = candidate.RejectDetail, + IsShowExamInfo = candidate.IsShowExamInfo, + IsShowResult = IsShowResult, + }; } public async Task UserCheckCandidateService(string examId, string positionId, string status)