feature/projects-index-state-migration #437
Open
+149
−3
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.
Description
This PR completes the migration of the Projects Index state from AngularJS to Angular.
The previous implementation relied on an AngularJS state, controller, and template.
As part of the migration effort, I created a new Angular component and moved all
relevant logic, routing, and view behavior into the Angular framework.
I also cleaned up the old AngularJS state by disabling it so that the new Angular
component is now the source of truth for the Projects Index page.
This PR contains only the intended migration files.
Fixes # (issue) N/A
Type of change
How Has This Been Tested?
/projects/<validProjectId>and confirming the page loads.Testing Checklist:
Checklist:
##Screenshots (Evidence)
Screenshot 1 - Projects Index Page Rendering

Shows the page loading at /projects/ with correct layout and navigation. Confirms that the new Angular component is rendering successfully and the user interface is visible.
Screenshot 2 - Console Showing No Errors

Displays the browser’s DevTools Console tab after refreshing the page. Confirms that there are no red errors or warnings related to the migrated component. Only expected optimization warnings from legacy modules are present.
Screenshot 3 - Network Tab Showing Successful API Calls

Shows the DevTools Network tab after page load. Confirms that getProject and getUnit API calls return 200 OK, verifying that project and unit data are loading correctly.
Screenshot 4 - Angular Component Folder Structure

Displays the file explorer in VS Code showing the new Angular component files inside src/app/projects/states/index/. Includes:
Confirms that the migration was scoped and structured correctly.
Screenshot 5 - Routing Configuration

Shows the route definition in app-routing.module.ts for projects/:projectId. Confirms that the new Angular component is registered with Angular Router and replaces the legacy AngularJS state.
How the behaviour can be tested / replicated by others
Anyone reviewing this PR can follow the steps below to confirm the migrated Projects Index state works as expected:
Start the frontend application
Launch the Angular development server using the project’s standard startup command.
Sign in using any valid development credentials
Once the app loads, log in with the default test credentials provided in the project documentation.
Navigate to the Projects Index route
In the browser, go to:
Replace
<validProjectId>with a project ID that exists in your local database.Confirm the page renders correctly
The Projects Index page should load without errors.
If the user isn’t enrolled in a unit, the “not enrolled” message will appear - this is expected behaviour.
Check the browser console
Open DevTools → Console and refresh the page.
There should be no red errors.
Any AngularJS optimisation warnings are normal and unrelated to this migration.
Check the Network tab
Open DevTools → Network and refresh the page.
API calls such as
getProjectandgetUnitshould return successful responses (e.g.,200 OK).Verify routing behaviour
/home.Confirm the old AngularJS controller is no longer used
The legacy
ProjectsIndexStateCtrlshould not appear in logs or be triggered during navigation.