Fewos in CRM,
Fewo Clients Bookings create / edit / delelte via API in DB
This commit is contained in:
parent
aebfb0586a
commit
c0c2a1822c
55 changed files with 9787 additions and 1486 deletions
20
.idea/dataSources.local.xml
generated
20
.idea/dataSources.local.xml
generated
|
|
@ -1,8 +1,24 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="dataSourceStorageLocal">
|
<component name="dataSourceStorageLocal">
|
||||||
<data-source name="cmssso_db1@192.168.1.7" uuid="518aec94-6998-4ffd-beef-24607063526e">
|
<data-source name="cmssso_db1@192.168.1.7" uuid="f7aaeef3-b8e1-45ca-9f6a-b9476048d5dd">
|
||||||
<database-info product="" version="" jdbc-version="" driver-name="" driver-version="" dbms="MYSQL" exact-version="0.0" />
|
<database-info product="MySQL" version="5.6.39" jdbc-version="4.0" driver-name="MySQL Connector Java" driver-version="mysql-connector-java-5.1.46 ( Revision: 9cc87a48e75c2d2e87c1a293b2862ce651cb256e )" dbms="MYSQL" exact-version="5.6.39" exact-driver-version="5.1">
|
||||||
|
<extra-name-characters>#@</extra-name-characters>
|
||||||
|
<identifier-quote-string>`</identifier-quote-string>
|
||||||
|
</database-info>
|
||||||
|
<case-sensitivity plain-identifiers="mixed" quoted-identifiers="mixed" />
|
||||||
|
<secret-storage>master_key</secret-storage>
|
||||||
|
<user-name>cmssso_1</user-name>
|
||||||
|
<introspection-schemas>*:@</introspection-schemas>
|
||||||
|
</data-source>
|
||||||
|
<data-source name="sterntours@localhost" uuid="09ce12d1-7f68-4ce4-9ab1-0229d6366fdb">
|
||||||
|
<database-info product="MySQL" version="5.7.25" jdbc-version="4.0" driver-name="MySQL Connector Java" driver-version="mysql-connector-java-5.1.46 ( Revision: 9cc87a48e75c2d2e87c1a293b2862ce651cb256e )" dbms="MYSQL" exact-version="5.7.25" exact-driver-version="5.1">
|
||||||
|
<extra-name-characters>#@</extra-name-characters>
|
||||||
|
<identifier-quote-string>`</identifier-quote-string>
|
||||||
|
</database-info>
|
||||||
|
<case-sensitivity plain-identifiers="mixed" quoted-identifiers="mixed" />
|
||||||
|
<secret-storage>master_key</secret-storage>
|
||||||
|
<user-name>root</user-name>
|
||||||
<introspection-schemas>*:@</introspection-schemas>
|
<introspection-schemas>*:@</introspection-schemas>
|
||||||
</data-source>
|
</data-source>
|
||||||
</component>
|
</component>
|
||||||
|
|
|
||||||
16
.idea/dataSources.xml
generated
16
.idea/dataSources.xml
generated
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
|
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
|
||||||
<data-source source="LOCAL" name="cmssso_db1@192.168.1.7" uuid="518aec94-6998-4ffd-beef-24607063526e">
|
<data-source source="LOCAL" name="cmssso_db1@192.168.1.7" uuid="f7aaeef3-b8e1-45ca-9f6a-b9476048d5dd">
|
||||||
<driver-ref>mysql</driver-ref>
|
<driver-ref>mysql</driver-ref>
|
||||||
<synchronize>true</synchronize>
|
<synchronize>true</synchronize>
|
||||||
<jdbc-driver>com.mysql.jdbc.Driver</jdbc-driver>
|
<jdbc-driver>com.mysql.jdbc.Driver</jdbc-driver>
|
||||||
|
|
@ -15,5 +15,19 @@
|
||||||
<property name="yearIsDateType" value="false" />
|
<property name="yearIsDateType" value="false" />
|
||||||
</driver-properties>
|
</driver-properties>
|
||||||
</data-source>
|
</data-source>
|
||||||
|
<data-source source="LOCAL" name="sterntours@localhost" uuid="09ce12d1-7f68-4ce4-9ab1-0229d6366fdb">
|
||||||
|
<driver-ref>mysql</driver-ref>
|
||||||
|
<synchronize>true</synchronize>
|
||||||
|
<jdbc-driver>com.mysql.jdbc.Driver</jdbc-driver>
|
||||||
|
<jdbc-url>jdbc:mysql://localhost:3306/sterntours</jdbc-url>
|
||||||
|
<driver-properties>
|
||||||
|
<property name="autoReconnect" value="true" />
|
||||||
|
<property name="zeroDateTimeBehavior" value="convertToNull" />
|
||||||
|
<property name="tinyInt1isBit" value="false" />
|
||||||
|
<property name="characterEncoding" value="utf8" />
|
||||||
|
<property name="characterSetResults" value="utf8" />
|
||||||
|
<property name="yearIsDateType" value="false" />
|
||||||
|
</driver-properties>
|
||||||
|
</data-source>
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
||||||
4763
.idea/dataSources/09ce12d1-7f68-4ce4-9ab1-0229d6366fdb.xml
generated
Normal file
4763
.idea/dataSources/09ce12d1-7f68-4ce4-9ab1-0229d6366fdb.xml
generated
Normal file
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
1
.idea/mein.sterntours.iml
generated
1
.idea/mein.sterntours.iml
generated
|
|
@ -16,6 +16,7 @@
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/league/event" />
|
<excludeFolder url="file://$MODULE_DIR$/vendor/league/event" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/league/oauth2-server" />
|
<excludeFolder url="file://$MODULE_DIR$/vendor/league/oauth2-server" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/phpseclib/phpseclib" />
|
<excludeFolder url="file://$MODULE_DIR$/vendor/phpseclib/phpseclib" />
|
||||||
|
<excludeFolder url="file://$MODULE_DIR$/vendor/reliese/laravel" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/psr-http-message-bridge" />
|
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/psr-http-message-bridge" />
|
||||||
<excludeFolder url="file://$MODULE_DIR$/vendor/zendframework/zend-diactoros" />
|
<excludeFolder url="file://$MODULE_DIR$/vendor/zendframework/zend-diactoros" />
|
||||||
</content>
|
</content>
|
||||||
|
|
|
||||||
1
.idea/php.xml
generated
1
.idea/php.xml
generated
|
|
@ -108,6 +108,7 @@
|
||||||
<path value="$PROJECT_DIR$/vendor/laravel/passport" />
|
<path value="$PROJECT_DIR$/vendor/laravel/passport" />
|
||||||
<path value="$PROJECT_DIR$/vendor/cviebrock/eloquent-sluggable" />
|
<path value="$PROJECT_DIR$/vendor/cviebrock/eloquent-sluggable" />
|
||||||
<path value="$PROJECT_DIR$/vendor/cocur/slugify" />
|
<path value="$PROJECT_DIR$/vendor/cocur/slugify" />
|
||||||
|
<path value="$PROJECT_DIR$/vendor/reliese/laravel" />
|
||||||
</include_path>
|
</include_path>
|
||||||
</component>
|
</component>
|
||||||
<component name="PhpProjectSharedConfiguration" php_language_level="7.1" />
|
<component name="PhpProjectSharedConfiguration" php_language_level="7.1" />
|
||||||
|
|
|
||||||
961
.idea/workspace.xml
generated
961
.idea/workspace.xml
generated
File diff suppressed because it is too large
Load diff
|
|
@ -5,7 +5,7 @@ namespace PHPSTORM_META {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PhpStorm Meta file, to provide autocomplete information for PhpStorm
|
* PhpStorm Meta file, to provide autocomplete information for PhpStorm
|
||||||
* Generated on 2019-03-11 10:10:35.
|
* Generated on 2019-03-21 14:09:21.
|
||||||
*
|
*
|
||||||
* @author Barry vd. Heuvel <barryvdh@gmail.com>
|
* @author Barry vd. Heuvel <barryvdh@gmail.com>
|
||||||
* @see https://github.com/barryvdh/laravel-ide-helper
|
* @see https://github.com/barryvdh/laravel-ide-helper
|
||||||
|
|
@ -37,6 +37,7 @@ namespace PHPSTORM_META {
|
||||||
'NunoMaduro\Collision\Contracts\Provider' => \NunoMaduro\Collision\Provider::class,
|
'NunoMaduro\Collision\Contracts\Provider' => \NunoMaduro\Collision\Provider::class,
|
||||||
'Psr\Http\Message\ResponseInterface' => \Zend\Diactoros\Response::class,
|
'Psr\Http\Message\ResponseInterface' => \Zend\Diactoros\Response::class,
|
||||||
'Psr\Http\Message\ServerRequestInterface' => \Zend\Diactoros\ServerRequest::class,
|
'Psr\Http\Message\ServerRequestInterface' => \Zend\Diactoros\ServerRequest::class,
|
||||||
|
'Reliese\Coders\Model\Factory' => \Reliese\Coders\Model\Factory::class,
|
||||||
'auth' => \Illuminate\Auth\AuthManager::class,
|
'auth' => \Illuminate\Auth\AuthManager::class,
|
||||||
'auth.driver' => \Illuminate\Auth\SessionGuard::class,
|
'auth.driver' => \Illuminate\Auth\SessionGuard::class,
|
||||||
'auth.password' => \Illuminate\Auth\Passwords\PasswordBrokerManager::class,
|
'auth.password' => \Illuminate\Auth\Passwords\PasswordBrokerManager::class,
|
||||||
|
|
@ -193,6 +194,7 @@ namespace PHPSTORM_META {
|
||||||
'NunoMaduro\Collision\Contracts\Provider' => \NunoMaduro\Collision\Provider::class,
|
'NunoMaduro\Collision\Contracts\Provider' => \NunoMaduro\Collision\Provider::class,
|
||||||
'Psr\Http\Message\ResponseInterface' => \Zend\Diactoros\Response::class,
|
'Psr\Http\Message\ResponseInterface' => \Zend\Diactoros\Response::class,
|
||||||
'Psr\Http\Message\ServerRequestInterface' => \Zend\Diactoros\ServerRequest::class,
|
'Psr\Http\Message\ServerRequestInterface' => \Zend\Diactoros\ServerRequest::class,
|
||||||
|
'Reliese\Coders\Model\Factory' => \Reliese\Coders\Model\Factory::class,
|
||||||
'auth' => \Illuminate\Auth\AuthManager::class,
|
'auth' => \Illuminate\Auth\AuthManager::class,
|
||||||
'auth.driver' => \Illuminate\Auth\SessionGuard::class,
|
'auth.driver' => \Illuminate\Auth\SessionGuard::class,
|
||||||
'auth.password' => \Illuminate\Auth\Passwords\PasswordBrokerManager::class,
|
'auth.password' => \Illuminate\Auth\Passwords\PasswordBrokerManager::class,
|
||||||
|
|
@ -349,6 +351,7 @@ namespace PHPSTORM_META {
|
||||||
'NunoMaduro\Collision\Contracts\Provider' => \NunoMaduro\Collision\Provider::class,
|
'NunoMaduro\Collision\Contracts\Provider' => \NunoMaduro\Collision\Provider::class,
|
||||||
'Psr\Http\Message\ResponseInterface' => \Zend\Diactoros\Response::class,
|
'Psr\Http\Message\ResponseInterface' => \Zend\Diactoros\Response::class,
|
||||||
'Psr\Http\Message\ServerRequestInterface' => \Zend\Diactoros\ServerRequest::class,
|
'Psr\Http\Message\ServerRequestInterface' => \Zend\Diactoros\ServerRequest::class,
|
||||||
|
'Reliese\Coders\Model\Factory' => \Reliese\Coders\Model\Factory::class,
|
||||||
'auth' => \Illuminate\Auth\AuthManager::class,
|
'auth' => \Illuminate\Auth\AuthManager::class,
|
||||||
'auth.driver' => \Illuminate\Auth\SessionGuard::class,
|
'auth.driver' => \Illuminate\Auth\SessionGuard::class,
|
||||||
'auth.password' => \Illuminate\Auth\Passwords\PasswordBrokerManager::class,
|
'auth.password' => \Illuminate\Auth\Passwords\PasswordBrokerManager::class,
|
||||||
|
|
@ -505,6 +508,7 @@ namespace PHPSTORM_META {
|
||||||
'NunoMaduro\Collision\Contracts\Provider' => \NunoMaduro\Collision\Provider::class,
|
'NunoMaduro\Collision\Contracts\Provider' => \NunoMaduro\Collision\Provider::class,
|
||||||
'Psr\Http\Message\ResponseInterface' => \Zend\Diactoros\Response::class,
|
'Psr\Http\Message\ResponseInterface' => \Zend\Diactoros\Response::class,
|
||||||
'Psr\Http\Message\ServerRequestInterface' => \Zend\Diactoros\ServerRequest::class,
|
'Psr\Http\Message\ServerRequestInterface' => \Zend\Diactoros\ServerRequest::class,
|
||||||
|
'Reliese\Coders\Model\Factory' => \Reliese\Coders\Model\Factory::class,
|
||||||
'auth' => \Illuminate\Auth\AuthManager::class,
|
'auth' => \Illuminate\Auth\AuthManager::class,
|
||||||
'auth.driver' => \Illuminate\Auth\SessionGuard::class,
|
'auth.driver' => \Illuminate\Auth\SessionGuard::class,
|
||||||
'auth.password' => \Illuminate\Auth\Passwords\PasswordBrokerManager::class,
|
'auth.password' => \Illuminate\Auth\Passwords\PasswordBrokerManager::class,
|
||||||
|
|
@ -661,6 +665,7 @@ namespace PHPSTORM_META {
|
||||||
'NunoMaduro\Collision\Contracts\Provider' => \NunoMaduro\Collision\Provider::class,
|
'NunoMaduro\Collision\Contracts\Provider' => \NunoMaduro\Collision\Provider::class,
|
||||||
'Psr\Http\Message\ResponseInterface' => \Zend\Diactoros\Response::class,
|
'Psr\Http\Message\ResponseInterface' => \Zend\Diactoros\Response::class,
|
||||||
'Psr\Http\Message\ServerRequestInterface' => \Zend\Diactoros\ServerRequest::class,
|
'Psr\Http\Message\ServerRequestInterface' => \Zend\Diactoros\ServerRequest::class,
|
||||||
|
'Reliese\Coders\Model\Factory' => \Reliese\Coders\Model\Factory::class,
|
||||||
'auth' => \Illuminate\Auth\AuthManager::class,
|
'auth' => \Illuminate\Auth\AuthManager::class,
|
||||||
'auth.driver' => \Illuminate\Auth\SessionGuard::class,
|
'auth.driver' => \Illuminate\Auth\SessionGuard::class,
|
||||||
'auth.password' => \Illuminate\Auth\Passwords\PasswordBrokerManager::class,
|
'auth.password' => \Illuminate\Auth\Passwords\PasswordBrokerManager::class,
|
||||||
|
|
@ -817,6 +822,7 @@ namespace PHPSTORM_META {
|
||||||
'NunoMaduro\Collision\Contracts\Provider' => \NunoMaduro\Collision\Provider::class,
|
'NunoMaduro\Collision\Contracts\Provider' => \NunoMaduro\Collision\Provider::class,
|
||||||
'Psr\Http\Message\ResponseInterface' => \Zend\Diactoros\Response::class,
|
'Psr\Http\Message\ResponseInterface' => \Zend\Diactoros\Response::class,
|
||||||
'Psr\Http\Message\ServerRequestInterface' => \Zend\Diactoros\ServerRequest::class,
|
'Psr\Http\Message\ServerRequestInterface' => \Zend\Diactoros\ServerRequest::class,
|
||||||
|
'Reliese\Coders\Model\Factory' => \Reliese\Coders\Model\Factory::class,
|
||||||
'auth' => \Illuminate\Auth\AuthManager::class,
|
'auth' => \Illuminate\Auth\AuthManager::class,
|
||||||
'auth.driver' => \Illuminate\Auth\SessionGuard::class,
|
'auth.driver' => \Illuminate\Auth\SessionGuard::class,
|
||||||
'auth.password' => \Illuminate\Auth\Passwords\PasswordBrokerManager::class,
|
'auth.password' => \Illuminate\Auth\Passwords\PasswordBrokerManager::class,
|
||||||
|
|
@ -973,6 +979,7 @@ namespace PHPSTORM_META {
|
||||||
'NunoMaduro\Collision\Contracts\Provider' => \NunoMaduro\Collision\Provider::class,
|
'NunoMaduro\Collision\Contracts\Provider' => \NunoMaduro\Collision\Provider::class,
|
||||||
'Psr\Http\Message\ResponseInterface' => \Zend\Diactoros\Response::class,
|
'Psr\Http\Message\ResponseInterface' => \Zend\Diactoros\Response::class,
|
||||||
'Psr\Http\Message\ServerRequestInterface' => \Zend\Diactoros\ServerRequest::class,
|
'Psr\Http\Message\ServerRequestInterface' => \Zend\Diactoros\ServerRequest::class,
|
||||||
|
'Reliese\Coders\Model\Factory' => \Reliese\Coders\Model\Factory::class,
|
||||||
'auth' => \Illuminate\Auth\AuthManager::class,
|
'auth' => \Illuminate\Auth\AuthManager::class,
|
||||||
'auth.driver' => \Illuminate\Auth\SessionGuard::class,
|
'auth.driver' => \Illuminate\Auth\SessionGuard::class,
|
||||||
'auth.password' => \Illuminate\Auth\Passwords\PasswordBrokerManager::class,
|
'auth.password' => \Illuminate\Auth\Passwords\PasswordBrokerManager::class,
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A helper file for Laravel 5, to provide autocomplete information to your IDE
|
* A helper file for Laravel 5, to provide autocomplete information to your IDE
|
||||||
* Generated for Laravel 5.6.39 on 2019-03-11 10:10:35.
|
* Generated for Laravel 5.6.39 on 2019-03-21 14:09:21.
|
||||||
*
|
*
|
||||||
* This file should not be included in your code, only analyzed by your IDE!
|
* This file should not be included in your code, only analyzed by your IDE!
|
||||||
*
|
*
|
||||||
|
|
|
||||||
104
app/Http/Controllers/API/FewoController.php
Executable file
104
app/Http/Controllers/API/FewoController.php
Executable file
|
|
@ -0,0 +1,104 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers\API;
|
||||||
|
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use App\Models\BookingDraftItem;
|
||||||
|
use App\Models\TravelUser;
|
||||||
|
use App\Models\TravelUserBookingFewo;
|
||||||
|
use Carbon\Carbon;
|
||||||
|
use Validator;
|
||||||
|
|
||||||
|
class FewoController extends Controller
|
||||||
|
{
|
||||||
|
public $successStatus = 200;
|
||||||
|
public $errorStatus = 500;
|
||||||
|
public $data = "";
|
||||||
|
public $room_str = "";
|
||||||
|
public $room_name = "";
|
||||||
|
public $className = "";
|
||||||
|
public $option = "";
|
||||||
|
|
||||||
|
public function action($action)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if ($action == "create_travel_users") {
|
||||||
|
$data = \Input::all();
|
||||||
|
if(!isset($data['travel_user']) && !is_array($data['travel_user'])) {
|
||||||
|
return response()->json(['error' => 'travel_user not exist, but need'], $this->errorStatus);
|
||||||
|
}
|
||||||
|
if(!isset($data['travel_user']['email'])){
|
||||||
|
return response()->json(['error' => 'travel_user email not exist, but need'], $this->errorStatus);
|
||||||
|
}
|
||||||
|
|
||||||
|
$rules = array(
|
||||||
|
'salutation_id' => 'required',
|
||||||
|
'travel_nationality_id' => 'required',
|
||||||
|
'first_name'=>'required',
|
||||||
|
'last_name'=>'required',
|
||||||
|
'email' => 'required|string|email|max:255|'
|
||||||
|
|
||||||
|
);
|
||||||
|
$validator = Validator::make($data['travel_user'], $rules);
|
||||||
|
if ($validator->fails()) {
|
||||||
|
return response()->json($validator->messages(), $this->errorStatus);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
$travel_user = TravelUser::where('email', trim($data['travel_user']['email']))->first();
|
||||||
|
if(!$travel_user) {
|
||||||
|
$travel_user = TravelUser::create($data['travel_user']);
|
||||||
|
}else{
|
||||||
|
$checked = [
|
||||||
|
'salutation_id',
|
||||||
|
'first_name',
|
||||||
|
'last_name',
|
||||||
|
'street',
|
||||||
|
'zipcode',
|
||||||
|
'city',
|
||||||
|
'phone',
|
||||||
|
'fax',
|
||||||
|
'travel_nationality_id'
|
||||||
|
];
|
||||||
|
|
||||||
|
$last_user_data = [];
|
||||||
|
foreach ($checked as $check){
|
||||||
|
if($travel_user->{$check} != $data['travel_user'][$check]){
|
||||||
|
$last_user_data[$check] = $travel_user->{$check};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$data['travel_user']['last_user_data'] = $last_user_data;
|
||||||
|
$travel_user->fill($data['travel_user'])->save();
|
||||||
|
}
|
||||||
|
return response()->json(['success' => ['travel_user_id' => $travel_user->id]], $this->successStatus);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if ($action == "create_fewo_booking") {
|
||||||
|
|
||||||
|
$data = \Input::all();
|
||||||
|
if(!isset($data['travel_user_booking_fewo']) && !is_array($data['travel_user_booking_fewo'])) {
|
||||||
|
return response()->json(['error' => 'travel_user_booking_fewo not exist, but need'], $this->errorStatus);
|
||||||
|
}
|
||||||
|
$rules = array(
|
||||||
|
'travel_user_id' => 'required',
|
||||||
|
'fewo_lodging_id' => 'required',
|
||||||
|
'from_date'=>'required',
|
||||||
|
'to_date'=>'required',
|
||||||
|
|
||||||
|
);
|
||||||
|
$validator = Validator::make($data['travel_user_booking_fewo'], $rules);
|
||||||
|
if ($validator->fails()) {
|
||||||
|
return response()->json($validator->messages(), $this->errorStatus);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
$travel_user_booking_fewo = TravelUserBookingFewo::create($data['travel_user_booking_fewo']);
|
||||||
|
|
||||||
|
return response()->json(['success' => ['travel_user_booking_fewo_id' => $travel_user_booking_fewo->id, 'crm_url' => route('travel_user_booking_fewo_detail', [$travel_user_booking_fewo->id])]], $this->successStatus);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
131
app/Http/Controllers/TravelUserBookingFewoController.php
Executable file
131
app/Http/Controllers/TravelUserBookingFewoController.php
Executable file
|
|
@ -0,0 +1,131 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
|
||||||
|
use App\Models\FewoReservation;
|
||||||
|
use App\Models\TravelUser;
|
||||||
|
use App\Models\TravelUserBookingFewo;
|
||||||
|
use Input;
|
||||||
|
use Validator;
|
||||||
|
|
||||||
|
class TravelUserBookingFewoController extends Controller
|
||||||
|
{
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->middleware('admin');
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public function index($step = false)
|
||||||
|
{
|
||||||
|
$data = [
|
||||||
|
'step' => $step
|
||||||
|
];
|
||||||
|
return view('travel.user.booking.index', $data);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public function detail($id)
|
||||||
|
{
|
||||||
|
if($id == "new") {
|
||||||
|
$travel_user_booking_fewo = new TravelUserBookingFewo();
|
||||||
|
$id = 'new';
|
||||||
|
|
||||||
|
}else{
|
||||||
|
$travel_user_booking_fewo = TravelUserBookingFewo::findOrFail($id);
|
||||||
|
$id = $travel_user_booking_fewo->id;
|
||||||
|
}
|
||||||
|
$data = [
|
||||||
|
'travel_user_booking_fewo' => $travel_user_booking_fewo,
|
||||||
|
'id' => $id,
|
||||||
|
];
|
||||||
|
return view('travel.user.booking.detail', $data);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public function store($id)
|
||||||
|
{
|
||||||
|
$data = Input::all();
|
||||||
|
|
||||||
|
|
||||||
|
$rules = array(
|
||||||
|
'travel_user_id' => 'required',
|
||||||
|
'fewo_lodging_id' => 'required',
|
||||||
|
'from_date'=>'required',
|
||||||
|
'to_date'=>'required',
|
||||||
|
'travel_booking_fewo_channel_id' => 'required',
|
||||||
|
'status' => 'required'
|
||||||
|
|
||||||
|
);
|
||||||
|
|
||||||
|
$validator = Validator::make(Input::all(), $rules);
|
||||||
|
|
||||||
|
if ($validator->fails()) {
|
||||||
|
return back()->withInput(Input::all())->withErrors($validator);
|
||||||
|
}
|
||||||
|
|
||||||
|
if($id == "new") {
|
||||||
|
$model = TravelUserBookingFewo::create($data);
|
||||||
|
}else{
|
||||||
|
$model = TravelUserBookingFewo::findOrFail($id);
|
||||||
|
$model->fill($data)->save();
|
||||||
|
}
|
||||||
|
|
||||||
|
\Session()->flash('alert-save', '1');
|
||||||
|
return redirect(route('travel_user_booking_fewo_detail', [$model->id]));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public function delete($id){
|
||||||
|
$model = TravelUserBookingFewo::findOrFail($id);
|
||||||
|
$FewoReservations = FewoReservation::where('lodging_id', $model->fewo_lodging_id)->where('from_date', $model->getFromDateRaw())->where('to_date', $model->getToDateRaw())->get();
|
||||||
|
foreach ($FewoReservations as $FewoReservation){
|
||||||
|
$FewoReservation->delete();
|
||||||
|
}
|
||||||
|
$model->delete();
|
||||||
|
\Session()->flash('alert-success', __('Buchung gelöscht sowie die Reservierung im Sterntrous Kalender'));
|
||||||
|
return redirect(route('travel_user_booking_fewos'));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function getTravelUserBookingFewos()
|
||||||
|
{
|
||||||
|
//confirmation_code_remider is delete 2
|
||||||
|
$query = TravelUserBookingFewo::where('deleted_at', '=', null);
|
||||||
|
|
||||||
|
return \DataTables::eloquent($query)
|
||||||
|
->addColumn('action_edit', function (TravelUserBookingFewo $travel_user_booking_fewo) {
|
||||||
|
return '<a data-order="'.$travel_user_booking_fewo->id.'" href="' . route('travel_user_booking_fewo_detail', [$travel_user_booking_fewo->id]) . '" class="btn icon-btn btn-sm btn-primary"><span class="far fa-edit"></span></a>';
|
||||||
|
})
|
||||||
|
->addColumn('fewo_lodging', function (TravelUserBookingFewo $travel_user_booking_fewo) {
|
||||||
|
//return '<a href="' . route('travel_user_booking_fewo_detail', [$travel_user_booking_fewo->fewo_lodging_id]) . '">'.$travel_user_booking_fewo->fewo_lodging->name.'</a>';
|
||||||
|
return $travel_user_booking_fewo->fewo_lodging->name;
|
||||||
|
})
|
||||||
|
->addColumn('travel_user', function (TravelUserBookingFewo $travel_user_booking_fewo) {
|
||||||
|
return '<a href="' . route('travel_user_detail', [$travel_user_booking_fewo->travel_user_id]) . '">'.$travel_user_booking_fewo->travel_user->first_name.' '.$travel_user_booking_fewo->travel_user->last_name.'</a>';
|
||||||
|
})
|
||||||
|
->addColumn('is_calendar', function (TravelUserBookingFewo $travel_user_booking_fewo) {
|
||||||
|
|
||||||
|
$back = "";
|
||||||
|
$back .= $travel_user_booking_fewo->is_calendar_fewo_direct ? ' <span class="badge badge-pill badge-success"><i class="far fa-check"></i></span>' : ' <span class="badge badge-pill badge-danger"><i class="far fa-times"></i></span>';
|
||||||
|
$back .= $travel_user_booking_fewo->is_calendar_hrs ? ' <span class="badge badge-pill badge-success"><i class="far fa-check"></i></span>' : ' <span class="badge badge-pill badge-danger"><i class="far fa-times"></i></span>';
|
||||||
|
$back .= $travel_user_booking_fewo->is_calendar_stern_tours ? ' <span class="badge badge-pill badge-success"><i class="far fa-check"></i></span>' : ' <span class="badge badge-pill badge-danger"><i class="far fa-times"></i></span>';
|
||||||
|
return $back;
|
||||||
|
})
|
||||||
|
->addColumn('status_name', function (TravelUserBookingFewo $travel_user_booking_fewo) {
|
||||||
|
return $travel_user_booking_fewo->getStatuesName();
|
||||||
|
})
|
||||||
|
|
||||||
|
->addColumn('action_delete', function (TravelUserBookingFewo $travel_user_booking_fewo) {
|
||||||
|
return '<a href="' . route('travel_user_booking_fewo_delete', [$travel_user_booking_fewo->id]) . '" class="btn icon-btn btn-sm btn-danger" onclick="return confirm(\''.__('Really delete entry?').'\');"><span class="far fa-trash"></span></a>';
|
||||||
|
})
|
||||||
|
->rawColumns(['action_edit', 'fewo_lodging', 'travel_user', 'is_calendar', 'action_delete'])
|
||||||
|
->make(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
111
app/Http/Controllers/TravelUserController.php
Executable file
111
app/Http/Controllers/TravelUserController.php
Executable file
|
|
@ -0,0 +1,111 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
|
||||||
|
use App\Models\TravelUser;
|
||||||
|
use Input;
|
||||||
|
use Validator;
|
||||||
|
|
||||||
|
class TravelUserController extends Controller
|
||||||
|
{
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->middleware('admin');
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public function index($step = false)
|
||||||
|
{
|
||||||
|
$data = [
|
||||||
|
'step' => $step
|
||||||
|
];
|
||||||
|
return view('travel.user.index', $data);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public function detail($id)
|
||||||
|
{
|
||||||
|
if($id == "new") {
|
||||||
|
$travel_user = new TravelUser();
|
||||||
|
$id = 'new';
|
||||||
|
|
||||||
|
}else{
|
||||||
|
$travel_user = TravelUser::findOrFail($id);
|
||||||
|
$id = $travel_user->id;
|
||||||
|
}
|
||||||
|
$data = [
|
||||||
|
'travel_user' => $travel_user,
|
||||||
|
'id' => $id,
|
||||||
|
];
|
||||||
|
return view('travel.user.detail', $data);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public function store($id)
|
||||||
|
{
|
||||||
|
$data = Input::all();
|
||||||
|
|
||||||
|
$rules = array(
|
||||||
|
'salutation_id' => 'required',
|
||||||
|
'travel_nationality_id' => 'required',
|
||||||
|
'first_name'=>'required',
|
||||||
|
'last_name'=>'required',
|
||||||
|
);
|
||||||
|
if($id == "new"){
|
||||||
|
$rules['email'] = 'required|string|email|max:255|unique:mysql_stern.travel_users,email';
|
||||||
|
}else{
|
||||||
|
$model = TravelUser::findOrFail($id);
|
||||||
|
$rules['email'] = 'required|string|email|max:255|unique:mysql_stern.travel_users,email,'.$model->id;
|
||||||
|
}
|
||||||
|
|
||||||
|
$validator = Validator::make(Input::all(), $rules);
|
||||||
|
|
||||||
|
if ($validator->fails()) {
|
||||||
|
return back()->withInput(Input::all())->withErrors($validator);
|
||||||
|
}
|
||||||
|
|
||||||
|
if($id == "new") {
|
||||||
|
$model = TravelUser::create($data);
|
||||||
|
}else{
|
||||||
|
$model = TravelUser::findOrFail($id);
|
||||||
|
$model->fill($data)->save();
|
||||||
|
}
|
||||||
|
|
||||||
|
\Session()->flash('alert-save', '1');
|
||||||
|
return redirect(route('travel_user_detail', [$model->id]));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public function delete($id){
|
||||||
|
$model = TravelUser::findOrFail($id);
|
||||||
|
$model->email = time()."@delete.de";
|
||||||
|
$model->save();
|
||||||
|
$model->delete();
|
||||||
|
\Session()->flash('alert-success', __('Vorlage gelöscht'));
|
||||||
|
return redirect(route('travel_users'));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function getTravelUsers()
|
||||||
|
{
|
||||||
|
//confirmation_code_remider is delete 2
|
||||||
|
$query = TravelUser::where('deleted_at', '=', null);
|
||||||
|
|
||||||
|
return \DataTables::eloquent($query)
|
||||||
|
->addColumn('action_edit', function (TravelUser $user) {
|
||||||
|
return '<a data-order="'.$user->id.'" href="' . route('travel_user_detail', [$user->id]) . '" class="btn icon-btn btn-sm btn-primary"><span class="far fa-edit"></span></a>';
|
||||||
|
})
|
||||||
|
|
||||||
|
->addColumn('action_delete', function (TravelUser $user) {
|
||||||
|
return '<a href="' . route('travel_user_delete', [$user->id]) . '" class="btn icon-btn btn-sm btn-danger" onclick="return confirm(\''.__('Really delete entry?').'\');"><span class="far fa-trash"></span></a>';
|
||||||
|
})
|
||||||
|
->rawColumns(['action_edit', 'action_delete'])
|
||||||
|
->make(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
103
app/Models/FewoLodging.php
Normal file
103
app/Models/FewoLodging.php
Normal file
|
|
@ -0,0 +1,103 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by Reliese Model.
|
||||||
|
* Date: Thu, 21 Mar 2019 13:40:05 +0100.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Reliese\Database\Eloquent\Model as Eloquent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class FewoLodging
|
||||||
|
*
|
||||||
|
* @property int $id
|
||||||
|
* @property int $group_id
|
||||||
|
* @property int $type_id
|
||||||
|
* @property string $name
|
||||||
|
* @property string $description
|
||||||
|
* @property string $equipment
|
||||||
|
* @property string $adress1
|
||||||
|
* @property string $adress2
|
||||||
|
* @property string $zip_code
|
||||||
|
* @property string $city
|
||||||
|
* @property int $maximum_persons
|
||||||
|
* @property float $deposit
|
||||||
|
* @property bool $calendar_visible
|
||||||
|
* @property \App\Models\FewoLodgingType $fewo_lodging_type
|
||||||
|
* @property \App\Models\FewoLodgingGroup $fewo_lodging_group
|
||||||
|
* @property \Illuminate\Database\Eloquent\Collection $fewo_lodging_images
|
||||||
|
* @property \Illuminate\Database\Eloquent\Collection $fewo_prices
|
||||||
|
* @property \Illuminate\Database\Eloquent\Collection $fewo_reservations
|
||||||
|
* @property \Illuminate\Database\Eloquent\Collection $pages
|
||||||
|
* @property \Illuminate\Database\Eloquent\Collection $travel_user_booking_fewos
|
||||||
|
* @package App\Models
|
||||||
|
* @mixin \Eloquent
|
||||||
|
*/
|
||||||
|
class FewoLodging extends Model
|
||||||
|
{
|
||||||
|
protected $connection = 'mysql_stern';
|
||||||
|
|
||||||
|
protected $table = 'fewo_lodging';
|
||||||
|
public $timestamps = false;
|
||||||
|
|
||||||
|
protected $casts = [
|
||||||
|
'group_id' => 'int',
|
||||||
|
'type_id' => 'int',
|
||||||
|
'maximum_persons' => 'int',
|
||||||
|
'deposit' => 'float',
|
||||||
|
'calendar_visible' => 'bool'
|
||||||
|
];
|
||||||
|
|
||||||
|
protected $fillable = [
|
||||||
|
'group_id',
|
||||||
|
'type_id',
|
||||||
|
'name',
|
||||||
|
'description',
|
||||||
|
'equipment',
|
||||||
|
'adress1',
|
||||||
|
'adress2',
|
||||||
|
'zip_code',
|
||||||
|
'city',
|
||||||
|
'maximum_persons',
|
||||||
|
'deposit',
|
||||||
|
'calendar_visible'
|
||||||
|
];
|
||||||
|
|
||||||
|
public function fewo_lodging_type()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(\App\Models\FewoLodgingType::class, 'type_id');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function fewo_lodging_group()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(\App\Models\FewoLodgingGroup::class, 'group_id');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function fewo_lodging_images()
|
||||||
|
{
|
||||||
|
return $this->hasMany(\App\Models\FewoLodgingImage::class, 'lodging_id');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function fewo_prices()
|
||||||
|
{
|
||||||
|
return $this->hasMany(\App\Models\FewoPrice::class, 'lodging_id');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function fewo_reservations()
|
||||||
|
{
|
||||||
|
return $this->hasMany(\App\Models\FewoReservation::class, 'lodging_id');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function pages()
|
||||||
|
{
|
||||||
|
return $this->hasMany(\App\Models\Page::class, 'fewo_lodging');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function travel_user_booking_fewos()
|
||||||
|
{
|
||||||
|
return $this->hasMany(\App\Models\TravelUserBookingFewo::class);
|
||||||
|
}
|
||||||
|
}
|
||||||
42
app/Models/FewoLodgingGroup.php
Normal file
42
app/Models/FewoLodgingGroup.php
Normal file
|
|
@ -0,0 +1,42 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by Reliese Model.
|
||||||
|
* Date: Thu, 21 Mar 2019 13:40:07 +0100.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class FewoLodgingGroup
|
||||||
|
*
|
||||||
|
* @property int $id
|
||||||
|
* @property string $name
|
||||||
|
* @property \Illuminate\Database\Eloquent\Collection $fewo_lodgings
|
||||||
|
* @property \Illuminate\Database\Eloquent\Collection $fewo_lodging_group_images
|
||||||
|
* @package App\Models
|
||||||
|
* @mixin \Eloquent
|
||||||
|
*/
|
||||||
|
class FewoLodgingGroup extends Model
|
||||||
|
{
|
||||||
|
protected $connection = 'mysql_stern';
|
||||||
|
|
||||||
|
protected $table = 'fewo_lodging_group';
|
||||||
|
public $timestamps = false;
|
||||||
|
|
||||||
|
protected $fillable = [
|
||||||
|
'name'
|
||||||
|
];
|
||||||
|
|
||||||
|
public function fewo_lodgings()
|
||||||
|
{
|
||||||
|
return $this->hasMany(\App\Models\FewoLodging::class, 'group_id');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function fewo_lodging_group_images()
|
||||||
|
{
|
||||||
|
return $this->hasMany(\App\Models\FewoLodgingGroupImage::class, 'group_id');
|
||||||
|
}
|
||||||
|
}
|
||||||
51
app/Models/FewoLodgingGroupImage.php
Normal file
51
app/Models/FewoLodgingGroupImage.php
Normal file
|
|
@ -0,0 +1,51 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by Reliese Model.
|
||||||
|
* Date: Thu, 21 Mar 2019 13:40:06 +0100.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class FewoLodgingGroupImage
|
||||||
|
*
|
||||||
|
* @property int $id
|
||||||
|
* @property int $group_id
|
||||||
|
* @property string $comp
|
||||||
|
* @property int $pos
|
||||||
|
* @property string $full_file_name
|
||||||
|
* @property string $file_name
|
||||||
|
* @property string $description
|
||||||
|
* @property \App\Models\FewoLodgingGroup $fewo_lodging_group
|
||||||
|
* @package App\Models
|
||||||
|
* @mixin \Eloquent
|
||||||
|
*/
|
||||||
|
class FewoLodgingGroupImage extends Model
|
||||||
|
{
|
||||||
|
protected $connection = 'mysql_stern';
|
||||||
|
|
||||||
|
protected $table = 'fewo_lodging_group_image';
|
||||||
|
public $timestamps = false;
|
||||||
|
|
||||||
|
protected $casts = [
|
||||||
|
'group_id' => 'int',
|
||||||
|
'pos' => 'int'
|
||||||
|
];
|
||||||
|
|
||||||
|
protected $fillable = [
|
||||||
|
'group_id',
|
||||||
|
'comp',
|
||||||
|
'pos',
|
||||||
|
'full_file_name',
|
||||||
|
'file_name',
|
||||||
|
'description'
|
||||||
|
];
|
||||||
|
|
||||||
|
public function fewo_lodging_group()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(\App\Models\FewoLodgingGroup::class, 'group_id');
|
||||||
|
}
|
||||||
|
}
|
||||||
49
app/Models/FewoLodgingImage.php
Normal file
49
app/Models/FewoLodgingImage.php
Normal file
|
|
@ -0,0 +1,49 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by Reliese Model.
|
||||||
|
* Date: Thu, 21 Mar 2019 13:40:07 +0100.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class FewoLodgingImage
|
||||||
|
*
|
||||||
|
* @property int $id
|
||||||
|
* @property int $lodging_id
|
||||||
|
* @property int $pos
|
||||||
|
* @property string $full_file_name
|
||||||
|
* @property string $file_name
|
||||||
|
* @property string $description
|
||||||
|
* @property \App\Models\FewoLodging $fewo_lodging
|
||||||
|
* @package App\Models
|
||||||
|
* @mixin \Eloquent
|
||||||
|
*/
|
||||||
|
class FewoLodgingImage extends Model
|
||||||
|
{
|
||||||
|
protected $connection = 'mysql_stern';
|
||||||
|
|
||||||
|
protected $table = 'fewo_lodging_image';
|
||||||
|
public $timestamps = false;
|
||||||
|
|
||||||
|
protected $casts = [
|
||||||
|
'lodging_id' => 'int',
|
||||||
|
'pos' => 'int'
|
||||||
|
];
|
||||||
|
|
||||||
|
protected $fillable = [
|
||||||
|
'lodging_id',
|
||||||
|
'pos',
|
||||||
|
'full_file_name',
|
||||||
|
'file_name',
|
||||||
|
'description'
|
||||||
|
];
|
||||||
|
|
||||||
|
public function fewo_lodging()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(\App\Models\FewoLodging::class, 'lodging_id');
|
||||||
|
}
|
||||||
|
}
|
||||||
36
app/Models/FewoLodgingType.php
Normal file
36
app/Models/FewoLodgingType.php
Normal file
|
|
@ -0,0 +1,36 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by Reliese Model.
|
||||||
|
* Date: Thu, 21 Mar 2019 13:40:08 +0100.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class FewoLodgingType
|
||||||
|
*
|
||||||
|
* @property int $id
|
||||||
|
* @property string $name
|
||||||
|
* @property \Illuminate\Database\Eloquent\Collection $fewo_lodgings
|
||||||
|
* @package App\Models
|
||||||
|
* @mixin \Eloquent
|
||||||
|
*/
|
||||||
|
class FewoLodgingType extends Model
|
||||||
|
{
|
||||||
|
protected $connection = 'mysql_stern';
|
||||||
|
|
||||||
|
protected $table = 'fewo_lodging_type';
|
||||||
|
public $timestamps = false;
|
||||||
|
|
||||||
|
protected $fillable = [
|
||||||
|
'name'
|
||||||
|
];
|
||||||
|
|
||||||
|
public function fewo_lodgings()
|
||||||
|
{
|
||||||
|
return $this->hasMany(\App\Models\FewoLodging::class, 'type_id');
|
||||||
|
}
|
||||||
|
}
|
||||||
55
app/Models/FewoPrice.php
Normal file
55
app/Models/FewoPrice.php
Normal file
|
|
@ -0,0 +1,55 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by Reliese Model.
|
||||||
|
* Date: Thu, 21 Mar 2019 13:40:09 +0100.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class FewoPrice
|
||||||
|
*
|
||||||
|
* @property int $id
|
||||||
|
* @property int $lodging_id
|
||||||
|
* @property int $season_id
|
||||||
|
* @property float $per_night
|
||||||
|
* @property float $flat_price
|
||||||
|
* @property \App\Models\FewoSeason $fewo_season
|
||||||
|
* @property \App\Models\FewoLodging $fewo_lodging
|
||||||
|
* @package App\Models
|
||||||
|
* @mixin \Eloquent
|
||||||
|
*/
|
||||||
|
class FewoPrice extends Model
|
||||||
|
{
|
||||||
|
protected $connection = 'mysql_stern';
|
||||||
|
|
||||||
|
protected $table = 'fewo_price';
|
||||||
|
public $timestamps = false;
|
||||||
|
|
||||||
|
protected $casts = [
|
||||||
|
'lodging_id' => 'int',
|
||||||
|
'season_id' => 'int',
|
||||||
|
'per_night' => 'float',
|
||||||
|
'flat_price' => 'float'
|
||||||
|
];
|
||||||
|
|
||||||
|
protected $fillable = [
|
||||||
|
'lodging_id',
|
||||||
|
'season_id',
|
||||||
|
'per_night',
|
||||||
|
'flat_price'
|
||||||
|
];
|
||||||
|
|
||||||
|
public function fewo_season()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(\App\Models\FewoSeason::class, 'season_id');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function fewo_lodging()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(\App\Models\FewoLodging::class, 'lodging_id');
|
||||||
|
}
|
||||||
|
}
|
||||||
55
app/Models/FewoReservation.php
Normal file
55
app/Models/FewoReservation.php
Normal file
|
|
@ -0,0 +1,55 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by Reliese Model.
|
||||||
|
* Date: Thu, 21 Mar 2019 13:40:09 +0100.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class FewoReservation
|
||||||
|
*
|
||||||
|
* @property int $id
|
||||||
|
* @property int $lodging_id
|
||||||
|
* @property \Carbon\Carbon $from_date
|
||||||
|
* @property \Carbon\Carbon $to_date
|
||||||
|
* @property int $status
|
||||||
|
* @property int $type
|
||||||
|
* @property \App\Models\FewoLodging $fewo_lodging
|
||||||
|
* @package App\Models
|
||||||
|
* @mixin \Eloquent
|
||||||
|
*/
|
||||||
|
class FewoReservation extends Model
|
||||||
|
{
|
||||||
|
protected $connection = 'mysql_stern';
|
||||||
|
|
||||||
|
protected $table = 'fewo_reservation';
|
||||||
|
public $timestamps = false;
|
||||||
|
|
||||||
|
protected $casts = [
|
||||||
|
'lodging_id' => 'int',
|
||||||
|
'status' => 'int',
|
||||||
|
'type' => 'int'
|
||||||
|
];
|
||||||
|
|
||||||
|
protected $dates = [
|
||||||
|
'from_date',
|
||||||
|
'to_date'
|
||||||
|
];
|
||||||
|
|
||||||
|
protected $fillable = [
|
||||||
|
'lodging_id',
|
||||||
|
'from_date',
|
||||||
|
'to_date',
|
||||||
|
'status',
|
||||||
|
'type'
|
||||||
|
];
|
||||||
|
|
||||||
|
public function fewo_lodging()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(\App\Models\FewoLodging::class, 'lodging_id');
|
||||||
|
}
|
||||||
|
}
|
||||||
56
app/Models/FewoSeason.php
Normal file
56
app/Models/FewoSeason.php
Normal file
|
|
@ -0,0 +1,56 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by Reliese Model.
|
||||||
|
* Date: Thu, 21 Mar 2019 13:40:10 +0100.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class FewoSeason
|
||||||
|
*
|
||||||
|
* @property int $id
|
||||||
|
* @property string $name
|
||||||
|
* @property \Carbon\Carbon $from_date
|
||||||
|
* @property \Carbon\Carbon $to_date
|
||||||
|
* @property int $minimum_stay
|
||||||
|
* @property string $description
|
||||||
|
* @property int $only_weekday
|
||||||
|
* @property \Illuminate\Database\Eloquent\Collection $fewo_prices
|
||||||
|
* @package App\Models
|
||||||
|
* @mixin \Eloquent
|
||||||
|
*/
|
||||||
|
class FewoSeason extends Model
|
||||||
|
{
|
||||||
|
protected $connection = 'mysql_stern';
|
||||||
|
|
||||||
|
protected $table = 'fewo_season';
|
||||||
|
public $timestamps = false;
|
||||||
|
|
||||||
|
protected $casts = [
|
||||||
|
'minimum_stay' => 'int',
|
||||||
|
'only_weekday' => 'int'
|
||||||
|
];
|
||||||
|
|
||||||
|
protected $dates = [
|
||||||
|
'from_date',
|
||||||
|
'to_date'
|
||||||
|
];
|
||||||
|
|
||||||
|
protected $fillable = [
|
||||||
|
'name',
|
||||||
|
'from_date',
|
||||||
|
'to_date',
|
||||||
|
'minimum_stay',
|
||||||
|
'description',
|
||||||
|
'only_weekday'
|
||||||
|
];
|
||||||
|
|
||||||
|
public function fewo_prices()
|
||||||
|
{
|
||||||
|
return $this->hasMany(\App\Models\FewoPrice::class, 'season_id');
|
||||||
|
}
|
||||||
|
}
|
||||||
35
app/Models/TravelBookingFewoChannel.php
Normal file
35
app/Models/TravelBookingFewoChannel.php
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by Reliese Model.
|
||||||
|
* Date: Thu, 21 Mar 2019 13:40:11 +0100.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class TravelBookingFewoChannel
|
||||||
|
*
|
||||||
|
* @property int $id
|
||||||
|
* @property string $name
|
||||||
|
* @property \Carbon\Carbon $created_at
|
||||||
|
* @property \Carbon\Carbon $updated_at
|
||||||
|
* @property \Illuminate\Database\Eloquent\Collection $travel_user_booking_fewos
|
||||||
|
* @package App\Models
|
||||||
|
* @mixin \Eloquent
|
||||||
|
*/
|
||||||
|
class TravelBookingFewoChannel extends Model
|
||||||
|
{
|
||||||
|
protected $connection = 'mysql_stern';
|
||||||
|
|
||||||
|
protected $fillable = [
|
||||||
|
'name'
|
||||||
|
];
|
||||||
|
|
||||||
|
public function travel_user_booking_fewos()
|
||||||
|
{
|
||||||
|
return $this->hasMany(\App\Models\TravelUserBookingFewo::class);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -22,7 +22,6 @@ class TravelNationality extends Model
|
||||||
|
|
||||||
protected $table = 'travel_nationality';
|
protected $table = 'travel_nationality';
|
||||||
|
|
||||||
|
|
||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
'name',
|
'name',
|
||||||
'active',
|
'active',
|
||||||
|
|
|
||||||
110
app/Models/TravelUser.php
Normal file
110
app/Models/TravelUser.php
Normal file
|
|
@ -0,0 +1,110 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by Reliese Model.
|
||||||
|
* Date: Thu, 21 Mar 2019 13:39:44 +0100.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use App\Services\Util;
|
||||||
|
use Carbon;
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class TravelUser
|
||||||
|
*
|
||||||
|
* @property int $id
|
||||||
|
* @property int $salutation_id
|
||||||
|
* @property string $title
|
||||||
|
* @property string $first_name
|
||||||
|
* @property string $last_name
|
||||||
|
* @property string $email
|
||||||
|
* @property string $password
|
||||||
|
* @property string $company
|
||||||
|
* @property string $street
|
||||||
|
* @property string $zipcode
|
||||||
|
* @property string $city
|
||||||
|
* @property string $phone
|
||||||
|
* @property string $mobil
|
||||||
|
* @property string $fax
|
||||||
|
* @property \Carbon\Carbon $birthday
|
||||||
|
* @property int $travel_nationality_id
|
||||||
|
* @property string $last_user_data
|
||||||
|
* @property \Carbon\Carbon $created_at
|
||||||
|
* @property \Carbon\Carbon $updated_at
|
||||||
|
* @property string $deleted_at
|
||||||
|
* @property \App\Models\TravelNationality $travel_nationality
|
||||||
|
* @property \Illuminate\Database\Eloquent\Collection $travel_user_booking_fewos
|
||||||
|
* @package App\Models
|
||||||
|
* @method static bool|null forceDelete()
|
||||||
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\TravelUser onlyTrashed()
|
||||||
|
* @method static bool|null restore()
|
||||||
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\TravelUser withTrashed()
|
||||||
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\TravelUser withoutTrashed()
|
||||||
|
* @mixin \Eloquent
|
||||||
|
*/
|
||||||
|
class TravelUser extends Model
|
||||||
|
{
|
||||||
|
use \Illuminate\Database\Eloquent\SoftDeletes;
|
||||||
|
|
||||||
|
protected $connection = 'mysql_stern';
|
||||||
|
|
||||||
|
protected $table = 'travel_users';
|
||||||
|
|
||||||
|
protected $casts = [
|
||||||
|
'salutation_id' => 'int',
|
||||||
|
'travel_nationality_id' => 'int',
|
||||||
|
'last_user_data' => 'array'
|
||||||
|
];
|
||||||
|
|
||||||
|
protected $dates = [
|
||||||
|
'birthday'
|
||||||
|
];
|
||||||
|
|
||||||
|
protected $hidden = [
|
||||||
|
'password'
|
||||||
|
];
|
||||||
|
|
||||||
|
protected $fillable = [
|
||||||
|
'salutation_id',
|
||||||
|
'title',
|
||||||
|
'first_name',
|
||||||
|
'last_name',
|
||||||
|
'email',
|
||||||
|
'password',
|
||||||
|
'company',
|
||||||
|
'street',
|
||||||
|
'zipcode',
|
||||||
|
'city',
|
||||||
|
'phone',
|
||||||
|
'mobil',
|
||||||
|
'fax',
|
||||||
|
'birthday',
|
||||||
|
'travel_nationality_id',
|
||||||
|
'last_user_data'
|
||||||
|
];
|
||||||
|
|
||||||
|
public function travel_nationality()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(\App\Models\TravelNationality::class);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function travel_user_booking_fewos()
|
||||||
|
{
|
||||||
|
return $this->hasMany(\App\Models\TravelUserBookingFewo::class);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function getBirthdayAttribute($value)
|
||||||
|
{
|
||||||
|
if(!$value){
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
return Carbon::parse($value)->format(Util::formatDateDB());
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setBirthdayAttribute( $value ) {
|
||||||
|
$this->attributes['birthday'] = isset($value) ? (new Carbon($value))->format('Y-m-d') : NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
314
app/Models/TravelUserBookingFewo.php
Normal file
314
app/Models/TravelUserBookingFewo.php
Normal file
|
|
@ -0,0 +1,314 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by Reliese Model.
|
||||||
|
* Date: Thu, 21 Mar 2019 13:40:13 +0100.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace App\Models;
|
||||||
|
|
||||||
|
use Carbon;
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
use Util;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class TravelUserBookingFewo
|
||||||
|
*
|
||||||
|
* @property int $id
|
||||||
|
* @property int $travel_user_id
|
||||||
|
* @property int $fewo_lodging_id
|
||||||
|
* @property string $invoice_number
|
||||||
|
* @property int $persons
|
||||||
|
* @property int $adults
|
||||||
|
* @property int $children
|
||||||
|
* @property \Carbon\Carbon $booking_date
|
||||||
|
* @property \Carbon\Carbon $from_date
|
||||||
|
* @property \Carbon\Carbon $to_date
|
||||||
|
* @property string $daily_prices
|
||||||
|
* @property float $price_travel
|
||||||
|
* @property float $price_deposit
|
||||||
|
* @property float $price_service
|
||||||
|
* @property float $price_total
|
||||||
|
* @property int $travel_booking_fewo_channel_id
|
||||||
|
* @property string $notice
|
||||||
|
* @property bool $is_calendar_fewo_direct
|
||||||
|
* @property bool $is_calendar_hrs
|
||||||
|
* @property bool $is_calendar_stern_tours
|
||||||
|
* @property int $status
|
||||||
|
* @property \Carbon\Carbon $created_at
|
||||||
|
* @property \Carbon\Carbon $updated_at
|
||||||
|
* @property string $deleted_at
|
||||||
|
* @property \App\Models\FewoLodging $fewo_lodging
|
||||||
|
* @property \App\Models\TravelBookingFewoChannel $travel_booking_fewo_channel
|
||||||
|
* @property \App\Models\TravelUser $travel_user
|
||||||
|
* @package App\Models
|
||||||
|
* @method static bool|null forceDelete()
|
||||||
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\TravelUserBookingFewo onlyTrashed()
|
||||||
|
* @method static bool|null restore()
|
||||||
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\TravelUserBookingFewo withTrashed()
|
||||||
|
* @method static \Illuminate\Database\Query\Builder|\App\Models\TravelUserBookingFewo withoutTrashed()
|
||||||
|
* @mixin \Eloquent
|
||||||
|
*/
|
||||||
|
class TravelUserBookingFewo extends Model
|
||||||
|
{
|
||||||
|
use \Illuminate\Database\Eloquent\SoftDeletes;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
protected static $statues = [
|
||||||
|
0 => 'Anfrage von STERN TOURS',
|
||||||
|
1 => 'Angebot versandt',
|
||||||
|
2 => 'Rückfrage Agentur',
|
||||||
|
3 => 'Rückfrage Kunden',
|
||||||
|
5 => 'Nachfrage Angebot',
|
||||||
|
7 => 'gebucht',
|
||||||
|
8 => 'Absage',
|
||||||
|
9 => 'Option',
|
||||||
|
10 => 'Angebot erstellen',
|
||||||
|
11 => 'Storno durch VA',
|
||||||
|
12 => 'Storno durch Kunde',
|
||||||
|
13 => 'Reiseanmeldung verschickt',
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
protected $connection = 'mysql_stern';
|
||||||
|
|
||||||
|
protected $table = 'travel_user_booking_fewos';
|
||||||
|
|
||||||
|
protected $casts = [
|
||||||
|
'travel_user_id' => 'int',
|
||||||
|
'fewo_lodging_id' => 'int',
|
||||||
|
'persons' => 'int',
|
||||||
|
'adults' => 'int',
|
||||||
|
'children' => 'int',
|
||||||
|
'daily_prices' => 'array', //!
|
||||||
|
'price_travel' => 'float',
|
||||||
|
'price_deposit' => 'float',
|
||||||
|
'price_service' => 'float',
|
||||||
|
'price_total' => 'float',
|
||||||
|
'travel_booking_fewo_channel_id' => 'int',
|
||||||
|
'is_calendar_fewo_direct' => 'bool',
|
||||||
|
'is_calendar_hrs' => 'bool',
|
||||||
|
'is_calendar_stern_tours' => 'bool',
|
||||||
|
'status' => 'int'
|
||||||
|
];
|
||||||
|
|
||||||
|
protected $dates = [
|
||||||
|
'booking_date',
|
||||||
|
'from_date',
|
||||||
|
'to_date'
|
||||||
|
];
|
||||||
|
|
||||||
|
protected $fillable = [
|
||||||
|
'travel_user_id',
|
||||||
|
'fewo_lodging_id',
|
||||||
|
'invoice_number',
|
||||||
|
'adults',
|
||||||
|
'children',
|
||||||
|
'persons',
|
||||||
|
'booking_date',
|
||||||
|
'from_date',
|
||||||
|
'to_date',
|
||||||
|
'daily_prices',
|
||||||
|
'price_travel',
|
||||||
|
'price_deposit',
|
||||||
|
'price_service',
|
||||||
|
'price_total',
|
||||||
|
'travel_booking_fewo_channel_id',
|
||||||
|
'notice',
|
||||||
|
'is_calendar_fewo_direct',
|
||||||
|
'is_calendar_hrs',
|
||||||
|
'is_calendar_stern_tours',
|
||||||
|
'status',
|
||||||
|
'status_text'
|
||||||
|
];
|
||||||
|
|
||||||
|
public function fewo_lodging()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(\App\Models\FewoLodging::class);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function travel_booking_fewo_channel()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(\App\Models\TravelBookingFewoChannel::class);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function travel_user()
|
||||||
|
{
|
||||||
|
return $this->belongsTo(\App\Models\TravelUser::class);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getStatuesName(){
|
||||||
|
if(isset(self::$statues[$this->status])){
|
||||||
|
return self::$statues[$this->status];
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function getPersonsAttribute($value)
|
||||||
|
{
|
||||||
|
$this->attributes['persons'] = $this->adults + $this->children;
|
||||||
|
return $this->attributes['persons'];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setPersonsAttribute( $value ) {
|
||||||
|
|
||||||
|
$this->attributes['persons'] = $this->adults + $this->children;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getAdultsAttribute()
|
||||||
|
{
|
||||||
|
return isset($this->attributes['adults']) ? $this->attributes['adults'] : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setAdultsAttribute( $value ) {
|
||||||
|
|
||||||
|
$this->attributes['persons'] = $this->adults + $this->children;
|
||||||
|
$this->attributes['adults'] = $value;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getChildrenAttribute()
|
||||||
|
{
|
||||||
|
return isset($this->attributes['children']) ? $this->attributes['children'] : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setChildrenAttribute( $value ) {
|
||||||
|
|
||||||
|
$this->attributes['persons'] = $this->adults + $this->children;
|
||||||
|
$this->attributes['children'] = $value;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static function getStatuesOptions($setKey = false){
|
||||||
|
$options = self::$statues;
|
||||||
|
$ret = '';
|
||||||
|
foreach ($options as $key => $option){
|
||||||
|
$attr = ($key == $setKey) ? 'selected="selected"' : '';
|
||||||
|
$ret .= '<option value="'.$key.'" '.$attr.'>'.$option.'</option>\n';
|
||||||
|
}
|
||||||
|
return $ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getBookingDateAttribute($value)
|
||||||
|
{
|
||||||
|
if(!$value){ return ""; }
|
||||||
|
return Carbon::parse($value)->format(Util::formatDateDB());
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setBookingDateAttribute( $value ) {
|
||||||
|
$this->attributes['booking_date'] = isset($value) ? (new Carbon($value))->format('Y-m-d') : NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
//from_date
|
||||||
|
public function getFromDateAttribute($value)
|
||||||
|
{
|
||||||
|
if(!$value){ return ""; }
|
||||||
|
return Carbon::parse($value)->format(Util::formatDateDB());
|
||||||
|
}
|
||||||
|
public function setFromDateAttribute( $value ) {
|
||||||
|
$this->attributes['from_date'] = isset($value) ? (new Carbon($value))->format('Y-m-d') : NULL;
|
||||||
|
}
|
||||||
|
public function getFromDateRaw()
|
||||||
|
{
|
||||||
|
return isset($this->attributes['from_date']) ? $this->attributes['from_date'] : "";
|
||||||
|
}
|
||||||
|
|
||||||
|
//to_date
|
||||||
|
public function getToDateAttribute($value)
|
||||||
|
{
|
||||||
|
if(!$value){ return ""; }
|
||||||
|
return Carbon::parse($value)->format(Util::formatDateDB());
|
||||||
|
}
|
||||||
|
public function setToDateAttribute( $value ) {
|
||||||
|
$this->attributes['to_date'] = isset($value) ? (new Carbon($value))->format('Y-m-d') : NULL;
|
||||||
|
}
|
||||||
|
public function getToDateRaw()
|
||||||
|
{
|
||||||
|
return isset($this->attributes['to_date']) ? $this->attributes['to_date'] : "";
|
||||||
|
}
|
||||||
|
|
||||||
|
//price_travel
|
||||||
|
public function setPriceTravelAttribute($value)
|
||||||
|
{
|
||||||
|
$value = Util::_format_number($value);
|
||||||
|
$this->attributes['price_travel'] = floatval(str_replace(',', '.', $value));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getPriceTravelAttribute($value)
|
||||||
|
{
|
||||||
|
if(!$value){ return ""; }
|
||||||
|
// 2 = decimal places | '.' = decimal seperator | ',' = thousand seperator
|
||||||
|
return number_format(($this->attributes['price_travel']), 2, ',', '.');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getPriceTravelRaw()
|
||||||
|
{
|
||||||
|
return isset($this->attributes['price_travel']) ? $this->attributes['price_travel'] : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
//price_deposit
|
||||||
|
public function setPriceDepositAttribute($value)
|
||||||
|
{
|
||||||
|
$value = Util::_format_number($value);
|
||||||
|
$this->attributes['price_deposit'] = floatval(str_replace(',', '.', $value));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getPriceDepositAttribute($value)
|
||||||
|
{
|
||||||
|
if(!$value){ return ""; }
|
||||||
|
// 2 = decimal places | '.' = decimal seperator | ',' = thousand seperator
|
||||||
|
return number_format(($this->attributes['price_deposit']), 2, ',', '.');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getPriceDepositRaw()
|
||||||
|
{
|
||||||
|
return isset($this->attributes['price_deposit']) ? $this->attributes['price_deposit'] : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
//price_service
|
||||||
|
public function setPriceServiceAttribute($value)
|
||||||
|
{
|
||||||
|
$value = Util::_format_number($value);
|
||||||
|
$this->attributes['price_service'] = floatval(str_replace(',', '.', $value));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getPriceServiceAttribute($value)
|
||||||
|
{
|
||||||
|
if(!$value){ return ""; }
|
||||||
|
|
||||||
|
// 2 = decimal places | '.' = decimal seperator | ',' = thousand seperator
|
||||||
|
return number_format(($this->attributes['price_service']), 2, ',', '.');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getPriceServiceRaw()
|
||||||
|
{
|
||||||
|
return isset($this->attributes['price_service']) ? $this->attributes['price_service'] : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
//price_total
|
||||||
|
public function setPriceTotalAttribute($value)
|
||||||
|
{
|
||||||
|
//$value = Util::_format_number($value);
|
||||||
|
$value = $this->getPriceDepositRaw() + $this->getPriceServiceRaw() + $this->getPriceTravelRaw();
|
||||||
|
$this->attributes['price_total'] = floatval($value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getPriceTotalAttribute()
|
||||||
|
{
|
||||||
|
// 2 = decimal places | '.' = decimal seperator | ',' = thousand seperator
|
||||||
|
$value = $this->getPriceDepositRaw() + $this->getPriceServiceRaw() + $this->getPriceTravelRaw();
|
||||||
|
$this->attributes['price_total'] = floatval($value);
|
||||||
|
return number_format(($this->attributes['price_total']), 2, ',', '.');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getPriceTotalRaw()
|
||||||
|
{
|
||||||
|
return isset($this->attributes['price_total']) ? $this->attributes['price_total'] : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -4,11 +4,15 @@ namespace App\Services;
|
||||||
use App\Models\Country;
|
use App\Models\Country;
|
||||||
use App\Models\Draft;
|
use App\Models\Draft;
|
||||||
use App\Models\DraftType;
|
use App\Models\DraftType;
|
||||||
|
use App\Models\FewoLodging;
|
||||||
use App\Models\IndustrySector;
|
use App\Models\IndustrySector;
|
||||||
use App\Models\Interest;
|
use App\Models\Interest;
|
||||||
|
use App\Models\TravelBookingFewoChannel;
|
||||||
use App\Models\TravelClass;
|
use App\Models\TravelClass;
|
||||||
use App\Models\TravelCountry;
|
use App\Models\TravelCountry;
|
||||||
|
use App\Models\TravelNationality;
|
||||||
use App\Models\TravelProgram;
|
use App\Models\TravelProgram;
|
||||||
|
use App\Models\TravelUser;
|
||||||
use Form;
|
use Form;
|
||||||
|
|
||||||
class HTMLHelper
|
class HTMLHelper
|
||||||
|
|
@ -48,6 +52,13 @@ class HTMLHelper
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
private static $salutation = [
|
||||||
|
1 => 'Herr',
|
||||||
|
2 => 'Frau',
|
||||||
|
3 => 'Firma',
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
public static function getMonth($i){
|
public static function getMonth($i){
|
||||||
return self::$months[intval($i)];
|
return self::$months[intval($i)];
|
||||||
}
|
}
|
||||||
|
|
@ -84,6 +95,15 @@ class HTMLHelper
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static function getSalutationOptions($id){
|
||||||
|
$ret = "";
|
||||||
|
foreach (self::$salutation as $s_id => $value){
|
||||||
|
$attr = ($s_id == $id) ? 'selected="selected"' : '';
|
||||||
|
$ret .= '<option value="'.$s_id.'" '.$attr.'>'.$value.'</option>\n';
|
||||||
|
}
|
||||||
|
return $ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public static function getYearSelectOptions(){
|
public static function getYearSelectOptions(){
|
||||||
$start = date("Y", strtotime("-5 years", time()));
|
$start = date("Y", strtotime("-5 years", time()));
|
||||||
|
|
@ -152,6 +172,45 @@ class HTMLHelper
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function getTravelUserOptions($id = false){
|
||||||
|
$options = TravelUser::all();
|
||||||
|
$ret = '';
|
||||||
|
foreach ($options as $option){
|
||||||
|
$attr = ($option->id === $id) ? 'selected="selected"' : '';
|
||||||
|
$ret .= '<option value="'.$option->id.'" '.$attr.'>'.$option->first_name.' '.$option->last_name.' | '.$option->email.' ('.$option->id.')</option>\n';
|
||||||
|
}
|
||||||
|
return $ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function getFewoLodgingOptions($id = false){
|
||||||
|
$options = FewoLodging::all();
|
||||||
|
$ret = '';
|
||||||
|
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 getTravelBookingFewoChannelOptions($id = false){
|
||||||
|
$options = TravelBookingFewoChannel::all();
|
||||||
|
$ret = '';
|
||||||
|
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 getTravelNationalityOptions($id = false){
|
||||||
|
$options = TravelNationality::where('active',1)->get();
|
||||||
|
$ret = '';
|
||||||
|
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 getWeekdaysOptions($programId = false, $weekdays = []){
|
public static function getWeekdaysOptions($programId = false, $weekdays = []){
|
||||||
|
|
|
||||||
|
|
@ -28,4 +28,8 @@ class Util
|
||||||
}
|
}
|
||||||
return 'd.m.Y - H:i';
|
return 'd.m.Y - H:i';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function _format_number($value){
|
||||||
|
return preg_replace("/[^0-9,]/", "", $value);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
5
bootstrap/cache/services.php
vendored
5
bootstrap/cache/services.php
vendored
|
|
@ -48,6 +48,7 @@
|
||||||
44 => 'Intervention\\Image\\ImageServiceProvider',
|
44 => 'Intervention\\Image\\ImageServiceProvider',
|
||||||
45 => 'Maatwebsite\\Excel\\ExcelServiceProvider',
|
45 => 'Maatwebsite\\Excel\\ExcelServiceProvider',
|
||||||
46 => 'Yajra\\DataTables\\DataTablesServiceProvider',
|
46 => 'Yajra\\DataTables\\DataTablesServiceProvider',
|
||||||
|
47 => 'Reliese\\Coders\\CodersServiceProvider',
|
||||||
),
|
),
|
||||||
'eager' =>
|
'eager' =>
|
||||||
array (
|
array (
|
||||||
|
|
@ -189,6 +190,7 @@
|
||||||
'Collective\\Html\\HtmlBuilder' => 'Collective\\Html\\HtmlServiceProvider',
|
'Collective\\Html\\HtmlBuilder' => 'Collective\\Html\\HtmlServiceProvider',
|
||||||
'Collective\\Html\\FormBuilder' => 'Collective\\Html\\HtmlServiceProvider',
|
'Collective\\Html\\FormBuilder' => 'Collective\\Html\\HtmlServiceProvider',
|
||||||
'NunoMaduro\\Collision\\Contracts\\Provider' => 'NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider',
|
'NunoMaduro\\Collision\\Contracts\\Provider' => 'NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider',
|
||||||
|
'Reliese\\Coders\\Model\\Factory' => 'Reliese\\Coders\\CodersServiceProvider',
|
||||||
),
|
),
|
||||||
'when' =>
|
'when' =>
|
||||||
array (
|
array (
|
||||||
|
|
@ -240,5 +242,8 @@
|
||||||
'NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider' =>
|
'NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider' =>
|
||||||
array (
|
array (
|
||||||
),
|
),
|
||||||
|
'Reliese\\Coders\\CodersServiceProvider' =>
|
||||||
|
array (
|
||||||
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
@ -18,6 +18,7 @@
|
||||||
"laravel/tinker": "^1.0",
|
"laravel/tinker": "^1.0",
|
||||||
"laravelcollective/html": "5.6.x-dev",
|
"laravelcollective/html": "5.6.x-dev",
|
||||||
"maatwebsite/excel": "2.1.30",
|
"maatwebsite/excel": "2.1.30",
|
||||||
|
"reliese/laravel": "^0.0.13",
|
||||||
"vladrub/laravel-datatables-oracle": "8.0.x-dev",
|
"vladrub/laravel-datatables-oracle": "8.0.x-dev",
|
||||||
"yajra/laravel-datatables-oracle": "^8.8"
|
"yajra/laravel-datatables-oracle": "^8.8"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
54
composer.lock
generated
54
composer.lock
generated
|
|
@ -4,7 +4,7 @@
|
||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "d457816de1d32981b600ca4adccb827c",
|
"content-hash": "b9e4fff8c2dc7abd8c210834757a7f46",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "cocur/slugify",
|
"name": "cocur/slugify",
|
||||||
|
|
@ -2751,6 +2751,58 @@
|
||||||
],
|
],
|
||||||
"time": "2018-07-19T23:38:55+00:00"
|
"time": "2018-07-19T23:38:55+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "reliese/laravel",
|
||||||
|
"version": "v0.0.13",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/reliese/laravel.git",
|
||||||
|
"reference": "10075c5f5e67efba18d781216ff5a0ffa3fc2d7f"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/reliese/laravel/zipball/10075c5f5e67efba18d781216ff5a0ffa3fc2d7f",
|
||||||
|
"reference": "10075c5f5e67efba18d781216ff5a0ffa3fc2d7f",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"doctrine/dbal": "~2.5",
|
||||||
|
"illuminate/console": "~5.1",
|
||||||
|
"illuminate/contracts": "~5.1",
|
||||||
|
"illuminate/database": "~5.1",
|
||||||
|
"illuminate/filesystem": "~5.1",
|
||||||
|
"illuminate/support": "~5.1",
|
||||||
|
"php": ">=5.6.4"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"fzaninotto/faker": "~1.4",
|
||||||
|
"mockery/mockery": "0.9.*",
|
||||||
|
"phpunit/phpunit": "~5.0"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Reliese\\": "src/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Cristian Llanos",
|
||||||
|
"email": "cristianllanos@outlook.com"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Reliese Components for Laravel Framework code generation.",
|
||||||
|
"homepage": "http://cristianllanos.com",
|
||||||
|
"keywords": [
|
||||||
|
"laravel",
|
||||||
|
"reliese"
|
||||||
|
],
|
||||||
|
"time": "2017-02-04T15:50:39+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "swiftmailer/swiftmailer",
|
"name": "swiftmailer/swiftmailer",
|
||||||
"version": "v6.1.3",
|
"version": "v6.1.3",
|
||||||
|
|
|
||||||
|
|
@ -177,6 +177,7 @@ return [
|
||||||
Intervention\Image\ImageServiceProvider::class,
|
Intervention\Image\ImageServiceProvider::class,
|
||||||
Maatwebsite\Excel\ExcelServiceProvider::class,
|
Maatwebsite\Excel\ExcelServiceProvider::class,
|
||||||
Yajra\DataTables\DataTablesServiceProvider::class,
|
Yajra\DataTables\DataTablesServiceProvider::class,
|
||||||
|
Reliese\Coders\CodersServiceProvider::class
|
||||||
|
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|
|
||||||
296
config/models.php
Normal file
296
config/models.php
Normal file
|
|
@ -0,0 +1,296 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Default Configurations
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| In this section you may define the default configuration for each model
|
||||||
|
| that will be generated from any database.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'*' => [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Model Files Location
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| We need a location to store your new generated files. All files will be
|
||||||
|
| placed within this directory. When you turn on base files, they will
|
||||||
|
| be placed within a Base directory inside this location.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'path' => app_path('Models'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Model Namespace
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Every generated model will belong to this namespace. It is suggested
|
||||||
|
| that this namespace should follow PSR-4 convention and be very
|
||||||
|
| similar to the path of your models defined above.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'namespace' => 'App\Models',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Parent Class
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| All Eloquent models should inherit from Eloquent Model class. However,
|
||||||
|
| you can define a custom Eloquent model that suits your needs.
|
||||||
|
| As an example one custom model has been added for you which
|
||||||
|
| will allow you to create custom database castings.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'parent' => Reliese\Database\Eloquent\Model::class,
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Traits
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Sometimes you may want to append certain traits to all your models.
|
||||||
|
| If that is what you need, you may list them bellow.
|
||||||
|
| As an example we have a BitBooleans trait which will treat MySQL bit
|
||||||
|
| data type as booleans. You might probably not need it, but it is
|
||||||
|
| an example of how you can customize your models.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'use' => [
|
||||||
|
// Reliese\Database\Eloquent\BitBooleans::class,
|
||||||
|
// Reliese\Database\Eloquent\BlamableBehavior::class,
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Model Connection
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| If you wish your models had appended the connection from which they
|
||||||
|
| were generated, you should set this value to true and your
|
||||||
|
| models will have the connection property filled.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'connection' => false,
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Timestamps
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| If your tables have CREATED_AT and UPDATED_AT timestamps you may
|
||||||
|
| enable them and your models will fill their values as needed.
|
||||||
|
| You can also specify which fields should be treated as timestamps
|
||||||
|
| in case you don't follow the naming convention Eloquent uses.
|
||||||
|
| If your table doesn't have these fields, timestamps will be
|
||||||
|
| disabled for your model.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'timestamps' => true,
|
||||||
|
|
||||||
|
// 'timestamps' => [
|
||||||
|
// 'enabled' => true,
|
||||||
|
// 'fields' => [
|
||||||
|
// 'CREATED_AT' => 'created_at',
|
||||||
|
// 'UPDATED_AT' => 'updated_at',
|
||||||
|
// ]
|
||||||
|
// ],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Soft Deletes
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| If your tables support soft deletes with a DELETED_AT attribute,
|
||||||
|
| you can enable them here. You can also specify which field
|
||||||
|
| should be treated as a soft delete attribute in case you
|
||||||
|
| don't follow the naming convention Eloquent uses.
|
||||||
|
| If your table doesn't have this field, soft deletes will be
|
||||||
|
| disabled for your model.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'soft_deletes' => true,
|
||||||
|
|
||||||
|
// 'soft_deletes' => [
|
||||||
|
// 'enabled' => true,
|
||||||
|
// 'field' => 'deleted_at',
|
||||||
|
// ],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Date Format
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may define your models' date format. The following format
|
||||||
|
| is the default format Eloquent uses. You won't see it in your
|
||||||
|
| models unless you change it to a more convenient value.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'date_format' => 'Y-m-d H:i:s',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Pagination
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may define how many models Eloquent should display when
|
||||||
|
| paginating them. The default number is 15, so you might not
|
||||||
|
| see this number in your models unless you change it.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'per_page' => 15,
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Base Files
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| By default, your models will be generated in your models path, but
|
||||||
|
| when you generate them again they will be replaced by new ones.
|
||||||
|
| You may want to customize your models and, at the same time, be
|
||||||
|
| able to generate them as your tables change. For that, you
|
||||||
|
| can enable base files. These files will be replaced whenever
|
||||||
|
| you generate them, but your customized files will not be touched.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'base_files' => false,
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Snake Attributes
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Eloquent treats your model attributes as snake cased attributes, but
|
||||||
|
| if you have camel-cased fields in your database you can disable
|
||||||
|
| that behaviour and use camel case attributes in your models.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'snake_attributes' => true,
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Qualified Table Names
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| If some of your tables have cross-database relationships (probably in
|
||||||
|
| MySQL), you can make sure your models take into account their
|
||||||
|
| respective database schema.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'qualified_tables' => false,
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Hidden Attributes
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| When casting your models into arrays or json, the need to hide some
|
||||||
|
| attributes sometimes arise. If your tables have some fields you
|
||||||
|
| want to hide, you can define them bellow.
|
||||||
|
| Some fields were defined for you.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'hidden' => [
|
||||||
|
'*secret*', '*password', '*token',
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Mass Assignment Guarded Attributes
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| You may want to protect some fields from mass assignment. You can
|
||||||
|
| define them bellow. Some fields were defined for you.
|
||||||
|
| Your fillable attributes will be those which are not in the list
|
||||||
|
| excluding your models' primary keys.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'guarded' => [
|
||||||
|
// 'created_by', 'updated_by'
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Casts
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| You may want to specify which of your table fields should be casted as
|
||||||
|
| something different than a string. For instance, you may want a
|
||||||
|
| text field be casted as an array or and object.
|
||||||
|
|
|
||||||
|
| You may define column patterns which will be casted using the value
|
||||||
|
| assigned. We have defined some fields for you. Feel free to
|
||||||
|
| modify them to fit your needs.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'casts' => [
|
||||||
|
'*_json' => 'json',
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Excluded Tables
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| When performing the generation of models you may want to skip some of
|
||||||
|
| them, because you don't want a model for them or any other reason.
|
||||||
|
| You can define those tables bellow. The migrations table was
|
||||||
|
| filled for you, since you may not want a model for it.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'except' => [
|
||||||
|
'migrations',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Database Specifics
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| In this section you may define the default configuration for each model
|
||||||
|
| that will be generated from a specific database. You can also nest
|
||||||
|
| table specific configurations.
|
||||||
|
| These values will override those defined in the section above.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
// 'shop' => [
|
||||||
|
// 'path' => app_path(),
|
||||||
|
// 'namespace' => 'App',
|
||||||
|
// 'snake_attributes' => false,
|
||||||
|
// 'qualified_tables' => true,
|
||||||
|
// 'use' => [
|
||||||
|
// Reliese\Database\Eloquent\BitBooleans::class,
|
||||||
|
// ],
|
||||||
|
// 'except' => ['migrations'],
|
||||||
|
// // Table Specifics Bellow:
|
||||||
|
// 'user' => [
|
||||||
|
// // Don't use any default trait
|
||||||
|
// 'use' => [],
|
||||||
|
// ]
|
||||||
|
// ],
|
||||||
|
];
|
||||||
|
|
@ -32,7 +32,6 @@ class CreateTravelAgendaTable extends Migration
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,63 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
|
||||||
|
class CreateTravelUsersTable extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::connection('mysql_stern')->create('travel_users', function (Blueprint $table) {
|
||||||
|
$table->increments('id');
|
||||||
|
|
||||||
|
$table->bigInteger('salutation_id')->nullable();
|
||||||
|
$table->string('title')->nullable();
|
||||||
|
$table->string('first_name')->nullable();
|
||||||
|
$table->string('last_name')->nullable();
|
||||||
|
$table->string('email')->unique();
|
||||||
|
|
||||||
|
$table->string('password');
|
||||||
|
|
||||||
|
$table->string('company')->nullable();
|
||||||
|
|
||||||
|
$table->string('street')->nullable();
|
||||||
|
$table->string('zipcode', 10)->nullable();
|
||||||
|
$table->string('city')->nullable();
|
||||||
|
|
||||||
|
$table->string('phone')->nullable();
|
||||||
|
$table->string('mobil')->nullable();
|
||||||
|
$table->string('fax')->nullable();
|
||||||
|
|
||||||
|
$table->date('birthday')->nullable();
|
||||||
|
|
||||||
|
$table->integer('travel_nationality_id');
|
||||||
|
|
||||||
|
$table->text('new_data')->nullable();
|
||||||
|
|
||||||
|
|
||||||
|
$table->timestamps();
|
||||||
|
$table->softDeletes();
|
||||||
|
|
||||||
|
$table->foreign('travel_nationality_id')
|
||||||
|
->references('id')
|
||||||
|
->on('travel_nationality');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::connection('mysql_stern')->dropIfExists('travel_users');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,58 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
|
||||||
|
* @see https://github.com/cviebrock/sequel-pro-laravel-export
|
||||||
|
*/
|
||||||
|
class CreateFewoLodgingTable extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::connection('mysql_stern')->create('fewo_lodging', function (Blueprint $table) {
|
||||||
|
$table->increments('id');
|
||||||
|
$table->integer('group_id')->nullable();
|
||||||
|
$table->integer('type_id')->nullable();
|
||||||
|
$table->string('name', 255);
|
||||||
|
$table->longText('description');
|
||||||
|
$table->longText('equipment');
|
||||||
|
$table->string('adress1', 255);
|
||||||
|
$table->string('adress2', 255)->nullable();
|
||||||
|
$table->string('zip_code', 255);
|
||||||
|
$table->string('city', 255);
|
||||||
|
$table->integer('maximum_persons');
|
||||||
|
$table->double('deposit');
|
||||||
|
$table->tinyInteger('calendar_visible')->nullable();
|
||||||
|
|
||||||
|
$table->index('type_id', 'IDX_9629C357C54C8C93');
|
||||||
|
$table->index('group_id', 'group_id');
|
||||||
|
|
||||||
|
$table->foreign('type_id', 'FK_9629C357C54C8C93')->references('id')->on('fewo_lodging_type')->onDelete('RESTRICT
|
||||||
|
')->onUpdate('RESTRICT');
|
||||||
|
$table->foreign('group_id', 'fewo_lodging_ibfk_1')->references('id')->on('fewo_lodging_group')->onDelete('RESTRICT
|
||||||
|
')->onUpdate('RESTRICT');
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::connection('mysql_stern')->dropIfExists('fewo_lodging');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,49 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
|
||||||
|
* @see https://github.com/cviebrock/sequel-pro-laravel-export
|
||||||
|
*/
|
||||||
|
class CreateFewoLodgingGroupImageTable extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::connection('mysql_stern')->create('fewo_lodging_group_image', function (Blueprint $table) {
|
||||||
|
$table->increments('id');
|
||||||
|
$table->integer('group_id')->nullable();
|
||||||
|
$table->string('comp', 4)->nullable();
|
||||||
|
$table->smallInteger('pos')->nullable();
|
||||||
|
$table->string('full_file_name', 255);
|
||||||
|
$table->string('file_name', 255);
|
||||||
|
$table->string('description', 255)->nullable();
|
||||||
|
|
||||||
|
$table->index('group_id', 'group_id');
|
||||||
|
|
||||||
|
$table->foreign('group_id', 'fewo_lodging_group_image_ibfk_1')->references('id')->on('fewo_lodging_group')->onDelete('RESTRICT
|
||||||
|
')->onUpdate('RESTRICT');
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::connection('mysql_stern')->dropIfExists('fewo_lodging_group_image');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,43 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
|
||||||
|
* @see https://github.com/cviebrock/sequel-pro-laravel-export
|
||||||
|
*/
|
||||||
|
class CreateFewoLodgingGroupTable extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::connection('mysql_stern')->create('fewo_lodging_group', function (Blueprint $table) {
|
||||||
|
$table->increments('id');
|
||||||
|
$table->string('name', 255)->nullable();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::connection('mysql_stern')->dropIfExists('fewo_lodging_group');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,48 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
|
||||||
|
* @see https://github.com/cviebrock/sequel-pro-laravel-export
|
||||||
|
*/
|
||||||
|
class CreateFewoLodgingImageTable extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::connection('mysql_stern')->create('fewo_lodging_image', function (Blueprint $table) {
|
||||||
|
$table->increments('id');
|
||||||
|
$table->integer('lodging_id')->nullable();
|
||||||
|
$table->unsignedSmallInteger('pos')->nullable();
|
||||||
|
$table->string('full_file_name', 255);
|
||||||
|
$table->string('file_name', 255);
|
||||||
|
$table->string('description', 255)->nullable();
|
||||||
|
|
||||||
|
$table->index('lodging_id', 'IDX_D49F667187335AF1');
|
||||||
|
|
||||||
|
$table->foreign('lodging_id', 'FK_D49F667187335AF1')->references('id')->on('fewo_lodging')->onDelete('SET NULL
|
||||||
|
')->onUpdate('RESTRICT');
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::connection('mysql_stern')->dropIfExists('fewo_lodging_image');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,43 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
|
||||||
|
* @see https://github.com/cviebrock/sequel-pro-laravel-export
|
||||||
|
*/
|
||||||
|
class CreateFewoLodgingTypeTable extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::connection('mysql_stern')->create('fewo_lodging_type', function (Blueprint $table) {
|
||||||
|
$table->increments('id');
|
||||||
|
$table->string('name', 255)->nullable();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::connection('mysql_stern')->dropIfExists('fewo_lodging_type');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,50 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
|
||||||
|
* @see https://github.com/cviebrock/sequel-pro-laravel-export
|
||||||
|
*/
|
||||||
|
class CreateFewoPriceTable extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::connection('mysql_stern')->create('fewo_price', function (Blueprint $table) {
|
||||||
|
$table->increments('id');
|
||||||
|
$table->integer('lodging_id')->nullable();
|
||||||
|
$table->integer('season_id')->nullable();
|
||||||
|
$table->double('per_night');
|
||||||
|
$table->double('flat_price');
|
||||||
|
|
||||||
|
$table->index('lodging_id', 'IDX_3DE13C987335AF1');
|
||||||
|
$table->index('season_id', 'IDX_3DE13C94EC001D1');
|
||||||
|
|
||||||
|
$table->foreign('season_id', 'FK_3DE13C94EC001D1')->references('id')->on('fewo_season')->onDelete('SET NULL
|
||||||
|
')->onUpdate('RESTRICT');
|
||||||
|
$table->foreign('lodging_id', 'FK_3DE13C987335AF1')->references('id')->on('fewo_lodging')->onDelete('RESTRICT
|
||||||
|
')->onUpdate('RESTRICT');
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::connection('mysql_stern')->dropIfExists('fewo_price');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,48 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
|
||||||
|
* @see https://github.com/cviebrock/sequel-pro-laravel-export
|
||||||
|
*/
|
||||||
|
class CreateFewoReservationTable extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::connection('mysql_stern')->create('fewo_reservation', function (Blueprint $table) {
|
||||||
|
$table->increments('id');
|
||||||
|
$table->integer('lodging_id')->nullable();
|
||||||
|
$table->date('from_date');
|
||||||
|
$table->date('to_date');
|
||||||
|
$table->integer('status');
|
||||||
|
$table->integer('type')->nullable();
|
||||||
|
|
||||||
|
$table->index('lodging_id', 'IDX_36537F7487335AF1');
|
||||||
|
|
||||||
|
$table->foreign('lodging_id', 'FK_36537F7487335AF1')->references('id')->on('fewo_lodging')->onDelete('SET NULL
|
||||||
|
')->onUpdate('RESTRICT');
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::connection('mysql_stern')->dropIfExists('fewo_reservation');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,48 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
|
||||||
|
* @see https://github.com/cviebrock/sequel-pro-laravel-export
|
||||||
|
*/
|
||||||
|
class CreateFewoSeasonTable extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::connection('mysql_stern')->create('fewo_season', function (Blueprint $table) {
|
||||||
|
$table->increments('id');
|
||||||
|
$table->string('name', 255);
|
||||||
|
$table->date('from_date');
|
||||||
|
$table->date('to_date');
|
||||||
|
$table->integer('minimum_stay');
|
||||||
|
$table->longText('description')->nullable();
|
||||||
|
$table->integer('only_weekday')->nullable();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::connection('mysql_stern')->dropIfExists('fewo_season');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,45 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
|
||||||
|
class CreateTravelBookingFewoChannelsTable extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::connection('mysql_stern')->create('travel_booking_fewo_channels', function (Blueprint $table) {
|
||||||
|
$table->increments('id');
|
||||||
|
$table->string('name');
|
||||||
|
$table->timestamps();
|
||||||
|
});
|
||||||
|
|
||||||
|
$seed = array(
|
||||||
|
array('name'=>'Fewo-Direkt'),
|
||||||
|
array('name'=>'HRS'),
|
||||||
|
array('name'=>'Booking.com'),
|
||||||
|
array('name'=>'Traum-Ferienwohnungen.de'),
|
||||||
|
array('name'=>'Stammkunde'),
|
||||||
|
array('name'=>'Kunde von Frau Nikolai'),
|
||||||
|
);
|
||||||
|
DB::connection('mysql_stern')->table('travel_booking_fewo_channels')->insert($seed);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::connection('mysql_stern')->dropIfExists('travel_booking_fewo_channels');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,85 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
|
||||||
|
class CreateTravelUserBookingFewosTable extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::connection('mysql_stern')->create('travel_user_booking_fewos', function (Blueprint $table) {
|
||||||
|
$table->increments('id');
|
||||||
|
|
||||||
|
$table->unsignedInteger('travel_user_id')->index();
|
||||||
|
$table->integer('fewo_lodging_id')->index();
|
||||||
|
|
||||||
|
$table->string('invoice_number')->nullable();
|
||||||
|
|
||||||
|
$table->unsignedTinyInteger('persons')->nullable();
|
||||||
|
$table->unsignedTinyInteger('adults')->nullable();
|
||||||
|
$table->unsignedTinyInteger('children')->nullable();
|
||||||
|
|
||||||
|
$table->timestamp('booking_date')->useCurrent = true;
|
||||||
|
|
||||||
|
$table->date('from_date')->nullable();
|
||||||
|
$table->date('to_date')->nullable();
|
||||||
|
|
||||||
|
$table->text('daily_prices')->nullable();
|
||||||
|
$table->decimal('price_travel', 13, 2)->nullable();
|
||||||
|
$table->decimal('price_deposit', 8, 2)->nullable();
|
||||||
|
$table->decimal('price_service', 8, 2)->nullable();
|
||||||
|
$table->decimal('price_total', 13, 2)->nullable();
|
||||||
|
|
||||||
|
|
||||||
|
$table->unsignedInteger('travel_booking_fewo_channel_id')->index();
|
||||||
|
|
||||||
|
$table->text('notice')->nullable();
|
||||||
|
|
||||||
|
|
||||||
|
$table->boolean('is_calendar_fewo_direct')->default(false); // Fewo-Direkt, HRS und STERN TOUR
|
||||||
|
$table->boolean('is_calendar_hrs')->default(false);
|
||||||
|
$table->boolean('is_calendar_stern_tours')->default(false);
|
||||||
|
|
||||||
|
$table->unsignedTinyInteger('status')->default(0);
|
||||||
|
$table->text('status_text')->nullable();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$table->timestamps();
|
||||||
|
$table->softDeletes();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$table->foreign('fewo_lodging_id')
|
||||||
|
->references('id')
|
||||||
|
->on('fewo_lodging')
|
||||||
|
->onDelete('CASCADE');
|
||||||
|
|
||||||
|
$table->foreign('travel_user_id')
|
||||||
|
->references('id')
|
||||||
|
->on('travel_users')
|
||||||
|
->onDelete('CASCADE');
|
||||||
|
|
||||||
|
|
||||||
|
$table->foreign('travel_booking_fewo_channel_id')
|
||||||
|
->references('id')
|
||||||
|
->on('travel_booking_fewo_channels');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::connection('mysql_stern')->dropIfExists('travel_user_booking_fewos');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -8,7 +8,7 @@ use Illuminate\Database\Migrations\Migration;
|
||||||
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
|
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
|
||||||
* @see https://github.com/cviebrock/sequel-pro-laravel-export
|
* @see https://github.com/cviebrock/sequel-pro-laravel-export
|
||||||
*/
|
*/
|
||||||
class CreateTravelCountryTable extends Migration
|
class CreateSalutationTable extends Migration
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Run the migrations.
|
* Run the migrations.
|
||||||
|
|
@ -17,13 +17,12 @@ class CreateTravelCountryTable extends Migration
|
||||||
*/
|
*/
|
||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
Schema::create('travel_country', function (Blueprint $table) {
|
Schema::create('salutation', function (Blueprint $table) {
|
||||||
$table->bigIncrements('id');
|
$table->bigIncrements('id');
|
||||||
$table->string('name', 255);
|
$table->string('name', 255);
|
||||||
$table->tinyInteger('is_customer_country')->nullable()->default(false);
|
|
||||||
$table->boolean('active_backend')->nullable()->default(false);
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -33,6 +32,6 @@ class CreateTravelCountryTable extends Migration
|
||||||
*/
|
*/
|
||||||
public function down()
|
public function down()
|
||||||
{
|
{
|
||||||
Schema::dropIfExists('travel_country');
|
Schema::dropIfExists('salutation');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
38
database/migrations/sym/0002_sym_salutation_table.php
Executable file
38
database/migrations/sym/0002_sym_salutation_table.php
Executable file
|
|
@ -0,0 +1,38 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
|
||||||
|
* @see https://github.com/cviebrock/sequel-pro-laravel-export
|
||||||
|
*/
|
||||||
|
class CreateTravelCountryTable extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::create('travel_country', function (Blueprint $table) {
|
||||||
|
$table->bigIncrements('id');
|
||||||
|
$table->string('name', 255);
|
||||||
|
$table->tinyInteger('is_customer_country')->nullable()->default(false);
|
||||||
|
$table->boolean('active_backend')->nullable()->default(false);
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('travel_country');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -62,6 +62,19 @@ $(function() {
|
||||||
clearBtn: true,
|
clearBtn: true,
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('.datepicker-birthday').datepicker({
|
||||||
|
todayBtn: 'linked',
|
||||||
|
daysOfWeekDisabled: '1',
|
||||||
|
multidate: false,
|
||||||
|
daysOfWeekHighlighted: '0,6',
|
||||||
|
autoclose: true,
|
||||||
|
format: 'dd.mm.yyyy',
|
||||||
|
language: 'de',
|
||||||
|
clearBtn: true,
|
||||||
|
startView: 2,
|
||||||
|
|
||||||
|
});
|
||||||
});
|
});
|
||||||
/*
|
/*
|
||||||
$(function() {
|
$(function() {
|
||||||
|
|
|
||||||
|
|
@ -21,21 +21,58 @@
|
||||||
<li class="sidenav-divider mb-1"></li>
|
<li class="sidenav-divider mb-1"></li>
|
||||||
<li class="sidenav-header small font-weight-semibold">ADMIN CRM</li>
|
<li class="sidenav-header small font-weight-semibold">ADMIN CRM</li>
|
||||||
|
|
||||||
|
<li class="sidenav-item{{ Request::is('travel/*') ? ' open' : '' }} {{ Request::is('drafts') ? ' open' : '' }}">
|
||||||
|
<a href="javascript:void(0)" class="sidenav-link sidenav-toggle">
|
||||||
|
<i class="sidenav-icon ion ion-ios-airplane"></i>
|
||||||
|
<div>Reiseprogramme</div>
|
||||||
|
</a>
|
||||||
|
<ul class="sidenav-menu">
|
||||||
|
<li class="sidenav-item{{ Request::is('travel/*') ? ' active' : '' }}">
|
||||||
|
<a href="{{ route('travel_programs') }}" class="sidenav-link"><i class="sidenav-icon ion ion-md-airplane"></i><div>Programme</div></a>
|
||||||
|
</li>
|
||||||
|
<li class="sidenav-item{{ Request::is('drafts') ? ' active' : '' }}">
|
||||||
|
<a href="{{ route('drafts') }}" class="sidenav-link"><i class="sidenav-icon ion ion-md-paper"></i><div>Vorlagen</div></a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
|
||||||
<li class="sidenav-item{{ Request::is('travel_programs') ? ' active' : '' }}">
|
|
||||||
<a href="{{ route('travel_programs') }}" class="sidenav-link"><i class="sidenav-icon ion ion-md-airplane"></i><div>Programme</div></a>
|
<li class="sidenav-item{{ Request::is('requests') ? ' open' : '' }} {{ Request::is('bookings') ? ' open' : '' }} {{ Request::is('booking/*') ? ' open' : '' }}">
|
||||||
|
<a href="javascript:void(0)" class="sidenav-link sidenav-toggle">
|
||||||
|
<i class="sidenav-icon ion ion-md-bed"></i>
|
||||||
|
<div>Buchungen</div>
|
||||||
|
</a>
|
||||||
|
<ul class="sidenav-menu">
|
||||||
|
<li class="sidenav-item{{ Request::is('requests') ? ' active' : '' }}">
|
||||||
|
<a href="{{ route('requests') }}" class="sidenav-link"><i class="sidenav-icon ion ion-md-search"></i><div>Anfragen</div></a>
|
||||||
|
</li>
|
||||||
|
<li class="sidenav-item{{ Request::is('bookings') ? ' active' : '' }} {{ Request::is('booking/*') ? ' active' : '' }}">
|
||||||
|
<a href="{{ route('bookings') }}" class="sidenav-link"><i class="sidenav-icon ion ion-md-bed"></i><div>Buchungen</div></a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li class="sidenav-item{{ Request::is('drafts') ? ' active' : '' }}">
|
|
||||||
<a href="{{ route('drafts') }}" class="sidenav-link"><i class="sidenav-icon ion ion-md-paper"></i><div>Vorlagen</div></a>
|
|
||||||
</li>
|
<li class="sidenav-item{{ Request::is('travel_users') ? ' open' : '' }} {{ Request::is('travel_user/*') ? ' open' : '' }} {{ Request::is('booking/*') ? ' open' : '' }} {{ Request::is('travel_user_booking_fewos') ? ' open' : '' }} {{ Request::is('travel_user_booking_fewo/*') ? ' open' : '' }}">
|
||||||
<li class="sidenav-item{{ Request::is('requests') ? ' active' : '' }}">
|
<a href="javascript:void(0)" class="sidenav-link sidenav-toggle">
|
||||||
<a href="{{ route('requests') }}" class="sidenav-link"><i class="sidenav-icon ion ion-md-search"></i><div>Anfragen</div></a>
|
<i class="sidenav-icon ion ion-ios-people"></i>
|
||||||
</li>
|
<div>Kundenverwaltung</div>
|
||||||
<li class="sidenav-item{{ Request::is('bookings') ? ' active' : '' }}">
|
</a>
|
||||||
<a href="{{ route('bookings') }}" class="sidenav-link"><i class="sidenav-icon ion ion-md-bed"></i><div>Buchungen</div></a>
|
<ul class="sidenav-menu">
|
||||||
|
<li class="sidenav-item{{ Request::is('travel_users') ? ' active' : '' }} {{ Request::is('travel_user/*') ? ' active' : '' }}">
|
||||||
|
<a href="{{ route('travel_users') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-people"></i><div>Kunden (FeWo)</div></a>
|
||||||
|
</li>
|
||||||
|
<li class="sidenav-item{{ Request::is('travel_user_booking_fewos') ? ' active' : '' }} {{ Request::is('travel_user_booking_fewo/*') ? ' active' : '' }}">
|
||||||
|
<a href="{{ route('travel_user_booking_fewos') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-bed"></i><div>Buchungen (FeWo)</div></a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<li class="sidenav-divider mb-1"></li>
|
<li class="sidenav-divider mb-1"></li>
|
||||||
<li class="sidenav-header small font-weight-semibold">ADMIN CRM altes System</li>
|
<li class="sidenav-header small font-weight-semibold">ADMIN CRM altes System</li>
|
||||||
|
|
||||||
|
|
@ -72,20 +109,20 @@
|
||||||
<li class="sidenav-divider mb-1"></li>
|
<li class="sidenav-divider mb-1"></li>
|
||||||
<li class="sidenav-header small font-weight-semibold">ADMIN CMS</li>
|
<li class="sidenav-header small font-weight-semibold">ADMIN CMS</li>
|
||||||
|
|
||||||
<li class="sidenav-item{{ Request::is('cms/content/*') ? ' active' : '' }}">
|
<li class="sidenav-item{{ Request::is('cms/content') ? ' active' : '' }}">
|
||||||
<a href="{{ route('cms_content') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-paper"></i><div>Inhalte</div></a>
|
<a href="{{ route('cms_content') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-paper"></i><div>Inhalte</div></a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="sidenav-item{{ Request::is('cms/travel_magazine/*') ? ' active' : '' }}">
|
<li class="sidenav-item{{ Request::is('cms/travel_magazine') ? ' active' : '' }}">
|
||||||
<a href="{{ route('cms_travel_magazine') }}" class="sidenav-link"><i class="sidenav-icon ion ion-md-map"></i><div>Reiseführer</div></a>
|
<a href="{{ route('cms_travel_magazine') }}" class="sidenav-link"><i class="sidenav-icon ion ion-md-map"></i><div>Reiseführer</div></a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
||||||
<li class="sidenav-item{{ Request::is('cms/feedback/*') ? ' active' : '' }}">
|
<li class="sidenav-item{{ Request::is('cms/feedback') ? ' active' : '' }}">
|
||||||
<a href="{{ route('cms_feedback') }}" class="sidenav-link"><i class="sidenav-icon ion ion-md-chatboxes"></i><div>Feedback</div></a>
|
<a href="{{ route('cms_feedback') }}" class="sidenav-link"><i class="sidenav-icon ion ion-md-chatboxes"></i><div>Feedback</div></a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="sidenav-item{{ Request::is('cms/sidebar/*') ? ' active' : '' }}">
|
<li class="sidenav-item{{ Request::is('cms/sidebar') ? ' active' : '' }}">
|
||||||
<a href="{{ route('cms_sidebar') }}" class="sidenav-link"><i class="sidenav-icon ion ion-md-list"></i><div>Sidebar</div></a>
|
<a href="{{ route('cms_sidebar') }}" class="sidenav-link"><i class="sidenav-icon ion ion-md-list"></i><div>Sidebar</div></a>
|
||||||
</li>
|
</li>
|
||||||
@endif
|
@endif
|
||||||
|
|
@ -103,13 +140,13 @@
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<ul class="sidenav-menu">
|
<ul class="sidenav-menu">
|
||||||
<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>
|
||||||
</li>
|
</li>
|
||||||
<li class="sidenav-item{{ Request::is('admin/settings/travel/country/*') ? ' active' : '' }}">
|
<li class="sidenav-item{{ Request::is('admin/settings/travel/country') ? ' active' : '' }}">
|
||||||
<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>
|
||||||
<li class="sidenav-item{{ Request::is('admin/settings/travel/nationality/*') ? ' active' : '' }}">
|
<li class="sidenav-item{{ Request::is('admin/settings/travel/nationality') ? ' active' : '' }}">
|
||||||
<a href="{{ route('admin_settings_travel_nationality') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-people"></i><div>{{ __('Nationalitäten') }}</div></a>
|
<a href="{{ route('admin_settings_travel_nationality') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-people"></i><div>{{ __('Nationalitäten') }}</div></a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
@ -117,11 +154,11 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<li class="sidenav-item{{ Request::is('admin/users/*') ? ' active' : '' }} {{ Request::is('admin/user/edit/*') ? ' active' : '' }}">
|
<li class="sidenav-item{{ Request::is('admin/users') ? ' active' : '' }} {{ Request::is('admin/user/edit/*') ? ' active' : '' }}">
|
||||||
<a href="{{ route('admin_users') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-ribbon"></i><div>{{ __('User Rechte') }}</div></a>
|
<a href="{{ route('admin_users') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-ribbon"></i><div>{{ __('User Rechte') }}</div></a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="sidenav-item{{ Request::is('admin/translate/*') ? ' open' : '' }}">
|
{{-- <li class="sidenav-item{{ Request::is('admin/translate/*') ? ' open' : '' }}">
|
||||||
<a href="javascript:void(0)" class="sidenav-link sidenav-toggle">
|
<a href="javascript:void(0)" class="sidenav-link sidenav-toggle">
|
||||||
<i class="sidenav-icon ion ion-ios-browsers"></i>
|
<i class="sidenav-icon ion ion-ios-browsers"></i>
|
||||||
<div>Inhalte</div>
|
<div>Inhalte</div>
|
||||||
|
|
@ -136,6 +173,7 @@
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
--}}
|
||||||
|
|
||||||
|
|
||||||
@endif
|
@endif
|
||||||
|
|
|
||||||
41
resources/views/travel/user/booking/detail.blade.php
Executable file
41
resources/views/travel/user/booking/detail.blade.php
Executable file
|
|
@ -0,0 +1,41 @@
|
||||||
|
@extends('layouts.layout-2')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
|
||||||
|
@if ($errors->any())
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="alert alert-danger">
|
||||||
|
<ul>
|
||||||
|
@foreach ($errors->all() as $error)
|
||||||
|
<li>{{ $error }}</li>
|
||||||
|
@endforeach
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
<h4 class="font-weight-bold py-3 mb-1">
|
||||||
|
Kunden @if($id == "new") <span class="text-primary">anlegen</span> @else {{"(ID: ".$id.")"}} verwalten @endif
|
||||||
|
</h4>
|
||||||
|
|
||||||
|
{!! Form::open(['url' => route('travel_user_booking_fewo_detail', [$id]), 'class' => 'form-horizontal']) !!}
|
||||||
|
<input type="hidden" name="id" id="id" value="{{$id}}">
|
||||||
|
|
||||||
|
@include('travel.user.booking.form')
|
||||||
|
|
||||||
|
<div class="text-left mt-3">
|
||||||
|
<button type="submit" name="action" value="saveAll" class="btn btn-submit">{{ __('save changes') }}</button>
|
||||||
|
<a href="{{route('travel_user_booking_fewos')}}" class="btn btn-default">{{ __('back') }}</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{!! Form::close() !!}
|
||||||
|
|
||||||
|
@endsection
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
144
resources/views/travel/user/booking/form.blade.php
Executable file
144
resources/views/travel/user/booking/form.blade.php
Executable file
|
|
@ -0,0 +1,144 @@
|
||||||
|
|
||||||
|
<div class="card mb-2">
|
||||||
|
<div class="card-body">
|
||||||
|
|
||||||
|
<div class="form-row">
|
||||||
|
<div class="form-group col-md-6">
|
||||||
|
<label class="form-label">{{ __('Kunde') }}*</label>
|
||||||
|
<select class="selectpicker" data-style="btn-light" name="travel_user_id" data-live-search="true" required>
|
||||||
|
{!! HTMLHelper::getTravelUserOptions($travel_user_booking_fewo->travel_user_id) !!}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-md-6">
|
||||||
|
<label class="form-label">{{ __('FeWo') }}*</label>
|
||||||
|
<select class="selectpicker" data-style="btn-light" name="fewo_lodging_id" required>
|
||||||
|
{!! HTMLHelper::getFewoLodgingOptions($travel_user_booking_fewo->fewo_lodging_id) !!}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<div class="form-row">
|
||||||
|
<div class="form-group col-sm-6">
|
||||||
|
<label class="form-label" for="invoice_number">{{ __('Rechnungsnummer') }}</label>
|
||||||
|
{{ Form::text('invoice_number', $travel_user_booking_fewo->invoice_number, array('placeholder'=>__('Rechnungsnummer'), 'class'=>'form-control')) }}
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-sm-6">
|
||||||
|
<label class="form-label" for="booking_date">{{ __('Buchungsdatum') }}*</label>
|
||||||
|
{{ Form::text('booking_date', $travel_user_booking_fewo->booking_date, array('placeholder'=>__('Buchungsdatum'), 'class'=>'form-control datepicker-base', 'required'=>true)) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<div class="form-row">
|
||||||
|
|
||||||
|
<div class="form-group col-sm-4">
|
||||||
|
<label class="form-label" for="adults">{{ __('Erwachsene') }}</label>
|
||||||
|
{{ Form::text('adults', $travel_user_booking_fewo->adults, array('placeholder'=>__('Erwachsene'), 'class'=>'form-control')) }}
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-sm-4">
|
||||||
|
<label class="form-label" for="children">{{ __('Kinder') }}</label>
|
||||||
|
{{ Form::text('children', $travel_user_booking_fewo->children, array('placeholder'=>__('Kinder'), 'class'=>'form-control')) }}
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-sm-4">
|
||||||
|
<label class="form-label" for="persons">{{ __('Personen Gesamt') }}*</label>
|
||||||
|
{{ Form::text('persons', $travel_user_booking_fewo->persons, array('placeholder'=>__('Personen'), 'class'=>'form-control', 'readonly')) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<div class="form-row">
|
||||||
|
<div class="form-group col-sm-6">
|
||||||
|
<label class="form-label" for="from_date">{{ __('Datum von') }}*</label>
|
||||||
|
{{ Form::text('from_date', $travel_user_booking_fewo->from_date, array('placeholder'=>__('Datum von'), 'class'=>'form-control datepicker-base', 'required'=>true)) }}
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-sm-6">
|
||||||
|
<label class="form-label" for="to_date">{{ __('Datum bis') }}*</label>
|
||||||
|
{{ Form::text('to_date', $travel_user_booking_fewo->to_date, array('placeholder'=>__('Datum bis'), 'class'=>'form-control datepicker-base', 'required'=>true)) }}
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-sm-12">
|
||||||
|
<em>Änderungen werden nicht bei den Reservierungen geändert!</em>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
<div class="form-row">
|
||||||
|
<div class="form-group col-sm-3">
|
||||||
|
<label class="form-label" for="price_travel">{{ __('Preis Übernachtungen') }}*</label>
|
||||||
|
{{ Form::text('price_travel', $travel_user_booking_fewo->price_travel, array('placeholder'=>__('Preis Übernachtungen'), 'class'=>'form-control')) }}
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-sm-3">
|
||||||
|
<label class="form-label" for="price_service">{{ __('Preis Service-Gebühr') }}*</label>
|
||||||
|
{{ Form::text('price_service', $travel_user_booking_fewo->price_service, array('placeholder'=>__('Preis Service-Gebühr'), 'class'=>'form-control')) }}
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-sm-3">
|
||||||
|
<label class="form-label" for="price_deposit">{{ __('Preis Kaution') }}*</label>
|
||||||
|
{{ Form::text('price_deposit', $travel_user_booking_fewo->price_deposit, array('placeholder'=>__('Preis Kaution'), 'class'=>'form-control')) }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group col-sm-3">
|
||||||
|
<label class="form-label" for="price_total">{{ __('Preis Gesamt') }}*</label>
|
||||||
|
{{ Form::text('price_total', $travel_user_booking_fewo->price_total, array('placeholder'=>__('Preis Gesamt'), 'class'=>'form-control', 'readonly')) }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
<div class="form-row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<label class="form-label">Eingetragen in</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-sm-4">
|
||||||
|
<label class="custom-control custom-checkbox">
|
||||||
|
{!! Form::checkbox('is_calendar_fewo_direct', 1, $travel_user_booking_fewo->is_calendar_fewo_direct, ['class'=>'custom-control-input']) !!}
|
||||||
|
<span class="custom-control-label">{{__('FEWO Direkt')}}</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-sm-4">
|
||||||
|
<label class="custom-control custom-checkbox">
|
||||||
|
{!! Form::checkbox('is_calendar_hrs', 1, $travel_user_booking_fewo->is_calendar_hrs, ['class'=>'custom-control-input']) !!}
|
||||||
|
<span class="custom-control-label">{{__('HRS')}}</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-sm-4">
|
||||||
|
<label class="custom-control custom-checkbox">
|
||||||
|
{!! Form::checkbox('is_calendar_stern_tours', 1, $travel_user_booking_fewo->is_calendar_stern_tours, ['class'=>'custom-control-input']) !!}
|
||||||
|
<span class="custom-control-label">{{__('STERN TOURS')}}</span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-row">
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="form-label">{{ __('Status') }}*</label>
|
||||||
|
<select class="selectpicker" data-style="btn-light" name="status" required>
|
||||||
|
{!! \App\Models\TravelUserBookingFewo::getStatuesOptions($travel_user_booking_fewo->status) !!}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="form-label">{{ __('Kanal') }}*</label>
|
||||||
|
<select class="selectpicker" data-style="btn-light" name="travel_booking_fewo_channel_id" required>
|
||||||
|
{!! HTMLHelper::getTravelBookingFewoChannelOptions($travel_user_booking_fewo->travel_booking_fewo_channel_id) !!}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-sm-6">
|
||||||
|
<label class="form-label" for="status_text">{{ __('Notiz') }}</label>
|
||||||
|
{{ Form::textarea('status_text', $travel_user_booking_fewo->status_text, ['class' => 'form-control', 'rows'=>4]) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="form-row">
|
||||||
|
<div class="form-group col-sm-12">
|
||||||
|
<label class="form-label" for="notice">{{ __('Bemerkung Kunde') }}*</label>
|
||||||
|
{{ Form::textarea('notice', $travel_user_booking_fewo->notice, ['class' => 'form-control', 'rows'=>4]) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
97
resources/views/travel/user/booking/index.blade.php
Executable file
97
resources/views/travel/user/booking/index.blade.php
Executable file
|
|
@ -0,0 +1,97 @@
|
||||||
|
@extends('layouts.layout-2')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<h4 class="font-weight-bold py-3 mb-1">
|
||||||
|
{{ __('Buchungen') }} FeWo
|
||||||
|
</h4>
|
||||||
|
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-datatable table-responsive py-2">
|
||||||
|
<div class="mr-4 mb-2 text-right">
|
||||||
|
<a href="{{ route('travel_user_booking_fewo_detail', ['new']) }}" class="btn btn-sm btn-primary">Neue Buchung anlegen</a>
|
||||||
|
</div>
|
||||||
|
<table id="datatables-default" class="table table-striped table-bordered">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th style="max-width: 10px;"> </th>
|
||||||
|
<th>{{__('ID')}}</th>
|
||||||
|
<th>{{__('FeWo')}}</th>
|
||||||
|
<th>{{__('Kunde')}}</th>
|
||||||
|
<th>{{__('vom')}}</th>
|
||||||
|
<th>{{__('bis')}}</th>
|
||||||
|
<th>{{__('Eingetragen')}}</th>
|
||||||
|
<th>{{__('Status')}}</th>
|
||||||
|
<th>{{__('Datum')}}</th>
|
||||||
|
<th style="max-width: 60px;">{{__('delete')}}</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
</table>
|
||||||
|
<div class="mr-4 mt-2 text-right">
|
||||||
|
<a href="{{ route('travel_user_booking_fewo_detail', ['new']) }}" class="btn btn-sm btn-primary">Neue Buchung anlegen</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$( document ).ready(function() {
|
||||||
|
|
||||||
|
$('#datatables-default').dataTable({
|
||||||
|
"processing": true,
|
||||||
|
"serverSide": true,
|
||||||
|
"searching": false,
|
||||||
|
"ajax": '{!! route('data_table_travel_user_booking_fewos') !!}',
|
||||||
|
"columns": [
|
||||||
|
{ data: 'action_edit', orderable: false, searchable: false},
|
||||||
|
{ data: 'id', name: 'id' },
|
||||||
|
{ data: 'fewo_lodging', name: 'fewo_lodging' },
|
||||||
|
{ data: 'travel_user', name: 'travel_user', orderable: false, },
|
||||||
|
{ data: 'from_date', name: 'from_date' },
|
||||||
|
{ data: 'to_date', name: 'to_date' },
|
||||||
|
{ data: 'is_calendar', name: 'is_calendar', orderable: false },
|
||||||
|
{ data: 'status_name', name: 'status_name' },
|
||||||
|
{ data: 'booking_date', name: 'booking_date' },
|
||||||
|
{ data: 'action_delete', orderable: false, searchable: false},
|
||||||
|
],
|
||||||
|
"order": [[ 1, "desc" ]],
|
||||||
|
"bLengthChange": false,
|
||||||
|
"iDisplayLength": 50,
|
||||||
|
"language": {
|
||||||
|
"url": "/js/German.json"
|
||||||
|
},
|
||||||
|
|
||||||
|
/*initComplete: function () {
|
||||||
|
|
||||||
|
|
||||||
|
this.api().columns(2).every( function () {
|
||||||
|
var column = this;
|
||||||
|
var title = $(column.header()).html();
|
||||||
|
var select = $('<select class="selectpicker"><option value="">'+title+'</option></select>')
|
||||||
|
.appendTo( $(column.header()).empty() )
|
||||||
|
.on( 'change', function () {
|
||||||
|
var val = $.fn.dataTable.util.escapeRegex(
|
||||||
|
$(this).val()
|
||||||
|
);
|
||||||
|
|
||||||
|
column
|
||||||
|
.search( val ? '^'+val+'$' : '', true, false )
|
||||||
|
.draw();
|
||||||
|
} );
|
||||||
|
column.data().unique().sort().each( function ( d, j ) {
|
||||||
|
if(d !== ""){
|
||||||
|
var text = $(d+' span').text();
|
||||||
|
if(text != "" && text != "-"){
|
||||||
|
select.append( '<option value="'+$(d).data('order')+'">'+ $(d+' span').text()+'</option>' );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} );
|
||||||
|
} );
|
||||||
|
|
||||||
|
$('.selectpicker').selectpicker();
|
||||||
|
}*/
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@endsection
|
||||||
41
resources/views/travel/user/detail.blade.php
Executable file
41
resources/views/travel/user/detail.blade.php
Executable file
|
|
@ -0,0 +1,41 @@
|
||||||
|
@extends('layouts.layout-2')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
|
||||||
|
@if ($errors->any())
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="alert alert-danger">
|
||||||
|
<ul>
|
||||||
|
@foreach ($errors->all() as $error)
|
||||||
|
<li>{{ $error }}</li>
|
||||||
|
@endforeach
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
<h4 class="font-weight-bold py-3 mb-1">
|
||||||
|
Kunden @if($id == "new") <span class="text-primary">anlegen</span> @else {{"(ID: ".$id.")"}} verwalten @endif
|
||||||
|
</h4>
|
||||||
|
|
||||||
|
{!! Form::open(['url' => route('travel_user_detail', [$id]), 'class' => 'form-horizontal']) !!}
|
||||||
|
<input type="hidden" name="id" id="id" value="{{$id}}">
|
||||||
|
|
||||||
|
@include('travel.user.form')
|
||||||
|
|
||||||
|
<div class="text-left mt-3">
|
||||||
|
<button type="submit" name="action" value="saveAll" class="btn btn-submit">{{ __('save changes') }}</button>
|
||||||
|
<a href="{{route('travel_users')}}" class="btn btn-default">{{ __('back') }}</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{!! Form::close() !!}
|
||||||
|
|
||||||
|
@endsection
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
109
resources/views/travel/user/form.blade.php
Executable file
109
resources/views/travel/user/form.blade.php
Executable file
|
|
@ -0,0 +1,109 @@
|
||||||
|
|
||||||
|
<div class="card mb-2">
|
||||||
|
<div class="card-body">
|
||||||
|
|
||||||
|
<div class="form-row">
|
||||||
|
<div class="form-group col-sm-4">
|
||||||
|
<label class="form-label">{{ __('Salutation') }}*</label>
|
||||||
|
<select class="selectpicker" data-style="btn-light" name="salutation_id" required>
|
||||||
|
{!! HTMLHelper::getSalutationOptions($travel_user->salutation_id) !!}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-sm-8">
|
||||||
|
<label class="form-label" for="title">{{ __('Title') }}</label>
|
||||||
|
{{ Form::text('title', $travel_user->title, array('placeholder'=>__('Title'), 'class'=>'form-control')) }}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-row">
|
||||||
|
<div class="form-group col-sm-6">
|
||||||
|
<label class="form-label" for="first_name">{{ __('First name') }}*</label>
|
||||||
|
{{ Form::text('first_name', $travel_user->first_name, array('placeholder'=>__('First name'), 'class'=>'form-control', 'required'=>true)) }}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-sm-6">
|
||||||
|
<label class="form-label" for="last_name">{{ __('Last Name') }}*</label>
|
||||||
|
{{ Form::text('last_name', $travel_user->last_name, array('placeholder'=>__('Last Name'), 'class'=>'form-control', 'required'=>true)) }}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="form-label" for="company">{{ __('Firma') }}</label>
|
||||||
|
{{ Form::text('company', $travel_user->company, array('placeholder'=>__('Firma'), 'class'=>'form-control')) }}
|
||||||
|
</div>
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="form-label" for="street">{{ __('Street') }} / {{ __('House number') }}</label>
|
||||||
|
{{ Form::text('street', $travel_user->street, array('placeholder'=>__('Street'), 'class'=>'form-control')) }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-row">
|
||||||
|
<div class="form-group col-sm-3">
|
||||||
|
<label class="form-label" for="zipcode">{{ __('Postcode') }}</label>
|
||||||
|
{{ Form::text('zipcode', $travel_user->zipcode, array('placeholder'=>__('Postcode'), 'class'=>'form-control')) }}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-sm-5">
|
||||||
|
<label class="form-label" for="city">{{ __('City') }}</label>
|
||||||
|
{{ Form::text('city', $travel_user->city, array('placeholder'=>__('City'), 'class'=>'form-control')) }}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-sm-4 {{ $errors->has('travel_nationality_id') ? 'has-error' : '' }}">
|
||||||
|
<label class="form-label">{{ __('Country') }}*</label>
|
||||||
|
<select class="selectpicker" name="travel_nationality_id" id="travel_nationality_id" data-style="btn-light" data-live-search="true" required>
|
||||||
|
{!! HTMLHelper::getTravelNationalityOptions($travel_user->travel_nationality_id) !!}
|
||||||
|
</select>
|
||||||
|
@if ($errors->has('travel_nationality_id'))
|
||||||
|
<span class="help-block">
|
||||||
|
<strong>{{ $errors->first('travel_nationality_id') }}</strong>
|
||||||
|
</span>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="form-row">
|
||||||
|
<div class="form-group col-sm-6">
|
||||||
|
<label class="form-label" for="phone">{{ __('Phone') }}</label>
|
||||||
|
{{ Form::text('phone', $travel_user->phone, array('placeholder'=>__('Phone'), 'class'=>'form-control')) }}
|
||||||
|
</div>
|
||||||
|
<div class="form-group col-sm-6">
|
||||||
|
<label class="form-label" for="mobil">{{ __('Mobile Phone') }}</label>
|
||||||
|
{{ Form::text('mobil', $travel_user->mobil, array('placeholder'=>__('Mobile Phone'), 'class'=>'form-control')) }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group col-sm-6">
|
||||||
|
<label for="birthday" class="form-label">{{ __('Geburtstag') }}</label>
|
||||||
|
{{ Form::text('birthday', $travel_user->birthday, array('placeholder'=>Util::formatDate(), 'data-date-format'=>Util::formatDate(), 'data-start_view'=>2, 'class'=>'form-control datepicker-birthday')) }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group col-sm-6">
|
||||||
|
<label class="form-label" for="fax">{{ __('Fax') }}</label>
|
||||||
|
{{ Form::text('fax', $travel_user->fax, array('placeholder'=>__('Fax'), 'class'=>'form-control')) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
<div class="form-row">
|
||||||
|
<div class="form-group col-sm-12">
|
||||||
|
<label class="form-label" for="email">{{ __('E-Mail Address') }}*</label>
|
||||||
|
{{ Form::text('email', $travel_user->email, array('placeholder'=>'E-Mail', 'class'=>'form-control', 'required'=>true)) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
58
resources/views/travel/user/index.blade.php
Executable file
58
resources/views/travel/user/index.blade.php
Executable file
|
|
@ -0,0 +1,58 @@
|
||||||
|
@extends('layouts.layout-2')
|
||||||
|
|
||||||
|
@section('content')
|
||||||
|
<h4 class="font-weight-bold py-3 mb-1">
|
||||||
|
{{ __('Kunden') }} (FeWo)
|
||||||
|
</h4>
|
||||||
|
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-datatable table-responsive py-2">
|
||||||
|
<div class="mr-4 mb-2 text-right">
|
||||||
|
<a href="{{ route('travel_user_detail', ['new']) }}" class="btn btn-sm btn-primary">Neue Kunden anlegen</a>
|
||||||
|
</div>
|
||||||
|
<table id="datatables-default" class="table table-striped table-bordered">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th style="max-width: 10px;"> </th>
|
||||||
|
<th>{{__('ID')}}</th>
|
||||||
|
<th>{{__('Vorname')}}</th>
|
||||||
|
<th>{{__('Nachname')}}</th>
|
||||||
|
<th>{{__('E-Mail')}}</th>
|
||||||
|
<th style="max-width: 60px;">{{__('delete')}}</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
</table>
|
||||||
|
<div class="mr-4 mt-2 text-right">
|
||||||
|
<a href="{{ route('travel_user_detail', ['new']) }}" class="btn btn-sm btn-primary">Neue Kunden anlegen</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
$( document ).ready(function() {
|
||||||
|
|
||||||
|
$('#datatables-default').dataTable({
|
||||||
|
"processing": true,
|
||||||
|
"serverSide": true,
|
||||||
|
"ajax": '{!! route('data_table_travel_users') !!}',
|
||||||
|
"columns": [
|
||||||
|
{ data: 'action_edit', orderable: false, searchable: false},
|
||||||
|
{ data: 'id', name: 'id' },
|
||||||
|
{ data: 'first_name', name: 'first_name' },
|
||||||
|
{ data: 'last_name', name: 'last_name' },
|
||||||
|
{ data: 'email', name: 'email' },
|
||||||
|
{ data: 'action_delete', orderable: false, searchable: false},
|
||||||
|
],
|
||||||
|
"order": [[ 1, "desc" ]],
|
||||||
|
"bLengthChange": false,
|
||||||
|
"iDisplayLength": 50,
|
||||||
|
"language": {
|
||||||
|
"url": "/js/German.json"
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@endsection
|
||||||
|
|
@ -18,5 +18,7 @@ Route::group(['middleware' => 'auth:api'], function(){
|
||||||
Route::post('details', 'API\UserController@details');
|
Route::post('details', 'API\UserController@details');
|
||||||
Route::post('draft/{action}', 'API\DraftController@draft');
|
Route::post('draft/{action}', 'API\DraftController@draft');
|
||||||
Route::post('load/{action}', 'API\LoaderController@load');
|
Route::post('load/{action}', 'API\LoaderController@load');
|
||||||
|
Route::post('fewo/{action}', 'API\FewoController@action');
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
@ -147,12 +147,25 @@ Route::group(['middleware' => ['admin']], function()
|
||||||
|
|
||||||
Route::get('/requests/{step?}', 'RequestController@index')->name('requests');
|
Route::get('/requests/{step?}', 'RequestController@index')->name('requests');
|
||||||
Route::get('/lead/detail/{id}', 'LeadController@detail')->name('lead_detail');
|
Route::get('/lead/detail/{id}', 'LeadController@detail')->name('lead_detail');
|
||||||
|
|
||||||
Route::get('data/table/requests', 'DataTableController@getRequests')->name('data_table_requests');
|
Route::get('data/table/requests', 'DataTableController@getRequests')->name('data_table_requests');
|
||||||
|
|
||||||
|
|
||||||
//CMS
|
//travel_users
|
||||||
|
Route::get('/travel_users', 'TravelUserController@index')->name('travel_users');
|
||||||
|
Route::get('/data/table/travel_users', 'TravelUserController@getTravelUsers')->name('data_table_travel_users');
|
||||||
|
Route::get('/travel_user/detail/{id}', 'TravelUserController@detail')->name('travel_user_detail');
|
||||||
|
Route::post('/travel_user/detail/{id}', 'TravelUserController@store')->name('travel_user_detail');
|
||||||
|
Route::get('/travel_user/delete/{id}', 'TravelUserController@delete')->name('travel_user_delete');
|
||||||
|
|
||||||
|
|
||||||
|
//travel_user_booking_fewo
|
||||||
|
Route::get('/travel_user_booking_fewos', 'TravelUserBookingFewoController@index')->name('travel_user_booking_fewos');
|
||||||
|
Route::get('/data/table/travel_user_booking_fewos', 'TravelUserBookingFewoController@getTravelUserBookingFewos')->name('data_table_travel_user_booking_fewos');
|
||||||
|
Route::get('/travel_user_booking_fewo/detail/{id}', 'TravelUserBookingFewoController@detail')->name('travel_user_booking_fewo_detail');
|
||||||
|
Route::post('/travel_user_booking_fewo/detail/{id}', 'TravelUserBookingFewoController@store')->name('travel_user_booking_fewo_detail');
|
||||||
|
Route::get('/travel_user_booking_fewo/delete/{id}', 'TravelUserBookingFewoController@delete')->name('travel_user_booking_fewo_delete');
|
||||||
|
|
||||||
|
//CMS
|
||||||
//feedback
|
//feedback
|
||||||
Route::get('/cms/feedback', 'CMS\CMSFeedbackController@index')->name('cms_feedback');
|
Route::get('/cms/feedback', 'CMS\CMSFeedbackController@index')->name('cms_feedback');
|
||||||
Route::get('/cms/feedback/detail/{id}', 'CMS\CMSFeedbackController@detail')->name('cms_feedback_detail');
|
Route::get('/cms/feedback/detail/{id}', 'CMS\CMSFeedbackController@detail')->name('cms_feedback_detail');
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue