Add Options to "Invalidate" and "Mark as Valid" Vomit Reactions (#9769) [deploy]
* Adds valid status to the feedback_message model and a spec to validate the status * Adds an unresolve button to resolved vomits in _abuse_reports.html.erb * Adds functions to update valid status in reaction_controller.js * Use invalidate in place of unresolve for unconfirming vomit button * Add option to reopen vomit reactions marked as invalid and invalidate resolved vomits - Adds a Reopen button under the invalid tab - Adds confirmedStatus JS to reaction_controller.js - Adds conditional to _abuse_reports.html.erb
This commit is contained in:
parent
5b7db97336
commit
09c3c25bf8
2 changed files with 23 additions and 0 deletions
|
|
@ -41,6 +41,10 @@ export default class ReactionController extends Controller {
|
|||
this.updateReaction(this.reactionId, this.invalidStatus);
|
||||
}
|
||||
|
||||
updateReactionConfirmed() {
|
||||
this.updateReaction(this.reactionId, this.confirmedStatus);
|
||||
}
|
||||
|
||||
reactableUserCheck() {
|
||||
if (this.reactableType === 'user') {
|
||||
// eslint-disable-next-line no-restricted-globals
|
||||
|
|
|
|||
|
|
@ -73,6 +73,25 @@
|
|||
INVALID
|
||||
</button>
|
||||
<% end %>
|
||||
<% if params[:status] == "Resolved" %>
|
||||
<button
|
||||
class="btn btn-warning text-white btn-sm"
|
||||
type="button"
|
||||
data-altstatus="invalid"
|
||||
data-target="reaction.invalid"
|
||||
data-action="reaction#updateReactionInvalid">
|
||||
INVALIDATE
|
||||
</button>
|
||||
<% elsif params[:status] == "Invalid" %>
|
||||
<button
|
||||
class="btn btn-success btn-sm"
|
||||
type="button"
|
||||
data-status="confirmed"
|
||||
data-target="reaction.confirmed"
|
||||
data-action="reaction#updateReactionConfirmed">
|
||||
MARK AS VALID
|
||||
</button>
|
||||
<% end %>
|
||||
</span>
|
||||
</div>
|
||||
<hr id="js__reaction__div__hr__<%= reaction.id %>">
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue