mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-11-28 09:24:24 +01:00
(bug) unable to show gender in global export
This commit is contained in:
parent
04d6d24a8a
commit
1e69a1eb37
@ -2,6 +2,8 @@
|
||||
|
||||
## Next release
|
||||
|
||||
- Fix a bug: unable to show gender in global export
|
||||
|
||||
## v6.3.27 2024 June 12
|
||||
|
||||
- Fix a bug: unable to show gender wowan in member export
|
||||
|
@ -31,7 +31,7 @@ module ExcelHelper
|
||||
user&.profile&.full_name || t('export.deleted_user'),
|
||||
user&.email || '',
|
||||
user&.profile&.phone || '',
|
||||
hit['_source']['gender'].nil? ? t("export.#{hit['_source']['gender']}") : '',
|
||||
!hit['_source']['gender'].nil? ? t("export.#{hit['_source']['gender']}") : '',
|
||||
hit['_source']['age'],
|
||||
subtype.nil? ? '' : subtype.label
|
||||
]
|
||||
|
@ -31,7 +31,7 @@ class StatisticProfile < ApplicationRecord
|
||||
validate :check_birthday_in_past
|
||||
|
||||
def str_gender
|
||||
return '' if gender.blank?
|
||||
return '' if gender.nil?
|
||||
|
||||
gender ? 'male' : 'female'
|
||||
end
|
||||
|
@ -51,7 +51,7 @@ wb.add_worksheet(name: ExcelService.name_safe(t('export_members.members'))) do |
|
||||
member.email,
|
||||
member.is_allow_newsletter,
|
||||
member.last_sign_in_at&.to_date,
|
||||
member.statistic_profile.gender.nil? ? (member.statistic_profile.gender ? t('export_members.man') : t('export_members.woman')) : '',
|
||||
!member.statistic_profile.gender.nil? ? (member.statistic_profile.gender ? t('export_members.man') : t('export_members.woman')) : '',
|
||||
member.statistic_profile.age,
|
||||
member.invoicing_profile&.address&.address || '',
|
||||
member.profile.phone,
|
||||
|
Loading…
Reference in New Issue
Block a user