1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-01 12:24:28 +01:00

fix syntax + add missing translations

This commit is contained in:
Sylvain 2020-01-07 10:44:29 +01:00
parent 62c979cfc0
commit f778ee9016
5 changed files with 12 additions and 2 deletions

View File

@ -78,7 +78,7 @@ class User < ActiveRecord::Base
scope :without_subscription, -> { includes(statistic_profile: [:subscriptions]).where(subscriptions: { statistic_profile_id: nil }) }
scope :with_subscription, -> { joins(statistic_profile: [:subscriptions]) }
scope :not_confirmed, -> { where(confirmed_at: nil) }
scope :inactive_for_3_years, -> { where("users.last_sign_in_at < ?", 3.years.ago) }
scope :inactive_for_3_years, -> { where('users.last_sign_in_at < ?', 3.years.ago) }
def to_json(*)
ApplicationController.new.view_context.render(

View File

@ -34,7 +34,7 @@ class Members::ListService
'plans.base_name ILIKE :search', search: "%#{params[:search]}%")
end
filter = params[:filter].presence_in(['inactive_for_3_years', 'not_confirmed']) || nil
filter = params[:filter].presence_in(%w[inactive_for_3_years not_confirmed]) || nil
@query = @query.send(filter) if filter
@query

View File

@ -646,6 +646,9 @@ en:
status_enabled: "Enabled"
status_disabled: "Disabled"
status_all: "All"
member_filter_all: "All"
member_filter_not_confirmed: "Unconfirmed"
member_filter_inactive_for_3_years: "Inactive for 3 years"
members_new:
# add a member

View File

@ -591,6 +591,7 @@ es:
groups: "Grupos"
tags: "Tags"
authentication: "Autenticación"
confirmation_required: "Confirmation required"
confirm_delete_member: "¿Desea realmente eliminar este usario? Esto no se puede deshacer."
member_successfully_deleted: "Usario eliminado correctamente."
unable_to_delete_the_member: "No se puede eliminar el usario."
@ -645,6 +646,9 @@ es:
status_enabled: "Enabled"
status_disabled: "Disabled"
status_all: "All"
member_filter_all: "All"
member_filter_not_confirmed: "Unconfirmed"
member_filter_inactive_for_3_years: "Inactive for 3 years"
members_new:
# add a member

View File

@ -646,6 +646,9 @@ pt:
status_enabled: "Ativos"
status_disabled: "Desabilitados"
status_all: "Todos"
member_filter_all: "All"
member_filter_not_confirmed: "Unconfirmed"
member_filter_inactive_for_3_years: "Inactive for 3 years"
members_new:
# add a member