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 +4 -4
- data/app/assets/stylesheets/educode_sales/layuimini.css +3 -1
- data/app/controllers/educode_sales/teacher_follows_controller.rb +3 -3
- data/app/controllers/educode_sales/teachers_controller.rb +1 -1
- data/app/views/educode_sales/activities/index.html.erb +1 -0
- data/app/views/educode_sales/activities/show_teachers.html.erb +3 -3
- data/app/views/educode_sales/businesses/edit_follow_record.html.erb +1 -1
- data/app/views/educode_sales/commons/index.html.erb +1 -0
- data/app/views/educode_sales/roles/index.html.erb +1 -0
- data/app/views/educode_sales/staffs/index.html.erb +1 -0
- data/app/views/educode_sales/teachers/edit_follow_record.html.erb +1 -0
- data/app/views/educode_sales/teachers/new.html.erb +4 -5
- data/app/views/educode_sales/teachers/show_follow.json.jbuilder +1 -1
- data/lib/educode_sales/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a7b0badd6354865f88cb4016fb2b4d6399b2e19a
|
4
|
+
data.tar.gz: 31b712f9a174d19191dc284957db22b20e2123fd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a2206f34ebccc685009a8d9fe25ab7c8c47941d0718af2112b2373857163ca63f258552ffe3c41ea95ce3cff98251b2f986281e6387f7d1ca202a434e7cac491
|
7
|
+
data.tar.gz: c183901965584cb5986133bd959b75c43cfb0c34911e9dc8ac741990baf72e4c30b9fa561eb0fd6caa542007725da64d1f093b700c221607dae2ef465891a282
|
@@ -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
|
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 =
|
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
|
216
|
+
@latest = @follow_ups.order(created_at: :desc).first
|
217
217
|
end
|
218
218
|
end
|
219
219
|
end
|
@@ -13,9 +13,9 @@
|
|
13
13
|
</script>
|
14
14
|
<script type="text/html" id="name">
|
15
15
|
{{# if (d.login) { }}
|
16
|
-
<a href="
|
16
|
+
<a href="<%= base_url%>/users/{{d.login}}" class="layui-table-link" target="_blank">{{ d.name }}</a>
|
17
17
|
{{# } else {}}
|
18
|
-
<a href="
|
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: '
|
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">
|
@@ -152,11 +152,10 @@
|
|
152
152
|
if (res.success == false) {
|
153
153
|
layer.alert(res.msg)
|
154
154
|
} else {
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
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;
|
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.
|
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-
|
11
|
+
date: 2021-09-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|