@@ -50,15 +50,25 @@ public class ApplicationHandlers(
5050 var applications = await applicationRepository . Query ( new ApplicationQuery
5151 {
5252 ByApplicantId = request . Application . RegistrantId ,
53- ByStatus = [ Resources . Documents . Applications . ApplicationStatus . Draft ]
53+ ByStatus = new List < Resources . Documents . Applications . ApplicationStatus >
54+ {
55+ Resources . Documents . Applications . ApplicationStatus . Draft ,
56+ Resources . Documents . Applications . ApplicationStatus . Submitted ,
57+ Resources . Documents . Applications . ApplicationStatus . Ready ,
58+ Resources . Documents . Applications . ApplicationStatus . Escalated ,
59+ Resources . Documents . Applications . ApplicationStatus . Pending ,
60+ Resources . Documents . Applications . ApplicationStatus . InProgress ,
61+ Resources . Documents . Applications . ApplicationStatus . PendingPSPConsultationNeeded ,
62+ Resources . Documents . Applications . ApplicationStatus . PendingQueue ,
63+ }
5464 } , cancellationToken ) ;
5565
5666 var draftApplicationResults = new ApplicationsQueryResults ( mapper . Map < IEnumerable < Contract . Applications . Application > > ( applications ) ! ) ;
5767 var existingDraftApplication = draftApplicationResults . Items . FirstOrDefault ( ) ;
5868 if ( existingDraftApplication != null )
5969 {
6070 // user already has a draft application
61- throw new InvalidOperationException ( $ "User already has a draft application with id '{ existingDraftApplication . Id } '") ;
71+ throw new InvalidOperationException ( $ "User already has an application in progress with id '{ existingDraftApplication . Id } '") ;
6272 }
6373 }
6474 request . Application . Origin = Contract . Applications . ApplicationOrigin . Portal ; // Set application origin to "Portal"
0 commit comments