Natinality, Country, Agenda, search Request. CMS

Magazine Content
This commit is contained in:
Kevin Adametz 2019-03-19 15:47:23 +01:00
parent 30d5ca3b44
commit aebfb0586a
72 changed files with 4636 additions and 590 deletions

2
.env
View file

@ -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

View file

@ -2,7 +2,7 @@
<project version="4">
<component name="dataSourceStorageLocal">
<data-source name="cmssso_db1@192.168.1.7" uuid="518aec94-6998-4ffd-beef-24607063526e">
<database-info product="" version="" jdbc-version="" driver-name="" driver-version="" family="MYSQL" exact-version="0.0" />
<database-info product="" version="" jdbc-version="" driver-name="" driver-version="" dbms="MYSQL" exact-version="0.0" />
<introspection-schemas>*:@</introspection-schemas>
</data-source>
</component>

View file

@ -4,6 +4,8 @@
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/app" isTestSource="false" packagePrefix="App\" />
<sourceFolder url="file://$MODULE_DIR$/tests" isTestSource="true" packagePrefix="Tests\" />
<excludeFolder url="file://$MODULE_DIR$/vendor/cocur/slugify" />
<excludeFolder url="file://$MODULE_DIR$/vendor/cviebrock/eloquent-sluggable" />
<excludeFolder url="file://$MODULE_DIR$/vendor/defuse/php-encryption" />
<excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/cache" />
<excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/dbal" />

2
.idea/php.xml generated
View file

@ -106,6 +106,8 @@
<path value="$PROJECT_DIR$/vendor/league/oauth2-server" />
<path value="$PROJECT_DIR$/vendor/symfony/psr-http-message-bridge" />
<path value="$PROJECT_DIR$/vendor/laravel/passport" />
<path value="$PROJECT_DIR$/vendor/cviebrock/eloquent-sluggable" />
<path value="$PROJECT_DIR$/vendor/cocur/slugify" />
</include_path>
</component>
<component name="PhpProjectSharedConfiguration" php_language_level="7.1" />

1023
.idea/workspace.xml generated

File diff suppressed because it is too large Load diff

View file

@ -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 <barryvdh@gmail.com>
* @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,

View file

@ -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!
*

View file

@ -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

View file

@ -0,0 +1,97 @@
<?php
namespace App\Http\Controllers\CMS;
use App\Http\Controllers\Controller;
use App\Models\CMSContent;
use Input;
use Request;
use Validator;
class CMSContentController extends Controller
{
/*
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
}
/**
* Show the application dashboard.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$data = [
'contents' => 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'));
}
}

View file

@ -0,0 +1,102 @@
<?php
namespace App\Http\Controllers\CMS;
use App\Http\Controllers\Controller;
use App\Models\TravelMagazine;
use Input;
use Validator;
class CMSTravelMagazineController extends Controller
{
/*
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
}
/**
* Show the application dashboard.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$data = [
'travel_magazines' => 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'));
}
}

View file

@ -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 '<a href="' . route('booking_detail', [$booking->id]) . '" class="btn icon-btn btn-sm btn-primary"><span class="far fa-edit"></span></a>';
})
->addColumn('id', function (Booking $booking) {
return '<a href="' . route('booking_detail', [$booking->id]) . '" data-id="'.$booking->id.'">'.$booking->id.'</a>';
return '<a data-order="'.$booking->id.'" href="' . route('booking_detail', [$booking->id]) . '" data-id="'.$booking->id.'">'.$booking->id.'</a>';
})
->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 ''; //'<a href="' . route('booking_detail', [$booking->id]) . '" class="btn icon-btn btn-sm btn-primary"><span class="far fa-edit"></span></a>';
})
->addColumn('lead_id', function (Booking $booking) {
return '<a data-order="'.$booking->lead_id.'" href="'.make_old_url('leads/'.$booking->lead_id.'/edit').'" data-id="'.$booking->lead_id.'">'.$booking->lead_id.'</a>';
})
->addColumn('participant_firstname', function (Booking $booking) {
return '<a data-order="'.$booking->participant_firstname.'" href="'.make_old_url('customer/'.$booking->customer_id.'/edit').'" data-id="'.$booking->customer_id.'">'.$booking->participant_firstname.'</a>';
})
->addColumn('participant_name', function (Booking $booking) {
return '<a data-order="'.$booking->participant_name.'" href="'.make_old_url('customer/'.$booking->customer_id.'/edit').'" data-id="'.$booking->customer_id.'">'.$booking->participant_name.'</a>';
})
->addColumn('id', function (Booking $booking) {
return '<a data-order="'.$booking->id.'" href="'.make_old_url('booking/'.$booking->id.'/edit').'" data-id="'.$booking->id.'">'.$booking->id.'</a>';
})
->addColumn('travel_country_id', function (Booking $booking) {
return '<span data-order="'.($booking->travel_country_id ? $booking->travel_country_id : 0).'">'.($booking->travel_country_id ? $booking->travel_country->name : "-").'</span>';
})
->addColumn('travelagenda_id', function (Booking $booking) {
return '<span data-order="'.($booking->travelagenda_id ? $booking->travelagenda_id : 0).'">'.($booking->travelagenda_id ? $booking->travel_agenda->name : "-").'</span>';
})
->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 ? ' <span data-order="1" class="badge badge-pill badge-success"><i class="far fa-check"></i></span>' : '<span data-order="0" class="badge badge-pill badge-danger"><i class="far fa-times"></i></span>';
})
->addColumn('sf_guard_user_id', function (Booking $booking) {
return '<span data-order="'.($booking->sf_guard_user_id ? $booking->sf_guard_user_id : 0).'">'.($booking->sf_guard_user_id? $booking->sf_guard_user->first_name." ".$booking->sf_guard_user->last_name : "-").'</span>';
})
->addColumn('lead.status_id', function (Booking $booking) {
return '<span data-order="'.($booking->lead->status_id ? $booking->lead->status_id : 0).'">'.($booking->lead->status_id ? $booking->lead->status->name : "-").'</span>';
})
/* ->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);
}

View file

@ -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'));
}
}

View file

@ -0,0 +1,43 @@
<?php
namespace App\Http\Controllers;
use App\Models\Booking;
use Input;
class RequestController extends Controller
{
public function __construct()
{
$this->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();
*/
}

View file

@ -0,0 +1,70 @@
<?php
namespace App\Http\Controllers\Settings;
use App\Http\Controllers\Controller;
use App\Models\Booking;
use App\Models\TravelAgenda;
use App\Models\TravelCountry;
use App\Models\TravelNationality;
use App\Models\TravelNationalityRequirement;
use Carbon\Carbon;
use HTMLHelper;
use Input;
class TravelAgendaController extends Controller
{
public function __construct()
{
$this->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();
}
}

View file

@ -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();
}
}

View file

@ -0,0 +1,65 @@
<?php
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;
class TravelNationalityController extends Controller
{
public function __construct()
{
$this->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();
}
}

View file

@ -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());
}
}

View file

@ -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
{

115
app/Models/CMSContent.php Normal file
View file

@ -0,0 +1,115 @@
<?php
namespace App\Models;
use Cviebrock\EloquentSluggable\Sluggable;
use Illuminate\Database\Eloquent\Model;
/**
* 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 Model
{
use Sluggable;
protected static $fields = [
'text' => '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 .= '<option value="'.$key.'" '.$attr.'>'.$option.'</option>\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);
}
}

View file

@ -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
{

View file

@ -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
{

View file

@ -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';

81
app/Models/Lead.php Normal file
View file

@ -0,0 +1,81 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
/**
* 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 Model
{
protected $connection = 'mysql';
protected $table = 'lead';
public function status()
{
return $this->belongsTo('App\Models\Status', 'status_id', 'id');
}
public function sf_guard_user()
{
return $this->belongsTo('App\Models\SfGuardUser', 'sf_guard_user_id', 'id');
}
}

View file

@ -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';

View file

@ -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
{

31
app/Models/Status.php Normal file
View file

@ -0,0 +1,31 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
/**
* 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 Model
{
protected $connection = 'mysql';
protected $table = 'status';
public function status()
{
return $this->belongsTo('App\Models\Status', 'status_id', 'id');
}
}

View file

@ -34,6 +34,8 @@ use Illuminate\Database\Eloquent\Model;
*/
class Arrangement extends Model
{
protected $connection = 'mysql';
protected $table = 'arrangement';
}

View file

@ -17,6 +17,8 @@ use Illuminate\Database\Eloquent\Model;
*/
class ArrangementTemplate extends Model
{
protected $connection = 'mysql';
protected $table = 'arrangement_template';
public function arrangements()

View file

@ -0,0 +1,39 @@
<?php
namespace App\Models\Sym;
use Illuminate\Database\Eloquent\Model;
/**
* 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 Model
{
protected $connection = 'mysql';
protected $table = 'travel_country';
protected $fillable = [
'name',
'is_customer_country',
'active_backend'
];
public $timestamps = false;
}

View file

@ -0,0 +1,50 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
/**
* 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 Model
{
protected $connection = 'mysql';
protected $table = 'travel_agenda';
protected $fillable = [
'name',
'travelcountry_id',
'active'
];
public $timestamps = false;
//on crm
public function travel_country_crm()
{
return $this->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');
}
}

View file

@ -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 "";
}
}

View file

@ -0,0 +1,85 @@
<?php
namespace App\Models;
use Cviebrock\EloquentSluggable\Sluggable;
use Illuminate\Database\Eloquent\Model;
/**
* 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)
* @mixin \Eloquent
*/
class TravelMagazine extends Model
{
use Sluggable;
//use the connection to sec. Datebase sterntours
protected $connection = 'mysql_stern';
protected $table = 'travel_magazines';
protected static $scopes = [
0 => '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 .= '<option value="'.$key.'" '.$attr.'>'.$option.'</option>\n';
}
return $ret;
}
public function getScopeName($key = 0){
return isset(self::$scopes[$key]) ? self::$scopes[$key] : '';
}
}

View file

@ -0,0 +1,33 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
/**
* 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 Model
{
//use the connection to sec. Datebase sterntours
protected $connection = 'mysql_stern';
protected $table = 'travel_nationality';
protected $fillable = [
'name',
'active',
];
public $timestamps = false;
}

View file

@ -0,0 +1,49 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
/**
* 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 Model
{
//use the connection to sec. Datebase sterntours
protected $connection = 'mysql_stern';
protected $table = 'travel_nationality_requirement';
protected $fillable = [
'travel_country_id',
'travel_nationality_id',
'text',
];
public $timestamps = false;
public function travel_country()
{
return $this->belongsTo('App\Models\TravelCountry', 'travel_country_id');
}
public function travel_nationality()
{
return $this->belongsTo('App\Models\TravelNationality', 'travel_nationality_id');
}
}

View file

@ -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
{

View file

@ -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');
}
}

View file

@ -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 .= '<option value="'.$option->crm_id.'" '.$attr.'>'.$option->name.'</option>\n';
}
return $ret;
}
public static function getWeekdaysOptions($programId = false, $weekdays = []){
if($programId){
$tp = TravelProgram::findOrFail($programId);

View file

@ -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;
}
}
}

View file

@ -6,6 +6,13 @@
0 => 'Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider',
),
),
'cviebrock/eloquent-sluggable' =>
array (
'providers' =>
array (
0 => 'Cviebrock\\EloquentSluggable\\ServiceProvider',
),
),
'fideloper/proxy' =>
array (
'providers' =>

View file

@ -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 (

View file

@ -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",

130
composer.lock generated
View file

@ -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",

View file

@ -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');
});
}

View file

@ -0,0 +1,56 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
/**
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
* @see https://github.com/cviebrock/sequel-pro-laravel-export
*/
class CreateArrangementTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('arrangement', function (Blueprint $table) {
$table->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');
}
}

View file

@ -0,0 +1,95 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
/**
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
* @see https://github.com/cviebrock/sequel-pro-laravel-export
*/
class CreateLeadTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('lead', function (Blueprint $table) {
$table->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');
}
}

View file

@ -0,0 +1,40 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
/**
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
* @see https://github.com/cviebrock/sequel-pro-laravel-export
*/
class CreateStatusTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('status', function (Blueprint $table) {
$table->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');
}
}

View file

@ -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');
}
}

View file

@ -37,6 +37,4 @@ class CreateSidebarWidgetsTable extends Migration
{
Schema::connection('mysql_stern')->dropIfExists('sidebar_widgets');
}
}
AppBundle:SidebarWidget
}

View file

@ -0,0 +1,43 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateCMSContentsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::connection('mysql_stern')->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');
}
}

View file

@ -0,0 +1,34 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateTravelNationalityTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::connection('mysql_stern')->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');
}
}

View file

@ -0,0 +1,46 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateTravelNationalityRequirementTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::connection('mysql_stern')->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');
}
}

View file

@ -0,0 +1,47 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
/**
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
* @see https://github.com/cviebrock/sequel-pro-laravel-export
*/
class CreateTravelAgendaTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('travel_agenda', function (Blueprint $table) {
$table->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');
}
}

View file

@ -0,0 +1,46 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateTravelMagazinesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::connection('mysql_stern')->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');
}
}

View file

@ -0,0 +1,38 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
/**
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
* @see https://github.com/cviebrock/sequel-pro-laravel-export
*/
class CreateTravelCountryTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('travel_country', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('name', 255);
$table->tinyInteger('is_customer_country')->nullable()->default(false);
$table->boolean('active_backend')->nullable()->default(false);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('travel_country');
}
}

View file

@ -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;
}

View file

@ -50,7 +50,6 @@ jQuery(document).ready(function() {
$(function() {
$('.datepicker-base').datepicker({
orientation: 'auto left',
calendarWeeks: true,
todayBtn: 'linked',
// daysOfWeekDisabled: '1',

View file

@ -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' },

View file

@ -0,0 +1,139 @@
@extends('layouts.layout-2')
@section('content')
<h4 class="font-weight-bold py-3 mb-1">
{{ __('Inhalte') }}
</h4>
@if ($errors->any())
<div class="row">
<div class="col-sm-12">
<div class="alert alert-danger">
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
</div>
</div>
@endif
<div class="card">
<div class="card-datatable table-responsive py-2" data-route-modal="{{ route('cms_content_load_modal') }}" data-target-modal="#modals-load-content">
<div class="mr-4 mb-2 text-right">
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-load-content"
data-id="new"
data-model="content"
>Neuen Content anlegen</button>
</div>
<table class="datatables-default table table-striped table-bordered clients-table">
<thead>
<tr>
<th style="max-width: 60px;">&nbsp;</th>
<th>{{__('Name')}}</th>
<th>{{__('Type')}}</th>
<th>{{__('Inhalt')}}</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach($contents as $value)
<tr>
<td class="not">
<button type="button" class="btn icon-btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-load-content"
data-id="{{ $value->id }}"
data-model="content">
<span class="far fa-edit"></span>
</button>
</td>
<td>{{ $value->name }}</td>
<td>{{ $value->getFieldName() }}</td>
<td>{{ $value->getPreviewContent() }}</td>
<td><a class="text-danger" href="{{ route('cms_content_delete', [$value->id]) }}" onclick="return confirm('{{__('Wirklich löschen?')}}');"><i class="far fa-trash-alt"></i></a></td>
</tr>
@endforeach
</tbody>
</table>
<div class="mt-4 mr-4 text-right">
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-load-content"
data-id="new"
data-model="content"
>Neuen Content anlegen</button>
</div>
</div>
</div>
<script>
$( document ).ready(function() {
function loadModalInner(self, data){
var url = data.route,
contentType = 'application/x-www-form-urlencoded; charset=UTF-8';
$.ajax({
url: url,
data: data,
type: "POST",
dataType: "json",
cache: false,
contentType: contentType,
encode: true,
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
},
success: function(data) {
$(data.response.target).find('.modal-dialog').html(data.html);
$('.selectpicker').selectpicker('refresh');
//datepicker_birthday_init();
},
error: function(xhr, status, errorThrown) {
console.log(xhr);
console.log(xhr.responseText);
console.log(errorThrown);
console.log("Sorry, there was a problem!");
}
});
return false;
}
$('#modals-load-content').on('show.bs.modal', function (event) {
var button = $(event.relatedTarget);
if (!button.data('id')) {
return;
}
var data = {};
data.route = button.parents('.card').find('.card-datatable').data('route-modal');
data.target = button.parents('.card').find('.card-datatable').data('target-modal');
data.id = button.data('id');
data.model = button.data('model');
console.log(data);
loadModalInner(this, data);
});
$('.datatables-default').dataTable({
"bLengthChange": false,
"iDisplayLength": 50,
"language": {
"url": "/js/German.json"
}
});
});
</script>
<!-- Modal template -->
<div class="modal fade" id="modals-load-content">
<div class="modal-dialog">
</div>
</div>
@endsection

View file

@ -0,0 +1,80 @@
{!! Form::open(['url' => route('cms_content_store'), 'class' => 'modal-content']) !!}
<input type="hidden" name="id" id="id" value="@if($value->id>0){{$value->id}}@else new @endif">
<div class="modal-header">
<h5 class="modal-title">
{{ __('Inhalt') }}
<span class="font-weight-light">erstellen/bearbeiten</span>
</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
</div>
<div class="modal-body">
<div class="form-row">
<div class="form-group col">
<label for="name" class="form-label">{{ __('Name') }}</label>
{{ Form::text('name', $value->name, array('placeholder'=>__('Name'), 'class'=>'form-control', 'required')) }}
</div>
</div>
<div class="form-row">
<div class="form-group col">
<label for="field" class="form-label">{{ __('Country') }}*</label>
<select class="selectpicker" name="field" data-style="btn-light" data-live-search="true" required>
{!! \App\Models\CMSContent::getFieldsOptions($value->field) !!}
</select>
</div>
</div>
<div class="form-row show-content-text" style="display: ;">
<div class="form-group col">
<label for="text" class="form-label">{{ __('Text') }}</label>
{{ Form::text('text', $value->text, array('placeholder'=>__('Text'), 'class'=>'form-control')) }}
</div>
</div>
<div class="form-row show-content-full_text" style="display: ;">
<div class="form-group col">
<label for="text" class="form-label">{{ __('Full Text') }}</label>
{{ Form::textarea('full_text', $value->full_text, array('placeholder'=>__('Full Text'), 'class'=>'form-control', 'rows'=>20)) }}
</div>
</div>
<div class="form-row show-content-integer" style="display: ;">
<div class="form-group col">
<label for="integer" class="form-label">{{ __('Zahl') }}</label>
{{ Form::text('integer', $value->integer, array('placeholder'=>__('Zahl'), 'class'=>'form-control')) }}
</div>
</div>
<div class="form-row show-content-decimal" style="display: ;">
<div class="form-group col">
<label for="decimal" class="form-label">{{ __('Kommazahl') }}</label>
{{ Form::text('decimal', $value->decimal, array('placeholder'=>__('Kommazahl'), 'class'=>'form-control')) }}
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">schließen</button>
<button type="submit" class="btn btn-primary">speichern</button>
</div>
{!! Form::close() !!}
<script>
$( document ).ready(function() {
$('div[class*="show-content"]').hide();
$('.show-content-'+$('select[name="field"]').val()).show();
$('select[name="field"]').on('change', function () {
$('div[class*="show-content"]').hide();
$('.show-content-'+$(this).val()).show();
});
});
</script>

View file

@ -2,12 +2,15 @@
@section('content')
<h4 class="font-weight-bold py-3 mb-4">
<h4 class="font-weight-bold py-3 mb-1">
{{ __('Feedback') }}
</h4>
<div class="card">
<div class="card-datatable table-responsive">
<div class="card-datatable table-responsive py-2">
<div class="mr-4 mb-2 text-right">
<a href="{{ route('cms_feedback_detail', ['new']) }}" class="btn btn-sm btn-primary">Neuen Feedback anlegen</a>
</div>
<table class="datatables-feedbacks table table-striped table-bordered">
<thead>
<tr>
@ -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 = $('<select class="selectpicker"><option value="">'+title+'</option></select>')

View file

@ -2,12 +2,15 @@
@section('content')
<h4 class="font-weight-bold py-3 mb-4">
<h4 class="font-weight-bold py-3 mb-1">
{{ __('Sidebar') }}
</h4>
<div class="card">
<div class="card-datatable table-responsive">
<div class="card-datatable table-responsive py-2">
<div class="mr-4 mb-2 text-right">
<a href="{{ route('cms_sidebar_detail', ['new']) }}" class="btn btn-sm btn-primary">Neues Sidbar Widget anlegen</a>
</div>
<table class="datatables-feedbacks table table-striped table-bordered">
<thead>
<tr>

View file

@ -0,0 +1,189 @@
@extends('layouts.layout-2')
@section('content')
<style>
.alert ul {
margin-bottom: 0;
}
</style>
@if ($errors->any())
<div class="row">
<div class="col-sm-12">
<div class="alert alert-danger">
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
</div>
</div>
@endif
<h4 class="font-weight-bold py-3 mb-1">
Reiseführer verwalten
</h4>
{!! Form::open(['url' => route('cms_travel_magazine_detail', [$id]), 'class' => 'form-horizontal']) !!}
<input type="hidden" name="id" id="id" value="{{$id}}">
<!-- draft -->
<div class="card mb-2">
<div class="card-body">
<div class="form-row">
<div class="form-group col-12">
<label class="custom-control custom-checkbox float-right">
{!! Form::checkbox('active', 1, $travel_magazine->active, ['class'=>'custom-control-input']) !!}
<span class="custom-control-label">{{__('aktiv')}}</span>
</label>
<label class="form-label" for="travel_magazine_title">{{ __('Titel') }}*</label>
{{ Form::text('name', $travel_magazine->name, array('placeholder'=>__('Title'), 'class'=>'form-control', 'id'=>'travel_magazine_name', 'required'=>true)) }}
</div>
</div>
<div class="form-row">
<div class="form-group col-sm-12">
<label class="form-label" for="travel_magazine_slug">{{ __('slug') }} (wird autmatisch aus dem Titel erstellt)</label>
{{ Form::text('slug', $travel_magazine->slug, array('placeholder'=>__('slug'), 'class'=>'form-control', 'id'=>'travel_magazine_slug')) }}
</div>
</div>
<div class="form-row">
<div class="form-group col-sm-12">
<label class="custom-control custom-checkbox float-right">
{!! Form::checkbox('scope', 1, $travel_magazine->scope, ['class'=>'custom-control-input']) !!}
<span class="custom-control-label">{{__('Langer Text')}}</span>
</label>
<label class="form-label" for="travel_magazine_full_text">{{ __('Text') }}*</label>
<br clear="all">
{{ Form::textarea('full_text', $travel_magazine->full_text , ['class' => 'form-control summernote']) }}
</div>
</div>
<div class="form-row">
<div class="form-group col-md-12">
<label class="form-label" for="travel_magazine_meta_title">{{ __('META-Titel (optional)') }}</label>
{{ Form::text('meta_title', $travel_magazine->meta_title, array('placeholder'=>__('meta_title'), 'class'=>'form-control', 'id'=>'travel_magazine_meta_title')) }}
</div>
<div class="form-group col-md-12">
<label class="form-label" for="travel_magazine_meta_description">{{ __('META-Beschreibung (optional)') }}</label>
{{ Form::text('meta_description', $travel_magazine->meta_description, array('placeholder'=>__('meta_description'), 'class'=>'form-control', 'id'=>'travel_magazine_meta_description')) }}
</div>
<div class="form-group col-md-12">
<label class="form-label" for="travel_magazine_meta_keywords">{{ __('META-Keywords (optional)') }}</label>
{{ Form::text('meta_keywords', $travel_magazine->meta_keywords, array('placeholder'=>__('meta_keywords'), 'class'=>'form-control', 'id'=>'feedback_meta_keywords')) }}
</div>
</div>
</div>
</div>
<div class="text-left mt-3">
<button type="submit" name="action" value="saveAll" class="btn btn-submit">{{ __('save changes') }}</button>&nbsp;
<a href="{{route('cms_travel_magazine')}}" class="btn btn-default">{{ __('back') }}</a>
</div>
{!! Form::close() !!}
{{--
<!-- Modal template -->
<div class="modal fade" id="modals-class">
<div class="modal-dialog">
<form class="modal-content" action="{{ route('travel_program_class_update') }}" method="post">
@csrf
<input type="hidden" class="form-control" name="id">
<input type="hidden" class="form-control" name="program_id" value="{{$feedback->id}}">
<div class="modal-header">
<h5 class="modal-title">Programm Katagorie/Klassen <span class="font-weight-light">anlegen/bearbeiten</span></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
</div>
<div class="modal-body">
<div class="form-row">
<div class="form-group col">
<label class="custom-control custom-checkbox float-right">
<input type="checkbox" class="custom-control-input" name="standard" checked>
<span class="custom-control-label">{{__('Standard')}}</span>
</label>
<label for="name" class="form-label">Name*</label>
<input type="text" class="form-control" name="name" placeholder="{{__('Description')}}" required>
</div>
</div>
<div class="form-row">
<div class="form-group col">
<label for="description" class="form-label">Beschreibung</label>
<input type="text" class="form-control" name="description" placeholder="{{__('Description')}}">
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{{__('close')}}</button>
<button type="submit" class="btn btn-primary">{{__('save')}}</button>
</div>
</form>
</div>
</div>
<!-- Modal template -->
<div class="modal fade" id="modals-draft">
<div class="modal-dialog">
<form class="modal-content" action="{{ route('travel_program_draft_update') }}" method="post">
@csrf
<input type="hidden" class="form-control" name="id">
<input type="hidden" class="form-control" name="travel_program_id" value="{{$feedback->id}}">
<div class="modal-header">
<h5 class="modal-title">Vorlage Reiseprogramm <span class="font-weight-light">zuordnen</span></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
</div>
<div class="modal-body">
<div class="form-row">
<div class="form-group col">
<label for="draft_id" class="form-label">{{__('Vorlage')}}</label>
<select class="selectpicker" data-style="btn-default" name="draft_id" data-live-search="true" required>
{!! HTMLHelper::getDraftOptions() !!}
</select>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{{__('close')}}</button>
<button type="submit" class="btn btn-primary">{{__('save')}}</button>
</div>
</form>
</div>
</div>
<script>
$( document ).ready(function() {
$('#modals-class').on('show.bs.modal', function (event) {
var button = $(event.relatedTarget);
$(this).find(".modal-content input[name='id']").val(button.data('id'));
$(this).find(".modal-body input[name='name']").val(button.data('name'));
$(this).find(".modal-body input[name='description']").val(button.data('description'));
$(this).find(".modal-body input[name='standard']").prop( "checked", button.data('standard'));
});
$('#modals-draft').on('show.bs.modal', function (event) {
var button = $(event.relatedTarget);
$(this).find(".modal-content input[name='id']").val(button.data('id'));
$(this).find(".modal-body select[name='draft_id']").val(button.data('draft_id'));
$(this).find(".modal-body select[name='travel_class_id']").val(button.data('travel_class_id'));
$(this).find(".modal-body select[name='weekdays[]']").val(button.data('weekdays'));
$('.selectpicker').selectpicker('refresh');
});
});
</script>
--}}
@endsection

View file

@ -0,0 +1,78 @@
@extends('layouts.layout-2')
@section('content')
<h4 class="font-weight-bold py-3 mb-1">
{{ __('Reiseführer') }}
</h4>
<div class="card">
<div class="card-datatable table-responsive py-2">
<div class="mr-4 mb-2 text-right">
<a href="{{ route('cms_travel_magazine_detail', ['new']) }}" class="btn btn-sm btn-primary">Neuen Eintrag anlegen</a>
</div>
<table class="datatables-travel_magazine table table-striped table-bordered">
<thead>
<tr>
<th style="max-width: 60px;">&nbsp;</th>
<th>{{__('Name')}}</th>
<th>{{__('slug')}}</th>
<th>{{__('Langer Text')}}</th>
<th>{{__('sichtbar')}}</th>
<th>#</th>
</tr>
</thead>
<tbody>
@foreach($travel_magazines as $value)
<tr>
<td>
<a href="{{ route('cms_travel_magazine_detail', [$value->id]) }}" class="btn icon-btn btn-sm btn-primary">
<span class="far fa-edit"></span>
</a>
</td>
<td><a href="{{ route('cms_travel_magazine_detail', [$value->id]) }}">{{ $value->name }}</a></td>
<td>{{ $value->slug }}</td>
<td data-sort="{{ $value->scope }}">
@if($value->scope)
<span class="badge badge-pill badge-success"><i class="far fa-check"></i></span>
@else
<span class="badge badge-pill badge-danger"><i class="far fa-times"></i></span>
@endif
</td>
<td data-sort="{{ $value->active }}">
@if($value->active)
<span class="badge badge-pill badge-success"><i class="far fa-check"></i></span>
@else
<span class="badge badge-pill badge-danger"><i class="far fa-times"></i></span>
@endif
</td>
<td>
<a class="text-danger" href="{{ route('cms_travel_magazine_delete', [$value->id]) }}" onclick="return confirm('{{__('Wirklich löschen?')}}');"><i class="far fa-trash-alt"></i></a>
</td>
</tr>
@endforeach
</tbody>
</table>
<div class="mt-4 col">
<a href="{{ route('cms_travel_magazine_detail', ['new']) }}" class="btn btn-sm btn-primary">Neuen Eintrag anlegen</a>
</div>
</div>
<script>
$( document ).ready(function() {
$('.datatables-travel_magazine').dataTable({
"bLengthChange": false,
"iDisplayLength": 50,
"language": {
"url": "/js/German.json"
},
});
});
</script>
</div>
@endsection

View file

@ -119,7 +119,7 @@
@endforeach
</tbody>
</table>
<div class="mt-4 text-right">
<div class="mt-4 text-left">
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-type"
data-id="new"
data-name=""

View file

@ -148,7 +148,6 @@
});
});
$(document).ready(function() {
$('.summernote').summernote({
height: 300,
@ -163,6 +162,33 @@
['view', ['fullscreen', 'codeview']],
['help', ['help']]
],
/*
callbacks: {
onPaste: function (e) {
var bufferText = ((e.originalEvent || e).clipboardData || window.clipboardData).getData('Text');
e.preventDefault();
document.execCommand('insertText', false, bufferText);
}
}
*/
});
});
$(document).ready(function() {
$('.summernote-small').summernote({
height: 150,
tabsize: 2,
followingToolbar: true,
toolbar: [
['style', ['style']],
['font', ['bold', 'italic', 'underline', 'clear']],
['color', ['color']],
['para', ['ul', 'ol', 'paragraph']],
['insert', ['link', 'picture', 'video', 'hr']],
['view', ['fullscreen', 'codeview']],
['help', ['help']]
],
});
});

View file

@ -28,9 +28,14 @@
<li class="sidenav-item{{ Request::is('drafts') ? ' active' : '' }}">
<a href="{{ route('drafts') }}" class="sidenav-link"><i class="sidenav-icon ion ion-md-paper"></i><div>Vorlagen</div></a>
</li>
<li class="sidenav-item{{ Request::is('requests') ? ' active' : '' }}">
<a href="{{ route('requests') }}" class="sidenav-link"><i class="sidenav-icon ion ion-md-search"></i><div>Anfragen</div></a>
</li>
<li class="sidenav-item{{ Request::is('bookings') ? ' active' : '' }}">
<a href="{{ route('bookings') }}" class="sidenav-link"><i class="sidenav-icon ion ion-md-bed"></i><div>Buchungen</div></a>
</li>
<li class="sidenav-divider mb-1"></li>
<li class="sidenav-header small font-weight-semibold">ADMIN CRM altes System</li>
@ -67,6 +72,14 @@
<li class="sidenav-divider mb-1"></li>
<li class="sidenav-header small font-weight-semibold">ADMIN CMS</li>
<li class="sidenav-item{{ Request::is('cms/content/*') ? ' active' : '' }}">
<a href="{{ route('cms_content') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-paper"></i><div>Inhalte</div></a>
</li>
<li class="sidenav-item{{ Request::is('cms/travel_magazine/*') ? ' active' : '' }}">
<a href="{{ route('cms_travel_magazine') }}" class="sidenav-link"><i class="sidenav-icon ion ion-md-map"></i><div>Reiseführer</div></a>
</li>
<li class="sidenav-item{{ Request::is('cms/feedback/*') ? ' active' : '' }}">
<a href="{{ route('cms_feedback') }}" class="sidenav-link"><i class="sidenav-icon ion ion-md-chatboxes"></i><div>Feedback</div></a>
@ -82,7 +95,7 @@
<li class="sidenav-header small font-weight-semibold">SUPERADMIN</li>
{{--
<li class="sidenav-item{{ Request::is('admin/settings/*') ? ' open' : '' }}">
<a href="javascript:void(0)" class="sidenav-link sidenav-toggle">
<i class="sidenav-icon ion ion-ios-settings"></i>
@ -90,16 +103,19 @@
</a>
<ul class="sidenav-menu">
<li class="sidenav-item{{ Request::is('admin/settings/travel/program/*') ? ' active' : '' }}">
<a href="{{ route('admin_settings_travel_program') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-airplane"></i><div>{{ __('Reiseprogramme') }}</div></a>
</li>
<li class="sidenav-item{{ Request::is('admin/settings/travel/country/*') ? ' active' : '' }}">
<a href="{{ route('admin_settings_travel_country') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-globe"></i><div>{{ __('Reiseländer') }}</div></a>
</li>
<li class="sidenav-item{{ Request::is('admin/settings/travel/program/*') ? ' active' : '' }}">
<a href="{{ route('admin_settings_travel_program') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-airplane"></i><div>{{ __('Reiseprogramme') }}</div></a>
<li class="sidenav-item{{ Request::is('admin/settings/travel/nationality/*') ? ' active' : '' }}">
<a href="{{ route('admin_settings_travel_nationality') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-people"></i><div>{{ __('Nationalitäten') }}</div></a>
</li>
</ul>
</li>
--}}
<li class="sidenav-item{{ Request::is('admin/users/*') ? ' active' : '' }} {{ Request::is('admin/user/edit/*') ? ' active' : '' }}">
<a href="{{ route('admin_users') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-ribbon"></i><div>{{ __('User Rechte') }}</div></a>

View file

@ -0,0 +1,291 @@
@extends('layouts.layout-2')
@section('content')
<h4 class="font-weight-bold py-3 mb-1">
{{ __('Anfragen') }}
</h4>
<div class="card">
<div class="ui-bordered px-4 pt-3 mb-0">
<div class="form-row align-items-center">
<div class="col-md-4 mb-4">
<label class="form-label" for="travel_option_search">Filter Anreise</label>
<select class="custom-select" name="travel_option_search" id="travel_option_search">
<option value="">Filter aus</option>
<option value="before_2">Anreise vor 2 Monaten</option>
<option value="brefore_1">Anreise vor 1 Monat</option>
<option value="on_site">vor Ort</option>
<option value="after_1">Anreise in 1 Monat</option>
<option value="after_1">Anreise in 2 Monat</option>
</select>
</div>
<div class="col-md-4 mb-4">
<label class="form-label">Filter Anreise Datum</label>
<div class="row">
<div class="input-group col-6 pr-0">
<div class="input-group-prepend">
<span class="input-group-text">ab</span>
</div>
<input class="form-control datepicker-base" name="arrival_start_date" type="text" value="">
</div>
<div class="input-group col-6 pl-1">
<div class="input-group-prepend">
<span class="input-group-text">bis</span>
</div>
<input class="form-control datepicker-base" name="arrival_end_date" type="text" value="">
</div>
</div>
</div>
<div class="col-md-4 mb-4">
<label class="form-label">Filter Abreise Datum</label>
<div class="row">
<div class="input-group col-6 pr-0">
<div class="input-group-prepend">
<span class="input-group-text">ab</span>
</div>
<input class="form-control datepicker-base" name="departure_start_date" type="text" value="">
</div>
<div class="input-group col-6 pl-1">
<div class="input-group-prepend">
<span class="input-group-text">bis</span>
</div>
<input class="form-control datepicker-base" name="departure_end_date" type="text" value="">
</div>
</div>
</div>
</div>
<div class="form-row align-items-center">
<div class="col-5 col-sm-2 mb-4">
<label class="form-label">LeadID</label>
<input class="form-control full_search" name="full_lead_id_search" placeholder="suche" type="text" value="">
</div>
<div class="col-6 col-sm-3 mb-4">
<label class="form-label">Vorname</label>
<input class="form-control full_search" name="full_firstname_search" placeholder="suche" type="text" value="">
</div>
<div class="col-6 col-sm-3 mb-4">
<label class="form-label">Nachname</label>
<input class="form-control full_search" name="full_lastname_search" placeholder="suche" type="text" value="">
</div>
<div class="col-5 col-sm-2 mb-4">
<label class="form-label">BookingID</label>
<input class="form-control full_search" name="full_booking_id_search" placeholder="suche" type="text" value="">
</div>
<div class="col-2 col-sm-2 mb-4 mt-4">
<a href="{{ route('requests') }}" class="btn icon-btn btn-sm btn-outline-dark float-right">
<span class="far fa-sync"></span>
</a>
</div>
</div>
</div>
<div class="card-datatable table-responsive py-2">
<input type="hidden" name="sort_travel_country_id" value="">
<input type="hidden" name="sort_travelagenda_id" value="">
<input type="hidden" name="sort_travel_documents" value="">
<input type="hidden" name="sort_sf_guard_user_id" value="">
<input type="hidden" name="sort_lead_status_id" value="">
<table id="datatables-requests" class="table table-striped table-bordered">
<thead>
<tr>
<!--<th style="max-width: 1px;">&nbsp;</th> -->
<th>{{__('LeadID')}}</th>
<th>{{__('Vorname')}}</th>
<th>{{__('Nachname')}}</th>
<th>{{__('BookingID')}}</th>
<th>{{__('Land')}}</th>
<th>{{__('Reise')}}</th>
<th>{{__('Anreise')}}</th>
<th>{{__('Abreise')}}</th>
<th>{{__('Reiseunterlage')}}</th>
<th>{{__('Sachbearbeiter')}}</th>
<th>{{__('Status')}}</th>
</tr>
</thead>
</table>
</div>
</div>
<script>
$( document ).ready(function() {
var table = $('#datatables-requests').DataTable({
"processing": true,
"serverSide": true,
"searching": false,
ajax: {
url: '{!! route( 'data_table_requests' ) !!}',
data: function(d) {
d.arrival_start_date = $('input[name=arrival_start_date]').val();
d.arrival_end_date = $('input[name=arrival_end_date]').val();
d.departure_start_date = $('input[name=departure_start_date]').val();
d.departure_end_date = $('input[name=departure_end_date]').val();
d.sort_travel_country_id = $('input[name=sort_travel_country_id]').val();
d.sort_travelagenda_id = $('input[name=sort_travelagenda_id]').val();
d.sort_travel_documents = $('input[name=sort_travel_documents]').val();
d.sort_sf_guard_user_id = $('input[name=sort_sf_guard_user_id]').val();
d.sort_lead_status_id = $('input[name=sort_lead_status_id]').val();
d.full_firstname_search = $('input[name=full_firstname_search]').val();
d.full_lastname_search = $('input[name=full_lastname_search]').val();
d.full_lead_id_search = $('input[name=full_lead_id_search]').val();
d.full_booking_id_search = $('input[name=full_booking_id_search]').val();
d.travel_option_search = $('select[name=travel_option_search]').val();
}
},
"columns": [
// { data: 'action_edit', orderable: false, searchable: false},
{ data: 'lead_id', name: 'lead_id' },
{ data: 'participant_firstname', name: 'participant_firstname' },
{ data: 'participant_name', name: 'participant_name' },
{ data: 'id', name: 'id' },
{ data: 'travel_country_id', name: 'travel_country_id', orderable: false },
{ data: 'travelagenda_id', name: 'travelagenda_id', orderable: false },
{ data: 'start_date', name: 'start_date' },
{ data: 'end_date', name: 'end_date' },
{ data: 'travel_documents', name: 'travel_documents', orderable: false },
{ data: 'sf_guard_user_id', name: 'sf_guard_user_id', orderable: false },
{ data: 'lead.status_id', name: 'lead.status_id', orderable: false },
],
"bLengthChange": false,
"iDisplayLength": 50,
"orderSequence": ["desc", "asc"],
"order": [[ 3, "desc" ]],
"language": {
"url": "/js/German.json"
},
initComplete: function () {
this.api().columns(4).every( function () {
var column = this;
var title = $(column.header()).html();
var select = $('<select class="selectpicker"><option value="">'+title+'</option></select>')
.appendTo( $(column.header()).empty() )
.on( 'change', function () {
$('input[name=sort_travel_country_id]').val($(this).val());
table.order( [ 3, 'desc' ] ).draw();
} );
column.data().unique().sort().each( function ( d, j ) {
if(d !== ""){
var text = $(d+' span').text();
if(text != "" && text != "-"){
select.append( '<option value="'+$(d).data('order')+'">'+ $(d+' span').text()+'</option>' );
}
}
} );
} );
this.api().columns(5).every( function () {
var column = this;
var title = $(column.header()).html();
var select = $('<select class="selectpicker"><option value="">'+title+'</option></select>')
.appendTo( $(column.header()).empty() )
.on( 'change', function () {
$('input[name=sort_travelagenda_id]').val($(this).val());
table.order( [ 3, 'desc' ] ).draw();
} );
column.data().unique().sort().each( function ( d, j ) {
if(d !== ""){
var text = $(d+' span').text();
if(text != "" && text != "-"){
select.append( '<option value="'+$(d).data('order')+'">'+ $(d+' span').text()+'</option>' );
}
}
} );
} );
this.api().columns(8).every( function () {
var column = this;
var title = $(column.header()).html();
var select = $('<select class="selectpicker"><option value="">'+title+'</option></select>')
.appendTo( $(column.header()).empty() )
.on( 'change', function () {
$('input[name=sort_travel_documents]').val($(this).val());
table.order( [ 3, 'desc' ] ).draw();
} );
column.data().unique().sort().each( function ( d, j ) {
if(d !== ""){
console.log($(d).data('order'));
var text = $(d).data('order') ? "Ja" : "Nein";
if(text != "" && text != "-"){
select.append( '<option value="'+$(d).data('order')+'">'+ text+'</option>' );
}
}
} );
} );
this.api().columns(9).every( function () {
var column = this;
var title = $(column.header()).html();
var select = $('<select class="selectpicker"><option value="">'+title+'</option></select>')
.appendTo( $(column.header()).empty() )
.on( 'change', function () {
$('input[name=sort_sf_guard_user_id]').val($(this).val());
table.order( [ 3, 'desc' ] ).draw();
} );
column.data().unique().sort().each( function ( d, j ) {
if(d !== ""){
var text = $(d+' span').text();
if(text != "" && text != "-"){
select.append( '<option value="'+$(d).data('order')+'">'+ $(d+' span').text()+'</option>' );
}
}
} );
} );
$('.selectpicker').selectpicker();
}
});
$('#travel_option_search').on('change', function(){
if($(this).val() != ""){
$('.datepicker-base').removeClass('active');
$('.datepicker-base').addClass('deactive');
$(this).removeClass('deactive');
$(this).addClass('active');
$('.datepicker-base').val(null);
}else{
$('.datepicker-base').removeClass('deactive');
$(this).removeClass('active');
}
table.order( [ 3, 'desc' ] ).draw();
// console.log($(this).val());
// console.log($(this).attr('name'));
});
$('.datepicker-base').on('change', function(){
if($(this).val() != ""){
$('#travel_option_search').removeClass('active');
$('#travel_option_search').addClass('deactive');
$('.datepicker-base').removeClass('deactive');
$('.datepicker-base').addClass('active');
$('#travel_option_search').val(null);
}else{
$('.datepicker-base').removeClass('active');
$('#travel_option_search').removeClass('deactive');
}
table.order( [ 3, 'desc' ] ).draw();
// console.log($(this).val());
// console.log($(this).attr('name'));
});
$('.full_search').on('keyup', function(){
table.order( [ 3, 'desc' ] ).draw();
// console.log($(this).val());
// console.log($(this).attr('name'));
});
});
</script>
@endsection

View file

@ -0,0 +1,128 @@
@extends('layouts.layout-2')
@section('content')
<h4 class="font-weight-bold py-3 mb-1">
Reiseprogramme
<a class="btn btn-default btn-sm float-right" href="{{ make_old_url('backend.php') }}" > zurück ins v1 CRM</a>
</h4>
<div class="card">
<div class="card-datatable table-responsive">
<table class="datatables-default table table-striped table-bordered">
<thead>
<tr>
<th style="max-width: 60px;">&nbsp;</th>
<th>{{__('Name')}}</th>
<th>{{__('Land')}}</th>
<th>{{__('sichtbar')}}</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach($travel_agenda as $value)
<tr>
<td>
<button type="button" class="btn icon-btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-default"
data-id="{{ $value->id }}"
data-name="{{ $value->name }}"
data-active="{{ $value->active }}"
data-travelcountry_id="{{$value->travelcountry_id}}">
<span class="far fa-edit"></span>
</button>
</td>
<td data-sort="{{ $value->id }}">{{ $value->name }}</td>
<td>{{ $value->travel_country->name }}</td>
<td data-sort="{{ $value->active }}">
@if($value->active)
<span class="badge badge-pill badge-success"><i class="far fa-check"></i></span>
@else
<span class="badge badge-pill badge-danger"><i class="far fa-times"></i></span>
@endif
</td>
<td><a class="text-danger" href="{{ route('admin_settings_travel_program_delete', [$value->id]) }}" onclick="return confirm('{{__('Wirklich löschen?')}}');"><i class="far fa-trash-alt"></i></a></td>
</tr>
@endforeach
</tbody>
</table>
<div class="mt-4 col">
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-default"
data-id="new"
data-name=""
data-active="1"
data-travelcountry_id="0"
>Neues Reiseprogramm anlegen</button>
</div>
</div>
</div>
<!-- Modal template -->
<div class="modal fade" id="modals-default">
<div class="modal-dialog">
<form class="modal-content" action="{{ route('admin_settings_travel_program_update') }}" method="post">
@csrf
<input type="hidden" class="form-control" name="id">
<div class="modal-header">
<h5 class="modal-title">Reiseprogramme <span class="font-weight-light">anlegen/bearbeiten</span></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
</div>
<div class="modal-body">
<div class="form-row">
<div class="form-group col">
<label for="name" class="form-label">Name*</label>
<input type="text" class="form-control" name="name" placeholder="{{__('Description')}}" required>
</div>
</div>
<div class="form-group">
<label class="custom-control custom-checkbox m-0">
<input type="checkbox" class="custom-control-input" name="active" checked>
<span class="custom-control-label">{{__('sichtbar')}}</span>
</label>
</div>
<div class="form-group">
<label for="travelcountry_id" class="form-label">{{__('Land')}}</label>
<select class="selectpicker" data-style="btn-default" name="travelcountry_id" data-live-search="true" required>
{!! HTMLHelper::getTravelCountriesOptions() !!}
</select>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{{__('close')}}</button>
<button type="submit" class="btn btn-primary">{{__('save')}}</button>
</div>
</form>
</div>
</div>
<script>
$( document ).ready(function() {
$('#modals-default').on('show.bs.modal', function (event) {
var button = $(event.relatedTarget);
$(this).find(".modal-content input[name='id']").val(button.data('id'));
$(this).find(".modal-body input[name='name']").val(button.data('name'));
$(this).find(".modal-body input[name='active']").prop( "checked", button.data('active'));
$(this).find(".modal-body select[name='travelcountry_id']").val(button.data('travelcountry_id'));
$('.selectpicker').selectpicker('refresh');
});
$('.datatables-default').dataTable({
"bLengthChange": false,
"iDisplayLength": 50,
"order": [[ 1, "asc" ]],
"language": {
"url": "/js/German.json"
}
});
});
</script>
@endsection

View file

@ -0,0 +1,92 @@
@extends('layouts.layout-2')
@section('content')
<h4 class="font-weight-bold py-3 mb-1">
Reiseland verwalten
</h4>
{!! Form::open(['url' => route('admin_settings_travel_country_detail', [$id]), 'class' => 'form-horizontal']) !!}
<input type="hidden" name="id" id="id" value="{{$id}}">
<!-- draft -->
<div class="card mb-2">
<div class="card-body">
<div class="form-row">
<div class="form-group col-sm-6">
<label class="form-label" for="widget_title">{{ __('Name') }}*</label>
{{ Form::text('name', $model->name, array('placeholder'=>__('Name'), 'class'=>'form-control', 'id'=>'widget_name', 'required'=>true)) }}
</div>
<div class="form-group col-sm-2">
<label class="form-label">&nbsp;</label>
<label class="custom-control custom-checkbox mt-2">
{!! Form::checkbox('active_frontend', 1, $model->active_frontend, ['class'=>'custom-control-input']) !!}
<span class="custom-control-label"><i class="far fa-eye"></i> {{__('Seite')}}</span>
</label>
</div>
<div class="form-group col-sm-2">
<label class="form-label">&nbsp;</label>
<label class="custom-control custom-checkbox mt-2">
{!! Form::checkbox('active_backend', 1, $model->active_backend, ['class'=>'custom-control-input']) !!}
<span class="custom-control-label"><i class="far fa-eye"></i> {{__('CRM')}}</span>
</label>
</div>
<div class="form-group col-sm-2">
<label class="form-label">&nbsp;</label>
<label class="custom-control custom-checkbox mt-2">
{!! Form::checkbox('is_customer_country', 1, $model->is_customer_country, ['class'=>'custom-control-input']) !!}
<span class="custom-control-label"><i class="far fa-eye"></i> {{__('Kunden')}}</span>
</label>
</div>
</div>
<div id="show_active_frontend" @if(!$model->active_frontend) style="display: none;" @endif>
<hr>
<h4>Inhalte für Seite</h4>
<div class="form-row">
<div class="form-group col-sm-12">
<label class="form-label" for="html_information">{{ __('Landinformationen (HTML)') }} </label>
{{ Form::textarea('html_information', $model->html_information, ['class' => 'form-control summernote-small']) }}
</div>
</div>
<hr>
<h5>Einreisebestimmungen</h5>
@foreach($travel_nationalities as $travel_nationality)
<div class="form-row">
<div class="form-group col-sm-12">
<label class="form-label" for="travel_nationality_requirement_{{$travel_nationality->id}}">{{ $travel_nationality->name }}{{ __('(HTML)') }} </label>
{{ 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]) }}
</div>
</div>
@endforeach
</div>
</div>
</div>
<div class="text-left mt-3">
<button type="submit" name="action" value="saveAll" class="btn btn-submit">{{ __('save changes') }}</button>&nbsp;
<a href="{{route('admin_settings_travel_country')}}" class="btn btn-default">{{ __('back') }}</a>
</div>
{!! Form::close() !!}
<script>
$( document ).ready(function() {
$('input[name="active_frontend"]').on('change', function () {
if($(this).prop( "checked")){
$('#show_active_frontend').show("slow");
}else{
$('#show_active_frontend').hide("slow");
}
});
});
</script>
@endsection

View file

@ -0,0 +1,85 @@
@extends('layouts.layout-2')
@section('content')
<h4 class="font-weight-bold py-3 mb-1">
{{ __('Reiseländer') }}
<a class="btn btn-default btn-sm float-right" href="{{ make_v2_url('/acp') }}" > zurück ins v2 CMS</a>
<a class="btn btn-default btn-sm float-right" href="{{ make_old_url('backend.php') }}" > zurück ins v1 CRM</a>
</h4>
<div class="card">
<div class="card-datatable table-responsive">
<table class="datatables-feedbacks table table-striped table-bordered">
<thead>
<tr>
<th style="max-width: 60px;">&nbsp;</th>
<th>{{__('Name')}}</th>
<th><i class="far fa-eye"></i> {{__('Seite')}}</th>
<th><i class="far fa-eye"></i> {{__('CRM')}}</th>
<th><i class="far fa-eye"></i> {{__('Kunden')}}</th>
<th>#</th>
</tr>
</thead>
<tbody>
@foreach($travel_countries as $value)
<tr>
<td>
<a href="{{ route('admin_settings_travel_country_detail', [$value->id]) }}" class="btn icon-btn btn-sm btn-primary">
<span class="far fa-edit"></span>
</a>
</td>
<td><a href="{{ route('admin_settings_travel_country_detail', [$value->id]) }}">{{ $value->name }}</a></td>
<td data-sort="{{ $value->active_frontend }}">
@if($value->active_frontend)
<span class="badge badge-pill badge-success"><i class="far fa-check"></i></span>
@else
<span class="badge badge-pill badge-danger"><i class="far fa-times"></i></span>
@endif
</td>
<td data-sort="{{ $value->active_backend }}">
@if($value->active_backend)
<span class="badge badge-pill badge-success"><i class="far fa-check"></i></span>
@else
<span class="badge badge-pill badge-danger"><i class="far fa-times"></i></span>
@endif
</td>
<td data-sort="{{ $value->is_customer_country }}">
@if($value->is_customer_country)
<span class="badge badge-pill badge-success"><i class="far fa-check"></i></span>
@else
<span class="badge badge-pill badge-danger"><i class="far fa-times"></i></span>
@endif
</td>
<td>
<a class="text-danger" href="{{ route('admin_settings_travel_country_delete', [$value->id]) }}" onclick="return confirm('{{__('Wirklich löschen?')}}');"><i class="far fa-trash-alt"></i></a>
</td>
</tr>
@endforeach
</tbody>
</table>
<div class="mt-4 col">
<a href="{{ route('admin_settings_travel_country_detail', ['new']) }}" class="btn btn-sm btn-primary">Neues Reiseland anlegen</a>
</div>
</div>
<script>
$( document ).ready(function() {
$('.datatables-feedbacks').dataTable({
"bLengthChange": false,
"iDisplayLength": 50,
"language": {
"url": "/js/German.json"
},
});
});
</script>
</div>
@endsection

View file

@ -0,0 +1,114 @@
@extends('layouts.layout-2')
@section('content')
<h4 class="font-weight-bold py-3 mb-1">
Nationalitäten
<a class="btn btn-default btn-sm float-right" href="{{ make_v2_url('/acp') }}" > zurück ins v2 CMS</a>
</h4>
<div class="card">
<div class="card-datatable table-responsive">
<table class="datatables-default table table-striped table-bordered">
<thead>
<tr>
<th style="max-width: 60px;">&nbsp;</th>
<th>{{__('Name')}}</th>
<th>{{__('sichtbar')}}</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach($travel_nationality as $value)
<tr>
<td>
<button type="button" class="btn icon-btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-default"
data-id="{{ $value->id }}"
data-name="{{ $value->name }}"
data-active="{{ $value->active }}">
<span class="far fa-edit"></span>
</button>
</td>
<td data-sort="{{ $value->id }}">{{ $value->name }}</td>
<td data-sort="{{ $value->active }}">
@if($value->active)
<span class="badge badge-pill badge-success"><i class="far fa-check"></i></span>
@else
<span class="badge badge-pill badge-danger"><i class="far fa-times"></i></span>
@endif
</td>
<td><a class="text-danger" href="{{ route('admin_settings_travel_nationality_delete', [$value->id]) }}" onclick="return confirm('{{__('Wirklich löschen?')}}');"><i class="far fa-trash-alt"></i></a></td>
</tr>
@endforeach
</tbody>
</table>
<div class="mt-4 col">
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-default"
data-id="new"
data-name=""
data-active="1"
>Neuen Nationalität anlegen</button>
</div>
</div>
<!-- Modal template -->
<div class="modal fade" id="modals-default">
<div class="modal-dialog">
<form class="modal-content" action="{{ route('admin_settings_travel_nationality_update') }}" method="post">
@csrf
<input type="hidden" class="form-control" name="id">
<div class="modal-header">
<h5 class="modal-title">Nationalität <span class="font-weight-light">anlegen/bearbeiten</span></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
</div>
<div class="modal-body">
<div class="form-row">
<div class="form-group col">
<label for="name" class="form-label">Name*</label>
<input type="text" class="form-control" name="name" placeholder="{{__('Description')}}" required>
</div>
</div>
<div class="form-group">
<label class="custom-control custom-checkbox m-0">
<input type="checkbox" class="custom-control-input" name="active" checked>
<span class="custom-control-label">{{__('sichtbar')}}</span>
</label>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{{__('close')}}</button>
<button type="submit" class="btn btn-primary">{{__('save')}}</button>
</div>
</form>
</div>
</div>
<script>
$( document ).ready(function() {
$('#modals-default').on('show.bs.modal', function (event) {
var button = $(event.relatedTarget);
$(this).find(".modal-content input[name='id']").val(button.data('id'));
$(this).find(".modal-body input[name='name']").val(button.data('name'));
$(this).find(".modal-body input[name='active']").prop( "checked", button.data('active'));
});
$('.datatables-default').dataTable({
"bLengthChange": false,
"iDisplayLength": 50,
"order": [[ 1, "asc" ]],
"language": {
"url": "/js/German.json"
}
});
});
</script>
</div>
@endsection

View file

@ -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');
//
});