-
Notifications
You must be signed in to change notification settings - Fork 32
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
Conversation
src/components/learner-credit-management/BudgetAssignmentsTable.jsx
Outdated
Show resolved
Hide resolved
Codecov ReportAll modified and coverable lines are covered by tests ✅
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. |
src/components/learner-credit-management/AssignmentStatusTableCell.jsx
Outdated
Show resolved
Hide resolved
src/components/learner-credit-management/AssignmentStatusTableCell.jsx
Outdated
Show resolved
Hide resolved
src/components/learner-credit-management/AssignmentTableCancel.jsx
Outdated
Show resolved
Hide resolved
src/components/learner-credit-management/BudgetAssignmentsTable.jsx
Outdated
Show resolved
Hide resolved
src/components/learner-credit-management/BudgetAssignmentsTable.jsx
Outdated
Show resolved
Hide resolved
src/components/learner-credit-management/assignments-status-chips/FailedCancellation.jsx
Outdated
Show resolved
Hide resolved
src/components/learner-credit-management/data/hooks/useCancelContentAssignments.js
Outdated
Show resolved
Hide resolved
src/components/learner-credit-management/data/hooks/useCancelContentAssignments.js
Outdated
Show resolved
Hide resolved
There was a problem hiding this 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.
cancelContentAssignments(); | ||
displayToastForAssignmentCancellation(uuidCount); |
There was a problem hiding this comment.
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?
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
UI changes for multiple pending assignments
Screen.Recording.2023-11-20.at.9.25.41.PM.mov
JIRA Ticket
For all changes
Only if submitting a visual change