Customers Add+Edit, API WP
This commit is contained in:
parent
dc63fa9fb2
commit
75a0f9a38a
120 changed files with 11894 additions and 6134 deletions
|
|
@ -13,19 +13,26 @@ class MailInfo extends Mailable
|
|||
|
||||
protected $user;
|
||||
protected $action;
|
||||
protected $data;
|
||||
|
||||
public $subject;
|
||||
|
||||
|
||||
public function __construct($user, $action)
|
||||
public function __construct($user, $action, $data = [])
|
||||
{
|
||||
$this->user = $user;
|
||||
$this->action = $action;
|
||||
$this->data = $data;
|
||||
|
||||
if($this->action === "delete_membership"){
|
||||
$this->subject = 'Mitgliedschaft beenden - beantragt';
|
||||
}
|
||||
if($this->action === "check_is_like_customer"){
|
||||
$this->subject = 'Kunden überprüfen - Kundenhoheit';
|
||||
}
|
||||
if($this->action === "change_is_like_customer"){
|
||||
$this->subject = 'Kunden erneut überprüfen - Kundenhoheit';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -61,7 +68,30 @@ class MailInfo extends Mailable
|
|||
$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.";
|
||||
$url = route('admin_customer_edit', $this->user->id);
|
||||
$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)." ";
|
||||
$content .= $this->user->billing_firstname." ";
|
||||
$content .= $this->user->billing_lastname."\n";
|
||||
$content .= $this->user->billing_address;
|
||||
$content .= $this->user->billing_address_2 ? '/ '.$this->user->billing_address_2."\n" : "\n";
|
||||
$content .= $this->user->billing_zipcode." ";
|
||||
$content .= $this->user->billing_city."\n";
|
||||
$content .= $this->user->billing_email."\n";
|
||||
$content .= $this->user->billing_phone."\n";
|
||||
$content .= $this->user->billing_country->getLocated();
|
||||
}
|
||||
|
||||
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.";
|
||||
$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){
|
||||
$content .= $this->user->{$key}." => ".$value."\n";
|
||||
}
|
||||
$content .= "\n"."\n"."Rechnungsadresse des Kunden vor der Änderung:"."\n";
|
||||
$content .= $this->user ? 'Firma: '.$this->user->billing_company."\n" : '';
|
||||
$content .= \App\Services\HTMLHelper::getSalutationLang($this->user->billing_salutation)." ";
|
||||
$content .= $this->user->billing_firstname." ";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue