ecom_core 1.2.3 → 1.2.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4caca2e265572f6c3af86b8969329871e853a43e660adc8ecdb5b190ce69f3eb
4
- data.tar.gz: 80d51b9cd7383710642c4646e81b2b5ec951f164b3557eb4d0b5b377396fd925
3
+ metadata.gz: '09b8fa70ec63b31c289bacc382fb945336e8e6a3e6930e54d415ed6ba79ec5aa'
4
+ data.tar.gz: d8cbbc31eb4718a6b4af1808810a3defa163b4b0743d235756e618e1bb37fb10
5
5
  SHA512:
6
- metadata.gz: 40808b1cb74da0ebd94aad66ee309829fd85a54dd709bce3ccecc426c67311f39d1fd1688a6846459470ca38f68cc90b7f23b03a8f22a438e5bb87ea87d80e5f
7
- data.tar.gz: 2bc74384e4f768b179b5e89cc6df416b9cae75de00a13a0355e4cd03e10ed0b4058cc18fc0b79e4495d67fbdd83014207b32a99c8252a45bcd78a88049918ad1
6
+ metadata.gz: 7ba2a9547ffcb1d3085b893e44bee505639abb61caa3cdc28df3cbf56f883910ac1bea7b9645d0577b0bb006dd81a4b5df661cac74f54323a224b8b1b3d7cbc8
7
+ data.tar.gz: c0eb28eb93b466d7da5dcdf05876351c721e8a541e33cd0d23a26627cf5e0f1934e1e94283f35636111e949c8095e93c58c69f8a39f648c72f622898e15a5b19
@@ -9,6 +9,7 @@ module Ecom
9
9
  validates :status, inclusion: [OPEN, SUBMITTED, APPROVED]
10
10
 
11
11
  has_many :attendance_sheet_entries
12
+ has_many :crew_times, through: :attendance_sheet_entries
12
13
 
13
14
  scope :open, -> { where(status: OPEN) }
14
15
  scope :current, -> { where(date: Date.today) }
@@ -20,7 +20,7 @@ module Ecom
20
20
  validates :checkin_time, presence: true, if: :checkout_time
21
21
 
22
22
  before_save :calculate_hours
23
- after_commit :calculate_total
23
+ after_save :calculate_total
24
24
 
25
25
  def calculate_hours
26
26
  self.hours = if checkout_time.nil? || checkin_time.nil?
@@ -1,5 +1,5 @@
1
1
  module Ecom
2
2
  module Core
3
- VERSION = '1.2.3'.freeze
3
+ VERSION = '1.2.4'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ecom_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.3
4
+ version: 1.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henock L.