08 2024
This commit is contained in:
parent
04d677d37a
commit
bfa3bb1df4
1191 changed files with 637397 additions and 10619 deletions
59
app/Mail/MailReleaseDocument.php
Normal file
59
app/Mail/MailReleaseDocument.php
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
<?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,
|
||||
]);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue