59 lines
No EOL
2.1 KiB
PHP
59 lines
No EOL
2.1 KiB
PHP
<?php
|
|
namespace App\Mail;
|
|
|
|
use App\User;
|
|
use Illuminate\Bus\Queueable;
|
|
use Illuminate\Mail\Mailable;
|
|
use Illuminate\Queue\SerializesModels;
|
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
|
|
|
class MailReleaseDocument extends Mailable
|
|
{
|
|
use Queueable, SerializesModels;
|
|
|
|
protected $user;
|
|
public $subject;
|
|
|
|
|
|
public function __construct(User $user)
|
|
{
|
|
$this->user = $user;
|
|
$this->subject = 'Berater Unterlagen prüfen';
|
|
}
|
|
|
|
public function build()
|
|
{
|
|
$content = __(strtoupper($this->user->account->salutation))." ";
|
|
$content .= $this->user->account->first_name." ".$this->user->account->last_name."\n";
|
|
$content .= $this->user->account->address."\n";
|
|
$content .= $this->user->account->zipcode." ".$this->user->account->city."\n";
|
|
$content .= $this->user->account->country_id ? $this->user->account->country->de."\n\n" : "\n\n";
|
|
$content .= "E-Mail: ".$this->user->email;
|
|
|
|
|
|
$copy1line = "Ein Berater hat Daten zum Gewerbenachweis geändert, bitte um Prüfung:"."\n\n";
|
|
|
|
$business_license_choose = $this->user->account->getNotice('business_license');
|
|
if($business_license_choose === 'now'){
|
|
$copy1line .= "+ Gewerbeschein jetzt zur Freigabe"."\n\n";
|
|
}
|
|
if($business_license_choose === 'later'){
|
|
$copy1line .= "+ Ich reiche meinen Gewerbeschein innerhalb der nächsten 4 Wochen nach"."\n\n";
|
|
}
|
|
if($business_license_choose === 'non'){
|
|
$copy1line .= "+ Ich benötige keinen Gewerbeschein"."\n";
|
|
$copy1line .= "+ Begründung: ".$this->user->account->getNotice('business_license_reason')."\n\n";
|
|
}
|
|
|
|
$copy1line .= 'Bei fehlerhafter Angabe nimm bitte kontakt mit dem Berater auf.'."\n";
|
|
|
|
return $this->view('emails.info')->with([
|
|
'url' => route('admin_lead_edit', $this->user->id).'?show=check_lead',
|
|
'title' => 'Berater Unterlagen prüfen',
|
|
'button' => 'zur Berater Prüfung',
|
|
'copy1line' => $copy1line,
|
|
'copy2line' => __('email.copy2line'),
|
|
'content' => $content,
|
|
]);
|
|
}
|
|
} |