This commit is contained in:
Kevin Adametz 2020-02-14 10:18:44 +01:00
parent f117f79bb9
commit 3711fcc8d0
101 changed files with 4027 additions and 918 deletions

View file

@ -0,0 +1,48 @@
<?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 MailAccountActive extends Mailable
{
use Queueable, SerializesModels;
protected $confirmation_code;
protected $user;
public $subject;
public function __construct(User $user)
{
$this->user = $user;
$this->subject = __('email.account_active');
}
public function build()
{
$salutation = __('email.salutation').",";
if($this->user->account){
if($this->user->account->salutation === "mr"){
$salutation = __('email.dear_sir')." ".$this->user->account->first_name.",";
}else{
$salutation = __('email.dear_mrs')." ".$this->user->account->first_name.",";
}
}
return $this->view('emails.auth')->with([
'url' => route('login'),
'salutation' => $salutation,
'button' => __('Login'),
'copy1line' => __('email.account_active_copy1line'),
'copy2line' => __('email.copy2line'),
'copy3line' => __('email.copy3line'),
'greetings' => __('email.greetings'),
'sender' => __('email.sender'),
]);
}
}

View file

@ -12,6 +12,7 @@ class MailActivateUser extends Mailable
use Queueable, SerializesModels;
protected $token;
protected $user;
public $subject;
public function __construct($token, User $user)
@ -25,7 +26,7 @@ class MailActivateUser extends Mailable
$salutation = __('email.salutation').",";
if($this->user->account){
if($this->user->account->salutation == "mr"){
if($this->user->account->salutation === "mr"){
$salutation = __('email.dear_sir')." ".$this->user->account->first_name.",";
}else{
$salutation = __('email.dear_mrs')." ".$this->user->account->first_name.",";

View file

@ -41,7 +41,7 @@ class MailCheckout extends Mailable
$salutation = __('email.hello')." ".$this->shopping_order->shopping_user->billing_firstname.",";
//make Adresse
}
if($this->txaction == 'paid'){
if($this->txaction === 'paid'){
return $this->view('emails.checkout')->with([
'salutation' => $salutation,
'copy1line' => __('email.checkout_copy1line'),

View file

@ -0,0 +1,64 @@
<?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 MailReleaseAccount extends Mailable
{
use Queueable, SerializesModels;
protected $user;
public $subject;
public function __construct(User $user)
{
$this->user = $user;
$this->subject = 'Berater Registrierung pürfen';
}
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";
if($this->user->account->phone){
$content .= "Telefon: ";
$content .= $this->user->account->pre_phone_id ? $this->user->account->pre_phone->phone." " : " ";
$content .= $this->user->account->phone;
}
if($this->user->account->mobil){
$content .= "Mobil: ";
$content .= $this->user->account->pre_mobil_id ? $this->user->account->pre_mobil->phone." " : " ";
$content .= $this->user->account->mobil;
}
$content .= "E-Mail: ".$this->user->email;
$copy1line = "Ein neuer Berater hat sich Registriert und wartet auf die Überprüfung und Freigabe seiner Daten."."\n";
$copy1line .= "+ Überprüfung Ausweisdaten"."\n";
$copy1line .= "+ Überprüfung Gewerbenachweis"."\n";
$copy1line .= "+ Eintrag Account ID"."\n";
$copy1line .= "+ Überprüfung Karriere-Level/Sponsor"."\n";
$copy1line .= "+ Überprüfung Rechnungsdaten"."\n";
$copy1line .= 'Nach erfolgreicher Überprüfung mit dem Button "Daten vollständigt => Berater freischalten" den Berater freischalten.'."\n";
$copy1line .= 'Der Berater erhält eine Mail, dass sein Account freigeschaltet worden ist. In den Vertrag wird automatisch mit den eingetragenden Inhalten erstellt.'."\n";
return $this->view('emails.info')->with([
'url' => route('admin_lead_edit', $this->user->id).'?show=check_lead',
'salutation' => 'Berater Registrierung pürfen',
'button' => 'zur Berater Prüfung',
'copy1line' => $copy1line,
'copy2line' => __('email.copy2line'),
'content' => $content,
]);
}
}

View file

@ -12,6 +12,7 @@ class MailResetPassword extends Mailable
use Queueable, SerializesModels;
protected $token;
protected $user;
public $subject;
@ -29,7 +30,7 @@ class MailResetPassword extends Mailable
{
$salutation = __('email.salutation').",";
if($this->user->account){
if($this->user->account->salutation == "mr"){
if($this->user->account->salutation === "mr"){
$salutation = __('email.dear_sir')." ".$this->user->account->first_name.",";
}else{
$salutation = __('email.dear_mrs')." ".$this->user->account->first_name.",";

View file

@ -12,6 +12,7 @@ class MailVerifyAccount extends Mailable
use Queueable, SerializesModels;
protected $confirmation_code;
protected $user;
public $subject;
@ -26,9 +27,8 @@ class MailVerifyAccount extends Mailable
public function build()
{
$salutation = __('email.salutation').",";
if($this->user->account){
if($this->user->account->salutation == "mr"){
if($this->user->account->salutation === "mr"){
$salutation = __('email.dear_sir')." ".$this->user->account->first_name.",";
}else{
$salutation = __('email.dear_mrs')." ".$this->user->account->first_name.",";
@ -39,8 +39,8 @@ class MailVerifyAccount extends Mailable
'salutation' => $salutation,
'button' => __('email.email_verify'),
'copy1line' => __('email.email_verify_copy1line'),
'copy2line' => __('email.active_copy2line'),
'copy3line' => __('email.active_copy3line'),
'copy2line' => __('email.copy2line'),
'copy3line' => __('email.copy3line'),
'greetings' => __('email.greetings'),
'sender' => __('email.sender'),

View file

@ -12,6 +12,7 @@ class MailVerifyContact extends Mailable
use Queueable, SerializesModels;
protected $confirmation_code;
protected $user;
public $subject;
@ -27,7 +28,7 @@ class MailVerifyContact extends Mailable
{
$salutation = __('email.salutation').",";
if($this->user->account){
if($this->user->account->salutation == "mr"){
if($this->user->account->salutation === "mr"){
$salutation = __('email.dear_sir')." ".$this->user->account->first_name.",";
}else{
$salutation = __('email.dear_mrs')." ".$this->user->account->first_name.",";