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
|
|
@ -79,6 +79,7 @@ class BookingRepository extends BaseRepository {
|
|||
'travel_country_id' => $data['travel_country_id'] ? $data['travel_country_id'] : null,
|
||||
'travelagenda_id' => $data['travelagenda_id'] ? $data['travelagenda_id'] : null,
|
||||
'travel_category_id' => $data['travel_category_id'] ? $data['travel_category_id'] : null,
|
||||
'comfort' => isset($data['travel_comfort']) ? true : false,
|
||||
'start_date' => $data['start_date'] ? _reformat_date($data['start_date']) : null,
|
||||
'end_date' => $data['end_date'] ? _reformat_date($data['end_date']) : null,
|
||||
'title' => $data['title'],
|
||||
|
|
@ -88,7 +89,8 @@ class BookingRepository extends BaseRepository {
|
|||
'paying_out_status' => $data['paying_out_status'],
|
||||
'branch_id' => $data['branch_id'],
|
||||
'travel_company_id' => $data['travel_company_id'],
|
||||
'airline_id' => $data['airline_id'],
|
||||
//'airline_id' => $data['airline_id'],
|
||||
'airline_ids' => isset($data['airline_ids']) ? $data['airline_ids'] : null,
|
||||
'refund' => $data['refund'],
|
||||
'refund_date' => _reformat_date($data['refund_date']),
|
||||
'lawyer_date' => _reformat_date($data['lawyer_date']),
|
||||
|
|
@ -103,6 +105,13 @@ class BookingRepository extends BaseRepository {
|
|||
];
|
||||
$this->model->fill($fill);
|
||||
$this->model->save();
|
||||
|
||||
if($this->model->booking_draft_items){
|
||||
foreach($this->model->booking_draft_items as $booking_draft_item){
|
||||
$booking_draft_item->comfort = isset($data['travel_comfort']) ? true : false;
|
||||
$booking_draft_item->save();
|
||||
}
|
||||
}
|
||||
return $this->model;
|
||||
}
|
||||
|
||||
|
|
@ -199,6 +208,7 @@ class BookingRepository extends BaseRepository {
|
|||
if($Participant->booking_id !== $this->model->id){
|
||||
abort(500);
|
||||
}
|
||||
$fill['participant_pass'] = isset($fill['participant_pass']) ? true : false;
|
||||
$fill['participant_child'] = isset($fill['participant_child']) ? true : false;
|
||||
$fill['participant_birthdate'] = isset($fill['participant_birthdate']) ? _reformat_date($fill['participant_birthdate']) : null;
|
||||
$Participant->fill($fill);
|
||||
|
|
@ -211,6 +221,8 @@ class BookingRepository extends BaseRepository {
|
|||
$this->model->participant_firstname = isset($data['participant_firstname']) ? $data['participant_firstname'] : null;
|
||||
$this->model->nationality_id = isset($data['nationality_id']) ? $data['nationality_id'] : null;
|
||||
$this->model->participant_birthdate = isset($data['participant_birthdate']) ? _reformat_date($data['participant_birthdate']) : null;
|
||||
$this->model->participant_pass = isset($data['participant_pass']) ? true : false;
|
||||
|
||||
|
||||
$this->model->save();
|
||||
return $this->model;
|
||||
|
|
|
|||
|
|
@ -257,6 +257,7 @@ class CustomerFewoMailRepository extends BaseRepository {
|
|||
$value->subtitle = "";
|
||||
$value->url = "";
|
||||
$value->recipient = "";
|
||||
$value->show_move_dirs = true;
|
||||
$value->cc = "";
|
||||
$value->bcc = "";
|
||||
$value->lead_title_id = "";
|
||||
|
|
@ -267,6 +268,9 @@ class CustomerFewoMailRepository extends BaseRepository {
|
|||
if (isset($data['customer_mail_id']) && $customer_mail = CustomerFewoMail::find($data['customer_mail_id'])) {
|
||||
$value->url = $data['url'];
|
||||
$value->title = "E-Mail Ansicht";
|
||||
if(isset($data['preview']) && $data['preview']){
|
||||
$value->show_move_dirs = false;
|
||||
}
|
||||
return view("travel.user.booking.mail.modal-show-mail", compact('data', 'value', 'customer_mail'))->render();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -250,8 +250,19 @@ class CustomerMailRepository extends BaseRepository {
|
|||
$value->customers[$key] = $val;
|
||||
}
|
||||
|
||||
}else{
|
||||
if(isset($value->replay_email)){
|
||||
if($value->customer_mail_dir < 10){ // && $value->lead_mail_subdir > 0
|
||||
$customer_mail_dir = \App\Services\Booking::getCustomerMailDir($value->customer_mail_dir);
|
||||
$contact_emails = \App\Services\Booking::getCustomerMailEmails($customer_mail_dir, $value->customer_mail_subdir);
|
||||
if($contact_emails && count($contact_emails) > 0) {
|
||||
$value->replay_email = array_shift($contact_emails);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $value;
|
||||
return $value;
|
||||
}
|
||||
|
||||
public static function loadModal($data)
|
||||
|
|
@ -261,6 +272,7 @@ class CustomerMailRepository extends BaseRepository {
|
|||
$value->subtitle = "";
|
||||
$value->url = "";
|
||||
$value->recipient = "";
|
||||
$value->show_move_dirs = true;
|
||||
$value->cc = "";
|
||||
$value->bcc = "";
|
||||
$value->lead_title_id = "";
|
||||
|
|
@ -272,6 +284,9 @@ class CustomerMailRepository extends BaseRepository {
|
|||
if (isset($data['customer_mail_id']) && $customer_mail = CustomerMail::find($data['customer_mail_id'])) {
|
||||
$value->url = $data['url'];
|
||||
$value->title = "E-Mail Ansicht";
|
||||
if(isset($data['preview']) && $data['preview']){
|
||||
$value->show_move_dirs = false;
|
||||
}
|
||||
return view("customer.mail.modal-show-mail", compact('data', 'value', 'customer_mail'))->render();
|
||||
}
|
||||
}
|
||||
|
|
@ -377,12 +392,12 @@ class CustomerMailRepository extends BaseRepository {
|
|||
$value->subtitle = "Die E-Mail wird im System gespeichert.";
|
||||
if($data['id'] === 'reply-save'){
|
||||
$value->subtitle = "Die E-Mail wird im System als Antwort gespeichert.";
|
||||
|
||||
}
|
||||
$value->url = $data['url'];
|
||||
$value->show = 'reply';
|
||||
$value->customer_mail_dir = isset($data['customer_mail_dir']) ? $data['customer_mail_dir'] : 0;
|
||||
$value->customer_mail_subdir = isset($data['customer_mail_subdir']) ? $data['customer_mail_subdir'] : 0;
|
||||
$value->replay_email = $value->booking->customer->email;
|
||||
|
||||
$value = self::prepareContactMails($value);
|
||||
|
||||
|
|
|
|||
|
|
@ -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