Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 159dd378

Von Thomas Heck vor etwa 12 Jahren hinzugefügt

  • ID 159dd37836728abbb2caca3cb25904428ed99859
  • Vorgänger 540c0b5e
  • Nachfolger 11860978

CSV-Import: Projekte

implementiert #1907

Unterschiede anzeigen:

SL/Controller/CsvImport.pm
11 11
use SL::Controller::CsvImport::CustomerVendor;
12 12
use SL::Controller::CsvImport::Part;
13 13
use SL::Controller::CsvImport::Shipto;
14
use SL::Controller::CsvImport::Project;
14 15

  
15 16
use List::MoreUtils qw(none);
16 17

  
......
99 100
sub check_type {
100 101
  my ($self) = @_;
101 102

  
102
  die "Invalid CSV import type" if none { $_ eq $::form->{profile}->{type} } qw(parts customers_vendors addresses contacts);
103
  die "Invalid CSV import type" if none { $_ eq $::form->{profile}->{type} } qw(parts customers_vendors addresses contacts projects);
103 104
  $self->type($::form->{profile}->{type});
104 105
}
105 106

  
......
141 142
            : $self->type eq 'addresses'         ? $::locale->text('CSV import: shipping addresses')
142 143
            : $self->type eq 'contacts'          ? $::locale->text('CSV import: contacts')
143 144
            : $self->type eq 'parts'             ? $::locale->text('CSV import: parts and services')
145
            : $self->type eq 'projects'          ? $::locale->text('CSV import: projects')
144 146
            : die;
145 147

  
146 148
  if ($self->{type} eq 'parts') {
......
258 260
       : $self->{type} eq 'contacts'          ? SL::Controller::CsvImport::Contact->new(       controller => $self, file => $file)
259 261
       : $self->{type} eq 'addresses'         ? SL::Controller::CsvImport::Shipto->new(        controller => $self, file => $file)
260 262
       : $self->{type} eq 'parts'             ? SL::Controller::CsvImport::Part->new(          controller => $self, file => $file)
263
       : $self->{type} eq 'projects'          ? SL::Controller::CsvImport::Project->new(       controller => $self, file => $file)
261 264
       :                                        die "Program logic error";
262 265
}
263 266

  

Auch abrufbar als: Unified diff