BMA EHR API Document

Loading...
Searching...
No Matches
Public Member Functions | Properties | List of all members
BMA.EHR.Application.Repositories.Leaves.LeaveRequests.LeaveRequestRepository Class Reference
Inheritance diagram for BMA.EHR.Application.Repositories.Leaves.LeaveRequests.LeaveRequestRepository:

## Public Member Functions
| LeaveRequestRepository (ILeaveDbContext dbContext, IHttpContextAccessor httpContextAccessor, OrganizationCommonRepository organizationCommonRepository, UserProfileRepository userProfileRepository, IConfiguration configuration, EmailSenderService emailSenderService, IApplicationDBContext appDbContext)
override async Task< LeaveRequest?> | GetByIdAsync (Guid id)
override async Task< LeaveRequest > | AddAsync (LeaveRequest entity)
override async Task< LeaveRequest > | UpdateAsync (LeaveRequest entity)
async Task< List< LeaveRequest > > | GetLeaveRequestByYearAsync (int year)
async Task< List< LeaveRequest > > | GetLeaveRequestByUserIdAsync (Guid keycloakUserId, int year, Guid type, string status)
async Task< List< LeaveRequest > > | GetLeaveRequestForAdminAsync (int year, Guid type, string status)
async Task< int > | GetRestDayTotalByYearForUserAsync (Guid keycloakUserId, int year)
async Task< int > | GetSumLeaveByTypeForUserAsync (Guid keycloakUserId, Guid leaveTypeId, int year)
async Task< DateTime?> | GetLeaveLastByTypeForUserAsync (Guid keycloakUserId, Guid leaveTypeId)
async Task< LeaveRequest?> | GetLastLeaveRequestByTypeForUserAsync (Guid keycloakUserId, Guid leaveTypeId)
async Task< List< LeaveRequest > > | GetCancelLeaveRequestForAdminAsync (int year, Guid type, string status)
async Task | ApproveCancelLeaveRequestAsync (Guid id, string Reason)
async Task | RejectCancelLeaveRequestAsync (Guid id, string Reason)
async Task | OfficerApproveLeaveRequest (Guid id)
async Task | CommanderApproveLeaveRequest (Guid id, string reason)
async Task | ApproveLeaveRequest (Guid id, string reason)
async Task | RejectLeaveRequest (Guid id, string reason)
async Task< int > | GetSumSendLeaveByTypeForUserAsync (Guid keycloakUserId, Guid leaveTypeId, int year)
async Task< int > | GetSumApproveLeaveByTypeForUserAsync (Guid keycloakUserId, Guid leaveTypeId, int year)
async Task< int > | GetSumApproveLeaveByTypeAndRangeForUser (Guid keycloakUserId, Guid leaveTypeId, DateTime startDate, DateTime endDate)
async Task< int > | GetCountApproveLeaveByTypeAndRangeForUser (Guid keycloakUserId, Guid leaveTypeId, DateTime startDate, DateTime endDate)
async Task< int > | GetSumRejectLeaveByTypeForUserAsync (Guid keycloakUserId, Guid leaveTypeId, int year)
async Task< int > | GetSumDeleteLeaveByTypeForUserAsync (Guid keycloakUserId, Guid leaveTypeId, int year)
Public Member Functions inherited from BMA.EHR.Application.Repositories.Leaves.GenericLeaveRepository< Guid, LeaveRequest >
| GenericLeaveRepository (ILeaveDbContext dbContext, IHttpContextAccessor httpContextAccessor)
virtual async Task< IReadOnlyList< T > > | GetAllAsync ()
virtual async Task< T?> | GetByIdAsync (S id)
virtual async Task< T > | AddAsync (T entity)
virtual async Task< T > | UpdateAsync (T entity)
virtual async Task | DeleteAsync (T entity)

## Properties
Guid | UserOrganizationId`[get]`
Properties inherited from BMA.EHR.Application.Repositories.Leaves.GenericLeaveRepository< Guid, LeaveRequest >
string? | UserId`[get]`
string? | FullName`[get]`
bool? | IsPlacementAdmin`[get]`

## Constructor & Destructor Documentation

## ◆ LeaveRequestRepository()

BMA.EHR.Application.Repositories.Leaves.LeaveRequests.LeaveRequestRepository.LeaveRequestRepository | ( | ILeaveDbContext | dbContext,
|  | IHttpContextAccessor | httpContextAccessor,
|  | OrganizationCommonRepository | organizationCommonRepository,
|  | UserProfileRepository | userProfileRepository,
|  | IConfiguration | configuration,
|  | EmailSenderService | emailSenderService,
|  | IApplicationDBContext | appDbContext
| ) |  |
| inline

## Member Function Documentation

## ◆ AddAsync()

override async Task< LeaveRequest > BMA.EHR.Application.Repositories.Leaves.LeaveRequests.LeaveRequestRepository.AddAsync | ( | LeaveRequest | entity | ) |
| inline

## ◆ ApproveCancelLeaveRequestAsync()

async Task BMA.EHR.Application.Repositories.Leaves.LeaveRequests.LeaveRequestRepository.ApproveCancelLeaveRequestAsync | ( | Guid | id,
|  | string | Reason
| ) |  |
| inline

## ◆ ApproveLeaveRequest()

async Task BMA.EHR.Application.Repositories.Leaves.LeaveRequests.LeaveRequestRepository.ApproveLeaveRequest | ( | Guid | id,
|  | string | reason
| ) |  |
| inline

## ◆ CommanderApproveLeaveRequest()

async Task BMA.EHR.Application.Repositories.Leaves.LeaveRequests.LeaveRequestRepository.CommanderApproveLeaveRequest | ( | Guid | id,
|  | string | reason
| ) |  |
| inline

## ◆ GetByIdAsync()

override async Task< LeaveRequest?> BMA.EHR.Application.Repositories.Leaves.LeaveRequests.LeaveRequestRepository.GetByIdAsync | ( | Guid | id | ) |
| inline

## ◆ GetCancelLeaveRequestForAdminAsync()

async Task< List< LeaveRequest > > BMA.EHR.Application.Repositories.Leaves.LeaveRequests.LeaveRequestRepository.GetCancelLeaveRequestForAdminAsync | ( | int | year,
|  | Guid | type,
|  | string | status
| ) |  |
| inline

## ◆ GetCountApproveLeaveByTypeAndRangeForUser()

async Task< int > BMA.EHR.Application.Repositories.Leaves.LeaveRequests.LeaveRequestRepository.GetCountApproveLeaveByTypeAndRangeForUser | ( | Guid | keycloakUserId,
|  | Guid | leaveTypeId,
|  | DateTime | startDate,
|  | DateTime | endDate
| ) |  |
| inline

## ◆ GetLastLeaveRequestByTypeForUserAsync()

async Task< LeaveRequest?> BMA.EHR.Application.Repositories.Leaves.LeaveRequests.LeaveRequestRepository.GetLastLeaveRequestByTypeForUserAsync | ( | Guid | keycloakUserId,
|  | Guid | leaveTypeId
| ) |  |
| inline

## ◆ GetLeaveLastByTypeForUserAsync()

async Task< DateTime?> BMA.EHR.Application.Repositories.Leaves.LeaveRequests.LeaveRequestRepository.GetLeaveLastByTypeForUserAsync | ( | Guid | keycloakUserId,
|  | Guid | leaveTypeId
| ) |  |
| inline

## ◆ GetLeaveRequestByUserIdAsync()

async Task< List< LeaveRequest > > BMA.EHR.Application.Repositories.Leaves.LeaveRequests.LeaveRequestRepository.GetLeaveRequestByUserIdAsync | ( | Guid | keycloakUserId,
|  | int | year,
|  | Guid | type,
|  | string | status
| ) |  |
| inline

## ◆ GetLeaveRequestByYearAsync()

async Task< List< LeaveRequest > > BMA.EHR.Application.Repositories.Leaves.LeaveRequests.LeaveRequestRepository.GetLeaveRequestByYearAsync | ( | int | year | ) |
| inline

## ◆ GetLeaveRequestForAdminAsync()

async Task< List< LeaveRequest > > BMA.EHR.Application.Repositories.Leaves.LeaveRequests.LeaveRequestRepository.GetLeaveRequestForAdminAsync | ( | int | year,
|  | Guid | type,
|  | string | status
| ) |  |
| inline

## ◆ GetRestDayTotalByYearForUserAsync()

async Task< int > BMA.EHR.Application.Repositories.Leaves.LeaveRequests.LeaveRequestRepository.GetRestDayTotalByYearForUserAsync | ( | Guid | keycloakUserId,
|  | int | year
| ) |  |
| inline

## ◆ GetSumApproveLeaveByTypeAndRangeForUser()

async Task< int > BMA.EHR.Application.Repositories.Leaves.LeaveRequests.LeaveRequestRepository.GetSumApproveLeaveByTypeAndRangeForUser | ( | Guid | keycloakUserId,
|  | Guid | leaveTypeId,
|  | DateTime | startDate,
|  | DateTime | endDate
| ) |  |
| inline

## ◆ GetSumApproveLeaveByTypeForUserAsync()

async Task< int > BMA.EHR.Application.Repositories.Leaves.LeaveRequests.LeaveRequestRepository.GetSumApproveLeaveByTypeForUserAsync | ( | Guid | keycloakUserId,
|  | Guid | leaveTypeId,
|  | int | year
| ) |  |
| inline

## ◆ GetSumDeleteLeaveByTypeForUserAsync()

async Task< int > BMA.EHR.Application.Repositories.Leaves.LeaveRequests.LeaveRequestRepository.GetSumDeleteLeaveByTypeForUserAsync | ( | Guid | keycloakUserId,
|  | Guid | leaveTypeId,
|  | int | year
| ) |  |
| inline

## ◆ GetSumLeaveByTypeForUserAsync()

async Task< int > BMA.EHR.Application.Repositories.Leaves.LeaveRequests.LeaveRequestRepository.GetSumLeaveByTypeForUserAsync | ( | Guid | keycloakUserId,
|  | Guid | leaveTypeId,
|  | int | year
| ) |  |
| inline

## ◆ GetSumRejectLeaveByTypeForUserAsync()

async Task< int > BMA.EHR.Application.Repositories.Leaves.LeaveRequests.LeaveRequestRepository.GetSumRejectLeaveByTypeForUserAsync | ( | Guid | keycloakUserId,
|  | Guid | leaveTypeId,
|  | int | year
| ) |  |
| inline

## ◆ GetSumSendLeaveByTypeForUserAsync()

async Task< int > BMA.EHR.Application.Repositories.Leaves.LeaveRequests.LeaveRequestRepository.GetSumSendLeaveByTypeForUserAsync | ( | Guid | keycloakUserId,
|  | Guid | leaveTypeId,
|  | int | year
| ) |  |
| inline

## ◆ OfficerApproveLeaveRequest()

async Task BMA.EHR.Application.Repositories.Leaves.LeaveRequests.LeaveRequestRepository.OfficerApproveLeaveRequest | ( | Guid | id | ) |
| inline

## ◆ RejectCancelLeaveRequestAsync()

async Task BMA.EHR.Application.Repositories.Leaves.LeaveRequests.LeaveRequestRepository.RejectCancelLeaveRequestAsync | ( | Guid | id,
|  | string | Reason
| ) |  |
| inline

## ◆ RejectLeaveRequest()

async Task BMA.EHR.Application.Repositories.Leaves.LeaveRequests.LeaveRequestRepository.RejectLeaveRequest | ( | Guid | id,
|  | string | reason
| ) |  |
| inline

## ◆ UpdateAsync()

override async Task< LeaveRequest > BMA.EHR.Application.Repositories.Leaves.LeaveRequests.LeaveRequestRepository.UpdateAsync | ( | LeaveRequest | entity | ) |
| inline

## Property Documentation

## ◆ UserOrganizationId

Guid BMA.EHR.Application.Repositories.Leaves.LeaveRequests.LeaveRequestRepository.UserOrganizationId
| get protected

The documentation for this class was generated from the following file:

- BMA.EHR.Application/Repositories/Leaves/LeaveRequests/LeaveRequestRepository.cs