Skip to content

[web] Disable approve button after approval#25655

Merged
avatus merged 1 commit intomasterfrom
michaelmyers/fix/disable_approve_button_file_requests
May 4, 2023
Merged

[web] Disable approve button after approval#25655
avatus merged 1 commit intomasterfrom
michaelmyers/fix/disable_approve_button_file_requests

Conversation

@avatus
Copy link
Copy Markdown
Contributor

@avatus avatus commented May 4, 2023

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.

Copy link
Copy Markdown
Contributor

@rudream rudream left a comment

Choose a reason for hiding this comment

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

Approved with comment

<Flex gap={2}>
<ButtonBorder block onClick={() => onApprove(request.requestID, true)}>
<ButtonBorder
disabled={request.approvers.includes(currentUser.username)}
Copy link
Copy Markdown
Contributor

@rudream rudream May 4, 2023

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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.

@avatus avatus enabled auto-merge May 4, 2023 20:51
@public-teleport-github-review-bot public-teleport-github-review-bot Bot removed the request for review from ravicious May 4, 2023 20:55
@avatus avatus added this pull request to the merge queue May 4, 2023
Merged via the queue into master with commit 76074b4 May 4, 2023
@avatus avatus deleted the michaelmyers/fix/disable_approve_button_file_requests branch May 4, 2023 21:09
@public-teleport-github-review-bot
Copy link
Copy Markdown

@avatus See the table below for backport results.

Branch Result
branch/v13 Failed

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants