Skip to content
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

[MDS-5551] ESUP open decision modal bug- form_spec of undefined #2731

Merged
merged 3 commits into from
Oct 18, 2023

Conversation

taraepp
Copy link
Collaborator

@taraepp taraepp commented Oct 18, 2023

Objective

  • the bug is because the fetch method populates the documentContextTemplate and this reduxy bit isn't quite synchronous so it wouldn't be populated in time. It would work on the second try but not the first.
    • I could not find a way to resolve the bug while maintaining this pattern, so I didn't, grabbing the data from the .then was my best solution
  • in ApplicationTab.js- the fetchNoticeOfWorkApplicationContextTemplate in handleGenerateDocument actually calls/called the same reducer in a similar structure, so I was expecting it to fail as well, but it didn't
    • I don't know 100% why but I suspect that it's because ApplicationTab defines & uses the function directly whereas ExplosivesPermit passes it as a prop to the MineExplosivesPermitTable.
  • I also noticed that our Actions menu was straying just a tiny bit from mockups (I used the original actions menu ticket as the source of truth: https://bcmines.atlassian.net/browse/MDS-5356)
    • moved the icon from the left to the right
    • consistent icon usage in feature-flagged (new) version of menu
    • put the delete in there too
    • made a wrapper function for the delete confirm modal
  • checking user permissions is annoying, particularly when you can't just wrap the component, so I also added a selector function that does it more directly without having to introduce mapStateToProps.
    MDS-5551

Why are you making this change? Provide a short explanation and/or screenshots
The delete confirmation modal and the current state of the action menu:
image

image

…instead of relying on state variable being populated. Do a bit of tidying on action menu on MineExplosivesPermitTable and align more with mockups. Add in a selector to check if a user has a specified role.
Copy link
Collaborator

@matbusby-fw matbusby-fw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Nice clean up of the actions menu!

@taraepp taraepp merged commit 0f3bec7 into develop Oct 18, 2023
@taraepp taraepp deleted the mds-5551-esup-process-bug branch October 18, 2023 22:33
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.

3 participants