next_sgad 0.3.6 → 0.3.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2f701333d4d9ee374df27a4da29f5f97942f3419
|
4
|
+
data.tar.gz: 65ae0250538628b41c0fd2f06c847c73af75c12a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6264868970816b09132e7e07416b0e43488284fc9835588e802237c26f55987c4b0c4293718a399c0b54b5d9e56d77cc46455c2227ca6d1887a8b2eeff8de86b
|
7
|
+
data.tar.gz: 8a489d32dc9921de82dfed4e76d350a962d21a8fee6db162d3ab7e2b946e0a2cbb967cdd965bf606af5491b577022feda2632ba2c1a284e0d5f7f9b37608c389
|
@@ -34,14 +34,14 @@ module NextSgad
|
|
34
34
|
|
35
35
|
# check if last year assessments can be copied
|
36
36
|
def can_copy_last_years_skills?
|
37
|
-
last_years_skills= get_last_assessment
|
37
|
+
last_years_skills = get_last_assessment
|
38
38
|
return false if last_years_skills.nil?
|
39
39
|
last_years_skills.goals.skill.where.not(name: goals.skill.map(&:name)).exists?
|
40
40
|
end
|
41
41
|
|
42
42
|
# get last years skills
|
43
43
|
def dup_last_year_skills
|
44
|
-
last_years_skills= get_last_assessment
|
44
|
+
last_years_skills = get_last_assessment
|
45
45
|
return NextSgad::Goal.none if last_years_skills.nil?
|
46
46
|
last_years_skills.goals.skill.where.not(name: goals.skill.map(&:name)).map {|g| d = g.dup; d.function_ids = g.function_ids; d}
|
47
47
|
end
|
@@ -7,6 +7,10 @@ module NextSgad
|
|
7
7
|
has_and_belongs_to_many :positions, association_foreign_key: :next_sgad_position_id, foreign_key: :next_sgad_employee_id
|
8
8
|
has_one :efective_position, class_name: NextSgad::Position.name, foreign_key: :efective_id
|
9
9
|
has_many :employees_assessments, dependent: :destroy
|
10
|
+
has_many :employee_paygrades
|
11
|
+
has_many :employee_work_periods
|
12
|
+
has_many :salaries, through: :employee_paygrades
|
13
|
+
has_one :latest_paygrade, ->{where(until: nil).order(since: :asc)}, class_name: ::EmployeePaygrade.name, foreign_key: :employee_id
|
10
14
|
|
11
15
|
scope :department_id, -> (data) {data = [data].flatten.compact.uniq; data.blank? || data.include?('all') ? all : where(id: NextSgad::Position.where(department_id: data).map(&:efective_id))}
|
12
16
|
scope :function_id, -> (data) {data = [data].flatten.compact.uniq; data.blank? || data.include?('all') ? all : where(id: NextSgad::Position.where(function_id: data).map(&:efective_id))}
|
@@ -6,6 +6,9 @@ module NextSgad
|
|
6
6
|
before_save :create_number, on: :create
|
7
7
|
has_and_belongs_to_many :goals, association_foreign_key: :next_sgad_goal_id, foreign_key: :next_sgad_function_id
|
8
8
|
has_and_belongs_to_many :messages, association_foreign_key: :next_sgad_message_id, foreign_key: :next_sgad_function_id
|
9
|
+
has_and_belongs_to_many :subsidy_types, association_foreign_key: :subsidy_type_id, foreign_key: :next_sgad_function_id
|
10
|
+
has_and_belongs_to_many :tax_types, association_foreign_key: :tax_type_id, foreign_key: :next_sgad_function_id
|
11
|
+
has_many :positions
|
9
12
|
|
10
13
|
def name_and_number
|
11
14
|
"#{number} - #{name}"
|
@@ -10,6 +10,8 @@ module NextSgad
|
|
10
10
|
has_many :employee_goals
|
11
11
|
has_and_belongs_to_many :goals, association_foreign_key: :next_sgad_goal_id, foreign_key: :next_sgad_position_id
|
12
12
|
has_and_belongs_to_many :employees, association_foreign_key: :next_sgad_employee_id, foreign_key: :next_sgad_position_id
|
13
|
+
has_and_belongs_to_many :subsidy_types, association_foreign_key: :subsidy_type_id, foreign_key: :next_sgad_position_id
|
14
|
+
has_and_belongs_to_many :tax_types, association_foreign_key: :tax_type_id, foreign_key: :next_sgad_position_id
|
13
15
|
|
14
16
|
scope :department_id, -> (data) {data = [data].flatten.compact.uniq; data.blank? || data.include?('all') ? all : where(department_id: data)}
|
15
17
|
scope :efective_id, -> (data) {data = [data].flatten.compact.uniq; data.blank? || data.include?('all') ? all : where(efective_id: data)}
|
data/lib/next_sgad/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: next_sgad
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sergio Maziano
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-01-
|
11
|
+
date: 2018-01-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pg
|
@@ -295,7 +295,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
295
295
|
version: '0'
|
296
296
|
requirements: []
|
297
297
|
rubyforge_project:
|
298
|
-
rubygems_version: 2.6.
|
298
|
+
rubygems_version: 2.6.13
|
299
299
|
signing_key:
|
300
300
|
specification_version: 4
|
301
301
|
summary: SGAD
|