Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PSP-8022 : Disposition file states - Hold #3979

Merged
merged 7 commits into from
May 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 0 additions & 25 deletions source/backend/api/Constants/EnumDispositionFileStatusTypeCode.cs

This file was deleted.

10 changes: 5 additions & 5 deletions source/backend/api/Services/AcquisitionFileService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ public PimsAcquisitionFile Update(PimsAcquisitionFile acquisitionFile, IEnumerab

if (!_statusSolver.CanEditDetails(currentAcquisitionStatus) && !_user.HasPermission(Permissions.SystemAdmin))
{
throw new BusinessRuleViolationException("The file you are editing is not active or draft, so you cannot save changes. Refresh your browser to see file state.");
throw new BusinessRuleViolationException("The file you are editing is not active or hold, so you cannot save changes. Refresh your browser to see file state.");
}

if (!userOverrides.Contains(UserOverrideCode.UpdateRegion))
Expand Down Expand Up @@ -301,7 +301,7 @@ public PimsAcquisitionFile UpdateProperties(PimsAcquisitionFile acquisitionFile,
AcquisitionStatusTypes? currentAcquisitionStatus = GetCurrentAcquisitionStatus(acquisitionFile.Internal_Id);
if (!_statusSolver.CanEditProperties(currentAcquisitionStatus) && !_user.HasPermission(Permissions.SystemAdmin))
{
throw new BusinessRuleViolationException("The file you are editing is not active or draft, so you cannot save changes. Refresh your browser to see file state.");
throw new BusinessRuleViolationException("The file you are editing is not active or hold, so you cannot save changes. Refresh your browser to see file state.");
}

// Get the current properties in the research file
Expand Down Expand Up @@ -368,7 +368,7 @@ public PimsAcquisitionFile UpdateChecklistItems(IList<PimsAcquisitionChecklistIt
var currentAcquisitionStatus = GetCurrentAcquisitionStatus(acquisitionFileId);
if (!_statusSolver.CanEditChecklists(currentAcquisitionStatus) && !_user.HasPermission(Permissions.SystemAdmin))
{
throw new BusinessRuleViolationException("The file you are editing is not active or draft, so you cannot save changes. Refresh your browser to see file state.");
throw new BusinessRuleViolationException("The file you are editing is not active or hold, so you cannot save changes. Refresh your browser to see file state.");
}

// Get the current checklist items for this acquisition file.
Expand Down Expand Up @@ -490,7 +490,7 @@ public IEnumerable<PimsInterestHolder> UpdateInterestHolders(long acquisitionFil
var currentAcquisitionStatus = GetCurrentAcquisitionStatus(acquisitionFileId);
if (!_statusSolver.CanEditStakeholders(currentAcquisitionStatus) && !_user.HasPermission(Permissions.SystemAdmin))
{
throw new BusinessRuleViolationException("The file you are editing is not active or draft, so you cannot save changes. Refresh your browser to see file state.");
throw new BusinessRuleViolationException("The file you are editing is not active or hold, so you cannot save changes. Refresh your browser to see file state.");
}

var currentInterestHolders = _interestHolderRepository.GetInterestHoldersByAcquisitionFile(acquisitionFileId);
Expand Down Expand Up @@ -735,7 +735,7 @@ private void ValidateAcquisitionFileStatus(long acquisitionFileId, string agreem

if (!_statusSolver.CanEditOrDeleteAgreement(currentAcquisitionStatus, agreementStatus) && !_user.HasPermission(Permissions.SystemAdmin))
{
throw new BusinessRuleViolationException("The file you are editing is not active or draft, so you cannot save changes. Refresh your browser to see file state.");
throw new BusinessRuleViolationException("The file you are editing is not active or hold, so you cannot save changes. Refresh your browser to see file state.");
}
}

Expand Down
4 changes: 2 additions & 2 deletions source/backend/api/Services/CompensationRequisitionService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public PimsCompensationRequisition Update(PimsCompensationRequisition compensati

if (!_statusSolver.CanEditOrDeleteCompensation(currentAcquisitionStatus, currentCompensation.IsDraft) && !_user.HasPermission(Permissions.SystemAdmin))
{
throw new BusinessRuleViolationException("The file you are editing is not active or draft, so you cannot save changes. Refresh your browser to see file state.");
throw new BusinessRuleViolationException("The file you are editing is not active or hold, so you cannot save changes. Refresh your browser to see file state.");
}

CheckTotalAllowableCompensation(currentAcquisitionFile, compensationRequisition);
Expand Down Expand Up @@ -106,7 +106,7 @@ public bool DeleteCompensation(long compensationId)

if (!_statusSolver.CanEditOrDeleteCompensation(currentAcquisitionStatus, currentCompensation.IsDraft) && !_user.HasPermission(Permissions.SystemAdmin))
{
throw new BusinessRuleViolationException("The file you are editing is not active or draft, so you cannot save changes. Refresh your browser to see file state.");
throw new BusinessRuleViolationException("The file you are editing is not active or hold, so you cannot save changes. Refresh your browser to see file state.");
}

var fileFormToDelete = _compensationRequisitionRepository.TryDelete(compensationId);
Expand Down
Loading
Loading