eco-helpers 1.3.19 → 1.5.1
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/CHANGELOG.md +72 -1
- data/eco-helpers.gemspec +11 -10
- data/lib/eco/api.rb +1 -0
- data/lib/eco/api/common.rb +1 -1
- data/lib/eco/api/common/people/default_parsers.rb +4 -0
- data/lib/eco/api/common/people/default_parsers/freemium_parser.rb +30 -0
- data/lib/eco/api/common/people/default_parsers/policy_groups_parser.rb +42 -0
- data/lib/eco/api/common/people/default_parsers/send_invites_parser.rb +2 -1
- data/lib/eco/api/common/people/entry_factory.rb +8 -7
- data/lib/eco/api/common/people/person_entry_attribute_mapper.rb +2 -0
- data/lib/eco/api/common/people/person_parser.rb +1 -1
- data/lib/eco/api/common/session/base_session.rb +3 -6
- data/lib/eco/api/common/session/environment.rb +2 -23
- data/lib/eco/api/common/version_patches/ecoportal_api.rb +0 -2
- data/lib/eco/api/common/version_patches/ecoportal_api/external_person.rb +0 -4
- data/lib/eco/api/common/version_patches/ecoportal_api/internal_person.rb +9 -1
- data/lib/eco/api/microcases.rb +31 -0
- data/lib/eco/api/microcases/core_excluded.rb +20 -0
- data/lib/eco/api/microcases/fix_filter_tags.rb +22 -0
- data/lib/eco/api/microcases/set_account.rb +32 -0
- data/lib/eco/api/microcases/set_core.rb +18 -0
- data/lib/eco/api/microcases/set_default_group.rb +33 -0
- data/lib/eco/api/microcases/set_default_tag.rb +23 -0
- data/lib/eco/api/microcases/set_supervisor.rb +26 -0
- data/lib/eco/api/microcases/strict_search.rb +14 -0
- data/lib/eco/api/organization/presets_reference.json +20 -3
- data/lib/eco/api/organization/presets_values.json +6 -1
- data/lib/eco/api/session.rb +9 -6
- data/lib/eco/api/session/batch.rb +1 -44
- data/lib/eco/api/session/config.rb +2 -2
- data/lib/eco/api/session/config/api.rb +121 -7
- data/lib/eco/api/session/config/apis.rb +24 -25
- data/lib/eco/api/usecases/default_cases/recover_db_case.rb +1 -0
- data/lib/eco/api/usecases/microed_cases/hris_case.rb +53 -0
- data/lib/eco/api/usecases/microed_cases/update_case.rb +33 -0
- data/lib/eco/api/usecases/microed_cases/update_details_case.rb +30 -0
- data/lib/eco/api/usecases/microed_cases/upsert_case.rb +36 -0
- data/lib/eco/csv.rb +8 -3
- data/lib/eco/data/files/helpers.rb +7 -2
- data/lib/eco/version.rb +1 -1
- metadata +95 -56
- data/lib/eco/api/common/version_patches/ecoportal_api/account_preferences.rb +0 -32
- data/lib/eco/api/common/version_patches/ecoportal_api/base_model.rb +0 -27
@@ -1,32 +0,0 @@
|
|
1
|
-
module Ecoportal
|
2
|
-
module API
|
3
|
-
class Internal
|
4
|
-
class Preferences < Common::BaseModel
|
5
|
-
passthrough :kiosk_enabled, :kiosk_workflow_message, :kiosk_create_button_label,
|
6
|
-
:kiosk_create_button_help, :kiosk_return_button_label, :kiosk_return_button_help,
|
7
|
-
:kiosk_dashboard_button_label, :kiosk_dashboard_button_help
|
8
|
-
|
9
|
-
[
|
10
|
-
:show_sidebar,
|
11
|
-
:show_shortcuts,
|
12
|
-
:show_coming_soon,
|
13
|
-
:show_recently_visited_forms,
|
14
|
-
:show_tasks,
|
15
|
-
:show_task_bubbles
|
16
|
-
].map(&:to_s).each do |field|
|
17
|
-
define_method(field) do
|
18
|
-
if doc.key?(field)
|
19
|
-
doc[field]
|
20
|
-
else
|
21
|
-
true
|
22
|
-
end
|
23
|
-
end
|
24
|
-
define_method("#{field}=") do |value|
|
25
|
-
doc[field] = !!value
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
@@ -1,27 +0,0 @@
|
|
1
|
-
module Ecoportal
|
2
|
-
module API
|
3
|
-
module Common
|
4
|
-
class BaseModel
|
5
|
-
|
6
|
-
attr_reader :initial_doc
|
7
|
-
|
8
|
-
def initialize(doc = {}, parent: self, key: nil)
|
9
|
-
@_parent = parent
|
10
|
-
@_key = key
|
11
|
-
if !_parent || !_key
|
12
|
-
@doc = doc
|
13
|
-
@original_doc = JSON.parse(@doc.to_json)
|
14
|
-
@initial_doc = JSON.parse(@doc.to_json)
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
def initial_doc
|
19
|
-
raise UnlinkedModel.new unless linked?
|
20
|
-
return @initial_doc if is_root?
|
21
|
-
_parent.initial_doc.dig(*[_key].flatten)
|
22
|
-
end
|
23
|
-
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|