fix error
This commit is contained in:
1 parent
5b7cac3970
commit
636a7aa71d
3 files changed
+7
-3
No files matched your search
@@ -439,7 +439,7 @@ class Admin::AsksController < OrbitAdminController
|
||||
def get_fields_with_key(s)
|
||||
fields_with_key = {}
|
||||
fields_with_key['default_values'] = s.default_setting.collect{|k,v| [k, process_trans(s.field_name_translations(k))] if v && !['ask_category_id','recaptcha'].include?(k)}.compact
|
||||
fields_with_key['default_values'] = [['ask_category_id', process_trans(s.field_name_translations('ask_category_id'))]] + fields_with_key['default_values']
|
||||
fields_with_key['default_values'] = [['ask_category_id', process_trans(s.field_name_translations('ask_category_id'))]] + [['situation', process_trans(I18n.available_locales.map{|v| [v.to_s, I18n.with_locale(v){I18n.t('ask.situation')}]}.to_h)]] + fields_with_key['default_values']
|
||||
fields_with_key['default_values'] = fields_with_key['default_values'].to_h
|
||||
fields_with_key['custom_values'] = s.custom_fields.collect{|k, field_setting| [k, process_trans(field_setting['field'])]}.to_h
|
||||
fields_with_key
|
||||
@@ -460,6 +460,7 @@ class Admin::AsksController < OrbitAdminController
|
||||
end
|
||||
ask_category_settings[nil] = ask_default_setting
|
||||
fields_with_key_group[nil] = get_fields_with_key(ask_default_setting)
|
||||
situations = AskTicketStatus.all.collect{|situation| [situation.key, situation.get_title_translations]}
|
||||
render xlsx: 'do_export.xlsx',
|
||||
handlers: ['axlsx'],
|
||||
filename: "Questions-#{date_start}-#{date_end}.xlsx",
|
||||
@@ -467,7 +468,8 @@ class Admin::AsksController < OrbitAdminController
|
||||
:ask_category_settings => ask_category_settings,
|
||||
:fields_with_key_group => fields_with_key_group,
|
||||
:categories => categories.collect{|c| [c.id, c]}.to_h,
|
||||
:ask_questions => ask_questions
|
||||
:ask_questions => ask_questions,
|
||||
:situations => situations
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
Reference in new issue
Block a user