diff --git a/app/controllers/settings/profiles_controller.rb b/app/controllers/settings/profiles_controller.rb index 256962d9923..882824ecb64 100644 --- a/app/controllers/settings/profiles_controller.rb +++ b/app/controllers/settings/profiles_controller.rb @@ -2,5 +2,6 @@ class Settings::ProfilesController < SettingsController def show @user = Current.user @users = Current.family.users.order(:created_at) + @pending_invitations = Current.family.invitations.pending end end diff --git a/app/views/invitations/new.html.erb b/app/views/invitations/new.html.erb index deb19f2ac10..f8f7174d64e 100644 --- a/app/views/invitations/new.html.erb +++ b/app/views/invitations/new.html.erb @@ -13,11 +13,8 @@ {}, { label: t(".role_label") } %> -
- - <%= form.submit t(".submit"), class: "bg-gray-900 text-white rounded-lg px-4 py-2" %> +
+ <%= form.submit t(".submit"), class: "bg-gray-900 text-white rounded-lg px-4 py-2 w-full" %>
<% end %> <% end %> \ No newline at end of file diff --git a/app/views/settings/profiles/show.html.erb b/app/views/settings/profiles/show.html.erb index c12122ab69b..8f4cd81d5bb 100644 --- a/app/views/settings/profiles/show.html.erb +++ b/app/views/settings/profiles/show.html.erb @@ -45,6 +45,19 @@
<% end %> + <% if @pending_invitations.any? %> + <% @pending_invitations.each do |invitation| %> +
+
+
<%= invitation.email[0] %>
+
+

<%= invitation.email %>

+
+

<%= t(".pending") %>

+
+
+ <% end %> + <% end %> <% if Current.user.admin? %> <%= link_to new_invitation_path, class: "bg-gray-100 flex items-center justify-center gap-2 text-gray-500 mt-1 hover:bg-gray-200 rounded-lg px-4 py-2 w-full text-center", diff --git a/config/locales/views/invitations/en.yml b/config/locales/views/invitations/en.yml index de03dee4f11..5a0158c2621 100644 --- a/config/locales/views/invitations/en.yml +++ b/config/locales/views/invitations/en.yml @@ -5,7 +5,7 @@ en: failure: "Could not send invitation" new: title: Invite Someone - subtitle: Send an invitation to join your family + subtitle: Send an invitation to join your family account on Maybe email_placeholder: Enter email address email_label: Email Address role_member: Member diff --git a/config/locales/views/settings/en.yml b/config/locales/views/settings/en.yml index 657ef5fe15c..eaef2c4650e 100644 --- a/config/locales/views/settings/en.yml +++ b/config/locales/views/settings/en.yml @@ -61,6 +61,7 @@ en: profile_subtitle: Customize how you appear on Maybe profile_title: Profile save: Save + pending: Pending user_avatar_field: accepted_formats: JPG or PNG. 5MB max. choose: Choose