[web] Disable approve button after approval#25655
Merged
Conversation
rudream
approved these changes
May 4, 2023
| <Flex gap={2}> | ||
| <ButtonBorder block onClick={() => onApprove(request.requestID, true)}> | ||
| <ButtonBorder | ||
| disabled={request.approvers.includes(currentUser.username)} |
Contributor
There was a problem hiding this comment.
I'm not too familiar with the UX of this, is there any indication elsewhere that the user has already approved the request? If not, let's add a title attr if disabled that explains why it's disabled.
Contributor
Author
There was a problem hiding this comment.
Yeah you get output in the terminal. like
Teleport > avatus approved file transfer request 8f60b903-2927-4375-aa1c-a7e97cb4b422
I'm working on another PR right now that will show the individual approvers as well + a list of what else is needed for the policy to be fulfilled that I can throw the title attr in.
kimlisa
approved these changes
May 4, 2023
zmb3
approved these changes
May 4, 2023
avatus
added a commit
that referenced
this pull request
May 4, 2023
avatus
added a commit
that referenced
this pull request
May 5, 2023
) * Cherry-pick * update proto files * Disable approve button after approval (#25655) * Fix proto conflict
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.
This PR will disable the "Approve" button for file transfer requests if that person has approved already. This helps in scenarios where multiple approvers are required.
The output in the terminal exists and shows feedback when you've approved. but if you approved again, nothing happens (expected, its idempotent in that way). The UI just needed to give visual feedback that they've approved.