From 3f31f68c607da33abf12fd73bd145aebde89431f Mon Sep 17 00:00:00 2001 From: Bright Date: Tue, 13 May 2025 14:29:49 +0700 Subject: [PATCH] =?UTF-8?q?fix=20=E0=B8=9A=E0=B8=B1=E0=B8=99=E0=B8=97?= =?UTF-8?q?=E0=B8=B6=E0=B8=81=E0=B8=81=E0=B8=B2=E0=B8=A3=E0=B8=9E=E0=B8=B4?= =?UTF-8?q?=E0=B8=88=E0=B8=B2=E0=B8=A3=E0=B8=93=E0=B8=B2=E0=B8=82=E0=B8=AD?= =?UTF-8?q?=E0=B8=87=E0=B8=A3=E0=B8=B0=E0=B8=9A=E0=B8=9A=E0=B8=82=E0=B8=AD?= =?UTF-8?q?=E0=B8=A5=E0=B8=B2=E0=B8=AD=E0=B8=AD=E0=B8=81=E0=B8=81=E0=B8=A3?= =?UTF-8?q?=E0=B8=93=E0=B8=B5=E0=B9=80=E0=B8=AA=E0=B9=89=E0=B8=99=E0=B8=AD?= =?UTF-8?q?=E0=B8=99=E0=B8=B8=E0=B8=A1=E0=B8=B1=E0=B8=95=E0=B8=B4=20?= =?UTF-8?q?=E0=B8=A7=E0=B8=B1=E0=B8=99=E0=B8=97=E0=B8=B5=E0=B9=88=E0=B8=AA?= =?UTF-8?q?=E0=B8=B4=E0=B9=89=E0=B8=99=E0=B8=AA=E0=B8=B8=E0=B8=94=E0=B8=81?= =?UTF-8?q?=E0=B8=B2=E0=B8=A3=E0=B8=A2=E0=B8=B1=E0=B8=9A=E0=B8=A2=E0=B8=B1?= =?UTF-8?q?=E0=B9=89=E0=B8=87=E0=B8=95=E0=B9=89=E0=B8=AD=E0=B8=87=E0=B8=A7?= =?UTF-8?q?=E0=B9=88=E0=B8=B2=E0=B8=87=20#1518?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BMA.EHR.Application/Repositories/RetirementRepository.cs | 8 ++++---- .../Controllers/RetirementResignController.cs | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/BMA.EHR.Application/Repositories/RetirementRepository.cs b/BMA.EHR.Application/Repositories/RetirementRepository.cs index eb25ebd2..4de888e2 100644 --- a/BMA.EHR.Application/Repositories/RetirementRepository.cs +++ b/BMA.EHR.Application/Repositories/RetirementRepository.cs @@ -137,7 +137,7 @@ namespace BMA.EHR.Application.Repositories await _dbContext.SaveChangesAsync(); } - public async Task CommanderApproveRetirementResign(Guid id, string reason, DateTime date) + public async Task CommanderApproveRetirementResign(Guid id, string reason, DateTime? date) { // Get UserId from token var userId = UserId == null ? Guid.Empty : Guid.Parse(UserId); @@ -220,7 +220,7 @@ namespace BMA.EHR.Application.Repositories } } - public async Task CommanderRejectRetirementResign(Guid id, string reason, DateTime date) + public async Task CommanderRejectRetirementResign(Guid id, string reason, DateTime? date) { // Get UserId from token var userId = UserId == null ? Guid.Empty : Guid.Parse(UserId); @@ -307,7 +307,7 @@ namespace BMA.EHR.Application.Repositories } - public async Task ApproveRetirementResign(Guid id, string reason, DateTime date) + public async Task ApproveRetirementResign(Guid id, string reason, DateTime? date) { // Get UserId from token var userId = UserId == null ? Guid.Empty : Guid.Parse(UserId); @@ -387,7 +387,7 @@ namespace BMA.EHR.Application.Repositories } - public async Task RejectRetirementResign(Guid id, string reason, DateTime date) + public async Task RejectRetirementResign(Guid id, string reason, DateTime? date) { // Get UserId from token var userId = UserId == null ? Guid.Empty : Guid.Parse(UserId); diff --git a/BMA.EHR.Retirement.Service/Controllers/RetirementResignController.cs b/BMA.EHR.Retirement.Service/Controllers/RetirementResignController.cs index 4ca0cd89..759a68a3 100644 --- a/BMA.EHR.Retirement.Service/Controllers/RetirementResignController.cs +++ b/BMA.EHR.Retirement.Service/Controllers/RetirementResignController.cs @@ -2663,7 +2663,7 @@ namespace BMA.EHR.Retirement.Service.Controllers // { // return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); // } - await _repository.CommanderApproveRetirementResign(id, req.Reason ?? "", req.Date ?? DateTime.Now); + await _repository.CommanderApproveRetirementResign(id, req.Reason ?? "", null); return Success(); } @@ -2697,7 +2697,7 @@ namespace BMA.EHR.Retirement.Service.Controllers // { // return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); // } - await _repository.CommanderRejectRetirementResign(id, req.Reason ?? "", req.Date ?? DateTime.Now); + await _repository.CommanderRejectRetirementResign(id, req.Reason ?? "", req.Date); return Success(); } @@ -2731,7 +2731,7 @@ namespace BMA.EHR.Retirement.Service.Controllers // { // return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); // } - await _repository.ApproveRetirementResign(id, req.Reason ?? "", req.Date ?? DateTime.Now); + await _repository.ApproveRetirementResign(id, req.Reason ?? "", null); return Success(); } @@ -2765,7 +2765,7 @@ namespace BMA.EHR.Retirement.Service.Controllers // { // return Error(jsonData["message"]?.ToString(), StatusCodes.Status403Forbidden); // } - await _repository.RejectRetirementResign(id, req.Reason ?? "", req.Date ?? DateTime.Now); + await _repository.RejectRetirementResign(id, req.Reason ?? "", req.Date); return Success(); }