-sub list_objects {
- my ($self) = @_;
- my $column_defs = $self->{report_data}->{column_defs};
-
- for my $obj (@{ $self->{projects} || [] }) {
- my %data = map {
- $_ => {
- data => $column_defs->{$_}{sub} ? $column_defs->{$_}{sub}->($obj)
- : $obj->can($_) ? $obj->$_
- : $obj->{$_},
- link => $column_defs->{$_}{obj_link} ? $column_defs->{$_}{obj_link}->($obj) : '',
- },
- } @{ $self->{report_data}{columns} || {} };
+sub make_filter_summary {
+ my ($self) = @_;
+
+ my $filter = $::form->{filter} || {};
+ my @filter_strings;
+
+ my @filters = (
+ [ $filter->{"projectnumber:substr::ilike"}, t8('Project Number') ],
+ [ $filter->{"description:substr::ilike"}, t8('Description') ],
+ [ $filter->{customer}{"name:substr::ilike"}, t8('Customer') ],
+ [ $filter->{"project_type_id"}, t8('Project Type'), sub { SL::DB::Manager::ProjectType->find_by(id => $filter->{"project_type_id"})->description } ],
+ [ $filter->{"project_status_id"}, t8('Project Status'), sub { SL::DB::Manager::ProjectStatus->find_by(id => $filter->{"project_status_id"})->description } ],
+ );
+
+ my @flags = (
+ [ $filter->{active} eq 'active', $::locale->text('Active') ],
+ [ $filter->{active} eq 'inactive', $::locale->text('Inactive') ],
+ [ $filter->{valid} eq 'valid', $::locale->text('Valid') ],
+ [ $filter->{valid} eq 'invalid', $::locale->text('Invalid') ],
+ [ $filter->{orphaned}, $::locale->text('Orphaned') ],
+ );