User Order step1
This commit is contained in:
parent
eb55b01b0d
commit
a5db985ae8
90 changed files with 6439 additions and 421 deletions
|
|
@ -21,20 +21,32 @@ class MailContact extends Mailable
|
|||
{
|
||||
$this->data = $data;
|
||||
$this->user_shop = Util::getUserShop();
|
||||
$this->subject = __('email.request_from').' mivita.care';
|
||||
$this->subject = __('email.your_request_from').' mivita.care';
|
||||
if($this->user_shop){
|
||||
$this->subject = __('email.request_from')." ".$this->user_shop->slug.'.mivita.care';
|
||||
$this->subject = __('email.your_request_from')." ".$this->user_shop->slug.'.mivita.care';
|
||||
}
|
||||
}
|
||||
|
||||
public function build()
|
||||
{
|
||||
$salutation = __('email.salutation');
|
||||
$salutation = __('email.hello');
|
||||
if(isset($this->data['first_name'])){
|
||||
$salutation .= " ".$this->data['first_name'];
|
||||
}
|
||||
|
||||
if(isset($this->data['salutation'])){
|
||||
if($this->data['salutation'] === 'mr'){
|
||||
$this->data['salutation'] = 'Herr';
|
||||
}
|
||||
if($this->data['salutation'] === 'ms'){
|
||||
$this->data['salutation'] = 'Frau';
|
||||
}
|
||||
}
|
||||
$copy1line = __('email.your_request_from')." mivita.care";
|
||||
if($this->user_shop){
|
||||
$copy1line = __('email.your_request_from')." ".$this->user_shop->slug.'.mivita.care';
|
||||
}
|
||||
|
||||
return $this->view('emails.contact')->with([
|
||||
'salutation' => $salutation,
|
||||
'copy1line' => $copy1line,
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ class MailInfo extends Mailable
|
|||
if($this->action === "check_is_like_customer") {
|
||||
$copy1line = "Hier geht es zum Kunden:"."\n";
|
||||
$button = "zum Kunden";
|
||||
$title = "Ein Kunden muss überprüfen werden und einem Berater zugeordnet werden, da die Adresse nicht eindeutig ist.";
|
||||
$title = "Ein Kunden muss überprüft werden und einem Berater zugeordnet werden, da die Adresse nicht eindeutig ist.";
|
||||
$url = route('admin_customer_detail', $this->user->id);
|
||||
$content .= $this->user ? 'Firma: '.$this->user->billing_company."\n" : '';
|
||||
$content .= \App\Services\HTMLHelper::getSalutationLang($this->user->billing_salutation)." ";
|
||||
|
|
@ -85,7 +85,7 @@ class MailInfo extends Mailable
|
|||
if($this->action === "change_is_like_customer"){
|
||||
$copy1line = "Hier geht es zum Kunden:"."\n";
|
||||
$button = "zum Kunden";
|
||||
$title = "Ein Kunden muss erneut überprüfen werden, da bei einer Änderung eine bestehende Kundenhoheit gefunden wurde.";
|
||||
$title = "Ein Kunden muss erneut überprüft werden, da bei einer Änderung eine bestehende Kundenhoheit gefunden wurde.";
|
||||
$url = route('admin_customer_detail', $this->user->id);
|
||||
$content .= "Folgende Daten für die Kundenhoheit wurden geändert:"."\n";
|
||||
foreach ($this->data as $key=>$value){
|
||||
|
|
|
|||
63
app/Mail/MailSyS.php
Normal file
63
app/Mail/MailSyS.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 MailSyS extends Mailable
|
||||
{
|
||||
use Queueable, SerializesModels;
|
||||
|
||||
protected $model;
|
||||
protected $action;
|
||||
|
||||
public $subject;
|
||||
|
||||
public function __construct($model, $action)
|
||||
{
|
||||
$this->model = $model;
|
||||
$this->action = $action;
|
||||
|
||||
if($this->action === "log"){
|
||||
$this->subject = 'mivita Logger';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function build()
|
||||
{
|
||||
$content = "";
|
||||
if($this->action === "log"){
|
||||
|
||||
$title = "New Log";
|
||||
|
||||
|
||||
if($this->model->user_id && $this->model->user){
|
||||
$content .= "From User: ".$this->model->user->id." | ".$this->model->user->email."\n";
|
||||
}
|
||||
if($this->model->model && $this->model->model_id){
|
||||
$content .= "Apply: ".$this->model->model." | ".$this->model->model_id."\n";
|
||||
if($this->model->model === 'App\User'){
|
||||
$apply = User::find($this->model->model_id);
|
||||
$content .= $this->model->model.": ".$apply->email." | ".$this->model->model_id."\n";
|
||||
}
|
||||
}
|
||||
$content .= "\n";
|
||||
$content .= "Action: ".$this->model->action."\n";
|
||||
$content .= "Message: ".$this->model->message."\n";
|
||||
$content .= "\n";
|
||||
$content .= "Channel: ".$this->model->channel."\n";
|
||||
$content .= "Level: ".$this->model->getLevelType()."\n";
|
||||
$content .= "\n";
|
||||
$content .= "Time: ".$this->model->created_at->format("d.m.Y H:i");
|
||||
}
|
||||
|
||||
return $this->view('emails.sys')->with([
|
||||
'title' => $title,
|
||||
'content' => $content,
|
||||
]);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue