mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 20:00:33 -04:00
app/Mail/Import/ImportCompleted.php
This commit is contained in:
parent
ae66496711
commit
973bdfcb35
@ -133,7 +133,7 @@ class CSVImport implements ShouldQueue {
|
|||||||
];
|
];
|
||||||
|
|
||||||
$nmo = new NinjaMailerObject;
|
$nmo = new NinjaMailerObject;
|
||||||
$nmo->mailable = new ImportCompleted( $data );
|
$nmo->mailable = new ImportCompleted($this->company, $data);
|
||||||
$nmo->company = $this->company;
|
$nmo->company = $this->company;
|
||||||
$nmo->settings = $this->company->settings;
|
$nmo->settings = $this->company->settings;
|
||||||
$nmo->to_user = $this->company->owner();
|
$nmo->to_user = $this->company->owner();
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Invoice Ninja (https://invoiceninja.com).
|
* Invoice Ninja (https://invoiceninja.com).
|
||||||
*
|
*
|
||||||
@ -11,6 +12,7 @@
|
|||||||
|
|
||||||
namespace App\Mail\Import;
|
namespace App\Mail\Import;
|
||||||
|
|
||||||
|
use App\Models\Company;
|
||||||
use Illuminate\Bus\Queueable;
|
use Illuminate\Bus\Queueable;
|
||||||
use Illuminate\Mail\Mailable;
|
use Illuminate\Mail\Mailable;
|
||||||
use Illuminate\Queue\SerializesModels;
|
use Illuminate\Queue\SerializesModels;
|
||||||
@ -19,6 +21,9 @@ class ImportCompleted extends Mailable
|
|||||||
{
|
{
|
||||||
// use Queueable, SerializesModels;
|
// use Queueable, SerializesModels;
|
||||||
|
|
||||||
|
/** @var Company */
|
||||||
|
public $company;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new message instance.
|
* Create a new message instance.
|
||||||
*
|
*
|
||||||
@ -26,8 +31,10 @@ class ImportCompleted extends Mailable
|
|||||||
*/
|
*/
|
||||||
public $data;
|
public $data;
|
||||||
|
|
||||||
public function __construct($data)
|
public function __construct(Company $company, $data)
|
||||||
{
|
{
|
||||||
|
$this->company = $company;
|
||||||
|
|
||||||
$this->data = $data;
|
$this->data = $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -38,7 +45,13 @@ class ImportCompleted extends Mailable
|
|||||||
*/
|
*/
|
||||||
public function build()
|
public function build()
|
||||||
{
|
{
|
||||||
return $this->from(config('mail.from.address'), config('mail.from.name'))
|
$data = array_merge($this->data, [
|
||||||
->view('email.import.completed', $this->data);
|
'logo' => $this->company->present()->logo(),
|
||||||
|
'settings' => $this->company->settings,
|
||||||
|
]);
|
||||||
|
|
||||||
|
return $this
|
||||||
|
->from(config('mail.from.address'), config('mail.from.name'))
|
||||||
|
->view('email.import.completed', $data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
@component('email.template.admin-light', ['logo' => 'https://www.invoiceninja.com/wp-content/uploads/2015/10/logo-white-horizontal-1.png', 'settings' => $settings])
|
@component('email.template.admin', ['logo' => $logo, 'settings' => $settings])
|
||||||
<div class="center">
|
<div class="center">
|
||||||
<h1>Import completed</h1>
|
<h1>{{ ctrans('texts.import_complete') }}</h1>
|
||||||
<p>Hello, here is the output of your recent import job.</p>
|
<p>Hello, here is the output of your recent import job.</p>
|
||||||
|
|
||||||
<p><b>If your logo imported correctly it will display below. If it didn't import, you'll need to reupload your logo</b></p>
|
<p><b>If your logo imported correctly it will display below. If it didn't import, you'll need to reupload your logo</b></p>
|
||||||
@ -98,7 +98,8 @@
|
|||||||
|
|
||||||
<a href="{{ url('/') }}" target="_blank" class="button">{{ ctrans('texts.account_login')}}</a>
|
<a href="{{ url('/') }}" target="_blank" class="button">{{ ctrans('texts.account_login')}}</a>
|
||||||
|
|
||||||
<p>{{ ctrans('texts.email_signature')}}<br/> {{ ctrans('texts.email_from') }}</p>
|
<p>{{ ctrans('texts.email_signature')}}</p>
|
||||||
|
<p>{{ ctrans('texts.email_from') }}</p>
|
||||||
</div>
|
</div>
|
||||||
@endcomponent
|
@endcomponent
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user