Aggiunge i tornei con hub, pagina pubblica e tabellone per semifinali e finali.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
module Tournaments
|
||||
class RevokeAssignment
|
||||
def self.call(assignment:)
|
||||
new(assignment).call
|
||||
end
|
||||
|
||||
def initialize(assignment)
|
||||
@assignment = assignment
|
||||
end
|
||||
|
||||
def call
|
||||
invitation = @assignment.invitation
|
||||
@assignment.destroy!
|
||||
return unless invitation
|
||||
|
||||
leftover = invitation.assignments.reload.pluck(:match_id).map(&:to_s)
|
||||
invitation.update!(scope_kind: "matches", match_ids: leftover, court: nil, on_date: nil)
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user