effective_work_experience 0.0.3 → 0.1.0
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/models/concerns/effective_work_experience_summary.rb +18 -16
- data/app/views/effective/work_experience_projects/show.html.haml +14 -0
- data/app/views/effective/work_experience_records/show.html.haml +14 -0
- data/lib/effective_work_experience/version.rb +1 -1
- data/lib/effective_work_experience.rb +1 -1
- metadata +3 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fb5c25f69542d3bc7734e0dbbb5d1850763b34db16e2379a7f8fdaed3d57baa6
|
|
4
|
+
data.tar.gz: 3442a8ee4f32d2df9995a0ae2a3ff19fd2ff24f179c02709db707336dfb43ab3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 185e17a33c1cf1b0d762a25d35f48da2a6d68dc7e305073c710a97fb3f0890493d16511420899559969bad305b9730dcd419209b258cd0d9e464f48563042270
|
|
7
|
+
data.tar.gz: 4a6dc5564f0ac1bc84ce9bb42ddbb419d256104e368b00bf41abe31c44c34cefd56c60ec258ad6927d47400f26d4cdcfc56438a66caf445cf2679289e23a8f11
|
|
@@ -134,6 +134,24 @@ module EffectiveWorkExperienceSummary
|
|
|
134
134
|
validates :approve_work_experience_summary, acceptance: true
|
|
135
135
|
validates :recommendation, presence: true
|
|
136
136
|
end
|
|
137
|
+
|
|
138
|
+
def can_visit_step?(current_step)
|
|
139
|
+
return false if current_user == user && intern_steps.exclude?(current_step)
|
|
140
|
+
return false if current_user == mentor && mentor_steps.exclude?(current_step)
|
|
141
|
+
|
|
142
|
+
# Once submitted, the intern cannot go back and submit again
|
|
143
|
+
if was_submitted?
|
|
144
|
+
return false if [:start, :records, :projects, :submit].include?(current_step)
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# Once reviewed, the mentor can go back and review again
|
|
148
|
+
if was_reviewed?
|
|
149
|
+
return [:review, :reviewed].include?(current_step)
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
can_revisit_completed_steps(current_step)
|
|
153
|
+
end
|
|
154
|
+
|
|
137
155
|
end
|
|
138
156
|
|
|
139
157
|
def to_s
|
|
@@ -172,22 +190,6 @@ module EffectiveWorkExperienceSummary
|
|
|
172
190
|
mentor.present? || user.try(:work_experience_outside_mentor?).present?
|
|
173
191
|
end
|
|
174
192
|
|
|
175
|
-
def can_visit_step?(current_step)
|
|
176
|
-
return false if current_user == user && intern_steps.exclude?(current_step)
|
|
177
|
-
return false if current_user == mentor && mentor_steps.exclude?(current_step)
|
|
178
|
-
|
|
179
|
-
# Once submitted, the intern cannot go back and submit again
|
|
180
|
-
if was_submitted?
|
|
181
|
-
return false if [:start, :records, :projects, :submit].include?(current_step)
|
|
182
|
-
end
|
|
183
|
-
|
|
184
|
-
# Once reviewed, the mentor can go back and review again
|
|
185
|
-
if was_reviewed?
|
|
186
|
-
return [:review, :reviewed].include?(current_step)
|
|
187
|
-
end
|
|
188
|
-
|
|
189
|
-
can_revisit_completed_steps(current_step)
|
|
190
|
-
end
|
|
191
193
|
|
|
192
194
|
def total_hours_to_date
|
|
193
195
|
user.work_experience_total_hours_to_date(month: end_on)
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
- resource = (@_effective_resource || Effective::Resource.new(controller_path))
|
|
2
|
+
- @resource = instance_variable_get('@' + resource.name) if resource.name
|
|
3
|
+
|
|
4
|
+
- if @resource
|
|
5
|
+
- content_for :resource_buttons do
|
|
6
|
+
.resource-buttons
|
|
7
|
+
= render_resource_buttons(@resource, show: false)
|
|
8
|
+
|
|
9
|
+
= render_resource_partial(@resource)
|
|
10
|
+
|
|
11
|
+
.my-4
|
|
12
|
+
|
|
13
|
+
.form-actions
|
|
14
|
+
= link_to 'Return to Dashboard', return_to_dashboard_path, class: 'btn btn-lg btn-primary btn-block'
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
- resource = (@_effective_resource || Effective::Resource.new(controller_path))
|
|
2
|
+
- @resource = instance_variable_get('@' + resource.name) if resource.name
|
|
3
|
+
|
|
4
|
+
- if @resource
|
|
5
|
+
- content_for :resource_buttons do
|
|
6
|
+
.resource-buttons
|
|
7
|
+
= render_resource_buttons(@resource, show: false)
|
|
8
|
+
|
|
9
|
+
= render_resource_partial(@resource)
|
|
10
|
+
|
|
11
|
+
.my-4
|
|
12
|
+
|
|
13
|
+
.form-actions
|
|
14
|
+
= link_to 'Return to Dashboard', return_to_dashboard_path, class: 'btn btn-lg btn-primary btn-block'
|
|
@@ -24,7 +24,7 @@ module EffectiveWorkExperience
|
|
|
24
24
|
|
|
25
25
|
# The only swappable class. Mark yours with effective_work_experience_summary
|
|
26
26
|
def self.WorkExperienceSummary
|
|
27
|
-
|
|
27
|
+
klass(:work_experience_summary)
|
|
28
28
|
end
|
|
29
29
|
|
|
30
30
|
def self.mailer_class
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: effective_work_experience
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0
|
|
4
|
+
version: 0.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Code and Effect
|
|
@@ -262,9 +262,11 @@ files:
|
|
|
262
262
|
- app/views/effective/work_experience_projects/_fields.html.haml
|
|
263
263
|
- app/views/effective/work_experience_projects/_form.html.haml
|
|
264
264
|
- app/views/effective/work_experience_projects/_work_experience_project.html.haml
|
|
265
|
+
- app/views/effective/work_experience_projects/show.html.haml
|
|
265
266
|
- app/views/effective/work_experience_records/_fields.html.haml
|
|
266
267
|
- app/views/effective/work_experience_records/_form.html.haml
|
|
267
268
|
- app/views/effective/work_experience_records/_work_experience_record.html.haml
|
|
269
|
+
- app/views/effective/work_experience_records/show.html.haml
|
|
268
270
|
- app/views/effective/work_experience_reports/_work_experience_report.html.haml
|
|
269
271
|
- app/views/effective/work_experience_reports/show.html.haml
|
|
270
272
|
- app/views/effective/work_experience_summaries/_content.html.haml
|