From c0c75e7dcb05ea2a47e11c99e4978d042a62b293 Mon Sep 17 00:00:00 2001 From: kittapath Date: Wed, 8 Oct 2025 23:31:15 +0700 Subject: [PATCH 1/2] build reload image --- .github/workflows/discord-notify.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/discord-notify.yml diff --git a/.github/workflows/discord-notify.yml b/.github/workflows/discord-notify.yml new file mode 100644 index 0000000..ce4ee51 --- /dev/null +++ b/.github/workflows/discord-notify.yml @@ -0,0 +1,22 @@ +name: Discord PR Notify + +on: + pull_request: + types: [opened] + +jobs: + discord: + runs-on: ubuntu-latest + steps: + - name: Send Discord + run: | + curl -X POST "${{ secrets.DISCORD_WEBHOOK_PULLREQUEST }}" \ + -H "Content-Type: application/json" \ + -d '{ + "embeds": [{ + "title": "šŸ”” **Service:** ${{ github.repository }}", + "description": "šŸ‘¤ **Author:** ${{ github.event.pull_request.user.login }}\n🌿 **Branch:** ${{ github.event.pull_request.head.ref }} → ${{ github.event.pull_request.base.ref }}\nšŸ“¦ **Pull Request:** [#${{ github.event.pull_request.number }} - ${{ github.event.pull_request.title }}](${{ github.event.pull_request.html_url }})", + "color": 5814783, + "timestamp": "${{ github.event.pull_request.created_at }}" + }] + }' From 3b46a1bcde1b8fd648e0f4446a3f1dabe82668f3 Mon Sep 17 00:00:00 2001 From: harid Date: Mon, 27 Oct 2025 11:24:40 +0700 Subject: [PATCH 2/2] fix download report error --- Controllers/ExamReportController.cs | 4 +++- Controllers/RecruitReportController.cs | 4 +++- Models/Exam/Disable/Disable.cs | 8 ++++---- Models/Recruits/Recruit.cs | 8 ++++---- 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/Controllers/ExamReportController.cs b/Controllers/ExamReportController.cs index f0c0284..a4c64d9 100644 --- a/Controllers/ExamReportController.cs +++ b/Controllers/ExamReportController.cs @@ -230,7 +230,9 @@ namespace BMA.EHR.Report.Service.Controllers CitizenId = p.CitizenId == null ? "-" : (p.CitizenId), p.Prefix, FullName = $"{p.Prefix}{p.FirstName} {p.LastName}", - DateOfBirth = (p.DateOfBirth.ToThaiShortDate()), + DateOfBirth = p.DateOfBirth.HasValue && p.DateOfBirth.Value != DateTime.MinValue + ? p.DateOfBirth.Value.ToThaiShortDate() + : "", Gender = p.Gendor, Degree = p.Educations.First().Degree, Major = p.Educations.First().Major, diff --git a/Controllers/RecruitReportController.cs b/Controllers/RecruitReportController.cs index 2396552..f611142 100644 --- a/Controllers/RecruitReportController.cs +++ b/Controllers/RecruitReportController.cs @@ -192,7 +192,9 @@ namespace BMA.EHR.Report.Service.Controllers CitizenId = p.CitizenId, p.Prefix, FullName = $"{p.Prefix}{p.FirstName} {p.LastName}", - DateOfBirth = p.DateOfBirth.ToThaiShortDate(), + DateOfBirth = p.DateOfBirth.HasValue && p.DateOfBirth.Value != DateTime.MinValue + ? p.DateOfBirth.Value.ToThaiShortDate() + : "", Gender = p.Gendor, Degree = p.Educations.First().Degree, Major = p.Educations.First().Major, diff --git a/Models/Exam/Disable/Disable.cs b/Models/Exam/Disable/Disable.cs index b7c1ab9..214ba53 100644 --- a/Models/Exam/Disable/Disable.cs +++ b/Models/Exam/Disable/Disable.cs @@ -35,7 +35,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Models.Disables public string Religion { get; set; } = string.Empty; [Required] - public DateTime DateOfBirth { get; set; } + public DateTime? DateOfBirth { get; set; } [MaxLength(20)] public string Marry { get; set; } = string.Empty; @@ -49,7 +49,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Models.Disables [MaxLength(200)] public string CitizenCardIssuer { get; set; } = string.Empty; - public DateTime CitizenCardExpireDate { get; set; } + public DateTime? CitizenCardExpireDate { get; set; } [MaxLength(200)] public string Remark { get; set; } = string.Empty; @@ -73,9 +73,9 @@ namespace BMA.EHR.Recurit.Exam.Service.Models.Disables public DateTime CreatedDate { get; set; } = DateTime.Now; - public DateTime ModifiedDate { get; set; } + public DateTime? ModifiedDate { get; set; } - public DateTime ApplyDate { get; set; } + public DateTime? ApplyDate { get; set; } public string? PositionName { get; set; } public string? PositionType { get; set; } diff --git a/Models/Recruits/Recruit.cs b/Models/Recruits/Recruit.cs index 8b94c4b..306f8cc 100644 --- a/Models/Recruits/Recruit.cs +++ b/Models/Recruits/Recruit.cs @@ -35,7 +35,7 @@ namespace BMA.EHR.Recruit.Service.Models.Recruits public string Religion { get; set; } = string.Empty; [Required] - public DateTime DateOfBirth { get; set; } + public DateTime? DateOfBirth { get; set; } [MaxLength(20)] public string Marry { get; set; } = string.Empty; @@ -49,7 +49,7 @@ namespace BMA.EHR.Recruit.Service.Models.Recruits [MaxLength(200)] public string CitizenCardIssuer { get; set; } = string.Empty; - public DateTime CitizenCardExpireDate { get; set; } + public DateTime? CitizenCardExpireDate { get; set; } [MaxLength(200)] public string Remark { get; set; } = string.Empty; @@ -73,9 +73,9 @@ namespace BMA.EHR.Recruit.Service.Models.Recruits public DateTime CreatedDate { get; set; } = DateTime.Now; - public DateTime ModifiedDate { get; set; } + public DateTime? ModifiedDate { get; set; } - public DateTime ApplyDate { get; set; } + public DateTime? ApplyDate { get; set; } public string? PositionName { get; set; } public string? PositionType { get; set; }