Disputes: Show when and who closed dispute

This commit is contained in:
Karl Erik Õunapuu 2020-05-18 15:11:34 +03:00
parent 26a5813fe9
commit c682155bf6
9 changed files with 48 additions and 31 deletions

View file

@ -44,7 +44,7 @@ module Admin
# DELETE /admin/disputes/1
def delete
@dispute.close
@dispute.close(initiator: 'Admin')
redirect_to admin_disputes_url, notice: 'Dispute was successfully closed.'
end

View file

@ -31,10 +31,7 @@ class Registrant::DomainUpdateConfirmsController < RegistrantController
end
elsif params[:confirmed]
if @registrant_verification.domain_registrant_change_confirm!("email link, #{initiator}")
if @domain.disputed?
dispute = Dispute.active.find_by(domain_name: @domain.name)
dispute.close
end
Dispute.close_by_domain(@domain.name) if @domain.disputed?
flash[:notice] = t(:registrant_domain_verification_confirmed)
redirect_to registrant_domain_update_confirm_path(@domain.id, confirmed: true)