educode_sales 0.5.9 → 0.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/educode_sales/businesses_controller.rb +7 -4
  3. data/app/controllers/educode_sales/customers_controller.rb +45 -34
  4. data/app/controllers/educode_sales/follow_ups_controller.rb +1 -1
  5. data/app/controllers/educode_sales/places_controller.rb +5 -1
  6. data/app/controllers/educode_sales/sale_trends_controller.rb +16 -1
  7. data/app/controllers/educode_sales/staffs_controller.rb +2 -2
  8. data/app/controllers/educode_sales/teachers_controller.rb +13 -2
  9. data/app/models/educode_sales/permission.rb +1 -1
  10. data/app/views/educode_sales/businesses/_follows.html.erb +4 -1
  11. data/app/views/educode_sales/businesses/edit.html.erb +3 -0
  12. data/app/views/educode_sales/businesses/index.html.erb +22 -16
  13. data/app/views/educode_sales/businesses/index.json.jbuilder +1 -0
  14. data/app/views/educode_sales/businesses/show_follow.html.erb +1 -1
  15. data/app/views/educode_sales/businesses/time_line.html.erb +1 -1
  16. data/app/views/educode_sales/customers/edit.html.erb +54 -21
  17. data/app/views/educode_sales/customers/edit_department.html.erb +4 -2
  18. data/app/views/educode_sales/customers/edit_follow_record.html.erb +7 -7
  19. data/app/views/educode_sales/customers/index.html.erb +26 -19
  20. data/app/views/educode_sales/customers/index.json.jbuilder +3 -4
  21. data/app/views/educode_sales/customers/new.html.erb +30 -24
  22. data/app/views/educode_sales/customers/new_department.html.erb +5 -2
  23. data/app/views/educode_sales/customers/new_follow_record.html.erb +9 -9
  24. data/app/views/educode_sales/customers/show_follow.html.erb +8 -5
  25. data/app/views/educode_sales/customers/show_follow.json.jbuilder +1 -1
  26. data/app/views/educode_sales/customers/show_follow_record.html.erb +5 -4
  27. data/app/views/educode_sales/follow_ups/index.json.jbuilder +1 -0
  28. data/app/views/educode_sales/places/index.html.erb +64 -0
  29. data/app/views/educode_sales/roles/edit.html.erb +1 -1
  30. data/app/views/educode_sales/sale_trends/trends.html.erb +20 -0
  31. data/app/views/educode_sales/sales/index.html.erb +34 -16
  32. data/app/views/educode_sales/sales/index.json.jbuilder +27 -2
  33. data/app/views/educode_sales/teachers/index.html.erb +4 -11
  34. data/app/views/educode_sales/teachers/index.json.jbuilder +1 -1
  35. data/db/migrate/20211220102720_add_position_to_commons.rb +12 -0
  36. data/db/migrate/20211221075146_add_school_id_to_educode_sales_businesses.rb +8 -0
  37. data/lib/educode_sales/version.rb +1 -1
  38. metadata +4 -2
@@ -88,16 +88,6 @@
88
88
  <table class="layui-hide" id="teachers_table" style="min-height: 300px;" lay-filter="teachers_table"></table>
89
89
  </div>
90
90
  <script type="text/html" id="currentTableBar">
91
- <%# if can? :create, EducodeSales::OperationPlan %>
92
- <!-- <a class="layui-btn layui-btn-normal layui-btn-xs data-count-edit" lay-event="addWeek">添加周计划</a>-->
93
- <!-- <a class="layui-btn layui-btn-normal layui-btn-xs data-count-edit" lay-event="addMonth">添加月计划</a>-->
94
- <%# end %>
95
- <%# if can? :update, EducodeSales::Teacher %>
96
- <!-- <a class="layui-btn layui-btn-normal layui-btn-xs data-count-edit" lay-event="edit">编辑</a>-->
97
- <%# end %>
98
- <%# if can? :destroy, EducodeSales::Teacher %>
99
- <!-- <a class="layui-btn layui-btn-xs layui-btn-danger data-count-delete" lay-event="delete">删除</a>-->
100
- <%# end %>
101
91
  <% if can? :create, EducodeSales::TeacherFollow %>
102
92
  <a class="layui-btn layui-btn-normal layui-btn-xs data-count-edit" lay-event="add_event">添加跟进记录</a>
103
93
  <% end %>
@@ -243,19 +233,22 @@
243
233
  templet: "#event"
244
234
  },
245
235
  {
246
- field: 'regist_at',
236
+ field: 'created_on',
247
237
  width: 120,
248
238
  title: '注册时间',
239
+ sort: true,
249
240
  },
250
241
  {
251
242
  field: 'last_login_on',
252
243
  width: 120,
253
244
  title: '最近登录',
245
+ sort: true,
254
246
  },
255
247
  {
256
248
  field: 'created_at',
257
249
  width: 120,
258
250
  title: '添加时间',
251
+ sort: true,
259
252
  },
260
253
  {
261
254
  field: 'wechat',
@@ -18,7 +18,7 @@ json.data do
18
18
  json.courses_count d.courses_count
19
19
  json.actives d.actives
20
20
  json.students d.students_count
21
- json.regist_at d.user.present? ? d.user.created_on.to_s(:date) : ''
21
+ json.created_on d.user.present? ? d.user.created_on.to_s(:date) : ''
22
22
  json.last_login_on (d.user.present? && d.user.last_login_on.present?) ? d.user.last_login_on.to_s(:date) : ''
23
23
  json.teacher_used d.teacher_used
24
24
  json.wechat d.wechat
@@ -0,0 +1,12 @@
1
+ class AddPositionToCommons < ActiveRecord::Migration[5.2]
2
+ def change
3
+ add_column :educode_sales_permissions, :position, :integer
4
+ EducodeSales::Permission.all.each_with_index do |d,index|
5
+ if d.clazz == '销售态势' || d.clazz == '销售分工' || d.clazz == '商机管理' || d.clazz == '客户管理'
6
+ d.update(position: index)
7
+ else
8
+ d.update(position: index * 10)
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,8 @@
1
+ class AddSchoolIdToEducodeSalesBusinesses < ActiveRecord::Migration[5.2]
2
+ def change
3
+ add_column :educode_sales_businesses, :school_id, :integer
4
+ EducodeSales::Business.all.each do |business|
5
+ business.update(school_id: business.department.school.id)
6
+ end
7
+ end
8
+ end
@@ -1,3 +1,3 @@
1
1
  module EducodeSales
2
- VERSION = '0.5.9'
2
+ VERSION = '0.6.3'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: educode_sales
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.9
4
+ version: 0.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - anke1460
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-12-16 00:00:00.000000000 Z
11
+ date: 2021-12-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -405,6 +405,8 @@ files:
405
405
  - db/migrate/20211206054756_add_year_to_follow_ups.rb
406
406
  - db/migrate/20211214100803_create_customer_extensions.rb
407
407
  - db/migrate/20211215025029_create_educode_sales_customer_follows.rb
408
+ - db/migrate/20211220102720_add_position_to_commons.rb
409
+ - db/migrate/20211221075146_add_school_id_to_educode_sales_businesses.rb
408
410
  - lib/educode_sales.rb
409
411
  - lib/educode_sales/engine.rb
410
412
  - lib/educode_sales/version.rb