ecom_core 1.1.22 → 1.1.27
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/ecom/core/crew_time.rb +5 -5
- data/app/services/ecom/core/menu_service.rb +3 -3
- data/lib/ecom/core/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9762a1b0d92bec25c6c0e52c814ee95a2e48e5b271c39d59d28fb8ff4d9b01f2
|
4
|
+
data.tar.gz: 0d664422f9ed3f12b49889383b674c3b33090f4d5a0ea9f81c849cb70580b068
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9b88471b8c2196bcfdb57f087a50be078e7e57def36adb2e3a4dbdb9106701374ce7eb503240cee109c9be700b141dc78a3500222c09bb7651cb00fc2d2989eb
|
7
|
+
data.tar.gz: bd6e8e1dda621385024a9460a849cb5a6ab198cdc34aa32f03bfe19904216e7bdd76c66a15466b525b7e734dbde94c0a089af110e18be1bc4405e0e0cc49e18d
|
@@ -7,9 +7,9 @@ module Ecom
|
|
7
7
|
BOTH = 'Both'.freeze
|
8
8
|
|
9
9
|
TIME_RANGE = {
|
10
|
-
MORNING => {start: Time.parse('
|
11
|
-
AFTERNOON => {start: Time.parse('
|
12
|
-
BOTH => {start: Time.parse('
|
10
|
+
MORNING => {start: Time.zone.parse('5:00 AM'), end: Time.zone.parse('9:00 AM')},
|
11
|
+
AFTERNOON => {start: Time.zone.parse('10:00 AM'), end: Time.zone.parse('2:00 PM')},
|
12
|
+
BOTH => {start: Time.zone.parse('5:00 AM'), end: Time.zone.parse('2:00 PM')}
|
13
13
|
}.freeze
|
14
14
|
|
15
15
|
belongs_to :attendance_sheet_entry
|
@@ -19,10 +19,10 @@ module Ecom
|
|
19
19
|
|
20
20
|
validates :hours, presence: true
|
21
21
|
|
22
|
-
|
22
|
+
before_validation :calculate_hours
|
23
23
|
|
24
24
|
def calculate_hours
|
25
|
-
self.hours = checkout_time.nil? ? 0 : compute_hours
|
25
|
+
self.hours = (checkout_time.nil? || checkin_time.nil?) ? 0 : compute_hours
|
26
26
|
end
|
27
27
|
|
28
28
|
# A method to check if checkin and checkout range falls in the morning,
|
@@ -9,13 +9,13 @@ module Ecom
|
|
9
9
|
SQL
|
10
10
|
menu = Menu.joins(join_sql).where('UR.id IN (?)', role_ids).distinct
|
11
11
|
menu_list = menu.select { |m| m.parent.nil? }.each_with_object([]) do |item, list|
|
12
|
-
list << { id: item.id,
|
12
|
+
list << { id: item.id, text: item.label, iconCss: item.icon, items: [] }
|
13
13
|
end
|
14
14
|
|
15
15
|
menu_list.each do |ml|
|
16
|
-
ml[:
|
16
|
+
ml[:items] = menu.reject { |m| m.parent.nil? }.each_with_object([]) do |item, list|
|
17
17
|
if item.parent_id == ml[:id]
|
18
|
-
list << { id: item.id,
|
18
|
+
list << { id: item.id, text: item.label, iconCss: item.icon, url: item.route }
|
19
19
|
end
|
20
20
|
end
|
21
21
|
end
|
data/lib/ecom/core/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ecom_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.27
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Henock L.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-04-
|
11
|
+
date: 2020-04-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aasm
|