-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PSP-6031 ACQ file: Add Owner Representative (#3210)
* Initial backend model updates * Frontend model changes * Add owner representative to ACQ File forms * Update frontend tests * Test corrections * Backend model and mapping changes * Include owner representative in ACQ file details query * Update backend tests
- Loading branch information
Showing
26 changed files
with
1,082 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
source/backend/api/Models/Concepts/AcquisitionFile/AcquisitionFileOwnerRepresentativeMap.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using Mapster; | ||
using Entity = Pims.Dal.Entities; | ||
|
||
namespace Pims.Api.Models.Concepts | ||
{ | ||
public class AcquisitionFileOwnerRepresentativeMap : IRegister | ||
{ | ||
public void Register(TypeAdapterConfig config) | ||
{ | ||
config.NewConfig<Entity.PimsAcquisitionOwnerRep, AcquisitionFileOwnerRepresentativeModel>() | ||
.Map(dest => dest.Id, src => src.Internal_Id) | ||
.Map(dest => dest.AcquisitionFileId, src => src.AcquisitionFileId) | ||
.Map(dest => dest.IsDisabled, src => src.IsDisabled) | ||
.Map(dest => dest.Person, src => src.Person) | ||
.Map(dest => dest.PersonId, src => src.PersonId) | ||
.Map(dest => dest.Comment, src => src.Comment) | ||
.Inherits<Entity.IBaseEntity, BaseModel>(); | ||
|
||
config.NewConfig<AcquisitionFileOwnerRepresentativeModel, Entity.PimsAcquisitionOwnerRep>() | ||
.Map(dest => dest.Internal_Id, src => src.Id) | ||
.Map(dest => dest.IsDisabled, src => src.IsDisabled) | ||
.Map(dest => dest.PersonId, src => src.PersonId) | ||
.Map(dest => dest.AcquisitionFileId, src => src.AcquisitionFileId) | ||
.Map(dest => dest.Comment, src => src.Comment) | ||
.Inherits<BaseModel, Entity.IBaseEntity>(); | ||
} | ||
} | ||
} |
39 changes: 39 additions & 0 deletions
39
...ce/backend/api/Models/Concepts/AcquisitionFile/AcquisitionFileOwnerRepresentativeModel.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
namespace Pims.Api.Models.Concepts | ||
{ | ||
public class AcquisitionFileOwnerRepresentativeModel : BaseModel | ||
{ | ||
#region Properties | ||
|
||
/// <summary> | ||
/// get/set - The relationship id. | ||
/// </summary> | ||
public long? Id { get; set; } | ||
|
||
/// <summary> | ||
/// get/set - The Id of the person associated with an acquisition file as an owner representative. | ||
/// </summary> | ||
public long? PersonId { get; set; } | ||
|
||
/// <summary> | ||
/// get/set - The Id of the acquisition file related to this representative. | ||
/// </summary> | ||
public long? AcquisitionFileId { get; set; } | ||
|
||
/// <summary> | ||
/// get/set - The person associated with an acquisition file as an owner representative. | ||
/// </summary> | ||
public PersonModel Person { get; set; } | ||
|
||
/// <summary> | ||
/// get/set - Additional comment concerning this owner representative. | ||
/// </summary> | ||
public string Comment { get; set; } | ||
|
||
/// <summary> | ||
/// get/set - The relationship's disabled status flag. | ||
/// </summary> | ||
public bool? IsDisabled { get; set; } | ||
|
||
#endregion | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
source/backend/entities/Partials/AcquisitionFileOwnerRep.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using System.ComponentModel.DataAnnotations.Schema; | ||
|
||
namespace Pims.Dal.Entities | ||
{ | ||
/// <summary> | ||
/// PimsAcquisitionOwnerRep class, provides an entity for the datamodel to manage the relationship between Person (Owner Representative) and Acquisition Files. | ||
/// </summary> | ||
public partial class PimsAcquisitionOwnerRep : StandardIdentityBaseAppEntity<long>, IDisableBaseAppEntity | ||
{ | ||
#region Properties | ||
[NotMapped] | ||
public override long Internal_Id { get => this.OwnerRepresentativeId; set => this.OwnerRepresentativeId = value; } | ||
#endregion | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.