From aebfb0586a5234f93dd196969aab2e88303ddea7 Mon Sep 17 00:00:00 2001 From: Kevin Adametz Date: Tue, 19 Mar 2019 15:47:23 +0100 Subject: [PATCH] Natinality, Country, Agenda, search Request. CMS Magazine Content --- .env | 2 +- .idea/dataSources.local.xml | 2 +- .idea/mein.sterntours.iml | 2 + .idea/php.xml | 2 + .idea/workspace.xml | 1023 +++++++++-------- .phpstorm.meta.php | 9 +- _ide_helper.php | 2 +- _ide_helper_models.php | 537 ++++++++- .../Controllers/CMS/CMSContentController.php | 97 ++ .../CMS/CMSTravelMagazineController.php | 102 ++ app/Http/Controllers/DataTableController.php | 193 +++- app/Http/Controllers/HomeController.php | 12 +- app/Http/Controllers/RequestController.php | 43 + .../Settings/TravelAgendaController.php | 70 ++ .../Settings/TravelCountryController.php | 106 +- .../Settings/TravelNationalityController.php | 65 ++ app/Models/Booking.php | 118 ++ app/Models/BookingDraftItem.php | 5 + app/Models/CMSContent.php | 115 ++ app/Models/DraftItem.php | 2 + app/Models/DraftType.php | 2 + app/Models/Feedback.php | 91 ++ app/Models/Lead.php | 81 ++ app/Models/Page.php | 89 ++ app/Models/SidebarWidget.php | 23 + app/Models/Status.php | 31 + app/Models/Sym/Arrangement.php | 2 + app/Models/Sym/ArrangementTemplate.php | 2 + app/Models/Sym/TravelCountry.php | 39 + app/Models/TravelAgenda.php | 50 + app/Models/TravelCountry.php | 73 +- app/Models/TravelMagazine.php | 85 ++ app/Models/TravelNationality.php | 33 + app/Models/TravelNationalityRequirement.php | 49 + app/Models/TravelProgram.php | 3 + app/Models/TravelProgramCountry.php | 13 + app/Services/HTMLHelper.php | 13 + app/helpers.php | 8 +- bootstrap/cache/packages.php | 7 + bootstrap/cache/services.php | 78 +- composer.json | 1 + composer.lock | 130 ++- ..._29_193339_create_travel_country_table.php | 18 +- ..._10_29_202124_create_arrangement_table.php | 56 + .../2018_10_29_202125_create_lead_table.php | 95 ++ .../2018_10_29_202126_create_status_table.php | 40 + .../2018_12_22_171112_create_page_table.php | 4 +- ...13_154404_create_sidebar_widgets_table.php | 4 +- ..._27_113516_create_c_m_s_contents_table.php | 43 + ...114656_create_travel_nationality_table.php | 34 + ...e_travel_nationality_requirement_table.php | 46 + ...3_05_114701_create_travel_agenda_table.php | 47 + ...1_094922_create_travel_magazines_table.php | 46 + .../sym/0001_sym_travel_country_table.php | 38 + public/css/application.css | 40 + public/js/custom.js | 1 - resources/views/booking/index.blade.php | 1 + resources/views/cms/content/index.blade.php | 139 +++ resources/views/cms/content/modal.blade.php | 80 ++ resources/views/cms/feedback/index.blade.php | 8 +- resources/views/cms/sidebar/index.blade.php | 7 +- .../cms/travel_magazine/detail.blade.php | 189 +++ .../views/cms/travel_magazine/index.blade.php | 78 ++ resources/views/drafts/index.blade.php | 2 +- resources/views/layouts/application.blade.php | 28 +- .../layouts/includes/layout-sidenav.blade.php | 24 +- resources/views/request/index.blade.php | 291 +++++ .../settings/travel_agenda/index.blade.php | 128 +++ .../settings/travel_country/detail.blade.php | 92 ++ .../settings/travel_country/index.blade.php | 85 ++ .../travel_nationality/index.blade.php | 114 ++ routes/web.php | 38 +- 72 files changed, 4636 insertions(+), 590 deletions(-) create mode 100755 app/Http/Controllers/CMS/CMSContentController.php create mode 100755 app/Http/Controllers/CMS/CMSTravelMagazineController.php create mode 100755 app/Http/Controllers/RequestController.php create mode 100755 app/Http/Controllers/Settings/TravelAgendaController.php create mode 100755 app/Http/Controllers/Settings/TravelNationalityController.php create mode 100644 app/Models/CMSContent.php create mode 100644 app/Models/Lead.php create mode 100644 app/Models/Status.php create mode 100644 app/Models/Sym/TravelCountry.php create mode 100644 app/Models/TravelAgenda.php create mode 100644 app/Models/TravelMagazine.php create mode 100644 app/Models/TravelNationality.php create mode 100644 app/Models/TravelNationalityRequirement.php create mode 100644 database/migrations/2018_10_29_202124_create_arrangement_table.php create mode 100644 database/migrations/2018_10_29_202125_create_lead_table.php create mode 100644 database/migrations/2018_10_29_202126_create_status_table.php create mode 100644 database/migrations/2019_02_27_113516_create_c_m_s_contents_table.php create mode 100644 database/migrations/2019_03_05_114656_create_travel_nationality_table.php create mode 100644 database/migrations/2019_03_05_114700_create_travel_nationality_requirement_table.php create mode 100644 database/migrations/2019_03_05_114701_create_travel_agenda_table.php create mode 100644 database/migrations/2019_03_11_094922_create_travel_magazines_table.php create mode 100755 database/migrations/sym/0001_sym_travel_country_table.php create mode 100755 resources/views/cms/content/index.blade.php create mode 100755 resources/views/cms/content/modal.blade.php create mode 100755 resources/views/cms/travel_magazine/detail.blade.php create mode 100755 resources/views/cms/travel_magazine/index.blade.php create mode 100755 resources/views/request/index.blade.php create mode 100755 resources/views/settings/travel_agenda/index.blade.php create mode 100755 resources/views/settings/travel_country/detail.blade.php create mode 100755 resources/views/settings/travel_country/index.blade.php create mode 100755 resources/views/settings/travel_nationality/index.blade.php diff --git a/.env b/.env index 6d449db..72e2ef2 100755 --- a/.env +++ b/.env @@ -3,7 +3,7 @@ APP_ENV=local APP_KEY=base64:cxq+xNckU1xLwp8V9Bfj9+nOK5iZL6urcZ1EBO8usXg= APP_DEBUG=true APP_URL=http://mein.sterntours.local -APP_OLD_URL = http://mein.sterntours.local +APP_OLD_URL = http://cms-stern-tours.local #APP_URL_V2=https://v2.stern-tours.de APP_URL_V2=http://v2-sterntours.local diff --git a/.idea/dataSources.local.xml b/.idea/dataSources.local.xml index 1426315..cae7652 100644 --- a/.idea/dataSources.local.xml +++ b/.idea/dataSources.local.xml @@ -2,7 +2,7 @@ - + *:@ diff --git a/.idea/mein.sterntours.iml b/.idea/mein.sterntours.iml index 11fe7bc..6cd43cd 100644 --- a/.idea/mein.sterntours.iml +++ b/.idea/mein.sterntours.iml @@ -4,6 +4,8 @@ + + diff --git a/.idea/php.xml b/.idea/php.xml index b7baaf8..6416d04 100644 --- a/.idea/php.xml +++ b/.idea/php.xml @@ -106,6 +106,8 @@ + + diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 686bb14..3197cb1 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,12 +2,67 @@ - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -31,188 +86,71 @@ $PROJECT_DIR$/composer.json - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + composer - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -225,7 +163,25 @@ selectpicker travel_pr modi + slug + feed + reques + book + c + right + change + checked + modal + selec + sele + Arrangement + + $PROJECT_DIR$/database/migrations + $PROJECT_DIR$/app/Models + $PROJECT_DIR$/resources/views + $PROJECT_DIR$ + @@ -233,6 +189,7 @@ + @@ -241,75 +198,60 @@ - - - - true - DEFINITION_ORDER - - - - - - - - - - @@ -416,13 +358,15 @@ + + - @@ -463,12 +407,27 @@ + + + + + + + + + + + + + + + @@ -492,6 +451,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -510,6 +493,14 @@ + + + + + + + + @@ -526,6 +517,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -542,15 +563,15 @@ - - - - - + + + + + @@ -640,17 +661,32 @@ + + + + + + + + + + + + + + + - - + - + @@ -663,9 +699,9 @@ - - - + + + @@ -673,319 +709,348 @@ + + + + + + + + + + + + + + + + + + + + + + + + - - - + - - + + - + - - + + - + - - + + - + - - + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - - - - - - - - - - - - - - - - + + - + + + + + + + + + - - - + - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - - - - + - - - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - + + - + + + + + + + + + + + + + + + + + + + - - + + - + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - + - - + + - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.phpstorm.meta.php b/.phpstorm.meta.php index 808e066..b6e751c 100644 --- a/.phpstorm.meta.php +++ b/.phpstorm.meta.php @@ -5,13 +5,14 @@ namespace PHPSTORM_META { /** * PhpStorm Meta file, to provide autocomplete information for PhpStorm - * Generated on 2018-11-08 17:44:35. + * Generated on 2019-03-11 10:10:35. * * @author Barry vd. Heuvel * @see https://github.com/barryvdh/laravel-ide-helper */ override(new \Illuminate\Contracts\Container\Container, map([ '' => '@', + 'Cviebrock\EloquentSluggable\SluggableObserver' => \Cviebrock\EloquentSluggable\SluggableObserver::class, 'Illuminate\Broadcasting\BroadcastManager' => \Illuminate\Broadcasting\BroadcastManager::class, 'Illuminate\Bus\Dispatcher' => \Illuminate\Bus\Dispatcher::class, 'Illuminate\Console\Scheduling\Schedule' => \Illuminate\Console\Scheduling\Schedule::class, @@ -167,6 +168,7 @@ namespace PHPSTORM_META { ])); override(\Illuminate\Contracts\Container\Container::make(0), map([ '' => '@', + 'Cviebrock\EloquentSluggable\SluggableObserver' => \Cviebrock\EloquentSluggable\SluggableObserver::class, 'Illuminate\Broadcasting\BroadcastManager' => \Illuminate\Broadcasting\BroadcastManager::class, 'Illuminate\Bus\Dispatcher' => \Illuminate\Bus\Dispatcher::class, 'Illuminate\Console\Scheduling\Schedule' => \Illuminate\Console\Scheduling\Schedule::class, @@ -322,6 +324,7 @@ namespace PHPSTORM_META { ])); override(\Illuminate\Contracts\Container\Container::makeWith(0), map([ '' => '@', + 'Cviebrock\EloquentSluggable\SluggableObserver' => \Cviebrock\EloquentSluggable\SluggableObserver::class, 'Illuminate\Broadcasting\BroadcastManager' => \Illuminate\Broadcasting\BroadcastManager::class, 'Illuminate\Bus\Dispatcher' => \Illuminate\Bus\Dispatcher::class, 'Illuminate\Console\Scheduling\Schedule' => \Illuminate\Console\Scheduling\Schedule::class, @@ -477,6 +480,7 @@ namespace PHPSTORM_META { ])); override(\App::make(0), map([ '' => '@', + 'Cviebrock\EloquentSluggable\SluggableObserver' => \Cviebrock\EloquentSluggable\SluggableObserver::class, 'Illuminate\Broadcasting\BroadcastManager' => \Illuminate\Broadcasting\BroadcastManager::class, 'Illuminate\Bus\Dispatcher' => \Illuminate\Bus\Dispatcher::class, 'Illuminate\Console\Scheduling\Schedule' => \Illuminate\Console\Scheduling\Schedule::class, @@ -632,6 +636,7 @@ namespace PHPSTORM_META { ])); override(\App::makeWith(0), map([ '' => '@', + 'Cviebrock\EloquentSluggable\SluggableObserver' => \Cviebrock\EloquentSluggable\SluggableObserver::class, 'Illuminate\Broadcasting\BroadcastManager' => \Illuminate\Broadcasting\BroadcastManager::class, 'Illuminate\Bus\Dispatcher' => \Illuminate\Bus\Dispatcher::class, 'Illuminate\Console\Scheduling\Schedule' => \Illuminate\Console\Scheduling\Schedule::class, @@ -787,6 +792,7 @@ namespace PHPSTORM_META { ])); override(\app(0), map([ '' => '@', + 'Cviebrock\EloquentSluggable\SluggableObserver' => \Cviebrock\EloquentSluggable\SluggableObserver::class, 'Illuminate\Broadcasting\BroadcastManager' => \Illuminate\Broadcasting\BroadcastManager::class, 'Illuminate\Bus\Dispatcher' => \Illuminate\Bus\Dispatcher::class, 'Illuminate\Console\Scheduling\Schedule' => \Illuminate\Console\Scheduling\Schedule::class, @@ -942,6 +948,7 @@ namespace PHPSTORM_META { ])); override(\resolve(0), map([ '' => '@', + 'Cviebrock\EloquentSluggable\SluggableObserver' => \Cviebrock\EloquentSluggable\SluggableObserver::class, 'Illuminate\Broadcasting\BroadcastManager' => \Illuminate\Broadcasting\BroadcastManager::class, 'Illuminate\Bus\Dispatcher' => \Illuminate\Bus\Dispatcher::class, 'Illuminate\Console\Scheduling\Schedule' => \Illuminate\Console\Scheduling\Schedule::class, diff --git a/_ide_helper.php b/_ide_helper.php index 3e61c2e..e6c98c1 100644 --- a/_ide_helper.php +++ b/_ide_helper.php @@ -3,7 +3,7 @@ /** * A helper file for Laravel 5, to provide autocomplete information to your IDE - * Generated for Laravel 5.6.39 on 2018-11-08 17:44:34. + * Generated for Laravel 5.6.39 on 2019-03-11 10:10:35. * * This file should not be included in your code, only analyzed by your IDE! * diff --git a/_ide_helper_models.php b/_ide_helper_models.php index 58ce210..8b7bc20 100644 --- a/_ide_helper_models.php +++ b/_ide_helper_models.php @@ -71,6 +71,23 @@ namespace App{ class User extends \Eloquent {} } +namespace App\Models\Sym{ +/** + * App\Models\Sym\TravelCountry + * + * @property int $id + * @property string $name + * @property int|null $is_customer_country + * @property int|null $active_backend + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Sym\TravelCountry whereActiveBackend($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Sym\TravelCountry whereId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Sym\TravelCountry whereIsCustomerCountry($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Sym\TravelCountry whereName($value) + * @mixin \Eloquent + */ + class TravelCountry extends \Eloquent {} +} + namespace App\Models\Sym{ /** * App\Models\Sym\ArrangementTemplate @@ -142,10 +159,100 @@ namespace App\Models{ class TravelProgramDraft extends \Eloquent {} } +namespace App\Models{ +/** + * App\Models\TravelNationality + * + * @property int $id + * @property string|null $name + * @property int|null $active + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelNationality whereActive($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelNationality whereId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelNationality whereName($value) + * @mixin \Eloquent + */ + class TravelNationality extends \Eloquent {} +} + namespace App\Models{ /** * App\Models\Booking * + * @property int $id + * @property string|null $booking_date + * @property int $customer_id + * @property int|null $lead_id + * @property int|null $new_drafts + * @property int $sf_guard_user_id + * @property int $branch_id + * @property float|null $service_fee + * @property int|null $travel_country_id + * @property int|null $travel_category_id + * @property int|null $pax + * @property int|null $coupon_id + * @property \Illuminate\Support\Carbon $created_at + * @property \Illuminate\Support\Carbon $updated_at + * @property string|null $title + * @property string|null $start_date + * @property string|null $end_date + * @property int|null $website_id + * @property string|null $travel_number + * @property string|null $participant_name + * @property string|null $participant_firstname + * @property string|null $participant_birthdate + * @property int|null $participant_salutation_id + * @property string|null $ev_number + * @property string|null $merlin_knr + * @property string|null $merlin_order_number + * @property int|null $travel_company_id + * @property int|null $travel_documents + * @property float|null $price + * @property float|null $price_total + * @property float|null $deposit_total + * @property float|null $final_payment + * @property string|null $final_payment_date + * @property int|null $travelagenda_id + * @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\Sym\Arrangement[] $arrangements + * @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\BookingDraftItem[] $booking_draft_items + * @property-read \App\Models\TravelCountry|null $lead + * @property-read \App\Models\SfGuardUser $sf_guard_user + * @property-read \App\Models\TravelAgenda|null $travel_agenda + * @property-read \App\Models\TravelCountry|null $travel_country + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereBookingDate($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereBranchId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereCouponId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereCreatedAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereCustomerId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereDepositTotal($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereEndDate($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereEvNumber($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereFinalPayment($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereFinalPaymentDate($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereLeadId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereMerlinKnr($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereMerlinOrderNumber($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereNewDrafts($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereParticipantBirthdate($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereParticipantFirstname($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereParticipantName($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereParticipantSalutationId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking wherePax($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking wherePrice($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking wherePriceTotal($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereServiceFee($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereSfGuardUserId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereStartDate($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereTitle($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereTravelCategoryId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereTravelCompanyId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereTravelCountryId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereTravelDocuments($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereTravelNumber($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereTravelagendaId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereUpdatedAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereWebsiteId($value) + * @mixin \Eloquent */ class Booking extends \Eloquent {} } @@ -160,6 +267,25 @@ namespace App\Models{ class UserUpdateEmail extends \Eloquent {} } +namespace App\Models{ +/** + * App\Models\TravelNationalityRequirement + * + * @property int $id + * @property int|null $travel_country_id + * @property int|null $travel_nationality_id + * @property string|null $text + * @property-read \App\Models\TravelCountry|null $travel_country + * @property-read \App\Models\TravelNationality|null $travel_nationality + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelNationalityRequirement whereId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelNationalityRequirement whereText($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelNationalityRequirement whereTravelCountryId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelNationalityRequirement whereTravelNationalityId($value) + * @mixin \Eloquent + */ + class TravelNationalityRequirement extends \Eloquent {} +} + namespace App\Models{ /** * App\Models\BookingDraftItem @@ -211,6 +337,11 @@ namespace App\Models{ * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookingDraftItem whereTravelProgramId($value) * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookingDraftItem whereUpdatedAt($value) * @mixin \Eloquent + * @property int|null $fewo_lodging_id + * @property float|null $price + * @property-read \App\Models\Booking $booking + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookingDraftItem whereFewoLodgingId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookingDraftItem wherePrice($value) */ class BookingDraftItem extends \Eloquent {} } @@ -283,10 +414,47 @@ namespace App\Models{ * @mixin \Eloquent * @property string|null $service * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\DraftItem whereService($value) + * @property float|null $price + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\DraftItem wherePrice($value) */ class DraftItem extends \Eloquent {} } +namespace App\Models{ +/** + * App\Models\TravelMagazine + * + * @property int $id + * @property string $name + * @property string $slug + * @property string|null $text + * @property string|null $full_text + * @property string|null $meta_title + * @property string|null $meta_description + * @property string|null $meta_keywords + * @property int|null $pos + * @property int $scope + * @property int $active + * @property \Illuminate\Support\Carbon|null $created_at + * @property \Illuminate\Support\Carbon|null $updated_at + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelMagazine findSimilarSlugs($attribute, $config, $slug) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelMagazine whereActive($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelMagazine whereCreatedAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelMagazine whereFullText($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelMagazine whereId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelMagazine whereMetaDescription($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelMagazine whereMetaKeywords($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelMagazine whereMetaTitle($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelMagazine whereName($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelMagazine wherePos($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelMagazine whereScope($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelMagazine whereSlug($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelMagazine whereText($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelMagazine whereUpdatedAt($value) + */ + class TravelMagazine extends \Eloquent {} +} + namespace App\Models{ /** * App\Models\Account @@ -313,20 +481,203 @@ namespace App\Models{ * App\Models\TravelCountry * * @property int $id - * @property string|null $name - * @property string $html_information + * @property int|null $crm_id + * @property string $name + * @property string|null $html_information * @property string|null $entry_requirements * @property int|null $feedback_page_id + * @property int|null $is_customer_country + * @property int|null $active_frontend + * @property int|null $active_backend + * @property string|null $updated_at + * @property string|null $created_at + * @property-read \App\Models\Page|null $feedback_page + * @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\TravelNationalityRequirement[] $travel_nationality_requirements * @property-read \App\Models\TravelProgramCountry $travel_program_country + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCountry whereActiveBackend($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCountry whereActiveFrontend($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCountry whereCreatedAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCountry whereCrmId($value) * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCountry whereEntryRequirements($value) * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCountry whereFeedbackPageId($value) * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCountry whereHtmlInformation($value) * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCountry whereId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCountry whereIsCustomerCountry($value) * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCountry whereName($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCountry whereUpdatedAt($value) + * @mixin \Eloquent */ class TravelCountry extends \Eloquent {} } +namespace App\Models{ +/** + * App\Models\Status + * + * @property int $id + * @property string $name + * @property int $handling_days + * @property string|null $color + * @property-read \App\Models\Status $status + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Status whereColor($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Status whereHandlingDays($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Status whereId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Status whereName($value) + * @mixin \Eloquent + */ + class Status extends \Eloquent {} +} + +namespace App\Models{ +/** + * App\Models\SidebarWidget + * + * @property int $id + * @property string $name + * @property string|null $component + * @property string|null $html + * @property array|null $show_at + * @property int|null $pos + * @property int $active + * @property \Illuminate\Support\Carbon|null $created_at + * @property \Illuminate\Support\Carbon|null $updated_at + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\SidebarWidget whereActive($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\SidebarWidget whereComponent($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\SidebarWidget whereCreatedAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\SidebarWidget whereHtml($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\SidebarWidget whereId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\SidebarWidget whereName($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\SidebarWidget wherePos($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\SidebarWidget whereShowAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\SidebarWidget whereUpdatedAt($value) + * @mixin \Eloquent + */ + class SidebarWidget extends \Eloquent {} +} + +namespace App\Models{ +/** + * App\Models\CMSContent + * + * @property int $id + * @property string $name + * @property string $slug + * @property string $field + * @property string|null $text + * @property string|null $full_text + * @property int|null $integer + * @property float|null $decimal + * @property \Illuminate\Support\Carbon|null $created_at + * @property \Illuminate\Support\Carbon|null $updated_at + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CMSContent findSimilarSlugs($attribute, $config, $slug) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CMSContent whereCreatedAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CMSContent whereDecimal($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CMSContent whereField($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CMSContent whereFullText($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CMSContent whereId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CMSContent whereInteger($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CMSContent whereName($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CMSContent whereSlug($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CMSContent whereText($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CMSContent whereUpdatedAt($value) + * @mixin \Eloquent + */ + class CMSContent extends \Eloquent {} +} + +namespace App\Models{ +/** + * App\Models\Page + * + * @property int $id + * @property int|null $owner + * @property string|null $model + * @property int|null $lvl + * @property int $owner_second + * @property int|null $catalog_id + * @property int|null $catalog_index + * @property string|null $slug + * @property int|null $travel_program + * @property int|null $status + * @property int|null $show_in_navi + * @property int|null $order + * @property string|null $title + * @property string|null $pagetitle + * @property string|null $description + * @property string|null $keywords + * @property string|null $content + * @property string|null $content_new + * @property string|null $buma_destination + * @property int|null $OLD_CatalogID + * @property int|null $OLD_OwnerID + * @property int|null $buma_gjr + * @property string|null $date + * @property int $price-tags + * @property string|null $text_right + * @property string|null $keyword + * @property string|null $canonical_url + * @property int|null $country_id + * @property string|null $template + * @property int|null $lft + * @property int|null $rgt + * @property int|null $tree_root + * @property int|null $parent_id + * @property string|null $real_url_path + * @property string|null $box_body + * @property string|null $box_image_url + * @property string|null $box_star + * @property string|null $box_discount + * @property string|null $cms_settings + * @property int|null $fewo_lodging + * @property \Illuminate\Support\Carbon|null $created_at + * @property \Illuminate\Support\Carbon|null $updated_at + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereBoxBody($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereBoxDiscount($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereBoxImageUrl($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereBoxStar($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereBumaDestination($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereBumaGjr($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereCanonicalUrl($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereCatalogId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereCatalogIndex($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereCmsSettings($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereContent($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereContentNew($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereCountryId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereCreatedAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereDate($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereDescription($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereFewoLodging($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereKeyword($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereKeywords($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereLft($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereLvl($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereModel($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereOLDCatalogID($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereOLDOwnerID($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereOrder($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereOwner($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereOwnerSecond($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page wherePagetitle($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereParentId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page wherePriceTags($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereRealUrlPath($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereRgt($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereShowInNavi($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereSlug($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereStatus($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereTemplate($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereTextRight($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereTitle($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereTravelProgram($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereTreeRoot($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereUpdatedAt($value) + * @mixin \Eloquent + */ + class Page extends \Eloquent {} +} + namespace App\Models{ /** * App\Models\TravelProgramCountry @@ -337,10 +688,74 @@ namespace App\Models{ * @property-read \App\Models\TravelProgram|null $travel_program * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelProgramCountry whereCountryId($value) * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelProgramCountry whereProgramId($value) + * @mixin \Eloquent */ class TravelProgramCountry extends \Eloquent {} } +namespace App\Models{ +/** + * App\Models\Lead + * + * @property int $id + * @property int $customer_id + * @property string $request_date + * @property string|null $travelperiod_start + * @property string|null $travelperiod_end + * @property int|null $travelperiod_length + * @property int|null $travelcountry_id + * @property int|null $travelagenda_id + * @property string|null $remarks + * @property int $sf_guard_user_id + * @property int|null $is_closed + * @property int|null $initialcontacttype_id + * @property int|null $searchengine_id + * @property string|null $searchengine_keywords + * @property int $status_id + * @property string|null $next_due_date + * @property int|null $website_id + * @property int|null $travelcategory_id + * @property \Illuminate\Support\Carbon $created_at + * @property \Illuminate\Support\Carbon $updated_at + * @property float|null $price + * @property int|null $pax + * @property string|null $participant_name + * @property string|null $participant_firstname + * @property string|null $participant_birthdate + * @property int|null $participant_salutation_id + * @property-read \App\Models\SfGuardUser $sf_guard_user + * @property-read \App\Models\Status $status + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Lead whereCreatedAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Lead whereCustomerId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Lead whereId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Lead whereInitialcontacttypeId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Lead whereIsClosed($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Lead whereNextDueDate($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Lead whereParticipantBirthdate($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Lead whereParticipantFirstname($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Lead whereParticipantName($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Lead whereParticipantSalutationId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Lead wherePax($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Lead wherePrice($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Lead whereRemarks($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Lead whereRequestDate($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Lead whereSearchengineId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Lead whereSearchengineKeywords($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Lead whereSfGuardUserId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Lead whereStatusId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Lead whereTravelagendaId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Lead whereTravelcategoryId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Lead whereTravelcountryId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Lead whereTravelperiodEnd($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Lead whereTravelperiodLength($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Lead whereTravelperiodStart($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Lead whereUpdatedAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Lead whereWebsiteId($value) + * @mixin \Eloquent + */ + class Lead extends \Eloquent {} +} + namespace App\Models{ /** * App\Models\TravelClass @@ -382,10 +797,107 @@ namespace App\Models{ * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\DraftType whereUpdatedAt($value) * @mixin \Eloquent * @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\DraftItem[] $draft_items + * @property string|null $color + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\DraftType whereColor($value) */ class DraftType extends \Eloquent {} } +namespace App\Models{ +/** + * App\Models\Feedback + * + * @property int $id + * @property int|null $owner + * @property string|null $model + * @property int|null $lvl + * @property int $owner_second + * @property int|null $catalog_id + * @property int|null $catalog_index + * @property string|null $slug + * @property int|null $travel_program + * @property int|null $status + * @property int|null $show_in_navi + * @property int|null $order + * @property string|null $title + * @property string|null $pagetitle + * @property string|null $description + * @property string|null $keywords + * @property string|null $content + * @property string|null $content_new + * @property string|null $buma_destination + * @property int|null $OLD_CatalogID + * @property int|null $OLD_OwnerID + * @property int|null $buma_gjr + * @property string|null $date + * @property int $price-tags + * @property string|null $text_right + * @property string|null $keyword + * @property string|null $canonical_url + * @property int|null $country_id + * @property string|null $template + * @property int|null $lft + * @property int|null $rgt + * @property int|null $tree_root + * @property int|null $parent_id + * @property string|null $real_url_path + * @property string|null $box_body + * @property string|null $box_image_url + * @property string|null $box_star + * @property string|null $box_discount + * @property string|null $cms_settings + * @property int|null $fewo_lodging + * @property \Illuminate\Support\Carbon|null $created_at + * @property \Illuminate\Support\Carbon|null $updated_at + * @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\Feedback[] $children + * @property-read \App\Models\Feedback|null $parent + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereBoxBody($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereBoxDiscount($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereBoxImageUrl($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereBoxStar($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereBumaDestination($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereBumaGjr($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereCanonicalUrl($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereCatalogId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereCatalogIndex($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereCmsSettings($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereContent($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereContentNew($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereCountryId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereCreatedAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereDate($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereDescription($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereFewoLodging($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereKeyword($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereKeywords($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereLft($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereLvl($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereModel($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereOLDCatalogID($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereOLDOwnerID($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereOrder($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereOwner($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereOwnerSecond($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback wherePagetitle($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereParentId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback wherePriceTags($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereRealUrlPath($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereRgt($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereShowInNavi($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereSlug($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereStatus($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereTemplate($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereTextRight($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereTitle($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereTravelProgram($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereTreeRoot($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereUpdatedAt($value) + * @mixin \Eloquent + */ + class Feedback extends \Eloquent {} +} + namespace App\Models{ /** * App\Models\TravelProgram @@ -485,11 +997,32 @@ namespace App\Models{ * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelProgram whereCreatedAt($value) * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelProgram whereUpdatedAt($value) * @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\TravelProgramDraft[] $travel_program_drafts + * @property int|null $insurance_4 * @property-read \App\Models\TravelProgramCountry $travel_program_country + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelProgram whereInsurance4($value) */ class TravelProgram extends \Eloquent {} } +namespace App\Models{ +/** + * App\Models\TravelAgenda + * + * @property int $id + * @property string $name + * @property int|null $travelcountry_id + * @property int|null $active + * @property-read \App\Models\TravelCountry|null $travel_country + * @property-read \App\Models\Sym\TravelCountry|null $travel_country_crm + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelAgenda whereActive($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelAgenda whereId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelAgenda whereName($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelAgenda whereTravelcountryId($value) + * @mixin \Eloquent + */ + class TravelAgenda extends \Eloquent {} +} + namespace App\Models{ /** * App\Models\SfGuardUser diff --git a/app/Http/Controllers/CMS/CMSContentController.php b/app/Http/Controllers/CMS/CMSContentController.php new file mode 100755 index 0000000..cf4fb90 --- /dev/null +++ b/app/Http/Controllers/CMS/CMSContentController.php @@ -0,0 +1,97 @@ + CMSContent::all()->sortByDesc('id') + ]; + return view('cms.content.index', $data); + + } + + + public function store() + { + $data = Input::all(); + $rules = array( + 'name' => 'required', + 'field' => 'required', + ); + $validator = Validator::make(Input::all(), $rules); + + if ($validator->fails()) { + return back()->withErrors($validator); + } + + if($data['id'] == "new"){ + CMSContent::create($data); + }else{ + $model = CMSContent::find($data['id']); + $model->fill($data); + $model->save(); + } + \Session()->flash('alert-save', '1'); + return redirect(route('cms_content')); + } + + + public function loadModal() + { + if(Request::ajax()){ + $data = Input::all(); + $returnHTML = ""; + if(isset($data['model']) && isset($data['id']) ){ + if($data['model'] == 'content'){ + if($data['id'] == "new"){ + $value = new CMSContent(); + }else { + $value = CMSContent::find($data['id']); + } + $returnHTML = view("cms.content.modal", compact('data','value') )->render(); + } + + } + return response()->json(['response' => $data, 'html'=>$returnHTML]); + } + } + + + + public function delete($id){ + $content = CMSContent::findOrFail($id); + $content->delete(); + \Session()->flash('alert-success', __('Content gelöscht')); + return redirect(route('cms_content')); + } + + + + +} diff --git a/app/Http/Controllers/CMS/CMSTravelMagazineController.php b/app/Http/Controllers/CMS/CMSTravelMagazineController.php new file mode 100755 index 0000000..99e6e68 --- /dev/null +++ b/app/Http/Controllers/CMS/CMSTravelMagazineController.php @@ -0,0 +1,102 @@ + TravelMagazine::all(), + ]; + return view('cms.travel_magazine.index', $data); + + } + + public function detail($id) + { + if($id == "new") { + $model = new TravelMagazine(); + $id = 'new'; + $model->active = 1; + + }else{ + $model = TravelMagazine::findOrFail($id); + $id = $model->id; + } + $data = [ + 'travel_magazine' => $model, + 'id' => $id, + ]; + return view('cms.travel_magazine.detail', $data); + + } + + + public function store($id) + { + $data = Input::all(); + $data['active'] = isset($data['active']) ? true : false; + $data['scope'] = isset($data['scope']) ? true : false; + $rules = array( + 'name' => 'required', + ); + if($id != "new") { + $model = TravelMagazine::findOrFail($id); + + $rules = array( + 'name' => 'required', + 'slug' => 'unique:mysql_stern.travel_magazines,slug,'.$model->id, + ); + + } + + + $validator = Validator::make(Input::all(), $rules); + if ($validator->fails()) { + return back()->withErrors($validator); + } + + if($id == "new") { + $model = TravelMagazine::create($data); + }else{ + $model = TravelMagazine::findOrFail($id); + $model->fill($data); + $model->save(); + } + + \Session()->flash('alert-save', '1'); + return redirect(route('cms_travel_magazine_detail', [$model->id])); + + } + + public function delete($id){ + $model = TravelMagazine::findOrFail($id); + $model->delete(); + \Session()->flash('alert-success', __('Eintrag Reisemagazin gelöscht')); + return redirect(route('cms_travel_magazine')); + } + + +} diff --git a/app/Http/Controllers/DataTableController.php b/app/Http/Controllers/DataTableController.php index 1bdf5fb..3b25e13 100644 --- a/app/Http/Controllers/DataTableController.php +++ b/app/Http/Controllers/DataTableController.php @@ -4,8 +4,11 @@ namespace App\Http\Controllers; use App\Models\Booking; use App\Services\HTMLHelper; +use Carbon\Carbon; +use Composer\DependencyResolver\Request; use DataTables; use App\User; +use Input; class DataTableController extends Controller { @@ -72,7 +75,7 @@ class DataTableController extends Controller public function getBookings() { //confirmation_code_remider is delete 2 - $query = Booking::orderBy("id", "DESC"); + $query = Booking::query(); return \DataTables::eloquent($query) @@ -80,9 +83,195 @@ class DataTableController extends Controller return ''; }) ->addColumn('id', function (Booking $booking) { - return ''.$booking->id.''; + return ''.$booking->id.''; }) + ->orderColumn('id', 'id $1') ->rawColumns(['action_edit', 'id']) + + ->make(true); + } + + public function getRequests() + { + + $query = Booking::where('lead_id', '!=', NULL); + + if(Input::get('full_firstname_search') != ""){ + $query->where('participant_firstname', 'LIKE', '%'.Input::get('full_firstname_search').'%'); + } + + if(Input::get('full_lastname_search') != ""){ + $query->where('participant_name', 'LIKE', '%'.Input::get('full_lastname_search').'%'); + } + + // $query->where('end_date', '<=', $now); + + if(Input::get('travel_option_search')){ + $now = Carbon::now(); + + + switch (Input::get('travel_option_search')){ + case 'before_2': + $query->whereBetween('start_date', [Carbon::now()->modify('-2 month'), $now]); + + break; + case 'brefore_1': + $query->whereBetween('start_date', [Carbon::now()->modify('-1 month'), $now]); + + break; + case 'on_site': + $query->where('start_date', '<=', $now); + $query->where('end_date', '>=', $now); + break; + case 'after_1': + $query->whereBetween('start_date', [$now, Carbon::now()->modify('+1 month')]); + + break; + case 'after_2': + $query->whereBetween('start_date', [$now, Carbon::now()->modify('+2 month')]); + + break; + } + }else{ + $start = null; + $end = null; + if(Input::get('arrival_start_date') != ""){ + $arrStart = explode(".", Input::get('arrival_start_date')); + if(count($arrStart) == 3){ + $start = Carbon::create($arrStart[2], $arrStart[1], $arrStart[0], 0, 0, 0); + } + } + if(Input::get('arrival_end_date') != ""){ + $arrEnd = explode(".", Input::get('arrival_end_date')); + if(count($arrEnd) == 3){ + $end = Carbon::create($arrEnd[2], $arrEnd[1], $arrEnd[0], 23, 59, 59); + } + } + if($start && $end){ + $query->whereBetween('start_date', [$start, $end]); + } + if($start && !$end){ + $query->where('start_date', '>=', $start); + } + if(!$start && $end){ + $query->where('start_date', '<=', $end); + } + + $start = null; + $end = null; + if(Input::get('departure_start_date') != ""){ + $arrStart = explode(".", Input::get('departure_start_date')); + if(count($arrStart) == 3){ + $start = Carbon::create($arrStart[2], $arrStart[1], $arrStart[0], 0, 0, 0); + } + } + if(Input::get('departure_end_date') != ""){ + $arrEnd = explode(".", Input::get('departure_end_date')); + if(count($arrEnd) == 3){ + $end = Carbon::create($arrEnd[2], $arrEnd[1], $arrEnd[0], 23, 59, 59); + } + } + if($start && $end){ + $query->whereBetween('end_date', [$start, $end]); + } + if($start && !$end){ + $query->where('end_date', '>=', $start); + } + if(!$start && $end){ + $query->where('end_date', '<=', $end); + } + } + + + + if(Input::get('sort_travel_country_id') != ""){ + $query->where('travel_country_id', '=', Input::get('sort_travel_country_id')); + } + if(Input::get('sort_travelagenda_id') != ""){ + $query->where('travelagenda_id', '=', Input::get('sort_travelagenda_id')); + } + + if(Input::get('sort_sf_guard_user_id') != ""){ + $query->where('sf_guard_user_id', '=', Input::get('sort_sf_guard_user_id')); + } + + if(Input::get('sort_travel_documents') != ""){ + $query->where('travel_documents', '=', Input::get('sort_travel_documents')); + } + + + if(Input::get('full_lead_id_search') != ""){ + $query->where('lead_id', 'LIKE', '%'.Input::get('full_lead_id_search'). '%'); + } + if(Input::get('full_booking_id_search') != ""){ + $query->where('id', 'LIKE', '%'.Input::get('full_booking_id_search').'%'); + } + + //confirmation_code_remider is delete 2 + // + + return \DataTables::eloquent($query) + ->addColumn('action_edit', function (Booking $booking) { + return ''; //''; + }) + ->addColumn('lead_id', function (Booking $booking) { + return ''.$booking->lead_id.''; + }) + ->addColumn('participant_firstname', function (Booking $booking) { + return ''.$booking->participant_firstname.''; + }) + ->addColumn('participant_name', function (Booking $booking) { + return ''.$booking->participant_name.''; + }) + ->addColumn('id', function (Booking $booking) { + return ''.$booking->id.''; + }) + ->addColumn('travel_country_id', function (Booking $booking) { + return ''.($booking->travel_country_id ? $booking->travel_country->name : "-").''; + }) + ->addColumn('travelagenda_id', function (Booking $booking) { + return ''.($booking->travelagenda_id ? $booking->travel_agenda->name : "-").''; + }) + ->addColumn('start_date', function (Booking $booking) { + return $booking->getStartDateFormat(); + }) + ->addColumn('end_date', function (Booking $booking) { + return $booking->getEndDateFormat(); + }) + ->addColumn('travel_documents', function (Booking $booking) { + return $booking->travel_documents ? ' ' : ''; + }) + ->addColumn('sf_guard_user_id', function (Booking $booking) { + return ''.($booking->sf_guard_user_id? $booking->sf_guard_user->first_name." ".$booking->sf_guard_user->last_name : "-").''; + }) + ->addColumn('lead.status_id', function (Booking $booking) { + return ''.($booking->lead->status_id ? $booking->lead->status->name : "-").''; + }) + /* ->filterColumn('travel_country_id', function($query, $keyword) { + + if($keyword != "") { + $query->whereRaw("travel_country_id = ?", $keyword); + } + + }) + ->filterColumn('travelagenda_id', function($query, $keyword) { + if($keyword != ""){ + $query->whereRaw("travelagenda_id = ?", $keyword); + + } + }) + */ + ->orderColumn('lead_id', 'lead_id $1') + ->orderColumn('participant_firstname', 'participant_firstname $1') + ->orderColumn('participant_name', 'participant_name $1') + ->orderColumn('id', 'id $1') + ->orderColumn('travel_country_id', 'travel_country_id $1') + ->orderColumn('travelagenda_id', 'travelagenda_id $1') + ->orderColumn('sf_guard_user_id', 'sf_guard_user_id $1') + ->orderColumn('start_date', 'start_date $1') + ->orderColumn('end_date', 'end_date $1') + ->orderColumn('travel_documents', 'travel_documents $1') + ->rawColumns(['action_edit', 'lead_id', 'participant_firstname', 'participant_name', 'travel_country_id', 'travelagenda_id', 'sf_guard_user_id', 'lead.status_id', 'id', 'travel_documents']) ->make(true); } diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index a93d3d1..2180191 100755 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -108,12 +108,22 @@ class HomeController extends Controller return redirect(route('home')); } if($show == 'drafts'){ - return redirect(route('drafts')); + return redirect(route('drafts')); } if(strpos($show, 'drafts_edit_booking_') !== false){ $booking_id = str_replace('drafts_edit_booking_', '', $show); return redirect(route('booking_detail', [$booking_id])); } + if($show == 'requests'){ + return redirect(route('requests')); + } + if($show == 'travel_agenda'){ + return redirect(route('admin_settings_travel_program')); + } + if($show == 'travel_country'){ + return redirect(route('admin_settings_travel_country')); + } + } diff --git a/app/Http/Controllers/RequestController.php b/app/Http/Controllers/RequestController.php new file mode 100755 index 0000000..f9464ca --- /dev/null +++ b/app/Http/Controllers/RequestController.php @@ -0,0 +1,43 @@ +middleware('admin'); + } + + public function index($step = false) + { + $data = [ + 'step' => $step + ]; + return view('request.index', $data); + } + + + /* + wirte old where has state to new has travel_documents + $bs = Booking::whereHas('arrangements', function($q){ + $q->where('state', '!=', NULL); + })->where('lead_id', '!=', NULL)->where('new_drafts', 0)->get(); + + foreach ($bs as $b){ + $b->travel_documents = true; + $b->save(); + var_dump($b->travel_documents); + } + die(); + */ + + +} + + diff --git a/app/Http/Controllers/Settings/TravelAgendaController.php b/app/Http/Controllers/Settings/TravelAgendaController.php new file mode 100755 index 0000000..85d3cc0 --- /dev/null +++ b/app/Http/Controllers/Settings/TravelAgendaController.php @@ -0,0 +1,70 @@ +middleware('admin'); + + } + + public function index($step = false) + { + $data = [ + 'travel_agenda' => TravelAgenda::all(), + ]; + return view('settings.travel_agenda.index', $data); + } + + + public function update(){ + + $data = Input::all(); + if($data['id'] == "new"){ + $model = TravelAgenda::create([ + 'name' => $data['name'], + 'active' => isset($data['active']) ? true : false, + 'travelcountry_id' => $data['travelcountry_id'], + + ]); + }else{ + $model = TravelAgenda::find($data['id']); + $model->name = $data['name']; + $model->active = isset($data['active']) ? true : false; + $model->travelcountry_id = $data['travelcountry_id']; + $model->save(); + } + + \Session()->flash('alert-save', '1'); + return redirect(route('admin_settings_travel_program')); + } + + public function delete($id){ + + if(Booking::where('travelagenda_id', $id)->count()){ + \Session()->flash('alert-error', 'Eintrag wird verwendet'); + return redirect()->back(); + } + + $model = TravelAgenda::findOrFail($id); + $model->delete(); + \Session()->flash('alert-success', 'Eintrag gelöscht'); + return redirect()->back(); + } + +} + + diff --git a/app/Http/Controllers/Settings/TravelCountryController.php b/app/Http/Controllers/Settings/TravelCountryController.php index c4be04c..a17395c 100755 --- a/app/Http/Controllers/Settings/TravelCountryController.php +++ b/app/Http/Controllers/Settings/TravelCountryController.php @@ -4,6 +4,9 @@ namespace App\Http\Controllers\Settings; use App\Http\Controllers\Controller; +use App\Models\TravelCountry; +use App\Models\TravelNationality; +use App\Models\TravelNationalityRequirement; use Carbon\Carbon; use HTMLHelper; use Input; @@ -19,47 +22,88 @@ class TravelCountryController extends Controller public function index($step = false) { $data = [ - 'drafts' => Draft::all()->sortByDesc("id"), - 'draft_types' => DraftType::all()->sortByDesc("id"), - 'step' => $step + 'travel_countries' => TravelCountry::all(), ]; - return view('drafts.index', $data); + return view('settings.travel_country.index', $data); } - - public function store(){ - - $data = Input::all(); - if($data['id'] == "new"){ - $draft_type = DraftType::create([ - 'name' => $data['name'], - 'active' => isset($data['active']) ? true : false, - 'color' => $data['color'], - ]); + public function detail($id) + { + if($id == "new") { + $model = new TravelCountry(); + $id = 'new'; + $model->active_backend = 1; }else{ - $draft_type = DraftType::find($data['id']); - $draft_type->name = $data['name']; - $draft_type->active = isset($data['active']) ? true : false; - $draft_type->color = $data['color']; - - $draft_type->save(); + $model = TravelCountry::findOrFail($id); + $id = $model->id; } - - \Session()->flash('alert-save', '1'); - return redirect(route('drafts', ['type'])); - + $data = [ + 'model' => $model, + 'id' => $id, + 'travel_nationalities' => TravelNationality::where('active', true)->get(), + ]; + return view('settings.travel_country.detail', $data); } + + + + public function store(){ + + $data = Input::all(); + $data['is_customer_country'] = isset($data['is_customer_country']) ? true : false; + $data['active_frontend'] = isset($data['active_frontend']) ? true : false; + $data['active_backend'] = isset($data['active_backend']) ? true : false; + + if($data['id'] == "new"){ + $data['crm_id'] = 0; + $model = TravelCountry::create($data); + }else{ + $model = TravelCountry::find($data['id']); + $model->fill($data); + $model->save(); + } + + //travel_nationality_requirement + if(isset($data['travel_nationality_requirement'])){ + foreach ($data['travel_nationality_requirement'] as $travel_nationality_id => $text){ + $model->setNationalityRequirement($travel_nationality_id, $text); + } + } + + //TODO for this thime + //we need an update in the old CRM v1 system DB + $tc = \App\Models\Sym\TravelCountry::find($model->crm_id); + if(!$tc){ + $tc = \App\Models\Sym\TravelCountry::create($data); + $model->crm_id = $tc->id; + $model->save(); + }else{ + $tc->fill($data); + $tc->save(); + } + + \Session()->flash('alert-save', '1'); + return redirect(route('admin_settings_travel_country_detail', [$model->id])); + + } + public function delete($id){ - - if(DraftItem::where('draft_type_id', $id)->count()){ - \Session()->flash('alert-error', 'Eintrag wird verwendet'); - return redirect(route('drafts')); + $model = TravelCountry::findOrFail($id); + if( $model->travel_nationality_requirements){ + foreach($model->travel_nationality_requirements as $travel_nationality_requirement){ + $travel_nationality_requirement->delete(); + } } - $draft_type = DraftType::findOrFail($id); - $draft_type->delete(); + $tc = \App\Models\Sym\TravelCountry::find($model->crm_id); + if($tc){ + $tc->delete(); + } + + $model->delete(); \Session()->flash('alert-success', 'Eintrag gelöscht'); - return redirect(route('drafts', ['type'])); + return redirect()->back(); } + } diff --git a/app/Http/Controllers/Settings/TravelNationalityController.php b/app/Http/Controllers/Settings/TravelNationalityController.php new file mode 100755 index 0000000..f338ed5 --- /dev/null +++ b/app/Http/Controllers/Settings/TravelNationalityController.php @@ -0,0 +1,65 @@ +middleware('admin'); + + } + + public function index($step = false) + { + $data = [ + 'travel_nationality' => TravelNationality::all(), + ]; + return view('settings.travel_nationality.index', $data); + } + + + public function update(){ + + $data = Input::all(); + if($data['id'] == "new"){ + $model = TravelNationality::create([ + 'name' => $data['name'], + 'active' => isset($data['active']) ? true : false, + ]); + }else{ + $model = TravelNationality::find($data['id']); + $model->name = $data['name']; + $model->active = isset($data['active']) ? true : false; + $model->save(); + } + + \Session()->flash('alert-save', '1'); + return redirect(route('admin_settings_travel_nationality')); + } + + public function delete($id){ + + if(TravelNationalityRequirement::where('travel_nationality_id', $id)->count()){ + \Session()->flash('alert-error', 'Eintrag wird verwendet'); + return redirect()->back(); + } + $model = TravelNationality::findOrFail($id); + $model->delete(); + \Session()->flash('alert-success', 'Eintrag gelöscht'); + return redirect()->back(); + + } + +} + + diff --git a/app/Models/Booking.php b/app/Models/Booking.php index e8cc858..f9dd021 100644 --- a/app/Models/Booking.php +++ b/app/Models/Booking.php @@ -2,8 +2,88 @@ namespace App\Models; +use Carbon\Carbon; use Illuminate\Database\Eloquent\Model; +/** + * App\Models\Booking + * + * @property int $id + * @property string|null $booking_date + * @property int $customer_id + * @property int|null $lead_id + * @property int|null $new_drafts + * @property int $sf_guard_user_id + * @property int $branch_id + * @property float|null $service_fee + * @property int|null $travel_country_id + * @property int|null $travel_category_id + * @property int|null $pax + * @property int|null $coupon_id + * @property \Illuminate\Support\Carbon $created_at + * @property \Illuminate\Support\Carbon $updated_at + * @property string|null $title + * @property string|null $start_date + * @property string|null $end_date + * @property int|null $website_id + * @property string|null $travel_number + * @property string|null $participant_name + * @property string|null $participant_firstname + * @property string|null $participant_birthdate + * @property int|null $participant_salutation_id + * @property string|null $ev_number + * @property string|null $merlin_knr + * @property string|null $merlin_order_number + * @property int|null $travel_company_id + * @property int|null $travel_documents + * @property float|null $price + * @property float|null $price_total + * @property float|null $deposit_total + * @property float|null $final_payment + * @property string|null $final_payment_date + * @property int|null $travelagenda_id + * @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\Sym\Arrangement[] $arrangements + * @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\BookingDraftItem[] $booking_draft_items + * @property-read \App\Models\TravelCountry|null $lead + * @property-read \App\Models\SfGuardUser $sf_guard_user + * @property-read \App\Models\TravelAgenda|null $travel_agenda + * @property-read \App\Models\TravelCountry|null $travel_country + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereBookingDate($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereBranchId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereCouponId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereCreatedAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereCustomerId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereDepositTotal($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereEndDate($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereEvNumber($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereFinalPayment($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereFinalPaymentDate($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereLeadId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereMerlinKnr($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereMerlinOrderNumber($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereNewDrafts($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereParticipantBirthdate($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereParticipantFirstname($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereParticipantName($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereParticipantSalutationId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking wherePax($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking wherePrice($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking wherePriceTotal($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereServiceFee($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereSfGuardUserId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereStartDate($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereTitle($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereTravelCategoryId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereTravelCompanyId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereTravelCountryId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereTravelDocuments($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereTravelNumber($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereTravelagendaId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereUpdatedAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereWebsiteId($value) + * @mixin \Eloquent + */ class Booking extends Model { protected $connection = 'mysql'; @@ -19,6 +99,34 @@ class Booking extends Model return $this->hasMany('App\Models\BookingDraftItem', 'booking_id', 'id')->orderBy('pos', 'ASC'); } + //on crm + public function travel_agenda() + { + return $this->belongsTo('App\Models\TravelAgenda', 'travelagenda_id', 'id'); + } + + public function travel_country() + { + return $this->belongsTo('App\Models\TravelCountry', 'travel_country_id', 'crm_id'); + } + + public function lead() + { + return $this->belongsTo('App\Models\Lead', 'lead_id', 'id'); + } + + public function sf_guard_user() + { + return $this->belongsTo('App\Models\SfGuardUser', 'sf_guard_user_id', 'id'); + } + + public function arrangements() + { + return $this->hasMany('App\Models\Sym\Arrangement', 'booking_id', 'id')->orderBy('view_position', 'DESC'); + } + + + public function findBeforeDraftItemRelation($reid) { @@ -46,4 +154,14 @@ class Booking extends Model return false; } + public function getStartDateFormat(){ + if(!$this->attributes['start_date']){ return ""; } + return Carbon::parse($this->attributes['start_date'])->format(\Util::formatDateDB()); + } + + public function getEndDateFormat(){ + if(!$this->attributes['end_date']){ return ""; } + return Carbon::parse($this->attributes['end_date'])->format(\Util::formatDateDB()); + } + } diff --git a/app/Models/BookingDraftItem.php b/app/Models/BookingDraftItem.php index 3924ee8..4205f1a 100644 --- a/app/Models/BookingDraftItem.php +++ b/app/Models/BookingDraftItem.php @@ -55,6 +55,11 @@ use Illuminate\Database\Eloquent\Model; * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookingDraftItem whereTravelProgramId($value) * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookingDraftItem whereUpdatedAt($value) * @mixin \Eloquent + * @property int|null $fewo_lodging_id + * @property float|null $price + * @property-read \App\Models\Booking $booking + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookingDraftItem whereFewoLodgingId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookingDraftItem wherePrice($value) */ class BookingDraftItem extends Model { diff --git a/app/Models/CMSContent.php b/app/Models/CMSContent.php new file mode 100644 index 0000000..5ed1dda --- /dev/null +++ b/app/Models/CMSContent.php @@ -0,0 +1,115 @@ + 'Text (190 Zeichen)', + 'full_text' => 'Full Text (50K Zeichen)', + 'integer' => 'Zahl (10 Stellen)', + 'decimal' => 'Kommazahl (10,2 Stellen)', + ]; + + protected $connection = 'mysql_stern'; + protected $table = 'c_m_s_contents'; + + protected $fillable = [ + 'name', 'field', 'text', 'full_text', 'integer', 'decimal', + ]; + + public function sluggable() + { + return [ + 'slug' => [ + 'source' => 'name' + ] + ]; + } + + public static function getFieldsOptions($setKey = false){ + $options = self::$fields; + $ret = ""; + foreach ($options as $key => $option){ + $attr = ($key == $setKey) ? 'selected="selected"' : ''; + $ret .= '\n'; + } + return $ret; + } + + public function getFieldName(){ + return isset(self::$fields[$this->field]) ? self::$fields[$this->field] : ''; + } + + public function getPreviewContent(){ + + $content = $this->{$this->field}; + if(strlen($content) > 40){ + return substr($content, 0, 40)." ..."; + } + return $content; + } + + + public function _format_number($value){ + return preg_replace("/[^0-9,]/", "", $value); + } + + public function setDecimalAttribute($value) + { + $value = $this->_format_number($value); + $value = substr($value, -13); + $this->attributes['decimal'] = floatval(str_replace(',', '.', $value)); + } + + public function getDecimalAttribute() + { + if(isset($this->attributes['decimal'])){ + // 2 = decimal places | '.' = decimal seperator | ',' = thousand seperator + return number_format(($this->attributes['decimal']), 2, ',', '.'); + } + return ""; + } + + public function setIntegerAttribute($value) + { + $value = $this->_format_number($value); + $value = substr($value, -10); + $this->attributes['integer'] = intval($value); + } + + +} diff --git a/app/Models/DraftItem.php b/app/Models/DraftItem.php index c55524b..7169007 100644 --- a/app/Models/DraftItem.php +++ b/app/Models/DraftItem.php @@ -44,6 +44,8 @@ use Illuminate\Database\Eloquent\Model; * @mixin \Eloquent * @property string|null $service * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\DraftItem whereService($value) + * @property float|null $price + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\DraftItem wherePrice($value) */ class DraftItem extends Model { diff --git a/app/Models/DraftType.php b/app/Models/DraftType.php index 4b3a677..48b2c6c 100644 --- a/app/Models/DraftType.php +++ b/app/Models/DraftType.php @@ -19,6 +19,8 @@ use Illuminate\Database\Eloquent\Model; * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\DraftType whereUpdatedAt($value) * @mixin \Eloquent * @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\DraftItem[] $draft_items + * @property string|null $color + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\DraftType whereColor($value) */ class DraftType extends Model { diff --git a/app/Models/Feedback.php b/app/Models/Feedback.php index 6cf67d4..e12d0a2 100644 --- a/app/Models/Feedback.php +++ b/app/Models/Feedback.php @@ -5,6 +5,97 @@ namespace App\Models; use Carbon\Carbon; use HTMLHelper; +/** + * App\Models\Feedback + * + * @property int $id + * @property int|null $owner + * @property string|null $model + * @property int|null $lvl + * @property int $owner_second + * @property int|null $catalog_id + * @property int|null $catalog_index + * @property string|null $slug + * @property int|null $travel_program + * @property int|null $status + * @property int|null $show_in_navi + * @property int|null $order + * @property string|null $title + * @property string|null $pagetitle + * @property string|null $description + * @property string|null $keywords + * @property string|null $content + * @property string|null $content_new + * @property string|null $buma_destination + * @property int|null $OLD_CatalogID + * @property int|null $OLD_OwnerID + * @property int|null $buma_gjr + * @property string|null $date + * @property int $price-tags + * @property string|null $text_right + * @property string|null $keyword + * @property string|null $canonical_url + * @property int|null $country_id + * @property string|null $template + * @property int|null $lft + * @property int|null $rgt + * @property int|null $tree_root + * @property int|null $parent_id + * @property string|null $real_url_path + * @property string|null $box_body + * @property string|null $box_image_url + * @property string|null $box_star + * @property string|null $box_discount + * @property string|null $cms_settings + * @property int|null $fewo_lodging + * @property \Illuminate\Support\Carbon|null $created_at + * @property \Illuminate\Support\Carbon|null $updated_at + * @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\Feedback[] $children + * @property-read \App\Models\Feedback|null $parent + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereBoxBody($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereBoxDiscount($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereBoxImageUrl($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereBoxStar($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereBumaDestination($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereBumaGjr($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereCanonicalUrl($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereCatalogId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereCatalogIndex($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereCmsSettings($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereContent($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereContentNew($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereCountryId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereCreatedAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereDate($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereDescription($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereFewoLodging($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereKeyword($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereKeywords($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereLft($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereLvl($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereModel($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereOLDCatalogID($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereOLDOwnerID($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereOrder($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereOwner($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereOwnerSecond($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback wherePagetitle($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereParentId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback wherePriceTags($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereRealUrlPath($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereRgt($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereShowInNavi($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereSlug($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereStatus($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereTemplate($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereTextRight($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereTitle($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereTravelProgram($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereTreeRoot($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereUpdatedAt($value) + * @mixin \Eloquent + */ class Feedback extends Page { protected $table = 'page'; diff --git a/app/Models/Lead.php b/app/Models/Lead.php new file mode 100644 index 0000000..e4ad1be --- /dev/null +++ b/app/Models/Lead.php @@ -0,0 +1,81 @@ +belongsTo('App\Models\Status', 'status_id', 'id'); + } + + public function sf_guard_user() + { + return $this->belongsTo('App\Models\SfGuardUser', 'sf_guard_user_id', 'id'); + } +} diff --git a/app/Models/Page.php b/app/Models/Page.php index d2900e6..9c6f12f 100644 --- a/app/Models/Page.php +++ b/app/Models/Page.php @@ -4,6 +4,95 @@ namespace App\Models; use Illuminate\Database\Eloquent\Model; +/** + * App\Models\Page + * + * @property int $id + * @property int|null $owner + * @property string|null $model + * @property int|null $lvl + * @property int $owner_second + * @property int|null $catalog_id + * @property int|null $catalog_index + * @property string|null $slug + * @property int|null $travel_program + * @property int|null $status + * @property int|null $show_in_navi + * @property int|null $order + * @property string|null $title + * @property string|null $pagetitle + * @property string|null $description + * @property string|null $keywords + * @property string|null $content + * @property string|null $content_new + * @property string|null $buma_destination + * @property int|null $OLD_CatalogID + * @property int|null $OLD_OwnerID + * @property int|null $buma_gjr + * @property string|null $date + * @property int $price-tags + * @property string|null $text_right + * @property string|null $keyword + * @property string|null $canonical_url + * @property int|null $country_id + * @property string|null $template + * @property int|null $lft + * @property int|null $rgt + * @property int|null $tree_root + * @property int|null $parent_id + * @property string|null $real_url_path + * @property string|null $box_body + * @property string|null $box_image_url + * @property string|null $box_star + * @property string|null $box_discount + * @property string|null $cms_settings + * @property int|null $fewo_lodging + * @property \Illuminate\Support\Carbon|null $created_at + * @property \Illuminate\Support\Carbon|null $updated_at + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereBoxBody($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereBoxDiscount($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereBoxImageUrl($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereBoxStar($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereBumaDestination($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereBumaGjr($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereCanonicalUrl($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereCatalogId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereCatalogIndex($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereCmsSettings($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereContent($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereContentNew($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereCountryId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereCreatedAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereDate($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereDescription($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereFewoLodging($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereKeyword($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereKeywords($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereLft($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereLvl($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereModel($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereOLDCatalogID($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereOLDOwnerID($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereOrder($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereOwner($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereOwnerSecond($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page wherePagetitle($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereParentId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page wherePriceTags($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereRealUrlPath($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereRgt($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereShowInNavi($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereSlug($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereStatus($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereTemplate($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereTextRight($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereTitle($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereTravelProgram($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereTreeRoot($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereUpdatedAt($value) + * @mixin \Eloquent + */ class Page extends Model { protected $connection = 'mysql_stern'; diff --git a/app/Models/SidebarWidget.php b/app/Models/SidebarWidget.php index b541bd5..2c464d3 100644 --- a/app/Models/SidebarWidget.php +++ b/app/Models/SidebarWidget.php @@ -4,6 +4,29 @@ namespace App\Models; use Illuminate\Database\Eloquent\Model; +/** + * App\Models\SidebarWidget + * + * @property int $id + * @property string $name + * @property string|null $component + * @property string|null $html + * @property array|null $show_at + * @property int|null $pos + * @property int $active + * @property \Illuminate\Support\Carbon|null $created_at + * @property \Illuminate\Support\Carbon|null $updated_at + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\SidebarWidget whereActive($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\SidebarWidget whereComponent($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\SidebarWidget whereCreatedAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\SidebarWidget whereHtml($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\SidebarWidget whereId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\SidebarWidget whereName($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\SidebarWidget wherePos($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\SidebarWidget whereShowAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\SidebarWidget whereUpdatedAt($value) + * @mixin \Eloquent + */ class SidebarWidget extends Model { diff --git a/app/Models/Status.php b/app/Models/Status.php new file mode 100644 index 0000000..5d3a28e --- /dev/null +++ b/app/Models/Status.php @@ -0,0 +1,31 @@ +belongsTo('App\Models\Status', 'status_id', 'id'); + } +} diff --git a/app/Models/Sym/Arrangement.php b/app/Models/Sym/Arrangement.php index 65ebb5a..4514229 100644 --- a/app/Models/Sym/Arrangement.php +++ b/app/Models/Sym/Arrangement.php @@ -34,6 +34,8 @@ use Illuminate\Database\Eloquent\Model; */ class Arrangement extends Model { + protected $connection = 'mysql'; + protected $table = 'arrangement'; } diff --git a/app/Models/Sym/ArrangementTemplate.php b/app/Models/Sym/ArrangementTemplate.php index 7800290..da0244c 100644 --- a/app/Models/Sym/ArrangementTemplate.php +++ b/app/Models/Sym/ArrangementTemplate.php @@ -17,6 +17,8 @@ use Illuminate\Database\Eloquent\Model; */ class ArrangementTemplate extends Model { + protected $connection = 'mysql'; + protected $table = 'arrangement_template'; public function arrangements() diff --git a/app/Models/Sym/TravelCountry.php b/app/Models/Sym/TravelCountry.php new file mode 100644 index 0000000..c18281c --- /dev/null +++ b/app/Models/Sym/TravelCountry.php @@ -0,0 +1,39 @@ +belongsTo('App\Models\Sym\TravelCountry', 'travelcountry_id', 'id'); + } + + + //on stern other DB + public function travel_country() + { + return $this->belongsTo('App\Models\TravelCountry', 'travelcountry_id', 'crm_id'); + } + +} \ No newline at end of file diff --git a/app/Models/TravelCountry.php b/app/Models/TravelCountry.php index f9d7a95..cea7eda 100644 --- a/app/Models/TravelCountry.php +++ b/app/Models/TravelCountry.php @@ -4,6 +4,36 @@ namespace App\Models; use Illuminate\Database\Eloquent\Model; +/** + * App\Models\TravelCountry + * + * @property int $id + * @property int|null $crm_id + * @property string $name + * @property string|null $html_information + * @property string|null $entry_requirements + * @property int|null $feedback_page_id + * @property int|null $is_customer_country + * @property int|null $active_frontend + * @property int|null $active_backend + * @property string|null $updated_at + * @property string|null $created_at + * @property-read \App\Models\Page|null $feedback_page + * @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\TravelNationalityRequirement[] $travel_nationality_requirements + * @property-read \App\Models\TravelProgramCountry $travel_program_country + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCountry whereActiveBackend($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCountry whereActiveFrontend($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCountry whereCreatedAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCountry whereCrmId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCountry whereEntryRequirements($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCountry whereFeedbackPageId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCountry whereHtmlInformation($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCountry whereId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCountry whereIsCustomerCountry($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCountry whereName($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCountry whereUpdatedAt($value) + * @mixin \Eloquent + */ class TravelCountry extends Model { //use the connection to sec. Datebase sterntours @@ -15,6 +45,11 @@ class TravelCountry extends Model protected $fillable = [ 'name', 'html_information', + 'entry_requirements', + 'is_customer_country', + 'active_frontend', + 'active_backend' + ]; public $timestamps = false; @@ -23,4 +58,40 @@ class TravelCountry extends Model { return $this->hasOne('App\Models\TravelProgramCountry', 'country_id', 'id'); } -} + + public function feedback_page() + { + return $this->belongsTo('App\Models\Page', 'feedback_page_id', 'id'); + } + + public function travel_nationality_requirements() + { + return $this->hasMany('App\Models\TravelNationalityRequirement', 'travel_country_id', 'id'); + } + + + public function getNationalityRequirement($travel_nationality_id){ + + $model = TravelNationalityRequirement::where('travel_country_id', $this->id)->where('travel_nationality_id', $travel_nationality_id)->first(); + if($model){ + return $model->text; + } + return ""; + } + + public function setNationalityRequirement($travel_nationality_id, $text){ + $model = TravelNationalityRequirement::where('travel_country_id', $this->id)->where('travel_nationality_id', $travel_nationality_id)->first(); + if($model){ + $model->text = $text; + $model->save(); + }else{ + $data = [ + 'travel_country_id' => $this->id, + 'travel_nationality_id' => $travel_nationality_id, + 'text' => $text, + ]; + TravelNationalityRequirement::create($data); + } + return ""; + } +} \ No newline at end of file diff --git a/app/Models/TravelMagazine.php b/app/Models/TravelMagazine.php new file mode 100644 index 0000000..eb925a4 --- /dev/null +++ b/app/Models/TravelMagazine.php @@ -0,0 +1,85 @@ + 'Kurze Version', + 1 => 'Lange Version', + ]; + + protected $fillable = [ + 'name', 'slug', 'text', 'full_text', 'meta_title', 'meta_description', 'meta_keywords', 'pos', 'scope', 'active', + ]; + + public function sluggable() + { + return [ + 'slug' => [ + 'source' => 'name' + ] + ]; + } + + public static function getScopeOptions($setKey = false){ + $options = self::$scopes; + $ret = ""; + foreach ($options as $key => $option){ + $attr = ($key == $setKey) ? 'selected="selected"' : ''; + $ret .= '\n'; + } + return $ret; + } + public function getScopeName($key = 0){ + return isset(self::$scopes[$key]) ? self::$scopes[$key] : ''; + } + + + +} diff --git a/app/Models/TravelNationality.php b/app/Models/TravelNationality.php new file mode 100644 index 0000000..afbc06d --- /dev/null +++ b/app/Models/TravelNationality.php @@ -0,0 +1,33 @@ +belongsTo('App\Models\TravelCountry', 'travel_country_id'); + } + + public function travel_nationality() + { + return $this->belongsTo('App\Models\TravelNationality', 'travel_nationality_id'); + } + +} diff --git a/app/Models/TravelProgram.php b/app/Models/TravelProgram.php index e535a21..7390c5a 100644 --- a/app/Models/TravelProgram.php +++ b/app/Models/TravelProgram.php @@ -103,6 +103,9 @@ use Illuminate\Database\Eloquent\Model; * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelProgram whereCreatedAt($value) * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelProgram whereUpdatedAt($value) * @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\TravelProgramDraft[] $travel_program_drafts + * @property int|null $insurance_4 + * @property-read \App\Models\TravelProgramCountry $travel_program_country + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelProgram whereInsurance4($value) */ class TravelProgram extends Model { diff --git a/app/Models/TravelProgramCountry.php b/app/Models/TravelProgramCountry.php index cb0aa23..4220557 100644 --- a/app/Models/TravelProgramCountry.php +++ b/app/Models/TravelProgramCountry.php @@ -2,8 +2,20 @@ namespace App\Models; +use Carbon\Carbon; use Illuminate\Database\Eloquent\Model; +/** + * App\Models\TravelProgramCountry + * + * @property int|null $program_id + * @property int|null $country_id + * @property-read \App\Models\TravelCountry|null $travel_country + * @property-read \App\Models\TravelProgram|null $travel_program + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelProgramCountry whereCountryId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelProgramCountry whereProgramId($value) + * @mixin \Eloquent + */ class TravelProgramCountry extends Model { //use the connection to sec. Datebase sterntours @@ -28,4 +40,5 @@ class TravelProgramCountry extends Model { return $this->belongsTo('App\Models\TravelCountry', 'country_id'); } + } diff --git a/app/Services/HTMLHelper.php b/app/Services/HTMLHelper.php index b6dbe01..bd85e38 100644 --- a/app/Services/HTMLHelper.php +++ b/app/Services/HTMLHelper.php @@ -7,6 +7,7 @@ use App\Models\DraftType; use App\Models\IndustrySector; use App\Models\Interest; use App\Models\TravelClass; +use App\Models\TravelCountry; use App\Models\TravelProgram; use Form; @@ -141,6 +142,18 @@ class HTMLHelper return $ret; } + public static function getTravelCountriesOptions($countryId = false){ + $options = TravelCountry::where('active_backend',1)->get(); + $ret = ''; + foreach ($options as $option){ + $attr = ($option->crm_id === $countryId) ? 'selected="selected"' : ''; + $ret .= '\n'; + } + return $ret; + } + + + public static function getWeekdaysOptions($programId = false, $weekdays = []){ if($programId){ $tp = TravelProgram::findOrFail($programId); diff --git a/app/helpers.php b/app/helpers.php index f66a158..9eb357c 100644 --- a/app/helpers.php +++ b/app/helpers.php @@ -3,7 +3,8 @@ if (! function_exists('make_old_url')) { function make_old_url($path) { - return config('app.old_url').$path; + $path = trim($path, "/"); + return config('app.old_url')."/".$path; } } @@ -11,6 +12,7 @@ if (! function_exists('make_old_url')) { if (! function_exists('make_v2_url')) { function make_v2_url($path) { - return config('app.url_v2').$path; + $path = trim($path, "/"); + return config('app.url_v2')."/".$path; } -} +} \ No newline at end of file diff --git a/bootstrap/cache/packages.php b/bootstrap/cache/packages.php index 97a64d9..f99d36c 100644 --- a/bootstrap/cache/packages.php +++ b/bootstrap/cache/packages.php @@ -6,6 +6,13 @@ 0 => 'Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider', ), ), + 'cviebrock/eloquent-sluggable' => + array ( + 'providers' => + array ( + 0 => 'Cviebrock\\EloquentSluggable\\ServiceProvider', + ), + ), 'fideloper/proxy' => array ( 'providers' => diff --git a/bootstrap/cache/services.php b/bootstrap/cache/services.php index a5026fe..1a4df44 100644 --- a/bootstrap/cache/services.php +++ b/bootstrap/cache/services.php @@ -24,29 +24,30 @@ 20 => 'Illuminate\\Validation\\ValidationServiceProvider', 21 => 'Illuminate\\View\\ViewServiceProvider', 22 => 'Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider', - 23 => 'Fideloper\\Proxy\\TrustedProxyServiceProvider', - 24 => 'Intervention\\Image\\ImageServiceProvider', - 25 => 'Jenssegers\\Date\\DateServiceProvider', - 26 => 'Laracasts\\Flash\\FlashServiceProvider', - 27 => 'Laravel\\Passport\\PassportServiceProvider', - 28 => 'Laravel\\Tinker\\TinkerServiceProvider', - 29 => 'Collective\\Html\\HtmlServiceProvider', - 30 => 'Maatwebsite\\Excel\\ExcelServiceProvider', - 31 => 'NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider', - 32 => 'Yajra\\DataTables\\DataTablesServiceProvider', + 23 => 'Cviebrock\\EloquentSluggable\\ServiceProvider', + 24 => 'Fideloper\\Proxy\\TrustedProxyServiceProvider', + 25 => 'Intervention\\Image\\ImageServiceProvider', + 26 => 'Jenssegers\\Date\\DateServiceProvider', + 27 => 'Laracasts\\Flash\\FlashServiceProvider', + 28 => 'Laravel\\Passport\\PassportServiceProvider', + 29 => 'Laravel\\Tinker\\TinkerServiceProvider', + 30 => 'Collective\\Html\\HtmlServiceProvider', + 31 => 'Maatwebsite\\Excel\\ExcelServiceProvider', + 32 => 'NunoMaduro\\Collision\\Adapters\\Laravel\\CollisionServiceProvider', 33 => 'Yajra\\DataTables\\DataTablesServiceProvider', - 34 => 'Laravel\\Tinker\\TinkerServiceProvider', - 35 => 'Laravel\\Passport\\PassportServiceProvider', - 36 => 'App\\Providers\\AppServiceProvider', - 37 => 'App\\Providers\\AuthServiceProvider', - 38 => 'App\\Providers\\EventServiceProvider', - 39 => 'App\\Providers\\RouteServiceProvider', - 40 => 'Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider', - 41 => 'Jenssegers\\Date\\DateServiceProvider', - 42 => 'Collective\\Html\\HtmlServiceProvider', - 43 => 'Intervention\\Image\\ImageServiceProvider', - 44 => 'Maatwebsite\\Excel\\ExcelServiceProvider', - 45 => 'Yajra\\DataTables\\DataTablesServiceProvider', + 34 => 'Yajra\\DataTables\\DataTablesServiceProvider', + 35 => 'Laravel\\Tinker\\TinkerServiceProvider', + 36 => 'Laravel\\Passport\\PassportServiceProvider', + 37 => 'App\\Providers\\AppServiceProvider', + 38 => 'App\\Providers\\AuthServiceProvider', + 39 => 'App\\Providers\\EventServiceProvider', + 40 => 'App\\Providers\\RouteServiceProvider', + 41 => 'Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider', + 42 => 'Jenssegers\\Date\\DateServiceProvider', + 43 => 'Collective\\Html\\HtmlServiceProvider', + 44 => 'Intervention\\Image\\ImageServiceProvider', + 45 => 'Maatwebsite\\Excel\\ExcelServiceProvider', + 46 => 'Yajra\\DataTables\\DataTablesServiceProvider', ), 'eager' => array ( @@ -60,23 +61,24 @@ 7 => 'Illuminate\\Pagination\\PaginationServiceProvider', 8 => 'Illuminate\\Session\\SessionServiceProvider', 9 => 'Illuminate\\View\\ViewServiceProvider', - 10 => 'Fideloper\\Proxy\\TrustedProxyServiceProvider', - 11 => 'Intervention\\Image\\ImageServiceProvider', - 12 => 'Jenssegers\\Date\\DateServiceProvider', - 13 => 'Laracasts\\Flash\\FlashServiceProvider', - 14 => 'Laravel\\Passport\\PassportServiceProvider', - 15 => 'Maatwebsite\\Excel\\ExcelServiceProvider', - 16 => 'Yajra\\DataTables\\DataTablesServiceProvider', + 10 => 'Cviebrock\\EloquentSluggable\\ServiceProvider', + 11 => 'Fideloper\\Proxy\\TrustedProxyServiceProvider', + 12 => 'Intervention\\Image\\ImageServiceProvider', + 13 => 'Jenssegers\\Date\\DateServiceProvider', + 14 => 'Laracasts\\Flash\\FlashServiceProvider', + 15 => 'Laravel\\Passport\\PassportServiceProvider', + 16 => 'Maatwebsite\\Excel\\ExcelServiceProvider', 17 => 'Yajra\\DataTables\\DataTablesServiceProvider', - 18 => 'Laravel\\Passport\\PassportServiceProvider', - 19 => 'App\\Providers\\AppServiceProvider', - 20 => 'App\\Providers\\AuthServiceProvider', - 21 => 'App\\Providers\\EventServiceProvider', - 22 => 'App\\Providers\\RouteServiceProvider', - 23 => 'Jenssegers\\Date\\DateServiceProvider', - 24 => 'Intervention\\Image\\ImageServiceProvider', - 25 => 'Maatwebsite\\Excel\\ExcelServiceProvider', - 26 => 'Yajra\\DataTables\\DataTablesServiceProvider', + 18 => 'Yajra\\DataTables\\DataTablesServiceProvider', + 19 => 'Laravel\\Passport\\PassportServiceProvider', + 20 => 'App\\Providers\\AppServiceProvider', + 21 => 'App\\Providers\\AuthServiceProvider', + 22 => 'App\\Providers\\EventServiceProvider', + 23 => 'App\\Providers\\RouteServiceProvider', + 24 => 'Jenssegers\\Date\\DateServiceProvider', + 25 => 'Intervention\\Image\\ImageServiceProvider', + 26 => 'Maatwebsite\\Excel\\ExcelServiceProvider', + 27 => 'Yajra\\DataTables\\DataTablesServiceProvider', ), 'deferred' => array ( diff --git a/composer.json b/composer.json index e8dc62d..8b5a7bc 100755 --- a/composer.json +++ b/composer.json @@ -6,6 +6,7 @@ "type": "project", "require": { "php": "^7.1.3", + "cviebrock/eloquent-sluggable": "4.5", "doctrine/dbal": "^2.8", "fideloper/proxy": "^4.0", "guzzlehttp/guzzle": "6.3.3", diff --git a/composer.lock b/composer.lock index 7a9656f..3d02b31 100755 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,136 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "3a834f91c6ad81d50f197b3a9a013fc3", + "content-hash": "d457816de1d32981b600ca4adccb827c", "packages": [ + { + "name": "cocur/slugify", + "version": "v3.2", + "source": { + "type": "git", + "url": "https://github.com/cocur/slugify.git", + "reference": "d41701efe58ba2df9cae029c3d21e1518cc6780e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/cocur/slugify/zipball/d41701efe58ba2df9cae029c3d21e1518cc6780e", + "reference": "d41701efe58ba2df9cae029c3d21e1518cc6780e", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "php": ">=5.5.9" + }, + "require-dev": { + "laravel/framework": "~5.1", + "latte/latte": "~2.2", + "league/container": "^2.2.0", + "mikey179/vfsstream": "~1.6", + "mockery/mockery": "~0.9", + "nette/di": "~2.2", + "phpunit/phpunit": "~4.8.36|~5.2", + "pimple/pimple": "~1.1", + "plumphp/plum": "~0.1", + "silex/silex": "~1.3", + "symfony/config": "~2.4|~3.0|~4.0", + "symfony/dependency-injection": "~2.4|~3.0|~4.0", + "symfony/http-kernel": "~2.4|~3.0|~4.0", + "twig/twig": "~1.26|~2.0", + "zendframework/zend-modulemanager": "~2.2", + "zendframework/zend-servicemanager": "~2.2", + "zendframework/zend-view": "~2.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "Cocur\\Slugify\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ivo Bathke", + "email": "ivo.bathke@gmail.com" + }, + { + "name": "Florian Eckerstorfer", + "email": "florian@eckerstorfer.co", + "homepage": "https://florian.ec" + } + ], + "description": "Converts a string into a slug.", + "keywords": [ + "slug", + "slugify" + ], + "time": "2019-01-31T20:38:55+00:00" + }, + { + "name": "cviebrock/eloquent-sluggable", + "version": "4.5.0", + "source": { + "type": "git", + "url": "https://github.com/cviebrock/eloquent-sluggable.git", + "reference": "f3595c9672a063df765d0ac748a02cfaf4257095" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/cviebrock/eloquent-sluggable/zipball/f3595c9672a063df765d0ac748a02cfaf4257095", + "reference": "f3595c9672a063df765d0ac748a02cfaf4257095", + "shasum": "" + }, + "require": { + "cocur/slugify": "^3.0", + "illuminate/config": "~5.6.0", + "illuminate/database": "~5.6.0", + "illuminate/support": "~5.6.0", + "php": "^7.0" + }, + "require-dev": { + "codedungeon/phpunit-result-printer": "^0.6.0", + "mockery/mockery": "^0.9.4", + "orchestra/database": "~3.6.0", + "orchestra/testbench": "~3.6.0", + "phpunit/phpunit": "~7.0" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Cviebrock\\EloquentSluggable\\ServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "Cviebrock\\EloquentSluggable\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Colin Viebrock", + "email": "colin@viebrock.ca" + } + ], + "description": "Easy creation of slugs for your Eloquent models in Laravel 5.", + "homepage": "https://github.com/cviebrock/eloquent-sluggable", + "keywords": [ + "eloquent", + "eloquent-sluggable", + "laravel", + "lumen", + "slug", + "sluggable" + ], + "time": "2018-02-11T02:19:23+00:00" + }, { "name": "defuse/php-encryption", "version": "v2.2.1", diff --git a/database/migrations/2018_10_29_193339_create_travel_country_table.php b/database/migrations/2018_10_29_193339_create_travel_country_table.php index 06af651..d3fed30 100644 --- a/database/migrations/2018_10_29_193339_create_travel_country_table.php +++ b/database/migrations/2018_10_29_193339_create_travel_country_table.php @@ -15,11 +15,23 @@ class CreateTravelCountryTable extends Migration { Schema::connection('mysql_stern')->create('travel_country', function (Blueprint $table) { $table->increments('id'); + $table->integer('crm_id')->nullable()->index(); + $table->integer('feedback_page_id')->index(); - - $table->integer('id')->index(); $table->string('name')->nullable(); - $table->string('html_information')->nullable(); + $table->text('html_information')->nullable(); + $table->text('entry_requirements')->nullable(); //need? + + $table->boolean('is_customer_country'); + $table->boolean('active_frontend')->default(false); + $table->boolean('active_backend')->default(true); + + $table->timestamps(); + + $table->foreign('feedback_page_id') + ->references('id') + ->on('page'); + }); } diff --git a/database/migrations/2018_10_29_202124_create_arrangement_table.php b/database/migrations/2018_10_29_202124_create_arrangement_table.php new file mode 100644 index 0000000..6dd727f --- /dev/null +++ b/database/migrations/2018_10_29_202124_create_arrangement_table.php @@ -0,0 +1,56 @@ +bigIncrements('id'); + $table->bigInteger('template_id')->nullable(); + $table->date('state')->nullable(); + $table->date('begin')->nullable(); + $table->date('end')->nullable(); + $table->string('type_s', 80)->nullable(); + $table->text('data_s')->nullable(); + $table->bigInteger('view_position')->nullable(); + $table->bigInteger('booking_id')->nullable(); + $table->bigInteger('type_id'); + $table->tinyInteger('in_pdf')->nullable()->default(0); + + $table->index('template_id', 'arrangement_template_id_idx'); + $table->index('booking_id', 'arrangement_booking_id_idx'); + + $table->foreign('booking_id', 'arrangement_booking_id_booking_id')->references('id')->on('booking')->onDelete('CASCADE +')->onUpdate('RESTRICT'); + $table->foreign('template_id', 'arrangement_template_id_arrangement_template_id')->references('id')->on('arrangement_template')->onDelete('CASCADE +')->onUpdate('RESTRICT'); + + }); + + + + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('arrangement'); + } +} diff --git a/database/migrations/2018_10_29_202125_create_lead_table.php b/database/migrations/2018_10_29_202125_create_lead_table.php new file mode 100644 index 0000000..82e524f --- /dev/null +++ b/database/migrations/2018_10_29_202125_create_lead_table.php @@ -0,0 +1,95 @@ +bigIncrements('id'); + $table->bigInteger('customer_id'); + $table->date('request_date'); + $table->date('travelperiod_start')->nullable(); + $table->date('travelperiod_end')->nullable(); + $table->bigInteger('travelperiod_length')->nullable(); + $table->bigInteger('travelcountry_id')->nullable(); + $table->bigInteger('travelagenda_id')->nullable(); + $table->text('remarks')->nullable(); + $table->integer('sf_guard_user_id'); + $table->tinyInteger('is_closed')->nullable()->default(0); + $table->bigInteger('initialcontacttype_id')->nullable(); + $table->bigInteger('searchengine_id')->nullable(); + $table->string('searchengine_keywords', 80)->nullable(); + $table->bigInteger('status_id'); + $table->date('next_due_date')->nullable(); + $table->bigInteger('website_id')->nullable(); + $table->bigInteger('travelcategory_id')->nullable(); + $table->dateTime('created_at'); + $table->dateTime('updated_at'); + $table->decimal('price', 10, 2)->nullable(); + $table->bigInteger('pax')->nullable(); + $table->string('participant_name', 80)->nullable(); + $table->string('participant_firstname', 80)->nullable(); + $table->date('participant_birthdate')->nullable(); + $table->bigInteger('participant_salutation_id')->nullable(); + + $table->index('initialcontacttype_id', 'initialcontacttype_id_idx'); + $table->index('searchengine_id', 'searchengine_id_idx'); + $table->index('status_id', 'status_id_idx'); + $table->index('travelcountry_id', 'travelcountry_id_idx'); + $table->index('travelagenda_id', 'travelagenda_id_idx'); + $table->index('sf_guard_user_id', 'sf_guard_user_id_idx'); + $table->index('website_id', 'website_id_idx'); + $table->index('travelcategory_id', 'travelcategory_id_idx'); + $table->index('customer_id', 'customer_id_idx'); + $table->index('participant_salutation_id', 'lead_participant_salutation_id_idx'); + + $table->foreign('customer_id', 'lead_customer_id_customer_id')->references('id')->on('customer')->onDelete('RESTRICT +')->onUpdate('RESTRICT'); + $table->foreign('initialcontacttype_id', 'lead_initialcontacttype_id_initial_contact_type_id')->references('id')->on('initial_contact_type')->onDelete('RESTRICT +')->onUpdate('RESTRICT'); + $table->foreign('participant_salutation_id', 'lead_participant_salutation_id_salutation_id')->references('id')->on('salutation')->onDelete('RESTRICT +')->onUpdate('RESTRICT'); + $table->foreign('searchengine_id', 'lead_searchengine_id_searchengine_id')->references('id')->on('searchengine')->onDelete('RESTRICT +')->onUpdate('RESTRICT'); + $table->foreign('sf_guard_user_id', 'lead_sf_guard_user_id_sf_guard_user_id')->references('id')->on('sf_guard_user')->onDelete('RESTRICT +')->onUpdate('RESTRICT'); + $table->foreign('status_id', 'lead_status_id_status_id')->references('id')->on('status')->onDelete('RESTRICT +')->onUpdate('RESTRICT'); + $table->foreign('travelagenda_id', 'lead_travelagenda_id_travel_agenda_id')->references('id')->on('travel_agenda')->onDelete('RESTRICT +')->onUpdate('RESTRICT'); + $table->foreign('travelcategory_id', 'lead_travelcategory_id_travel_category_id')->references('id')->on('travel_category')->onDelete('RESTRICT +')->onUpdate('RESTRICT'); + $table->foreign('travelcountry_id', 'lead_travelcountry_id_travel_country_id')->references('id')->on('travel_country')->onDelete('RESTRICT +')->onUpdate('RESTRICT'); + $table->foreign('website_id', 'lead_website_id_website_id')->references('id')->on('website')->onDelete('RESTRICT +')->onUpdate('RESTRICT'); + + }); + + + + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('lead'); + } +} diff --git a/database/migrations/2018_10_29_202126_create_status_table.php b/database/migrations/2018_10_29_202126_create_status_table.php new file mode 100644 index 0000000..9adef30 --- /dev/null +++ b/database/migrations/2018_10_29_202126_create_status_table.php @@ -0,0 +1,40 @@ +bigIncrements('id'); + $table->string('name', 255); + $table->bigInteger('handling_days'); + $table->string('color', 6)->nullable(); + }); + + + + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('status'); + } +} diff --git a/database/migrations/2018_12_22_171112_create_page_table.php b/database/migrations/2018_12_22_171112_create_page_table.php index 13363d5..a5bfbf2 100644 --- a/database/migrations/2018_12_22_171112_create_page_table.php +++ b/database/migrations/2018_12_22_171112_create_page_table.php @@ -17,7 +17,7 @@ class CreatePageTable extends Migration */ public function up() { - Schema::create('page', function (Blueprint $table) { + Schema::connection('mysql_stern')->create('page', function (Blueprint $table) { $table->increments('id'); $table->integer('owner')->nullable()->default(0); $table->string('model', 20)->nullable(); @@ -87,6 +87,6 @@ class CreatePageTable extends Migration */ public function down() { - Schema::dropIfExists('page'); + Schema::connection('mysql_stern')->dropIfExists('page'); } } diff --git a/database/migrations/2019_02_13_154404_create_sidebar_widgets_table.php b/database/migrations/2019_02_13_154404_create_sidebar_widgets_table.php index 51bf93a..ee41a8b 100644 --- a/database/migrations/2019_02_13_154404_create_sidebar_widgets_table.php +++ b/database/migrations/2019_02_13_154404_create_sidebar_widgets_table.php @@ -37,6 +37,4 @@ class CreateSidebarWidgetsTable extends Migration { Schema::connection('mysql_stern')->dropIfExists('sidebar_widgets'); } -} - -AppBundle:SidebarWidget \ No newline at end of file +} \ No newline at end of file diff --git a/database/migrations/2019_02_27_113516_create_c_m_s_contents_table.php b/database/migrations/2019_02_27_113516_create_c_m_s_contents_table.php new file mode 100644 index 0000000..2cfd802 --- /dev/null +++ b/database/migrations/2019_02_27_113516_create_c_m_s_contents_table.php @@ -0,0 +1,43 @@ +create('c_m_s_contents', function (Blueprint $table) { + $table->increments('id'); + + $table->string('name'); + $table->string('slug')->index()->unique(); + + $table->string('field', 10)->index(); + + $table->string('text')->nullable(); + $table->text('full_text')->nullable(); + $table->integer('integer')->nullable(); + $table->decimal('decimal')->nullable(); + + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::connection('mysql_stern')->dropIfExists('c_m_s_contents'); + } +} + diff --git a/database/migrations/2019_03_05_114656_create_travel_nationality_table.php b/database/migrations/2019_03_05_114656_create_travel_nationality_table.php new file mode 100644 index 0000000..9360814 --- /dev/null +++ b/database/migrations/2019_03_05_114656_create_travel_nationality_table.php @@ -0,0 +1,34 @@ +create('travel_nationality', function (Blueprint $table) { + $table->increments('id'); + $table->string('name', 255)->nullable(); + $table->boolean('active')->default(true); + + }); + + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::connection('mysql_stern')->dropIfExists('travel_nationality'); + } +} diff --git a/database/migrations/2019_03_05_114700_create_travel_nationality_requirement_table.php b/database/migrations/2019_03_05_114700_create_travel_nationality_requirement_table.php new file mode 100644 index 0000000..a6f9cba --- /dev/null +++ b/database/migrations/2019_03_05_114700_create_travel_nationality_requirement_table.php @@ -0,0 +1,46 @@ +create('travel_nationality_requirement', function (Blueprint $table) { + $table->increments('id'); + $table->integer('travel_country_id')->nullable(); + $table->integer('travel_nationality_id')->nullable(); + $table->text('text')->nullable(); + + $table->index('travel_country_id', 'travel_country_id'); + $table->index('travel_nationality_id', 'travel_nationality_id'); + + $table->foreign('travel_nationality_id', 'travel_nationality_requirement_ibfk_2')->references('id')->on('travel_nationality') + ->onDelete('RESTRICT')->onUpdate('RESTRICT'); + $table->foreign('travel_country_id', 'travel_nationality_requirement_ibfk_3')->references('id')->on('travel_country') + ->onDelete('RESTRICT')->onUpdate('RESTRICT'); + + }); + + + + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::connection('mysql_stern')->dropIfExists('travel_nationality_requirement'); + } +} + diff --git a/database/migrations/2019_03_05_114701_create_travel_agenda_table.php b/database/migrations/2019_03_05_114701_create_travel_agenda_table.php new file mode 100644 index 0000000..8e5d218 --- /dev/null +++ b/database/migrations/2019_03_05_114701_create_travel_agenda_table.php @@ -0,0 +1,47 @@ +bigIncrements('id'); + $table->string('name', 255); + $table->bigInteger('travelcountry_id')->nullable(); + $table->boolean('active')->default(true); + + + $table->index('travelcountry_id', 'travelcountry_id_idx'); + + $table->foreign('travelcountry_id', 'travel_agenda_travelcountry_id_travel_country_id')->references('id')->on('travel_country' + )->onDelete('RESTRICT')->onUpdate('RESTRICT'); + + }); + + + + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('travel_agenda'); + } +} diff --git a/database/migrations/2019_03_11_094922_create_travel_magazines_table.php b/database/migrations/2019_03_11_094922_create_travel_magazines_table.php new file mode 100644 index 0000000..8275aee --- /dev/null +++ b/database/migrations/2019_03_11_094922_create_travel_magazines_table.php @@ -0,0 +1,46 @@ +create('travel_magazines', function (Blueprint $table) { + $table->increments('id'); + + $table->string('name'); + $table->string('slug')->index()->unique(); + + $table->string('text')->nullable(); + $table->text('full_text')->nullable(); + + $table->string('meta_title')->nullable(); + $table->string('meta_description')->nullable(); + $table->string('meta_keywords')->nullable(); + + $table->tinyInteger('pos')->unsigned()->nullable(); + $table->boolean('scope')->default(true); + $table->boolean('active')->default(true); + + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::connection('mysql_stern')->dropIfExists('travel_magazines'); + } +} diff --git a/database/migrations/sym/0001_sym_travel_country_table.php b/database/migrations/sym/0001_sym_travel_country_table.php new file mode 100755 index 0000000..b862cde --- /dev/null +++ b/database/migrations/sym/0001_sym_travel_country_table.php @@ -0,0 +1,38 @@ +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'); + } +} diff --git a/public/css/application.css b/public/css/application.css index e69de29..998e004 100644 --- a/public/css/application.css +++ b/public/css/application.css @@ -0,0 +1,40 @@ +@media (max-width: 767px) { + .table-responsive .dropdown-menu, + .table-responsive .dropdown-toggle { + position: static !important; + } +} + +@media (min-width: 768px) { + .table-responsive { + overflow: visible; + } +} + +.table-responsive { + overflow: auto; + overflow-y: visible; +} + +.custom-select.active { + border-color: #a8c1a0; + outline: 0; + -webkit-box-shadow: none; + box-shadow: none; +} +.custom-select.deactive { + border-color: #c1998f; + outline: 0; + -webkit-box-shadow: none; + box-shadow: none; +} + +.form-control.active { + border: 1px solid rgba(24, 28, 33, 0.1); + border-color: #a8c1a0; +} +.form-control.deactive { + border: 1px solid rgba(24, 28, 33, 0.1); + border-color: #c1998f; +} + diff --git a/public/js/custom.js b/public/js/custom.js index 984903e..85b18f3 100644 --- a/public/js/custom.js +++ b/public/js/custom.js @@ -50,7 +50,6 @@ jQuery(document).ready(function() { $(function() { $('.datepicker-base').datepicker({ - orientation: 'auto left', calendarWeeks: true, todayBtn: 'linked', // daysOfWeekDisabled: '1', diff --git a/resources/views/booking/index.blade.php b/resources/views/booking/index.blade.php index 7e20544..320a422 100755 --- a/resources/views/booking/index.blade.php +++ b/resources/views/booking/index.blade.php @@ -26,6 +26,7 @@ "processing": true, "serverSide": true, "ajax": '{!! route('data_table_bookings') !!}', + "order": [[ 1, "desc" ]], "columns": [ { data: 'action_edit', orderable: false, searchable: false}, { data: 'id', name: 'id' }, diff --git a/resources/views/cms/content/index.blade.php b/resources/views/cms/content/index.blade.php new file mode 100755 index 0000000..bbdad56 --- /dev/null +++ b/resources/views/cms/content/index.blade.php @@ -0,0 +1,139 @@ +@extends('layouts.layout-2') + +@section('content') + +

+ {{ __('Inhalte') }} +

+ + @if ($errors->any()) +
+
+
+
    + @foreach ($errors->all() as $error) +
  • {{ $error }}
  • + @endforeach +
+
+
+
+ @endif + +
+
+
+ +
+ + + + + + + + + + + + + @foreach($contents as $value) + + + + + + + + + @endforeach + +
 {{__('Name')}}{{__('Type')}}{{__('Inhalt')}}
+ + {{ $value->name }}{{ $value->getFieldName() }}{{ $value->getPreviewContent() }}
+
+ +
+
+ +
+ + + + + + +@endsection \ No newline at end of file diff --git a/resources/views/cms/content/modal.blade.php b/resources/views/cms/content/modal.blade.php new file mode 100755 index 0000000..95ed750 --- /dev/null +++ b/resources/views/cms/content/modal.blade.php @@ -0,0 +1,80 @@ + +{!! Form::open(['url' => route('cms_content_store'), 'class' => 'modal-content']) !!} + + + + + + + +{!! Form::close() !!} + + + diff --git a/resources/views/cms/feedback/index.blade.php b/resources/views/cms/feedback/index.blade.php index d59fb77..2863165 100755 --- a/resources/views/cms/feedback/index.blade.php +++ b/resources/views/cms/feedback/index.blade.php @@ -2,12 +2,15 @@ @section('content') -

+

{{ __('Feedback') }}

-
+
+ @@ -63,7 +66,6 @@ }, initComplete: function () { this.api().columns(2).every( function () { - console.log(this.title); var column = this; var title = $(column.header()).html(); var select = $('') diff --git a/resources/views/cms/sidebar/index.blade.php b/resources/views/cms/sidebar/index.blade.php index d4103af..cd7f590 100755 --- a/resources/views/cms/sidebar/index.blade.php +++ b/resources/views/cms/sidebar/index.blade.php @@ -2,12 +2,15 @@ @section('content') -

+

{{ __('Sidebar') }}

diff --git a/resources/views/cms/travel_magazine/detail.blade.php b/resources/views/cms/travel_magazine/detail.blade.php new file mode 100755 index 0000000..f4e9aa2 --- /dev/null +++ b/resources/views/cms/travel_magazine/detail.blade.php @@ -0,0 +1,189 @@ +@extends('layouts.layout-2') + +@section('content') + + @if ($errors->any()) +
+
+
+
    + @foreach ($errors->all() as $error) +
  • {{ $error }}
  • + @endforeach +
+
+
+
+ @endif +

+ Reiseführer verwalten +

+ + {!! Form::open(['url' => route('cms_travel_magazine_detail', [$id]), 'class' => 'form-horizontal']) !!} + + + +
+
+
+
+ + + + + {{ Form::text('name', $travel_magazine->name, array('placeholder'=>__('Title'), 'class'=>'form-control', 'id'=>'travel_magazine_name', 'required'=>true)) }} +
+
+
+
+ + {{ Form::text('slug', $travel_magazine->slug, array('placeholder'=>__('slug'), 'class'=>'form-control', 'id'=>'travel_magazine_slug')) }} +
+
+
+
+ + +
+ {{ Form::textarea('full_text', $travel_magazine->full_text , ['class' => 'form-control summernote']) }} +
+
+ + +
+
+ + {{ Form::text('meta_title', $travel_magazine->meta_title, array('placeholder'=>__('meta_title'), 'class'=>'form-control', 'id'=>'travel_magazine_meta_title')) }} +
+
+ + {{ Form::text('meta_description', $travel_magazine->meta_description, array('placeholder'=>__('meta_description'), 'class'=>'form-control', 'id'=>'travel_magazine_meta_description')) }} +
+
+ + {{ Form::text('meta_keywords', $travel_magazine->meta_keywords, array('placeholder'=>__('meta_keywords'), 'class'=>'form-control', 'id'=>'feedback_meta_keywords')) }} +
+
+ +
+
+ + +
+   + {{ __('back') }} +
+ + {!! Form::close() !!} + + {{-- + + + + + + + + + --}} + + +@endsection \ No newline at end of file diff --git a/resources/views/cms/travel_magazine/index.blade.php b/resources/views/cms/travel_magazine/index.blade.php new file mode 100755 index 0000000..d067aa8 --- /dev/null +++ b/resources/views/cms/travel_magazine/index.blade.php @@ -0,0 +1,78 @@ +@extends('layouts.layout-2') + +@section('content') + +

+ {{ __('Reiseführer') }} +

+ +
+ + + + + + + + + + + + @foreach($travel_magazines as $value) + + + + + + + + + @endforeach + +
 {{__('Name')}}{{__('slug')}}{{__('Langer Text')}}{{__('sichtbar')}}#
+ + + + {{ $value->name }}{{ $value->slug }} + @if($value->scope) + + @else + + @endif + + @if($value->active) + + @else + + @endif + + +
+ +
+ +
+ + + +@endsection \ No newline at end of file diff --git a/resources/views/drafts/index.blade.php b/resources/views/drafts/index.blade.php index 91fdea2..dd405d4 100755 --- a/resources/views/drafts/index.blade.php +++ b/resources/views/drafts/index.blade.php @@ -119,7 +119,7 @@ @endforeach -
+
+
+
+
+ + + + + + + + +@endsection \ No newline at end of file diff --git a/resources/views/settings/travel_country/detail.blade.php b/resources/views/settings/travel_country/detail.blade.php new file mode 100755 index 0000000..8edcc6b --- /dev/null +++ b/resources/views/settings/travel_country/detail.blade.php @@ -0,0 +1,92 @@ +@extends('layouts.layout-2') + +@section('content') + +

+ Reiseland verwalten +

+ + {!! Form::open(['url' => route('admin_settings_travel_country_detail', [$id]), 'class' => 'form-horizontal']) !!} + + + + +
+
+
+
+ + {{ Form::text('name', $model->name, array('placeholder'=>__('Name'), 'class'=>'form-control', 'id'=>'widget_name', 'required'=>true)) }} +
+
+ + +
+
+ + +
+
+ + +
+
+ +
active_frontend) style="display: none;" @endif> +
+ +

Inhalte für Seite

+
+
+ + {{ Form::textarea('html_information', $model->html_information, ['class' => 'form-control summernote-small']) }} +
+
+
+
Einreisebestimmungen
+ @foreach($travel_nationalities as $travel_nationality) +
+
+ + {{ Form::textarea('travel_nationality_requirement['.$travel_nationality->id.']', $model->getNationalityRequirement($travel_nationality->id), ['class' => 'form-control summernote-small', 'id'=>'travel_nationality_requirement_'.$travel_nationality->id]) }} +
+
+ @endforeach +
+ + + +
+
+ +
+   + {{ __('back') }} +
+ + {!! Form::close() !!} + + + + + +@endsection \ No newline at end of file diff --git a/resources/views/settings/travel_country/index.blade.php b/resources/views/settings/travel_country/index.blade.php new file mode 100755 index 0000000..90358ce --- /dev/null +++ b/resources/views/settings/travel_country/index.blade.php @@ -0,0 +1,85 @@ +@extends('layouts.layout-2') + +@section('content') + +

+ {{ __('Reiseländer') }} + zurück ins v2 CMS + zurück ins v1 CRM +

+ +
+
+ + + + + + + + + + + + + @foreach($travel_countries as $value) + + + + + + + + + + + @endforeach + +
 {{__('Name')}} {{__('Seite')}} {{__('CRM')}} {{__('Kunden')}}#
+ + + + {{ $value->name }} + @if($value->active_frontend) + + @else + + @endif + + @if($value->active_backend) + + @else + + @endif + + @if($value->is_customer_country) + + @else + + @endif + + +
+ +
+ +
+ + + +@endsection \ No newline at end of file diff --git a/resources/views/settings/travel_nationality/index.blade.php b/resources/views/settings/travel_nationality/index.blade.php new file mode 100755 index 0000000..b918bc3 --- /dev/null +++ b/resources/views/settings/travel_nationality/index.blade.php @@ -0,0 +1,114 @@ +@extends('layouts.layout-2') + +@section('content') +

+ Nationalitäten + zurück ins v2 CMS + +

+ +
+ +
+ + + + + + + + + + + @foreach($travel_nationality as $value) + + + + + + + + @endforeach + +
 {{__('Name')}}{{__('sichtbar')}}
+ + {{ $value->name }} + @if($value->active) + + @else + + @endif +
+
+ +
+
+ + + + + + +
+ + +@endsection \ No newline at end of file diff --git a/routes/web.php b/routes/web.php index d6ef874..e55ac73 100755 --- a/routes/web.php +++ b/routes/web.php @@ -145,6 +145,11 @@ Route::group(['middleware' => ['admin']], function() Route::get('/booking/draft_item/delete/{id}', 'BookingController@draftItemDelete')->name('booking_draft_item_delete'); + Route::get('/requests/{step?}', 'RequestController@index')->name('requests'); + Route::get('/lead/detail/{id}', 'LeadController@detail')->name('lead_detail'); + + Route::get('data/table/requests', 'DataTableController@getRequests')->name('data_table_requests'); + //CMS @@ -154,13 +159,22 @@ Route::group(['middleware' => ['admin']], function() Route::post('/cms/feedback/detail/{id}', 'CMS\CMSFeedbackController@store')->name('cms_feedback_detail'); Route::get('/cms/feedback/delete/{id}', 'CMS\CMSFeedbackController@delete')->name('cms_feedback_delete'); + + Route::get('/cms/travel_magazine', 'CMS\CMSTravelMagazineController@index')->name('cms_travel_magazine'); + Route::get('/cms/travel_magazine/detail/{id}', 'CMS\CMSTravelMagazineController@detail')->name('cms_travel_magazine_detail'); + Route::post('/cms/travel_magazine/detail/{id}', 'CMS\CMSTravelMagazineController@store')->name('cms_travel_magazine_detail'); + Route::get('/cms/travel_magazine/delete/{id}', 'CMS\CMSTravelMagazineController@delete')->name('cms_travel_magazine_delete'); + + Route::get('/cms/sidebar', 'CMS\CMSSidebarController@index')->name('cms_sidebar'); Route::get('/cms/sidebar/detail/{id}', 'CMS\CMSSidebarController@detail')->name('cms_sidebar_detail'); Route::post('/cms/sidebar/detail/{id}', 'CMS\CMSSidebarController@store')->name('cms_sidebar_detail'); Route::get('/cms/sidebar/delete/{id}', 'CMS\CMSSidebarController@delete')->name('cms_sidebar_delete'); - - + Route::get('/cms/content', 'CMS\CMSContentController@index')->name('cms_content'); + Route::post('/cms/content/store', 'CMS\CMSContentController@store')->name('cms_content_store'); + Route::post('/cms/content/load/modal', 'CMS\CMSContentController@loadModal')->name('cms_content_load_modal'); + Route::get('/cms/content/delete/{id}', 'CMS\CMSContentController@delete')->name('cms_content_delete'); }); @@ -187,14 +201,22 @@ Route::group(['middleware' => ['superadmin']], function() { Route::post('/admin/translation/file/{file}/{language?}/{langsource?}/{show?}', 'TranslationFileController@update')->name('admin_translate_file_update'); - Route::get('/admin/settings/travel/country', 'DraftController@index')->name('admin_settings_travel_country'); - Route::post('/admin/settings/travel/country/update', 'DraftController@update')->name('admin_settings_travel_country_update'); - Route::get('/admin/settings/travel/country/delete/{id}', 'DraftController@delete')->name('admin_settings_travel_country_delete'); - - Route::get('/admin/settings/travel/program/{id?}', 'DraftController@index')->name('admin_settings_travel_program'); + Route::get('/admin/settings/travel/country', 'Settings\TravelCountryController@index')->name('admin_settings_travel_country'); + Route::get('/admin/settings/travel/country/detail/{id}', 'Settings\TravelCountryController@detail')->name('admin_settings_travel_country_detail'); + Route::post('/admin/settings/travel/country/detail/{id}', 'Settings\TravelCountryController@store')->name('admin_settings_travel_country_detail'); + Route::get('/admin/settings/travel/country/delete/{id}', 'Settings\TravelCountryController@delete')->name('admin_settings_travel_country_delete'); + + + Route::get('/admin/settings/travel/nationality', 'Settings\TravelNationalityController@index')->name('admin_settings_travel_nationality'); + Route::post('/admin/settings/travel/nationality/update', 'Settings\TravelNationalityController@update')->name('admin_settings_travel_nationality_update'); + Route::get('/admin/settings/travel/nationality/delete/{id}', 'Settings\TravelNationalityController@delete')->name('admin_settings_travel_nationality_delete'); + + + Route::get('/admin/settings/travel/program/{id?}', 'Settings\TravelAgendaController@index')->name('admin_settings_travel_program'); + Route::post('/admin/settings/travel/program/update', 'Settings\TravelAgendaController@update')->name('admin_settings_travel_program_update'); + Route::get('/admin/settings/travel/program/delete/{id}', 'Settings\TravelAgendaController@delete')->name('admin_settings_travel_program_delete'); - // });