dorsale 3.7.5 → 3.7.6
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
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 81e50babe312e2efc734c4f4a8d7f0330a9d202b
|
|
4
|
+
data.tar.gz: 288ebe8ef980c2757c47371d8f31c149b0b0136f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7aee6d4aad771859b4a6d695ae10f616b48bf7d0052e704103b861131fb3c8025b780a54dea643250cff7feae0af11fad2fe2623db6b9dd57bf82a9af20b1938
|
|
7
|
+
data.tar.gz: 6cd4a6e643628440fb561f3dd1c31373b12dac4ca94de30ccf1ea9cb651aa9180bb37f97e9c2c70b55a369db79a3a4c438c4c4471942f2864c2609e76c44c682
|
data/CHANGELOG.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
class Dorsale::BillingMachine::SmallData::FilterStrategyByState < ::Agilibox::SmallData::FilterStrategy
|
|
2
2
|
def apply(query, value)
|
|
3
3
|
if value.to_s.match(/not_(.+)/)
|
|
4
|
-
query.where(
|
|
4
|
+
query.where.not(state: $~[1])
|
|
5
5
|
else
|
|
6
6
|
query.where(state: value)
|
|
7
7
|
end
|
|
@@ -34,8 +34,9 @@ module Dorsale::BillingMachine::ApplicationHelper
|
|
|
34
34
|
end
|
|
35
35
|
|
|
36
36
|
def billing_machine_invoices_chart
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
model = ::Dorsale::BillingMachine::Invoice
|
|
38
|
+
invoices = policy_scope(model)
|
|
39
|
+
.where("#{model.table_name}.date > ?", 1.year.ago.beginning_of_month)
|
|
39
40
|
|
|
40
41
|
totals = {}
|
|
41
42
|
|
|
@@ -29,41 +29,41 @@ class Dorsale::Flyboy::Task < ::Dorsale::ApplicationRecord
|
|
|
29
29
|
|
|
30
30
|
scope :ontime, -> {
|
|
31
31
|
undone
|
|
32
|
-
.where("term IS NULL OR term > ?", Time.zone.now.to_date)
|
|
33
|
-
.where("reminder_date IS NULL OR reminder_date > ?", Time.zone.now.to_date)
|
|
32
|
+
.where("#{table_name}.term IS NULL OR #{table_name}.term > ?", Time.zone.now.to_date)
|
|
33
|
+
.where("#{table_name}.reminder_date IS NULL OR #{table_name}.reminder_date > ?", Time.zone.now.to_date)
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
scope :onwarning, -> {
|
|
37
37
|
undone
|
|
38
|
-
.where("reminder_date <= ?", Time.zone.now.to_date)
|
|
39
|
-
.where("term IS NULL OR term > ?", Time.zone.now.to_date)
|
|
38
|
+
.where("#{table_name}.reminder_date <= ?", Time.zone.now.to_date)
|
|
39
|
+
.where("#{table_name}.term IS NULL OR #{table_name}.term > ?", Time.zone.now.to_date)
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
scope :onalert, -> {
|
|
43
43
|
undone
|
|
44
|
-
.where("term <= ?", Time.zone.now.to_date)
|
|
44
|
+
.where("#{table_name}.term <= ?", Time.zone.now.to_date)
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
scope :delayed, -> { where(done: false).where("term < ?", Time.zone.now.to_date) }
|
|
48
|
-
scope :today, -> { where(done: false).where("term = ?", Time.zone.now.to_date) }
|
|
49
|
-
scope :tomorrow, -> { where(done: false).where("term = ?", Date.tomorrow) }
|
|
47
|
+
scope :delayed, -> { where(done: false).where("#{table_name}.term < ?", Time.zone.now.to_date) }
|
|
48
|
+
scope :today, -> { where(done: false).where("#{table_name}.term = ?", Time.zone.now.to_date) }
|
|
49
|
+
scope :tomorrow, -> { where(done: false).where("#{table_name}.term = ?", Date.tomorrow) }
|
|
50
50
|
|
|
51
51
|
scope :this_week, -> {
|
|
52
52
|
min = Date.tomorrow
|
|
53
53
|
max = Time.zone.now.to_date.end_of_week
|
|
54
|
-
where(done: false).where("term > ?", min).where("term <= ?", max)
|
|
54
|
+
where(done: false).where("#{table_name}.term > ?", min).where("#{table_name}.term <= ?", max)
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
scope :next_week, -> {
|
|
58
58
|
min = Time.zone.now.to_date.end_of_week
|
|
59
59
|
max = Time.zone.now.to_date.next_week.end_of_week
|
|
60
|
-
where(done: false).where("term > ?", min).where("term <= ?", max)
|
|
60
|
+
where(done: false).where("#{table_name}.term > ?", min).where("#{table_name}.term <= ?", max)
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
scope :next_next_week, -> {
|
|
64
64
|
min = Time.zone.now.to_date.next_week.end_of_week
|
|
65
65
|
max = Time.zone.now.to_date.next_week.next_week.end_of_week
|
|
66
|
-
where(done: false).where("term > ?", min).where("term <= ?", max)
|
|
66
|
+
where(done: false).where("#{table_name}.term > ?", min).where("#{table_name}.term <= ?", max)
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
validates :name, presence: true
|
data/lib/dorsale/version.rb
CHANGED