Added extra data showing
This commit is contained in:
parent
d20fca6732
commit
c65745f6a2
5 changed files with 104 additions and 35 deletions
|
@ -9,7 +9,7 @@ sub index {
|
|||
$c->stash->{org_entities} = [
|
||||
map {
|
||||
{ id => $_->entity_id, name => $_->name }
|
||||
} $c->schema->resultset('Organisation')->all
|
||||
} $c->schema->resultset('Organisation')->search({ name => { like => '%lancashire%' }}, { columns => [qw/ entity_id name / ]})
|
||||
];
|
||||
|
||||
$c->app->max_request_size(104857600);
|
||||
|
@ -37,9 +37,7 @@ sub post_suppliers {
|
|||
|
||||
my $job_id = $c->minion->enqueue('csv_supplier_import' => [ $filename ]);
|
||||
|
||||
my $job_url = $c->url_for("/admin/minion/jobs?id=$job_id")->to_abs;
|
||||
|
||||
$c->flash(success => "CSV import started, see status of minion job at: $job_url");
|
||||
$c->flash(success => "CSV import started, see status of minion job at: " . $c->link_to( 'Minion Job', "/admin/minion/jobs?id=$job_id"));
|
||||
return $c->redirect_to('/admin/import_from');
|
||||
}
|
||||
|
||||
|
@ -65,9 +63,7 @@ sub post_postcodes {
|
|||
|
||||
my $job_id = $c->minion->enqueue('csv_postcode_import' => [ $filename ]);
|
||||
|
||||
my $job_url = $c->url_for("/admin/minion/jobs?id=$job_id")->to_abs;
|
||||
|
||||
$c->flash(success => "CSV import started, see status of minion job at: $job_url");
|
||||
$c->flash(success => "CSV import started, see status of minion job at: " . $c->link_to( 'Minion Job', "/admin/minion/jobs?id=$job_id"));
|
||||
return $c->redirect_to('/admin/import_from');
|
||||
}
|
||||
|
||||
|
@ -98,9 +94,7 @@ sub post_transactions {
|
|||
|
||||
my $job_id = $c->minion->enqueue('csv_transaction_import' => [ $filename, $c->param('entity_id') ]);
|
||||
|
||||
my $job_url = $c->url_for("/admin/minion/jobs?id=$job_id")->to_abs;
|
||||
|
||||
$c->flash(success => "CSV import started, see status of minion job at: $job_url");
|
||||
$c->flash(success => "CSV import started, see status of minion job at: " . $c->link_to( 'Minion Job', "/admin/minion/jobs?id=$job_id"));
|
||||
return $c->redirect_to('/admin/import_from');
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue