Store Customer, Store Booking details
This commit is contained in:
parent
b362b93bca
commit
6706d28f51
33 changed files with 1048 additions and 257 deletions
|
|
@ -28,7 +28,7 @@ class CustomerFewoMailController extends Controller
|
|||
$this->customerMailRepo = $customerMailRepo;
|
||||
}
|
||||
|
||||
public function index()
|
||||
/* public function index()
|
||||
{
|
||||
$data = [
|
||||
|
||||
|
|
@ -55,7 +55,7 @@ class CustomerFewoMailController extends Controller
|
|||
];
|
||||
return view('customer.mail.detail', $data);
|
||||
|
||||
}
|
||||
}*/
|
||||
|
||||
public function store($id, $action=false)
|
||||
{
|
||||
|
|
@ -137,55 +137,6 @@ class CustomerFewoMailController extends Controller
|
|||
return back();
|
||||
}
|
||||
|
||||
/*public function getCustomerFewoMails()
|
||||
{
|
||||
$query = CustomerFewoMail::with('booking')->with('customer')->select('customer_mails.*');
|
||||
|
||||
return \DataTables::eloquent($query)
|
||||
->addColumn('action_edit', function (CustomerFewoMail $customer_mail) {
|
||||
return '<a href="'.route('customer_mail_detail', [$customer_mail->id]).'" class="btn icon-btn btn-sm btn-primary"><span class="fa fa-edit"></span></a>';
|
||||
})
|
||||
->addColumn('id', function (CustomerFewoMail $customer_mail) {
|
||||
return '<a data-order="'.$customer_mail->id.'" href="'.route('customer_mail_detail', [$customer_mail->id]).'" data-id="'.$customer_mail->id.'">'.$customer_mail->id.'</a>';
|
||||
})
|
||||
->addColumn('booking', function (CustomerFewoMail $customer_mail) {
|
||||
$out = $customer_mail->booking->travel_country_id ? $customer_mail->booking->travel_country->name." | " : "- | ";
|
||||
$out .= $customer_mail->booking->travelagenda_id ? $customer_mail->booking->travel_agenda->name."" : "-";
|
||||
return $out;
|
||||
})
|
||||
->addColumn('travel_user_booking_fewo_id', function (CustomerFewoMail $customer_mail) {
|
||||
return '<a data-order="'.$customer_mail->travel_user_booking_fewo_id.'" href="'.route('booking_detail', [$customer_mail->travel_user_booking_fewo_id]).'">'.$customer_mail->travel_user_booking_fewo_id.'</a>';
|
||||
})
|
||||
->addColumn('customer_id', function (CustomerFewoMail $customer_mail) {
|
||||
return '<a data-order="'.$customer_mail->customer_id.'" href="'.route('customer_detail', [$customer_mail->customer_id]).'">'.$customer_mail->customer_id.'</a>';
|
||||
})
|
||||
->addColumn('send', function (CustomerFewoMail $customer_mail) {
|
||||
return $customer_mail->send ? '<span class="badge badge-pill badge-success"><i class="fa fa-check"></i></span>' : '<span class="badge badge-pill badge-danger"><i class="fa fa-times"></i></span>';
|
||||
})
|
||||
->orderColumn('id', 'id $1')
|
||||
->orderColumn('travel_user_booking_fewo_id', 'travel_user_booking_fewo_id $1')
|
||||
->orderColumn('customer_id', 'customer_id $1')
|
||||
->orderColumn('send', 'send $1')
|
||||
|
||||
->filterColumn('id', function($query, $keyword) {
|
||||
if($keyword != ""){
|
||||
$query->where('id', 'LIKE', '%'.$keyword.'%');
|
||||
}
|
||||
})
|
||||
->filterColumn('customer_id', function($query, $keyword) {
|
||||
if($keyword != ""){
|
||||
$query->where('customer_id', 'LIKE', '%'.$keyword.'%');
|
||||
}
|
||||
})
|
||||
->filterColumn('travel_user_booking_fewo_id', function($query, $keyword) {
|
||||
if($keyword != ""){
|
||||
$query->where('travel_user_booking_fewo_id', 'LIKE', '%'.$keyword.'%');
|
||||
}
|
||||
})
|
||||
->rawColumns(['action_edit', 'send', 'customer_id', 'travel_user_booking_fewo_id', 'id'])
|
||||
->make(true);
|
||||
}*/
|
||||
|
||||
public function getEmailTemplates()
|
||||
{
|
||||
$query = EmailTemplate::with('email_template_dir')->select('email_templates.*')->where('active', '=', true);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue