Skip to content

Commit

Permalink
Merge pull request #2462 from bcgov/release/is40_master
Browse files Browse the repository at this point in the history
  • Loading branch information
asanchezr authored Nov 24, 2022
2 parents c95559c + 55fd7e0 commit 6ee6735
Show file tree
Hide file tree
Showing 444 changed files with 150,311 additions and 87,843 deletions.
13,534 changes: 0 additions & 13,534 deletions etl/PAIMS_PIMS/PAIMS_PIMS/LIS_DB_to_PIMS_DATASET_1.dtsx

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@
<SSIS:Property SSIS:Name="Name">Package2</SSIS:Property>
<SSIS:Property SSIS:Name="VersionMajor">1</SSIS:Property>
<SSIS:Property SSIS:Name="VersionMinor">0</SSIS:Property>
<SSIS:Property SSIS:Name="VersionBuild">1050</SSIS:Property>
<SSIS:Property SSIS:Name="VersionBuild">1181</SSIS:Property>
<SSIS:Property SSIS:Name="VersionComments">
</SSIS:Property>
<SSIS:Property SSIS:Name="VersionGUID">{C4C1A9A7-8ABF-4DE3-B43A-48697E85FE1D}</SSIS:Property>
<SSIS:Property SSIS:Name="VersionGUID">{84A2C448-EE96-409D-B335-22144B0E7406}</SSIS:Property>
<SSIS:Property SSIS:Name="PackageFormatVersion">8</SSIS:Property>
<SSIS:Property SSIS:Name="Description">
</SSIS:Property>
Expand Down
153,290 changes: 90,360 additions & 62,930 deletions etl/PAIMS_PIMS/PAIMS_PIMS/PAM_LOAD_PAIMS_TO_PIMS_DATASET_2.dtsx

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using Pims.Api.Models;
using Pims.Api.Models.Concepts;
using Pims.Api.Policies;
using Pims.Dal;
using Pims.Dal.Repositories;
using Pims.Dal.Security;
using Swashbuckle.AspNetCore.Annotations;
using EModel = Pims.Dal.Entities.Models;
Expand All @@ -23,7 +23,7 @@ namespace Pims.Api.Areas.Admin.Controllers
public class AccessRequestController : Controller
{
#region Properties
private readonly IPimsRepository _pimsService;
private readonly IAccessRequestRepository _accessRequestRepository;
private readonly IMapper _mapper;
#endregion

Expand All @@ -32,11 +32,11 @@ public class AccessRequestController : Controller
/// <summary>
/// Creates a new instance of an AccessRequestController object, initializes with specified parameters.
/// </summary>
/// <param name="pimsService"></param>
/// <param name="accessRequestRepository"></param>
/// <param name="mapper"></param>
public AccessRequestController(IPimsRepository pimsService, IMapper mapper)
public AccessRequestController(IAccessRequestRepository accessRequestRepository, IMapper mapper)
{
_pimsService = pimsService;
_accessRequestRepository = accessRequestRepository;
_mapper = mapper;
}
#endregion
Expand Down Expand Up @@ -76,7 +76,7 @@ public IActionResult GetPage(int page = 1, int quantity = 10, string searchText
var filter = new EModel.AccessRequestFilter(page, quantity, searchText, new[] { sort });
filter.StatusType = new Entity.PimsAccessRequestStatusType() { Id = "Received" };

var result = _pimsService.AccessRequest.Get(filter);
var result = _accessRequestRepository.Get(filter);
var models = _mapper.Map<AccessRequestModel[]>(result.Items);
var paged = new PageModel<AccessRequestModel>(models, page, quantity, result.Total);
return new JsonResult(paged);
Expand All @@ -95,7 +95,7 @@ public IActionResult GetPage(int page = 1, int quantity = 10, string searchText
[SwaggerOperation(Tags = new[] { "user" })]
public IActionResult GetAccessRequest(long id)
{
var accessRequest = _pimsService.AccessRequest.Get(id);
var accessRequest = _accessRequestRepository.Get(id);
return new JsonResult(_mapper.Map<AccessRequestModel>(accessRequest));
}

Expand All @@ -113,7 +113,7 @@ public IActionResult GetAccessRequest(long id)
public IActionResult Delete(long id, [FromBody] AccessRequestModel model)
{
var entity = _mapper.Map<Entity.PimsAccessRequest>(model);
_pimsService.AccessRequest.Delete(entity);
_accessRequestRepository.Delete(entity);
return new JsonResult(model);
}
#endregion
Expand Down
20 changes: 10 additions & 10 deletions source/backend/api/Areas/Admin/Controllers/ClaimController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
using MapsterMapper;
using Microsoft.AspNetCore.Mvc;
using Pims.Api.Policies;
using Pims.Dal;
using Pims.Dal.Entities;
using Pims.Dal.Repositories;
using Pims.Dal.Security;
using Swashbuckle.AspNetCore.Annotations;
using Entity = Pims.Dal.Entities;
Expand All @@ -23,7 +23,7 @@ namespace Pims.Api.Areas.Admin.Controllers
public class ClaimController : ControllerBase
{
#region Variables
private readonly IPimsRepository _pimsService;
private readonly IClaimRepository _claimRepository;
private readonly IMapper _mapper;
#endregion

Expand All @@ -32,11 +32,11 @@ public class ClaimController : ControllerBase
/// <summary>
/// Creates a new instance of a ClaimController class, initializes it with the specified arguments.
/// </summary>
/// <param name="pimsService"></param>
/// <param name="claimRepository"></param>
/// <param name="mapper"></param>
public ClaimController(IPimsRepository pimsService, IMapper mapper)
public ClaimController(IClaimRepository claimRepository, IMapper mapper)
{
_pimsService = pimsService;
_claimRepository = claimRepository;
_mapper = mapper;
}
#endregion
Expand Down Expand Up @@ -72,7 +72,7 @@ public IActionResult GetClaims(int page = 1, int quantity = 10, string name = nu
quantity = 50;
}

var paged = _pimsService.Claim.Get(page, quantity, name);
var paged = _claimRepository.Get(page, quantity, name);
var result = _mapper.Map<Api.Models.PageModel<Model.ClaimModel>>(paged);
return new JsonResult(result);
}
Expand All @@ -89,7 +89,7 @@ public IActionResult GetClaims(int page = 1, int quantity = 10, string name = nu
[SwaggerOperation(Tags = new[] { "admin-claim" })]
public IActionResult GetClaim(Guid key)
{
var entity = _pimsService.Claim.Get(key);
var entity = _claimRepository.Get(key);
var claim = _mapper.Map<Model.ClaimModel>(entity);
return new JsonResult(claim);
}
Expand All @@ -107,7 +107,7 @@ public IActionResult GetClaim(Guid key)
public IActionResult AddClaim([FromBody] Model.ClaimModel model)
{
var entity = _mapper.Map<Entity.PimsClaim>(model); // TODO: Return bad request.
_pimsService.Claim.Add(entity);
_claimRepository.Add(entity);
var claim = _mapper.Map<Model.ClaimModel>(entity);

return CreatedAtAction(nameof(GetClaim), new { id = claim.Id }, claim);
Expand All @@ -128,7 +128,7 @@ public IActionResult AddClaim([FromBody] Model.ClaimModel model)
public IActionResult UpdateClaim(Guid key, [FromBody] Model.ClaimModel model)
{
var entity = _mapper.Map<PimsClaim>(model);
_pimsService.Claim.Update(entity);
_claimRepository.Update(entity);

var claim = _mapper.Map<Model.ClaimModel>(entity);
return new JsonResult(claim);
Expand All @@ -149,7 +149,7 @@ public IActionResult UpdateClaim(Guid key, [FromBody] Model.ClaimModel model)
public IActionResult DeleteClaim(Guid key, [FromBody] Model.ClaimModel model)
{
var entity = _mapper.Map<PimsClaim>(model);
_pimsService.Claim.Delete(entity);
_claimRepository.Delete(entity);

return new JsonResult(model);
}
Expand Down
20 changes: 10 additions & 10 deletions source/backend/api/Areas/Admin/Controllers/RoleController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
using MapsterMapper;
using Microsoft.AspNetCore.Mvc;
using Pims.Api.Policies;
using Pims.Dal;
using Pims.Dal.Entities;
using Pims.Dal.Repositories;
using Pims.Dal.Security;
using Swashbuckle.AspNetCore.Annotations;
using Entity = Pims.Dal.Entities;
Expand All @@ -23,7 +23,7 @@ namespace Pims.Api.Areas.Admin.Controllers
public class RoleController : ControllerBase
{
#region Variables
private readonly IPimsRepository _pimsService;
private readonly IRoleRepository _roleRepository;
private readonly IMapper _mapper;
#endregion

Expand All @@ -32,11 +32,11 @@ public class RoleController : ControllerBase
/// <summary>
/// Creates a new instance of a RoleController class, initializes it with the specified arguments.
/// </summary>
/// <param name="pimsService"></param>
/// <param name="roleRepository"></param>
/// <param name="mapper"></param>
public RoleController(IPimsRepository pimsService, IMapper mapper)
public RoleController(IRoleRepository roleRepository, IMapper mapper)
{
_pimsService = pimsService;
_roleRepository = roleRepository;
_mapper = mapper;
}
#endregion
Expand Down Expand Up @@ -72,7 +72,7 @@ public IActionResult GetRoles(int page = 1, int quantity = 10, string name = nul
quantity = 50;
}

var paged = _pimsService.Role.Get(page, quantity, name);
var paged = _roleRepository.Get(page, quantity, name);
var result = _mapper.Map<Api.Models.PageModel<Model.RoleModel>>(paged);
return new JsonResult(result);
}
Expand All @@ -89,7 +89,7 @@ public IActionResult GetRoles(int page = 1, int quantity = 10, string name = nul
[SwaggerOperation(Tags = new[] { "admin-role" })]
public IActionResult GetRole(Guid key)
{
var entity = _pimsService.Role.Get(key);
var entity = _roleRepository.Get(key);
var role = _mapper.Map<Model.RoleModel>(entity);
return new JsonResult(role);
}
Expand All @@ -107,7 +107,7 @@ public IActionResult GetRole(Guid key)
public IActionResult AddRole([FromBody] Model.RoleModel model)
{
var entity = _mapper.Map<Entity.PimsRole>(model); // TODO: PSP-4417 Return bad request.
_pimsService.Role.Add(entity);
_roleRepository.Add(entity);
var role = _mapper.Map<Model.RoleModel>(entity);

return CreatedAtAction(nameof(GetRole), new { id = role.Id }, role);
Expand All @@ -128,7 +128,7 @@ public IActionResult AddRole([FromBody] Model.RoleModel model)
public IActionResult UpdateRole(Guid key, [FromBody] Model.RoleModel model)
{
var entity = _mapper.Map<PimsRole>(model);
_pimsService.Role.Update(entity);
_roleRepository.Update(entity);

var role = _mapper.Map<Model.RoleModel>(entity);
return new JsonResult(role);
Expand All @@ -149,7 +149,7 @@ public IActionResult UpdateRole(Guid key, [FromBody] Model.RoleModel model)
public IActionResult DeleteRole(Guid key, [FromBody] Model.RoleModel model)
{
var entity = _mapper.Map<PimsRole>(model);
_pimsService.Role.Delete(entity);
_roleRepository.Delete(entity);

return new JsonResult(model);
}
Expand Down
22 changes: 11 additions & 11 deletions source/backend/api/Areas/Admin/Controllers/UserController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using Microsoft.AspNetCore.Http.Extensions;
using Microsoft.AspNetCore.Mvc;
using Pims.Api.Policies;
using Pims.Dal;
using Pims.Dal.Repositories;
using Pims.Dal.Security;
using Swashbuckle.AspNetCore.Annotations;
using EModel = Pims.Dal.Entities.Models;
Expand All @@ -24,7 +24,7 @@ namespace Pims.Api.Areas.Admin.Controllers
public class UserController : ControllerBase
{
#region Variables
private readonly IPimsRepository _pimsService;
private readonly IUserRepository _userRepository;
private readonly IMapper _mapper;
#endregion

Expand All @@ -33,11 +33,11 @@ public class UserController : ControllerBase
/// <summary>
/// Creates a new instance of a UserController class.
/// </summary>
/// <param name="pimsService"></param>
/// <param name="userRepository"></param>
/// <param name="mapper"></param>
public UserController(IPimsRepository pimsService, IMapper mapper)
public UserController(IUserRepository userRepository, IMapper mapper)
{
_pimsService = pimsService;
_userRepository = userRepository;
_mapper = mapper;
}
#endregion
Expand Down Expand Up @@ -72,7 +72,7 @@ public IActionResult GetUsers()
[SwaggerOperation(Tags = new[] { "admin-user" })]
public IActionResult GetUsers(EModel.UserFilter filter)
{
var page = _pimsService.User.Get(filter);
var page = _userRepository.Get(filter);
var result = _mapper.Map<Api.Models.PageModel<Model.UserModel>>(page);
return new JsonResult(result);
}
Expand All @@ -89,7 +89,7 @@ public IActionResult GetUsers(EModel.UserFilter filter)
[SwaggerOperation(Tags = new[] { "admin-user" })]
public IActionResult GetUser(long id)
{
var entity = _pimsService.User.Get(id);
var entity = _userRepository.Get(id);
var user = _mapper.Map<Model.UserModel>(entity);
return new JsonResult(user);
}
Expand All @@ -106,7 +106,7 @@ public IActionResult GetUser(long id)
[SwaggerOperation(Tags = new[] { "admin-user" })]
public IActionResult GetUser(Guid key)
{
var entity = _pimsService.User.Get(key);
var entity = _userRepository.Get(key);
var user = _mapper.Map<Model.UserModel>(entity);
return new JsonResult(user);
}
Expand All @@ -124,7 +124,7 @@ public IActionResult GetUser(Guid key)
public IActionResult AddUser([FromBody] Model.UserModel model)
{
var entity = _mapper.Map<Entity.PimsUser>(model);
_pimsService.User.Add(entity);
_userRepository.Add(entity);

var user = _mapper.Map<Model.UserModel>(entity);

Expand All @@ -146,7 +146,7 @@ public IActionResult AddUser([FromBody] Model.UserModel model)
public IActionResult UpdateUser(Guid key, [FromBody] Model.UserModel model)
{
var entity = _mapper.Map<Entity.PimsUser>(model);
_pimsService.User.Update(entity);
_userRepository.Update(entity);

var user = _mapper.Map<Model.UserModel>(entity);
return new JsonResult(user);
Expand All @@ -167,7 +167,7 @@ public IActionResult UpdateUser(Guid key, [FromBody] Model.UserModel model)
public IActionResult DeleteUser(Guid key, [FromBody] Model.UserModel model)
{
var entity = _mapper.Map<Entity.PimsUser>(model);
_pimsService.User.Delete(entity);
_userRepository.Delete(entity);

return new JsonResult(model);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
using Pims.Api.Helpers.Exceptions;
using Pims.Api.Helpers.Extensions;
using Pims.Api.Policies;
using Pims.Dal;
using Pims.Dal.Entities.Models;
using Pims.Dal.Repositories;
using Pims.Dal.Security;
using Swashbuckle.AspNetCore.Annotations;

Expand All @@ -26,7 +26,7 @@ namespace Pims.Api.Areas.Autocomplete.Controllers
public class AutocompleteController : ControllerBase
{
#region Variables
private readonly IPimsRepository _pimsService;
private readonly IAutocompleteRepository _autocompleteRepository;
private readonly IMapper _mapper;
#endregion

Expand All @@ -35,12 +35,12 @@ public class AutocompleteController : ControllerBase
/// <summary>
/// Creates a new instance of a AutocompleteController class, initializes it with the specified arguments.
/// </summary>
/// <param name="pimsService"></param>
/// <param name="autocompleteRepository"></param>
/// <param name="mapper"></param>
///
public AutocompleteController(IPimsRepository pimsService, IMapper mapper)
public AutocompleteController(IAutocompleteRepository autocompleteRepository, IMapper mapper)
{
_pimsService = pimsService;
_autocompleteRepository = autocompleteRepository;
_mapper = mapper;
}
#endregion
Expand Down Expand Up @@ -83,7 +83,7 @@ public IActionResult GetOrganizationPredictions([FromBody] AutocompletionRequest
throw new BadRequestException("Autocomplete request must contain valid values.");
}

var predictions = _pimsService.Autocomplete.GetOrganizationPredictions(filter);
var predictions = _autocompleteRepository.GetOrganizationPredictions(filter);

return new JsonResult(_mapper.Map<Models.AutocompleteResponseModel>(predictions));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace Pims.Api.Areas.Autocomplete.Models
{
/// <summary>
/// Represents an Autocomplete response returned by the call to AutocompleteService.
/// Represents an Autocomplete response returned by the call to AutocompleteRepository.
/// </summary>
public class AutocompleteResponseModel
{
Expand Down
Loading

0 comments on commit 6ee6735

Please sign in to comment.