mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
UX: Minor improvements to invites (#12324)
* FIX: Show resend button only if an email was sent Otherwise, show the "save and send email" button. * UX: Copy change * UX: Show feedback when link was copied
This commit is contained in:
@@ -4,6 +4,7 @@ class InviteSerializer < ApplicationSerializer
|
||||
attributes :id,
|
||||
:link,
|
||||
:email,
|
||||
:emailed,
|
||||
:redemption_count,
|
||||
:max_redemptions_allowed,
|
||||
:custom_message,
|
||||
@@ -18,6 +19,14 @@ class InviteSerializer < ApplicationSerializer
|
||||
options[:show_emails] && !object.redeemed?
|
||||
end
|
||||
|
||||
def include_emailed?
|
||||
email.present?
|
||||
end
|
||||
|
||||
def emailed
|
||||
object.emailed_status != Invite.emailed_status_types[:not_required]
|
||||
end
|
||||
|
||||
def expired
|
||||
object.expired?
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user