effective_work_experience 0.0.1 → 0.0.2
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
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4d811981a7c43b70ce9db5f3dcae39fa76aa9ef843c40bc4346d35d21c7c9f52
|
|
4
|
+
data.tar.gz: 492455690ecfae1382073e48f214a1cc71fa0f45088f61238b3307b843aad243
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4f6892d5599fabb1fc93cbc2559b50251d983b5cd011efb411469feeb381d744086e668e5f38c638d946599044b99aede21a8a2c4b4ae33e35b35e632dec7aed
|
|
7
|
+
data.tar.gz: 8e96bd6e05cc33f5a56ba1c0e28d4531bbd51fc093f57f02fd3ec22c71b45d6a492d9a23d16a87263eb8b2d26759a9c3c2177d04c93856b520b7e14d704547f5
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
|
|
24
24
|
- f.object.work_experience_subcategories.group_by(&:work_experience_category).each do |work_experience_category, work_experience_subcategories|
|
|
25
25
|
%tbody
|
|
26
|
-
- category_hours = work_experience_subcategories.sum { |work_experience_subcategory| user
|
|
26
|
+
- category_hours = work_experience_subcategories.sum { |work_experience_subcategory| user&.work_experience_total_hours_to_date(work_experience_subcategory: work_experience_subcategory, month: ceiling_month) || 0.0 }
|
|
27
27
|
%tr{style: "background: #f6f8fa"}
|
|
28
28
|
%th{colspan: 6}= work_experience_category
|
|
29
29
|
%th.text-right= (category_hours > 0.0 ? work_experience_hours_to_s(category_hours) : '-')
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
%td= ef.number_text_field :week_4, label: false
|
|
46
46
|
%td= ef.number_text_field :week_5, label: false
|
|
47
47
|
%td.text-right
|
|
48
|
-
- hours = user
|
|
48
|
+
- hours = user&.work_experience_total_hours_to_date(work_experience_subcategory: work_experience_subcategory, month: ceiling_month) || 0.0
|
|
49
49
|
= (hours > 0.0 ? work_experience_hours_to_s(hours) : '-')
|
|
50
50
|
%td.text-right
|
|
51
51
|
- if work_experience_subcategory.minimum_hours.present?
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
class CreateEffectiveWorkExperience < ActiveRecord::Migration[6.0]
|
|
2
2
|
def change
|
|
3
|
-
create_table :work_experience_categories do |t|
|
|
3
|
+
create_table :work_experience_categories, if_not_exists: true do |t|
|
|
4
4
|
t.string :title
|
|
5
5
|
t.integer :minimum_hours
|
|
6
6
|
t.integer :position
|
|
@@ -8,7 +8,7 @@ class CreateEffectiveWorkExperience < ActiveRecord::Migration[6.0]
|
|
|
8
8
|
t.timestamps
|
|
9
9
|
end
|
|
10
10
|
|
|
11
|
-
create_table :work_experience_subcategories do |t|
|
|
11
|
+
create_table :work_experience_subcategories, if_not_exists: true do |t|
|
|
12
12
|
t.integer :work_experience_category_id
|
|
13
13
|
|
|
14
14
|
t.string :title
|
|
@@ -18,7 +18,7 @@ class CreateEffectiveWorkExperience < ActiveRecord::Migration[6.0]
|
|
|
18
18
|
t.timestamps
|
|
19
19
|
end
|
|
20
20
|
|
|
21
|
-
create_table :work_experience_outside_mentors do |t|
|
|
21
|
+
create_table :work_experience_outside_mentors, if_not_exists: true do |t|
|
|
22
22
|
t.integer :user_id
|
|
23
23
|
t.string :user_type
|
|
24
24
|
|
|
@@ -31,7 +31,7 @@ class CreateEffectiveWorkExperience < ActiveRecord::Migration[6.0]
|
|
|
31
31
|
t.timestamps
|
|
32
32
|
end
|
|
33
33
|
|
|
34
|
-
create_table :work_experience_records do |t|
|
|
34
|
+
create_table :work_experience_records, if_not_exists: true do |t|
|
|
35
35
|
t.integer :user_id
|
|
36
36
|
t.string :user_type
|
|
37
37
|
|
|
@@ -50,7 +50,7 @@ class CreateEffectiveWorkExperience < ActiveRecord::Migration[6.0]
|
|
|
50
50
|
t.timestamps
|
|
51
51
|
end
|
|
52
52
|
|
|
53
|
-
create_table :work_experience_entries do |t|
|
|
53
|
+
create_table :work_experience_entries, if_not_exists: true do |t|
|
|
54
54
|
t.integer :user_id
|
|
55
55
|
t.string :user_type
|
|
56
56
|
|
|
@@ -66,7 +66,7 @@ class CreateEffectiveWorkExperience < ActiveRecord::Migration[6.0]
|
|
|
66
66
|
t.timestamps
|
|
67
67
|
end
|
|
68
68
|
|
|
69
|
-
create_table :work_experience_projects do |t|
|
|
69
|
+
create_table :work_experience_projects, if_not_exists: true do |t|
|
|
70
70
|
t.integer :user_id
|
|
71
71
|
t.string :user_type
|
|
72
72
|
|
|
@@ -79,7 +79,7 @@ class CreateEffectiveWorkExperience < ActiveRecord::Migration[6.0]
|
|
|
79
79
|
t.timestamps
|
|
80
80
|
end
|
|
81
81
|
|
|
82
|
-
create_table :work_experience_summaries do |t|
|
|
82
|
+
create_table :work_experience_summaries, if_not_exists: true do |t|
|
|
83
83
|
t.integer :user_id
|
|
84
84
|
t.string :user_type
|
|
85
85
|
|
|
@@ -110,11 +110,11 @@ class CreateEffectiveWorkExperience < ActiveRecord::Migration[6.0]
|
|
|
110
110
|
t.timestamps
|
|
111
111
|
end
|
|
112
112
|
|
|
113
|
-
add_index :work_experience_outside_mentors, [:user_id, :user_type], unique: true
|
|
114
|
-
add_index :work_experience_records, [:user_id, :user_type]
|
|
115
|
-
add_index :work_experience_entries, [:work_experience_record_id]
|
|
116
|
-
add_index :work_experience_projects, [:user_id, :user_type]
|
|
117
|
-
add_index :work_experience_summaries, [:user_id, :user_type]
|
|
118
|
-
add_index :work_experience_summaries, [:mentor_id, :mentor_type]
|
|
113
|
+
add_index :work_experience_outside_mentors, [:user_id, :user_type], unique: true, if_not_exists: true
|
|
114
|
+
add_index :work_experience_records, [:user_id, :user_type], if_not_exists: true
|
|
115
|
+
add_index :work_experience_entries, [:work_experience_record_id], if_not_exists: true
|
|
116
|
+
add_index :work_experience_projects, [:user_id, :user_type], if_not_exists: true
|
|
117
|
+
add_index :work_experience_summaries, [:user_id, :user_type], if_not_exists: true
|
|
118
|
+
add_index :work_experience_summaries, [:mentor_id, :mentor_type], if_not_exists: true
|
|
119
119
|
end
|
|
120
120
|
end
|