-
Notifications
You must be signed in to change notification settings - Fork 1
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
[MINT-3221] MTO Table Action Component #1552
Conversation
history.push( | ||
`/models/${modelID}/collaboration-area/model-to-operations/solution-library` | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Solution Library url does not exist, but just inferring based on the milestone library url
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that makes sense!
If #1553 gets merged first, we could probably implement calling that mutation in here, just FYI! |
c9653d5
to
09ce599
Compare
const handleCreate = () => { | ||
create().then(response => { | ||
if (!response?.errors) { | ||
alert('Standard categories created successfully'); | ||
} | ||
}); | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added in createStandardCategories
from #1553
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
92af6b7
to
d3809ef
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice Gary
Do we want to persist the selection in localStorage to hide/show table actions? @ClayBenson94
@@ -85,7 +77,10 @@ const MTOHome = () => { | |||
]} | |||
/> | |||
|
|||
{!isModalOpen && message && <Expire delay={45000}>{message}</Expire>} | |||
{ | |||
// !isModalOpen && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can remove this commented out code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dupe
@@ -492,6 +493,7 @@ const MTOTable = () => { | |||
|
|||
return ( | |||
<> | |||
<MTOTableActions /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hesitate to put the component within <MTOTable />
. It can be moved as a sibling inside of the home component. This allows some flexibility and decoupling of the components if they want to be used independently elsewhere
{currentView === 'milestones' && <><MTOTableActions /><MTOTable />< />}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I cant seem to replicate the select issue, may have been wonkiness with my unclean db. Adding the refetch queries can be done at a later time if needed. Let me know if you want to track the refetchqueries change to address later and I can approve |
09afa80
to
1b96257
Compare
const { data, loading, error, refetch } = useGetModelToOperationsMatrixQuery({ | ||
variables: { | ||
id: modelID | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the useGetModelToOperationsMatrixQuery
is also used in <MTOTable />
component. So, I thought to pass down the data needed, instead of calling the gql again.
Also, this allowed me to pass refetch down to the sibling component <MTOTableActions />
const { | ||
data: queryData, | ||
loading, | ||
error | ||
} = useGetModelToOperationsMatrixQuery({ | ||
variables: { | ||
id: modelID | ||
} | ||
}); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the gql call is pushed up to the parent component and queryData
is passed down as a prop. see above comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LG
MINT-3221
Description
MTOTableActions
component, along with its copy and testMTOTableActions
to MTOTableHow to test this change
tablet and smaller screen sizes are still WIP as of 12/4/2024: https://cmsgov.slack.com/archives/C01B9TEC65A/p1733340956122379
PR Author Checklist
PR Reviewer Guidelines