c80_estate 0.1.0.24 → 0.1.0.25

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ef2fd40a5a56b010a8f348b3fee51344c9ac6afe
4
- data.tar.gz: 0522badb1eabaf838438ea71bfdfc7b26993d3f5
3
+ metadata.gz: 2e29a80c9e9d8c27a7da34b90c97de9d558f0327
4
+ data.tar.gz: 0246a85e677bf616ad4deb1a1c6f5eee56841a72
5
5
  SHA512:
6
- metadata.gz: 853424edb0f2f40dca3c37bc2e3c0b67ec89e508fa99b4d2fcb8f16abe36c8956bb0d834e3d9061724eb10c86c368de4ee800252b168d163b2e2d986754bf6f8
7
- data.tar.gz: 43c176bfccb484be8307983ce4181aae81a167d145db3ecfc7878f69dc6cca03e917c4351a61ab8c8e2ac628ec8df73100c78835805c09b8994bdc01b770ffa1
6
+ metadata.gz: ad1794c07078d601fb84a63be77ceaf91604a0160179691e754e5b43618d5262a744609bb170c334f0108bc6d1a4131f8a2330791c67095d063a9553a9673776
7
+ data.tar.gz: 6bfd0423c236c32a734aba586d85812e38b420cc86da26ddb7774514a1884ca4a6cf3fb3c601fdcd4389f1225d83ce973a09783aa1bd8a36b129645b3d05a3f5
@@ -148,13 +148,13 @@ ActiveAdmin.register C80Estate::Area, as: 'Area' do
148
148
  area.atype_title
149
149
  end
150
150
  column '<abbr title="За м.кв. в месяц">Цена м.кв.</abbr>'.html_safe do |area|
151
- "#{area.price_value} руб"
151
+ "#{area.price_value.to_s(:rounded, :precision => 2)} руб"
152
152
  end
153
153
  column '<abbr title="Стоимость всей площади в месяц. Число PxS, где P - цена за м.кв. в месяц, S - метраж площади в м.кв.">Цена площади</abbr>'.html_safe do |area|
154
- "#{area.power_price_value} руб"
154
+ "#{area.power_price_value.to_s(:rounded, :precision => 2)} руб"
155
155
  end
156
156
  column 'Метраж' do |area|
157
- "#{area.square_value} м<sup>2</sup>".html_safe
157
+ "#{area.square_value.to_s(:rounded, :precision => 2)} м<sup>2</sup>".html_safe
158
158
  end
159
159
  column :property do |area|
160
160
  "<div class='image_vertical properties_index_logo'>
@@ -184,7 +184,9 @@ ActiveAdmin.register C80Estate::Area, as: 'Area' do
184
184
  f.inputs 'Свойства' do
185
185
  f.input :title
186
186
  f.input :atype, :input_html => {:class => 'selectpicker', 'data-size' => "10", 'data-width' => '400px'}
187
- f.input :property, :input_html => {:class => 'selectpicker', 'data-size' => "10", 'data-width' => '400px'}
187
+ f.input :property,
188
+ :input_html => {:class => 'selectpicker', 'data-size' => "10", 'data-width' => '400px'},
189
+ :collection => C80Estate::Property.where(:assigned_person_id => current_admin_user.id).map { |p| ["#{p.title}", p.id] }
188
190
  # f.input :assigned_person,
189
191
  # :input_html => {:class => 'selectpicker', 'data-size' => "10", 'data-width' => '400px'},
190
192
  # :collection => AdminUser.all.map { |u| ["#{u.email}", u.id] }
@@ -29,8 +29,12 @@ ActiveAdmin.register C80Estate::Pstat, as: 'Pstat' do
29
29
  end
30
30
  column :free_areas
31
31
  column :busy_areas
32
- column :coef_busy
33
- column :coef_busy_sq
32
+ column :coef_busy do |pst|
33
+ pst.coef_busy.to_s(:rounded, :precision => 2)
34
+ end
35
+ column :coef_busy_sq do |pst|
36
+ pst.coef_busy_sq(:rounded, :precision => 2)
37
+ end
34
38
  column :created_at
35
39
  actions
36
40
  end
@@ -102,12 +102,7 @@ var fAreasShow_go = function () {
102
102
  type: 'POST',
103
103
  dataType: 'json',
104
104
  data: {
105
- area_id: area_id//,
106
- //atype_id: atype_id,
107
- //property_id: property_id,
108
- //auser_id: auser_id,
109
- //start_date: start_date,
110
- //end_date: end_date
105
+ area_id: area_id
111
106
  }
112
107
  }).done(function (data, result) {
113
108
  if (result == 'success') {
@@ -331,6 +326,18 @@ var fAreasShow_go = function () {
331
326
 
332
327
  };
333
328
 
329
+ var fAreasShow_initActionItems = function (area_id) {
330
+
331
+ var html_str = "";
332
+ html_str += "<span class='action_item'><a href='/admin/areas/{ID}/edit'>Изменить</a></span>";
333
+ html_str += "<span class='action_item'><a class='has_many_remove' data-confirm='Вы уверены, что хотите удалить это?' rel='nofollow' data-method='delete' href='/admin/areas/{ID}'>Удалить</a></span>";
334
+ html_str = html_str.split("{ID}").join(area_id);
335
+
336
+ $("div.action_items").html($("<div></div>"))
337
+ .append($(html_str))
338
+ .css('opacity','1');
339
+ };
340
+
334
341
  var fAreasShow = function () {
335
342
 
336
343
  // зафиксируем html элементы
@@ -340,5 +347,22 @@ var fAreasShow = function () {
340
347
  url: '/estate/can_view_statistics_area',
341
348
  type: 'POST',
342
349
  dataType:'script'
343
- })
350
+ });
351
+
352
+ var area_id = -1;
353
+ var url = unescape(window.location.href);
354
+ var match_res = url.match(/areas\/(\d{1,9})/);
355
+ if (match_res != null) {
356
+ area_id = Number(match_res[1]);
357
+ }
358
+
359
+ $.ajax({
360
+ url: '/estate/can_edit_area',
361
+ type: 'POST',
362
+ data: {
363
+ area_id: area_id
364
+ },
365
+ dataType:'script'
366
+ });
367
+
344
368
  };
@@ -468,7 +468,7 @@ var fPropertiesShow = function () {
468
468
  $main_content = $('#main_content');
469
469
 
470
470
  $.ajax({
471
- url: '/estate/can_view_statistics',
471
+ url: '/estate/can_view_statistics_property',
472
472
  type: 'POST',
473
473
  dataType:'script'
474
474
  })
@@ -58,6 +58,9 @@ var fSeventsIndex = function () {
58
58
  $div_index_adds.append($div_area_text_stats);
59
59
  $div_index_adds.append($div_graph);
60
60
 
61
+ var $h = $('<h4 class="sub_h4">Последние события</h4>');
62
+ $div_index_adds.append($h);
63
+
61
64
  $main_content.prepend($div_index_adds);
62
65
 
63
66
  // теперь покажем
@@ -60,8 +60,13 @@ body.admin_areas {
60
60
 
61
61
  form fieldset > ol > li.boolean {
62
62
  height: auto;
63
- &#item_is_main_input {padding-bottom: 20px;padding-top: 0;}
64
- &#item_is_sale_input {padding-bottom: 0;}
63
+ &#item_is_main_input {
64
+ padding-bottom: 20px;
65
+ padding-top: 0;
66
+ }
67
+ &#item_is_sale_input {
68
+ padding-bottom: 0;
69
+ }
65
70
  label {
66
71
  font-weight: bold;
67
72
  color: #5E6469;
@@ -76,7 +81,9 @@ body.admin_areas {
76
81
  // спрячем артефакт
77
82
  li#area_galleries_input {
78
83
  fieldset.choices {
79
- legend.label { display:none; }
84
+ legend.label {
85
+ display: none;
86
+ }
80
87
  }
81
88
  }
82
89
 
@@ -102,7 +109,9 @@ body.admin_areas {
102
109
  .fieldset_item_props {
103
110
  background-color: white !important;
104
111
  box-shadow: none !important;
105
- legend { display: none !important; }
112
+ legend {
113
+ display: none !important;
114
+ }
106
115
  }
107
116
 
108
117
  }
@@ -155,6 +164,21 @@ body.admin_areas {
155
164
 
156
165
  &.show {
157
166
 
167
+ #title_bar .action_items {
168
+ opacity: 0;
169
+
170
+ span.action_item > a {
171
+ &.has_many_remove {
172
+ border: 1px solid #ED4F32 !important;
173
+ margin-left: 10px;
174
+ &:hover {
175
+ background-color: #ED4F32 !important;
176
+ color: white !important;
177
+ }
178
+ }
179
+ }
180
+ }
181
+
158
182
  div#main_content {
159
183
  opacity: 0;
160
184
 
@@ -47,6 +47,16 @@ body.admin_sevents {
47
47
  display: none !important;
48
48
  }
49
49
 
50
+ h4.sub_h4 {
51
+ clear: both;
52
+ font-size: 18px;
53
+ padding-top: 10px;
54
+ padding-bottom: 0;
55
+ height: 23px;
56
+ display: block;
57
+ float: left;
58
+ }
59
+
50
60
  }
51
61
 
52
62
  }
@@ -74,5 +74,22 @@ module C80Estate
74
74
 
75
75
  end
76
76
 
77
+ def can_edit_area
78
+
79
+ area_id = request.params[:area_id] == "" ? nil:request.params[:area_id]
80
+ @res = false
81
+
82
+ if area_id != ''
83
+ @area = Area.find(area_id)
84
+ @res = current_admin_user.can_edit_area?(@area)
85
+ end
86
+
87
+ respond_to do |format|
88
+ format.js
89
+ # format.json
90
+ end
91
+
92
+ end
93
+
77
94
  end
78
95
  end
@@ -121,21 +121,21 @@ module C80Estate
121
121
  {
122
122
  title: 'Метраж',
123
123
  abbr: 'Объем площади',
124
- value: area.square_value,
124
+ value: area.square_value.to_s(:rounded, precision: 2),
125
125
  uom: 'м.кв.',
126
126
  css:''
127
127
  },
128
128
  {
129
129
  title: 'Цена',
130
130
  abbr: 'За метр квадратный в месяц',
131
- value: area.price_value,
131
+ value: area.price_value.to_s(:rounded, precision: 2),
132
132
  uom: 'руб',
133
133
  css:''
134
134
  },
135
135
  {
136
136
  title: 'Цена площади',
137
137
  abbr: 'Стоимость всей площади в месяц. Число PxS, где P - цена за м.кв. в месяц, S - метраж площади в м.кв.',
138
- value: area.power_price_value,
138
+ value: area.power_price_value.to_s(:rounded, precision: 2),
139
139
  uom: 'руб',
140
140
  css:''
141
141
  },
@@ -43,12 +43,14 @@ module C80Estate
43
43
 
44
44
  # посчитает кол-во свободных метров
45
45
  def self.free_areas_sq
46
- sum = 0
46
+ Rails.logger.debug "<Area.free_areas_sq>"
47
+ sum = 0.0
47
48
  self.free_areas.each do |area|
48
49
  # area_prop_square = area.item_props.where(:prop_name_id => 9)
49
50
  area_prop_square = area.square_value
50
- sum += area_prop_square#.first.value.to_i
51
+ sum += area_prop_square
51
52
  end
53
+ Rails.logger.debug "<Area.free_areas_sq> sum = #{sum}"
52
54
  sum
53
55
  end
54
56
 
@@ -58,22 +60,22 @@ module C80Estate
58
60
 
59
61
  # посчитает кол-во занятых метров
60
62
  def self.busy_areas_sq
61
- sum = 0
63
+ sum = 0.0
62
64
  self.busy_areas.each do |area|
63
65
  area_prop_square = area.item_props.where(:prop_name_id => 9)
64
66
  if area_prop_square.present?
65
- sum += area_prop_square.first.value.to_i
67
+ sum += area_prop_square.first.value.to_f
66
68
  end
67
69
  end
68
70
  sum
69
71
  end
70
72
 
71
73
  def self.all_areas_sq
72
- sum = 0
74
+ sum = 0.0
73
75
  self.all.each do |area|
74
76
  area_prop_square = area.item_props.where(:prop_name_id => 9)
75
77
  if area_prop_square.present?
76
- sum += area_prop_square.first.value.to_i
78
+ sum += area_prop_square.first.value.to_f
77
79
  end
78
80
  end
79
81
  sum
@@ -82,15 +84,15 @@ module C80Estate
82
84
  def self.where_price_range(range)
83
85
  self.joins(:item_props)
84
86
  .where(c80_estate_item_props: {prop_name_id: 1})
85
- .where('c80_estate_item_props.value > ?', range.split(',')[0].to_i-1)
86
- .where('c80_estate_item_props.value < ?', range.split(',')[1].to_i+1)
87
+ .where('c80_estate_item_props.value > ?', range.split(',')[0].to_f-1)
88
+ .where('c80_estate_item_props.value < ?', range.split(',')[1].to_f+1)
87
89
  end
88
90
 
89
91
  def self.where_square_range(range)
90
92
  C80Estate::Area.joins(:item_props)
91
93
  .where(c80_estate_item_props: {prop_name_id: 9})
92
- .where('c80_estate_item_props.value > ?', range.split(',')[0].to_i-1)
93
- .where('c80_estate_item_props.value < ?', range.split(',')[1].to_i+1)
94
+ .where('c80_estate_item_props.value > ?', range.split(',')[0].to_f-1)
95
+ .where('c80_estate_item_props.value < ?', range.split(',')[1].to_f+1)
94
96
  end
95
97
 
96
98
  def self.where_oenter(v)
@@ -167,7 +169,7 @@ module C80Estate
167
169
  })
168
170
 
169
171
  C80Estate::ItemProp.create!([
170
- {value: row['price'].to_i, area_id: area.id, prop_name_id: 1},
172
+ {value: row['price'].to_f, area_id: area.id, prop_name_id: 1},
171
173
  {value: row['square'].to_f, area_id: area.id, prop_name_id: 9},
172
174
  ])
173
175
 
@@ -238,9 +240,9 @@ module C80Estate
238
240
  end
239
241
 
240
242
  def assigned_person_title
241
- res = "-"
242
- if assigned_person.present?
243
- res = assigned_person.email
243
+ res = '-'
244
+ if property.assigned_person.present?
245
+ res = property.assigned_person.email
244
246
  end
245
247
  res
246
248
  end
@@ -258,20 +260,21 @@ module C80Estate
258
260
  end
259
261
 
260
262
  def price_value
261
- res = 0
263
+ res = 0.0
262
264
  p = item_props.where(:prop_name_id => 1)
263
265
  if p.count > 0
264
- res = p.first.value.to_i
266
+ res = p.first.value.to_f
265
267
  end
266
268
  res
267
269
  end
268
270
 
269
271
  def square_value
270
- res = 0
272
+ res = 0.0
271
273
  p = item_props.where(:prop_name_id => 9)
272
274
  if p.count > 0
273
275
  res = p.first.value.to_f
274
276
  end
277
+ Rails.logger.debug "<Area.square_value> res = #{res}"
275
278
  res
276
279
  end
277
280
 
@@ -355,21 +358,17 @@ module C80Estate
355
358
  created_at: self.created_at
356
359
  })
357
360
 
358
- # см [*]
359
- # if last_known_sevent == ''
360
- # pparams[:created_at] = self.created_at
361
- # end
362
- #
363
- # pparams = {
364
- # atype_id: nil,
365
- # property_id: self.property_id,
366
- # sevent_id: s.id
367
- # }
361
+ pparams = {
362
+ atype_id: nil,
363
+ property_id: self.property_id,
364
+ sevent_id: s.id,
365
+ created_at: self.created_at
366
+ }
368
367
 
369
368
  # генерим запись с общими данными
370
369
  # связываем её с Sevent
371
370
  # чтобы можно было удалить как dependent => destroy
372
- # Pstat.create!(pparams)
371
+ Pstat.create!(pparams)
373
372
 
374
373
  end
375
374
 
@@ -98,9 +98,11 @@ module C80Estate
98
98
  # true
99
99
  end
100
100
 
101
+ # если да, то будет видна кнопка "создать area"
101
102
  def can_create_areas?
102
103
  r1 = roles.where(role_type: 1)
103
- r1.count > 0
104
+ r3 = roles.where(role_type: 3)
105
+ r1.count > 0 || r3.count > 0
104
106
  # true
105
107
  end
106
108
 
@@ -3,7 +3,7 @@ module C80Estate
3
3
  belongs_to :atype
4
4
  belongs_to :owner, :polymorphic => true
5
5
  belongs_to :assigned_person, :polymorphic => true
6
- has_many :item_props, :dependent => :destroy
6
+ # has_many :item_props, :dependent => :destroy
7
7
  has_many :pphotos, :dependent => :destroy # одна или несколько фоток
8
8
  accepts_nested_attributes_for :pphotos,
9
9
  :reject_if => lambda { |attributes|
@@ -62,7 +62,7 @@ module C80Estate
62
62
  # end
63
63
 
64
64
  def average_price
65
- price_sum = 0
65
+ price_sum = 0.0
66
66
  areas.all.each do |area|
67
67
  price_sum += area.price_value
68
68
  end
@@ -70,7 +70,7 @@ module C80Estate
70
70
  if areas.all.count != 0
71
71
  price_sum*1.0 / areas.all.count
72
72
  else
73
- 0
73
+ 0.0
74
74
  end
75
75
 
76
76
  end
@@ -78,7 +78,7 @@ module C80Estate
78
78
  def average_price_busy
79
79
 
80
80
  busy_areas_count = 0
81
- price_sum = 0
81
+ price_sum = 0.0
82
82
 
83
83
  areas.all.each do |area|
84
84
  if area.is_busy?
@@ -90,7 +90,7 @@ module C80Estate
90
90
  if busy_areas_count != 0
91
91
  price_sum*1.0 / busy_areas_count
92
92
  else
93
- 0
93
+ 0.0
94
94
  end
95
95
 
96
96
  end
@@ -135,7 +135,7 @@ module C80Estate
135
135
  end
136
136
 
137
137
  def square_value
138
- sum = 0
138
+ sum = 0.0
139
139
  areas.all.each do |area|
140
140
  sum += area.square_value
141
141
  end
@@ -143,7 +143,7 @@ module C80Estate
143
143
  end
144
144
 
145
145
  def power_price_value
146
- sum = 0
146
+ sum = 0.0
147
147
  areas.all.each do |area|
148
148
  sum += area.power_price_value
149
149
  end
@@ -103,8 +103,11 @@ module C80Estate
103
103
 
104
104
  # Занятость в метрах
105
105
 
106
- free_areas_atnow_sq = pstats.where(:atype_id => nil).last.free_areas_sq
107
- busy_areas_atnow_sq = pstats.where(:atype_id => nil).last.busy_areas_sq
106
+ # free_areas_atnow_sq = pstats.where(:atype_id => nil).last.free_areas_sq
107
+ # busy_areas_atnow_sq = pstats.where(:atype_id => nil).last.busy_areas_sq
108
+ tt = _calc_free_busy_areas_sq(pstats)
109
+ free_areas_atnow_sq = tt[:free_areas_atnow_sq]
110
+ busy_areas_atnow_sq = tt[:busy_areas_atnow_sq]
108
111
 
109
112
  # защищаемся от деления на ноль
110
113
  if busy_areas_atnow_sq + free_areas_atnow_sq == 0
@@ -767,8 +770,8 @@ module C80Estate
767
770
  end
768
771
 
769
772
  def self._calc_free_busy_areas(pstats)
770
- sum_free_areas = 0
771
- sum_busy_areas = 0
773
+ sum_free_areas = 0.0
774
+ sum_busy_areas = 0.0
772
775
  all_props = Property.all
773
776
  all_props.each do |prop|
774
777
  ppstats = pstats.where(:property_id => prop.id).ordered_by_created_at.last
@@ -783,5 +786,29 @@ module C80Estate
783
786
  }
784
787
  end
785
788
 
789
+ def self._calc_free_busy_areas_sq(pstats)
790
+
791
+ sum_free_areas_sq = 0.0
792
+ sum_busy_areas_sq = 0.0
793
+ all_props = Property.all
794
+
795
+ all_props.each do |prop|
796
+ ppstats = pstats.where(:property_id => prop.id).ordered_by_created_at.last
797
+ if ppstats.present?
798
+ Rails.logger.debug "\t\t ppstats.free_areas_sq = #{ppstats.free_areas_sq}"
799
+ Rails.logger.debug "\t\t ppstats.busy_areas_sq = #{ppstats.busy_areas_sq}"
800
+ sum_free_areas_sq += ppstats.free_areas_sq
801
+ sum_busy_areas_sq += ppstats.busy_areas_sq
802
+ end
803
+ end
804
+
805
+ Rails.logger.debug "<_calc_free_busy_areas_sq> sum_free_areas_sq = #{sum_free_areas_sq}, sum_busy_areas_sq = #{sum_busy_areas_sq}"
806
+
807
+ {
808
+ free_areas_atnow_sq: sum_free_areas_sq,
809
+ busy_areas_atnow_sq: sum_busy_areas_sq
810
+ }
811
+ end
812
+
786
813
  end
787
814
  end
@@ -93,7 +93,7 @@ module C80Estate
93
93
 
94
94
  result[:average_value] = sprintf "%.2f%", summ/k*100
95
95
  result[:comment] = "<abbr title='Период рассчёта эффективности: с момента самого первого известного события до текущего дня'>C #{Time.at(self.first.created_at).strftime('%Y/%m/%d')} по #{Time.now.year}/#{sprintf "%02d", Time.now.month}/#{sprintf "%02d", Time.now.day}</abbr>"
96
- result[:abbr] = 'Среднее значение для всех площадей за весь период'
96
+ result[:abbr] = 'Среднее значение коэф-та эффективности для всех площадей за весь период. Эффективность - это число b/N, где b - кол-во дней которые площадь была занята (за указанный период), N - всего дней в указанном периоде'
97
97
  result[:title] = 'Статистика - Все площади'
98
98
  result[:props] = [
99
99
  {tag:'all_areas_count', val: "Площадей всего: #{Area.all.count}"},
@@ -185,8 +185,8 @@ module C80Estate
185
185
 
186
186
  result[:average_value] = sprintf "%.2f%", result[area_id][:ecoef]*100
187
187
  result[:comment] = "<abbr title='Период рассчёта коэф-та эффективности'>C #{used_start_date_str} по #{used_end_date_str}</abbr>"
188
- result[:abbr] = 'Коэф-т эффективности площади за указанный период'
189
- result[:title] = "Статистика - #{area.title}"
188
+ result[:abbr] = 'Коэф-т эффективности площади за указанный период. Эффективность - это число b/N, где b - кол-во дней которые площадь была занята (за указанный период), N - всего дней в указанном периоде'
189
+ result[:title] = "Статистика - площадь '#{area.title}'"
190
190
  result[:graph] = _parse_for_js_graph(sevents)
191
191
 
192
192
  if mark_whole
@@ -196,9 +196,9 @@ module C80Estate
196
196
  end
197
197
 
198
198
  result[:props] = [
199
- { tag: 'title', val: "#{area.title}" },
199
+ { tag: 'title', val: "Площадь: #{area.title}" },
200
200
  { tag: 'atype', val: "Тип: #{area.atype_title}" },
201
- # { tag: 'born_date', val: "Дата создания: #{area.created_at.in_time_zone('Moscow')}" },
201
+ { tag: 'born_date', val: "Дата создания: #{area.created_at.in_time_zone('Moscow').strftime('%Y/%m/%d')}" },
202
202
  { tag: 'busy_time', val: "<abbr title='В указанный период'>Времени занята</abbr>: #{time_duration(t[:time_busy])}" },
203
203
  { tag: 'free_time', val: "<abbr title='В указанный период'>Времени свободна</abbr>: #{time_duration(t[:time_free])}" },
204
204
  { tag: 'all_time', val: "<abbr title='В указанный период'>Времени всего</abbr>: #{time_duration(t[:time_busy] + t[:time_free])}" },
@@ -0,0 +1,5 @@
1
+ <% if @res %>
2
+ fAreasShow_initActionItems(<%= @area.id %>);
3
+ <% else %>
4
+ // $main_content.css('opacity', '1.0');
5
+ <% end %>
data/config/routes.rb CHANGED
@@ -4,6 +4,7 @@ C80Estate::Engine.routes.draw do
4
4
  match '/estate/properties_busy_coef', :to => 'ajax#properties_busy_coef', :via => :post
5
5
  match '/estate/can_view_statistics_property', :to => 'ajax#can_view_statistics_property', :via => :post
6
6
  match '/estate/can_view_statistics_area', :to => 'ajax#can_view_statistics_area', :via => :post
7
+ match '/estate/can_edit_area', :to => 'ajax#can_edit_area', :via => :post
7
8
 
8
9
  match '/estate/table_properties_coef_busy', :to => 'ajax_view#table_properties_coef_busy', :via => :post
9
10
  match '/estate/table_properties_coef_busy_sq', :to => 'ajax_view#table_properties_coef_busy_sq', :via => :post
@@ -0,0 +1,15 @@
1
+ class ChangeC80EstatePstatsColumnTypes < ActiveRecord::Migration
2
+ def up
3
+ change_column :c80_estate_pstats, :coef_busy, :float
4
+ change_column :c80_estate_pstats, :free_areas_sq, :float
5
+ change_column :c80_estate_pstats, :busy_areas_sq, :float
6
+ change_column :c80_estate_pstats, :coef_busy_sq, :float
7
+ end
8
+
9
+ def down
10
+ change_column :c80_estate_pstats, :coef_busy, :integer
11
+ change_column :c80_estate_pstats, :free_areas_sq, :integer
12
+ change_column :c80_estate_pstats, :busy_areas_sq, :integer
13
+ change_column :c80_estate_pstats, :coef_busy_sq, :integer
14
+ end
15
+ end
@@ -1,3 +1,3 @@
1
1
  module C80Estate
2
- VERSION = '0.1.0.24'
2
+ VERSION = '0.1.0.25'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: c80_estate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.24
4
+ version: 0.1.0.25
5
5
  platform: ruby
6
6
  authors:
7
7
  - C80609A
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-08-02 00:00:00.000000000 Z
11
+ date: 2016-08-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -167,6 +167,7 @@ files:
167
167
  - app/views/admin/dashboard/_atype_in_list.html.erb
168
168
  - app/views/admin/dashboard/_prop_in_list.html.erb
169
169
  - app/views/admin/properties/_show_property.html.erb
170
+ - app/views/c80_estate/ajax/can_edit_area.js.erb
170
171
  - app/views/c80_estate/ajax/can_view_statistics_area.js.erb
171
172
  - app/views/c80_estate/ajax/can_view_statistics_property.js.erb
172
173
  - app/views/c80_estate/ajax_areas/exel_import.html.erb
@@ -202,6 +203,7 @@ files:
202
203
  - db/migrate/20160704063131_create_c80_estate_roles.rb
203
204
  - db/migrate/20160713043333_create_c80_estate_sevents.rb
204
205
  - db/migrate/20160717094647_create_c80_estate_pstats.rb
206
+ - db/migrate/20160803093131_change_c80_estate_pstats_column_types.rb
205
207
  - db/seeds/50_fill_uoms.rb.example
206
208
  - db/seeds/55_fill_prop_names.rb.example
207
209
  - db/seeds/60_fill_atypes.rb.example