Sha256: c5d192c60434b583b6694bd8186528092974c9f77fa2200c82a68b46abab26d9

Contents?: true

Size: 1.57 KB

Versions: 6

Compression:

Stored size: 1.57 KB

Contents

module C80Estate
  module AppHelper

    def render_table_prop_busy_coef(atype_id: nil)
      # Rails.logger.debug "<render_table_prop_busy_coef> atype_id = #{atype_id}"

      props = Property.all
      list = []

      props.all.each do |prop|
        pp = Pstat.busy_coef(prop_id: prop.id, atype_id: atype_id)
        # Rails.logger.debug "<render_table_prop_busy_coef> pp = #{pp}"
        busy_coef = pp[:busy_coef]
        props = pp[:raw_props]
        list << {
            title: prop.title,
            busy_coef: busy_coef,
            props: props
        }
        # Rails.logger.debug "<render_table_prop_busy_coef> #{prop.title}"
      end

      render :partial => 'c80_estate/shared/table_properties_coef_busy',
             :locals => {
                 list: list
             }
    end

    def render_table_prop_busy_coef_sq(atype_id: nil)
      Rails.logger.debug "<render_table_prop_busy_coef_sq> atype_id = #{atype_id}"

      props = Property.all
      list = []

      props.all.each do |prop|
        pp = Pstat.busy_coef(prop_id: prop.id, atype_id: atype_id)
        # Rails.logger.debug "<render_table_prop_busy_coef> pp = #{pp}"
        busy_coef_sq = pp[:busy_coef_sq]
        props = pp[:raw_props_sq]
        list << {
            title: prop.title,
            busy_coef: busy_coef_sq,
            props: props
        }
        # Rails.logger.debug "<render_table_prop_busy_coef> #{prop.title}"
      end

      render :partial => 'c80_estate/shared/table_properties_coef_busy_sq',
             :locals => {
                 list: list
             }
    end

  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
c80_estate-0.1.0.9 app/helpers/c80_estate/app_helper.rb
c80_estate-0.1.0.8 app/helpers/c80_estate/app_helper.rb
c80_estate-0.1.0.7 app/helpers/c80_estate/app_helper.rb
c80_estate-0.1.0.6 app/helpers/c80_estate/app_helper.rb
c80_estate-0.1.0.5 app/helpers/c80_estate/app_helper.rb
c80_estate-0.1.0.4 app/helpers/c80_estate/app_helper.rb