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:
Dan Ungureanu
2021-03-09 16:56:18 +02:00
committed by GitHub
parent d1cf773730
commit 687e09c885
4 changed files with 29 additions and 14 deletions

View File

@@ -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