Sha256: 796a0d2fe05bc732c31c1b4bb66af59435a5cea19442fe2798e955ab17bf6629

Contents?: true

Size: 946 Bytes

Versions: 37

Compression:

Stored size: 946 Bytes

Contents

json.data do
  json.array! @follow_ups do |d|
    json.id d.id
    json.clazz d.clazz.name
    json.stage d.stage.name
    json.staff d.staff.user.real_name
    json.description d.description
    json.advise d.advise || ''
    json.school d.business.department&.school&.name
    json.school_id d.business.department&.school&.id
    json.created_at d.created_at.to_s
    json.business d.business.name
    json.business_id d.business.id
    json.rival d.rival || ''
    json.staff_manages d.business.last_follow_up&.assign_follow_ups.present? ? (d.business.last_follow_up.assign_follow_ups.map{ |d| d.staff.user.real_name}.join("、")) : d.business.staff&.user&.real_name
    # teacher_ids = d.key_person.pluck(:teacher_id)
    json.tel d.key_person.pluck(:tel).select { |d| d.present?  }.join("、")
    json.key_people d.key_person.map { |d| d.name }.join("、")# key_people(teacher_ids)

  end
end

json.code 0
json.count @follow_ups.total_count

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
educode_sales-1.10.31 app/views/educode_sales/follow_ups/index.json.jbuilder
educode_sales-1.10.30 app/views/educode_sales/follow_ups/index.json.jbuilder
educode_sales-1.10.29 app/views/educode_sales/follow_ups/index.json.jbuilder
educode_sales-1.10.28 app/views/educode_sales/follow_ups/index.json.jbuilder
educode_sales-1.10.26 app/views/educode_sales/follow_ups/index.json.jbuilder
educode_sales-1.10.25 app/views/educode_sales/follow_ups/index.json.jbuilder
educode_sales-1.10.24 app/views/educode_sales/follow_ups/index.json.jbuilder
educode_sales-1.10.23 app/views/educode_sales/follow_ups/index.json.jbuilder
educode_sales-1.10.22 app/views/educode_sales/follow_ups/index.json.jbuilder
educode_sales-1.10.21 app/views/educode_sales/follow_ups/index.json.jbuilder
educode_sales-1.10.20 app/views/educode_sales/follow_ups/index.json.jbuilder
educode_sales-1.10.19 app/views/educode_sales/follow_ups/index.json.jbuilder
educode_sales-1.10.18 app/views/educode_sales/follow_ups/index.json.jbuilder
educode_sales-1.10.17 app/views/educode_sales/follow_ups/index.json.jbuilder
educode_sales-1.10.16 app/views/educode_sales/follow_ups/index.json.jbuilder
educode_sales-1.10.15 app/views/educode_sales/follow_ups/index.json.jbuilder
educode_sales-1.10.14 app/views/educode_sales/follow_ups/index.json.jbuilder
educode_sales-1.10.13 app/views/educode_sales/follow_ups/index.json.jbuilder
educode_sales-1.10.12 app/views/educode_sales/follow_ups/index.json.jbuilder
educode_sales-1.10.11 app/views/educode_sales/follow_ups/index.json.jbuilder