allow to invite party

This commit is contained in:
Pete Matsyburka
2024-09-12 17:31:37 +03:00
committed by Oleksandr Turchyn
parent 3604fb6461
commit 10fbdf6612
27 changed files with 322 additions and 43 deletions
+2 -4
View File
@@ -23,7 +23,7 @@ class StartFormController < ApplicationController
if @submitter.completed_at?
redirect_to start_form_completed_path(@template.slug, email: submitter_params[:email])
else
if filter_undefined_submitters(@template).size > 2 && @submitter.new_record?
if filter_undefined_submitters(@template).size > 1 && @submitter.new_record?
@error_message = 'Not found'
return render :show
@@ -95,9 +95,7 @@ class StartFormController < ApplicationController
end
def filter_undefined_submitters(template)
template.submitters.select do |item|
item['linked_to_uuid'].blank? && item['is_requester'].blank? && item['email'].blank?
end
Templates.filter_undefined_submitters(template)
end
def submitter_params