diff --git a/app/controllers/contributions_controller.rb b/app/controllers/contributions_controller.rb index d388c79..bbc0549 100644 --- a/app/controllers/contributions_controller.rb +++ b/app/controllers/contributions_controller.rb @@ -33,7 +33,7 @@ class ContributionsController < ApplicationController [year, @due_members.select {|m| m.expires_on < Date.new(year, 12, 31) }.map { |m| OpenStruct.new( member: m, - amount: m.category == 'normal' ? 30 : 6, + amount: m.employed? ? 30 : 6, ) }] end diff --git a/app/models/member.rb b/app/models/member.rb index e318963..4e99ba2 100644 --- a/app/models/member.rb +++ b/app/models/member.rb @@ -12,6 +12,10 @@ class Member < ApplicationRecord update(status: expected_status) end + def employed? + category == "normal" || category == "employed" + end + def remove_personal_information! update( excluded: true, diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 3e16bba..26a489e 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -18,6 +18,7 @@
  • <%= link_to t('navigation.board'), edit_board_path %>
  • <%= link_to t('navigation.notifications'), notifications_path %>
  • <%= link_to t('navigation.contributions'), contributions_path %>
  • +
  • <%= link_to t('navigation.due_contributions'), due_contributions_path %>
  • <%= button_to sign_out_path, method: :delete do %> Sign out of <%= current_user.email %> diff --git a/config/locales/en.yml b/config/locales/en.yml index f004c79..f19d7be 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -4,6 +4,7 @@ en: board: "Board" notifications: "Notificações" contributions: "Contributions" + due_contributions: "Dues" members: index: title: "Members" diff --git a/config/locales/pt.yml b/config/locales/pt.yml index f4a7245..7fa2731 100644 --- a/config/locales/pt.yml +++ b/config/locales/pt.yml @@ -7,6 +7,7 @@ pt: board: "Direcção" notifications: "Notificações" contributions: "Contribuições" + due_contributions: "Dívidas" members: delete: confirmation_message: |