ecom_core 1.1.21 → 1.1.26

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: 20baeb3e84b28e3138d9d2b64cc0f91afe5e3e79361baa4564b280eca1d7db92
4
- data.tar.gz: 714499d1b00181a32b8ac85dd2a469d3474ec590ac4c0bb958d655285420647a
3
+ metadata.gz: 684f4fd81b9eef6da1506b92ce20300169eb7f0af2219b0f0fab735a1d9fd7c0
4
+ data.tar.gz: 9353cbd91b041984ef78bdef6b0fd6a4f3d6431c18f0f598024ed9533124f710
5
5
  SHA512:
6
- metadata.gz: 99fa344c2db5b7a704eed5cf9191c9f620f95b0f74cb1e38da9c121e91b6d3b477b1b8bea16387647f0bda528054f8b6ae55276a74944bf08998c070d660a4a7
7
- data.tar.gz: 1959a1648e993edd98fa846391b38bc967c8844fde3b85ab9c99dde4bbbed683bcb9c57ce215fc2657348a36eb3b539a7dfdb878dd73df022a21d4bcdc4bee6b
6
+ metadata.gz: 6e12741b87c8af09b9c35a639539e06f597216aaf9c590a60d56d214d60b9ad7b841812ec2a857d397cac1eb2669ca0eed71c08255de745df8b7db10f44a0f6b
7
+ data.tar.gz: d23867509e519c65c0e28abe38ed3fa467d7ba03d5291bae9b42419c9df4eb3344b902fc5d20b6db8deca22e594e5d26bf15053dd33ead0e6e526325e617e761
@@ -7,9 +7,9 @@ module Ecom
7
7
  BOTH = 'Both'.freeze
8
8
 
9
9
  TIME_RANGE = {
10
- MORNING => {start: Time.parse('8:00 AM'), end: Time.parse('12:00 PM')},
11
- AFTERNOON => {start: Time.parse('1:00 PM'), end: Time.parse('5:00 PM')},
12
- BOTH => {start: Time.parse('8:00 AM'), end: Time.parse('5:00 PM')}
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,7 +19,7 @@ module Ecom
19
19
 
20
20
  validates :hours, presence: true
21
21
 
22
- before_save :calculate_hours
22
+ before_validation :calculate_hours
23
23
 
24
24
  def calculate_hours
25
25
  self.hours = checkout_time.nil? ? 0 : compute_hours
@@ -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, label: item.label, icon: item.icon, children: [] }
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[:children] = menu.reject { |m| m.parent.nil? }.each_with_object([]) do |item, list|
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, label: item.label, icon: item.icon, route: item.route }
18
+ list << { id: item.id, text: item.label, iconCss: item.icon, url: item.route }
19
19
  end
20
20
  end
21
21
  end
@@ -1,6 +1,8 @@
1
1
  class ChangeTimeColumnsToDatetime < ActiveRecord::Migration[6.0]
2
2
  def change
3
- change_column :ecom_core_crew_times, :checkin_time, :datetime
4
- change_column :ecom_core_crew_times, :checkout_time, :datetime
3
+ remove_column :ecom_core_crew_times, :checkin_time, :time
4
+ add_column :ecom_core_crew_times, :checkin_time, :datetime
5
+ remove_column :ecom_core_crew_times, :checkout_time, :time
6
+ add_column :ecom_core_crew_times, :checkout_time, :datetime
5
7
  end
6
8
  end
@@ -1,5 +1,5 @@
1
1
  module Ecom
2
2
  module Core
3
- VERSION = '1.1.21'.freeze
3
+ VERSION = '1.1.26'.freeze
4
4
  end
5
5
  end
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.21
4
+ version: 1.1.26
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-14 00:00:00.000000000 Z
11
+ date: 2020-04-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aasm