123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- using Microsoft.AspNetCore.Authorization;
- using Microsoft.AspNetCore.Http;
- using Microsoft.AspNetCore.Mvc;
- using MTWorkHR.Application.Filters;
- using MTWorkHR.Application.Identity;
- using MTWorkHR.Application.Models;
- using MTWorkHR.Application.Services.Interfaces;
- using MTWorkHR.Identity.Services;
- namespace MTWorkHR.API.Controllers
- {
- [Route("api/[controller]")]
- [ApiController]
- // [AppAuthorize]
- public class LookupController : ControllerBase
- {
- private readonly ILookupService _LookupService;
- public LookupController(ILookupService UserLookupService)
- {
- this._LookupService = UserLookupService;
- }
- [HttpGet("GetAllLeaveType")]
- [ProducesResponseType(StatusCodes.Status200OK)]
- public async Task<ActionResult<List<LeaveTypeDto>>> GetAllLeaveType()
- {
- return await _LookupService.GetAllLeaveType();
- }
- [HttpGet("GetAllOrderType")]
- [ProducesResponseType(StatusCodes.Status200OK)]
- public async Task<ActionResult<List<OrderTypeDto>>> GetAllOrderType()
- {
- return await _LookupService.GetAllOrderType();
- }
- [HttpGet("GetAllCountries")]
- [ProducesResponseType(StatusCodes.Status200OK)]
- public async Task<ActionResult<List<CountryDto>>> GetAllCountries()
- {
- return await _LookupService.GetAllCountries();
- }
- [HttpGet("GetCityByCountry")]
- [ProducesResponseType(StatusCodes.Status200OK)]
- public async Task<ActionResult<List<CityDto>>> GetCityByCountry(long CountryId)
- {
- return await _LookupService.GetCityByCountry(CountryId);
- }
- [HttpGet("GetAllIndustries")]
- [ProducesResponseType(StatusCodes.Status200OK)]
- public async Task<ActionResult<List<IndustryDto>>> GetAllIndustries()
- {
- return await _LookupService.GetAllIndustries();
- }
- [HttpGet("GetAllJobTitles")]
- [ProducesResponseType(StatusCodes.Status200OK)]
- public async Task<ActionResult<List<JobTitleDto>>> GetAllJobTitles()
- {
- return await _LookupService.GetAllJobTitles();
- }
- [HttpGet("GetAllUniversities")]
- [ProducesResponseType(StatusCodes.Status200OK)]
- public async Task<ActionResult<List<UniversityDto>>> GetAllUniversities()
- {
- return await _LookupService.GetAllUniversities();
- }
- [HttpGet("GetAllQualifications")]
- [ProducesResponseType(StatusCodes.Status200OK)]
- public async Task<ActionResult<List<QualificationDto>>> GetAllQualifications()
- {
- return await _LookupService.GetAllQualifications();
- }
- [HttpGet("GetAllUserTaskStatus")]
- [ProducesResponseType(StatusCodes.Status200OK)]
- public async Task<ActionResult<List<UserTaskStatusDto>>> GetAllUserTaskStatus()
- {
- return await _LookupService.GetAllUserTaskStatus();
- }
- //[HttpGet("CreateCountries")]
- //[ProducesResponseType(StatusCodes.Status200OK)]
- //public async Task<ActionResult<List<CountryDto>>> CreateCountries()
- //{
- // return await _LookupService.CreateCountries();
- //}
- }
- }
|