theopensystemslab / planx-new

Planβœ• is a platform for creating and publishing digital planning services
https://editor.planx.uk
Mozilla Public License 2.0
13 stars 2 forks source link

feat: Edit a User #3664

Closed RODO94 closed 2 days ago

RODO94 commented 1 week ago

What does this PR do?

This PR deals with the Trello ticket: https://trello.com/c/7MAKUC2N/3011-edit-user-in-editor

And follows on from work done in this ticket: https://trello.com/c/piMcGsJa/2973-add-user-in-editor

I am adding an edit feature to the Team Members area, where a platformAdmin can update the first name, last name, and email of a user.

 journey
title Permission Levels
    section PlatformAdmin
      Edit all users: 5
      Add a teamEditor:5 
    section TeamEditor
      Edit all users: 1
      Add a teamEditor: 5 

The work has used things built on for adding a user, and changes the relevant modal component from AddTeamEditorModal to EditorUpsertModal relying on the update/insert portmanteau.

I have also added a Permissions check at the edit button component level, incase we want more nuanced permissions in the future.

Test Coverage:

After chatting to @jamdelion about it, we said there's probably Modal specific tests here which are not contextually linked to editing user, and more about how the modal operates. Scope to add this to a Modal specific test file which would make more sense if we were to reuse the component for other things like Adding a Team, or Adding a Flow in future.

RODO94 commented 1 week ago

Edit user in Editor

github-actions[bot] commented 1 week ago

πŸ€– Hasura Change Summary compared a subset of table metadata including permissions:

Updated Tables (1)

github-actions[bot] commented 1 week ago

Removed vultr server and associated DNS entries

RODO94 commented 6 days ago

@DafyddLlyr picking up the refactors now around this, thanks for the pointers! Will keep things D.R.Y...

jamdelion commented 3 days ago

LOVE seeing some mermaid in the PR explanation!! πŸ§œβ€β™€οΈ