Revision a51e1869
Von Bernd Bleßmann vor mehr als 3 Jahren hinzugefügt
SL/Controller/TimeRecording.pm | ||
---|---|---|
18 | 18 |
use Rose::Object::MakeMethods::Generic |
19 | 19 |
( |
20 | 20 |
# scalar => [ qw() ], |
21 |
'scalar --get_set_init' => [ qw(time_recording models all_time_recording_types all_employees can_view_all can_edit_all) ],
|
|
21 |
'scalar --get_set_init' => [ qw(time_recording models all_employees can_view_all can_edit_all) ], |
|
22 | 22 |
); |
23 | 23 |
|
24 | 24 |
|
... | ... | |
34 | 34 |
start_time => t8('Start'), |
35 | 35 |
end_time => t8('End'), |
36 | 36 |
customer => t8('Customer'), |
37 |
type => t8('Type'), |
|
38 | 37 |
project => t8('Project'), |
39 | 38 |
description => t8('Description'), |
40 | 39 |
staff_member => t8('Mitarbeiter'), |
... | ... | |
151 | 150 |
sorted => \%sort_columns, |
152 | 151 |
disable_plugin => 'paginated', |
153 | 152 |
query => \@where, |
154 |
with_objects => [ 'customer', 'type', 'project', 'staff_member', 'employee' ],
|
|
153 |
with_objects => [ 'customer', 'project', 'staff_member', 'employee' ], |
|
155 | 154 |
); |
156 | 155 |
} |
157 | 156 |
|
158 |
sub init_all_time_recording_types { |
|
159 |
SL::DB::Manager::TimeRecordingType->get_all_sorted(query => [obsolete => 0]); |
|
160 |
} |
|
161 |
|
|
162 | 157 |
sub init_all_employees { |
163 | 158 |
SL::DB::Manager::Employee->get_all_sorted(query => [ deleted => 0 ]); |
164 | 159 |
} |
... | ... | |
181 | 176 |
my $report = SL::ReportGenerator->new(\%::myconfig, $::form); |
182 | 177 |
$self->{report} = $report; |
183 | 178 |
|
184 |
my @columns = qw(start_time end_time customer type project description staff_member duration);
|
|
179 |
my @columns = qw(start_time end_time customer project description staff_member duration); |
|
185 | 180 |
|
186 | 181 |
my %column_defs = ( |
187 | 182 |
start_time => { text => t8('Start'), sub => sub { $_[0]->start_time_as_timestamp }, |
... | ... | |
189 | 184 |
end_time => { text => t8('End'), sub => sub { $_[0]->end_time_as_timestamp }, |
190 | 185 |
obj_link => sub { $self->url_for(action => 'edit', 'id' => $_[0]->id, callback => $self->models->get_callback) } }, |
191 | 186 |
customer => { text => t8('Customer'), sub => sub { $_[0]->customer->displayable_name } }, |
192 |
type => { text => t8('Type'), sub => sub { $_[0]->type && $_[0]->type->abbreviation } }, |
|
193 | 187 |
project => { text => t8('Project'), sub => sub { $_[0]->project && $_[0]->project->displayable_name } }, |
194 | 188 |
description => { text => t8('Description'), sub => sub { $_[0]->description_as_stripped_html }, |
195 | 189 |
raw_data => sub { $_[0]->description_as_restricted_html }, # raw_data only used for html(?) |
Auch abrufbar als: Unified diff
Zeiterfassung: Keine Zeiterfassungstypen mehr