Skip to content

FAI-2403 FAI-2404 Feature/multiple locations 2.0 #2168

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

Open
wants to merge 28 commits into
base: master
Choose a base branch
from

Conversation

balaji-j
Copy link
Contributor

No description provided.

balaji-j and others added 22 commits April 8, 2025 14:39
- Introduced new classes for querying and managing employment locations.
- Updated `WhenHandlingApplyCommand.cs` to include `LocationDto` creation.
- Enhanced `ApplyCommandHandler.cs` to handle additional questions and data.
- Created `EmploymentLocationsController.cs` for handling HTTP requests.
- Defined API request/response structures for employment locations.

Changes made by Balaji Jambulingam
- Add new test cases for `ApplyCommandHandler` in `WhenHandlingApplyCommand.cs`.
- Improve address handling logic in `ApplyCommandHandler.cs`.
- Introduce `IsEmploymentLocationComplete` in `PutApplicationApiRequest.cs`.
- Change `Addresses` initialization to an empty list in `LocationDto.cs`.
- Ensure proper null handling for addresses to prevent exceptions.

Changes made by Balaji Jambulingam
- Implemented a new POST method in EmploymentLocationsController.
- Updated EmploymentLocation properties to be nullable in response models.
- Introduced UpdateEmploymentLocationsCommand and its handler.
- Added PutUpsertEmploymentLocationsApiRequest/Response classes.
- Enhanced unit tests for new command and controller methods.

Changes made by Balaji Jambulingam
- Added a test to verify NotFound response for null query result.
- Changed EmploymentLocationsController to inherit from ControllerBase.
- Updated Get method to return NotFound if mediator result is null.
- Modified EmploymentLocation property to be non-required in requests.
- Aligned code with ASP.NET Core API conventions.

Changes made by Balaji Jambulingam
- Introduced a unit test to check for NotFound response when query is null.
- Updated EmploymentLocationsController to inherit from ControllerBase.
- Emphasized null check in the Get method for better clarity.
- Utilized Moq for mocking dependencies in the new test.
- Ensured adherence to ASP.NET Core best practices.

Changes made by Balaji Jambulingam
- Simplified `IsSectionCompleted` logic in employment locations test.
- Removed redundant assertions in `WhenHandlingGetIndexQuery`.
- Updated null-checking syntax for `EmploymentLocation` in handlers.
- Added `EmploymentLocationStatus` to `GetApplicationByReferenceApiResponse`.
- Initialized `Applications` list in `GetApplicationsApiResponse` to avoid null.

Changes made by Balaji Jambulingam
- Enhance ApplyCommandHandler to handle null or empty addresses.
- Introduce OrderByCity method in AddressExtensions for sorting.
- Update EmploymentLocation condition for improved clarity.
- Add unit tests for OrderByCity to ensure correct functionality.
- Ensure handling of empty and null address lists in tests.

Changes made by Balaji Jambulingam
…ations_ML

FAI-2403 Choose ML Locations App
…cations_ML

FAI-2404 Create the summary of locations you are applying for page
- Added `Expired` status to `ApplicationStatus` enum.
- Updated `SubmitApplicationCommandHandler` for better validation.
- Introduced `ApplicationsController` to handle application requests.
- Created `GetAllApplicationsByIdApiRequest` for fetching applications.
- Added tests for `ApplicationsController` to ensure correct behavior.

Changes made by Balaji Jambulingam
- Added `Newtonsoft.Json` for address serialization in `ApplyCommandHandler.cs`.
- Modified `WhenHandlingGetApplicationsByIdQuery` to use a new `ApiResponse`.
- Updated unit tests to use `[Greedy]` for handler dependency resolution.
- Removed default initialization of `Addresses` in `Location` class.
- Enhanced `GetAllApplicationsByIdApiResponse` with new properties.

Changes made by Balaji Jambulingam
Copy link

sonarqubecloud bot commented Jun 2, 2025

Quality Gate Passed Quality Gate passed for 'das-apim-endpoints-FindAnApprenticeship'

Issues
17 New issues
0 Accepted issues

Measures
0 Security Hotspots
93.4% Coverage on New Code
0.6% Duplication on New Code

See analysis details on SonarQube Cloud

balaji-j and others added 6 commits June 3, 2025 11:51
- Introduced `EmploymentLocation` to `GetApplicationViewApiResponse`.
- Added `EmploymentLocation` to `GetApplicationViewQueryResult`.
- Created `EmploymentLocationSection` record with implicit conversion.
- Updated `GetApplicationViewQueryHandler` to populate new property.
- Added necessary using directives for shared API components.

Changes made by Balaji Jambulingam
- Introduced `IsSelected` property of type `bool` to `Address`.
- Property uses `init` accessor for controlled initialization.
- Enhances the functionality of the `Address` class.
- Improves state management for address selection.
- Aligns with domain requirements for recruitment.

Changes made by Balaji Jambulingam
- Introduced `FullAddress` property for address details.
- Added `IsSelected` property to indicate selection status.
- Included `AddressOrder` property for sorting addresses.
- All new properties use the `init` accessor for immutability.
- Enhances the API response structure for better data handling.

Changes made by Balaji Jambulingam
…ck_Your_Answers_Page

FAI-2405 update check your answers page
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants