Revision a833c262
Von Bernd Bleßmann vor etwa 2 Monaten hinzugefügt
SL/Controller/Warehouse.pm | ||
---|---|---|
4 | 4 |
|
5 | 5 |
use parent qw(SL::Controller::Base); |
6 | 6 |
|
7 |
use SL::DB::Bin; |
|
7 | 8 |
use SL::DB::Warehouse; |
8 | 9 |
use SL::Presenter::Tag qw(select_tag); |
9 | 10 |
|
10 | 11 |
__PACKAGE__->run_before('check_auth'); |
11 | 12 |
__PACKAGE__->run_before(sub { $::auth->assert('developer') }, |
12 |
only => [ qw(test_page) ]); |
|
13 |
only => [ qw(test_page test_result) ]);
|
|
13 | 14 |
|
14 | 15 |
# |
15 | 16 |
# actions |
16 | 17 |
# |
17 | 18 |
|
18 | 19 |
sub action_test_page { |
19 |
$_[0]->render('warehouse/test_page'); |
|
20 |
my $pre_filled_wh = SL::DB::Manager::Warehouse->get_all()->[-1]; |
|
21 |
my $pre_filled_bin = SL::DB::Manager::Bin->get_all()->[-1]; |
|
22 |
$_[0]->render('warehouse/test_page', |
|
23 |
pre_filled_wh => $pre_filled_wh, |
|
24 |
pre_filled_bin => $pre_filled_bin); |
|
25 |
} |
|
26 |
|
|
27 |
sub action_test_result { |
|
28 |
my @results; |
|
29 |
|
|
30 |
foreach (1..4) { |
|
31 |
my $wh = 'wh' . $_; |
|
32 |
push @results, $wh . ' : ' . SL::DB::Manager::Bin->find_by_or_create(id => $::form->{$wh . '_bin'}||0)->full_description; |
|
33 |
} |
|
34 |
|
|
35 |
$::form->show_generic_information(join("<br>", @results), 'Results'); |
|
20 | 36 |
} |
21 | 37 |
|
22 | 38 |
sub action_reorder { |
Auch abrufbar als: Unified diff
Presenter Lagerplatz: Test-Seite erweitert …
- Vorbelegte Lager/Lagerplätze
- mit submit und Ergebnisanzeige