Merged
Conversation
added 13 commits
December 6, 2025 10:55
- Added CompleteScreeningAsync for updating screening results - Added GenerateLeaseOfferAsync with competing app denial - Added AcceptLeaseOfferAsync with tenant/lease creation - Added DeclineLeaseOfferAsync with property rollback - Added ExpireLeaseOfferAsync for scheduled expiration - Added ScreeningResultModel and LeaseOfferModel - All methods wrapped in transactions with audit logging - Smart property status rollback when no active apps
- Updated SubmitApplication.razor to use WorkflowService.SubmitApplicationAsync - Updated ReviewApplication.razor to use workflow methods for approve/deny/withdraw/screening - Updated GenerateLeaseOffer.razor to use WorkflowService.GenerateLeaseOfferAsync - Updated ViewLeaseOffer.razor to use AcceptLeaseOfferAsync/DeclineLeaseOfferAsync - All UI components now use workflow service for transactional safety and audit logging - Removed manual status management code from UI layer - Simplified UI error handling with WorkflowResult pattern
- Changed GetActiveOrganizationIdAsync to return string instead of int - Updated ValidateOrganizationOwnershipAsync to use string OrganizationId - Replaced all orgId.ToString() calls with orgId throughout ApplicationWorkflowService - Fixes error: 'The input string 'GUID' was not in a correct format' - OrganizationId is a GUID stored as string, not an integer
- Changed WorkflowAuditLog.OrganizationId from int to string - Updated LogTransitionAsync to use string without parsing - Updated GetAuditHistoryAsync to use string comparison - Created and applied migration ChangeWorkflowAuditLogOrganizationIdToString - Fixes second GUID parsing error in workflow audit logging
- Removed all intermediate SaveChangesAsync calls in ApplicationWorkflowService - SaveChanges now only occurs once at transaction commit in ExecuteWorkflowAsync - Ensures all-or-nothing execution - prevents partial updates on failure - EF Core assigns IDs during tracking, available for use before final commit - Fixes issue where property/prospect status changed despite workflow failure Critical fix: Previously calling SaveChangesAsync in the middle of operations committed those changes even when later steps failed, breaking transaction rollback.
- Fixed property selection validation in SubmitApplication.razor - Removed conflicting @onchange handler - Added @bind-Value:after to sync selectedProperty - Added ValidationSummary for better error visibility - Added console logging for debugging - Fixed InitiateScreeningAsync workflow transition - Auto-transitions from Submitted to UnderReview before screening - Eliminates need for manual 'Mark Under Review' step - More user-friendly workflow progression - Logs auto-transition in audit trail
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds targeted workflow unit tests and a CI workflow. Branch: feature/workflow-tests-ci.