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

fix(ui): allow canceling from request list & hide edit button for own requests #1401

Merged
merged 2 commits into from
Apr 13, 2021

Conversation

TheCatLady
Copy link
Collaborator

Description

  • Hide Edit button in movie request modal, since users cannot edit their own requests (MANAGE_REQUESTS permission is required to edit requests, and users with that permission also have auto-approve perms)
  • Show Cancel Requests button on request list to allow users to cancel their own requests
  • Fix Recent Requests slider empty string to reflect that it no longer only displays pending/processing requests

Screenshot (if UI-related)

To-Dos

  • Successful build yarn build
  • Translation keys yarn i18n:extract

Issues Fixed or Closed

N/A

@TheCatLady TheCatLady requested a review from sct as a code owner April 11, 2021 23:48
@sct
Copy link
Owner

sct commented Apr 12, 2021

image

🤔

(This happens to your own requests that are not approved)

@sct
Copy link
Owner

sct commented Apr 12, 2021

This PR also removes the ability for admins to cancel a request from the popup edit modal for movies.

@TheCatLady
Copy link
Collaborator Author

image

🤔

(This happens to your own requests that are not approved)

Huh, how are you able to submit requests that aren't approved but still see those buttons? You shouldn't be allowed to Approve/Deny requests if you have MANAGE_REQUESTS, and if you have that perm, your requests should have been auto-approved?

@TheCatLady
Copy link
Collaborator Author

TheCatLady commented Apr 12, 2021

This PR also removes the ability for admins to cancel a request from the popup edit modal for movies.

We don't allow admins to cancel others' pending requests on the request list; only approve/deny actions are shown. Wouldn't it be better to be consistent here? I imagine some admins who find themselves in the View Request modal might click the Cancel Request button when they really intend to decline a request.

Also, there is no such Cancel Request button for series requests since we show a Request More button instead of the View Request button.

And again, I'm not sure how you're submitting requests as an admin that aren't immediately approved (and you can't edit already-approved requests).

@TheCatLady
Copy link
Collaborator Author

Added a check to verify that the user does not have the MANAGE_REQUESTS perm, in case the user was granted MANAGE_REQUESTS after submitting a request that has not yet been approved.

@sct
Copy link
Owner

sct commented Apr 13, 2021

This PR also removes the ability for admins to cancel a request from the popup edit modal for movies.

We don't allow admins to cancel others' pending requests on the request list; only approve/deny actions are shown. Wouldn't it be better to be consistent here? I imagine some admins who find themselves in the View Request modal might click the Cancel Request button when they really intend to decline a request.

Also, there is no such Cancel Request button for series requests since we show a Request More button instead of the View Request button.

And again, I'm not sure how you're submitting requests as an admin that aren't immediately approved (and you can't edit already-approved requests).

There actually should be a cancel request button for series it's just not correctly implemented at the moment. Users who make a series request should be able to edit the request by unchecking the seasons they requested. If all seasons are unchecked (just like the admin edit interface) the button would become "Cancel Request." I suppose in this case, we should if anything allow admins to approve/decline requests from the view request modal. (Not in this PR)

@sct sct merged commit bed850d into develop Apr 13, 2021
@sct sct deleted the fix/ui/request-cancel-edit branch April 13, 2021 03:02
@github-actions
Copy link

🎉 This PR is included in version 1.23.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants