issue #1580
All checks were successful
Build & Deploy Leave Service / build (push) Successful in 1m45s
All checks were successful
Build & Deploy Leave Service / build (push) Successful in 1m45s
This commit is contained in:
parent
f02413f2b2
commit
80fcda61cf
7 changed files with 1884 additions and 2 deletions
|
|
@ -38,5 +38,10 @@ namespace BMA.EHR.Domain.Models.Leave.Requests
|
|||
public string Comment { get; set; } = string.Empty;
|
||||
|
||||
public string? ApproveType { get; set; } = string.Empty; // ผู้บังคับบัญชา = commander, ผู้มีอำนาจอนุมัติ = Approver
|
||||
|
||||
|
||||
public bool IsAct { get; set; } = false;
|
||||
|
||||
public string KeyId { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
1812
BMA.EHR.Infrastructure/Migrations/LeaveDb/20260511075931_Add Approver Field.Designer.cs
generated
Normal file
1812
BMA.EHR.Infrastructure/Migrations/LeaveDb/20260511075931_Add Approver Field.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,40 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace BMA.EHR.Infrastructure.Migrations.LeaveDb
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddApproverField : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "IsAct",
|
||||
table: "LeaveRequestApprovers",
|
||||
type: "tinyint(1)",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "KeyId",
|
||||
table: "LeaveRequestApprovers",
|
||||
type: "longtext",
|
||||
nullable: false)
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "IsAct",
|
||||
table: "LeaveRequestApprovers");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "KeyId",
|
||||
table: "LeaveRequestApprovers");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -713,6 +713,13 @@ namespace BMA.EHR.Infrastructure.Migrations.LeaveDb
|
|||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<bool>("IsAct")
|
||||
.HasColumnType("tinyint(1)");
|
||||
|
||||
b.Property<string>("KeyId")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
||||
b.Property<Guid>("KeycloakId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
|
|
|
|||
|
|
@ -175,6 +175,9 @@ namespace BMA.EHR.Leave.Service.Controllers
|
|||
LastUpdateFullName = FullName ?? "",
|
||||
LastUpdateUserId = UserId!,
|
||||
LastUpdatedAt = DateTime.Now,
|
||||
|
||||
IsAct = r.isAct,
|
||||
KeyId = r.keyId
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -2988,7 +2991,10 @@ namespace BMA.EHR.Leave.Service.Controllers
|
|||
ApproveStatus = x.ApproveStatus,
|
||||
Comment = x.Comment,
|
||||
ProfileId = x.ProfileId,
|
||||
KeycloakId = x.KeycloakId
|
||||
KeycloakId = x.KeycloakId,
|
||||
isAct = x.IsAct,
|
||||
keyId = x.KeyId
|
||||
|
||||
}).ToList();
|
||||
|
||||
var approvers = rawData.Approvers.Where(x => x.ApproveType.ToUpper() == "APPROVER")
|
||||
|
|
@ -3003,7 +3009,10 @@ namespace BMA.EHR.Leave.Service.Controllers
|
|||
ApproveStatus = x.ApproveStatus,
|
||||
Comment = x.Comment,
|
||||
ProfileId = x.ProfileId,
|
||||
KeycloakId = x.KeycloakId
|
||||
KeycloakId = x.KeycloakId,
|
||||
|
||||
isAct = x.IsAct,
|
||||
keyId = x.KeyId
|
||||
}).ToList();
|
||||
|
||||
result.Approvers.AddRange(approvers);
|
||||
|
|
|
|||
|
|
@ -174,5 +174,8 @@ namespace BMA.EHR.Leave.Service.DTOs.LeaveRequest
|
|||
public string ApproveStatus { get; set; } = string.Empty;
|
||||
|
||||
public string Comment { get; set; } = string.Empty;
|
||||
|
||||
public bool isAct { get; set; } = false;
|
||||
public string keyId { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,5 +37,11 @@ namespace BMA.EHR.Leave.Service.DTOs.LeaveRequest
|
|||
[JsonProperty("organizationName")]
|
||||
public string OrganizationName { get; set; } = string.Empty;
|
||||
|
||||
[JsonProperty("isAct")]
|
||||
public bool isAct { get; set; } = false;
|
||||
|
||||
[JsonProperty("keyId")]
|
||||
public string keyId { get; set; } = string.Empty;
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue