IQ Reisebausteine bis Gruppe
This commit is contained in:
parent
6880c7e989
commit
9baa1a6233
43 changed files with 2206 additions and 24 deletions
|
|
@ -44,9 +44,9 @@ class HomeController extends Controller
|
||||||
return redirect('login');
|
return redirect('login');
|
||||||
}
|
}
|
||||||
|
|
||||||
$last_booking_notices = BookingNotice::orderBy('edit_at', 'DESC')->orderBy('created_at', 'DESC')->limit(10)->get();
|
$last_booking_notices = BookingNotice::orderBy('updated_at', 'DESC')->limit(10)->get();
|
||||||
$last_booking_fewo_notices = TravelUserBookingFewoNotice::orderBy('edit_at', 'DESC')->orderBy('created_at', 'DESC')->limit(10)->get();
|
$last_booking_fewo_notices = TravelUserBookingFewoNotice::orderBy('updated_at', 'DESC')->limit(10)->get();
|
||||||
$last_lead_notices = LeadNotice::orderBy('edit_at', 'DESC')->orderBy('created_at', 'DESC')->limit(10)->get();
|
$last_lead_notices = LeadNotice::orderBy('updated_at', 'DESC')->limit(10)->get();
|
||||||
|
|
||||||
|
|
||||||
$data = [
|
$data = [
|
||||||
|
|
|
||||||
31
app/Http/Controllers/IQ/ItemController.php
Normal file
31
app/Http/Controllers/IQ/ItemController.php
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers\IQ;
|
||||||
|
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use Request;
|
||||||
|
use IqContent\LaravelFilemanager\Controllers\LfmController;
|
||||||
|
|
||||||
|
class ContentAssetController extends LfmController
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
$data = [
|
||||||
|
'models' => [],
|
||||||
|
'lfm_helper' => $this->helper,
|
||||||
|
'modal' => false,
|
||||||
|
];
|
||||||
|
return view('iq.content.assets.index', $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function modal(){
|
||||||
|
$data = [
|
||||||
|
'models' => [],
|
||||||
|
'lfm_helper' => $this->helper,
|
||||||
|
'modal' => true,
|
||||||
|
];
|
||||||
|
return view('iq.content.assets.body', $data);
|
||||||
|
}
|
||||||
|
}
|
||||||
126
app/Http/Controllers/IQ/TravelGroupController.php
Normal file
126
app/Http/Controllers/IQ/TravelGroupController.php
Normal file
|
|
@ -0,0 +1,126 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers\IQ;
|
||||||
|
|
||||||
|
use Request;
|
||||||
|
use App\Models\IQTravelItemPlace;
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use App\Models\IQTravelGroup;
|
||||||
|
use App\Models\IQTravelGroupItem;
|
||||||
|
use App\Repositories\IQ\TravelRepository;
|
||||||
|
|
||||||
|
class TravelGroupController extends Controller
|
||||||
|
{
|
||||||
|
|
||||||
|
protected $tavelRepo;
|
||||||
|
|
||||||
|
|
||||||
|
public function __construct(TravelRepository $tavelRepo)
|
||||||
|
{
|
||||||
|
$this->middleware('admin');
|
||||||
|
$this->tavelRepo = $tavelRepo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
$data = [
|
||||||
|
|
||||||
|
];
|
||||||
|
return view('iq.travel.group.index', $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function detail($id, $step = false)
|
||||||
|
{
|
||||||
|
if($id === "new") {
|
||||||
|
$model = new IQTravelGroup();
|
||||||
|
$id = 'new';
|
||||||
|
$model->active = 1;
|
||||||
|
}else{
|
||||||
|
$model = IQTravelGroup::findOrFail($id);
|
||||||
|
$id = $model->id;
|
||||||
|
}
|
||||||
|
|
||||||
|
$data = [
|
||||||
|
'model' => $model,
|
||||||
|
'id' => $id,
|
||||||
|
|
||||||
|
];
|
||||||
|
return view('iq.travel.group.detail', $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function store($id)
|
||||||
|
{
|
||||||
|
$data = Request::all();
|
||||||
|
if(isset($data['action'])){
|
||||||
|
if($data['action'] === 'saveAll'){
|
||||||
|
$travel_group = $this->tavelRepo->updateTravelGroup($id, $data);
|
||||||
|
\Session()->flash('alert-save', '1');
|
||||||
|
return redirect(route('iq_travel_group_detail', [$travel_group->id]));
|
||||||
|
|
||||||
|
}
|
||||||
|
if($data['action'] === 'save-iq_travel_item_group'){
|
||||||
|
$travel_group_item = $this->tavelRepo->updateTravelGroupItem($id, $data);
|
||||||
|
\Session()->flash('alert-save', '1');
|
||||||
|
return redirect(route('iq_travel_group_detail', [$id]));
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return redirect()->back();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function delete($id, $del=false){
|
||||||
|
|
||||||
|
if($del === 'i_q_travel_group_item'){
|
||||||
|
$IQTravelGroupItem = IQTravelGroupItem::findOrFail($id);
|
||||||
|
$r_id = $IQTravelGroupItem->i_q_travel_group_id;
|
||||||
|
//TODO check need ???
|
||||||
|
$IQTravelGroupItem->delete();
|
||||||
|
\Session()->flash('alert-success', __('Eintrag gelöscht'));
|
||||||
|
return redirect(route('iq_travel_group_detail', [$r_id]));
|
||||||
|
}
|
||||||
|
if($del === 'iq_travel_group'){
|
||||||
|
$IQTravelGroup = IQTravelGroup::findOrFail($id);
|
||||||
|
//TODO check need ???
|
||||||
|
$IQTravelGroup->delete();
|
||||||
|
\Session()->flash('alert-success', __('Eintrag gelöscht'));
|
||||||
|
return redirect(route('iq_travel_groups'));
|
||||||
|
}
|
||||||
|
|
||||||
|
return back();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getTravelGroups()
|
||||||
|
{
|
||||||
|
$query = IQTravelGroup::with('i_q_travel_group_items')->with('i_q_travel_group_items.i_q_travel_item')->select('i_q_travel_groups.*');
|
||||||
|
|
||||||
|
return \DataTables::eloquent($query)
|
||||||
|
->addColumn('action_edit', function (IQTravelGroup $iq_travel_group) {
|
||||||
|
return '<a href="'.route('iq_travel_group_detail', [$iq_travel_group->id]).'" class="btn icon-btn btn-sm btn-primary"><span class="fa fa-edit"></span></a>';
|
||||||
|
})
|
||||||
|
->addColumn('trave_items', function (IQTravelGroup $iq_travel_group) {
|
||||||
|
$ret = "";
|
||||||
|
if($iq_travel_group->i_q_travel_group_items->count()){
|
||||||
|
foreach($iq_travel_group->i_q_travel_group_items as $i_q_travel_group_item){
|
||||||
|
$ret .= $i_q_travel_group_item->i_q_travel_item->name;
|
||||||
|
$ret .= $i_q_travel_group_item->i_q_travel_item->draft_type_id ? ' | <span class="py-0 px-2" style="background-color:'.$i_q_travel_group_item->i_q_travel_item->draft_type->color.'">'.$i_q_travel_group_item->i_q_travel_item->draft_type->name.'</span>' : '';
|
||||||
|
|
||||||
|
|
||||||
|
$ret .= "<br>";
|
||||||
|
}
|
||||||
|
$ret = rtrim($ret, '<br>');
|
||||||
|
}
|
||||||
|
return $ret;
|
||||||
|
})
|
||||||
|
->addColumn('active', function (IQTravelGroup $iq_travel_group) {
|
||||||
|
return get_active_badge($iq_travel_group->active);
|
||||||
|
})
|
||||||
|
->addColumn('action_delete', function (IQTravelGroup $iq_travel_group) {
|
||||||
|
return '<a href="' . route('iq_travel_group_delete', [$iq_travel_group->id, 'iq_travel_group']) . '" class="btn icon-btn btn-sm btn-danger" onclick="return confirm(\''.__('Really delete entry?').'\');"><span class="fa fa-trash"></span></a>';
|
||||||
|
})
|
||||||
|
->orderColumn('id', 'id $1')
|
||||||
|
->rawColumns(['action_edit', 'id', 'active', 'trave_items', 'action_delete'])
|
||||||
|
->make(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
136
app/Http/Controllers/IQ/TravelItemController.php
Normal file
136
app/Http/Controllers/IQ/TravelItemController.php
Normal file
|
|
@ -0,0 +1,136 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers\IQ;
|
||||||
|
|
||||||
|
use Request;
|
||||||
|
use App\Models\IQTravelItem;
|
||||||
|
use App\Models\IQTravelItemPlace;
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use App\Repositories\IQ\TravelRepository;
|
||||||
|
|
||||||
|
class TravelItemController extends Controller
|
||||||
|
{
|
||||||
|
|
||||||
|
protected $tavelRepo;
|
||||||
|
|
||||||
|
|
||||||
|
public function __construct(TravelRepository $tavelRepo)
|
||||||
|
{
|
||||||
|
$this->middleware('admin');
|
||||||
|
$this->tavelRepo = $tavelRepo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
$data = [
|
||||||
|
|
||||||
|
];
|
||||||
|
return view('iq.travel.item.index', $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function detail($id, $step = false)
|
||||||
|
{
|
||||||
|
if($id === "new") {
|
||||||
|
$model = new IQTravelItem();
|
||||||
|
$id = 'new';
|
||||||
|
$model->active = 1;
|
||||||
|
}else{
|
||||||
|
$model = IQTravelItem::findOrFail($id);
|
||||||
|
$id = $model->id;
|
||||||
|
}
|
||||||
|
|
||||||
|
$data = [
|
||||||
|
'model' => $model,
|
||||||
|
'id' => $id,
|
||||||
|
|
||||||
|
];
|
||||||
|
return view('iq.travel.item.detail', $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function store($id)
|
||||||
|
{
|
||||||
|
$data = Request::all();
|
||||||
|
if(isset($data['action'])){
|
||||||
|
if($data['action'] === 'saveAll'){
|
||||||
|
$travel_item = $this->tavelRepo->updateTravelItem($id, $data);
|
||||||
|
\Session()->flash('alert-save', '1');
|
||||||
|
return redirect(route('iq_travel_item_detail', [$travel_item->id]));
|
||||||
|
|
||||||
|
}
|
||||||
|
if($data['action'] === 'save-iq_travel_item_place'){
|
||||||
|
$travel_item_place = $this->tavelRepo->updateTravelItemPlace($id, $data);
|
||||||
|
\Session()->flash('alert-save', '1');
|
||||||
|
return redirect(route('iq_travel_item_detail', [$id]));
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return redirect()->back();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function delete($id, $del=false){
|
||||||
|
if($del === 'i_q_travel_item_place'){
|
||||||
|
$IQTravelItemPlace = IQTravelItemPlace::findOrFail($id);
|
||||||
|
$r_id = $IQTravelItemPlace->i_q_travel_item_id;
|
||||||
|
//TODO check need ???
|
||||||
|
$IQTravelItemPlace->delete();
|
||||||
|
\Session()->flash('alert-success', __('Eintrag gelöscht'));
|
||||||
|
return redirect(route('iq_travel_item_detail', [$r_id]));
|
||||||
|
}
|
||||||
|
if($del === 'iq_travel_item'){
|
||||||
|
$IQTravelItem = IQTravelItem::findOrFail($id);
|
||||||
|
//TODO check need ???
|
||||||
|
$IQTravelItem->delete();
|
||||||
|
\Session()->flash('alert-success', __('Eintrag gelöscht'));
|
||||||
|
return redirect(route('iq_travel_items'));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return back();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getTravelItems()
|
||||||
|
{
|
||||||
|
$query = IQTravelItem::with('draft_type')->with('i_q_travel_item_places')->select('i_q_travel_items.*');
|
||||||
|
|
||||||
|
return \DataTables::eloquent($query)
|
||||||
|
->addColumn('action_edit', function (IQTravelItem $iq_travel_item) {
|
||||||
|
return '<a href="'.route('iq_travel_item_detail', [$iq_travel_item->id]).'" class="btn icon-btn btn-sm btn-primary"><span class="fa fa-edit"></span></a>';
|
||||||
|
})
|
||||||
|
->addColumn('draft_type', function (IQTravelItem $iq_travel_item) {
|
||||||
|
return $iq_travel_item->draft_type ? '<span class="py-1 px-2" style="background-color:'.$iq_travel_item->draft_type->color.'">'.$iq_travel_item->draft_type->name.'</span>' : '';
|
||||||
|
})
|
||||||
|
->addColumn('country', function (IQTravelItem $iq_travel_item) {
|
||||||
|
return $iq_travel_item->travel_country ? $iq_travel_item->travel_country->name : '';
|
||||||
|
})
|
||||||
|
->addColumn('trave_places', function (IQTravelItem $iq_travel_item) {
|
||||||
|
$ret = "";
|
||||||
|
if($iq_travel_item->i_q_travel_item_places->count()){
|
||||||
|
foreach($iq_travel_item->i_q_travel_item_places as $i_q_travel_item_place){
|
||||||
|
$ret .= $i_q_travel_item_place->travel_place->name."<br>";
|
||||||
|
}
|
||||||
|
$ret = rtrim($ret, '<br>');
|
||||||
|
}
|
||||||
|
return $ret;
|
||||||
|
})
|
||||||
|
->addColumn('active', function (IQTravelItem $iq_travel_item) {
|
||||||
|
return get_active_badge($iq_travel_item->active);
|
||||||
|
})
|
||||||
|
/*
|
||||||
|
->filterColumn('draft_type', function ($query, $keyword) {
|
||||||
|
if ($keyword != "") {
|
||||||
|
$query->whereHas('draft_type', function ($q) use ($keyword) {
|
||||||
|
$q->where("name", 'LIKE', '%' . $keyword . '%');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
})
|
||||||
|
*/
|
||||||
|
->addColumn('action_delete', function (IQTravelItem $iq_travel_item) {
|
||||||
|
return '<a href="' . route('iq_travel_item_delete', [$iq_travel_item->id, 'iq_travel_item']) . '" class="btn icon-btn btn-sm btn-danger" onclick="return confirm(\''.__('Really delete entry?').'\');"><span class="fa fa-trash"></span></a>';
|
||||||
|
})
|
||||||
|
->orderColumn('id', 'id $1')
|
||||||
|
->rawColumns(['action_edit', 'id', 'active', 'draft_type', 'trave_places', 'action_delete'])
|
||||||
|
->make(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
126
app/Http/Controllers/IQ/TravelProgrammController.php
Normal file
126
app/Http/Controllers/IQ/TravelProgrammController.php
Normal file
|
|
@ -0,0 +1,126 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers\IQ;
|
||||||
|
|
||||||
|
use Request;
|
||||||
|
use App\Models\IQTravelItemPlace;
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use App\Models\IQTravelGroup;
|
||||||
|
use App\Models\IQTravelGroupItem;
|
||||||
|
use App\Repositories\IQ\TravelRepository;
|
||||||
|
|
||||||
|
class TravelProgrammController extends Controller
|
||||||
|
{
|
||||||
|
|
||||||
|
protected $tavelRepo;
|
||||||
|
|
||||||
|
|
||||||
|
public function __construct(TravelRepository $tavelRepo)
|
||||||
|
{
|
||||||
|
$this->middleware('admin');
|
||||||
|
$this->tavelRepo = $tavelRepo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
$data = [
|
||||||
|
|
||||||
|
];
|
||||||
|
return view('iq.travel.programm.index', $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function detail($id, $step = false)
|
||||||
|
{
|
||||||
|
if($id === "new") {
|
||||||
|
$model = new IQTravelGroup();
|
||||||
|
$id = 'new';
|
||||||
|
$model->active = 1;
|
||||||
|
}else{
|
||||||
|
$model = IQTravelGroup::findOrFail($id);
|
||||||
|
$id = $model->id;
|
||||||
|
}
|
||||||
|
|
||||||
|
$data = [
|
||||||
|
'model' => $model,
|
||||||
|
'id' => $id,
|
||||||
|
|
||||||
|
];
|
||||||
|
return view('iq.travel.group.detail', $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function store($id)
|
||||||
|
{
|
||||||
|
$data = Request::all();
|
||||||
|
if(isset($data['action'])){
|
||||||
|
if($data['action'] === 'saveAll'){
|
||||||
|
$travel_group = $this->tavelRepo->updateTravelGroup($id, $data);
|
||||||
|
\Session()->flash('alert-save', '1');
|
||||||
|
return redirect(route('iq_travel_group_detail', [$travel_group->id]));
|
||||||
|
|
||||||
|
}
|
||||||
|
if($data['action'] === 'save-iq_travel_item_group'){
|
||||||
|
$travel_group_item = $this->tavelRepo->updateTravelGroupItem($id, $data);
|
||||||
|
\Session()->flash('alert-save', '1');
|
||||||
|
return redirect(route('iq_travel_group_detail', [$id]));
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return redirect()->back();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function delete($id, $del=false){
|
||||||
|
|
||||||
|
if($del === 'i_q_travel_group_item'){
|
||||||
|
$IQTravelGroupItem = IQTravelGroupItem::findOrFail($id);
|
||||||
|
$r_id = $IQTravelGroupItem->i_q_travel_group_id;
|
||||||
|
//TODO check need ???
|
||||||
|
$IQTravelGroupItem->delete();
|
||||||
|
\Session()->flash('alert-success', __('Eintrag gelöscht'));
|
||||||
|
return redirect(route('iq_travel_group_detail', [$r_id]));
|
||||||
|
}
|
||||||
|
if($del === 'iq_travel_group'){
|
||||||
|
$IQTravelGroup = IQTravelGroup::findOrFail($id);
|
||||||
|
//TODO check need ???
|
||||||
|
$IQTravelGroup->delete();
|
||||||
|
\Session()->flash('alert-success', __('Eintrag gelöscht'));
|
||||||
|
return redirect(route('iq_travel_groups'));
|
||||||
|
}
|
||||||
|
|
||||||
|
return back();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getTravelGroups()
|
||||||
|
{
|
||||||
|
$query = IQTravelGroup::with('i_q_travel_group_items')->with('i_q_travel_group_items.i_q_travel_item')->select('i_q_travel_groups.*');
|
||||||
|
|
||||||
|
return \DataTables::eloquent($query)
|
||||||
|
->addColumn('action_edit', function (IQTravelGroup $iq_travel_group) {
|
||||||
|
return '<a href="'.route('iq_travel_group_detail', [$iq_travel_group->id]).'" class="btn icon-btn btn-sm btn-primary"><span class="fa fa-edit"></span></a>';
|
||||||
|
})
|
||||||
|
->addColumn('trave_items', function (IQTravelGroup $iq_travel_group) {
|
||||||
|
$ret = "";
|
||||||
|
if($iq_travel_group->i_q_travel_group_items->count()){
|
||||||
|
foreach($iq_travel_group->i_q_travel_group_items as $i_q_travel_group_item){
|
||||||
|
$ret .= $i_q_travel_group_item->i_q_travel_item->name;
|
||||||
|
$ret .= $i_q_travel_group_item->i_q_travel_item->draft_type_id ? ' | <span class="py-0 px-2" style="background-color:'.$i_q_travel_group_item->i_q_travel_item->draft_type->color.'">'.$i_q_travel_group_item->i_q_travel_item->draft_type->name.'</span>' : '';
|
||||||
|
|
||||||
|
|
||||||
|
$ret .= "<br>";
|
||||||
|
}
|
||||||
|
$ret = rtrim($ret, '<br>');
|
||||||
|
}
|
||||||
|
return $ret;
|
||||||
|
})
|
||||||
|
->addColumn('active', function (IQTravelGroup $iq_travel_group) {
|
||||||
|
return get_active_badge($iq_travel_group->active);
|
||||||
|
})
|
||||||
|
->addColumn('action_delete', function (IQTravelGroup $iq_travel_group) {
|
||||||
|
return '<a href="' . route('iq_travel_group_delete', [$iq_travel_group->id, 'iq_travel_group']) . '" class="btn icon-btn btn-sm btn-danger" onclick="return confirm(\''.__('Really delete entry?').'\');"><span class="fa fa-trash"></span></a>';
|
||||||
|
})
|
||||||
|
->orderColumn('id', 'id $1')
|
||||||
|
->rawColumns(['action_edit', 'id', 'active', 'trave_items', 'action_delete'])
|
||||||
|
->make(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -2,14 +2,16 @@
|
||||||
|
|
||||||
namespace App\Http\Controllers;
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use Request;
|
||||||
use App\Models\GeneralFile;
|
use App\Models\GeneralFile;
|
||||||
use App\Models\IQContentSite;
|
use App\Models\IQContentSite;
|
||||||
use App\Models\ServiceProviderService;
|
|
||||||
use App\Models\TravelCompanyService;
|
|
||||||
use App\Models\TravelCountry;
|
use App\Models\TravelCountry;
|
||||||
|
use App\Models\IQTravelGroupItem;
|
||||||
|
use App\Models\IQTravelItemPlace;
|
||||||
|
use App\Models\TravelCompanyService;
|
||||||
use App\Models\TravelCountryService;
|
use App\Models\TravelCountryService;
|
||||||
|
use App\Models\ServiceProviderService;
|
||||||
use App\Repositories\GeneralFileRepository;
|
use App\Repositories\GeneralFileRepository;
|
||||||
use Request;
|
|
||||||
|
|
||||||
class ModalController extends Controller
|
class ModalController extends Controller
|
||||||
{
|
{
|
||||||
|
|
@ -70,6 +72,29 @@ class ModalController extends Controller
|
||||||
}
|
}
|
||||||
$ret = view("admin.modal.provider-service", compact('data', 'value'))->render();
|
$ret = view("admin.modal.provider-service", compact('data', 'value'))->render();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($data['action'] === 'modal-iq_travel_item-place'){
|
||||||
|
if($data['id'] === 'new'){
|
||||||
|
$value = new IQTravelItemPlace();
|
||||||
|
$value->pos = 0;
|
||||||
|
}else{
|
||||||
|
$value = IQTravelItemPlace::find($data['id']);
|
||||||
|
}
|
||||||
|
$ret = view("admin.modal.iq_travel_item-place", compact('data', 'value'))->render();
|
||||||
|
}
|
||||||
|
|
||||||
|
if($data['action'] === 'modal-iq_travel_item-group'){
|
||||||
|
if($data['id'] === 'new'){
|
||||||
|
$value = new IQTravelGroupItem();
|
||||||
|
$value->pos = 0;
|
||||||
|
}else{
|
||||||
|
$value = IQTravelGroupItem::find($data['id']);
|
||||||
|
}
|
||||||
|
$ret = view("admin.modal.iq_travel_group-item", compact('data', 'value'))->render();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
return response()->json(['response' => $data, 'html'=>$ret, 'status'=>$status]);
|
return response()->json(['response' => $data, 'html'=>$ret, 'status'=>$status]);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
58
app/Http/Controllers/Settings/TravelPlaceController.php
Normal file
58
app/Http/Controllers/Settings/TravelPlaceController.php
Normal file
|
|
@ -0,0 +1,58 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers\Settings;
|
||||||
|
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
|
||||||
|
use App\Models\IQContentCategory;
|
||||||
|
use App\Models\TravelPlace;
|
||||||
|
use App\Services\Util;
|
||||||
|
use Request;
|
||||||
|
|
||||||
|
class TravelPlaceController extends Controller
|
||||||
|
{
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->middleware('admin');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function index($step = false)
|
||||||
|
{
|
||||||
|
$data = [
|
||||||
|
'travel_places' => TravelPlace::all(),
|
||||||
|
];
|
||||||
|
return view('settings.place.index', $data);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function update(){
|
||||||
|
|
||||||
|
$data = Request::all();
|
||||||
|
|
||||||
|
|
||||||
|
$data['active'] = isset($data['active']) ? true : false;
|
||||||
|
|
||||||
|
if($data['id'] === "new"){
|
||||||
|
$model = TravelPlace::create($data);
|
||||||
|
}else{
|
||||||
|
$model = TravelPlace::find($data['id']);
|
||||||
|
$model->fill($data);
|
||||||
|
$model->save();
|
||||||
|
}
|
||||||
|
|
||||||
|
\Session()->flash('alert-save', '1');
|
||||||
|
return redirect(route('admin_settings_travel_places'));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function delete($id){
|
||||||
|
//TODO check ist linked
|
||||||
|
|
||||||
|
$model = TravelPlace::findOrFail($id);
|
||||||
|
$model->delete();
|
||||||
|
\Session()->flash('alert-success', 'Eintrag gelöscht');
|
||||||
|
return redirect()->back();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -533,7 +533,7 @@ class Booking extends Model
|
||||||
|
|
||||||
public function booking_notices()
|
public function booking_notices()
|
||||||
{
|
{
|
||||||
return $this->hasMany(BookingNotice::class, 'booking_id')->orderBy('created_at', 'DESC');
|
return $this->hasMany(BookingNotice::class, 'booking_id')->orderBy('updated_at', 'DESC');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function booking_strono()
|
public function booking_strono()
|
||||||
|
|
|
||||||
107
app/Models/IQTravelGroup.php
Normal file
107
app/Models/IQTravelGroup.php
Normal file
|
|
@ -0,0 +1,107 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by Reliese Model.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Carbon\Carbon;
|
||||||
|
use App\Services\Util;
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Illuminate\Database\Eloquent\Collection;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class IQTravelGroup
|
||||||
|
*
|
||||||
|
* @property int $id
|
||||||
|
* @property string $name
|
||||||
|
* @property string $description
|
||||||
|
* @property string $highlights
|
||||||
|
* @property int $days_start
|
||||||
|
* @property int $days_duration
|
||||||
|
* @property int $min_persons
|
||||||
|
* @property float $price_adult
|
||||||
|
* @property float $price_children
|
||||||
|
* @property int $pos
|
||||||
|
* @property bool $active
|
||||||
|
* @property Carbon $created_at
|
||||||
|
* @property Carbon $updated_at
|
||||||
|
*
|
||||||
|
* @property Collection|IQTravelGroupItem[] $i_q_travel_group_items
|
||||||
|
*
|
||||||
|
* @package App\Models
|
||||||
|
*/
|
||||||
|
class IQTravelGroup extends Model
|
||||||
|
{
|
||||||
|
protected $connection = 'mysql_stern';
|
||||||
|
|
||||||
|
protected $table = 'i_q_travel_groups';
|
||||||
|
|
||||||
|
protected $casts = [
|
||||||
|
'days_start' => 'int',
|
||||||
|
'days_duration' => 'int',
|
||||||
|
'min_persons' => 'int',
|
||||||
|
'price_adult' => 'float',
|
||||||
|
'price_children' => 'float',
|
||||||
|
'pos' => 'int',
|
||||||
|
'active' => 'bool'
|
||||||
|
];
|
||||||
|
|
||||||
|
protected $fillable = [
|
||||||
|
'name',
|
||||||
|
'description',
|
||||||
|
'highlights',
|
||||||
|
'days_start',
|
||||||
|
'days_duration',
|
||||||
|
'min_persons',
|
||||||
|
'price_adult',
|
||||||
|
'price_children',
|
||||||
|
'pos',
|
||||||
|
'active'
|
||||||
|
];
|
||||||
|
|
||||||
|
public function i_q_travel_group_items()
|
||||||
|
{
|
||||||
|
return $this->hasMany(IQTravelGroupItem::class)->orderBy('pos', 'DESC');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//price_adult
|
||||||
|
public function getPriceAdultAttribute()
|
||||||
|
{
|
||||||
|
return isset($this->attributes['price_adult']) ? Util::_number_format($this->attributes['price_adult']) : null;
|
||||||
|
}
|
||||||
|
public function setPriceAdultAttribute($value)
|
||||||
|
{
|
||||||
|
$this->attributes['price_adult'] = $value ? Util::_clean_float($value) : null;
|
||||||
|
}
|
||||||
|
public function getPriceAdultRaw()
|
||||||
|
{
|
||||||
|
|
||||||
|
return isset($this->attributes['price_adult']) ? $this->attributes['price_adult'] : 0;
|
||||||
|
}
|
||||||
|
public function setPriceAdultRaw($value)
|
||||||
|
{
|
||||||
|
return $this->attributes['price_adult'] = $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//price_children
|
||||||
|
public function getPriceChildrenAttribute()
|
||||||
|
{
|
||||||
|
return isset($this->attributes['price_children']) ? Util::_number_format($this->attributes['price_children']) : null;
|
||||||
|
}
|
||||||
|
public function setPriceChildrenAttribute($value)
|
||||||
|
{
|
||||||
|
$this->attributes['price_children'] = $value ? Util::_clean_float($value) : null;
|
||||||
|
}
|
||||||
|
public function getPriceChildrenRaw()
|
||||||
|
{
|
||||||
|
return isset($this->attributes['price_children']) ? $this->attributes['price_children'] : 0;
|
||||||
|
}
|
||||||
|
public function setPriceChildrenRaw($value)
|
||||||
|
{
|
||||||
|
return $this->attributes['price_children'] = $value;
|
||||||
|
}
|
||||||
|
}
|
||||||
55
app/Models/IQTravelGroupItem.php
Normal file
55
app/Models/IQTravelGroupItem.php
Normal file
|
|
@ -0,0 +1,55 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by Reliese Model.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Carbon\Carbon;
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class IQTravelGroupItem
|
||||||
|
*
|
||||||
|
* @property int $id
|
||||||
|
* @property int $i_q_travel_group_id
|
||||||
|
* @property int $i_q_travel_item_id
|
||||||
|
* @property int $pos
|
||||||
|
* @property Carbon $created_at
|
||||||
|
* @property Carbon $updated_at
|
||||||
|
*
|
||||||
|
* @property IQTravelGroup $i_q_travel_group
|
||||||
|
* @property IQTravelItem $i_q_travel_item
|
||||||
|
*
|
||||||
|
* @package App\Models
|
||||||
|
*/
|
||||||
|
class IQTravelGroupItem extends Model
|
||||||
|
{
|
||||||
|
protected $connection = 'mysql_stern';
|
||||||
|
|
||||||
|
protected $table = 'i_q_travel_group_items';
|
||||||
|
|
||||||
|
protected $casts = [
|
||||||
|
'i_q_travel_group_id' => 'int',
|
||||||
|
'i_q_travel_item_id' => 'int',
|
||||||
|
'pos' => 'int',
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
|
protected $fillable = [
|
||||||
|
'i_q_travel_group_id',
|
||||||
|
'i_q_travel_item_id',
|
||||||
|
'pos',
|
||||||
|
];
|
||||||
|
|
||||||
|
public function i_q_travel_group()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(IQTravelGroup::class);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function i_q_travel_item()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(IQTravelItem::class);
|
||||||
|
}
|
||||||
|
}
|
||||||
131
app/Models/IQTravelItem.php
Normal file
131
app/Models/IQTravelItem.php
Normal file
|
|
@ -0,0 +1,131 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by Reliese Model.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Carbon\Carbon;
|
||||||
|
use App\Services\Util;
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Illuminate\Database\Eloquent\Collection;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class IQTravelItem
|
||||||
|
*
|
||||||
|
* @property int $id
|
||||||
|
* @property string $name
|
||||||
|
* @property string $description
|
||||||
|
* @property string $highlights
|
||||||
|
* @property int $draft_type_id
|
||||||
|
* @property int $travel_country_id
|
||||||
|
* @property int $days_start
|
||||||
|
* @property int $days_duration
|
||||||
|
* @property int $min_persons
|
||||||
|
* @property float $price_adult
|
||||||
|
* @property float $price_children
|
||||||
|
* @property int $pos
|
||||||
|
* @property bool $active
|
||||||
|
* @property Carbon $created_at
|
||||||
|
* @property Carbon $updated_at
|
||||||
|
*
|
||||||
|
* @property TravelCountry $travel_country
|
||||||
|
* @property Collection|IQTravelGroupItem[] $i_q_travel_group_items
|
||||||
|
* @property Collection|IQTravelItemPlace[] $i_q_travel_item_places
|
||||||
|
*
|
||||||
|
* @package App\Models
|
||||||
|
*/
|
||||||
|
class IQTravelItem extends Model
|
||||||
|
{
|
||||||
|
protected $connection = 'mysql_stern';
|
||||||
|
|
||||||
|
protected $table = 'i_q_travel_items';
|
||||||
|
|
||||||
|
protected $casts = [
|
||||||
|
'draft_type_id' => 'int',
|
||||||
|
'travel_country_id' => 'int',
|
||||||
|
'days_start' => 'int',
|
||||||
|
'days_duration' => 'int',
|
||||||
|
'min_persons' => 'int',
|
||||||
|
'price_adult' => 'float',
|
||||||
|
'price_children' => 'float',
|
||||||
|
'pos' => 'int',
|
||||||
|
'active' => 'bool'
|
||||||
|
];
|
||||||
|
|
||||||
|
protected $fillable = [
|
||||||
|
'name',
|
||||||
|
'description',
|
||||||
|
'highlights',
|
||||||
|
'draft_type_id',
|
||||||
|
'travel_country_id',
|
||||||
|
'days_start',
|
||||||
|
'days_duration',
|
||||||
|
'min_persons',
|
||||||
|
'price_adult',
|
||||||
|
'price_children',
|
||||||
|
'pos',
|
||||||
|
'active'
|
||||||
|
];
|
||||||
|
|
||||||
|
public function travel_country()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(TravelCountry::class);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function i_q_travel_group_items()
|
||||||
|
{
|
||||||
|
return $this->hasMany(IQTravelGroupItem::class);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function i_q_travel_item_places()
|
||||||
|
{
|
||||||
|
return $this->hasMany(IQTravelItemPlace::class)->orderBy('pos', 'DESC');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function draft_type()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(DraftType::class, 'draft_type_id');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//price_adult
|
||||||
|
public function getPriceAdultAttribute()
|
||||||
|
{
|
||||||
|
return isset($this->attributes['price_adult']) ? Util::_number_format($this->attributes['price_adult']) : null;
|
||||||
|
}
|
||||||
|
public function setPriceAdultAttribute($value)
|
||||||
|
{
|
||||||
|
$this->attributes['price_adult'] = $value ? Util::_clean_float($value) : null;
|
||||||
|
}
|
||||||
|
public function getPriceAdultRaw()
|
||||||
|
{
|
||||||
|
|
||||||
|
return isset($this->attributes['price_adult']) ? $this->attributes['price_adult'] : 0;
|
||||||
|
}
|
||||||
|
public function setPriceAdultRaw($value)
|
||||||
|
{
|
||||||
|
return $this->attributes['price_adult'] = $value;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//price_children
|
||||||
|
public function getPriceChildrenAttribute()
|
||||||
|
{
|
||||||
|
return isset($this->attributes['price_children']) ? Util::_number_format($this->attributes['price_children']) : null;
|
||||||
|
}
|
||||||
|
public function setPriceChildrenAttribute($value)
|
||||||
|
{
|
||||||
|
$this->attributes['price_children'] = $value ? Util::_clean_float($value) : null;
|
||||||
|
}
|
||||||
|
public function getPriceChildrenRaw()
|
||||||
|
{
|
||||||
|
return isset($this->attributes['price_children']) ? $this->attributes['price_children'] : 0;
|
||||||
|
}
|
||||||
|
public function setPriceChildrenRaw($value)
|
||||||
|
{
|
||||||
|
return $this->attributes['price_children'] = $value;
|
||||||
|
}
|
||||||
|
}
|
||||||
54
app/Models/IQTravelItemPlace.php
Normal file
54
app/Models/IQTravelItemPlace.php
Normal file
|
|
@ -0,0 +1,54 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by Reliese Model.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Carbon\Carbon;
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class IQTravelItemPlace
|
||||||
|
*
|
||||||
|
* @property int $id
|
||||||
|
* @property int $i_q_travel_item_id
|
||||||
|
* @property int $travel_place_id
|
||||||
|
* @property int $pos
|
||||||
|
* @property Carbon $created_at
|
||||||
|
* @property Carbon $updated_at
|
||||||
|
*
|
||||||
|
* @property IQTravelItem $i_q_travel_item
|
||||||
|
* @property TravelPlace $travel_place
|
||||||
|
*
|
||||||
|
* @package App\Models
|
||||||
|
*/
|
||||||
|
class IQTravelItemPlace extends Model
|
||||||
|
{
|
||||||
|
protected $connection = 'mysql_stern';
|
||||||
|
|
||||||
|
protected $table = 'i_q_travel_item_places';
|
||||||
|
|
||||||
|
protected $casts = [
|
||||||
|
'i_q_travel_item_id' => 'int',
|
||||||
|
'travel_place_id' => 'int',
|
||||||
|
'pos' => 'int',
|
||||||
|
];
|
||||||
|
|
||||||
|
protected $fillable = [
|
||||||
|
'i_q_travel_item_id',
|
||||||
|
'travel_place_id',
|
||||||
|
'pos',
|
||||||
|
];
|
||||||
|
|
||||||
|
public function i_q_travel_item()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(IQTravelItem::class);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function travel_place()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(TravelPlace::class);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -277,7 +277,7 @@ class Lead extends Model
|
||||||
|
|
||||||
public function lead_notices()
|
public function lead_notices()
|
||||||
{
|
{
|
||||||
return $this->hasMany(LeadNotice::class, 'lead_id')->orderBy('created_at', 'DESC');
|
return $this->hasMany(LeadNotice::class, 'lead_id')->orderBy('updated_at', 'DESC');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -166,7 +166,7 @@ class TravelCountry extends Model
|
||||||
public function getContactLandsModels(){
|
public function getContactLandsModels(){
|
||||||
$ret = [];
|
$ret = [];
|
||||||
if($this->contact_lands){
|
if($this->contact_lands){
|
||||||
foreach ($this->contact_lands as $travel_country_id){
|
foreach ($this->contact_lands as $contact_land_id){
|
||||||
if($travel_country = TravelCountry::where('crm_id', $contact_land_id)->first()){
|
if($travel_country = TravelCountry::where('crm_id', $contact_land_id)->first()){
|
||||||
$ret[$travel_country->id] = $travel_country;
|
$ret[$travel_country->id] = $travel_country;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
54
app/Models/TravelPlace.php
Normal file
54
app/Models/TravelPlace.php
Normal file
|
|
@ -0,0 +1,54 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by Reliese Model.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Carbon\Carbon;
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class TravelPlace
|
||||||
|
*
|
||||||
|
* @property int $id
|
||||||
|
* @property string $name
|
||||||
|
* @property string $description
|
||||||
|
* @property int $travel_country_id
|
||||||
|
* @property float $latitude
|
||||||
|
* @property float $longitude
|
||||||
|
* @property bool $active
|
||||||
|
* @property Carbon $created_at
|
||||||
|
* @property Carbon $updated_at
|
||||||
|
*
|
||||||
|
* @property TravelCountry $travel_country
|
||||||
|
*
|
||||||
|
* @package App\Models
|
||||||
|
*/
|
||||||
|
class TravelPlace extends Model
|
||||||
|
{
|
||||||
|
protected $connection = 'mysql_stern';
|
||||||
|
protected $table = 'travel_places';
|
||||||
|
|
||||||
|
protected $casts = [
|
||||||
|
'travel_country_id' => 'int',
|
||||||
|
'latitude' => 'float',
|
||||||
|
'longitude' => 'float',
|
||||||
|
'active' => 'bool'
|
||||||
|
];
|
||||||
|
|
||||||
|
protected $fillable = [
|
||||||
|
'name',
|
||||||
|
'description',
|
||||||
|
'travel_country_id',
|
||||||
|
'latitude',
|
||||||
|
'longitude',
|
||||||
|
'active'
|
||||||
|
];
|
||||||
|
|
||||||
|
public function travel_country()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(TravelCountry::class);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -253,7 +253,7 @@ class TravelUserBookingFewo extends Model
|
||||||
|
|
||||||
public function booking_fewo_notices()
|
public function booking_fewo_notices()
|
||||||
{
|
{
|
||||||
return $this->hasMany(TravelUserBookingFewoNotice::class, 'travel_user_booking_fewo_id')->orderBy('created_at', 'DESC');
|
return $this->hasMany(TravelUserBookingFewoNotice::class, 'travel_user_booking_fewo_id')->orderBy('updated_at', 'DESC');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getStatuesName(){
|
public function getStatuesName(){
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ class ContentSiteRepository extends BaseRepository {
|
||||||
$site_field = false;
|
$site_field = false;
|
||||||
// $site_field = IQContentSiteField::getSiteFieldOrNew($contentSite->id, $model_field->id);
|
// $site_field = IQContentSiteField::getSiteFieldOrNew($contentSite->id, $model_field->id);
|
||||||
//new
|
//new
|
||||||
if(!$site_field->id){
|
/*if(!$site_field->id){
|
||||||
$site_field->site_id = $contentSite->id;
|
$site_field->site_id = $contentSite->id;
|
||||||
$site_field->model_field_id = $model_field->id;
|
$site_field->model_field_id = $model_field->id;
|
||||||
$site_field->field = $model_field->field;
|
$site_field->field = $model_field->field;
|
||||||
|
|
@ -57,7 +57,7 @@ class ContentSiteRepository extends BaseRepository {
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
|
|
||||||
}
|
}*/
|
||||||
$ret[] = $site_field;
|
$ret[] = $site_field;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
89
app/Repositories/IQ/TravelRepository.php
Normal file
89
app/Repositories/IQ/TravelRepository.php
Normal file
|
|
@ -0,0 +1,89 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Repositories\IQ;
|
||||||
|
|
||||||
|
use App\Models\IQTravelGroup;
|
||||||
|
use App\Models\IQTravelGroupItem;
|
||||||
|
use App\Models\IQTravelItem;
|
||||||
|
use App\Models\IQTravelItemPlace;
|
||||||
|
use App\Repositories\BaseRepository;
|
||||||
|
|
||||||
|
class TravelRepository extends BaseRepository {
|
||||||
|
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->model = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public function updateTravelGroup($id, $data)
|
||||||
|
{
|
||||||
|
|
||||||
|
if($id == "new"){
|
||||||
|
$this->model = IQTravelGroup::create($data);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$this->model = IQTravelGroup::findOrFail($id);
|
||||||
|
$this->model->fill($data);
|
||||||
|
$this->model->save();
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->model;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function updateTravelGroupItem($id, $data)
|
||||||
|
{
|
||||||
|
$data['pos'] = $data['pos'] ? intval($data['pos']) : 0;
|
||||||
|
$data['i_q_travel_group_id'] = $data['iq_travel_group_id'];
|
||||||
|
|
||||||
|
if($data['iq_travel_group_item_id'] == "new"){
|
||||||
|
$this->model = IQTravelGroupItem::create($data);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$this->model = IQTravelGroupItem::findOrFail($data['iq_travel_group_item_id']);
|
||||||
|
$this->model->fill($data);
|
||||||
|
$this->model->save();
|
||||||
|
}
|
||||||
|
return $this->model;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public function updateTravelItem($id, $data)
|
||||||
|
{
|
||||||
|
$data['draft_type_id'] = $data['draft_type_id'] ? $data['draft_type_id'] : null;
|
||||||
|
$data['travel_country_id'] = $data['travel_country_id'] ? $data['travel_country_id'] : null;
|
||||||
|
|
||||||
|
if($id == "new"){
|
||||||
|
$this->model = IQTravelItem::create($data);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$this->model = IQTravelItem::findOrFail($id);
|
||||||
|
$this->model->fill($data);
|
||||||
|
$this->model->save();
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->model;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function updateTravelItemPlace($id, $data)
|
||||||
|
{
|
||||||
|
$data['pos'] = $data['pos'] ? intval($data['pos']) : 0;
|
||||||
|
$data['i_q_travel_item_id'] = $data['iq_travel_item_id'];
|
||||||
|
if($data['iq_travel_item_place_id'] == "new"){
|
||||||
|
$this->model = IQTravelItemPlace::create($data);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$this->model = IQTravelItemPlace::findOrFail($data['iq_travel_item_place_id']);
|
||||||
|
$this->model->fill($data);
|
||||||
|
$this->model->save();
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->model;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -9,12 +9,14 @@ use App\Models\Draft;
|
||||||
use App\Models\DraftType;
|
use App\Models\DraftType;
|
||||||
use App\Models\FewoLodging;
|
use App\Models\FewoLodging;
|
||||||
use App\Models\Insurance;
|
use App\Models\Insurance;
|
||||||
|
use App\Models\IQTravelItem;
|
||||||
use App\Models\TravelBookingFewoChannel;
|
use App\Models\TravelBookingFewoChannel;
|
||||||
use App\Models\TravelClass;
|
use App\Models\TravelClass;
|
||||||
use App\Models\TravelCompany;
|
use App\Models\TravelCompany;
|
||||||
use App\Models\TravelCountry;
|
use App\Models\TravelCountry;
|
||||||
use App\Models\TravelGuide;
|
use App\Models\TravelGuide;
|
||||||
use App\Models\TravelNationality;
|
use App\Models\TravelNationality;
|
||||||
|
use App\Models\TravelPlace;
|
||||||
use App\Models\TravelProgram;
|
use App\Models\TravelProgram;
|
||||||
use App\Models\TravelUser;
|
use App\Models\TravelUser;
|
||||||
use Form;
|
use Form;
|
||||||
|
|
@ -238,7 +240,7 @@ class HTMLHelper
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getTravelCountriesOptions($countryId = false){
|
public static function getTravelCountriesOptions($countryId = false, $crm = true){
|
||||||
$checked = [];
|
$checked = [];
|
||||||
if($countryId){
|
if($countryId){
|
||||||
!is_array($countryId) ? $checked = array($countryId) : $checked = $countryId;
|
!is_array($countryId) ? $checked = array($countryId) : $checked = $countryId;
|
||||||
|
|
@ -246,15 +248,15 @@ class HTMLHelper
|
||||||
$options = TravelCountry::where('active_backend',1)->get();
|
$options = TravelCountry::where('active_backend',1)->get();
|
||||||
$ret = '';
|
$ret = '';
|
||||||
foreach ($options as $option){
|
foreach ($options as $option){
|
||||||
$attr = (in_array($option->crm_id, $checked)) ? 'selected="selected"' : '';
|
$id = $crm ? $option->crm_id : $option->id;
|
||||||
$ret .= '<option value="'.$option->crm_id.'" '.$attr.'>'.$option->name.'</option>\n';
|
$attr = (in_array($id, $checked)) ? 'selected="selected"' : '';
|
||||||
|
$ret .= '<option value="'.$id.'" '.$attr.'>'.$option->name.'</option>\n';
|
||||||
}
|
}
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getTravelUserOptions($id = false, $order = "ASC", $empty=false){
|
public static function getTravelUserOptions($id = false, $order = "ASC", $empty=false){
|
||||||
$options = TravelUser::orderBy('id', $order)->get();
|
$options = TravelUser::orderBy('id', $order)->get();
|
||||||
|
|
||||||
$ret = '';
|
$ret = '';
|
||||||
if($empty){
|
if($empty){
|
||||||
$ret = '<option value="">Bitte wählen</option>\n';
|
$ret = '<option value="">Bitte wählen</option>\n';
|
||||||
|
|
@ -267,6 +269,33 @@ class HTMLHelper
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function getTravelPlaceOptions($id = false, $order = "ASC", $empty=false){
|
||||||
|
$options = TravelPlace::where('active',1)->orderBy('id', $order)->get();
|
||||||
|
$ret = '';
|
||||||
|
if($empty){
|
||||||
|
$ret = '<option value="">Bitte wählen</option>\n';
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach ($options as $option){
|
||||||
|
$attr = ($option->id === $id) ? 'selected="selected"' : '';
|
||||||
|
$ret .= '<option value="'.$option->id.'" '.$attr.'>'.$option->name.'</option>\n';
|
||||||
|
}
|
||||||
|
return $ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function getIQTravelItemsOptions($id = false, $order = "ASC", $empty=false){
|
||||||
|
$options = IQTravelItem::where('active',1)->orderBy('id', $order)->get();
|
||||||
|
$ret = '';
|
||||||
|
if($empty){
|
||||||
|
$ret = '<option value="">Bitte wählen</option>\n';
|
||||||
|
}
|
||||||
|
foreach ($options as $option){
|
||||||
|
$attr = ($option->id === $id) ? 'selected="selected"' : '';
|
||||||
|
$ret .= '<option value="'.$option->id.'" '.$attr.'>'.$option->name.'</option>\n';
|
||||||
|
}
|
||||||
|
return $ret;
|
||||||
|
}
|
||||||
|
|
||||||
public static function getCustomerMailDirsOptions(CMSContent $customer_mail_dir, $checked = []){
|
public static function getCustomerMailDirsOptions(CMSContent $customer_mail_dir, $checked = []){
|
||||||
//$checked = [];
|
//$checked = [];
|
||||||
$model = $customer_mail_dir->getArrayContent('model');
|
$model = $customer_mail_dir->getArrayContent('model');
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ namespace App\Services;
|
||||||
|
|
||||||
use App\Models\Branch;
|
use App\Models\Branch;
|
||||||
use App\Models\Status;
|
use App\Models\Status;
|
||||||
|
use App\Models\DraftType;
|
||||||
use App\Models\Salutation;
|
use App\Models\Salutation;
|
||||||
use App\Models\SfGuardUser;
|
use App\Models\SfGuardUser;
|
||||||
use App\Models\TravelAgenda;
|
use App\Models\TravelAgenda;
|
||||||
|
|
@ -76,6 +77,11 @@ class Model
|
||||||
return $emtpy ? $TravelNationality->prepend('-', 0) : $TravelNationality;
|
return $emtpy ? $TravelNationality->prepend('-', 0) : $TravelNationality;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function getDraftTypeArray($emtpy = false){
|
||||||
|
$DraftType = DraftType::where('active', true)->orderByDesc('pos')->get()->pluck('name', 'id');
|
||||||
|
return $emtpy ? $DraftType->prepend('-', 0) : $DraftType;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,10 @@ return [
|
||||||
'crm-mail-le' => ['name' => 'ADMIN CRM > E-Mails > Anfragen' , 'color' => 'admin'],
|
'crm-mail-le' => ['name' => 'ADMIN CRM > E-Mails > Anfragen' , 'color' => 'admin'],
|
||||||
'crm-mail-bo' => ['name' => 'ADMIN CRM > E-Mails > Buchungen' , 'color' => 'admin'],
|
'crm-mail-bo' => ['name' => 'ADMIN CRM > E-Mails > Buchungen' , 'color' => 'admin'],
|
||||||
'crm-mail-bf' => ['name' => 'ADMIN CRM > E-Mails > Buchungen (Fewo)' , 'color' => 'admin'],
|
'crm-mail-bf' => ['name' => 'ADMIN CRM > E-Mails > Buchungen (Fewo)' , 'color' => 'admin'],
|
||||||
|
'crm-iq-tl' => ['name' => 'ADMIN CRM > Reisebausteine' , 'color' => 'admin'],
|
||||||
|
'crm-iq-tl-pro' => ['name' => 'ADMIN CRM > Reisebausteine > Programm' , 'color' => 'admin'],
|
||||||
|
'crm-iq-tl-gp' => ['name' => 'ADMIN CRM > Reisebausteine > Gruppe' , 'color' => 'admin'],
|
||||||
|
'crm-iq-tl-it' => ['name' => 'ADMIN CRM > Reisebausteine > Baustein' , 'color' => 'admin'],
|
||||||
'crm-old-cm' => ['name' => 'ADMIN CRM altes System > Kundenverwaltung' , 'color' => 'info'],
|
'crm-old-cm' => ['name' => 'ADMIN CRM altes System > Kundenverwaltung' , 'color' => 'info'],
|
||||||
'cms' => ['name' => 'ADMIN CMS' , 'color' => 'secondary'],
|
'cms' => ['name' => 'ADMIN CMS' , 'color' => 'secondary'],
|
||||||
'cms-iq-assets' => ['name' => 'ADMIN CMS > Medien' , 'color' => 'secondary'],
|
'cms-iq-assets' => ['name' => 'ADMIN CMS > Medien' , 'color' => 'secondary'],
|
||||||
|
|
@ -45,7 +49,8 @@ return [
|
||||||
'sua-st-sp' => ['name' => 'SUPERADMIN > Einstellungen > Leistungsträger' , 'color' => 'superadmin'],
|
'sua-st-sp' => ['name' => 'SUPERADMIN > Einstellungen > Leistungsträger' , 'color' => 'superadmin'],
|
||||||
'sua-st-tn' => ['name' => 'SUPERADMIN > Einstellungen > Nationalitäten' , 'color' => 'superadmin'],
|
'sua-st-tn' => ['name' => 'SUPERADMIN > Einstellungen > Nationalitäten' , 'color' => 'superadmin'],
|
||||||
'sua-st-co' => ['name' => 'SUPERADMIN > Einstellungen > Reiseländer' , 'color' => 'superadmin'],
|
'sua-st-co' => ['name' => 'SUPERADMIN > Einstellungen > Reiseländer' , 'color' => 'superadmin'],
|
||||||
'sua-st-tp' => ['name' => 'SUPERADMIN > Einstellungen > Reisprogramme' , 'color' => 'superadmin'],
|
'sua-st-tp' => ['name' => 'SUPERADMIN > Einstellungen > Reiseprogramme' , 'color' => 'superadmin'],
|
||||||
|
'sua-st-tpl' => ['name' => 'SUPERADMIN > Einstellungen > Reiseorte' , 'color' => 'superadmin'],
|
||||||
'sua-st-bs' => ['name' => 'SUPERADMIN > Einstellungen > Reisestatus' , 'color' => 'superadmin'],
|
'sua-st-bs' => ['name' => 'SUPERADMIN > Einstellungen > Reisestatus' , 'color' => 'superadmin'],
|
||||||
'sua-st-tc' => ['name' => 'SUPERADMIN > Einstellungen > Veranstalter' , 'color' => 'superadmin'],
|
'sua-st-tc' => ['name' => 'SUPERADMIN > Einstellungen > Veranstalter' , 'color' => 'superadmin'],
|
||||||
'sua-st-in' => ['name' => 'SUPERADMIN > Einstellungen > Versicherungen' , 'color' => 'superadmin'],
|
'sua-st-in' => ['name' => 'SUPERADMIN > Einstellungen > Versicherungen' , 'color' => 'superadmin'],
|
||||||
|
|
@ -55,7 +60,6 @@ return [
|
||||||
'sua-re-pp' => ['name' => 'SUPERADMIN > Export > Leistungsträger' , 'color' => 'superadmin'],
|
'sua-re-pp' => ['name' => 'SUPERADMIN > Export > Leistungsträger' , 'color' => 'superadmin'],
|
||||||
'sua-ur-rt' => ['name' => 'SUPERADMIN > User Rechte' , 'color' => 'danger'],
|
'sua-ur-rt' => ['name' => 'SUPERADMIN > User Rechte' , 'color' => 'danger'],
|
||||||
'cms-cn-co' => ['name' => 'ADMIN CMS > Inhalte > Länder' , 'color' => 'secondary'],
|
'cms-cn-co' => ['name' => 'ADMIN CMS > Inhalte > Länder' , 'color' => 'secondary'],
|
||||||
|
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'roles' => [
|
'roles' => [
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,7 @@ class CreateDraftItemsTable extends Migration
|
||||||
$table->foreign('draft_type_id')
|
$table->foreign('draft_type_id')
|
||||||
->references('id')
|
->references('id')
|
||||||
->on('draft_types');
|
->on('draft_types');
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,45 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
class CreateTravelPlacesTable extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::connection('mysql_stern')->create('travel_places', function (Blueprint $table) {
|
||||||
|
$table->increments('id');
|
||||||
|
|
||||||
|
$table->string('name')->nullable();
|
||||||
|
$table->text('description')->nullable();
|
||||||
|
|
||||||
|
$table->integer('travel_country_id')->nullable();
|
||||||
|
$table->decimal('latitude', 10, 6)->nullable();
|
||||||
|
$table->decimal('longitude', 10, 6)->nullable();
|
||||||
|
|
||||||
|
$table->boolean('active')->default(true);
|
||||||
|
|
||||||
|
$table->timestamps();
|
||||||
|
|
||||||
|
$table->foreign('travel_country_id')
|
||||||
|
->references('id')
|
||||||
|
->on('travel_country');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::connection('mysql_stern')->dropIfExists('travel_places');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,65 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
class CreateIQTravelBlocksTable extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::connection('mysql_stern')->create('i_q_travel_blocks', function (Blueprint $table) {
|
||||||
|
$table->increments('id');
|
||||||
|
|
||||||
|
$table->string('name')->nullable();
|
||||||
|
$table->text('description')->nullable();
|
||||||
|
$table->text('highlights')->nullable();
|
||||||
|
|
||||||
|
|
||||||
|
$table->unsignedInteger('draft_type_id')->nullable()->index();
|
||||||
|
$table->unsignedInteger('travel_place_id')->nullable()->index();
|
||||||
|
$table->integer('travel_country_id')->nullable();
|
||||||
|
|
||||||
|
|
||||||
|
$table->tinyInteger('days_start')->unsigned()->nullable();
|
||||||
|
$table->tinyInteger('days_duration')->unsigned()->nullable();
|
||||||
|
|
||||||
|
$table->tinyInteger('min_persons')->unsigned()->nullable();
|
||||||
|
|
||||||
|
$table->decimal('price_adult', 8, 2)->nullable();
|
||||||
|
$table->decimal('price_children', 8, 2)->nullable();
|
||||||
|
|
||||||
|
$table->tinyInteger('pos')->unsigned()->nullable();
|
||||||
|
$table->boolean('active')->default(true);
|
||||||
|
|
||||||
|
$table->timestamps();
|
||||||
|
|
||||||
|
$table->foreign('draft_type_id')
|
||||||
|
->references('id')
|
||||||
|
->on('draft_types');
|
||||||
|
|
||||||
|
$table->foreign('travel_place_id')
|
||||||
|
->references('id')
|
||||||
|
->on('travel_places');
|
||||||
|
|
||||||
|
$table->foreign('travel_country_id')
|
||||||
|
->references('id')
|
||||||
|
->on('travel_country');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::connection('mysql_stern')->dropIfExists('i_q_travel_blocks');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,58 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
class CreateIQTravelItemsTable extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::connection('mysql_stern')->create('i_q_travel_items', function (Blueprint $table) {
|
||||||
|
$table->increments('id');
|
||||||
|
|
||||||
|
$table->string('name')->nullable();
|
||||||
|
$table->text('description')->nullable();
|
||||||
|
$table->text('highlights')->nullable();
|
||||||
|
|
||||||
|
$table->unsignedInteger('draft_type_id')->nullable()->index();
|
||||||
|
$table->integer('travel_country_id')->nullable();
|
||||||
|
|
||||||
|
$table->tinyInteger('days_start')->unsigned()->nullable();
|
||||||
|
$table->tinyInteger('days_duration')->unsigned()->nullable();
|
||||||
|
|
||||||
|
$table->tinyInteger('min_persons')->unsigned()->nullable();
|
||||||
|
|
||||||
|
$table->decimal('price_adult', 8, 2)->nullable();
|
||||||
|
$table->decimal('price_children', 8, 2)->nullable();
|
||||||
|
|
||||||
|
$table->tinyInteger('pos')->unsigned()->nullable();
|
||||||
|
$table->boolean('active')->default(true);
|
||||||
|
|
||||||
|
$table->timestamps();
|
||||||
|
|
||||||
|
/*$table->foreign('draft_type_id')
|
||||||
|
->references('id')
|
||||||
|
->on('draft_types');*/
|
||||||
|
|
||||||
|
$table->foreign('travel_country_id')
|
||||||
|
->references('id')
|
||||||
|
->on('travel_country');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::connection('mysql_stern')->dropIfExists('i_q_travel_items');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,49 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
class CreateIQTravelItemPlacesTable extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::connection('mysql_stern')->create('i_q_travel_item_places', function (Blueprint $table) {
|
||||||
|
|
||||||
|
$table->bigIncrements('id');
|
||||||
|
|
||||||
|
$table->unsignedInteger('i_q_travel_item_id')->index();
|
||||||
|
$table->unsignedInteger('travel_place_id')->index();
|
||||||
|
$table->tinyInteger('pos')->unsigned()->nullable();
|
||||||
|
|
||||||
|
|
||||||
|
$table->timestamps();
|
||||||
|
|
||||||
|
$table->foreign('i_q_travel_item_id')
|
||||||
|
->references('id')
|
||||||
|
->on('i_q_travel_items')
|
||||||
|
->onDelete('cascade');
|
||||||
|
|
||||||
|
$table->foreign('travel_place_id')
|
||||||
|
->references('id')
|
||||||
|
->on('travel_places')
|
||||||
|
->onDelete('cascade');
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::connection('mysql_stern')->dropIfExists('i_q_travel_item_places');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,48 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
class CreateIQTravelGroupsTable extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::connection('mysql_stern')->create('i_q_travel_groups', function (Blueprint $table) {
|
||||||
|
|
||||||
|
$table->increments('id');
|
||||||
|
|
||||||
|
$table->string('name')->nullable();
|
||||||
|
$table->text('description')->nullable();
|
||||||
|
$table->text('highlights')->nullable();
|
||||||
|
|
||||||
|
$table->tinyInteger('days_start')->unsigned()->nullable();
|
||||||
|
$table->tinyInteger('days_duration')->unsigned()->nullable();
|
||||||
|
|
||||||
|
$table->tinyInteger('min_persons')->unsigned()->nullable();
|
||||||
|
|
||||||
|
$table->decimal('price_adult', 8, 2)->nullable();
|
||||||
|
$table->decimal('price_children', 8, 2)->nullable();
|
||||||
|
|
||||||
|
$table->tinyInteger('pos')->unsigned()->nullable();
|
||||||
|
$table->boolean('active')->default(true);
|
||||||
|
|
||||||
|
$table->timestamps();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::connection('mysql_stern')->dropIfExists('i_q_travel_groups');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,47 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
class CreateIQTravelGroupItemsTable extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::connection('mysql_stern')->create('i_q_travel_group_items', function (Blueprint $table) {
|
||||||
|
$table->bigIncrements('id');
|
||||||
|
|
||||||
|
$table->unsignedInteger('i_q_travel_group_id')->index();
|
||||||
|
$table->unsignedInteger('i_q_travel_item_id')->index();
|
||||||
|
$table->tinyInteger('pos')->unsigned()->nullable();
|
||||||
|
|
||||||
|
|
||||||
|
$table->timestamps();
|
||||||
|
|
||||||
|
$table->foreign('i_q_travel_group_id')
|
||||||
|
->references('id')
|
||||||
|
->on('i_q_travel_groups')
|
||||||
|
->onDelete('cascade');
|
||||||
|
|
||||||
|
$table->foreign('i_q_travel_item_id')
|
||||||
|
->references('id')
|
||||||
|
->on('i_q_travel_items')
|
||||||
|
->onDelete('cascade');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::connection('mysql_stern')->dropIfExists('i_q_travel_group_items');
|
||||||
|
}
|
||||||
|
}
|
||||||
37
resources/views/admin/modal/iq_travel_group-item.blade.php
Normal file
37
resources/views/admin/modal/iq_travel_group-item.blade.php
Normal file
|
|
@ -0,0 +1,37 @@
|
||||||
|
<div class="modal-content">
|
||||||
|
{!! Form::open(['url' => $data['url'], 'class' => '', 'enctype' => 'multipart/form-data']) !!}
|
||||||
|
{{ Form::hidden('iq_travel_group_item_id', $data['id']) }}
|
||||||
|
{{ Form::hidden('iq_travel_group_id', $data['iq_travel_group_id']) }}
|
||||||
|
{{ Form::hidden('back', $data['back']) }}
|
||||||
|
|
||||||
|
<div class="modal-header">
|
||||||
|
<h5 class="modal-title">
|
||||||
|
Reisebaustein
|
||||||
|
<span class="font-weight-light">hinzufügen</span>
|
||||||
|
</h5>
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="i_q_travel_item_id" class="form-label">{{__('Reisebaustein')}}*</label>
|
||||||
|
<select class="selectpicker" data-style="btn-default" name="i_q_travel_item_id" data-live-search="true" required>
|
||||||
|
{!! HTMLHelper::getIQTravelItemsOptions($value->i_q_travel_item_id, 'ASC', true) !!}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="pos" class="form-label">{{ __('Position') }}</label>
|
||||||
|
{{ Form::text('pos', $value->pos, array('class'=>'form-control')) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-default" data-dismiss="modal">schließen</button>
|
||||||
|
<button type="submit" class="btn btn-primary" name="action" value="save-iq_travel_item_group">speichern</button>
|
||||||
|
</div>
|
||||||
|
{!! Form::close() !!}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
</script>
|
||||||
38
resources/views/admin/modal/iq_travel_item-group.blade.php
Normal file
38
resources/views/admin/modal/iq_travel_item-group.blade.php
Normal file
|
|
@ -0,0 +1,38 @@
|
||||||
|
<div class="modal-content">
|
||||||
|
{!! Form::open(['url' => $data['url'], 'class' => '', 'enctype' => 'multipart/form-data']) !!}
|
||||||
|
{{ Form::hidden('iq_travel_item_place_id', $data['id']) }}
|
||||||
|
{{ Form::hidden('iq_travel_item_id', $data['iq_travel_item_id']) }}
|
||||||
|
{{ Form::hidden('back', $data['back']) }}
|
||||||
|
|
||||||
|
<div class="modal-header">
|
||||||
|
<h5 class="modal-title">
|
||||||
|
Reiseort hinzufügen
|
||||||
|
<span class="font-weight-light">hinzufügen</span>
|
||||||
|
</h5>
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
|
||||||
|
<label for="travel_place_id" class="form-label">{{__('Land')}}*</label>
|
||||||
|
<select class="selectpicker" data-style="btn-default" name="travel_place_id" data-live-search="true" required>
|
||||||
|
{!! HTMLHelper::getTravelPlaceOptions($value->travel_place_id, 'ASC', true) !!}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="pos" class="form-label">{{ __('Position') }}</label>
|
||||||
|
{{ Form::text('pos', $value->pos, array('class'=>'form-control')) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-default" data-dismiss="modal">schließen</button>
|
||||||
|
<button type="submit" class="btn btn-primary" name="action" value="save-iq_travel_item_place">speichern</button>
|
||||||
|
</div>
|
||||||
|
{!! Form::close() !!}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
</script>
|
||||||
38
resources/views/admin/modal/iq_travel_item-place.blade.php
Normal file
38
resources/views/admin/modal/iq_travel_item-place.blade.php
Normal file
|
|
@ -0,0 +1,38 @@
|
||||||
|
<div class="modal-content">
|
||||||
|
{!! Form::open(['url' => $data['url'], 'class' => '', 'enctype' => 'multipart/form-data']) !!}
|
||||||
|
{{ Form::hidden('iq_travel_item_place_id', $data['id']) }}
|
||||||
|
{{ Form::hidden('iq_travel_item_id', $data['iq_travel_item_id']) }}
|
||||||
|
{{ Form::hidden('back', $data['back']) }}
|
||||||
|
|
||||||
|
<div class="modal-header">
|
||||||
|
<h5 class="modal-title">
|
||||||
|
Reiseort
|
||||||
|
<span class="font-weight-light">hinzufügen</span>
|
||||||
|
</h5>
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
|
||||||
|
<label for="travel_place_id" class="form-label">{{__('Reiseort')}}*</label>
|
||||||
|
<select class="selectpicker" data-style="btn-default" name="travel_place_id" data-live-search="true" required>
|
||||||
|
{!! HTMLHelper::getTravelPlaceOptions($value->travel_place_id, 'ASC', true) !!}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="pos" class="form-label">{{ __('Position') }}</label>
|
||||||
|
{{ Form::text('pos', $value->pos, array('class'=>'form-control')) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-default" data-dismiss="modal">schließen</button>
|
||||||
|
<button type="submit" class="btn btn-primary" name="action" value="save-iq_travel_item_place">speichern</button>
|
||||||
|
</div>
|
||||||
|
{!! Form::close() !!}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
@ -17,7 +17,6 @@
|
||||||
<th>{{__('Vorname')}}</th>
|
<th>{{__('Vorname')}}</th>
|
||||||
<th>{{__('Nachname')}}</th>
|
<th>{{__('Nachname')}}</th>
|
||||||
<th>{{__('E-Mail')}}</th>
|
<th>{{__('E-Mail')}}</th>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
||||||
|
|
@ -168,13 +168,13 @@
|
||||||
<td>
|
<td>
|
||||||
<select class="selectpicker" data-style="btn-light" name="draft_item[{{$draft_item->id}}][days_start]]" id="draft_item_{{$draft_item->id }}_days_start">
|
<select class="selectpicker" data-style="btn-light" name="draft_item[{{$draft_item->id}}][days_start]]" id="draft_item_{{$draft_item->id }}_days_start">
|
||||||
<option value="">(Datum) Start + Tage</option>
|
<option value="">(Datum) Start + Tage</option>
|
||||||
{!! HTMLHelper::getRangeOptions($draft_item->days_start, 30, ' Tag(e)') !!}
|
{!! HTMLHelper::getRangeOptions($draft_item->days_start, 30, '. Tag') !!}
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<select class="selectpicker" data-style="btn-light" name="draft_item[{{$draft_item->id}}][days_duration]" id="draft_item_{{$draft_item->id }}_days_duration">
|
<select class="selectpicker" data-style="btn-light" name="draft_item[{{$draft_item->id}}][days_duration]" id="draft_item_{{$draft_item->id }}_days_duration">
|
||||||
<option value="">(Datum) Dauer + Tage</option>
|
<option value="">(Datum) Dauer + Tage</option>
|
||||||
{!! HTMLHelper::getRangeOptions($draft_item->days_duration, 30, ' Tag(e)') !!}
|
{!! HTMLHelper::getRangeOptions($draft_item->days_duration, 30, ' Tag:e') !!}
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
|
|
|
||||||
175
resources/views/iq/travel/group/detail.blade.php
Normal file
175
resources/views/iq/travel/group/detail.blade.php
Normal file
|
|
@ -0,0 +1,175 @@
|
||||||
|
@extends('layouts.layout-2')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
|
||||||
|
{!! Form::open(['url' => route('iq_travel_group_detail', [$id]), 'class' => 'form-horizontal']) !!}
|
||||||
|
|
||||||
|
<h4 class="font-weight-bold py-3 mb-1">
|
||||||
|
Gruppenbaustein
|
||||||
|
<div class="float-right">
|
||||||
|
<button type="submit" name="action" value="saveAll" class="btn btn-submit btn-sm">{{ __('save changes') }}</button>
|
||||||
|
<a href="{{route('iq_travel_groups')}}" class="btn btn-default btn-sm">{{ __('back') }}</a>
|
||||||
|
</div>
|
||||||
|
</h4>
|
||||||
|
|
||||||
|
<div class="card mb-2">
|
||||||
|
<div class="card-body">
|
||||||
|
<h4>Allgemein</h4>
|
||||||
|
<div class="form-row">
|
||||||
|
<div class="form-group col-sm-12">
|
||||||
|
<label class="form-label" for="name">{{ __('Name') }} *</label>
|
||||||
|
{{ Form::text('name', $model->name, array('placeholder'=>__('Name'), 'class'=>'form-control', 'id'=>'name', 'required'=>true)) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-row">
|
||||||
|
<div class="form-group col-sm-4">
|
||||||
|
<label class="form-label" for="min_persons">min. Personen</span></label>
|
||||||
|
<select class="custom-select" data-style="btn-light" name="min_persons" id="min_persons">
|
||||||
|
<option value="">min. Personen</option>
|
||||||
|
{!! HTMLHelper::getRangeOptions($model->min_persons, 10, ' min.P.') !!}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-sm-4">
|
||||||
|
<label class="form-label" for="price_adult">Preis p.P. Erwachsender</span></label>
|
||||||
|
<div class="input-group">
|
||||||
|
<div class="input-group-prepend">
|
||||||
|
<span class="input-group-text">€</span>
|
||||||
|
</div>
|
||||||
|
{{ Form::text('price_adult', $model->price_adult, array('placeholder'=>__('Preis in €'), 'class'=>'form-control', 'id'=>'price_adult',)) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-sm-4">
|
||||||
|
<label class="form-label" for="price_children">Preis p.P. Kinder</span></label>
|
||||||
|
<div class="input-group">
|
||||||
|
<div class="input-group-prepend">
|
||||||
|
<span class="input-group-text">€</span>
|
||||||
|
</div>
|
||||||
|
{{ Form::text('price_children', $model->price_children, array('placeholder'=>__('Preis in €'), 'class'=>'form-control', 'id'=>'price_children',)) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-row">
|
||||||
|
<div class="form-group col-sm-4">
|
||||||
|
<label class="form-label" for="price_adult">Dauer in Tagen</span></label>
|
||||||
|
<select class="selectpicker" data-style="btn-light" name="days_duration" id="days_duration">
|
||||||
|
<option value="">Dauer in Tagen</option>
|
||||||
|
{!! HTMLHelper::getRangeOptions($model->days_duration, 60, ' Tag:e') !!}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-sm-4">
|
||||||
|
<label class="form-label" for="price_adult">Starttag</span></label>
|
||||||
|
<select class="selectpicker" data-style="btn-light" name="days_start" id="days_start">
|
||||||
|
<option value="">Starttag</option>
|
||||||
|
{!! HTMLHelper::getRangeOptions($model->days_start, 60, ' Tag:e') !!}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-sm-4 pt-4">
|
||||||
|
<label class="switcher switcher-on-off">
|
||||||
|
{{ Form::hidden('active', 0) }}
|
||||||
|
{{ Form::checkbox('active', 1, $model->active, array('class'=>'switcher-input')) }}
|
||||||
|
<span class="switcher-indicator">
|
||||||
|
<span class="switcher-yes"></span>
|
||||||
|
<span class="switcher-no"></span>
|
||||||
|
</span>
|
||||||
|
<span class="switcher-label">sichtbar</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<hr>
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-sm-12 col-md-6">
|
||||||
|
<label class="form-label" for="description">Beschreibung</span></label>
|
||||||
|
{{ Form::textarea('description', $model->description, array('class'=>'form-control autoExpand', 'rows'=>2)) }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group col-sm-12 col-md-6">
|
||||||
|
<label class="form-label" for="highlights">Highlights</span></label>
|
||||||
|
{{ Form::textarea('highlights', $model->highlights, array('class'=>'form-control autoExpand', 'rows'=>2)) }}
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<hr>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h4>Reisebausteine <span class="text-muted">für diese Gruppe</span></h4>
|
||||||
|
|
||||||
|
@if($model->id)
|
||||||
|
|
||||||
|
<div class="table-responsive" id="booking_files_table">
|
||||||
|
<table class="table table-striped table-sm">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th style="width: 2%;"> </th>
|
||||||
|
<th style="width: 6%;">{{__('POS')}}</th>
|
||||||
|
<th>{{__('Name')}}</th>
|
||||||
|
<th>{{__('Typ')}}</th>
|
||||||
|
<th>{{__('Land')}}</th>
|
||||||
|
<th>{{__('Ort(e)')}}</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
@if($model->i_q_travel_group_items)
|
||||||
|
@foreach($model->i_q_travel_group_items as $i_q_travel_group_item)
|
||||||
|
<tr>
|
||||||
|
<td class="not">
|
||||||
|
<button type="button" class="btn icon-btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-load-content"
|
||||||
|
data-id="{{$i_q_travel_group_item->id}}"
|
||||||
|
data-iq_travel_group_id="{{$model->id}}"
|
||||||
|
data-model="IQTravelGroupItem"
|
||||||
|
data-action="modal-iq_travel_item-group"
|
||||||
|
data-back="{{route('iq_travel_group_detail', [$model->id])}}"
|
||||||
|
data-url="{{ route('iq_travel_group_detail', [$model->id]) }}"
|
||||||
|
data-route="{{ route('modal_load') }}"><span class="fa fa-edit"></span></button>
|
||||||
|
</td>
|
||||||
|
<td>{{ $i_q_travel_group_item->pos }}</td>
|
||||||
|
<td>{{ $i_q_travel_group_item->i_q_travel_item->name }}</td>
|
||||||
|
<td>@if($i_q_travel_group_item->i_q_travel_item->draft_type) <span class="py-1 px-2" style="background-color: {{ $i_q_travel_group_item->i_q_travel_item->draft_type->color }}">{{ $i_q_travel_group_item->i_q_travel_item->draft_type->name }}</span> @endif</td>
|
||||||
|
<td>@if($i_q_travel_group_item->i_q_travel_item->travel_country){{ $i_q_travel_group_item->i_q_travel_item->travel_country->name }} @endif</td>
|
||||||
|
<td>
|
||||||
|
@if($i_q_travel_group_item->i_q_travel_item->i_q_travel_item_places->count())
|
||||||
|
@foreach($i_q_travel_group_item->i_q_travel_item->i_q_travel_item_places as $i_q_travel_item_place)
|
||||||
|
{{ $i_q_travel_item_place->travel_place->name }} <br>
|
||||||
|
@endforeach
|
||||||
|
@endif
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<a class="ml-2 btn btn-xs btn-danger" href="{{ route('iq_travel_group_delete', [$i_q_travel_group_item->id, 'i_q_travel_group_item']) }}" onclick="return confirm('{{__('Wirklich löschen?')}}');"><i class="fa fa-trash-alt"></i></a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
@endforeach
|
||||||
|
@endif
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="text-right d-block w-100">
|
||||||
|
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-load-content"
|
||||||
|
data-id="new"
|
||||||
|
data-iq_travel_group_id="{{$model->id}}"
|
||||||
|
data-model="IQTravelGroupItem"
|
||||||
|
data-action="modal-iq_travel_item-group"
|
||||||
|
data-back="{{route('iq_travel_group_detail', [$model->id])}}"
|
||||||
|
data-url="{{ route('iq_travel_group_detail', [$model->id]) }}"
|
||||||
|
data-route="{{ route('modal_load') }}"><i class="ion ion-md-add-circle"></i> Reisebaustein hinzufügen</button>
|
||||||
|
</div>
|
||||||
|
@else
|
||||||
|
<p><i>Der Gruppenbaustein muss erst mit einem Name gespeichert werden.</i></p>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="text-left mt-3">
|
||||||
|
<button type="submit" name="action" value="saveAll" class="btn btn-submit">{{ __('save changes') }}</button>
|
||||||
|
<a href="{{route('iq_travel_groups')}}" class="btn btn-default">{{ __('back') }}</a> </div>
|
||||||
|
{!! Form::close() !!}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@endsection
|
||||||
55
resources/views/iq/travel/group/index.blade.php
Normal file
55
resources/views/iq/travel/group/index.blade.php
Normal file
|
|
@ -0,0 +1,55 @@
|
||||||
|
@extends('layouts.layout-2')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
|
||||||
|
<h4 class="font-weight-bold py-3 mb-4">
|
||||||
|
Reisebausteine / Gruppen
|
||||||
|
</h4>
|
||||||
|
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-datatable table-responsive">
|
||||||
|
<table class="datatables-customer table table-striped table-bordered">
|
||||||
|
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th style="max-width: 60px;"> </th>
|
||||||
|
<th>{{__('Name')}}</th>
|
||||||
|
<th>{{__('Bausteine')}}</th>
|
||||||
|
<th>{{__('sichbar')}}</th>
|
||||||
|
<th style="max-width: 60px;"> </th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="ml-3 mb-2">
|
||||||
|
<a href="{{ route('iq_travel_group_detail', ['new']) }}" class="btn btn-sm btn-primary">Neuen Gruppenbaustein anlegen</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$( document ).ready(function() {
|
||||||
|
$('.datatables-customer').dataTable({
|
||||||
|
"processing": true,
|
||||||
|
"serverSide": true,
|
||||||
|
"ajax": '{!! route('data_table_travel_groups') !!}',
|
||||||
|
"order": [[ 1, "desc" ]],
|
||||||
|
"columns": [
|
||||||
|
{ data: 'action_edit', orderable: false, searchable: false},
|
||||||
|
{ data: 'name', name: 'name' },
|
||||||
|
{ data: 'trave_items', name: 'trave_items', orderable: false, searchable: false },
|
||||||
|
{ data: 'active', name: 'active' },
|
||||||
|
{ data: 'action_delete', orderable: false, searchable: false},
|
||||||
|
],
|
||||||
|
"bLengthChange": false,
|
||||||
|
"iDisplayLength": 100,
|
||||||
|
"language": {
|
||||||
|
"url": "/js/German.json"
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@endsection
|
||||||
175
resources/views/iq/travel/item/detail.blade.php
Normal file
175
resources/views/iq/travel/item/detail.blade.php
Normal file
|
|
@ -0,0 +1,175 @@
|
||||||
|
@extends('layouts.layout-2')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
|
||||||
|
{!! Form::open(['url' => route('iq_travel_item_detail', [$id]), 'class' => 'form-horizontal']) !!}
|
||||||
|
|
||||||
|
<h4 class="font-weight-bold py-3 mb-1">
|
||||||
|
Reisebaustein
|
||||||
|
<div class="float-right">
|
||||||
|
<button type="submit" name="action" value="saveAll" class="btn btn-submit btn-sm">{{ __('save changes') }}</button>
|
||||||
|
<a href="{{route('iq_travel_items')}}" class="btn btn-default btn-sm">{{ __('back') }}</a>
|
||||||
|
</div>
|
||||||
|
</h4>
|
||||||
|
|
||||||
|
<div class="card mb-2">
|
||||||
|
<div class="card-body">
|
||||||
|
<h4>Allgemein</h4>
|
||||||
|
<div class="form-row">
|
||||||
|
<div class="form-group col-sm-4">
|
||||||
|
<label class="form-label" for="name">{{ __('Name') }} *</label>
|
||||||
|
{{ Form::text('name', $model->name, array('placeholder'=>__('Name'), 'class'=>'form-control', 'id'=>'name', 'required'=>true)) }}
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-sm-4">
|
||||||
|
<label for="draft_type_id" class="form-label">Typ</label>
|
||||||
|
{{ Form::select('draft_type_id', \App\Services\Model::getDraftTypeArray(true) , $model->draft_type_id, array('class'=>'custom-select', 'id'=>'draft_type_id')) }}
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-sm-4">
|
||||||
|
<label for="travel_country_id" class="form-label">Reiseland</label>
|
||||||
|
{{ Form::select('travel_country_id', \App\Services\Model::getTravelCountryArray(true) , $model->travel_country_id, array('class'=>'custom-select', 'id'=>'travel_country_id')) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-row">
|
||||||
|
<div class="form-group col-sm-4">
|
||||||
|
<label class="form-label" for="min_persons">min. Personen</span></label>
|
||||||
|
<select class="custom-select" data-style="btn-light" name="min_persons" id="min_persons">
|
||||||
|
<option value="">min. Personen</option>
|
||||||
|
{!! HTMLHelper::getRangeOptions($model->min_persons, 10, ' min.P.') !!}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-sm-4">
|
||||||
|
<label class="form-label" for="price_adult">Preis p.P. Erwachsender</span></label>
|
||||||
|
<div class="input-group">
|
||||||
|
<div class="input-group-prepend">
|
||||||
|
<span class="input-group-text">€</span>
|
||||||
|
</div>
|
||||||
|
{{ Form::text('price_adult', $model->price_adult, array('placeholder'=>__('Preis in €'), 'class'=>'form-control', 'id'=>'price_adult',)) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-sm-4">
|
||||||
|
<label class="form-label" for="price_children">Preis p.P. Kinder</span></label>
|
||||||
|
<div class="input-group">
|
||||||
|
<div class="input-group-prepend">
|
||||||
|
<span class="input-group-text">€</span>
|
||||||
|
</div>
|
||||||
|
{{ Form::text('price_children', $model->price_children, array('placeholder'=>__('Preis in €'), 'class'=>'form-control', 'id'=>'price_children',)) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-row">
|
||||||
|
<div class="form-group col-sm-4">
|
||||||
|
<label class="form-label" for="price_adult">Dauer in Tagen</span></label>
|
||||||
|
<select class="selectpicker" data-style="btn-light" name="days_duration" id="days_duration">
|
||||||
|
<option value="">Dauer in Tagen</option>
|
||||||
|
{!! HTMLHelper::getRangeOptions($model->days_duration, 60, ' Tag:e') !!}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-sm-4">
|
||||||
|
<label class="form-label" for="price_adult">Starttag</span></label>
|
||||||
|
<select class="selectpicker" data-style="btn-light" name="days_start" id="days_start">
|
||||||
|
<option value="">Starttag</option>
|
||||||
|
{!! HTMLHelper::getRangeOptions($model->days_start, 60, ' Tag:e') !!}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-sm-4 pt-4">
|
||||||
|
<label class="switcher switcher-on-off">
|
||||||
|
{{ Form::hidden('active', 0) }}
|
||||||
|
{{ Form::checkbox('active', 1, $model->active, array('class'=>'switcher-input')) }}
|
||||||
|
<span class="switcher-indicator">
|
||||||
|
<span class="switcher-yes"></span>
|
||||||
|
<span class="switcher-no"></span>
|
||||||
|
</span>
|
||||||
|
<span class="switcher-label">sichtbar</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<hr>
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-sm-12 col-md-6">
|
||||||
|
<label class="form-label" for="description">Beschreibung</span></label>
|
||||||
|
{{ Form::textarea('description', $model->description, array('class'=>'form-control autoExpand', 'rows'=>2)) }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group col-sm-12 col-md-6">
|
||||||
|
<label class="form-label" for="highlights">Highlights</span></label>
|
||||||
|
{{ Form::textarea('highlights', $model->highlights, array('class'=>'form-control autoExpand', 'rows'=>2)) }}
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<hr>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h4>Reiseorte <span class="text-muted">für diesen Baustein</span></h4>
|
||||||
|
|
||||||
|
@if($model->id)
|
||||||
|
|
||||||
|
<div class="table-responsive" id="booking_files_table">
|
||||||
|
<table class="table table-striped table-sm">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th style="width: 2%;"> </th>
|
||||||
|
<th style="width: 6%;">{{__('POS')}}</th>
|
||||||
|
<th>Name</th>
|
||||||
|
<th>Beschreibung</th>
|
||||||
|
<th>Land</th>
|
||||||
|
<th> </th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
@if($model->i_q_travel_item_places)
|
||||||
|
@foreach($model->i_q_travel_item_places as $i_q_travel_item_place)
|
||||||
|
<tr>
|
||||||
|
<td class="not">
|
||||||
|
<button type="button" class="btn icon-btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-load-content"
|
||||||
|
data-id="{{$i_q_travel_item_place->id}}"
|
||||||
|
data-iq_travel_item_id="{{$model->id}}"
|
||||||
|
data-model="IQTravelItemPlace"
|
||||||
|
data-action="modal-iq_travel_item-place"
|
||||||
|
data-back="{{route('iq_travel_item_detail', [$model->id])}}"
|
||||||
|
data-url="{{ route('iq_travel_item_detail', [$model->id]) }}"
|
||||||
|
data-route="{{ route('modal_load') }}"><span class="fa fa-edit"></span></button>
|
||||||
|
</td>
|
||||||
|
<td>{{ $i_q_travel_item_place->pos }}</td>
|
||||||
|
<td>{{ $i_q_travel_item_place->travel_place->name }}</td>
|
||||||
|
<td>{{ $i_q_travel_item_place->travel_place->description }}</td>
|
||||||
|
<td>@if($i_q_travel_item_place->travel_place->travel_country){{ $i_q_travel_item_place->travel_place->travel_country->name }} @endif</td>
|
||||||
|
<td>
|
||||||
|
<a class="ml-2 btn btn-xs btn-danger" href="{{ route('iq_travel_item_delete', [$i_q_travel_item_place->id, 'i_q_travel_item_place']) }}" onclick="return confirm('{{__('Wirklich löschen?')}}');"><i class="fa fa-trash-alt"></i></a>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
@endforeach
|
||||||
|
@endif
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="text-right d-block w-100">
|
||||||
|
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-load-content"
|
||||||
|
data-id="new"
|
||||||
|
data-iq_travel_item_id="{{$model->id}}"
|
||||||
|
data-model="IQTravelItemPlace"
|
||||||
|
data-action="modal-iq_travel_item-place"
|
||||||
|
data-back="{{route('iq_travel_item_detail', [$model->id])}}"
|
||||||
|
data-url="{{ route('iq_travel_item_detail', [$model->id]) }}"
|
||||||
|
data-route="{{ route('modal_load') }}"><i class="ion ion-md-add-circle"></i> Reiseorte hinzufügen</button>
|
||||||
|
</div>
|
||||||
|
@else
|
||||||
|
<p><i>Der Baustein muss erst mit einem Name gespeichert werden.</i></p>
|
||||||
|
@endif
|
||||||
|
<div class="float-left small">Reiseorte bearbeiten / anlegen: <a href="{{ route('admin_settings_travel_places') }}">Einstellungen -> Reiseorte</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="text-left mt-3">
|
||||||
|
<button type="submit" name="action" value="saveAll" class="btn btn-submit">{{ __('save changes') }}</button>
|
||||||
|
<a href="{{route('iq_travel_items')}}" class="btn btn-default">{{ __('back') }}</a> </div>
|
||||||
|
{!! Form::close() !!}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@endsection
|
||||||
60
resources/views/iq/travel/item/index.blade.php
Normal file
60
resources/views/iq/travel/item/index.blade.php
Normal file
|
|
@ -0,0 +1,60 @@
|
||||||
|
@extends('layouts.layout-2')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
|
||||||
|
<h4 class="font-weight-bold py-3 mb-4">
|
||||||
|
Reisebausteine / Bausteine
|
||||||
|
</h4>
|
||||||
|
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-datatable table-responsive">
|
||||||
|
<table class="datatables-customer table table-striped table-bordered">
|
||||||
|
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th style="max-width: 60px;"> </th>
|
||||||
|
<th>{{__('Name')}}</th>
|
||||||
|
<th>{{__('Typ')}}</th>
|
||||||
|
<th>{{__('Land')}}</th>
|
||||||
|
<th>{{__('Ort(e)')}}</th>
|
||||||
|
<th>{{__('sichbar')}}</th>
|
||||||
|
<th style="max-width: 60px;"> </th>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="ml-3 mb-2">
|
||||||
|
<a href="{{ route('iq_travel_item_detail', ['new']) }}" class="btn btn-sm btn-primary">Neuen Reisebaustein anlegen</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$( document ).ready(function() {
|
||||||
|
$('.datatables-customer').dataTable({
|
||||||
|
"processing": true,
|
||||||
|
"serverSide": true,
|
||||||
|
"ajax": '{!! route('data_table_travel_items') !!}',
|
||||||
|
"order": [[ 1, "desc" ]],
|
||||||
|
"columns": [
|
||||||
|
{ data: 'action_edit', orderable: false, searchable: false},
|
||||||
|
{ data: 'name', name: 'name' },
|
||||||
|
{ data: 'draft_type', name: 'draft_type', orderable: false, searchable: false },
|
||||||
|
{ data: 'country', name: 'country', orderable: false, searchable: false },
|
||||||
|
{ data: 'trave_places', name: 'trave_places', orderable: false, searchable: false },
|
||||||
|
{ data: 'active', name: 'active' },
|
||||||
|
{ data: 'action_delete', orderable: false, searchable: false},
|
||||||
|
],
|
||||||
|
"bLengthChange": false,
|
||||||
|
"iDisplayLength": 100,
|
||||||
|
"language": {
|
||||||
|
"url": "/js/German.json"
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@endsection
|
||||||
56
resources/views/iq/travel/programm/index.blade.php
Normal file
56
resources/views/iq/travel/programm/index.blade.php
Normal file
|
|
@ -0,0 +1,56 @@
|
||||||
|
@extends('layouts.layout-2')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
|
||||||
|
<h4 class="font-weight-bold py-3 mb-4">
|
||||||
|
Reisebausteine / Programme
|
||||||
|
</h4>
|
||||||
|
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-datatable table-responsive">
|
||||||
|
<table class="datatables-customer table table-striped table-bordered">
|
||||||
|
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th style="max-width: 60px;"> </th>
|
||||||
|
<th>{{__('Name')}}</th>
|
||||||
|
<th>{{__('')}}</th>
|
||||||
|
<th>{{__('sichbar')}}</th>
|
||||||
|
<th style="max-width: 60px;"> </th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
</table>
|
||||||
|
In Umsetzung …
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="ml-3 mb-2">
|
||||||
|
<!-- <a href="{{ route('iq_travel_group_detail', ['new']) }}" class="btn btn-sm btn-primary">Neues Programm anlegen</a> -->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
/* $( document ).ready(function() {
|
||||||
|
$('.datatables-customer').dataTable({
|
||||||
|
"processing": true,
|
||||||
|
"serverSide": true,
|
||||||
|
"ajax": '{!! route('data_table_travel_programms') !!}',
|
||||||
|
"order": [[ 1, "desc" ]],
|
||||||
|
"columns": [
|
||||||
|
{ data: 'action_edit', orderable: false, searchable: false},
|
||||||
|
{ data: 'name', name: 'name' },
|
||||||
|
{ data: 'trave_items', name: 'trave_items', orderable: false, searchable: false },
|
||||||
|
{ data: 'active', name: 'active' },
|
||||||
|
{ data: 'action_delete', orderable: false, searchable: false},
|
||||||
|
],
|
||||||
|
"bLengthChange": false,
|
||||||
|
"iDisplayLength": 100,
|
||||||
|
"language": {
|
||||||
|
"url": "/js/German.json"
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});*/
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@endsection
|
||||||
|
|
@ -120,6 +120,33 @@
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
@if(Auth::user()->isPermission('crm-iq-tl'))
|
||||||
|
<li class="sidenav-item{{ Request::is(['iq/travel/*']) ? ' open' : '' }}">
|
||||||
|
<a href="javascript:void(0)" class="sidenav-link sidenav-toggle">
|
||||||
|
<i class="sidenav-icon ion ion-md-apps"></i>
|
||||||
|
<div>Reisebausteine</div>
|
||||||
|
</a>
|
||||||
|
<ul class="sidenav-menu">
|
||||||
|
@if(Auth::user()->isPermission('crm-iq-tl-pro'))
|
||||||
|
<li class="sidenav-item{{ Request::is(['iq/travel/programms', 'iq/travel/programm/*']) ? ' active' : '' }}">
|
||||||
|
<a href="{{ route('iq_travel_programms') }}" class="sidenav-link"><i class="sidenav-icon ion ion-md-airplane"></i><div>Programm</div></a>
|
||||||
|
</li>
|
||||||
|
@endif
|
||||||
|
@if(Auth::user()->isPermission('crm-iq-tl-gp'))
|
||||||
|
<li class="sidenav-item{{ Request::is(['iq/travel/groups', 'iq/travel/group/*']) ? ' active' : '' }}">
|
||||||
|
<a href="{{ route('iq_travel_groups') }}" class="sidenav-link"><i class="sidenav-icon ion ion-md-grid"></i><div>Gruppe</div></a>
|
||||||
|
</li>
|
||||||
|
@endif
|
||||||
|
@if(Auth::user()->isPermission('crm-iq-tl-it'))
|
||||||
|
<li class="sidenav-item{{ Request::is(['iq/travel/items', 'iq/travel/item/*']) ? ' active' : '' }}">
|
||||||
|
<a href="{{ route('iq_travel_items') }}" class="sidenav-link"><i class="sidenav-icon ion ion-md-cube"></i><div>Baustein</div></a>
|
||||||
|
</li>
|
||||||
|
@endif
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
@endif
|
||||||
|
|
||||||
@endif
|
@endif
|
||||||
@if(Auth::user()->isPermission('crm-old-cm'))
|
@if(Auth::user()->isPermission('crm-old-cm'))
|
||||||
<li class="sidenav-divider mb-1"></li>
|
<li class="sidenav-divider mb-1"></li>
|
||||||
|
|
@ -283,6 +310,11 @@
|
||||||
<a href="{{ route('admin_settings_travel_country') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-globe"></i><div>{{ __('Reiseländer') }}</div></a>
|
<a href="{{ route('admin_settings_travel_country') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-globe"></i><div>{{ __('Reiseländer') }}</div></a>
|
||||||
</li>
|
</li>
|
||||||
@endif
|
@endif
|
||||||
|
@if(Auth::user()->isPermission('sua-st-tpl'))
|
||||||
|
<li class="sidenav-item{{ Request::is('admin/settings/travel_places') ? ' active' : '' }} {{ Request::is('admin/settings/travel_place/*') ? ' active' : '' }}">
|
||||||
|
<a href="{{ route('admin_settings_travel_places') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-pin"></i><div>{{ __('Reiseorte') }}</div></a>
|
||||||
|
</li>
|
||||||
|
@endif
|
||||||
@if(Auth::user()->isPermission('sua-st-tp'))
|
@if(Auth::user()->isPermission('sua-st-tp'))
|
||||||
<li class="sidenav-item{{ Request::is('admin/settings/travel_program') ? ' active' : '' }}">
|
<li class="sidenav-item{{ Request::is('admin/settings/travel_program') ? ' active' : '' }}">
|
||||||
<a href="{{ route('admin_settings_travel_program') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-airplane"></i><div>{{ __('Reiseprogramme') }}</div></a>
|
<a href="{{ route('admin_settings_travel_program') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-airplane"></i><div>{{ __('Reiseprogramme') }}</div></a>
|
||||||
|
|
|
||||||
143
resources/views/settings/place/index.blade.php
Normal file
143
resources/views/settings/place/index.blade.php
Normal file
|
|
@ -0,0 +1,143 @@
|
||||||
|
@extends('layouts.layout-2')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<h4 class="font-weight-bold py-3 mb-1">
|
||||||
|
Reiseorte
|
||||||
|
</h4>
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-datatable table-responsive">
|
||||||
|
<table class="datatables-default table table-striped table-bordered">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th style="max-width: 60px;"> </th>
|
||||||
|
<th>{{__('Name')}}</th>
|
||||||
|
<th>{{__('Beschreibung')}}</th>
|
||||||
|
<th>{{__('Land')}}</th>
|
||||||
|
<th>{{__('Latitude')}}</th>
|
||||||
|
<th>{{__('Longitude')}}</th>
|
||||||
|
<th>{{__('sichtbar')}}</th>
|
||||||
|
<th></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
@foreach($travel_places as $value)
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<button type="button" class="btn icon-btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-default"
|
||||||
|
data-id="{{ $value->id }}"
|
||||||
|
data-name="{{ $value->name }}"
|
||||||
|
data-description="{{ $value->description }}"
|
||||||
|
data-travel_country_id="{{$value->travel_country_id}}"
|
||||||
|
data-latitude="{{ $value->latitude }}"
|
||||||
|
data-longitude="{{ $value->longitude }}"
|
||||||
|
data-active="{{ $value->active }}">
|
||||||
|
<span class="fa fa-edit"></span>
|
||||||
|
</button>
|
||||||
|
</td>
|
||||||
|
<td data-sort="{{ $value->name }}">{{ $value->name }}</td>
|
||||||
|
<td data-sort="{{ $value->description }}">{{ $value->description }}</td>
|
||||||
|
<td data-sort="{{ $value->travel_country->name }}">{{ $value->travel_country->name }}</td>
|
||||||
|
<td data-sort="{{ $value->latitude }}">{{ $value->latitude }}</td>
|
||||||
|
<td data-sort="{{ $value->longitude }}">{{ $value->longitude }}</td>
|
||||||
|
<td data-sort="{{ $value->active }}">{!! get_active_badge($value->active) !!}</td>
|
||||||
|
<td><a class="text-danger" href="{{ route('admin_settings_travel_place_delete', [$value->id]) }}" onclick="return confirm('{{__('Wirklich löschen?')}}');"><i class="fa fa-trash-alt"></i></a></td>
|
||||||
|
</tr>
|
||||||
|
@endforeach
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<div class="mt-4 col">
|
||||||
|
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-default"
|
||||||
|
data-id="new"
|
||||||
|
data-name=""
|
||||||
|
data-description=""
|
||||||
|
data-travel_country_id="0"
|
||||||
|
data-latitude=""
|
||||||
|
data-longitude=""
|
||||||
|
data-active="1"
|
||||||
|
>Neuen Reiseort anlegen</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- Modal template -->
|
||||||
|
<div class="modal fade" id="modals-default">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
<form class="modal-content" action="{{ route('admin_settings_travel_place_update') }}" method="post">
|
||||||
|
@csrf
|
||||||
|
<input type="hidden" class="form-control" name="id">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h5 class="modal-title">Reiseort <span class="font-weight-light">anlegen/bearbeiten</span></h5>
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<div class="form-row">
|
||||||
|
<div class="form-group col">
|
||||||
|
<label for="name" class="form-label">Name*</label>
|
||||||
|
<input type="text" class="form-control" name="name" placeholder="{{__('Name')}}" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="travel_country_id" class="form-label">{{__('Land')}}*</label>
|
||||||
|
<select class="selectpicker" data-style="btn-default" name="travel_country_id" data-live-search="true" required>
|
||||||
|
{!! HTMLHelper::getTravelCountriesOptions(false, false) !!}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="form-row">
|
||||||
|
<div class="form-group col">
|
||||||
|
<label for="description" class="form-label">Beschreibung</label>
|
||||||
|
<textarea class="form-control" rows="2" name="description"></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-row">
|
||||||
|
<div class="form-group col">
|
||||||
|
<label for="latitude" class="form-label">Latitude</label>
|
||||||
|
<input type="text" class="form-control" name="latitude" placeholder="{{__('latitude')}}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-row">
|
||||||
|
<div class="form-group col">
|
||||||
|
<label for="longitude" class="form-label">Longitude</label>
|
||||||
|
<input type="text" class="form-control" name="longitude" placeholder="{{__('longitude')}}">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="custom-control custom-checkbox m-0">
|
||||||
|
<input class="custom-control-input" name="active" type="checkbox" value="1">
|
||||||
|
<span class="custom-control-label">sichtbar</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button type="button" class="btn btn-default" data-dismiss="modal">{{__('close')}}</button>
|
||||||
|
<button type="submit" class="btn btn-primary">{{__('save')}}</button>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$( document ).ready(function() {
|
||||||
|
|
||||||
|
$('#modals-default').on('show.bs.modal', function (event) {
|
||||||
|
var button = $(event.relatedTarget);
|
||||||
|
$(this).find(".modal-content input[name='id']").val(button.data('id'));
|
||||||
|
$(this).find(".modal-body input[name='name']").val(button.data('name'));
|
||||||
|
$(this).find(".modal-body input[name='slug']").val(button.data('slug'));
|
||||||
|
$(this).find(".modal-body input[name='identifier']").val(button.data('identifier'));
|
||||||
|
$(this).find(".modal-body input[name='pos']").val(button.data('pos'));
|
||||||
|
$(this).find(".modal-body input[name='active']").prop( "checked", button.data('active'));
|
||||||
|
$(this).find(".modal-body select[name='travel_country_id']").val(button.data('travel_country_id'));
|
||||||
|
$('.selectpicker').selectpicker('refresh');
|
||||||
|
});
|
||||||
|
$('.datatables-default').dataTable({
|
||||||
|
"bLengthChange": false,
|
||||||
|
"iDisplayLength": 50,
|
||||||
|
"order": [[ 1, "asc" ]],
|
||||||
|
"language": {
|
||||||
|
"url": "/js/German.json"
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
@endsection
|
||||||
|
|
@ -248,6 +248,29 @@ Route::group(['middleware' => ['admin']], function()
|
||||||
Route::post('travel_user_booking_fewo/ajax/requests', 'TravelUserBookingFewoController@getAjaxRequests')->name('travel_user_booking_fewo_ajax_requests');
|
Route::post('travel_user_booking_fewo/ajax/requests', 'TravelUserBookingFewoController@getAjaxRequests')->name('travel_user_booking_fewo_ajax_requests');
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Route::group(['middleware' => ['auth.permission:crm-iq-tl']], function() {
|
||||||
|
//Reisebausteine
|
||||||
|
Route::get('/iq/travel/programms', 'IQ\TravelProgrammController@index')->name('iq_travel_programms');
|
||||||
|
Route::get('/iq/travel/programm/detail/{id}', 'IQ\TravelProgrammController@detail')->name('iq_travel_programm_detail');
|
||||||
|
|
||||||
|
Route::get('/iq/travel/groups', 'IQ\TravelGroupController@index')->name('iq_travel_groups');
|
||||||
|
Route::get('/iq/travel/group/detail/{id?}', 'IQ\TravelGroupController@detail')->name('iq_travel_group_detail');
|
||||||
|
Route::post('/iq/travel/group/detail/{id?}', 'IQ\TravelGroupController@store')->name('iq_travel_group_detail');
|
||||||
|
Route::get('/iq/travel/group/delete/{id?}/{del?}', 'IQ\TravelGroupController@delete')->name('iq_travel_group_delete');
|
||||||
|
|
||||||
|
|
||||||
|
Route::get('/iq/travel/items', 'IQ\TravelItemController@index')->name('iq_travel_items');
|
||||||
|
Route::get('/iq/travel/item/detail/{id?}', 'IQ\TravelItemController@detail')->name('iq_travel_item_detail');
|
||||||
|
Route::post('/iq/travel/item/detail/{id?}', 'IQ\TravelItemController@store')->name('iq_travel_item_detail');
|
||||||
|
Route::get('/iq/travel/item/delete/{id?}/{del?}', 'IQ\TravelItemController@delete')->name('iq_travel_item_delete');
|
||||||
|
|
||||||
|
Route::get('/iq/travel/programm/data_table', 'IQ\TravelProgrammController@data_table')->name('data_table_travel_programms');
|
||||||
|
Route::get('/iq/travel/group/data_table', 'IQ\TravelGroupController@getTravelGroups')->name('data_table_travel_groups');
|
||||||
|
Route::get('/iq/travel/items/data_table', 'IQ\TravelItemController@getTravelItems')->name('data_table_travel_items');
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
Route::group(['middleware' => ['auth.permission:cms-cn-in']], function() {
|
Route::group(['middleware' => ['auth.permission:cms-cn-in']], function() {
|
||||||
//CMS Infos
|
//CMS Infos
|
||||||
Route::get('/cms/content/infos', 'CMS\CMSContentInfoController@index')->name('cms_content_infos');
|
Route::get('/cms/content/infos', 'CMS\CMSContentInfoController@index')->name('cms_content_infos');
|
||||||
|
|
@ -370,6 +393,13 @@ Route::group(['middleware' => ['superadmin']], function() {
|
||||||
Route::post('/admin/settings/travel_program/update', 'Settings\TravelAgendaController@update')->name('admin_settings_travel_program_update');
|
Route::post('/admin/settings/travel_program/update', 'Settings\TravelAgendaController@update')->name('admin_settings_travel_program_update');
|
||||||
Route::get('/admin/settings/travel_program/delete/{id}', 'Settings\TravelAgendaController@delete')->name('admin_settings_travel_program_delete');
|
Route::get('/admin/settings/travel_program/delete/{id}', 'Settings\TravelAgendaController@delete')->name('admin_settings_travel_program_delete');
|
||||||
});
|
});
|
||||||
|
Route::group(['middleware' => ['auth.permission:sua-st-tpl']], function() {
|
||||||
|
//SUPERADMIN > Einstellungen > Reiseorte
|
||||||
|
Route::get('/admin/settings/travel_places', 'Settings\TravelPlaceController@index')->name('admin_settings_travel_places');
|
||||||
|
Route::post('/admin/settings/travel_place/update', 'Settings\TravelPlaceController@update')->name('admin_settings_travel_place_update');
|
||||||
|
Route::get('/admin/settings/travel_place/delete/{id}', 'Settings\TravelPlaceController@delete')->name('admin_settings_travel_place_delete');
|
||||||
|
});
|
||||||
|
|
||||||
Route::group(['middleware' => ['auth.permission:sua-st-bs']], function() {
|
Route::group(['middleware' => ['auth.permission:sua-st-bs']], function() {
|
||||||
//SUPERADMIN > Einstellungen > Reisestatus
|
//SUPERADMIN > Einstellungen > Reisestatus
|
||||||
Route::get('/admin/settings/booking_status', 'Settings\BookingStatusController@index')->name('admin_settings_booking_status');
|
Route::get('/admin/settings/booking_status', 'Settings\BookingStatusController@index')->name('admin_settings_booking_status');
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue