diff --git a/CHANGELOG.md b/CHANGELOG.md index eda4a4023..725952e32 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # Changelog Fab-manager + - Report user's prepaid packs in the dashboard +- Export external ID and private notes in the members excel export - Ability to buy a new prepaid pack from the user's dashboard - Improved public calendar loading time - Fix a bug: schedules jobs are not launched at the right time diff --git a/app/views/exports/users_members.xlsx.axlsx b/app/views/exports/users_members.xlsx.axlsx index c77ca49bf..be786b317 100644 --- a/app/views/exports/users_members.xlsx.axlsx +++ b/app/views/exports/users_members.xlsx.axlsx @@ -6,10 +6,10 @@ header = wb.styles.add_style b: true, bg_color: Stylesheet.primary.upcase.gsub(' date = wb.styles.add_style format_code: Rails.application.secrets.excel_date_format wb.add_worksheet(name: t('export_members.members')) do |sheet| - ## data table # heading labels columns = [t('export_members.id'), + t('export_members.external_id'), t('export_members.surname'), t('export_members.first_name'), t('export_members.email'), @@ -34,7 +34,8 @@ wb.add_worksheet(name: t('export_members.members')) do |sheet| t('export_members.twitter'), t('export_members.echo_sciences'), t('export_members.organization'), - t('export_members.organization_address')] + t('export_members.organization_address'), + t('export_members.note')] sheet.add_row columns, style: header # data rows @@ -42,6 +43,7 @@ wb.add_worksheet(name: t('export_members.members')) do |sheet| expiration = member&.subscription&.expired_at data = [ member.id, + member.invoicing_profile.external_id || '', member.profile.last_name, member.profile.first_name, member.email, @@ -66,13 +68,14 @@ wb.add_worksheet(name: t('export_members.members')) do |sheet| member.profile.twitter || '', member.profile.echosciences || '', member.invoicing_profile&.organization&.name || '', - member.invoicing_profile&.organization&.address&.address || '' + member.invoicing_profile&.organization&.address&.address || '', + ActionController::Base.helpers.sanitize(member.profile.note, tags: []) || '' ] - styles = [nil, nil, nil, nil, nil, date, nil, nil, nil, nil, nil, nil, nil, - nil, nil, nil, date, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil] + styles = [nil, nil, nil, nil, nil, nil, date, nil, nil, nil, nil, nil, nil, nil, + nil, nil, nil, date, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil, nil] - types = %i[integer string string string boolean date string integer string string string string string - string string string date string string integer string string string string string string string] + types = %i[integer string string string string boolean date string integer string string string string string + string string string date string string integer string string string string string string string string] sheet.add_row data, style: styles, types: types end diff --git a/config/locales/en.yml b/config/locales/en.yml index f03460289..9ab87a69e 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -195,6 +195,7 @@ en: export_members: members: "Members" id: "ID" + external_id: "External ID" surname: "Surname" first_name: "First name" email: "E-mail" @@ -220,6 +221,7 @@ en: echo_sciences: "Echosciences" organization: "Organization" organization_address: "Organization address" + note: "Note" man: "Man" woman: "Woman" without_subscriptions: "Without subscriptions"