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-1.0.8 app/views/educode_sales/businesses/show_follow.json.jbuilder
educode_sales-1.0.7 app/views/educode_sales/businesses/show_follow.json.jbuilder
educode_sales-1.0.6 app/views/educode_sales/businesses/show_follow.json.jbuilder
educode_sales-1.0.5 app/views/educode_sales/businesses/show_follow.json.jbuilder
educode_sales-1.0.4 app/views/educode_sales/businesses/show_follow.json.jbuilder
educode_sales-1.0.3 app/views/educode_sales/businesses/show_follow.json.jbuilder
educode_sales-1.0.2 app/views/educode_sales/businesses/show_follow.json.jbuilder
educode_sales-1.0.1 app/views/educode_sales/businesses/show_follow.json.jbuilder
educode_sales-1.0.0 app/views/educode_sales/businesses/show_follow.json.jbuilder
educode_sales-0.9.99 app/views/educode_sales/businesses/show_follow.json.jbuilder
educode_sales-0.9.98 app/views/educode_sales/businesses/show_follow.json.jbuilder
educode_sales-0.9.97 app/views/educode_sales/businesses/show_follow.json.jbuilder
educode_sales-0.9.96 app/views/educode_sales/businesses/show_follow.json.jbuilder
educode_sales-0.9.95 app/views/educode_sales/businesses/show_follow.json.jbuilder
educode_sales-0.9.94 app/views/educode_sales/businesses/show_follow.json.jbuilder
educode_sales-0.9.93 app/views/educode_sales/businesses/show_follow.json.jbuilder
educode_sales-0.9.92 app/views/educode_sales/businesses/show_follow.json.jbuilder
educode_sales-0.9.91 app/views/educode_sales/businesses/show_follow.json.jbuilder
educode_sales-0.9.90 app/views/educode_sales/businesses/show_follow.json.jbuilder
educode_sales-0.9.89 app/views/educode_sales/businesses/show_follow.json.jbuilder