fix error

This commit is contained in:
邱博亞 2022-03-10 13:54:53 +08:00
parent 3738a57736
commit 60f1a918da
1 changed files with 10 additions and 3 deletions

View File

@ -428,7 +428,10 @@ class Admin::ApplicationFormsController < OrbitAdminController
end
def copy
@application_form = ApplicationFormMain.find(params[:id]).clone_new
@member = MemberProfile.where(:id.in=>@application_form.reviewer_ids).to_a
@member_1st = MemberProfile.where(:id.in=>@application_form.reviewer_1st_ids).to_a rescue []
@member_2nd = MemberProfile.where(:id.in=>@application_form.reviewer_2nd_ids).to_a rescue []
@member_3rd = MemberProfile.where(:id.in=>@application_form.reviewer_3rd_ids).to_a rescue []
@email_set = @application_form.application_form_email_sets
@signup_sets = @application_form.application_form_signup_field_sets
@submission_set = @application_form.application_form_submission_field_sets
@ -437,7 +440,9 @@ class Admin::ApplicationFormsController < OrbitAdminController
@review = @application_form.application_form_reviews.first
end
def new
@member = nil
@member_1st = nil
@member_2nd = nil
@member_3rd = nil
@application_form = ApplicationFormMain.new
create_set (false)
@signup_sets = @application_form.application_form_signup_field_sets
@ -523,7 +528,9 @@ class Admin::ApplicationFormsController < OrbitAdminController
@signup_sets = @application_form.application_form_signup_field_sets
@submission_set = @application_form.application_form_submission_field_sets
@custom_set = @application_form.application_form_signup_field_customs
@member = MemberProfile.where(:id.in=>@application_form.reviewer_ids).to_a rescue []
@member_1st = MemberProfile.where(:id.in=>@application_form.reviewer_1st_ids).to_a rescue []
@member_2nd = MemberProfile.where(:id.in=>@application_form.reviewer_2nd_ids).to_a rescue []
@member_3rd = MemberProfile.where(:id.in=>@application_form.reviewer_3rd_ids).to_a rescue []
if (@application_form.organizer_id == current_user.member_profile_id rescue false)
@user_authorized_categories = @module_app.categories.enabled.to_a
else