FileManager
This commit is contained in:
parent
c8948338bb
commit
f1e0900a7a
131 changed files with 5844 additions and 3081 deletions
|
|
@ -6,7 +6,7 @@ use App\Models\Booking;
|
|||
use App\Models\Sym\TravelCountry;
|
||||
use App\Models\TravelAgenda;
|
||||
use Carbon\Carbon;
|
||||
use Input;
|
||||
use Request;
|
||||
use DataTables;
|
||||
|
||||
class RequestController extends Controller
|
||||
|
|
@ -49,32 +49,32 @@ class RequestController extends Controller
|
|||
|
||||
$query = Booking::where('lead_id', '!=', NULL);
|
||||
|
||||
if(Input::get('full_firstname_search') != ""){
|
||||
$query->where('participant_firstname', 'LIKE', '%'.Input::get('full_firstname_search').'%');
|
||||
if(Request::get('full_firstname_search') != ""){
|
||||
$query->where('participant_firstname', 'LIKE', '%'.Request::get('full_firstname_search').'%');
|
||||
}
|
||||
|
||||
if(Input::get('full_lastname_search') != ""){
|
||||
$query->where('participant_name', 'LIKE', '%'.Input::get('full_lastname_search').'%');
|
||||
if(Request::get('full_lastname_search') != ""){
|
||||
$query->where('participant_name', 'LIKE', '%'.Request::get('full_lastname_search').'%');
|
||||
}
|
||||
|
||||
|
||||
if(Input::get('travel_option_country_id') != ""){
|
||||
$country_ids = TravelCountry::where('contact_lands', 'LIKE', '%"'.Input::get('travel_option_country_id').'"%')->get()->pluck('id');
|
||||
$country_ids[] = Input::get('travel_option_country_id');
|
||||
if(Request::get('travel_option_country_id') != ""){
|
||||
$country_ids = TravelCountry::where('contact_lands', 'LIKE', '%"'.Request::get('travel_option_country_id').'"%')->get()->pluck('id');
|
||||
$country_ids[] = Request::get('travel_option_country_id');
|
||||
$query->whereIn('travel_country_id', $country_ids);
|
||||
|
||||
}
|
||||
if(Input::get('travel_option_agenda_id') != ""){
|
||||
$query->where('travelagenda_id', '=', Input::get('travel_option_agenda_id'));
|
||||
if(Request::get('travel_option_agenda_id') != ""){
|
||||
$query->where('travelagenda_id', '=', Request::get('travel_option_agenda_id'));
|
||||
|
||||
}
|
||||
|
||||
// $query->where('end_date', '<=', $now);
|
||||
|
||||
if(Input::get('travel_option_search')){
|
||||
if(Request::get('travel_option_search')){
|
||||
$now = Carbon::now();
|
||||
|
||||
switch (Input::get('travel_option_search')){
|
||||
switch (Request::get('travel_option_search')){
|
||||
case 'before_2':
|
||||
$query->whereBetween('start_date', [Carbon::now()->modify('-2 month'), $now]);
|
||||
|
||||
|
|
@ -99,14 +99,14 @@ class RequestController extends Controller
|
|||
}else{
|
||||
$start = null;
|
||||
$end = null;
|
||||
if(Input::get('arrival_start_date') != ""){
|
||||
$arrStart = explode(".", Input::get('arrival_start_date'));
|
||||
if(Request::get('arrival_start_date') != ""){
|
||||
$arrStart = explode(".", Request::get('arrival_start_date'));
|
||||
if(count($arrStart) == 3){
|
||||
$start = Carbon::create($arrStart[2], $arrStart[1], $arrStart[0], 0, 0, 0);
|
||||
}
|
||||
}
|
||||
if(Input::get('arrival_end_date') != ""){
|
||||
$arrEnd = explode(".", Input::get('arrival_end_date'));
|
||||
if(Request::get('arrival_end_date') != ""){
|
||||
$arrEnd = explode(".", Request::get('arrival_end_date'));
|
||||
if(count($arrEnd) == 3){
|
||||
$end = Carbon::create($arrEnd[2], $arrEnd[1], $arrEnd[0], 23, 59, 59);
|
||||
}
|
||||
|
|
@ -123,14 +123,14 @@ class RequestController extends Controller
|
|||
|
||||
$start = null;
|
||||
$end = null;
|
||||
if(Input::get('departure_start_date') != ""){
|
||||
$arrStart = explode(".", Input::get('departure_start_date'));
|
||||
if(Request::get('departure_start_date') != ""){
|
||||
$arrStart = explode(".", Request::get('departure_start_date'));
|
||||
if(count($arrStart) == 3){
|
||||
$start = Carbon::create($arrStart[2], $arrStart[1], $arrStart[0], 0, 0, 0);
|
||||
}
|
||||
}
|
||||
if(Input::get('departure_end_date') != ""){
|
||||
$arrEnd = explode(".", Input::get('departure_end_date'));
|
||||
if(Request::get('departure_end_date') != ""){
|
||||
$arrEnd = explode(".", Request::get('departure_end_date'));
|
||||
if(count($arrEnd) == 3){
|
||||
$end = Carbon::create($arrEnd[2], $arrEnd[1], $arrEnd[0], 23, 59, 59);
|
||||
}
|
||||
|
|
@ -148,27 +148,27 @@ class RequestController extends Controller
|
|||
|
||||
|
||||
|
||||
if(Input::get('sort_travel_country_id') != ""){
|
||||
$query->where('travel_country_id', '=', Input::get('sort_travel_country_id'));
|
||||
if(Request::get('sort_travel_country_id') != ""){
|
||||
$query->where('travel_country_id', '=', Request::get('sort_travel_country_id'));
|
||||
}
|
||||
if(Input::get('sort_travelagenda_id') != ""){
|
||||
$query->where('travelagenda_id', '=', Input::get('sort_travelagenda_id'));
|
||||
if(Request::get('sort_travelagenda_id') != ""){
|
||||
$query->where('travelagenda_id', '=', Request::get('sort_travelagenda_id'));
|
||||
}
|
||||
|
||||
if(Input::get('sort_sf_guard_user_id') != ""){
|
||||
$query->where('sf_guard_user_id', '=', Input::get('sort_sf_guard_user_id'));
|
||||
if(Request::get('sort_sf_guard_user_id') != ""){
|
||||
$query->where('sf_guard_user_id', '=', Request::get('sort_sf_guard_user_id'));
|
||||
}
|
||||
|
||||
if(Input::get('sort_travel_documents') != ""){
|
||||
$query->where('travel_documents', '=', Input::get('sort_travel_documents'));
|
||||
if(Request::get('sort_travel_documents') != ""){
|
||||
$query->where('travel_documents', '=', Request::get('sort_travel_documents'));
|
||||
}
|
||||
|
||||
|
||||
if(Input::get('full_lead_id_search') != ""){
|
||||
$query->where('lead_id', 'LIKE', '%'.Input::get('full_lead_id_search'). '%');
|
||||
if(Request::get('full_lead_id_search') != ""){
|
||||
$query->where('lead_id', 'LIKE', '%'.Request::get('full_lead_id_search'). '%');
|
||||
}
|
||||
if(Input::get('full_booking_id_search') != ""){
|
||||
$query->where('id', 'LIKE', '%'.Input::get('full_booking_id_search').'%');
|
||||
if(Request::get('full_booking_id_search') != ""){
|
||||
$query->where('id', 'LIKE', '%'.Request::get('full_booking_id_search').'%');
|
||||
}
|
||||
return $query;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue