CSV-Import: Projekte
[kivitendo-erp.git] / SL / Controller / CsvImport.pm
index e603faa..d924f07 100644 (file)
@@ -11,6 +11,7 @@ use SL::Controller::CsvImport::Contact;
 use SL::Controller::CsvImport::CustomerVendor;
 use SL::Controller::CsvImport::Part;
 use SL::Controller::CsvImport::Shipto;
+use SL::Controller::CsvImport::Project;
 
 use List::MoreUtils qw(none);
 
@@ -99,7 +100,7 @@ sub check_auth {
 sub check_type {
   my ($self) = @_;
 
-  die "Invalid CSV import type" if none { $_ eq $::form->{profile}->{type} } qw(parts customers_vendors addresses contacts);
+  die "Invalid CSV import type" if none { $_ eq $::form->{profile}->{type} } qw(parts customers_vendors addresses contacts projects);
   $self->type($::form->{profile}->{type});
 }
 
@@ -141,6 +142,7 @@ sub render_inputs {
             : $self->type eq 'addresses'         ? $::locale->text('CSV import: shipping addresses')
             : $self->type eq 'contacts'          ? $::locale->text('CSV import: contacts')
             : $self->type eq 'parts'             ? $::locale->text('CSV import: parts and services')
+            : $self->type eq 'projects'          ? $::locale->text('CSV import: projects')
             : die;
 
   if ($self->{type} eq 'parts') {
@@ -258,6 +260,7 @@ sub create_worker {
        : $self->{type} eq 'contacts'          ? SL::Controller::CsvImport::Contact->new(       controller => $self, file => $file)
        : $self->{type} eq 'addresses'         ? SL::Controller::CsvImport::Shipto->new(        controller => $self, file => $file)
        : $self->{type} eq 'parts'             ? SL::Controller::CsvImport::Part->new(          controller => $self, file => $file)
+       : $self->{type} eq 'projects'          ? SL::Controller::CsvImport::Project->new(       controller => $self, file => $file)
        :                                        die "Program logic error";
 }