Refactor third parties frontend to page arborescence#1417
Open
SachaProbo wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
7 issues found across 51 files
Note: This PR contains a large number of files. cubic only reviews up to 40 files per PR, so some files may not have been reviewed. cubic prioritizes the most important files to review.
On a pro plan you can use ultrareview for larger PRs.
Re-trigger cubic
fc4db48 to
d543ffe
Compare
Mirror the risks refactor (c78a713): colocate routes.ts, split the detail layout query so each child route owns its Loader + Page, rename tabs/*Tab to resource folders with *Page, move dialogs into _components/, and extract ThirdPartyRow with its own fragment. Remove outlet context data passing and deprecated loaderFromQueryLoader. Delete the monolithic ThirdPartyGraph hook, colocating each GraphQL operation with its consumer: the create mutation in CreateThirdPartyDialog (now useMutation + useToast) and the third-party list queries in ThirdPartiesCell and ThirdPartiesMultiSelectField (now useQueryLoader + usePreloadedQuery). Signed-off-by: Sacha Al Himdani <sacha@probo.com>
d543ffe to
09c81ee
Compare
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.
Mirror the risks refactor (c78a713): colocate routes.ts, split the detail layout query so each child route owns its Loader + Page, rename tabs/*Tab to resource folders with *Page, move dialogs into _components/, and extract ThirdPartyRow with its own fragment.
Remove outlet context data passing and deprecated
loaderFromQueryLoader. Delete the monolithic ThirdPartyGraph hook, colocating each GraphQL operation with its consumer: the create mutation in CreateThirdPartyDialog (now useMutation + useToast) and the third-party list queries in ThirdPartiesCell and ThirdPartiesMultiSelectField (now useQueryLoader + usePreloadedQuery).
Summary by cubic
Refactors the third-parties console to a page-based routing tree with co-located queries and loaders, replacing the tab UI and the
ThirdPartyGraphhook. Moves GraphQL operations next to pages/dialogs and standardizes mutations withuseMutation+useToastfor clearer data flow and better errors.App: console
+2853-1785pages/organizations/third-parties/routes.ts; updated rootroutes.tsx; removedroutes/thirdPartyRoutes.ts.*PageLoader(overview,measures,services,contacts,risks,compliance,certifications, list); addedThirdPartyDetailLayoutLoader.tabs/*Tab; moved dialogs into_components/; addedThirdPartyRowand row components for services, contacts, compliance reports, and risk assessments.hooks/graph/ThirdPartyGraph.ts; inlined list queries inThirdPartiesCellandThirdPartiesMultiSelectFieldusinguseQueryLoader+usePreloadedQuery; dialogs now useuseMutation+useToastwith improved error handling.loaderFromQueryLoader; updated fragments/types; small updates to detail layout, vetting dialog, certifications/measures pages.Written for commit 09c81ee. Summary will update on new commits.