Sha256: 9906e499033e1bacdbac1583358d86844bb65c96be8958f20bdda8d671523202

Contents?: true

Size: 1.38 KB

Versions: 5

Compression:

Stored size: 1.38 KB

Contents

json.data do
  json.array! @follow_ups do |d|
    json.id d.id
    json.created_at d.created_at.to_s
    json.clazz d.clazz.name
    json.stage d.stage.name
    json.teachers_count d.key_person.size
    json.invitation_at d.invitation_at&.to_s(:date)
    json.reception_at d.reception_at&.to_s(:date)
    json.bidded_date d.bidded_date&.to_s(:date)
    json.signed_date d.signed_date&.to_s(:date)
    json.service_end_time (d.service_start_time.present? && d.service_end_time.present?) ? (d.service_start_time&.to_s + "-" + d.service_end_time&.to_s) : ''
    if d.o_business_deployment.present?
      EducodeSales::FollowUp::BUSINESS_DEPLOYMENT.each do |m|
        if d.o_business_deployment == m[1]
          json.o_business_deployment m[0]
        end
      end
    end
    json.total_amount d.total_amount.to_f.round(2)
    json.actual_amount d.actual_amount.to_f.round(2)
    json.divide_amount (d.divide_amount ? d.divide_amount : "").to_f.round(2)
    json.staff d.staff.user.real_name
    json.place d.place&.name
    json.money_plans_count d.money_plans_count
    json.money d.money_plans.sum(:amount).round(2)
    json.is_latest d.id == @latest&.id
    json.flag d.created_at.present? ? (Time.now - d.created_at).to_f/3600 < 24 : false
    json.description d.description
    json.year d.year
    json.self_flag d.staff_id == @current_admin.id
  end
end

json.code 0
json.count @follow_ups.total_count

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
educode_sales-1.10.74 app/views/educode_sales/businesses/show_follow.json.jbuilder
educode_sales-1.10.73 app/views/educode_sales/businesses/show_follow.json.jbuilder
educode_sales-1.10.72 app/views/educode_sales/businesses/show_follow.json.jbuilder
educode_sales-1.10.71 app/views/educode_sales/businesses/show_follow.json.jbuilder
educode_sales-1.10.70 app/views/educode_sales/businesses/show_follow.json.jbuilder