mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Import notifications
This commit is contained in:
parent
2347b9db7a
commit
ea360cead4
@ -102,11 +102,12 @@ class CSVImport implements ShouldQueue
|
||||
$this->{"import".ucfirst($this->entity_type)}();
|
||||
|
||||
$data = [
|
||||
'entity' => $this->entity_type,
|
||||
'entity' => ucfirst($this->entity_type),
|
||||
'errors' => $this->error_array,
|
||||
'clients' => $this->maps['clients'],
|
||||
'products' => $this->maps['products'],
|
||||
'invoices' => $this->maps['invoices'],
|
||||
'settings' => $this->company->settings
|
||||
];
|
||||
|
||||
MailRouter::dispatch(new ImportCompleted($data), $this->company, auth()->user());
|
||||
|
@ -97,8 +97,9 @@ class BaseMailerJob implements ShouldQueue
|
||||
public function failed($exception = null)
|
||||
{
|
||||
|
||||
// info('the job failed');
|
||||
|
||||
info('the job failed');
|
||||
info($exception->getMessage());
|
||||
|
||||
$job_failure = new EmailFailure();
|
||||
$job_failure->string_metric5 = get_parent_class($this);
|
||||
$job_failure->string_metric6 = $exception->getMessage();
|
||||
|
@ -30,6 +30,6 @@ class ImportCompleted extends Mailable
|
||||
public function build()
|
||||
{
|
||||
return $this->from(config('mail.from.address'), config('mail.from.name'))
|
||||
->view('email.import.completed', compact($this->data));
|
||||
->view('email.import.completed', $this->data);
|
||||
}
|
||||
}
|
||||
|
@ -1,41 +0,0 @@
|
||||
@component('email.template.master', ['design' => 'light', 'settings' =>$settings])
|
||||
|
||||
@slot('header')
|
||||
@component('email.components.header')
|
||||
Migration already completed
|
||||
@endcomponent
|
||||
@endslot
|
||||
|
||||
@slot('greeting')
|
||||
Hello,
|
||||
@endslot
|
||||
|
||||
Here is the output of your recent import job.
|
||||
|
||||
Entity Type: {{ $entity_type }}
|
||||
|
||||
@if(count($errors['invoices']) >=1)
|
||||
<ul>
|
||||
@foreach($errors as $error)
|
||||
<li>{{ $error['invoice'] }} - {{ $error['error'] }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
@endif
|
||||
|
||||
@component('email.components.button', ['url' => url('/')])
|
||||
Visit portal
|
||||
@endcomponent
|
||||
|
||||
|
||||
@slot('signature')
|
||||
Thank you, <br>
|
||||
Invoice Ninja
|
||||
@endslot
|
||||
|
||||
@slot('footer')
|
||||
@component('email.components.footer', ['url' => 'https://invoiceninja.com', 'url_text' => '© InvoiceNinja'])
|
||||
For any info, please visit InvoiceNinja.
|
||||
@endcomponent
|
||||
@endslot
|
||||
|
||||
@endcomponent
|
Loading…
x
Reference in New Issue
Block a user