fossil 0.5.13 → 0.5.14
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.
- data/VERSION +1 -1
- data/fossil.gemspec +1 -1
- data/lib/models/crew_duty.rb +1 -4
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.14
|
data/fossil.gemspec
CHANGED
data/lib/models/crew_duty.rb
CHANGED
@@ -131,14 +131,11 @@ class CrewDuty < Sequel::Model(:'crew duty')
|
|
131
131
|
# Fetches the crew duty records in a given interval
|
132
132
|
def self.find_crew_duty_in_time_range(from_datetime, to_datetime)
|
133
133
|
# Fetching the records verified or amended in the time interval passed in
|
134
|
-
|
134
|
+
CrewDuty.filter(
|
135
135
|
{:verified=>1, :amended=>0, :verified_date=>from_datetime.to_fos_days, :verified_time=>(from_datetime.as_minutes..1440)} |
|
136
136
|
{:verified=>1, :amended=>0, :verified_date=>to_datetime.to_fos_days, :verified_time=>(0..to_datetime.as_minutes)} |
|
137
137
|
{:verified=>1, :amended=>1, :amended_date=>from_datetime.to_fos_days, :amended_time=>(from_datetime.as_minutes..1440)} |
|
138
138
|
{:verified=>1, :amended=>1, :amended_date=>to_datetime.to_fos_days, :amended_time=>(0..to_datetime.as_minutes)}
|
139
139
|
).all
|
140
|
-
|
141
|
-
# Extracting the meaningful values from the result set
|
142
|
-
crew_duties.collect {|crew_duty| crew_duty.fill_hash([:employee_id,:duty_start_time,:duty_end_time]) }
|
143
140
|
end
|
144
141
|
end
|