[Cost Report] Set the default operator for the date_exact filter type to "w" (This week)

git-svn-id: https://dev.finn.de/svn/cockpit/trunk@243 7926756e-e54e-46e6-9721-ed318f58905e
pull/6827/head
hjust 15 years ago
parent 6224b08a0c
commit bc783abc81
  1. 5
      app/models/cost_query.rb

@ -30,6 +30,9 @@ class Filter
@column = column
@enabled = true
default_operator = CostQuery.filter_types[@column[:type]][:default]
@operator = default_operator if default_operator
end
attr_reader :scope, :column_name, :column
@ -132,7 +135,7 @@ class CostQuery < ActiveRecord::Base
{
:integer_zero => {:operators => [ "=n", ">=", "<=", "0", "*" ], :multiple => true},
:boolean => {:operators => [ "y", "n" ], :multiple => false},
:date_exact => {:operators => [ "<d", ">d", "<>d", "=d", "t", "w"], :multiple => true}
:date_exact => {:operators => [ "<d", ">d", "<>d", "=d", "t", "w"], :multiple => true, :default => "w"}
}
)
end

Loading…
Cancel
Save