app/views/educode_sales/teachers/index.json.jbuilder in educode_sales-1.10.10 vs app/views/educode_sales/teachers/index.json.jbuilder in educode_sales-1.10.11
- old
+ new
@@ -25,11 +25,11 @@
json.followup_at d.follow_up&.created_at&.to_s
json.latest_time (d['latest_time'] ? DateTime.parse(Time.now.strftime("%Y-%m-%d")) - DateTime.parse(d['latest_time'].strftime("%Y-%m-%d")) : DateTime.parse(Time.now.strftime("%Y-%m-%d")) - DateTime.parse(d.created_at.strftime("%Y-%m-%d"))).to_i
assign_staff_manages = []
d.assign_staffs.each do |assign|
- assign_staff_manages << assign.staff&.user&.real_name
+ assign_staff_manages << assign.staff&.name
end
json.staff_manage @staff_manages[d.department&.school&.province].present? ? (@staff_manages[d.department&.school&.province] + assign_staff_manages).uniq.join(",") : assign_staff_manages
json.sales_manage @sales_manages[d.department&.school&.province]&.join(",")
if d.department_id
@@ -38,10 +38,10 @@
json.business_count 0
end
json.majors d.department&.department_majors&.pluck(:name).present? ? d.department&.department_majors&.pluck(:name).join(",") : ""
- json.follow_person d.follow_up&.staff&.user&.real_name || ''
+ json.follow_person d.follow_up&.staff&.name || ''
json.created_on d.user.present? ? d.user.created_on.to_s(:date) : ''
json.last_login_on (d.user.present? && d.user.last_login_on.present?) ? d.user.last_login_on.to_s(:date) : ''
json.teacher_used d.teacher_used
json.wechat d.wechat
json.created_at d.created_at.to_s(:date)
\ No newline at end of file