Sha256: 29dae7e08a25a52d489161a6374f8da2fc443c94be8f33ec37204768a7629fc9

Contents?: true

Size: 1007 Bytes

Versions: 2

Compression:

Stored size: 1007 Bytes

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.total_amount d.total_amount
    json.actual_amount d.actual_amount
    json.divide_amount d.divide_amount ? d.divide_amount : ""
    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

2 entries across 2 versions & 1 rubygems

Version Path
educode_sales-0.7.2 app/views/educode_sales/businesses/show_follow.json.jbuilder
educode_sales-0.7.1 app/views/educode_sales/businesses/show_follow.json.jbuilder