educode_sales 0.2.6 → 0.2.7

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 55cf3e4dddf35e304531c3e07672f44b45339e8e
4
- data.tar.gz: 4ce03e6fa1240be69d451c5b53070dfcb8b3524c
3
+ metadata.gz: a7b0badd6354865f88cb4016fb2b4d6399b2e19a
4
+ data.tar.gz: 31b712f9a174d19191dc284957db22b20e2123fd
5
5
  SHA512:
6
- metadata.gz: 95a1389179d95b934302d460664744e7e0c85a350e3c7c0d211a4e8d4fd4b87c452444c7cac011026a162d6ab1e1ea8d11d0663dc87bcb6d68969856235c3cec
7
- data.tar.gz: f47350141309328ee7be016017f29797cc705cea0b0b0ce86063a6d834e1f1e14f0360aa7139cbf949b142b74be9ffe764cb18732d505a76d36cbaf9864c6cef
6
+ metadata.gz: a2206f34ebccc685009a8d9fe25ab7c8c47941d0718af2112b2373857163ca63f258552ffe3c41ea95ce3cff98251b2f986281e6387f7d1ca202a434e7cac491
7
+ data.tar.gz: c183901965584cb5986133bd959b75c43cfb0c34911e9dc8ac741990baf72e4c30b9fa561eb0fd6caa542007725da64d1f093b700c221607dae2ef465891a282
@@ -214,8 +214,10 @@
214
214
  /*position: fixed;*/
215
215
  overflow: hidden;
216
216
  bottom: 0px !important;
217
- top: 60px !important;
217
+ top: 0px !important;
218
218
  transition: all .2s;
219
+ padding-top: 60px;
220
+ padding-bottom: 0px !important;
219
221
  }
220
222
 
221
223
  /**选择配色方案 */
@@ -7,11 +7,11 @@ module EducodeSales
7
7
  follow_up = @teacher.teacher_follows.build(follow_up_params)
8
8
  follow_up.staff = @current_admin
9
9
  if @teacher.user_id.present?
10
- course_ids = CourseMember.where(user_id: @teacher.user_id).where.not(role: 4).pluck(:course_id)
10
+ course_ids = CourseMember.joins(:course).where(user_id: @teacher.user_id, courses:{is_delete: 0}).where.not(role: 4).pluck(:course_id)
11
11
  follow_up.course_shixuns_count = CourseMember.joins(course: :practice_homework_shixuns).where(course_id: course_ids).pluck(:shixun_id).uniq.count
12
- follow_up.shixuns_count = ShixunMember.where(user_id: @teacher.user_id, role: 1).count
12
+ follow_up.shixuns_count = ShixunMember.where(user_id: @teacher.user_id).count
13
13
  follow_up.students_count = CourseMember.where(course_id: course_ids, role: 4).count
14
- follow_up.evaluates_count = CourseMember.joins(course: :practice_homework_shixuns).where(course_id: course_ids).count
14
+ follow_up.evaluates_count = Course.where(id: course_ids).inject(0) { |i, d| i += d.evaluate_count }
15
15
  follow_up.courses_count = course_ids.size
16
16
  end
17
17
  if follow_up.save
@@ -213,7 +213,7 @@ module EducodeSales
213
213
  @follow_ups = @follow_ups.order("created_at desc")
214
214
  end
215
215
  @follow_ups = @follow_ups.page(params[:page]).per(params[:limit])
216
- @latest = @follow_ups.order(created_at: :desc).first.created_at.to_s
216
+ @latest = @follow_ups.order(created_at: :desc).first
217
217
  end
218
218
  end
219
219
  end
@@ -48,6 +48,7 @@
48
48
  {
49
49
  field: 'name',
50
50
  title: '活动名称',
51
+ width: 300,
51
52
  templet: '#teachers'
52
53
  },
53
54
  {
@@ -13,9 +13,9 @@
13
13
  </script>
14
14
  <script type="text/html" id="name">
15
15
  {{# if (d.login) { }}
16
- <a href="/users/{{d.login}}" class="layui-table-link" target="_blank">{{ d.name }}</a>
16
+ <a href="<%= base_url%>/users/{{d.login}}" class="layui-table-link" target="_blank">{{ d.name }}</a>
17
17
  {{# } else {}}
18
- <a href="/users/{{d.login}}" class="">{{ d.name }}</a>
18
+ <a href="<%= base_url%>/users/{{d.login}}" class="">{{ d.name }}</a>
19
19
  {{# }}}
20
20
  </script>
21
21
  <script type="text/html" id="courses">
@@ -113,7 +113,7 @@
113
113
  templet: "#follow"
114
114
  },
115
115
  {
116
- field: 'actives',
116
+ field: 'teacher_used',
117
117
  width: 120,
118
118
  title: '学院渗透率',
119
119
  },
@@ -58,7 +58,7 @@
58
58
  <div class="layui-inline">
59
59
  <label class="layui-form-label">渠道</label>
60
60
  <div class="layui-input-inline">
61
- <%= select_tag "place_id", options_for_select(@places, @follow_up.place_id) %>
61
+ <%= select_tag "place_id", options_for_select(@places, @follow_up.place_id), include_blank: true %>
62
62
  </div>
63
63
  </div>
64
64
  <div class="layui-inline">
@@ -49,6 +49,7 @@
49
49
  }
50
50
  ]
51
51
  ],
52
+ height: 700,
52
53
  limit: 20,
53
54
  page: true,
54
55
  skin: 'line'
@@ -47,6 +47,7 @@
47
47
  align: "center"
48
48
  }]
49
49
  ],
50
+ height: 700,
50
51
  limit: 20,
51
52
  page: true
52
53
  })
@@ -72,6 +72,7 @@
72
72
  }
73
73
  ]
74
74
  ],
75
+ height: 700,
75
76
  limit: 20,
76
77
  page: true,
77
78
  skin: 'line'
@@ -75,6 +75,7 @@
75
75
  parent.table.reload('teachers_table')
76
76
  parent.table.reload('weekPlanTable1')
77
77
  parent.table.reload('monthPlanTable')
78
+ parent.table.reload('sale_plan_follow_table')
78
79
  }
79
80
  })
80
81
 
@@ -152,11 +152,10 @@
152
152
  if (res.success == false) {
153
153
  layer.alert(res.msg)
154
154
  } else {
155
- layer.closeAll();
156
- table.reload('show_teachers_table');
157
- table.reload('activities_table');
158
- table.reload('teachers_table');
159
-
155
+ table.reload('show_teachers_table');
156
+ table.reload('activities_table');
157
+ table.reload('teachers_table');
158
+ layer.close(parent.index)
160
159
  }
161
160
  })
162
161
  return false;
@@ -13,7 +13,7 @@ json.data do
13
13
  json.evaluates_count d.evaluates_count
14
14
  json.course_shixuns_count d.course_shixuns_count
15
15
  json.shixuns_count d.shixuns_count
16
- json.is_latest d.created_at.to_s.eql?@latest
16
+ json.is_latest d.id == @latest.id
17
17
  end
18
18
  end
19
19
 
@@ -1,3 +1,3 @@
1
1
  module EducodeSales
2
- VERSION = '0.2.6'
2
+ VERSION = '0.2.7'
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.2.6
4
+ version: 0.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - anke1460
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-09-26 00:00:00.000000000 Z
11
+ date: 2021-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails