From 90ea98683181036707f48e797a8121f70a427784 Mon Sep 17 00:00:00 2001 From: harid Date: Mon, 12 Jan 2026 17:23:08 +0700 Subject: [PATCH] =?UTF-8?q?fix=20=E0=B8=A3=E0=B8=B2=E0=B8=A2=E0=B8=87?= =?UTF-8?q?=E0=B8=B2=E0=B8=99=E0=B9=83=E0=B8=9A=E0=B8=A5=E0=B8=B2=20?= =?UTF-8?q?=E0=B8=82=E0=B9=89=E0=B8=AD=E0=B8=A1=E0=B8=B9=E0=B8=A5=E0=B9=81?= =?UTF-8?q?=E0=B8=AA=E0=B8=94=E0=B8=87=E0=B9=83=E0=B8=99=E0=B8=A3=E0=B8=B2?= =?UTF-8?q?=E0=B8=A2=E0=B8=87=E0=B8=B2=E0=B8=99=E0=B9=81=E0=B8=AA=E0=B8=94?= =?UTF-8?q?=E0=B8=87=E0=B9=84=E0=B8=A1=E0=B9=88=E0=B8=84=E0=B8=A3=E0=B8=9A?= =?UTF-8?q?=20#2184?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BMA.EHR.Leave/Controllers/LeaveReportController.cs | 7 +++---- BMA.EHR.Leave/Controllers/LeaveRequestController.cs | 8 ++++---- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/BMA.EHR.Leave/Controllers/LeaveReportController.cs b/BMA.EHR.Leave/Controllers/LeaveReportController.cs index 55cb2378..e839af77 100644 --- a/BMA.EHR.Leave/Controllers/LeaveReportController.cs +++ b/BMA.EHR.Leave/Controllers/LeaveReportController.cs @@ -2618,10 +2618,9 @@ namespace BMA.EHR.Leave.Service.Controllers updatedAt = x.LastUpdatedAt.HasValue ? x.LastUpdatedAt.Value.Date.ToThaiShortDate().ToThaiNumber() : "...... /...... /......", - comment = (x.Comment ?? "") - .Replace("\r", "") - .Replace("\n", "") - .Trim(), + comment = !string.IsNullOrEmpty(x.Comment) + ? x.Comment.Replace("\r", "").Replace("\n", "").Trim() + : "......................", approveType = (x.ApproveType ?? "").Trim().ToUpper() }) .ToList(); diff --git a/BMA.EHR.Leave/Controllers/LeaveRequestController.cs b/BMA.EHR.Leave/Controllers/LeaveRequestController.cs index 9233b374..cf17535f 100644 --- a/BMA.EHR.Leave/Controllers/LeaveRequestController.cs +++ b/BMA.EHR.Leave/Controllers/LeaveRequestController.cs @@ -2027,10 +2027,10 @@ namespace BMA.EHR.Leave.Service.Controllers { new LeaveRequestApprover { - Prefix = profile.Prefix, - FirstName = profile.FirstName, - LastName = profile.LastName, - PositionName = profile.Position, + Prefix = profile.Prefix ?? "", + FirstName = profile.FirstName ?? "", + LastName = profile.LastName ?? "", + PositionName = $"{profile.Position ?? ""}{profile.PositionLeaveName ?? ""}", ProfileId = profile.Id, KeycloakId = Guid.Parse(UserId!), ApproveType = "SENDER",