Skip to content

Commit

Permalink
refactoring: Use ticket size description at project exporter
Browse files Browse the repository at this point in the history
  • Loading branch information
martintomas committed Nov 24, 2023
1 parent 946b310 commit 25fe103
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion backend/app/services/backoffice/csv/project_exporter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def call
end
column(I18n.t("backoffice.projects.export.looking_for_funding")) { |r| I18n.t(r.looking_for_funding.to_s) }
column(I18n.t("backoffice.projects.export.ticket_size")) do |r|
r.ticket_size.present? ? TicketSize.find(r.ticket_size).name : ""
r.ticket_size.present? ? "#{TicketSize.find(r.ticket_size).description} (#{TicketSize.find(r.ticket_size).name})" : ""
end
column(I18n.t("backoffice.projects.export.instrument_types")) do |r|
r.instrument_types.to_a.map { |it| InstrumentType.find(it).name }.join(", ")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
query.first.impact_areas.map { |ia| ImpactArea.find(ia).name }.join(", "),
query.first.sdgs.map { |sdg| Sdg.find(sdg).name }.join(", "),
I18n.t(query.first.looking_for_funding.to_s),
TicketSize.find(query.first.ticket_size).name,
"#{TicketSize.find(query.first.ticket_size).description} (#{TicketSize.find(query.first.ticket_size).name})",
query.first.instrument_types.map { |it| InstrumentType.find(it).name }.join(", "),
query.first.funding_plan,
I18n.t(query.first.received_funding),
Expand Down

0 comments on commit 25fe103

Please sign in to comment.