Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision eb1089c2

Von Bernd Bleßmann vor 29 Tagen hinzugefügt

  • ID eb1089c2b1e435be0efbed7ce838492820ccdc71
  • Vorgänger 5b4ef61a
  • Nachfolger 4054cdd3

Presenter für Lager/Lagerplatz-Auswahl

Unterschiede anzeigen:

SL/Controller/Warehouse.pm
5 5
use parent qw(SL::Controller::Base);
6 6

  
7 7
use SL::DB::Warehouse;
8
use SL::Presenter::Tag qw(select_tag);
8 9

  
9 10
__PACKAGE__->run_before('check_auth');
11
__PACKAGE__->run_before(sub { $::auth->assert('developer') },
12
                        only => [ qw(test_page) ]);
10 13

  
11 14
#
12 15
# actions
13 16
#
14 17

  
18
sub action_test_page {
19
  $_[0]->render('warehouse/test_page');
20
}
21

  
15 22
sub action_reorder {
16 23
  my ($self) = @_;
17 24

  
18 25
  SL::DB::Warehouse->reorder_list(@{ $::form->{warehouse_id} || [] });
19 26

  
20
  $self->render(\'', { type => 'json' });
27
  $self->render(\'', { type => 'json' }); # make emacs happy again ')
21 28
}
22 29

  
30
sub action_wh_bin_select_update_bins {
31
  my ($self) = @_;
32

  
33
  my $wh_id      = $::form->{wh_id};
34
  my $bin_dom_id = $::form->{bin_dom_id} || 'bin';
35

  
36
  my $bins = $wh_id ? SL::DB::Warehouse->new(id => $wh_id)->load->bins_sorted_naturally
37
           : [{id => '', description => ''}];
38

  
39
  $self->js->run('kivi.Warehouse.wh_bin_select_update_bins', $bin_dom_id, [map { {key => $_->{id}, value => $_->{description}} } @$bins])
40
           ->render;
41
}
42

  
43

  
23 44
#
24 45
# filters
25 46
#

Auch abrufbar als: Unified diff