Sha256: bce7ef4c50137e7ab2a40623f5d81f3841668f97cc1010000180406980a81b7c

Contents?: true

Size: 1.11 KB

Versions: 11

Compression:

Stored size: 1.11 KB

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)

    if d.business.department&.school
      json.property d.business.department.school.school_tags.where(for_missions: true).pluck(:name).join("、")
    else
      json.property ''
    end
  end
end

json.code 0
json.count @follow_ups.total_count

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
educode_sales-1.10.59 app/views/educode_sales/follow_ups/index.json.jbuilder
educode_sales-1.10.58 app/views/educode_sales/follow_ups/index.json.jbuilder
educode_sales-1.10.49 app/views/educode_sales/follow_ups/index.json.jbuilder
educode_sales-1.10.48 app/views/educode_sales/follow_ups/index.json.jbuilder
educode_sales-1.10.46 app/views/educode_sales/follow_ups/index.json.jbuilder
educode_sales-1.10.41 app/views/educode_sales/follow_ups/index.json.jbuilder
educode_sales-1.10.37 app/views/educode_sales/follow_ups/index.json.jbuilder
educode_sales-1.10.36 app/views/educode_sales/follow_ups/index.json.jbuilder
educode_sales-1.10.35 app/views/educode_sales/follow_ups/index.json.jbuilder
educode_sales-1.10.34 app/views/educode_sales/follow_ups/index.json.jbuilder
educode_sales-1.10.33 app/views/educode_sales/follow_ups/index.json.jbuilder