Revision e7c07dfd
Von Jan Büren vor fast 10 Jahren hinzugefügt
SL/Controller/DeliveryPlan.pm | ||
---|---|---|
13 | 13 |
|
14 | 14 |
use Rose::Object::MakeMethods::Generic ( |
15 | 15 |
scalar => [ qw(db_args flat_filter) ], |
16 |
'scalar --get_set_init' => [ qw(models all_edit_right mode vc all_employees) ], |
|
16 |
'scalar --get_set_init' => [ qw(models all_edit_right mode vc all_employees all_businesses) ],
|
|
17 | 17 |
); |
18 | 18 |
|
19 | 19 |
__PACKAGE__->run_before(sub { $::auth->assert('delivery_plan'); }); |
... | ... | |
40 | 40 |
$self->prepare_report; |
41 | 41 |
|
42 | 42 |
my $orderitems = $self->models->get; |
43 |
$self->{all_businesses} = SL::DB::Manager::Business->get_all_sorted; |
|
44 | 43 |
|
45 | 44 |
$self->report_generator_list_objects(report => $self->{report}, objects => $orderitems); |
46 | 45 |
} |
... | ... | |
306 | 305 |
sub init_all_employees { |
307 | 306 |
return SL::DB::Manager::Employee->get_all_sorted; |
308 | 307 |
} |
308 |
sub init_all_businesses { |
|
309 |
return SL::DB::Manager::Business->get_all_sorted; |
|
310 |
} |
|
309 | 311 |
sub link_to { |
310 | 312 |
my ($self, $object, %params) = @_; |
311 | 313 |
|
Auch abrufbar als: Unified diff
Lieferplan: all_businesses in init-methode ausgelagert
<gorash> kurzes feedback zum lieferplan:
<gorash> in der action alle business laden: der ganze punkt an den init_* sachen ist, dass mand as laden von nötigen daten aus der action rauskriegt