show invited users in invite field

This commit is contained in:
Rahul 2019-08-05 00:35:56 +05:30 committed by rahul2240
parent 8b2f2b538e
commit af0799990c
8 changed files with 11 additions and 5 deletions

View file

@ -50,6 +50,7 @@ module Admin
def edit
@url = admin_conference_booth_path(@conference.short_title, @booth.id)
@invitation_pending_emails = @booth.invited_responsibles.pluck(:email).join(',')
end
def update

View file

@ -34,6 +34,7 @@ class BoothsController < ApplicationController
def edit
@url = conference_booth_path(@conference.short_title, @booth.id)
@invitation_pending_emails = @booth.invited_responsibles.pluck(:email).join(',')
end
def update

View file

@ -84,4 +84,8 @@ class Booth < ApplicationRecord
end
alert
end
def invited_responsibles
responsibles.where(last_sign_in_at: nil)
end
end

View file

@ -2,4 +2,4 @@
Editing
= @booth.title
= render 'booths/form'
= render 'booths/form', invitation_pending_emails: @invitation_pending_emails

View file

@ -1,3 +1,3 @@
%h1 New #{t'booth'}
= render 'booths/form'
= render 'booths/form', invitation_pending_emails: ''

View file

@ -12,7 +12,7 @@
hint: 'e.g. employee, comunity manager, etc'
= f.input :website_url
= responsibles_selector_input f
= f.input :invite_responsible,
= f.input :invite_responsible, input_html: { value: invitation_pending_emails },
hint: "This field is to invite unregistered users using their email to become #{(t'booth_responsible').pluralize}."
= image_tag f.object.picture.thumb.url if f.object.picture?
= f.input :picture

View file

@ -3,4 +3,4 @@
Editing
= @booth.title
= render 'form'
= render 'form', invitation_pending_emails: @invitation_pending_emails

View file

@ -1,4 +1,4 @@
.container
%h1 Request a #{t'booth'}
= render 'form'
= render 'form', invitation_pending_emails: ''