Zeiterfassung: Defaultfilter: aktueller Benutzer, letzte 2 Wochen
authorSven Schöling <s.schoeling@googlemail.com>
Fri, 11 Dec 2020 16:26:33 +0000 (17:26 +0100)
committerBernd Bleßmann <bernd@kivitendo-premium.de>
Wed, 5 May 2021 15:25:02 +0000 (17:25 +0200)
SL/Controller/TimeRecording.pm

index e914236..0a171a6 100644 (file)
@@ -43,6 +43,11 @@ my %sort_columns = (
 sub action_list {
   my ($self, %params) = @_;
 
+  $::form->{filter} //=  {
+    staff_member_id       => SL::DB::Manager::Employee->current->id,
+    "start_time:date::ge" => DateTime->now_local->add(weeks => -2)->to_kivitendo,
+  };
+
   $self->setup_list_action_bar;
   $self->make_filter_summary;
   $self->prepare_report;