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

feat: implement cancel button for pending assignment #1099

Merged
merged 8 commits into from
Dec 6, 2023

Conversation

katrinan029
Copy link
Contributor

Description

Implement a button to cancel multiple pending assignments (bulk action) and a single pending assignment. When the cancellation is successful, the learner will receive an email notifying them that the course invitation has been rescinded, the admin user will see a toast, and the row removed from the datatable. On failure, the status row displays a "Failed: Cancelation" chip.

UI changes for a single pending assignment

Screen.Recording.2023-11-20.at.9.22.26.PM.mov
Screenshot 2023-11-20 at 10 36 15 PM

UI changes for multiple pending assignments

Screen.Recording.2023-11-20.at.9.25.41.PM.mov

JIRA Ticket

For all changes

  • Ensure adequate tests are in place (or reviewed existing tests cover changes)

Only if submitting a visual change

  • Ensure to attach screenshots
  • Ensure to have UX team confirm screenshots

@katrinan029 katrinan029 changed the title feat: implement cancel button feat: implement cancel button for pending assignment Nov 21, 2023
@katrinan029 katrinan029 marked this pull request as ready for review November 21, 2023 07:34
Copy link

codecov bot commented Nov 21, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (2e8f8b8) 85.02% compared to head (83cb5a0) 85.12%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1099      +/-   ##
==========================================
+ Coverage   85.02%   85.12%   +0.09%     
==========================================
  Files         477      482       +5     
  Lines       10093    10154      +61     
  Branches     2127     2133       +6     
==========================================
+ Hits         8582     8644      +62     
+ Misses       1470     1469       -1     
  Partials       41       41              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@adamstankiewicz adamstankiewicz left a comment

Choose a reason for hiding this comment

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

This looks great! Mostly fairly minor feedback and recommendations for some added test coverage in a couple areas.

Comment on lines 21 to 22
cancelContentAssignments();
displayToastForAssignmentCancellation(uuidCount);
Copy link
Member

Choose a reason for hiding this comment

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

It looks like the Toast may be appearing while the async cancel API call is still resolving, regardless of success or error. Does the cancelContentAssignments need to be awaited?

toast_immediate_not_after_success.mov

@katrinan029 katrinan029 merged commit c13e684 into master Dec 6, 2023
6 checks passed
@katrinan029 katrinan029 deleted the knguyen2/ENT-7816 branch December 6, 2023 16:31
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.

2 participants