08 2024
This commit is contained in:
parent
04d677d37a
commit
bfa3bb1df4
1191 changed files with 637397 additions and 10619 deletions
38
app/Mail/Exception.php
Normal file
38
app/Mail/Exception.php
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
<?php
|
||||
namespace App\Mail;
|
||||
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Mail\Mailable;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
class Exception extends Mailable
|
||||
{
|
||||
use Queueable, SerializesModels;
|
||||
public $content;
|
||||
public $css;
|
||||
/**
|
||||
* Create a new message instance.
|
||||
*
|
||||
* @param $data
|
||||
*/
|
||||
public function __construct($css, $content)
|
||||
{
|
||||
$this->css = $css;
|
||||
$this->content = $content;
|
||||
|
||||
}
|
||||
/**
|
||||
* Build the message.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function build()
|
||||
{
|
||||
return $this->view('emails.exception')
|
||||
->subject('mivita Exception Logged!')
|
||||
->with([
|
||||
'content' => $this->content,
|
||||
'css' => $this->css,
|
||||
|
||||
]);
|
||||
}
|
||||
}
|
||||
36
app/Mail/ExceptionOccured.php
Normal file
36
app/Mail/ExceptionOccured.php
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
<?php
|
||||
namespace App\Mail;
|
||||
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Mail\Mailable;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
|
||||
class ExceptionOccured extends Mailable
|
||||
{
|
||||
use Queueable, SerializesModels;
|
||||
|
||||
public $content;
|
||||
|
||||
|
||||
/**
|
||||
* Create a new message instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct($content)
|
||||
{
|
||||
$this->content = $content;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build the message.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function build()
|
||||
{
|
||||
return $this->view('emails.exception')
|
||||
->with('content', $this->content);
|
||||
}
|
||||
}
|
||||
62
app/Mail/MailAutoReleaseAccount.php
Normal file
62
app/Mail/MailAutoReleaseAccount.php
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
<?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 MailAutoReleaseAccount extends Mailable
|
||||
{
|
||||
use Queueable, SerializesModels;
|
||||
|
||||
protected $user;
|
||||
public $subject;
|
||||
|
||||
|
||||
public function __construct(User $user)
|
||||
{
|
||||
$this->user = $user;
|
||||
$this->subject = 'Neuer Berater Registrierung und freigeschaltet';
|
||||
}
|
||||
|
||||
|
||||
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 wurde automatisch freigeschaltet. Seine Daten müssen nachträglich Überprüfung werden:"."\n";
|
||||
$copy1line .= "+ Überprüfung der Ausweisdaten"."\n";
|
||||
$copy1line .= "+ Überprüfung des Gewerbenachweises"."\n";
|
||||
$copy1line .= "+ Eintrag Account ID"."\n";
|
||||
$copy1line .= "+ Überprüfung / Kenntnisnahme Sponsor"."\n";
|
||||
$copy1line .= "+ Überprüfung der Rechnungsdaten"."\n";
|
||||
$copy1line .= 'Sollte Daten nicht vollständig sein, bitte Kontakt zum Berater aufnehmen.'."\n";
|
||||
|
||||
return $this->view('emails.info')->with([
|
||||
'url' => route('admin_lead_edit', $this->user->id).'?show=check_lead',
|
||||
'title' => 'Berater Registrierung prüfen',
|
||||
'button' => 'zur Berater Prüfung',
|
||||
'copy1line' => $copy1line,
|
||||
'copy2line' => __('email.copy2line'),
|
||||
'content' => $content,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
@ -24,7 +24,7 @@ class MailCredit extends Mailable
|
|||
public function __construct(UserCredit $user_credit)
|
||||
{
|
||||
$this->user_credit = $user_credit;
|
||||
$this->subject = 'Deine Gutschrift auf mivita.care';
|
||||
$this->subject = __('email.credit_title');
|
||||
}
|
||||
|
||||
public function build()
|
||||
|
|
|
|||
57
app/Mail/MailCustomPaymet.php
Normal file
57
app/Mail/MailCustomPaymet.php
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
<?php
|
||||
namespace App\Mail;
|
||||
|
||||
use App\User;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Mail\Mailable;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use App\Services\Util;
|
||||
|
||||
class MailCustomPaymet extends Mailable
|
||||
{
|
||||
use Queueable, SerializesModels;
|
||||
|
||||
protected $route;
|
||||
protected $shopping_user;
|
||||
protected $shopping_instance;
|
||||
protected $mode;
|
||||
protected $name;
|
||||
protected $yard_shopping_items;
|
||||
|
||||
|
||||
public $subject;
|
||||
public $data;
|
||||
|
||||
|
||||
public function __construct($route, $shopping_user, $shopping_instance, $yard_shopping_items, $mode)
|
||||
{
|
||||
$this->route = $route;
|
||||
$this->shopping_user = $shopping_user;
|
||||
$this->shopping_instance = $shopping_instance;
|
||||
$this->mode = $mode;
|
||||
$this->yard_shopping_items = $yard_shopping_items;
|
||||
|
||||
$this->name = $shopping_user->member->account->first_name." ".$shopping_user->member->account->last_name." - ";
|
||||
$this->subject = __('email.subject_custom_payout', ['name' => $this->name]);
|
||||
}
|
||||
|
||||
|
||||
public function build()
|
||||
{
|
||||
$salutation = __('email.hello')." ".$this->shopping_user->billing_firstname.",";
|
||||
|
||||
return $this->view('emails.custom_payment')->with([
|
||||
'salutation' => $salutation,
|
||||
'copy1line' => __('email.your_custom_payout', ['name' => $this->name]),
|
||||
'shopping_user' => $this->shopping_user,
|
||||
'shopping_instance' => $this->shopping_instance,
|
||||
'yard_shopping_items' => $this->yard_shopping_items,
|
||||
'copy3line' => __('email.checkout_copy3line'),
|
||||
'greetings' => __('email.greetings'),
|
||||
'route' => $this->route,
|
||||
'mode' => $this->mode,
|
||||
'sender' => __('email.sender'),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
@ -23,8 +23,7 @@ class MailInvoice extends Mailable
|
|||
{
|
||||
$this->shopping_order = $shopping_order;
|
||||
$this->user_invoice = $user_invoice;
|
||||
$this->subject = 'Rechnung zu Deiner Bestellung: '.$shopping_order->getLastShoppingPayment('reference') ;
|
||||
|
||||
$this->subject = __('email.invoice_subject').': '.$shopping_order->getLastShoppingPayment('reference') ;
|
||||
}
|
||||
|
||||
public function build()
|
||||
|
|
|
|||
63
app/Mail/MailLog.php
Normal file
63
app/Mail/MailLog.php
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
<?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 MailLog extends Mailable
|
||||
{
|
||||
use Queueable, SerializesModels;
|
||||
|
||||
protected $channel;
|
||||
protected $context;
|
||||
protected $message;
|
||||
protected $data;
|
||||
|
||||
public $subject;
|
||||
|
||||
public function __construct($channel, $context, $message, $data)
|
||||
{
|
||||
$this->channel = $channel;
|
||||
$this->context = $context;
|
||||
$this->message = $message;
|
||||
$this->data = $data;
|
||||
$this->subject = 'mivita Log';
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function build()
|
||||
{
|
||||
$title = 'Log: '.$this->channel.' '.$this->context;
|
||||
|
||||
//make Data readable
|
||||
$this->data = json_encode($this->data, JSON_PRETTY_PRINT);
|
||||
$content = "";
|
||||
|
||||
|
||||
$content .= "\n";
|
||||
$content .= "Channel: ".$this->channel."\n";
|
||||
$content .= "Context: ".$this->context."\n";
|
||||
if(\Auth::check()){
|
||||
$content .= "From User: ".\Auth::user()->id." | ".\Auth::user()->email."\n";
|
||||
}
|
||||
$content .= "\n";
|
||||
$content .= "Message: ".$this->message."\n";
|
||||
$content .= "\n";
|
||||
$content .= "Data: ".$this->data."\n";
|
||||
$content .= "\n";
|
||||
$content .= "\n";
|
||||
$content .= "Time: ".now()->format("d.m.Y H:i");
|
||||
$content .= "\n";
|
||||
$content .= request()->header('User-Agent');
|
||||
|
||||
|
||||
return $this->view('emails.sys')->with([
|
||||
'title' => $title,
|
||||
'content' => $content,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
@ -43,7 +43,7 @@ class MailReleaseAccount extends Mailable
|
|||
|
||||
|
||||
$copy1line = "Ein neuer Berater hat sich registriert und wartet auf die Überprüfung und Freigabe seiner Daten:"."\n";
|
||||
$copy1line .= "+ Überprüfung der Ausweisdate"."\n";
|
||||
$copy1line .= "+ Überprüfung der Ausweisdaten"."\n";
|
||||
$copy1line .= "+ Überprüfung des Gewerbenachweises"."\n";
|
||||
$copy1line .= "+ Eintrag Account ID"."\n";
|
||||
$copy1line .= "+ Überprüfung / Kenntnisnahme Sponsor"."\n";
|
||||
|
|
|
|||
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,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
@ -25,7 +25,7 @@ class MailUserLevelUpdate extends Mailable
|
|||
$this->team_points = $team_points;
|
||||
$this->update_to = $update_to;
|
||||
|
||||
$this->subject = 'Deine Karriere-Level auf mivita.care';
|
||||
$this->subject = __('email.update_level_title');
|
||||
}
|
||||
|
||||
public function build()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue