Mehrere Tickets 49, 50, 51, 52, 53
This commit is contained in:
parent
ae70577289
commit
e3495be8b8
61 changed files with 1904 additions and 344 deletions
|
|
@ -128,7 +128,7 @@ class LeadMailRepository extends BaseRepository {
|
|||
}
|
||||
|
||||
public function store($lead, $data, $mail_from, $is_answer = false, $reply_id = NULL, $sent_at=false){
|
||||
|
||||
|
||||
if(isset($data['save_lead_mail_id'])){
|
||||
$lead_mail = LeadMail::find($data['save_lead_mail_id']);
|
||||
$lead_mail->fill([
|
||||
|
|
@ -246,6 +246,17 @@ class LeadMailRepository extends BaseRepository {
|
|||
$value->customers[$key] = $val;
|
||||
}
|
||||
|
||||
}else{
|
||||
if(isset($value->replay_email)){
|
||||
if($value->lead_mail_dir < 10){ // && $value->lead_mail_subdir > 0
|
||||
$lead_mail_dir = \App\Services\Lead::getCustomerMailDir($value->lead_mail_dir);
|
||||
$contact_emails = \App\Services\Lead::getCustomerMailEmails($lead_mail_dir, $value->lead_mail_subdir);
|
||||
if($contact_emails && count($contact_emails) > 0) {
|
||||
$value->replay_email = array_shift($contact_emails);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
|
|
@ -257,6 +268,7 @@ class LeadMailRepository extends BaseRepository {
|
|||
$value->subtitle = "";
|
||||
$value->url = "";
|
||||
$value->recipient = "";
|
||||
$value->show_move_dirs = true;
|
||||
$value->cc = "";
|
||||
$value->bcc = "";
|
||||
$value->lead_title_id = "";
|
||||
|
|
@ -268,6 +280,9 @@ class LeadMailRepository extends BaseRepository {
|
|||
if (isset($data['lead_mail_id']) && $lead_mail = LeadMail::find($data['lead_mail_id'])) {
|
||||
$value->url = $data['url'];
|
||||
$value->title = "E-Mail Ansicht";
|
||||
if(isset($data['preview']) && $data['preview']){
|
||||
$value->show_move_dirs = false;
|
||||
}
|
||||
return view("lead.modal-show-mail", compact('data', 'value', 'lead_mail'))->render();
|
||||
}
|
||||
}
|
||||
|
|
@ -376,8 +391,10 @@ class LeadMailRepository extends BaseRepository {
|
|||
$value->show = 'reply';
|
||||
$value->lead_mail_dir = isset($data['lead_mail_dir']) ? $data['lead_mail_dir'] : 0;
|
||||
$value->lead_mail_subdir = isset($data['lead_mail_subdir']) ? $data['lead_mail_subdir'] : 0;
|
||||
$value->replay_email = $value->lead->customer->email;
|
||||
|
||||
$value = self::prepareContactMails($value);
|
||||
|
||||
return view("lead.modal-new-mail", compact('data', 'value'))->render();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue