แก้ไขการสร้างใบลา ไม่อัพเดตข้อมูลเอกสารแนบ
This commit is contained in:
parent
3d7313ede7
commit
bd1a77c1a2
2 changed files with 17 additions and 2 deletions
|
|
@ -77,6 +77,23 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests
|
|||
return data;
|
||||
}
|
||||
|
||||
public override async Task<LeaveRequest> AddAsync(LeaveRequest entity)
|
||||
{
|
||||
if (entity.LeaveCancelDocument != null)
|
||||
_dbContext.Attatch(entity.LeaveCancelDocument);
|
||||
|
||||
if (entity.LeaveDraftDocument != null)
|
||||
_dbContext.Attatch(entity.LeaveDraftDocument);
|
||||
|
||||
if (entity.LeaveDocument != null)
|
||||
_dbContext.Attatch(entity.LeaveDocument);
|
||||
|
||||
if (entity.Type != null)
|
||||
_dbContext.Attatch(entity.Type);
|
||||
|
||||
return await base.AddAsync(entity);
|
||||
}
|
||||
|
||||
public override async Task<LeaveRequest> UpdateAsync(LeaveRequest entity)
|
||||
{
|
||||
if (entity.LeaveCancelDocument != null)
|
||||
|
|
|
|||
|
|
@ -9,8 +9,6 @@ using BMA.EHR.Infrastructure.Persistence;
|
|||
using BMA.EHR.Leave.Service.DTOs.LeaveRequest;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.Routing;
|
||||
using Sentry;
|
||||
using Swashbuckle.AspNetCore.Annotations;
|
||||
using System.Security.Claims;
|
||||
using BMA.EHR.Application.Repositories.Commands;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue