Sha256: 161ff57f2a1040222a93067d76e1e74bbbbd4db61110b6e9e2fa76dcc04da7e0

Contents?: true

Size: 1.39 KB

Versions: 106

Compression:

Stored size: 1.39 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_people_count
    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.where(clazz: 1).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

106 entries across 106 versions & 1 rubygems

Version Path
educode_sales-0.9.25 app/views/educode_sales/businesses/show_follow.json.jbuilder
educode_sales-0.9.24 app/views/educode_sales/businesses/show_follow.json.jbuilder
educode_sales-0.9.23 app/views/educode_sales/businesses/show_follow.json.jbuilder
educode_sales-0.9.22 app/views/educode_sales/businesses/show_follow.json.jbuilder
educode_sales-0.9.21 app/views/educode_sales/businesses/show_follow.json.jbuilder
educode_sales-0.9.20 app/views/educode_sales/businesses/show_follow.json.jbuilder
educode_sales-0.9.19 app/views/educode_sales/businesses/show_follow.json.jbuilder
educode_sales-0.9.18 app/views/educode_sales/businesses/show_follow.json.jbuilder
educode_sales-0.9.17 app/views/educode_sales/businesses/show_follow.json.jbuilder
educode_sales-0.9.16 app/views/educode_sales/businesses/show_follow.json.jbuilder
educode_sales-0.9.15 app/views/educode_sales/businesses/show_follow.json.jbuilder
educode_sales-0.9.14 app/views/educode_sales/businesses/show_follow.json.jbuilder
educode_sales-0.9.13 app/views/educode_sales/businesses/show_follow.json.jbuilder
educode_sales-0.9.12 app/views/educode_sales/businesses/show_follow.json.jbuilder
educode_sales-0.9.11 app/views/educode_sales/businesses/show_follow.json.jbuilder
educode_sales-0.9.10 app/views/educode_sales/businesses/show_follow.json.jbuilder
educode_sales-0.9.9 app/views/educode_sales/businesses/show_follow.json.jbuilder
educode_sales-0.9.8 app/views/educode_sales/businesses/show_follow.json.jbuilder
educode_sales-0.9.7 app/views/educode_sales/businesses/show_follow.json.jbuilder
educode_sales-0.9.6 app/views/educode_sales/businesses/show_follow.json.jbuilder