Add List all Leave Type Controller

This commit is contained in:
Suphonchai Phoonsawat 2023-11-28 13:15:36 +07:00
parent 8037ad7e1e
commit 130cbb8042
5 changed files with 125 additions and 8 deletions

View file

@ -2,12 +2,7 @@
using BMA.EHR.Domain.Models.Base;
using Microsoft.AspNetCore.Http;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Claims;
using System.Text;
using System.Threading.Tasks;
namespace BMA.EHR.Application.Repositories.Leaves
{
@ -60,8 +55,8 @@ namespace BMA.EHR.Application.Repositories.Leaves
{
if (entity is EntityBase)
{
(entity as EntityBase).CreatedUserId = UserId!;
(entity as EntityBase).CreatedFullName = FullName!;
(entity as EntityBase).CreatedUserId = UserId ?? "";
(entity as EntityBase).CreatedFullName = FullName ?? "System Administrator";
(entity as EntityBase).CreatedAt = DateTime.Now;
}