mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-26 20:54:21 +01:00
fix export for missing users
This commit is contained in:
parent
c863975e9c
commit
e765267bb5
@ -32,9 +32,9 @@ wb.add_worksheet(name: @index.label) do |sheet|
|
||||
subtype = get_item(@subtypes, hit['_source']['subType'], 'key')
|
||||
data = [
|
||||
Date::strptime(hit['_source']['date'],'%Y-%m-%d'),
|
||||
user.profile.full_name,
|
||||
user.email,
|
||||
user.profile.phone,
|
||||
(user ? user.profile.full_name : "ID #{hit['_source']['userId']}"),
|
||||
(user ? user.email : ''),
|
||||
(user ? user.profile.phone : ''),
|
||||
t("export.#{hit['_source']['gender']}"),
|
||||
hit['_source']['age'],
|
||||
subtype.nil? ? "" : subtype.label
|
||||
|
@ -30,9 +30,9 @@ date = wb.styles.add_style :format_code => Rails.application.secrets.excel_date_
|
||||
# start to fill data and associated styles and data-types
|
||||
data = [
|
||||
Date::strptime(hit['_source']['date'],'%Y-%m-%d'),
|
||||
user.profile.full_name,
|
||||
user.email,
|
||||
user.profile.phone,
|
||||
(user ? user.profile.full_name : "ID #{hit['_source']['userId']}"),
|
||||
(user ? user.email : ''),
|
||||
(user ? user.profile.phone : ''),
|
||||
t("export.#{hit['_source']['gender']}"),
|
||||
hit['_source']['age'],
|
||||
subtype.nil? ? "" : subtype.label
|
||||
|
Loading…
x
Reference in New Issue
Block a user