Mails, Strono, filter
This commit is contained in:
parent
f53f17f9c1
commit
62e84637b6
99 changed files with 2409 additions and 474 deletions
|
|
@ -4,7 +4,9 @@ namespace App\Http\Controllers;
|
|||
|
||||
use App\Models\Booking;
|
||||
use App\Models\BookingDraftItem;
|
||||
use App\Models\Customer;
|
||||
use App\Repositories\BookingRepository;
|
||||
use App\Repositories\CustomerMailRepository;
|
||||
use Request;
|
||||
|
||||
class BookingController extends Controller
|
||||
|
|
@ -184,6 +186,25 @@ class BookingController extends Controller
|
|||
|
||||
}
|
||||
|
||||
|
||||
public function loadModal(){
|
||||
$data = Request::all();
|
||||
$ret = "";
|
||||
if(Request::ajax()){
|
||||
$data['customers'] = [];
|
||||
if($data['action'] === "new-customer-mail" && isset($data['booking_id']) && $booking = Booking::find($data['booking_id'])){
|
||||
$tmp = "";
|
||||
$tmp .= $booking->customer ? $booking->customer->email." | " : "- | ";
|
||||
$tmp .= $booking->customer ? $booking->customer->firstname." ".$booking->customer->name." | " : "- | ";
|
||||
$tmp .= $booking->travel_country_id ? $booking->travel_country->name." | " : "- | ";
|
||||
$tmp .= $booking->travelagenda_id ? $booking->travel_agenda->name."" : "-";
|
||||
$data['customers'][$booking->id] = $tmp;
|
||||
}
|
||||
$ret = CustomerMailRepository::loadModal($data);
|
||||
}
|
||||
return response()->json(['response' => $data, 'html'=>$ret]);
|
||||
}
|
||||
|
||||
public function draftItemDelete($id){
|
||||
$boking_draft_item = BookingDraftItem::findOrFail($id);
|
||||
$booking = $boking_draft_item->booking;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue