Skip to content

Commit

Permalink
Display invitation status on staff index (#280)
Browse files Browse the repository at this point in the history
  • Loading branch information
marlena-b authored Oct 18, 2023
1 parent 8720b98 commit a0cafab
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
4 changes: 4 additions & 0 deletions app/models/staff_account.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,8 @@ class StaffAccount < ApplicationRecord
def email
user.email.to_s
end

def status
user.invited_to_sign_up? ? :invitation_sent : :enabled
end
end
4 changes: 2 additions & 2 deletions app/views/organizations/staff/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
</div>
<div class="d-flex justify-content-between pt-2">
<span>Status</span>
<span class="text-dark"> Enabled </span>
<span class="text-dark"><%= t("staff_accounts.status.#{staff.status}") %></span>
</div>
</div>
</div>
Expand Down Expand Up @@ -110,7 +110,7 @@
<%= staff.created_at.strftime("%d %B, %Y") %>
</td>
<td>
Enabled
<%= t("staff_accounts.status.#{staff.status}") %>
</td>

<td>
Expand Down
10 changes: 7 additions & 3 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ en:
transport before an adoption can be approved.</li>
after_you_adopt: "After you apply to adopt"
after_you_adopt_items_html: |
<li>Your application history will be shown on 'My Applications' page</li>
<li>Application reviews generally take 4-6 days, depending on volume</li>
<li>We will contact you for further discussion if you are shortlisted </li>
<li>Your application history will be shown on 'My Applications' page</li>
<li>Application reviews generally take 4-6 days, depending on volume</li>
<li>We will contact you for further discussion if you are shortlisted </li>
<li>We work hard to match pets and adopters, so please try again if you are not successful first time round </li>
create_an_account: "Create an account to apply for this pet"
status:
Expand Down Expand Up @@ -207,3 +207,7 @@ en:
will_you_pick_up_the_pet: "Will you or a friend be in La Ventana in person to pick up the pet?"
what_dates_will_you_be: "What dates will you be in La Ventana?"
how_did_you_hear: "How did you find out about Baja Pet Rescue?"
staff_accounts:
status:
invitation_sent: "Invitation sent"
enabled: "Enabled"

0 comments on commit a0cafab

Please sign in to comment.