ปรับการเอาวันที่ใช้ไป และยอดวันลาพักผ่อนยกมา มาใช้งาน
Some checks failed
release-dev / release-dev (push) Failing after 11s

This commit is contained in:
Suphonchai Phoonsawat 2025-04-25 11:05:19 +07:00
parent a7b8c2786c
commit 04b17729e0
4 changed files with 56 additions and 19 deletions

View file

@ -61,5 +61,12 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests
.Where(x => x.LeaveYear == year)
.ToListAsync();
}
public async Task<LeaveBeginning?> GetByYearAndTypeIdAsync(int year, Guid typeId)
{
return await _dbContext.Set<LeaveBeginning>()
.Include(x => x.LeaveType)
.FirstOrDefaultAsync(x => x.LeaveYear == year && x.LeaveTypeId == typeId);
}
}
}