fix: Change Profile Link to Guid
This commit is contained in:
parent
ee2a0f1e36
commit
b7120551b5
6 changed files with 1213 additions and 47 deletions
|
|
@ -312,7 +312,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests
|
|||
// insert to profile leave
|
||||
var profileLeave = await _appDbContext.Set<ProfileLeave>()
|
||||
.Where(x => x.TypeLeave.Id == leaveType.Id)
|
||||
.Where(x => x.Profile.Id == profile.Id)
|
||||
.Where(x => x.ProfileId == profile.Id)
|
||||
.Where(x => x.DateStartLeave == rawData.LeaveStartDate && x.DateEndLeave == rawData.LeaveEndDate)
|
||||
.FirstOrDefaultAsync();
|
||||
if (profileLeave != null)
|
||||
|
|
@ -430,7 +430,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests
|
|||
Status = "approve",
|
||||
Reason = rawData.LeaveDetail,
|
||||
|
||||
Profile = profile,
|
||||
ProfileId = profile.Id, // change from profile object to id
|
||||
TypeLeave = leaveType
|
||||
};
|
||||
_appDbContext.Set<ProfileLeave>().Add(profileLeave);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue