Closed mmumby closed 1 year ago
Looks good so far. I'll give it a proper review on Monday once I have a chance to try it out myself.
Kudos, SonarCloud Quality Gate passed!
0 Bugs
0 Vulnerabilities
0 Security Hotspots
1 Code Smell
No Coverage information
0.0% Duplication
Work completed:
Initially, when the details page mounted - The parent component
SiteViewDetails
, and the child 'SiteViewDetaisTabs' were each fetching the site details. The child was handling all logic for participants/phases, but the parent was handling logic for editing sites. (Thus why phases/allocations were not being re-fetched after successful edit)Reduced network calls on initial load to 3 - getSite, getParticipants, getPhases, and moved that logic to the parent.
Moved API calls to service files. (There is inconsistency in how we handle the response, but I did not address those inconsistencies in this PR)
Fixed bug - if you edit a site, the phase data is still visible.
Manually tested al actions to ensure they are still working as intended.
Additional work
setAllocationForm()
, also updated spelling mistake on fn name.