diff --git a/.idea/workspace.xml b/.idea/workspace.xml index c4711f0..24a84b2 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,20 +2,38 @@ - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -30,50 +48,103 @@ - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + - + + - + - + - + + + + + + + + + + + + + + + + + + + - - - + + + + + + @@ -122,26 +193,36 @@ + - - + + - - - + + + + + + + + - - + + - + + + + + - - - - - + + + + + @@ -758,6 +839,28 @@ + + + + + + + + + + + + + + + + + + + + + + @@ -793,30 +896,20 @@ - - - - - - - + - - + + - + - - - - @@ -833,10 +926,6 @@ - - - - @@ -847,19 +936,20 @@ - - + + - + + - + - + diff --git a/.phpstorm.meta.php b/.phpstorm.meta.php index a3bfc43..1592766 100644 --- a/.phpstorm.meta.php +++ b/.phpstorm.meta.php @@ -5,7 +5,7 @@ namespace PHPSTORM_META { /** * PhpStorm Meta file, to provide autocomplete information for PhpStorm - * Generated on 2020-04-23 10:42:35. + * Generated on 2020-05-28 13:03:00. * * @author Barry vd. Heuvel * @see https://github.com/barryvdh/laravel-ide-helper diff --git a/_ide_helper.php b/_ide_helper.php index e33edb2..79f305e 100644 --- a/_ide_helper.php +++ b/_ide_helper.php @@ -2,8 +2,8 @@ // @formatter:off /** - * A helper file for Laravel 5, to provide autocomplete information to your IDE - * Generated for Laravel 6.18.5 on 2020-04-23 10:42:32. + * A helper file for Laravel, to provide autocomplete information to your IDE + * Generated for Laravel 6.18.13 on 2020-05-28 13:02:56. * * This file should not be included in your code, only analyzed by your IDE! * @@ -8726,7 +8726,7 @@ namespace Illuminate\Support\Facades { /** * Get the client user agent. * - * @return string + * @return string|null * @static */ public static function userAgent() @@ -13124,7 +13124,8 @@ namespace Illuminate\Support\Facades { * @return bool * @static */ - public static function prepend($path, $data, $separator = '') + public static function prepend($path, $data, $separator = ' +') { /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */ return $instance->prepend($path, $data, $separator); @@ -13139,7 +13140,8 @@ namespace Illuminate\Support\Facades { * @return bool * @static */ - public static function append($path, $data, $separator = '') + public static function append($path, $data, $separator = ' +') { /** @var \Illuminate\Filesystem\FilesystemAdapter $instance */ return $instance->append($path, $data, $separator); @@ -15204,7 +15206,7 @@ namespace Illuminate\Support\Facades { /** * Get the client user agent. * - * @return string + * @return string|null * @static */ public static function userAgent() @@ -19070,7 +19072,7 @@ namespace Maatwebsite\Excel\Facades { * @param string $event * @static */ - public static function extend($concern, $handler, $event = 'Maatwebsite\Excel\Events\BeforeWriting') + public static function extend($concern, $handler, $event = 'Maatwebsite\\Excel\\Events\\BeforeWriting') { return \Maatwebsite\Excel\Excel::extend($concern, $handler, $event); } @@ -19344,6 +19346,188 @@ namespace Yajra\DataTables\Facades { } +namespace Barryvdh\DomPDF { + + /** + * + * + */ + class Facade { + + /** + * Get the DomPDF instance + * + * @return \Barryvdh\DomPDF\Dompdf + * @static + */ + public static function getDomPDF() + { + /** @var \Barryvdh\DomPDF\PDF $instance */ + return $instance->getDomPDF(); + } + + /** + * Set the paper size (default A4) + * + * @param string $paper + * @param string $orientation + * @return \Barryvdh\DomPDF\PDF + * @static + */ + public static function setPaper($paper, $orientation = 'portrait') + { + /** @var \Barryvdh\DomPDF\PDF $instance */ + return $instance->setPaper($paper, $orientation); + } + + /** + * Show or hide warnings + * + * @param bool $warnings + * @return \Barryvdh\DomPDF\PDF + * @static + */ + public static function setWarnings($warnings) + { + /** @var \Barryvdh\DomPDF\PDF $instance */ + return $instance->setWarnings($warnings); + } + + /** + * Load a HTML string + * + * @param string $string + * @param string $encoding Not used yet + * @return static + * @static + */ + public static function loadHTML($string, $encoding = null) + { + /** @var \Barryvdh\DomPDF\PDF $instance */ + return $instance->loadHTML($string, $encoding); + } + + /** + * Load a HTML file + * + * @param string $file + * @return static + * @static + */ + public static function loadFile($file) + { + /** @var \Barryvdh\DomPDF\PDF $instance */ + return $instance->loadFile($file); + } + + /** + * Add metadata info + * + * @param array $info + * @return static + * @static + */ + public static function addInfo($info) + { + /** @var \Barryvdh\DomPDF\PDF $instance */ + return $instance->addInfo($info); + } + + /** + * Load a View and convert to HTML + * + * @param string $view + * @param array $data + * @param array $mergeData + * @param string $encoding Not used yet + * @return static + * @static + */ + public static function loadView($view, $data = [], $mergeData = [], $encoding = null) + { + /** @var \Barryvdh\DomPDF\PDF $instance */ + return $instance->loadView($view, $data, $mergeData, $encoding); + } + + /** + * Set/Change an option in DomPdf + * + * @param array $options + * @return static + * @static + */ + public static function setOptions($options) + { + /** @var \Barryvdh\DomPDF\PDF $instance */ + return $instance->setOptions($options); + } + + /** + * Output the PDF as a string. + * + * @return string The rendered PDF as string + * @static + */ + public static function output() + { + /** @var \Barryvdh\DomPDF\PDF $instance */ + return $instance->output(); + } + + /** + * Save the PDF to a file + * + * @param $filename + * @return static + * @static + */ + public static function save($filename) + { + /** @var \Barryvdh\DomPDF\PDF $instance */ + return $instance->save($filename); + } + + /** + * Make the PDF downloadable by the user + * + * @param string $filename + * @return \Illuminate\Http\Response + * @static + */ + public static function download($filename = 'document.pdf') + { + /** @var \Barryvdh\DomPDF\PDF $instance */ + return $instance->download($filename); + } + + /** + * Return a response with the PDF to show in the browser + * + * @param string $filename + * @return \Illuminate\Http\Response + * @static + */ + public static function stream($filename = 'document.pdf') + { + /** @var \Barryvdh\DomPDF\PDF $instance */ + return $instance->stream($filename); + } + + /** + * + * + * @static + */ + public static function setEncryption($password) + { + /** @var \Barryvdh\DomPDF\PDF $instance */ + return $instance->setEncryption($password); + } + + } + +} + namespace Barryvdh\Debugbar { /** @@ -19950,188 +20134,6 @@ namespace Barryvdh\Debugbar { } -namespace Barryvdh\DomPDF { - - /** - * - * - */ - class Facade { - - /** - * Get the DomPDF instance - * - * @return \Barryvdh\DomPDF\Dompdf - * @static - */ - public static function getDomPDF() - { - /** @var \Barryvdh\DomPDF\PDF $instance */ - return $instance->getDomPDF(); - } - - /** - * Set the paper size (default A4) - * - * @param string $paper - * @param string $orientation - * @return \Barryvdh\DomPDF\PDF - * @static - */ - public static function setPaper($paper, $orientation = 'portrait') - { - /** @var \Barryvdh\DomPDF\PDF $instance */ - return $instance->setPaper($paper, $orientation); - } - - /** - * Show or hide warnings - * - * @param bool $warnings - * @return \Barryvdh\DomPDF\PDF - * @static - */ - public static function setWarnings($warnings) - { - /** @var \Barryvdh\DomPDF\PDF $instance */ - return $instance->setWarnings($warnings); - } - - /** - * Load a HTML string - * - * @param string $string - * @param string $encoding Not used yet - * @return static - * @static - */ - public static function loadHTML($string, $encoding = null) - { - /** @var \Barryvdh\DomPDF\PDF $instance */ - return $instance->loadHTML($string, $encoding); - } - - /** - * Load a HTML file - * - * @param string $file - * @return static - * @static - */ - public static function loadFile($file) - { - /** @var \Barryvdh\DomPDF\PDF $instance */ - return $instance->loadFile($file); - } - - /** - * Add metadata info - * - * @param array $info - * @return static - * @static - */ - public static function addInfo($info) - { - /** @var \Barryvdh\DomPDF\PDF $instance */ - return $instance->addInfo($info); - } - - /** - * Load a View and convert to HTML - * - * @param string $view - * @param array $data - * @param array $mergeData - * @param string $encoding Not used yet - * @return static - * @static - */ - public static function loadView($view, $data = [], $mergeData = [], $encoding = null) - { - /** @var \Barryvdh\DomPDF\PDF $instance */ - return $instance->loadView($view, $data, $mergeData, $encoding); - } - - /** - * Set/Change an option in DomPdf - * - * @param array $options - * @return static - * @static - */ - public static function setOptions($options) - { - /** @var \Barryvdh\DomPDF\PDF $instance */ - return $instance->setOptions($options); - } - - /** - * Output the PDF as a string. - * - * @return string The rendered PDF as string - * @static - */ - public static function output() - { - /** @var \Barryvdh\DomPDF\PDF $instance */ - return $instance->output(); - } - - /** - * Save the PDF to a file - * - * @param $filename - * @return static - * @static - */ - public static function save($filename) - { - /** @var \Barryvdh\DomPDF\PDF $instance */ - return $instance->save($filename); - } - - /** - * Make the PDF downloadable by the user - * - * @param string $filename - * @return \Illuminate\Http\Response - * @static - */ - public static function download($filename = 'document.pdf') - { - /** @var \Barryvdh\DomPDF\PDF $instance */ - return $instance->download($filename); - } - - /** - * Return a response with the PDF to show in the browser - * - * @param string $filename - * @return \Illuminate\Http\Response - * @static - */ - public static function stream($filename = 'document.pdf') - { - /** @var \Barryvdh\DomPDF\PDF $instance */ - return $instance->stream($filename); - } - - /** - * - * - * @static - */ - public static function setEncryption($password) - { - /** @var \Barryvdh\DomPDF\PDF $instance */ - return $instance->setEncryption($password); - } - - } - -} - namespace Laracasts\Flash { /** @@ -22443,7 +22445,7 @@ namespace { /** * Add an "order by" clause to the query. * - * @param \Closure|\Illuminate\Database\Query\Builder|string $column + * @param \Closure|\Illuminate\Database\Query\Builder|\Illuminate\Database\Query\Expression|string $column * @param string $direction * @return \Illuminate\Database\Query\Builder * @throws \InvalidArgumentException @@ -23199,10 +23201,10 @@ namespace { class DataTables extends \Yajra\DataTables\Facades\DataTables {} - class Debugbar extends \Barryvdh\Debugbar\Facade {} - class PDF extends \Barryvdh\DomPDF\Facade {} + class Debugbar extends \Barryvdh\Debugbar\Facade {} + class Flash extends \Laracasts\Flash\Flash {} class Html extends \Collective\Html\HtmlFacade {} diff --git a/_ide_helper_models.php b/_ide_helper_models.php index d0e2c01..62fe2c3 100644 --- a/_ide_helper_models.php +++ b/_ide_helper_models.php @@ -114,6 +114,13 @@ namespace App\Models\Sym{ * @property-read int|null $bookings_count * @property array|null $contact_emails * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Sym\TravelCountry whereContactEmails($value) + * @property array|null $mail_dirs + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Sym\TravelCountry whereMailDirs($value) + * @property string|null $mail_dir_name + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Sym\TravelCountry whereMailDirName($value) + * @property-read \App\Models\TravelCountry|null $stern_travel_country + * @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\TravelCountryService[] $travel_country_services + * @property-read int|null $travel_country_services_count */ class TravelCountry extends \Eloquent {} } @@ -147,6 +154,12 @@ namespace App\Models\Sym{ * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Sym\CmsContent whereUpdatedAt($value) * @mixin \Eloquent * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Sym\CmsContent findSimilarSlugs($attribute, $config, $slug) + * @property string|null $identifier + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Sym\CmsContent whereIdentifier($value) + * @property array|null $object + * @property int|null $pos + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Sym\CmsContent whereObject($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Sym\CmsContent wherePos($value) */ class CmsContent extends \Eloquent {} } @@ -287,6 +300,77 @@ namespace App\Models{ class Keyword extends \Eloquent {} } +namespace App\Models{ +/** + * Class CustomerFewoMail + * + * @property int $id + * @property int $travel_user_booking_fewo_id + * @property int $travel_user_id + * @property bool $is_answer + * @property int $reply_id + * @property string $email + * @property string $recipient + * @property string $cc + * @property string $bcc + * @property string $subject + * @property string $message + * @property int $dir + * @property int $subdir + * @property bool $draft + * @property bool $important + * @property bool $send + * @property bool $fail + * @property string $error + * @property Carbon $sent_at + * @property Carbon $scheduled_at + * @property Carbon $delivered_at + * @property Carbon $created_at + * @property Carbon $updated_at + * @property CustomerFewoMail $customer_fewo_mail + * @property TravelUserBookingFewo $travel_user_booking_fewo + * @property TravelUser $travel_user + * @property Collection|CustomerFewoFile[] $customer_fewo_files + * @property Collection|CustomerFewoMail[] $customer_fewo_mails + * @package App\Models + * @property-read int|null $customer_fewo_files_count + * @property-read int|null $customer_fewo_mails_count + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CustomerFewoMail newModelQuery() + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CustomerFewoMail newQuery() + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CustomerFewoMail query() + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CustomerFewoMail whereBcc($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CustomerFewoMail whereCc($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CustomerFewoMail whereCreatedAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CustomerFewoMail whereDeliveredAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CustomerFewoMail whereDir($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CustomerFewoMail whereDraft($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CustomerFewoMail whereEmail($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CustomerFewoMail whereError($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CustomerFewoMail whereFail($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CustomerFewoMail whereId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CustomerFewoMail whereImportant($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CustomerFewoMail whereIsAnswer($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CustomerFewoMail whereMessage($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CustomerFewoMail whereRecipient($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CustomerFewoMail whereReplyId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CustomerFewoMail whereScheduledAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CustomerFewoMail whereSend($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CustomerFewoMail whereSentAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CustomerFewoMail whereSubdir($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CustomerFewoMail whereSubject($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CustomerFewoMail whereTravelUserBookingFewoId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CustomerFewoMail whereTravelUserId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CustomerFewoMail whereUpdatedAt($value) + * @mixin \Eloquent + * @property-read \App\Models\TravelUserBookingFewo $booking + * @property-read \App\Models\TravelUser $customer + * @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\CustomerFewoFile[] $customer_files + * @property-read int|null $customer_files_count + * @property-read \App\Models\CustomerFewoMail|null $customer_mail + */ + class CustomerFewoMail extends \Eloquent {} +} + namespace App\Models{ /** * App\Models\TravelNationality @@ -522,6 +606,43 @@ namespace App\Models{ class UserUpdateEmail extends \Eloquent {} } +namespace App\Models{ +/** + * Class TravelUserBookingFile + * + * @property int $id + * @property int $travel_user_booking_fewos + * @property string $identifier + * @property string $filename + * @property string $dir + * @property string $original_name + * @property string $ext + * @property string $mine + * @property int $size + * @property Carbon $created_at + * @property Carbon $updated_at + * @property TravelUserBookingFewo $travel_user_booking_fewo + * @package App\Models + * @property int|null $travel_user_booking_fewo_id + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUserBookingFile newModelQuery() + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUserBookingFile newQuery() + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUserBookingFile query() + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUserBookingFile whereCreatedAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUserBookingFile whereDir($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUserBookingFile whereExt($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUserBookingFile whereFilename($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUserBookingFile whereId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUserBookingFile whereIdentifier($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUserBookingFile whereMine($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUserBookingFile whereOriginalName($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUserBookingFile whereSize($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUserBookingFile whereTravelUserBookingFewoId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUserBookingFile whereUpdatedAt($value) + * @mixin \Eloquent + */ + class TravelUserBookingFile extends \Eloquent {} +} + namespace App\Models{ /** * Class BookingServiceItem @@ -864,6 +985,35 @@ namespace App\Models{ class Website extends \Eloquent {} } +namespace App\Models{ +/** + * Class EmailTemplateDir + * + * @property int $id + * @property string $name + * @property string $color + * @property bool $active + * @property int $pos + * @property Carbon $created_at + * @property Carbon $updated_at + * @property Collection|EmailTemplate[] $email_templates + * @package App\Models + * @property-read int|null $email_templates_count + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\EmailTemplateDir newModelQuery() + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\EmailTemplateDir newQuery() + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\EmailTemplateDir query() + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\EmailTemplateDir whereActive($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\EmailTemplateDir whereColor($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\EmailTemplateDir whereCreatedAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\EmailTemplateDir whereId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\EmailTemplateDir whereName($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\EmailTemplateDir wherePos($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\EmailTemplateDir whereUpdatedAt($value) + * @mixin \Eloquent + */ + class EmailTemplateDir extends \Eloquent {} +} + namespace App\Models{ /** * App\Models\CMSInfoHoliday @@ -956,6 +1106,8 @@ namespace App\Models{ * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CustomerMail whereTravelCountryId($value) * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CustomerMail whereUpdatedAt($value) * @mixin \Eloquent + * @property int|null $subdir + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CustomerMail whereSubdir($value) */ class CustomerMail extends \Eloquent {} } @@ -1165,6 +1317,42 @@ namespace App\Models{ class BookingDraftItem extends \Eloquent {} } +namespace App\Models{ +/** + * Class GeneralFile + * + * @property int $id + * @property int $travel_country_id + * @property string $identifier + * @property string $filename + * @property string $dir + * @property string $original_name + * @property string $ext + * @property string $mine + * @property int $size + * @property Carbon $created_at + * @property Carbon $updated_at + * @property TravelCountry $travel_country + * @package App\Models + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\GeneralFile newModelQuery() + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\GeneralFile newQuery() + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\GeneralFile query() + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\GeneralFile whereCreatedAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\GeneralFile whereDir($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\GeneralFile whereExt($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\GeneralFile whereFilename($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\GeneralFile whereId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\GeneralFile whereIdentifier($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\GeneralFile whereMine($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\GeneralFile whereOriginalName($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\GeneralFile whereSize($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\GeneralFile whereTravelCountryId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\GeneralFile whereUpdatedAt($value) + * @mixin \Eloquent + */ + class GeneralFile extends \Eloquent {} +} + namespace App\Models{ /** * App\Models\Country @@ -1530,6 +1718,45 @@ namespace App\Models{ class FewoReservation extends \Eloquent {} } +namespace App\Models{ +/** + * Class CustomerFewoFile + * + * @property int $id + * @property int $travel_user_id + * @property int $customer_fewo_mail_id + * @property string $identifier + * @property string $filename + * @property string $dir + * @property string $original_name + * @property string $ext + * @property string $mine + * @property int $size + * @property Carbon $created_at + * @property Carbon $updated_at + * @property CustomerFewoMail $customer_fewo_mail + * @property TravelUser $travel_user + * @package App\Models + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CustomerFewoFile newModelQuery() + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CustomerFewoFile newQuery() + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CustomerFewoFile query() + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CustomerFewoFile whereCreatedAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CustomerFewoFile whereCustomerFewoMailId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CustomerFewoFile whereDir($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CustomerFewoFile whereExt($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CustomerFewoFile whereFilename($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CustomerFewoFile whereId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CustomerFewoFile whereIdentifier($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CustomerFewoFile whereMine($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CustomerFewoFile whereOriginalName($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CustomerFewoFile whereSize($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CustomerFewoFile whereTravelUserId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CustomerFewoFile whereUpdatedAt($value) + * @mixin \Eloquent + */ + class CustomerFewoFile extends \Eloquent {} +} + namespace App\Models{ /** * App\Models\TravelCountry @@ -1586,6 +1813,15 @@ namespace App\Models{ * @property-read int|null $travel_nationality_requirements_count * @property array|null $contact_emails * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCountry whereContactEmails($value) + * @property array|null $mail_dirs + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCountry whereMailDirs($value) + * @property string $mail_dir_name + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCountry whereMailDirName($value) + * @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\GeneralFile[] $general_files + * @property-read int|null $general_files_count + * @property-read \App\Models\Sym\TravelCountry|null $crm_travel_country + * @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\TravelCountryService[] $travel_country_services + * @property-read int|null $travel_country_services_count */ class TravelCountry extends \Eloquent {} } @@ -1961,6 +2197,36 @@ namespace App\Models{ class IQContentSite extends \Eloquent {} } +namespace App\Models{ +/** + * Class EmailTemplate + * + * @property int $id + * @property int $email_template_dir_id + * @property string $subject + * @property string $message + * @property bool $active + * @property Carbon $created_at + * @property Carbon $updated_at + * @property EmailTemplateDir $email_template_dir + * @package App\Models + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\EmailTemplate newModelQuery() + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\EmailTemplate newQuery() + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\EmailTemplate query() + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\EmailTemplate whereActive($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\EmailTemplate whereCreatedAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\EmailTemplate whereEmailTemplateDirId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\EmailTemplate whereId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\EmailTemplate whereMessage($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\EmailTemplate whereSubject($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\EmailTemplate whereUpdatedAt($value) + * @mixin \Eloquent + * @property string $name + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\EmailTemplate whereName($value) + */ + class EmailTemplate extends \Eloquent {} +} + namespace App\Models{ /** * Class StatusHistory @@ -2018,6 +2284,32 @@ namespace App\Models{ class FewoPrice extends \Eloquent {} } +namespace App\Models{ +/** + * Class Insurance + * + * @property int $id + * @property string $name + * @property string $name_full + * @property string $contact_emails + * @property bool $active + * @property Carbon $created_at + * @property Carbon $updated_at + * @package App\Models + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Insurance newModelQuery() + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Insurance newQuery() + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Insurance query() + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Insurance whereActive($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Insurance whereContactEmails($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Insurance whereCreatedAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Insurance whereId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Insurance whereName($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Insurance whereUpdatedAt($value) + * @mixin \Eloquent + */ + class Insurance extends \Eloquent {} +} + namespace App\Models{ /** * App\Models\CMSInfoAvailable @@ -2105,6 +2397,8 @@ namespace App\Models{ * @mixin \Eloquent * @property int|null $active * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCompany whereActive($value) + * @property array|null $contact_emails + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCompany whereContactEmails($value) */ class TravelCompany extends \Eloquent {} } @@ -2157,6 +2451,12 @@ namespace App\Models{ * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CMSContent newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CMSContent newQuery() * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CMSContent query() + * @property string|null $identifier + * @property array|null $object + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CMSContent whereIdentifier($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CMSContent whereObject($value) + * @property int|null $pos + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CMSContent wherePos($value) */ class CMSContent extends \Eloquent {} } @@ -2479,6 +2779,10 @@ namespace App\Models{ * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ServiceProvider whereName($value) * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ServiceProvider whereType($value) * @mixin \Eloquent + * @property array|null $contact_emails + * @property bool|null $active + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ServiceProvider whereActive($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ServiceProvider whereContactEmails($value) */ class ServiceProvider extends \Eloquent {} } @@ -2665,6 +2969,14 @@ namespace App\Models{ * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUserBookingFewo whereUpdatedAt($value) * @property string|null $last_change_at * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUserBookingFewo whereLastChangeAt($value) + * @property-read \App\Models\CustomerFewoMail|null $customer_fewo_mail_last + * @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\CustomerFewoMail[] $customer_fewo_mails + * @property-read int|null $customer_fewo_mails_count + * @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\CustomerFewoMail[] $customer_fewo_mails_sent_at + * @property-read int|null $customer_fewo_mails_sent_at_count + * @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\TravelUserBookingFile[] $booking_files + * @property-read int|null $booking_files_count + * @property-read \App\Models\TravelUser $customer */ class TravelUserBookingFewo extends \Eloquent {} } @@ -3113,6 +3425,40 @@ namespace App\Models{ class CMSInfo extends \Eloquent {} } +namespace App\Models{ +/** + * Class TravelCountryService + * + * @property int $id + * @property int $travel_country_id + * @property int $crm_travel_country + * @property string $name + * @property string $description + * @property bool $active + * @property Carbon $created_at + * @property Carbon $updated_at + * @property TravelCountry $travel_country + * @property Collection|BookingCountryService[] $booking_country_services + * @package App\Models + * @property int|null $crm_travel_country_id + * @property int|null $pos + * @property-read int|null $booking_country_services_count + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCountryService newModelQuery() + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCountryService newQuery() + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCountryService query() + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCountryService whereActive($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCountryService whereCreatedAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCountryService whereCrmTravelCountryId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCountryService whereDescription($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCountryService whereId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCountryService whereName($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCountryService wherePos($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCountryService whereTravelCountryId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCountryService whereUpdatedAt($value) + */ + class TravelCountryService extends \Eloquent {} +} + namespace App\Models{ /** * App\Models\IQContentTree @@ -3191,6 +3537,30 @@ namespace App\Models{ class BookingStorno extends \Eloquent {} } +namespace App\Models{ +/** + * Class BookingCountryService + * + * @property int $id + * @property int $travel_country_service_id + * @property int $booking_id + * @property Carbon $created_at + * @property Carbon $updated_at + * @property Booking $booking + * @property TravelCountryService $travel_country_service + * @package App\Models + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookingCountryService newModelQuery() + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookingCountryService newQuery() + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookingCountryService query() + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookingCountryService whereBookingId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookingCountryService whereCreatedAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookingCountryService whereId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookingCountryService whereTravelCountryServiceId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookingCountryService whereUpdatedAt($value) + */ + class BookingCountryService extends \Eloquent {} +} + namespace App\Models{ /** * App\Models\SfGuardUser diff --git a/app/Http/Controllers/Admin/ReportController.php b/app/Http/Controllers/Admin/ReportController.php index 9a2b6cc..b7e702c 100755 --- a/app/Http/Controllers/Admin/ReportController.php +++ b/app/Http/Controllers/Admin/ReportController.php @@ -273,7 +273,6 @@ class ReportController extends Controller private function prozessProvidersSearch(){ - $query = ServiceProviderEntry::with('booking', 'service_provider', 'booking.customer')->select('service_provider_entry.*'); if(Request::get('filter_is_cleared') != ""){ $query->where('is_cleared', '=', Request::get('filter_is_cleared')); @@ -293,8 +292,6 @@ class ReportController extends Controller $q->where("start_date", '<=', $travel_date_to); }); } - - return $query; } diff --git a/app/Http/Controllers/BookingController.php b/app/Http/Controllers/BookingController.php index 2a672d4..2b6b87c 100755 --- a/app/Http/Controllers/BookingController.php +++ b/app/Http/Controllers/BookingController.php @@ -55,9 +55,15 @@ class BookingController extends Controller { // \Session()->flash('alert-save', '1'); - $data = Request::all(); - if($id == "new") { + + if($data['action'] === 'update_booking'){ + $booking = $this->bookingRepo->updateBooking($id, $data); + \Session()->flash('alert-save', '1'); + return redirect(route('booking_detail', [$booking->id])."#collapseBookingBooking"); + } + + if($id === "new") { $booking = new Booking(); }else{ $booking = Booking::findOrFail($id); @@ -244,6 +250,27 @@ class BookingController extends Controller } + public function delete($id, $del="booking"){ + + if($del === 'booking') { + //$model = Booking::findOrFail($id); + //$model->delete(); + \Session()->flash('alert-success', __('Buchung gelöscht sowie die Reservierung im Sterntrous Kalender')); + } + if($del === 'booking_file'){ + $booking_file = BookingFile::findOrFail($id); + $booking = $booking_file->booking; + $fileRepo = new BookingFileRepository($booking_file); + $fileRepo->_set('disk', 'booking'); + $fileRepo->delete(); + $booking_file->delete(); + \Session()->flash('alert-success', 'Datei gelöscht'); + return redirect(route('booking_detail', [$booking->id])); + } + return redirect(route('requests')); + } + + } diff --git a/app/Http/Controllers/CMS/CMSContentController.php b/app/Http/Controllers/CMS/CMSContentController.php index 5512ddd..49e02b7 100755 --- a/app/Http/Controllers/CMS/CMSContentController.php +++ b/app/Http/Controllers/CMS/CMSContentController.php @@ -12,8 +12,12 @@ use Validator; class CMSContentController extends Controller { + protected $identifier_content; + + public function __construct() { + $this->identifier_content = 'general'; } @@ -21,7 +25,8 @@ class CMSContentController extends Controller public function index() { $data = [ - 'contents' => CMSContent::all()->sortByDesc('id') + 'contents' => CMSContent::where('identifier', '=', $this->identifier_content)->get()->sortByDesc('id'), + 'identifier_content' => $this->identifier_content, ]; return view('cms.content.all.index', $data); } @@ -30,18 +35,17 @@ class CMSContentController extends Controller public function store() { $data = Request::all(); - if(Request::ajax()) { //upload file if($data['file']){ $cmsFileRepo = new CMSFileRepository(new CMSContent()); + $cmsFileRepo->_set('data', $data); $cmsFileRepo->_set('disk', 'public'); $cmsFileRepo->_set('dir', '/cms_files/'.date('Y/m').'/'); $cmsFileRepo->_set('identifier', 'cms_file'); return $cmsFileRepo->uploadFile(Request::all()); } return response()->json(['response' => $data, 'html'=>""]); - } $rules = array( 'name' => 'required', @@ -68,6 +72,10 @@ class CMSContentController extends Controller } \Session()->flash('alert-save', '1'); + if(isset($data['back'])){ + return redirect($data['back']); + + } return redirect(route('cms_content_all')); } @@ -78,9 +86,11 @@ class CMSContentController extends Controller $data = Request::all(); $returnHTML = ""; if(isset($data['model']) && isset($data['id']) ){ - if($data['model'] == 'content'){ - if($data['id'] == "new"){ + if($data['model'] === 'content'){ + if($data['id'] === "new"){ $value = new CMSContent(); + $value->identifier = $data['identifier']; + $value->field = isset($data['field']) ? $data['field'] : null; }else { $value = CMSContent::find($data['id']); } @@ -93,19 +103,16 @@ class CMSContentController extends Controller //public - public function delete($id){ $content = CMSContent::findOrFail($id); if($content->isFile()){ $content->deleteFile(); } $content->delete(); + $m = \App\Models\Sym\CmsContent::find($id); + $m->delete(); \Session()->flash('alert-success', __('Content gelöscht')); - return redirect(route('cms_content_all')); + return back(); //redirect(route('cms_content_all')); } - - - - } diff --git a/app/Http/Controllers/CustomerFewoMailController.php b/app/Http/Controllers/CustomerFewoMailController.php new file mode 100755 index 0000000..59ab285 --- /dev/null +++ b/app/Http/Controllers/CustomerFewoMailController.php @@ -0,0 +1,383 @@ +middleware('admin'); + $this->customerMailRepo = $customerMailRepo; + } + + public function index() + { + $data = [ + + ]; + return view('customer.mail.index', $data); + } + + public function detail($id) + { + if($id === "new") { + $customer_mail = new CustomerFewoMail(); + $id = 'new'; + + }else{ + $customer_mail = CustomerFewoMail::findOrFail($id); + $id = $customer_mail->id; + } + + + $data = [ + 'customer_mail' => $customer_mail, + 'id' => $id, + 'back' => URL::previous(), + ]; + return view('customer.mail.detail', $data); + + } + + public function store($id, $action=false) + { + $data = Request::all(); + $customer_mail = CustomerFewoMail::findOrFail($id); + + if($action === 'move-mail'){ + $data['subdir'] = isset($data['subdir']) && $data['subdir'] ? $data['subdir'] : null; + $customer_mail->dir = $data['dir']; + $customer_mail->subdir = $data['subdir']; + $customer_mail->save(); + + } + return back(); + } + + public function delete($id){ + $customer_mail = CustomerFewoMail::find($id); + $customer_mail->dir = 12; + $customer_mail->subdir = 0; + $customer_mail->save(); + + \Session()->flash('alert-success', __('Mail gelöscht')); + return back(); + } + + + public function loadModal(){ + $data = Request::all(); + $ret = ""; + if(Request::ajax()) { + if ($data['action'] === "new-customer-mail" || $data['action'] === "reply-customer-mail" || $data['action'] === "show-customer-mail" || $data['action'] === "edit-customer-mail"){ + $data['customers'] = []; + if ($data['action'] === "new-customer-mail" && isset($data['travel_user_booking_fewo_id']) && $TravelUserBookingFewo = TravelUserBookingFewo::find($data['travel_user_booking_fewo_id'])) { + $tmp = []; + $tmp['email'] = $TravelUserBookingFewo->travel_user ? $TravelUserBookingFewo->travel_user->email : ""; + $tmp['name'] = $TravelUserBookingFewo->travel_user ? $TravelUserBookingFewo->travel_user->first_name . " " . $TravelUserBookingFewo->travel_user->last_name . " | " : "- | "; + $tmp['name'] .= $TravelUserBookingFewo->fewo_lodging_id ? $TravelUserBookingFewo->fewo_lodging->name . " | " : "- | "; + $data['customers'][$TravelUserBookingFewo->id] = $tmp; + } + $ret = CustomerFewoMailRepository::loadModal($data); + } + + if($data['action'] === "modal-upload-booking-file") { + $ret = view("travel.user.booking.upload_modal", compact('data'))->render(); + } + + if($data['action'] === "upload-booking-file"){ + if($data['travel_user_booking_fewo_id']){ + $bookingFileRepo = new BookingFewoFileRepository(new TravelUserBookingFile()); + $bookingFileRepo->_set('disk', 'booking_fewo'); + $bookingFileRepo->_set('travel_user_booking_fewo_id', $data['travel_user_booking_fewo_id']); + $bookingFileRepo->_set('dir', '/files/'.date('Y/m').'/'); + $bookingFileRepo->_set('identifier', 'booking'); + return $bookingFileRepo->uploadFile(Request::all()); + } + } + } + return response()->json(['response' => $data, 'html'=>$ret]); + } + + + public function sendMail(CustomerFewoMailRepository $customerFewoMailRepository){ + $data = Request::all(); + $customerFewoMailRepository->sendAndStore($data); + if($data['action'] == 'draft'){ + \Session()->flash('alert-success', "Entwurf gespeichert!"); + }else{ + \Session()->flash('alert-success', "Mail gesendet!"); + } + return back(); + } + + public function replyMail(CustomerFewoMailRepository $customerFewoMailRepository){ + $data = Request::all(); + $customerFewoMailRepository->replyStore($data); + \Session()->flash('alert-success', "Mail gespeichert!"); + return back(); + } + + /*public function getCustomerFewoMails() + { + $query = CustomerFewoMail::with('booking')->with('customer')->select('customer_mails.*'); + + return \DataTables::eloquent($query) + ->addColumn('action_edit', function (CustomerFewoMail $customer_mail) { + return ''; + }) + ->addColumn('id', function (CustomerFewoMail $customer_mail) { + return ''.$customer_mail->id.''; + }) + ->addColumn('booking', function (CustomerFewoMail $customer_mail) { + $out = $customer_mail->booking->travel_country_id ? $customer_mail->booking->travel_country->name." | " : "- | "; + $out .= $customer_mail->booking->travelagenda_id ? $customer_mail->booking->travel_agenda->name."" : "-"; + return $out; + }) + ->addColumn('travel_user_booking_fewo_id', function (CustomerFewoMail $customer_mail) { + return ''.$customer_mail->travel_user_booking_fewo_id.''; + }) + ->addColumn('customer_id', function (CustomerFewoMail $customer_mail) { + return ''.$customer_mail->customer_id.''; + }) + ->addColumn('send', function (CustomerFewoMail $customer_mail) { + return $customer_mail->send ? '' : ''; + }) + ->orderColumn('id', 'id $1') + ->orderColumn('travel_user_booking_fewo_id', 'travel_user_booking_fewo_id $1') + ->orderColumn('customer_id', 'customer_id $1') + ->orderColumn('send', 'send $1') + + ->filterColumn('id', function($query, $keyword) { + if($keyword != ""){ + $query->where('id', 'LIKE', '%'.$keyword.'%'); + } + }) + ->filterColumn('customer_id', function($query, $keyword) { + if($keyword != ""){ + $query->where('customer_id', 'LIKE', '%'.$keyword.'%'); + } + }) + ->filterColumn('travel_user_booking_fewo_id', function($query, $keyword) { + if($keyword != ""){ + $query->where('travel_user_booking_fewo_id', 'LIKE', '%'.$keyword.'%'); + } + }) + ->rawColumns(['action_edit', 'send', 'customer_id', 'travel_user_booking_fewo_id', 'id']) + ->make(true); + }*/ + + public function getEmailTemplates() + { + $query = EmailTemplate::with('email_template_dir')->select('email_templates.*')->where('active', '=', true); + + if(Request::get('filter_email_templates_directory') != ""){ + $query->where('email_template_dir_id', '=', Request::get('filter_email_templates_directory')); + } + + return \DataTables::eloquent($query) + ->addColumn('action', function (EmailTemplate $emailTemplate) { + return ''; + }) + ->addColumn('email_template_dir.name', function (EmailTemplate $emailTemplate) { + return $emailTemplate->email_template_dir ? ''.$emailTemplate->email_template_dir->name.'' : ' '; + }) + ->orderColumn('id', 'id $1') + ->orderColumn('subject', 'subject $1') + ->orderColumn('name', 'name $1') + ->orderColumn('email_template_dir.name', 'email_template_dir.name $1') + ->orderColumn('message', 'message $1') + ->filterColumn('id', function($query, $keyword) { + if($keyword != ""){ + $query->where('id', 'LIKE', '%'.$keyword.'%'); + } + }) + ->filterColumn('subject', function($query, $keyword) { + if($keyword != ""){ + $query->where('name', 'LIKE', '%'.$keyword.'%'); + $query->OrWhere('subject', 'LIKE', '%'.$keyword.'%'); + $query->OrWhere('message', 'LIKE', '%'.$keyword.'%'); + } + }) + ->rawColumns(['action', 'email_template_dir.name']) + ->make(true); + } + + + public function uploadAttachment($id){ + + $fileRepo = new CustomerFewoFileRepository(new CustomerFewoFile()); + if($id === 'tmp'){ + $fileRepo->_set('disk', 'travel_user'); + $fileRepo->_set('dir', '/attachment/'.date('Y/m').'/'); + $fileRepo->_set('travel_user_id', NULL); + $fileRepo->_set('customer_fewo_mail_id', NULL); + $fileRepo->_set('identifier', 'tmp'); + return $fileRepo->uploadFile(Request::all()); + } + + return Response::json([ + 'error' => true, + 'code' => 200 + ], 200); + } + + public function ajax(){ + $data = Request::all(); + $ret = ""; + $status = false; + if(Request::ajax()){ + if($data['action'] === 'toggle_important'){ + $customer_mail = CustomerFewoMail::find($data['id']); + $customer_mail->important = ($customer_mail->important ? false : true); + $customer_mail->save(); + $status = 'success'; + } + if($data['action'] === 'load_email_template'){ + $email_template = EmailTemplate::find($data['id']); + $ret = $email_template->message; + $data['subject'] = $email_template->subject; + $status = 'success'; + } + if($data['action'] === 'delete_mail_attachment'){ + $customer_file = CustomerFewoFile::find($data['id']); + $fileRepo = new CustomerFewoFileRepository($customer_file); + $fileRepo->_set('disk', 'travel_user'); + $ret = $fileRepo->delete(); + $status = 'success'; + } + + if($data['action'] === 'add_attachment'){ + $arrContextOptions=array( + "ssl"=>array( + "verify_peer"=>false, + "verify_peer_name"=>false, + ), + ); + $contents = file_get_contents($data['target'], false, stream_context_create($arrContextOptions)); + $mine = Util::getMimeFromHeader($http_response_header); + $extension = Util::getExtensionFromMime($mine); + $fileRepo = new CustomerFewoFileRepository(new CustomerFewoFile()); + $fileRepo->_set('disk', 'travel_user'); + $fileRepo->_set('dir', '/attachment/'.date('Y/m').'/'); + $fileRepo->_set('travel_user_id', NULL); + $fileRepo->_set('customer_fewo_mail_id', NULL); + $fileRepo->_set('identifier', 'tmp'); + $fileRepo->_set('originalName', $data['name']); + $fileRepo->_set('mine', $mine); + $fileRepo->_set('extension', $extension); + return $fileRepo->storeFile($contents); + } + } + return response()->json(['response' => $data, 'html'=>$ret, 'status'=>$status]); + } + + private function getSearchRequests() + { + if (!Request::get('travel_user_booking_fewo_id')) { + return false; + } + $query = CustomerFewoMail::where('travel_user_booking_fewo_id', '=', Request::get('travel_user_booking_fewo_id')); + if (Request::get('customer_mail_dir') == 11) { //draft + $query->where('draft', '=', true)->where('dir', '!=', 12); + }else{ + $query->where('dir', '=', Request::get('customer_mail_dir')); //with('lead' + } + if (Request::get('customer_mail_subdir')) { + $query->where('subdir', '=', Request::get('customer_mail_subdir')); + } + return $query; + } + + public function getRequests(){ + + $query = $this->getSearchRequests(); + return \DataTables::eloquent($query) + ->addColumn('checkbox', function (CustomerFewoMail $customer_mail) { + return '
+ +
'; + }) + ->addColumn('important', function (CustomerFewoMail $customer_mail) { + $icon = ($customer_mail->important ? 'ion-md-star' : 'ion-md-star-outline'); + return ''; + }) + ->addColumn('subject', function (CustomerFewoMail $customer_mail) { + + $icon = $customer_mail->reply_id ? 'ion-ios-redo' : 'ion-ios-mail'; + $badge = $customer_mail->is_answer ? 'badge-next' : 'badge-secondary'; + $badge = $customer_mail->draft ? 'badge-default' : $badge; + $to_icon = $customer_mail->draft ? '' : ''; + $action = $customer_mail->draft ? 'edit-customer-mail' : 'show-customer-mail'; + $id = $customer_mail->draft ? $customer_mail->id : 'new'; + $url = $customer_mail->draft ? route('customer_fewo_mail_send_mail') : ''; + + return ' + '.$to_icon.''.$customer_mail->subject.' + '.($customer_mail->customer_fewo_files->count() ? '  '.$customer_mail->customer_fewo_files->count().'' : ''); + + }) + ->addColumn('date', function (CustomerFewoMail $customer_mail) { + if($customer_mail->send){ + return ' '.$customer_mail->sent_at.''; + } + return ' '.$customer_mail->sent_at.''; + }) + ->addColumn('action', function (CustomerFewoMail $customer_mail) { + $ret = ''; + if(!$customer_mail->draft){ + $ret = ' + + +   + + + +  '; + } + $ret .= ''; + return '
'.$ret.'
'; + }) + + ->orderColumn('date', 'sent_at $1') + ->orderColumn('subject', 'subject $1') + ->orderColumn('important', 'important $1') + ->rawColumns(['checkbox', 'important', 'subject', 'date', 'action']) + ->make(true); + } +} + + diff --git a/app/Http/Controllers/CustomerMailController.php b/app/Http/Controllers/CustomerMailController.php index 5747072..a12adbc 100755 --- a/app/Http/Controllers/CustomerMailController.php +++ b/app/Http/Controllers/CustomerMailController.php @@ -3,6 +3,7 @@ namespace App\Http\Controllers; use App\Models\Customer; +use App\Models\CustomerFewoMail; use App\Models\CustomerFile; use App\Models\CustomerMail; use App\Models\EmailTemplate; @@ -39,13 +40,10 @@ class CustomerMailController extends Controller if($id === "new") { $customer_mail = new CustomerMail(); $id = 'new'; - }else{ $customer_mail = CustomerMail::findOrFail($id); $id = $customer_mail->id; } - - $data = [ 'customer_mail' => $customer_mail, 'id' => $id, @@ -58,23 +56,29 @@ class CustomerMailController extends Controller public function store($id, $action=false) { $data = Request::all(); - $customer_mail = CustomerMail::findOrFail($id); if($action === 'move-mail'){ - $data['travel_country_id'] = isset($data['travel_country_id']) && $data['travel_country_id'] ? $data['travel_country_id'] : null; + $customer_mail = CustomerMail::findOrFail($id); + $data['subdir'] = isset($data['subdir']) && $data['subdir'] ? $data['subdir'] : null; $customer_mail->dir = $data['dir']; - $customer_mail->travel_country_id = $data['travel_country_id']; + $customer_mail->subdir = $data['subdir']; $customer_mail->save(); } + if($action === 'move-mail-fewo'){ + $customer_mail = CustomerFewoMail::findOrFail($id); + $data['subdir'] = isset($data['subdir']) && $data['subdir'] ? $data['subdir'] : null; + $customer_mail->dir = $data['dir']; + $customer_mail->subdir = $data['subdir']; + $customer_mail->save(); + } return back(); } public function delete($id){ $customer_mail = CustomerMail::find($id); $customer_mail->dir = 12; - $customer_mail->travel_country_id = null; - $customer_mail->draft = false; + $customer_mail->subdir = 0; $customer_mail->save(); \Session()->flash('alert-success', __('Mail gelöscht')); @@ -186,7 +190,11 @@ class CustomerMailController extends Controller public function getEmailTemplates() { - $query = EmailTemplate::where('active', '=', true); + $query = EmailTemplate::with('email_template_dir')->select('email_templates.*')->where('active', '=', true); + + if(Request::get('filter_email_templates_directory') != ""){ + $query->where('email_template_dir_id', '=', Request::get('filter_email_templates_directory')); + } return \DataTables::eloquent($query) ->addColumn('action', function (EmailTemplate $emailTemplate) { @@ -194,8 +202,12 @@ class CustomerMailController extends Controller data-url="'.route('customer_mail_ajax').'" data-id="'.$emailTemplate->id.'" data-action="load_email_template" title="Vorlage laden" data-placement="left" rel="tooltip">'; }) + ->addColumn('email_template_dir.name', function (EmailTemplate $emailTemplate) { + return $emailTemplate->email_template_dir ? ''.$emailTemplate->email_template_dir->name.'' : ' '; + }) ->orderColumn('id', 'id $1') ->orderColumn('subject', 'subject $1') + ->orderColumn('email_template_dir.name', 'email_template_dir.name $1') ->orderColumn('message', 'message $1') ->filterColumn('id', function($query, $keyword) { if($keyword != ""){ @@ -204,17 +216,16 @@ class CustomerMailController extends Controller }) ->filterColumn('subject', function($query, $keyword) { if($keyword != ""){ - $query->where('subject', 'LIKE', '%'.$keyword.'%'); + $query->where('name', 'LIKE', '%'.$keyword.'%'); + $query->OrWhere('subject', 'LIKE', '%'.$keyword.'%'); $query->OrWhere('message', 'LIKE', '%'.$keyword.'%'); - } }) - ->rawColumns(['action']) + ->rawColumns(['action', 'email_template_dir.name']) ->make(true); } - public function uploadAttachment($id){ $fileRepo = new CustomerFileRepository(new CustomerFile()); @@ -290,13 +301,13 @@ class CustomerMailController extends Controller } $query = CustomerMail::where('booking_id', '=', Request::get('booking_id')); if (Request::get('customer_mail_dir') == 11) { //draft - $query->where('draft', '=', true); + $query->where('draft', '=', true)->where('dir', '!=', 12); }else{ $query->where('dir', '=', Request::get('customer_mail_dir')); //with('lead' } - if (Request::get('customer_mail_country')) { - $query->where('travel_country_id', '=', Request::get('customer_mail_country')); + if (Request::get('customer_mail_subdir')) { + $query->where('subdir', '=', Request::get('customer_mail_subdir')); } return $query; } @@ -348,14 +359,14 @@ class CustomerMailController extends Controller $ret = ' + data-booking_id="'.$customer_mail->booking_id.'" data-route="'.route('booking_modal_load').'" data-customer_mail_dir="'.$customer_mail->dir.'" data-customer_mail_subdir="'.$customer_mail->subdir.'">   + data-booking_id="'.$customer_mail->booking_id.'" data-route="'.route('booking_modal_load').'" data-customer_mail_dir="'.$customer_mail->dir.'" data-customer_mail_subdir="'.$customer_mail->subdir.'">  '; @@ -375,7 +386,7 @@ class CustomerMailController extends Controller /*->filterColumn('subject', function($query, $keyword) { if($keyword != ""){ $query->whereRaw("subject LIKE ?", '%'.$keyword.'%'); - + } })*/ ->orderColumn('date', 'sent_at $1') diff --git a/app/Http/Controllers/DraftController.php b/app/Http/Controllers/DraftController.php index 18ae12e..6956063 100755 --- a/app/Http/Controllers/DraftController.php +++ b/app/Http/Controllers/DraftController.php @@ -5,6 +5,7 @@ namespace App\Http\Controllers; use App\Models\Draft; use App\Models\DraftItem; use App\Models\DraftType; +use Request; class DraftController extends Controller { @@ -28,7 +29,7 @@ class DraftController extends Controller public function detail($id) { - if($id == "new") { + if($id === "new") { $draft = new Draft(); $draft->active = true; $id = 'new'; @@ -48,7 +49,7 @@ class DraftController extends Controller public function store($id) { $data = Request::all(); - if($id == "new") { + if($id === "new") { $draft = new Draft(); }else{ $draft = Draft::findOrFail($id); @@ -145,7 +146,7 @@ class DraftController extends Controller public function typeUpdate(){ $data = Request::all(); - if($data['id'] == "new"){ + if($data['id'] === "new"){ $draft_type = DraftType::create([ 'name' => $data['name'], 'active' => isset($data['active']) ? true : false, @@ -158,8 +159,6 @@ class DraftController extends Controller $draft_type->active = isset($data['active']) ? true : false; $draft_type->color = $data['color']; $draft_type->pos = $data['pos']; - - $draft_type->save(); } diff --git a/app/Http/Controllers/FileController.php b/app/Http/Controllers/FileController.php index ec72606..a4ac90c 100755 --- a/app/Http/Controllers/FileController.php +++ b/app/Http/Controllers/FileController.php @@ -27,6 +27,11 @@ class FileController extends Controller $filename = $file->original_name; $path = $file->getPath(); } + if ($disk === 'travel_user'){ + $file = \App\Models\CustomerFewoFile::findOrFail($id); + $filename = $file->original_name; + $path = $file->getPath(); + } if ($disk === 'booking'){ $file = \App\Models\BookingFile::findOrFail($id); @@ -34,6 +39,18 @@ class FileController extends Controller $path = $file->getPath(); } + if ($disk === 'general'){ + $file = \App\Models\GeneralFile::findOrFail($id); + $filename = $file->original_name; + $path = $file->getPath(); + } + + if ($disk === 'booking_fewo'){ + $file = \App\Models\TravelUserBookingFile::findOrFail($id); + $filename = $file->original_name; + $path = $file->getPath(); + } + if ($disk === 'cms_file'){ $file = \App\Models\CMSContent::findOrFail($id); $filename = $file->name; diff --git a/app/Http/Controllers/ModalController.php b/app/Http/Controllers/ModalController.php new file mode 100644 index 0000000..359d8ee --- /dev/null +++ b/app/Http/Controllers/ModalController.php @@ -0,0 +1,70 @@ +middleware('auth'); + } + + public function load(){ + $data = Request::all(); + $ret = ""; + $status = false; + if(Request::ajax()){ + + if($data['action'] === "upload-travel_country-file"){ + if($value = TravelCountry::find($data['id'])){ + $generalFileRepo = new GeneralFileRepository(new GeneralFile()); + $generalFileRepo->_set('disk', 'general'); + $generalFileRepo->_set('travel_country_id', $data['id']); + $generalFileRepo->_set('dir', '/'.date('Y/m').'/'); + $generalFileRepo->_set('identifier', 'travel_country'); + $generalFileRepo->_set('redirect', $data['back']); + + return $generalFileRepo->uploadFile(Request::all()); + } + } + if($data['action'] === 'modal-upload-travel_country-file'){ + $data['action'] = 'upload-travel_country-file'; + $ret = view("admin.modal.upload", compact('data'))->render(); + } + + if($data['action'] === 'modal-travel_country-services'){ + if($data['id'] === 'new'){ + $value = new TravelCountryService(); + $value->active = true; + }else{ + $value = TravelCountryService::find($data['id']); + } + $ret = view("admin.modal.country-service", compact('data', 'value'))->render(); + } + + + } + return response()->json(['response' => $data, 'html'=>$ret, 'status'=>$status]); + } + + +} + + + + +/* */ \ No newline at end of file diff --git a/app/Http/Controllers/RequestController.php b/app/Http/Controllers/RequestController.php index 1cf3944..c7af0cf 100755 --- a/app/Http/Controllers/RequestController.php +++ b/app/Http/Controllers/RequestController.php @@ -9,6 +9,7 @@ use App\Models\Status; use App\Models\Sym\TravelCountry; use App\Models\TravelAgenda; use App\Models\TravelCompany; +use App\Models\TravelCountryService; use App\Repositories\CustomerMailRepository; use Carbon\Carbon; use Request; @@ -79,7 +80,7 @@ class RequestController extends Controller */ private function getSearchRequests(){ - $query = Booking::with('lead')->with('customer')->with('customer_mails')->select('booking.*')->where('lead_id', '!=', NULL); + $query = Booking::with('lead')->with('customer')->with('customer_mails')->with('customer_mails')->select('booking.*')->where('lead_id', '!=', NULL); if(Request::get('full_firstname_search') != ""){ $query->whereHas('customer', function ($q) { @@ -225,9 +226,33 @@ class RequestController extends Controller public function getAjaxRequests(){ - $query = $this->getSearchRequests(); - $ret = $query->get()->pluck('travelagenda_id', 'id')->unique()->toArray(); - return TravelAgenda::whereIn('id', $ret)->get()->pluck('name', 'id'); + $data = Request::all(); + + if(Request::ajax()) { + if(isset($data['action']) && $data['action'] === "get_popover_booking_services") { + $booking = Booking::findOrFail($data['booking_id']); + $ret = ""; + + foreach($booking->travel_country->getContactLandsModels() as $TravelCountry){ + if($TravelCountry->stern_travel_country){ + foreach($TravelCountry->stern_travel_country->travel_country_services as $travel_country_service){ + $ret .= \App\Models\BookingCountryService::getStatus($travel_country_service->id, $booking->id) ? + ' '.$travel_country_service->name.'' : + ' '.$travel_country_service->name.''; + $ret .= '
'; + + } + } + } + if($ret === ""){ + return 'keine Leistungen definiert'; + } + return $ret; + } + $query = $this->getSearchRequests(); + $ret = $query->get()->pluck('travelagenda_id', 'id')->unique()->toArray(); + return TravelAgenda::whereIn('id', $ret)->get()->pluck('name', 'id'); + } } public function loadModal(){ @@ -290,8 +315,13 @@ class RequestController extends Controller return $booking->getEndDateFormat(); }) ->addColumn('travel_documents', function (Booking $booking) { - return $booking->travel_documents ? ' ' : ''; + return $booking->travel_documents ? '' : ''; }) + ->addColumn('booking_country_services', function (Booking $booking) { + return $booking->hasBookingCountryServicesUnchecked() ? '' : + ''; + }) + ->addColumn('sf_guard_user_id', function (Booking $booking) { return ''.($booking->sf_guard_user_id? $booking->sf_guard_user->first_name." ".$booking->sf_guard_user->last_name : "-").''; }) @@ -312,7 +342,6 @@ class RequestController extends Controller if($booking->lawyer_date){ return ''.$icon.$booking->lawyer_date->format('d.m.Y').''; } - } return ''.$icon.$booking->lead->status->name.''; } @@ -348,7 +377,7 @@ class RequestController extends Controller return ''.$booking->getRefundTypeList().''; }) ->addColumn('hold', function (Booking $booking) { - return $booking->hold ? ' ' : ''; + return $booking->hold ? ' ' : ''; }) ->addColumn('xx_tkt', function (Booking $booking) { return ''.$booking->getXxTktTypeList().''; @@ -391,8 +420,8 @@ class RequestController extends Controller ->orderColumn('airline_id', 'airline_id $1') ->orderColumn('hold', 'hold $1') ->orderColumn('xx_tkt', 'xx_tkt_date $1') - ->orderColumn('travel_documents', 'travel_documents $1') - ->rawColumns(['action_lead_edit', 'lead_id', 'participant_firstname', 'participant_name', 'action_booking_edit', 'travel_country_id', 'travelagenda_id', 'travel_company_id', 'sf_guard_user_id', 'lead.status_id', 'last_customer_email', 'id', 'travel_documents', 'paying_out', 'paying_out_status', 'airline_id', 'refund', 'hold', 'xx_tkt']) + //->orderColumn('travel_documents', 'travel_documents $1') + ->rawColumns(['action_lead_edit', 'lead_id', 'participant_firstname', 'participant_name', 'action_booking_edit', 'travel_country_id', 'travelagenda_id', 'travel_company_id', 'sf_guard_user_id', 'lead.status_id', 'last_customer_email', 'id', 'travel_documents', 'booking_country_services', 'paying_out', 'paying_out_status', 'airline_id', 'refund', 'hold', 'xx_tkt']) ->make(true); } } diff --git a/app/Http/Controllers/Settings/EmailTemplateController.php b/app/Http/Controllers/Settings/EmailTemplateController.php deleted file mode 100755 index 15392b9..0000000 --- a/app/Http/Controllers/Settings/EmailTemplateController.php +++ /dev/null @@ -1,75 +0,0 @@ -middleware('admin'); - } - - - public function index($step = false) - { - $data = [ - 'email_template' => EmailTemplate::all(), - ]; - return view('settings.email_template.index', $data); - } - - public function load(){ - $data = Request::all(); - $ret = ""; - if(Request::ajax()) { - - if($data['action'] === "modal-email-template") { - if($data['id'] === 'new'){ - $value = new EmailTemplate(); - $value->id = 0; - $value->active = 1; - - }else{ - $value = EmailTemplate::find($data['id']); - - } - $ret = view("settings.email_template.modal", compact('value'))->render(); - } - } - return response()->json(['response' => $data, 'html'=>$ret]); - } - - public function update(){ - - $data = Request::all(); - $data['active'] = isset($data['active']) ? true : false; - - if($data['id'] === "new" || $data['id'] == 0){ - $model = EmailTemplate::create($data); - }else{ - $model = EmailTemplate::find($data['id']); - $model->fill($data); - $model->save(); - } - - \Session()->flash('alert-save', '1'); - return redirect(route('admin_settings_email_template')); - } - - public function delete($id){ - - $model = EmailTemplate::findOrFail($id); - $model->delete(); - \Session()->flash('alert-success', 'Eintrag gelöscht'); - return redirect()->back(); - - } - -} - - diff --git a/app/Http/Controllers/Settings/EmailsController.php b/app/Http/Controllers/Settings/EmailsController.php new file mode 100755 index 0000000..eaa3a2f --- /dev/null +++ b/app/Http/Controllers/Settings/EmailsController.php @@ -0,0 +1,143 @@ +identifier_booking_file = 'booking-email-file'; + $this->identifier_fewo_file = 'fewo-email-file'; + $this->middleware('admin'); + } + + + public function index($step = false) + { + + $data = [ + 'email_template' => EmailTemplate::all(), + 'email_template_dirs' => EmailTemplateDir::all(), + 'booking_email_files' => CMSContent::where('identifier', '=', $this->identifier_booking_file)->get()->sortByDesc('pos'), + 'customer_mail_dirs' => Booking::getCustomerMailDirs(), + 'identifier_booking_file' => $this->identifier_booking_file, + 'identifier_fewo_file' => $this->identifier_fewo_file, + 'fewo_email_files' => CMSContent::where('identifier', '=', $this->identifier_fewo_file)->get()->sortByDesc('pos'), + 'customer_fewo_mail_dirs' => BookingFewo::getCustomerMailDirs(), + 'step' => $step + + ]; + return view('settings.emails.index', $data); + } + + public function load(){ + $data = Request::all(); + $ret = ""; + if(Request::ajax()) { + if($data['action'] === "modal-email-template") { + if($data['id'] === 'new'){ + $value = new EmailTemplate(); + $value->id = 0; + $value->active = 1; + }else{ + $value = EmailTemplate::find($data['id']); + + } + $directories = EmailTemplateDir::where('active', '=', true)->get(); + $ret = view("settings.emails.modal", compact('value', 'directories'))->render(); + } + } + return response()->json(['response' => $data, 'html'=>$ret]); + } + + public function update(){ + + $data = Request::all(); + $data['active'] = isset($data['active']) ? true : false; + $data['step'] = isset($data['step']) ? $data['step'] : false; + + if($data['action'] === 'email_template'){ + if($data['id'] === "new" || $data['id'] == 0){ + $model = EmailTemplate::create($data); + }else{ + $model = EmailTemplate::find($data['id']); + $model->fill($data); + $model->save(); + } + } + if($data['action'] === 'email_template_dir') { + if($data['id'] === "new"){ + EmailTemplateDir::create($data); + }else{ + $model = EmailTemplateDir::find($data['id']); + $model->fill($data); + $model->save(); + } + } + + if($data['action'] === 'customer_mail_dirs') { + $data['object'] = [ + 'icon' => $data['icon'], + 'model' => $data['model'], + 'emails' => isset($data['emails']) ? Util::_explodeLines($data['emails']) : null, + ]; + + $pos = $data['pos']; + if($pos > 9){ + \Session()->flash('alert-error', 'max 9 Ordner für E-Mail Ablage'); + return redirect(route('admin_settings_emails', [$data['step']])); + } + if($data['id'] === "new"){ + //check ist pos + if(CMSContent::where('identifier', '=', $data['identifier'])->where('pos', '=', $pos)->count()){ + \Session()->flash('alert-error', 'Die ID '.$pos.' existiert schon'); + return redirect(route('admin_settings_emails', [$data['step']])); + } + CMSContent::create($data); + //store in cms old Datebase + \App\Models\Sym\CmsContent::create($data); + }else{ + $model = CMSContent::find($data['id']); + if($model->pos != $pos && CMSContent::where('identifier', '=', $data['identifier'])->where('pos', '=', $pos)->count()){ + \Session()->flash('alert-error', 'Die ID '.$pos.' existiert schon'); + return redirect(route('admin_settings_emails', [$data['step']])); + } + $model->fill($data); + $model->save(); + + $m = \App\Models\Sym\CmsContent::find($data['id']); + $m->fill($data); + $m->save(); + } + } + + \Session()->flash('alert-save', '1'); + return redirect(route('admin_settings_emails', [$data['step']])); + } + + public function delete($id){ + + $model = EmailTemplate::findOrFail($id); + $model->delete(); + \Session()->flash('alert-success', 'Eintrag gelöscht'); + return redirect()->back(); + + } + +} + + diff --git a/app/Http/Controllers/Settings/TravelCountryController.php b/app/Http/Controllers/Settings/TravelCountryController.php index fee0bd8..3355978 100755 --- a/app/Http/Controllers/Settings/TravelCountryController.php +++ b/app/Http/Controllers/Settings/TravelCountryController.php @@ -4,9 +4,14 @@ namespace App\Http\Controllers\Settings; use App\Http\Controllers\Controller; +use App\Models\GeneralFile; use App\Models\TravelCountry; +use App\Models\TravelCountryService; use App\Models\TravelNationality; +use App\Repositories\CustomerFileRepository; +use App\Repositories\GeneralFileRepository; use App\Services\Util; +use IqContent\LaravelFilemanager\Lfm; use Request; class TravelCountryController extends Controller @@ -48,27 +53,45 @@ class TravelCountryController extends Controller 'id' => $id, 'step' => $step, 'travel_nationalities' => TravelNationality::where('active', true)->get(), + 'lfm_helper' => app(Lfm::class), + ]; return view('settings.travel_country.detail', $data); } - - public function update($id) { - $data = Request::all(); + + if(isset($data['update-action'])){ + if($data['update-action'] === 'save-travel-county-service'){ + $data['active'] = true;//isset($data['active']) ? true : false; + $travel_country = TravelCountry::findOrFail($id); + $data['travel_country_id'] = $travel_country->id; + $data['crm_travel_country_id'] = $travel_country->crm_id; + if($data['travel_county_service_id'] === 'new'){ + $model = TravelCountryService::create($data); + }else{ + $model = TravelCountryService::find($data['travel_county_service_id']); + $model->fill($data); + $model->save(); + } + \Session()->flash('alert-save', '1'); + return redirect($data['back']); + } + } + $data['contact_emails'] = isset($data['contact_emails']) ? Util::_explodeLines($data['contact_emails']) : null; if(!isset($data['contact_lands'])){ $data['contact_lands'] = null; } + $data['action'] = isset($data['action']) ? $data['action'] : false; /* * $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($id === "new"){ - $data['crm_id'] = 0; $model = TravelCountry::create($data); }else{ $model = TravelCountry::find($id); @@ -82,41 +105,64 @@ class TravelCountryController extends Controller $model->setNationalityRequirement($travel_nationality_id, $text); } } - //TODO for this time - if ($data['action'] === 'contact') { - //we need an update in the old CRM v1 system DB - $tc = \App\Models\Sym\TravelCountry::findOrFail($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(); - } - + $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])); + return redirect(route('admin_settings_travel_country_detail', [$model->id, $data['action']])); } - public function delete($id){ - $model = TravelCountry::findOrFail($id); - if( $model->travel_nationality_requirements){ - foreach($model->travel_nationality_requirements as $travel_nationality_requirement){ - $travel_nationality_requirement->delete(); + public function delete($id, $del="travel_country"){ + + if($del === 'travel_country'){ + $model = TravelCountry::findOrFail($id); + if($model->travel_nationality_requirements){ + foreach($model->travel_nationality_requirements as $travel_nationality_requirement){ + $travel_nationality_requirement->delete(); + } } - } - $tc = \App\Models\Sym\TravelCountry::find($model->crm_id); - if($tc){ - $tc->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()->back(); + } + + if($del === 'general_file'){ + $general_file = GeneralFile::findOrFail($id); + $travel_country = $general_file->travel_country; + $fileRepo = new GeneralFileRepository($general_file); + $fileRepo->_set('disk', 'general'); + $fileRepo->delete(); + $general_file->delete(); + \Session()->flash('alert-success', 'Datei gelöscht'); + return redirect(route('admin_settings_travel_country_detail', [$travel_country->id, 'data'])); + + } + if($del === 'country_service'){ + $travel_country_service = TravelCountryService::findOrFail($id); + $travel_country = $travel_country_service->travel_country; + //check as entry + if($travel_country_service->booking_country_services->count() > 0){ + \Session()->flash('alert-error', 'Die Leistung kann nicht gelöscht werden, diese hat Einträge bei den Buchungen'); + return redirect(route('admin_settings_travel_country_detail', [$travel_country->id, 'services'])); + } + $travel_country_service->delete(); + \Session()->flash('alert-success', 'Eintrag gelöscht'); + return redirect(route('admin_settings_travel_country_detail', [$travel_country->id, 'services'])); + } - $model->delete(); - \Session()->flash('alert-success', 'Eintrag gelöscht'); - return redirect()->back(); } } diff --git a/app/Http/Controllers/TravelUserBookingFewoController.php b/app/Http/Controllers/TravelUserBookingFewoController.php index 0825987..90d3d33 100755 --- a/app/Http/Controllers/TravelUserBookingFewoController.php +++ b/app/Http/Controllers/TravelUserBookingFewoController.php @@ -7,8 +7,12 @@ use App\Mail\MailSendFeWoInvoice; use App\Mail\MailSendFeWoService; use App\Mail\MailSendFeWoInfo; use App\Models\CMSContent; +use App\Models\FewoLodging; use App\Models\FewoReservation; +use App\Models\TravelBookingFewoChannel; use App\Models\TravelUserBookingFewo; +use App\Models\TravelUserBookingFile; +use App\Repositories\BookingFewoFileRepository; use App\Repositories\TravelUserBookingFewoRepository; use App\Services\Util; use Illuminate\Support\Facades\Mail; @@ -23,12 +27,16 @@ class TravelUserBookingFewoController extends Controller $this->middleware('admin'); $this->userBookingFewoRepo = $userBookingFewoRepo; + + } public function index($step = false) { $data = [ - 'step' => $step + 'step' => $step, + 'filter_fewo_options' => FewoLodging::get()->pluck('name', 'id'), + 'filter_channel_options' => TravelBookingFewoChannel::get()->pluck('name', 'id'), ]; return view('travel.user.booking.index', $data); @@ -41,13 +49,13 @@ class TravelUserBookingFewoController extends Controller $replace_info_text = []; - if($id == "new") { + if($id === "new") { $travel_user_booking_fewo = new TravelUserBookingFewo(); $id = 'new'; }else{ $travel_user_booking_fewo = TravelUserBookingFewo::findOrFail($id); - $max_adults = isset($travel_user_booking_fewo->fewo_lodging->maximum_adults) ? $travel_user_booking_fewo->fewo_lodging->maximum_adults : 10; - $max_children = isset($travel_user_booking_fewo->fewo_lodging->maximum_childs) ? $travel_user_booking_fewo->fewo_lodging->maximum_childs : 10;; + $max_adults = $travel_user_booking_fewo->fewo_lodging->maximum_adults ? $travel_user_booking_fewo->fewo_lodging->maximum_adults : 10; + $max_children = $travel_user_booking_fewo->fewo_lodging->maximum_childs ? $travel_user_booking_fewo->fewo_lodging->maximum_childs : 10;; $id = $travel_user_booking_fewo->id; $replace_info_text['fewo_user_anrede'] = $travel_user_booking_fewo->getUserSalutation(); $replace_info_text['fewo_adresse'] = $travel_user_booking_fewo->getNameAddressLocation(", "); @@ -171,58 +179,87 @@ class TravelUserBookingFewoController extends Controller } } - public function delete($id){ - $model = TravelUserBookingFewo::findOrFail($id); - $FewoReservations = FewoReservation::where('lodging_id', $model->fewo_lodging_id)->where('from_date', $model->getFromDateRaw())->where('to_date', $model->getToDateRaw())->get(); - foreach ($FewoReservations as $FewoReservation){ - $FewoReservation->delete(); + public function delete($id, $del="travel_user_booking_fewo"){ + + if($del === 'travel_user_booking_fewo') { + $model = TravelUserBookingFewo::findOrFail($id); + $FewoReservations = FewoReservation::where('lodging_id', $model->fewo_lodging_id)->where('from_date', $model->getFromDateRaw())->where('to_date', $model->getToDateRaw())->get(); + foreach ($FewoReservations as $FewoReservation) { + $FewoReservation->delete(); + } + $model->delete(); + \Session()->flash('alert-success', __('Buchung gelöscht sowie die Reservierung im Sterntrous Kalender')); + } + if($del === 'booking_fewo_files'){ + $booking_fewo_file = TravelUserBookingFile::findOrFail($id); + $travel_user_booking_fewo = $booking_fewo_file->travel_user_booking_fewo; + $fileRepo = new BookingFewoFileRepository($booking_fewo_file); + $fileRepo->_set('disk', 'booking_fewo'); + $fileRepo->delete(); + $booking_fewo_file->delete(); + \Session()->flash('alert-success', 'Datei gelöscht'); + return redirect(route('travel_user_booking_fewo_detail', [$travel_user_booking_fewo->id])); } - $model->delete(); - \Session()->flash('alert-success', __('Buchung gelöscht sowie die Reservierung im Sterntrous Kalender')); return redirect(route('travel_user_booking_fewos')); } + private function prozessTravelUserBookingFewosSearch(){ + + $query = TravelUserBookingFewo::with('travel_booking_fewo_channel')->with('fewo_lodging') + ->select('travel_user_booking_fewos.*') + ->where('deleted_at', '=', null); + + if(Request::get('option_fewo_id') != ""){ + $query->where('fewo_lodging_id', '=', Request::get('option_fewo_id')); + } + if(Request::get('option_channel_id') != ""){ + $query->where('travel_booking_fewo_channel_id', '=', Request::get('option_channel_id')); + } + return $query; + } public function getTravelUserBookingFewos() { - //confirmation_code_remider is delete 2 - $query = TravelUserBookingFewo::where('deleted_at', '=', null); + + $query = $this->prozessTravelUserBookingFewosSearch(); return \DataTables::eloquent($query) ->addColumn('action_edit', function (TravelUserBookingFewo $travel_user_booking_fewo) { return ''; }) - ->addColumn('fewo_lodging', function (TravelUserBookingFewo $travel_user_booking_fewo) { - //return ''.$travel_user_booking_fewo->fewo_lodging->name.''; - return $travel_user_booking_fewo->fewo_lodging->name; - }) ->addColumn('travel_user', function (TravelUserBookingFewo $travel_user_booking_fewo) { return ''.$travel_user_booking_fewo->travel_user->first_name.' '.$travel_user_booking_fewo->travel_user->last_name.''; }) ->addColumn('is_calendar', function (TravelUserBookingFewo $travel_user_booking_fewo) { - $back = ""; + $back = "
"; $back .= get_active_badge($travel_user_booking_fewo->is_calendar_fewo_direct, "FEWO Direkt")." "; $back .= get_active_badge($travel_user_booking_fewo->is_calendar_hrs, "HRS")." "; $back .= get_active_badge($travel_user_booking_fewo->is_calendar_stern_tours, "STERN TOURS"); + $back .= "
"; return $back; }) ->addColumn('is_mail', function (TravelUserBookingFewo $travel_user_booking_fewo) { - $back = ""; + $back = "
"; $back .= get_active_badge($travel_user_booking_fewo->isSendUserMail(), "Mietbestätigung")." "; $back .= get_active_badge($travel_user_booking_fewo->isSendInfoMail(), "Anrreiseinfo")." "; $back .= get_active_badge($travel_user_booking_fewo->isSendServiceMail(), "Dienstleister Mail"); + $back .= "
"; return $back; }) - ->addColumn('status_name', function (TravelUserBookingFewo $travel_user_booking_fewo) { - return $travel_user_booking_fewo->getStatuesName(); - }) ->addColumn('action_delete', function (TravelUserBookingFewo $travel_user_booking_fewo) { return ''; }) - ->rawColumns(['action_edit', 'fewo_lodging', 'travel_user', 'is_calendar', 'is_mail', 'action_delete']) + ->filterColumn('fewo_lodging.name', function ($query, $keyword) { + if ($keyword != "") { + $query->whereHas('travel_user', function ($q) use ($keyword) { + $q->where("first_name", 'LIKE', '%' . $keyword . '%') + ->orWhere('last_name', 'LIKE', '%' . $keyword . '%'); + }); + } + }) + ->rawColumns(['action_edit', 'travel_user', 'is_calendar', 'is_mail', 'action_delete']) ->make(true); } - } diff --git a/app/Models/Airline.php b/app/Models/Airline.php index 06953bb..af5a71a 100644 --- a/app/Models/Airline.php +++ b/app/Models/Airline.php @@ -47,4 +47,12 @@ class Airline extends Model protected $casts = ['contact_emails' => 'array']; + public static function getAsNameIdArray($empty = true){ + $ret = Airline::get()->pluck('name', 'id')->toArray(); + if($empty){ + $first = [null => "-"]; + return $first + $ret; + } + return $ret; + } } diff --git a/app/Models/Booking.php b/app/Models/Booking.php index 1cf78b5..5fbc667 100644 --- a/app/Models/Booking.php +++ b/app/Models/Booking.php @@ -287,11 +287,12 @@ class Booking extends Model 2 => 'erledigt', ]; + public static $hold_types = [ + 0 => '-', + 1 => 'eingetragen', + ]; + public static $customer_mail_dirs = [ - 0 => ['name' => 'Reisender', 'icon'=>'ion-ios-filing'], - 1 => ['name' => 'Agentur', 'icon'=>'ion-ios-folder-open'], - 2 => ['name' => 'Flug', 'icon'=>'ion-ios-airplane'], - 3 => ['name' => 'Versicherung', 'icon'=>'ion-ios-help-buoy'], 11 => ['name' => 'Entwürfe', 'icon'=>'ion-md-create'], 12 => ['name' => 'Papierkorb', 'icon'=>'ion-md-trash'], ]; @@ -473,6 +474,23 @@ class Booking extends Model return $this->hasMany(BookingFile::class); } + public function booking_country_services() + { + return $this->hasMany(BookingCountryService::class, 'booking_id'); + } + + public function booking_country_services_checked() + { + return $this->hasMany(BookingCountryService::class, 'booking_id')->where('status', '=', 0); + } + + public function hasBookingCountryServicesUnchecked(){ + if(!$this->booking_country_services->count() || $this->booking_country_services_checked->count() || + ($this->booking_country_services->count() !== TravelCountryService::where('crm_travel_country_id', '=', $this->travel_country_id)->count())){ + return false; + } + return true; + } public function calculate_price_total() { @@ -740,13 +758,13 @@ class Booking extends Model return isset($this->xx_tkt_colors[$this->xx_tkt]) ? $this->xx_tkt_colors[$this->xx_tkt] : '-'; } - public function countCustomerMailsBy($dir, $country=false){ + public function countCustomerMailsBy($dir, $subdir=false){ if($dir === 11){ - return $this->customer_mails->where('draft', true)->count(); + return $this->customer_mails->where('draft', true)->where('dir', '!=', 12)->count(); } - if($country){ - return $this->customer_mails->where('dir', $dir)->where('travel_country_id', $country)->count(); + if($subdir){ + return $this->customer_mails->where('dir', $dir)->where('subdir', $subdir)->count(); } return $this->customer_mails->where('dir', $dir)->count(); } diff --git a/app/Models/BookingCountryService.php b/app/Models/BookingCountryService.php new file mode 100644 index 0000000..7c28dd9 --- /dev/null +++ b/app/Models/BookingCountryService.php @@ -0,0 +1,75 @@ + 'int', + 'booking_id' => 'int', + 'status' => 'int' + ]; + + protected $fillable = [ + 'travel_country_service_id', + 'booking_id', + 'status' + ]; + + protected $status_type = [ + 0 => 'offen', + 1 => 'erledigt', + ]; + + public function booking() + { + return $this->belongsTo(Booking::class); + } + + public function travel_country_service() + { + return $this->belongsTo(TravelCountryService::class); + } + + public static function getStatus($travel_country_service_id, $booking_id){ + $booking_country_service = BookingCountryService::where('travel_country_service_id', '=', $travel_country_service_id) + ->where('booking_id', '=', $booking_id)->first(); + + if($booking_country_service){ + return $booking_country_service->status; + } + return 0; + } +} diff --git a/app/Models/BookingFile.php b/app/Models/BookingFile.php index 6fcf87b..8999ec4 100644 --- a/app/Models/BookingFile.php +++ b/app/Models/BookingFile.php @@ -50,13 +50,6 @@ class BookingFile extends Model 'size' => 'int' ]; - public static $icon_ext = [ - 'default' => 'fa fa-file', - 'pdf'=> 'fa fa-file-pdf', - 'jpg'=> 'fa fa-file-image', - 'png'=> 'fa fa-file-image', - ]; - protected $fillable = [ 'booking_id', 'identifier', @@ -68,6 +61,13 @@ class BookingFile extends Model 'size' ]; + public static $icon_ext = [ + 'default' => 'fa fa-file', + 'pdf'=> 'fa fa-file-pdf', + 'jpg'=> 'fa fa-file-image', + 'png'=> 'fa fa-file-image', + ]; + public function booking() { return $this->belongsTo(Booking::class); diff --git a/app/Models/CMSContent.php b/app/Models/CMSContent.php index cd5f212..4d53889 100644 --- a/app/Models/CMSContent.php +++ b/app/Models/CMSContent.php @@ -32,6 +32,12 @@ use Illuminate\Database\Eloquent\Model; * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CMSContent newModelQuery() * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CMSContent newQuery() * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CMSContent query() + * @property string|null $identifier + * @property array|null $object + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CMSContent whereIdentifier($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CMSContent whereObject($value) + * @property int|null $pos + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CMSContent wherePos($value) */ class CMSContent extends Model { @@ -59,7 +65,12 @@ class CMSContent extends Model protected $table = 'c_m_s_contents'; protected $fillable = [ - 'name', 'slug', 'field', 'text', 'full_text', 'integer', 'decimal', + 'name', 'slug', 'identifier', 'field', 'text', 'full_text', 'object', 'integer', 'decimal', 'pos', + ]; + + protected $casts = [ + 'object' => 'array', + 'pos' => 'int' ]; public function sluggable() @@ -107,11 +118,14 @@ class CMSContent extends Model return $this->full_text; break; case 'file': - return \GuzzleHttp\json_decode($this->full_text); + // return \GuzzleHttp\json_decode($this->full_text); + return $this->object; + break; + case 'array': + return $this->object; break; case 'integer': return $this->integer; - break; case 'decimal': return $this->decimal; @@ -122,13 +136,21 @@ class CMSContent extends Model //FILE ------------------------ public function isFile(){ - return $this->field === 'file' ? true : false; + return $this->id > 0 && $this->field === 'file' ? true : false; } /*'identifier', 'filename', 'dir', 'original_name', 'ext', 'mine', 'size'*/ public function getFileContent($key= false){ if($key && $this->isFile()){ - $file = \GuzzleHttp\json_decode($this->full_text); - return isset($file->{$key}) ? $file->{$key} : false; + // $file = \GuzzleHttp\json_decode($this->full_text); + return isset($this->object[$key]) ? $this->object[$key] : false; + } + return false; + } + + public function getArrayContent($key= false){ + if($key && $this->field === 'array'){ + // $file = \GuzzleHttp\json_decode($this->full_text); + return isset($this->object[$key]) ? $this->object[$key] : false; } return false; } @@ -209,7 +231,10 @@ class CMSContent extends Model return $CMSContent->full_text; break; case 'file': - return \GuzzleHttp\json_decode($CMSContent->full_text); + return $CMSContent->object; //\GuzzleHttp\json_decode($CMSContent->full_text); + break; + case 'array': + return $CMSContent->object; //\GuzzleHttp\json_decode($CMSContent->full_text); break; case 'integer': return $CMSContent->integer; diff --git a/app/Models/CustomerFewoFile.php b/app/Models/CustomerFewoFile.php new file mode 100644 index 0000000..e75f6a8 --- /dev/null +++ b/app/Models/CustomerFewoFile.php @@ -0,0 +1,115 @@ + 'int', + 'customer_fewo_mail_id' => 'int', + 'size' => 'int' + ]; + + protected $fillable = [ + 'travel_user_id', + 'customer_fewo_mail_id', + 'identifier', + 'filename', + 'dir', + 'original_name', + 'ext', + 'mine', + 'size' + ]; + + public static $icon_ext = [ + 'default' => 'fa fa-file', + 'pdf'=> 'fa fa-file-pdf', + 'jpg'=> 'fa fa-file-image', + 'png'=> 'fa fa-file-image', + ]; + + public function customer_fewo_mail() + { + return $this->belongsTo(CustomerFewoMail::class); + } + + public function travel_user() + { + return $this->belongsTo(TravelUser::class); + } + + public function getIconExt(){ + return isset(self::$icon_ext[$this->ext]) ? self::$icon_ext[$this->ext] : self::$icon_ext['default']; + } + + public function getURL($do=false){ + return route('storage_file', [$this->id, 'travel_user', $do]); + } + + public function getPath(){ + return \Storage::disk('travel_user')->path($this->dir.$this->filename); + + } + + public function formatBytes($precision = 2) + { + $size = $this->size; + + if ($size > 0) { + $size = (int) $size; + $base = log($size) / log(1024); + $suffixes = array(' bytes', ' KB', ' MB', ' GB', ' TB'); + + return round(pow(1024, $base - floor($base)), $precision) . $suffixes[floor($base)]; + } else { + return $size; + } + } +} diff --git a/app/Models/CustomerFewoMail.php b/app/Models/CustomerFewoMail.php new file mode 100644 index 0000000..837c18b --- /dev/null +++ b/app/Models/CustomerFewoMail.php @@ -0,0 +1,189 @@ + 'int', + 'travel_user_id' => 'int', + 'is_answer' => 'bool', + 'reply_id' => 'int', + 'dir' => 'int', + 'subdir' => 'int', + 'draft' => 'bool', + 'important' => 'bool', + 'send' => 'bool', + 'fail' => 'bool', + 'recipient' => 'array', + 'cc' => 'array', + 'bcc' => 'array' + ]; + + protected $dates = [ + 'sent_at', + 'scheduled_at', + 'delivered_at' + ]; + + protected $fillable = [ + 'travel_user_booking_fewo_id', + 'travel_user_id', + 'is_answer', + 'reply_id', + 'email', + 'recipient', + 'cc', + 'bcc', + 'subject', + 'message', + 'dir', + 'subdir', + 'draft', + 'important', + 'send', + 'fail', + 'error', + 'sent_at', + 'scheduled_at', + 'delivered_at' + ]; + + public function customer_fewo_mail() + { + return $this->belongsTo(CustomerFewoMail::class, 'reply_id'); + } + + public function customer_mail() + { + return $this->belongsTo(CustomerFewoMail::class, 'reply_id'); + } + + public function travel_user_booking_fewo() + { + return $this->belongsTo(TravelUserBookingFewo::class); + } + + public function booking() + { + return $this->belongsTo(TravelUserBookingFewo::class); + } + + public function travel_user() + { + return $this->belongsTo(TravelUser::class); + } + + public function customer() + { + return $this->belongsTo(TravelUser::class, 'travel_user_id'); + } + + public function customer_fewo_files() + { + return $this->hasMany(CustomerFewoFile::class); + } + + public function customer_files() + { + return $this->hasMany(CustomerFewoFile::class, 'customer_fewo_mail_id'); + } + + public function customer_fewo_mails() + { + return $this->hasMany(CustomerFewoMail::class, 'reply_id'); + } + + public function getSentAtRaw(){ + return $this->attributes['sent_at']; + } + + public function getSentAtAttribute(){ + if(!$this->attributes['sent_at']){ return ""; } + return Carbon::parse($this->attributes['sent_at'])->format(\Util::formatDateTimeDB()); + } + + public function getCreatedAtAttribute(){ + if(!$this->attributes['created_at']){ return ""; } + return Carbon::parse($this->attributes['created_at'])->format(\Util::formatDateTimeDB()); + } +} diff --git a/app/Models/CustomerFile.php b/app/Models/CustomerFile.php index 89c0405..8448412 100644 --- a/app/Models/CustomerFile.php +++ b/app/Models/CustomerFile.php @@ -58,12 +58,6 @@ class CustomerFile extends Model 'size' => 'int' ]; - public static $icon_ext = [ - 'default' => 'fa fa-file', - 'pdf'=> 'fa fa-file-pdf', - 'jpg'=> 'fa fa-file-image', - 'png'=> 'fa fa-file-image', - ]; protected $fillable = [ 'customer_id', 'customer_mail_id', @@ -76,6 +70,13 @@ class CustomerFile extends Model 'size' ]; + public static $icon_ext = [ + 'default' => 'fa fa-file', + 'pdf'=> 'fa fa-file-pdf', + 'jpg'=> 'fa fa-file-image', + 'png'=> 'fa fa-file-image', + ]; + public function customer() { return $this->belongsTo(Customer::class); diff --git a/app/Models/CustomerMail.php b/app/Models/CustomerMail.php index fd3a57f..88ba411 100644 --- a/app/Models/CustomerMail.php +++ b/app/Models/CustomerMail.php @@ -75,6 +75,8 @@ use Illuminate\Database\Eloquent\Model; * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CustomerMail whereTravelCountryId($value) * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CustomerMail whereUpdatedAt($value) * @mixin \Eloquent + * @property int|null $subdir + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CustomerMail whereSubdir($value) */ class CustomerMail extends Model { @@ -96,7 +98,8 @@ class CustomerMail extends Model 'is_answer' => 'bool', 'reply_id' => 'int', 'dir' => 'int', - 'travel_country_id' => 'int', + 'subdir' => 'int', + 'travel_country_id' => 'int', 'draft' => 'bool', 'important' => 'bool', 'send' => 'bool', @@ -125,7 +128,8 @@ class CustomerMail extends Model 'subject', 'message', 'dir', - 'travel_country_id', + 'subdir', + 'travel_country_id', 'draft', 'important', 'send', diff --git a/app/Models/EmailTemplate.php b/app/Models/EmailTemplate.php index 0f0dd44..2f1909a 100644 --- a/app/Models/EmailTemplate.php +++ b/app/Models/EmailTemplate.php @@ -11,29 +11,49 @@ use Illuminate\Database\Eloquent\Model; /** * Class EmailTemplate - * + * * @property int $id + * @property int $email_template_dir_id * @property string $subject * @property string $message * @property bool $active * @property Carbon $created_at * @property Carbon $updated_at - * + * @property EmailTemplateDir $email_template_dir * @package App\Models + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\EmailTemplate newModelQuery() + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\EmailTemplate newQuery() + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\EmailTemplate query() + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\EmailTemplate whereActive($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\EmailTemplate whereCreatedAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\EmailTemplate whereEmailTemplateDirId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\EmailTemplate whereId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\EmailTemplate whereMessage($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\EmailTemplate whereSubject($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\EmailTemplate whereUpdatedAt($value) + * @mixin \Eloquent + * @property string $name + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\EmailTemplate whereName($value) */ class EmailTemplate extends Model { - protected $connection = 'mysql'; - - protected $table = 'email_templates'; + protected $table = 'email_templates'; protected $casts = [ + 'email_template_dir_id' => 'int', 'active' => 'bool' ]; protected $fillable = [ + 'email_template_dir_id', + 'name', 'subject', 'message', 'active' ]; + + public function email_template_dir() + { + return $this->belongsTo(EmailTemplateDir::class); + } } diff --git a/app/Models/EmailTemplateDir.php b/app/Models/EmailTemplateDir.php new file mode 100644 index 0000000..98797a3 --- /dev/null +++ b/app/Models/EmailTemplateDir.php @@ -0,0 +1,58 @@ + 'bool', + 'pos' => 'int' + ]; + + protected $fillable = [ + 'name', + 'color', + 'active', + 'pos' + ]; + + public function email_templates() + { + return $this->hasMany(EmailTemplate::class); + } +} diff --git a/app/Models/GeneralFile.php b/app/Models/GeneralFile.php new file mode 100644 index 0000000..5149d7b --- /dev/null +++ b/app/Models/GeneralFile.php @@ -0,0 +1,106 @@ + 'int', + 'size' => 'int' + ]; + + protected $fillable = [ + 'travel_country_id', + 'identifier', + 'filename', + 'dir', + 'original_name', + 'ext', + 'mine', + 'size' + ]; + + public static $icon_ext = [ + 'default' => 'fa fa-file', + 'pdf'=> 'fa fa-file-pdf', + 'jpg'=> 'fa fa-file-image', + 'png'=> 'fa fa-file-image', + ]; + + + public function travel_country() + { + return $this->belongsTo(TravelCountry::class, 'travel_country_id'); + } + + public function getIconExt(){ + return isset(self::$icon_ext[$this->ext]) ? self::$icon_ext[$this->ext] : self::$icon_ext['default']; + } + + public function getURL($do=false){ + return route('storage_file', [$this->id, 'general', $do]); + } + + public function getPath(){ + return \Storage::disk('general')->path($this->dir.$this->filename); + + } + + public function formatBytes($precision = 2) + { + $size = $this->size; + + if ($size > 0) { + $size = (int) $size; + $base = log($size) / log(1024); + $suffixes = array(' bytes', ' KB', ' MB', ' GB', ' TB'); + + return round(pow(1024, $base - floor($base)), $precision) . $suffixes[floor($base)]; + } else { + return $size; + } + } +} diff --git a/app/Models/Insurance.php b/app/Models/Insurance.php index a6aac50..18eeeed 100644 --- a/app/Models/Insurance.php +++ b/app/Models/Insurance.php @@ -11,7 +11,7 @@ use Illuminate\Database\Eloquent\Model; /** * Class Insurance - * + * * @property int $id * @property string $name * @property string $name_full @@ -19,8 +19,17 @@ use Illuminate\Database\Eloquent\Model; * @property bool $active * @property Carbon $created_at * @property Carbon $updated_at - * * @package App\Models + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Insurance newModelQuery() + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Insurance newQuery() + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Insurance query() + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Insurance whereActive($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Insurance whereContactEmails($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Insurance whereCreatedAt($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Insurance whereId($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Insurance whereName($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Insurance whereUpdatedAt($value) + * @mixin \Eloquent */ class Insurance extends Model { diff --git a/app/Models/ServiceProvider.php b/app/Models/ServiceProvider.php index b66fcd6..b9c9da2 100644 --- a/app/Models/ServiceProvider.php +++ b/app/Models/ServiceProvider.php @@ -27,6 +27,10 @@ use Illuminate\Database\Eloquent\Model; * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ServiceProvider whereName($value) * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ServiceProvider whereType($value) * @mixin \Eloquent + * @property array|null $contact_emails + * @property bool|null $active + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ServiceProvider whereActive($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\ServiceProvider whereContactEmails($value) */ class ServiceProvider extends Model { diff --git a/app/Models/Sym/CmsContent.php b/app/Models/Sym/CmsContent.php index 6a15f6f..b6fb806 100644 --- a/app/Models/Sym/CmsContent.php +++ b/app/Models/Sym/CmsContent.php @@ -34,6 +34,12 @@ use Illuminate\Database\Eloquent\Model; * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Sym\CmsContent whereUpdatedAt($value) * @mixin \Eloquent * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Sym\CmsContent findSimilarSlugs($attribute, $config, $slug) + * @property string|null $identifier + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Sym\CmsContent whereIdentifier($value) + * @property array|null $object + * @property int|null $pos + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Sym\CmsContent whereObject($value) + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Sym\CmsContent wherePos($value) */ class CmsContent extends Model { @@ -45,7 +51,12 @@ class CmsContent extends Model protected $table = 'cms_contents'; protected $fillable = [ - 'name', 'slug', 'field', 'text', 'full_text', 'integer', 'decimal', + 'name', 'slug', 'identifier', 'field', 'text', 'full_text', 'object', 'integer', 'decimal', 'pos', + ]; + + protected $casts = [ + 'object' => 'array', + 'pos' => 'int' ]; public $timestamps = false; diff --git a/app/Models/Sym/TravelCountry.php b/app/Models/Sym/TravelCountry.php index 237dc43..105b4fe 100644 --- a/app/Models/Sym/TravelCountry.php +++ b/app/Models/Sym/TravelCountry.php @@ -3,7 +3,9 @@ namespace App\Models\Sym; use App\Models\Booking; +use App\Models\GeneralFile; use App\Models\Lead; +use App\Models\TravelCountryService; use Illuminate\Database\Eloquent\Model; @@ -40,6 +42,13 @@ use Illuminate\Database\Eloquent\Model; * @property-read int|null $bookings_count * @property array|null $contact_emails * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Sym\TravelCountry whereContactEmails($value) + * @property array|null $mail_dirs + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Sym\TravelCountry whereMailDirs($value) + * @property string|null $mail_dir_name + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Sym\TravelCountry whereMailDirName($value) + * @property-read \App\Models\TravelCountry|null $stern_travel_country + * @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\TravelCountryService[] $travel_country_services + * @property-read int|null $travel_country_services_count */ class TravelCountry extends Model { @@ -53,6 +62,8 @@ class TravelCountry extends Model 'is_customer_country', 'active_backend', 'contact_lands', + 'mail_dir_name', + 'mail_dirs', 'contact_headline', 'contact_text_1', 'contact_text_2', @@ -63,7 +74,7 @@ class TravelCountry extends Model ]; - protected $casts = ['contact_lands' => 'array', 'contact_emails' => 'array']; + protected $casts = ['contact_lands' => 'array', 'mail_dirs'=>'array', 'contact_emails' => 'array']; public $timestamps = false; @@ -77,6 +88,16 @@ class TravelCountry extends Model return $this->hasMany(Booking::class, 'travel_country_id', 'id'); } + public function stern_travel_country() + { + return $this->hasOne(\App\Models\TravelCountry::class, 'crm_id', 'id'); + } + + public function travel_country_services() + { + return $this->hasMany(TravelCountryService::class, 'crm_travel_country_id', 'id')->orderBy('pos', 'DESC'); + } + public function getCountryLands(){ $ret = []; if($this->contact_lands){ @@ -90,4 +111,22 @@ class TravelCountry extends Model } return $ret; } + + public function getMailDirs($id){ + return isset($this->mail_dirs[$id]) ? $this->mail_dirs[$id] : []; + } + + public function getContactLandsModels(){ + $ret = []; + if($this->contact_lands){ + foreach ($this->contact_lands as $travel_country_id){ + if($travel_country = TravelCountry::find($travel_country_id)){ + $ret[$travel_country->id] = $travel_country; + } + } + }else{ + $ret[$this->id] = $this; + } + return $ret; + } } diff --git a/app/Models/TravelCompany.php b/app/Models/TravelCompany.php index 97e2dcb..b011d1a 100644 --- a/app/Models/TravelCompany.php +++ b/app/Models/TravelCompany.php @@ -34,6 +34,8 @@ use Illuminate\Database\Eloquent\Model; * @mixin \Eloquent * @property int|null $active * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCompany whereActive($value) + * @property array|null $contact_emails + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCompany whereContactEmails($value) */ class TravelCompany extends Model { diff --git a/app/Models/TravelCountry.php b/app/Models/TravelCountry.php index 9a72f4b..a0dd1e8 100644 --- a/app/Models/TravelCountry.php +++ b/app/Models/TravelCountry.php @@ -60,6 +60,15 @@ use Illuminate\Support\Str; * @property-read int|null $travel_nationality_requirements_count * @property array|null $contact_emails * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCountry whereContactEmails($value) + * @property array|null $mail_dirs + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCountry whereMailDirs($value) + * @property string $mail_dir_name + * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCountry whereMailDirName($value) + * @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\GeneralFile[] $general_files + * @property-read int|null $general_files_count + * @property-read \App\Models\Sym\TravelCountry|null $crm_travel_country + * @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\TravelCountryService[] $travel_country_services + * @property-read int|null $travel_country_services_count */ class TravelCountry extends Model { @@ -68,7 +77,6 @@ class TravelCountry extends Model protected $table = 'travel_country'; - protected $fillable = [ 'name', 'slug', @@ -76,6 +84,8 @@ class TravelCountry extends Model 'text_before', 'text_after', 'contact_lands', + 'mail_dir_name', + 'mail_dirs', 'contact_headline', 'contact_text_1', 'contact_text_2', @@ -90,7 +100,7 @@ class TravelCountry extends Model ]; - protected $casts = ['contact_lands' => 'array', 'contact_emails' => 'array']; + protected $casts = ['contact_lands' => 'array', 'mail_dirs' => 'array', 'contact_emails' => 'array']; public $timestamps = false; @@ -105,11 +115,26 @@ class TravelCountry extends Model return $this->belongsTo('App\Models\Page', 'feedback_page_id', 'id'); } + public function crm_travel_country() + { + return $this->belongsTo(\App\Models\Sym\TravelCountry::class, 'crm_id', 'id'); + } + public function travel_nationality_requirements() { return $this->hasMany('App\Models\TravelNationalityRequirement', 'travel_country_id', 'id'); } + public function general_files() + { + return $this->hasMany(GeneralFile::class, 'travel_country_id', 'id'); + } + + public function travel_country_services() + { + return $this->hasMany(TravelCountryService::class, 'travel_country_id', 'id')->orderBy('pos', 'DESC'); + } + public function setSlugAttribute( $value ) { if(!isset($value) || $value == ""){ $this->attributes['slug'] = Str::slug(pre_slug($this->name), '-'); @@ -131,6 +156,23 @@ class TravelCountry extends Model return $ret; } + public function getMailDirs($id){ + return isset($this->mail_dirs[$id]) ? $this->mail_dirs[$id] : []; + } + + public function getContactLandsModels(){ + $ret = []; + if($this->contact_lands){ + foreach ($this->contact_lands as $travel_country_id){ + if($travel_country = TravelCountry::where('crm_id', $contact_land_id)->first()){ + $ret[$travel_country->id] = $travel_country; + } + } + }else{ + $ret[$this->id] = $this; + } + return $ret; + } public function getNationalityRequirement($travel_nationality_id){ $model = TravelNationalityRequirement::where('travel_country_id', $this->id)->where('travel_nationality_id', $travel_nationality_id)->first(); diff --git a/app/Models/TravelCountryService.php b/app/Models/TravelCountryService.php new file mode 100644 index 0000000..063be4b --- /dev/null +++ b/app/Models/TravelCountryService.php @@ -0,0 +1,85 @@ + 'int', + 'crm_travel_country_id' => 'int', + 'pos' => 'int', + 'active' => 'bool' + ]; + + protected $fillable = [ + 'travel_country_id', + 'crm_travel_country_id', + 'name', + 'description', + 'pos', + 'active' + ]; + + protected $status_type = [ + 0 => 'offen', + 1 => 'erledigt', + ]; + + public function travel_country() + { + return $this->belongsTo(TravelCountry::class, 'travel_country_id'); + } + + public function crm_travel_country() + { + return $this->belongsTo(\App\Models\Sym\TravelCountry::class); + } + + public function booking_country_services() + { + return $this->hasMany(BookingCountryService::class); + } +} diff --git a/app/Models/TravelUser.php b/app/Models/TravelUser.php index 69e09b7..2113f88 100644 --- a/app/Models/TravelUser.php +++ b/app/Models/TravelUser.php @@ -131,4 +131,8 @@ class TravelUser extends Model public function setBirthdayAttribute( $value ) { $this->attributes['birthday'] = isset($value) ? (new Carbon($value))->format('Y-m-d') : NULL; } + + public function getSalutation(){ + return $this->salutation_id == 1 ? 'Herr' : 'Frau'; + } } diff --git a/app/Models/TravelUserBookingFewo.php b/app/Models/TravelUserBookingFewo.php index 60fcdc7..457d05a 100644 --- a/app/Models/TravelUserBookingFewo.php +++ b/app/Models/TravelUserBookingFewo.php @@ -98,6 +98,14 @@ use App\Services\Util; * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUserBookingFewo whereUpdatedAt($value) * @property string|null $last_change_at * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUserBookingFewo whereLastChangeAt($value) + * @property-read \App\Models\CustomerFewoMail|null $customer_fewo_mail_last + * @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\CustomerFewoMail[] $customer_fewo_mails + * @property-read int|null $customer_fewo_mails_count + * @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\CustomerFewoMail[] $customer_fewo_mails_sent_at + * @property-read int|null $customer_fewo_mails_sent_at_count + * @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\TravelUserBookingFile[] $booking_files + * @property-read int|null $booking_files_count + * @property-read \App\Models\TravelUser $customer */ class TravelUserBookingFewo extends Model { @@ -182,6 +190,11 @@ class TravelUserBookingFewo extends Model 'status_text' ]; + public static $customer_mail_dirs = [ + 11 => ['name' => 'Entwürfe', 'icon'=>'ion-md-create'], + 12 => ['name' => 'Papierkorb', 'icon'=>'ion-md-trash'], + ]; + public function fewo_lodging() { return $this->belongsTo(\App\Models\FewoLodging::class); @@ -202,6 +215,31 @@ class TravelUserBookingFewo extends Model return $this->belongsTo(\App\Models\TravelUser::class); } + public function customer() + { + return $this->belongsTo(\App\Models\TravelUser::class, 'travel_user_id'); + } + + public function booking_files() + { + return $this->hasMany(TravelUserBookingFile::class, 'travel_user_booking_fewo_id'); + } + + public function customer_fewo_mails() + { + return $this->hasMany(CustomerFewoMail::class, 'travel_user_booking_fewo_id', 'id'); + } + + public function customer_fewo_mails_sent_at() + { + return $this->hasMany(CustomerFewoMail::class, 'travel_user_booking_fewo_id')->orderBy('sent_at', 'ASC'); + } + + public function customer_fewo_mail_last() + { + return $this->hasOne(CustomerFewoMail::class, 'travel_user_booking_fewo_id')->latest(); + } + public function getStatuesName(){ if(isset(self::$statues[$this->status])){ return self::$statues[$this->status]; @@ -693,6 +731,16 @@ class TravelUserBookingFewo extends Model return false; } + public function countCustomerMailsBy($dir, $subdir=false){ + if($dir === 11){ + return $this->customer_fewo_mails->where('draft', true)->where('dir', '!=', 12)->count(); + } + if($subdir){ + return $this->customer_fewo_mails->where('dir', $dir)->where('subdir', $subdir)->count(); + } + return $this->customer_fewo_mails->where('dir', $dir)->count(); + } + } diff --git a/app/Models/TravelUserBookingFile.php b/app/Models/TravelUserBookingFile.php new file mode 100644 index 0000000..6e13858 --- /dev/null +++ b/app/Models/TravelUserBookingFile.php @@ -0,0 +1,106 @@ + 'int', + 'size' => 'int' + ]; + + protected $fillable = [ + 'travel_user_booking_fewo_id', + 'identifier', + 'filename', + 'dir', + 'original_name', + 'ext', + 'mine', + 'size' + ]; + + public static $icon_ext = [ + 'default' => 'fa fa-file', + 'pdf'=> 'fa fa-file-pdf', + 'jpg'=> 'fa fa-file-image', + 'png'=> 'fa fa-file-image', + ]; + + public function travel_user_booking_fewo() + { + return $this->belongsTo(TravelUserBookingFewo::class, 'travel_user_booking_fewo_id'); + } + + public function getIconExt(){ + return isset(self::$icon_ext[$this->ext]) ? self::$icon_ext[$this->ext] : self::$icon_ext['default']; + } + + public function getURL($do=false){ + return route('storage_file', [$this->id, 'booking_fewo', $do]); + } + + public function getPath(){ + return \Storage::disk('booking_fewo')->path($this->dir.$this->filename); + + } + + public function formatBytes($precision = 2) + { + $size = $this->size; + + if ($size > 0) { + $size = (int) $size; + $base = log($size) / log(1024); + $suffixes = array(' bytes', ' KB', ' MB', ' GB', ' TB'); + + return round(pow(1024, $base - floor($base)), $precision) . $suffixes[floor($base)]; + } else { + return $size; + } + } +} diff --git a/app/Repositories/BookingFewoFileRepository.php b/app/Repositories/BookingFewoFileRepository.php new file mode 100644 index 0000000..fec742b --- /dev/null +++ b/app/Repositories/BookingFewoFileRepository.php @@ -0,0 +1,53 @@ +model = $model; + } + + + + public function save(){ + $this->booking_fewo_file = TravelUserBookingFile::create([ + 'travel_user_booking_fewo_id' => $this->travel_user_booking_fewo_id, + 'identifier' => $this->identifier, + 'filename' => $this->allowed_filename, + 'dir' => $this->dir, + 'original_name' => $this->originalName, + 'ext' => $this->extension, + 'mine' => $this->mine, + 'size' => $this->size + ]); + } + + + public function response(){ + return Response::json([ + 'error' => false, + 'filename' => $this->allowed_filename, + 'file_id' =>$this->booking_fewo_file->id, + 'file_data' => $this->extension, + 'file_icon' => $this->booking_fewo_file->getIconExt(), + 'file_format_bytes' => $this->booking_fewo_file->formatBytes(), + 'file_url' => $this->booking_fewo_file->getURL(), + 'redirect' => '', + 'code' => 200 + ], 200); + } + +} \ No newline at end of file diff --git a/app/Repositories/BookingRepository.php b/app/Repositories/BookingRepository.php index 7dd033f..741a15a 100644 --- a/app/Repositories/BookingRepository.php +++ b/app/Repositories/BookingRepository.php @@ -4,6 +4,7 @@ namespace App\Repositories; use App\Models\Booking; +use App\Models\BookingCountryService; class BookingRepository extends BaseRepository { @@ -18,4 +19,55 @@ class BookingRepository extends BaseRepository { return $this->model; } + public function updateBooking($id, $data){ + + $this->model = Booking::findOrFail($id); + + $fill = [ + 'paying_out' => $data['paying_out'], + 'paying_out_status' => $data['paying_out_status'], + 'airline_id' => $data['airline_id'], + 'refund' => $data['refund'], + 'refund_date' => _reformat_date($data['refund_date']), + 'lawyer_date' => _reformat_date($data['lawyer_date']), + 'hold' => $data['hold'], + 'xx_tkt' => $data['xx_tkt'], + 'xx_tkt_date' => _reformat_date($data['xx_tkt_date']), + 'filekey' => $data['filekey'], + 'is_rail_fly' => isset($data['is_rail_fly']) ? true : false, + 'notice' => $data['notice'], + ]; + + $this->model->fill($fill); + $this->model->save(); + + if(isset($data['country_service'])){ + $this->updateCountryService($data['country_service']); + } + + return $this->model; + } + + public function updateCountryService($country_services){ + + foreach ($country_services as $country_service_id=>$val){ + $booking_country_service = BookingCountryService::where('travel_country_service_id', '=', $country_service_id) + ->where('booking_id', '=', $this->model->id)->first(); + + if(!$booking_country_service){ + $booking_country_service = BookingCountryService::create([ + 'travel_country_service_id' => $country_service_id, + 'booking_id' => $this->model->id, + 'status' => $val + ]); + }else{ + $booking_country_service->fill([ + 'status' => $val + ]); + $booking_country_service->save(); + } + } + + } + } \ No newline at end of file diff --git a/app/Repositories/CMSFileRepository.php b/app/Repositories/CMSFileRepository.php index 475748a..60602cb 100644 --- a/app/Repositories/CMSFileRepository.php +++ b/app/Repositories/CMSFileRepository.php @@ -8,7 +8,7 @@ use Response; class CMSFileRepository extends FileRepository { protected $identifier; - + protected $data; public function __construct($model){ parent::__construct(); @@ -28,7 +28,8 @@ class CMSFileRepository extends FileRepository { $data = [ "name" => $this->originalName, "field" => "file", - "full_text" => \GuzzleHttp\json_encode($file_data), + "identifier" => $this->data['identifier'], + "object" => $file_data, //\GuzzleHttp\json_encode($file_data), ]; $this->model = CMSContent::create($data); //store in cms old Datebase diff --git a/app/Repositories/CustomerFewoFileRepository.php b/app/Repositories/CustomerFewoFileRepository.php new file mode 100644 index 0000000..2afdd72 --- /dev/null +++ b/app/Repositories/CustomerFewoFileRepository.php @@ -0,0 +1,55 @@ +model = $model; + } + + + + public function save(){ + $this->customer_file = CustomerFewoFile::create([ + 'travel_user_id' => $this->travel_user_id, + 'customer_fewo_mail_id' => $this->customer_fewo_mail_id, + 'identifier' => $this->identifier, + 'filename' => $this->allowed_filename, + 'dir' => $this->dir, + 'original_name' => $this->originalName, + 'ext' => $this->extension, + 'mine' => $this->mine, + 'size' => $this->size + ]); + } + + + public function response(){ + return Response::json([ + 'error' => false, + 'original_name' => $this->originalName, + 'filename' => $this->allowed_filename, + 'file_id' =>$this->customer_file->id, + 'file_data' => $this->extension, + 'file_icon' => $this->customer_file->getIconExt(), + 'file_format_bytes' => $this->customer_file->formatBytes(), + 'file_url' => $this->customer_file->getURL(), + 'redirect' => '', + 'code' => 200 + ], 200); + } + +} \ No newline at end of file diff --git a/app/Repositories/CustomerFewoMailRepository.php b/app/Repositories/CustomerFewoMailRepository.php new file mode 100644 index 0000000..890aa01 --- /dev/null +++ b/app/Repositories/CustomerFewoMailRepository.php @@ -0,0 +1,340 @@ +model = $model; + } + + public function update($data) + { + return $this->model; + } + + public function sendAndStore($data){ + //send or draft + //$data['action'] + if(isset($data['send_mail_to']) && is_array($data['send_mail_to'])) { + //has Attachments + $customer_files = []; + if(isset($data['message_attachment_id']) && is_array($data['message_attachment_id'])){ + foreach ($data['message_attachment_id'] as $message_attachment_id){ + if($CustomerFile = CustomerFewoFile::find($message_attachment_id)){ + $customer_files[] = $CustomerFile; + } + } + } + foreach ($data['send_mail_to'] as $booking_fewo_id => $on) { + $booking_fewo = TravelUserBookingFewo::find($booking_fewo_id); + if ($booking_fewo->travel_user) { + $data['draft'] = (isset($data['action']) && $data['action'] === 'draft' ? true : false); + if(!$data['draft']){ + $data['message'] = $this->prepareContent($booking_fewo, $data['message']); + $data['subject'] = $this->prepareContent($booking_fewo, $data['subject']); + } + $reply_id = isset($data['customer_mail_id']) ? $data['customer_mail_id'] : NULL; + $email = isset($data['send_mail_to_mail'][$booking_fewo_id]) ? $data['send_mail_to_mail'][$booking_fewo_id] : $booking_fewo->travel_user->email; + $customer_mail = $this->store($booking_fewo, $data, $email, false, $reply_id); + foreach ($customer_files as $file) { + $file->travel_user_id = $booking_fewo->travel_user_id; + $file->customer_fewo_mail_id = $customer_mail->id; + $file->identifier = 'mail'; + $file->save(); + } + + if(isset($data['action']) && $data['action'] === 'send'){ //not at draft + $this->sendMail($customer_mail); + } + + } + } + } + } + + public function replyStore($data){ + if(isset($data['travel_user_booking_fewo_id']) && $booking_fewo = TravelUserBookingFewo::find($data['travel_user_booking_fewo_id'])) { + //has Attachments + $customer_files = []; + if(isset($data['message_attachment_id']) && is_array($data['message_attachment_id'])){ + foreach ($data['message_attachment_id'] as $message_attachment_id){ + if($CustomerFile = CustomerFewoFile::find($message_attachment_id)){ + $customer_files[] = $CustomerFile; + } + } + } + if ($booking_fewo->travel_user) { + $data['draft'] = (isset($data['action']) && $data['action'] === 'draft' ? true : false); + $mail_from = isset($data['mail_from']) ? $data['mail_from'] : $booking_fewo->travel_user->email; + $sent_at = isset($data['sent_at']) ? \Carbon::parse(str_replace("- ", "", $data['sent_at'])) : now(); + $reply_id = isset($data['customer_mail_id']) ? $data['customer_mail_id'] : NULL; + $customer_mail = $this->store($booking_fewo, $data, $mail_from, true, $reply_id, $sent_at); + foreach ($customer_files as $file) { + $file->travel_user_id = $booking_fewo->travel_user_id; + $file->customer_fewo_mail_id = $customer_mail->id; + $file->identifier = 'mail'; + $file->save(); + } + } + + } + } + + public function store($booking_fewo, $data, $mail_from, $is_answer = false, $reply_id = NULL, $sent_at=false){ + + if(isset($data['save_customer_mail_id'])){ + $customer_mail = CustomerFewoMail::find($data['save_customer_mail_id']); + $customer_mail->fill([ + 'travel_user_booking_fewo_id' => $booking_fewo->id, + 'travel_user_id' => $booking_fewo->travel_user_id, + 'is_answer' => $is_answer, + 'reply_id' => $reply_id, + 'email' => $mail_from, + 'recipient' => isset($data['recipient']) ? Util::_explodeLines($data['recipient']) : null, + 'cc' => isset($data['cc']) ? Util::_explodeLines($data['cc']) : null, + 'bcc' => isset($data['bcc']) ? Util::_explodeLines($data['bcc']) : null, + 'subject' => $data['subject'], + 'message' => $data['message'], + 'dir' => isset($data['dir']) ? $data['dir'] : 0, + 'subdir' => isset($data['subdir']) ? $data['subdir'] : 0, + 'draft' => $data['draft'], + 'sent_at' => $sent_at ? $sent_at : now(), + ])->save(); + }else{ + $customer_mail = CustomerFewoMail::create([ + 'travel_user_booking_fewo_id' => $booking_fewo->id, + 'travel_user_id' => $booking_fewo->travel_user_id, + 'is_answer' => $is_answer, + 'reply_id' => $reply_id, + 'email' => $mail_from, + 'recipient' => isset($data['recipient']) ? Util::_explodeLines($data['recipient']) : null, + 'cc' => isset($data['cc']) ? Util::_explodeLines($data['cc']) : null, + 'bcc' => isset($data['bcc']) ? Util::_explodeLines($data['bcc']) : null, + 'subject' => $data['subject'], + 'message' => $data['message'], + 'dir' => isset($data['dir']) ? $data['dir'] : 0, + 'subdir' => isset($data['subdir']) ? $data['subdir'] : 0, + 'draft' => $data['draft'], + 'sent_at' => $sent_at ? $sent_at : now(), + ]); + } + + return $customer_mail; + } + + private function sendMail($customer_mail){ + $to_mails = []; + if(strpos($customer_mail->email, ',')){ + $to_mails = array_map('trim', explode(',', $customer_mail->email)); + }else{ + $to_mails[] = $customer_mail->email; + } + if($customer_mail->recipient){ + $to_mails = array_merge($to_mails, $customer_mail->recipient); + } + $customer_files = $customer_mail->customer_files; + try { + // + Mail::to($to_mails) + ->cc($customer_mail->cc ?: []) + ->bcc($customer_mail->bcc ?: []) + ->send(new MailSendInfo($customer_mail->subject, $customer_mail->message, $customer_files)); + } + catch(\Exception $e){ + // Never reached + $customer_mail->fail = true; + $customer_mail->error = $e->getMessage(); + $customer_mail->save(); + return false; + } + $customer_mail->send = true; + $customer_mail->sent_at = now(); + $customer_mail->save(); + return true; + } + + private function prepareContent($booking_fewo, $content){ + $content = Placeholder::replaceBookingFewo($booking_fewo, $content); + return $content; + } + + private static function prepareContactMails($value){ + if(isset($value->customers)){ //&& $value->customer_mail_dir !== NULL + $first_mail = ""; + if($value->customer_mail_dir < 10){ // && $value->customer_mail_subdir > 0 + $customer_mail_dir = \App\Services\BookingFewo::getCustomerMailDir($value->customer_mail_dir); + $contact_emails = \App\Services\BookingFewo::getCustomerMailEmails($customer_mail_dir, $value->customer_mail_subdir); + if($value->customer_mail_dir == 0){ + $value->recipient = Util::_implodeLines($contact_emails); + return $value; + }else{ + if($contact_emails && count($contact_emails) > 0) { + $first_mail = array_shift($contact_emails); + if (count($contact_emails) > 0) { + $value->recipient = Util::_implodeLines($contact_emails); + } + } + } + } + foreach ($value->customers as $key=>$val){ + $val['email'] = $first_mail; + $value->customers[$key] = $val; + } + + } + return $value; + } + + public static function loadModal($data) + { + $value = new Collection(); + $value->title = ""; + $value->subtitle = ""; + $value->url = ""; + $value->recipient = ""; + $value->cc = ""; + $value->bcc = ""; + $value->lead_title_id = ""; + $value->filter_email_templates_directories = EmailTemplate::join('email_template_dirs', 'email_template_dir_id', '=', 'email_template_dirs.id')->get()->pluck('name', 'id')->unique()->toArray(); + + /*Ansicht*/ + if ($data['action'] === "show-customer-mail") { + if (isset($data['customer_mail_id']) && $customer_mail = CustomerFewoMail::find($data['customer_mail_id'])) { + $value->url = $data['url']; + $value->title = "E-Mail Ansicht"; + return view("travel.user.booking.mail.modal-show-mail", compact('data', 'value', 'customer_mail'))->render(); + } + } + /* neue Mail */ + if ($data['action'] === "edit-customer-mail") { + $value->id = $data['id']; // + $customer_mail = CustomerFewoMail::find($value->id); + $booking = $customer_mail->travel_user_booking_fewo; + $value->customer_files = $customer_mail->customer_files; + $value->save_customer_mail_id = $customer_mail->id; + $value->draft = true; + $value->id = $customer_mail->travel_user_booking_fewo_id; + $value->booking = $booking; + $value->show = 'single'; + $value->lead_title_id = " - (".$value->booking->invoice_number.")"; + + + $tmp = []; + $tmp['email'] = $booking->travel_user ? $booking->travel_user->email : ""; + $tmp['name'] = $booking->travel_user ? $booking->travel_user->first_name . " " . $booking->travel_user->last_name . " | " : "- | "; + $tmp['name'] .= $booking->fewo_lodging_id ? $booking->fewo_lodging->name . " | " : "- | "; + $data['customers'][$booking->id] = $tmp; + $value->customers = $data['customers']; + $value->subject = $customer_mail->subject; + $value->message = $customer_mail->message; + $value->recipient = Util::_implodeLines($customer_mail->recipient); + $value->cc = Util::_implodeLines($customer_mail->cc); + $value->bcc = Util::_implodeLines($customer_mail->bcc); + + $value->title = "E-Mail- Nachricht an Kunden senden"; + $value->subtitle = "Dem Kunden wird eine E-Mail zugesendet."; + if($customer_mail->reply_id){ + $value->title = "E-Mail Antwort an Kunden senden"; + $value->subtitle = "Dem Kunden wird eine E-Mail zugesendet, die im System als Antwort gespeichert wird."; + $value->customer_mail = $customer_mail; + } + $value->s_placeholder = "Betreff der E-Mail"; + $value->m_placeholder = "Nachricht der E-Mail"; + $value->url = $data['url']; + $value->customer_mail_dir = $customer_mail->dir ? $customer_mail->dir : 0; + $value->customer_mail_subdir = $customer_mail->subdir ? $customer_mail->subdir : 0; + + return view("travel.user.booking.mail.modal-new-mail", compact('data', 'value'))->render(); + + } + /* neue Mail */ + if ($data['action'] === "new-customer-mail") { + $value->id = ""; + $value->draft = false; + $value->lead_title_id = "-"; + //singel + if (isset($data['travel_user_booking_fewo_id']) && $booking_fewo = TravelUserBookingFewo::find($data['travel_user_booking_fewo_id'])) { + $value->id = $data['travel_user_booking_fewo_id']; + $value->booking = $booking_fewo; + $value->show = 'single'; + $value->draft = true; + $value->lead_title_id = " - (".$value->booking->invoice_number.")"; + + }else{ + //multi + $value->show = 'multi'; + } + $value->customers = $data['customers']; + $value->subject = $value->lead_title_id; + $value->message = CMSContent::getContentBySlug('mailvorlage'); + $value->s_placeholder = "Betreff der E-Mail"; + $value->m_placeholder = "Nachricht der E-Mail"; + if(isset($data['customer_mail_id']) && $customer_mail = CustomerFewoMail::find($data['customer_mail_id'])){ + $value->subject = "Re: ".Util::_first_replace($customer_mail->subject); + $value->customer_mail = $customer_mail; + } + + $value->title = "E-Mail- Nachricht an Kunden senden"; + $value->subtitle = "Dem Kunden wird eine E-Mail zugesendet."; + if($data['id'] === 'reply-send'){ + $value->title = "E-Mail Antwort an Kunden senden"; + $value->subtitle = "Dem Kunden wird eine E-Mail zugesendet, die im System als Antwort gespeichert wird."; + } + $value->url = $data['url']; + $value->customer_mail_dir = isset($data['customer_mail_dir']) ? $data['customer_mail_dir'] : 0; + $value->customer_mail_subdir = isset($data['customer_mail_subdir']) ? $data['customer_mail_subdir'] : 0; + + $value = self::prepareContactMails($value); + return view("travel.user.booking.mail.modal-new-mail", compact('data', 'value'))->render(); + + } + /*Antwort speichern*/ + if ($data['action'] === "reply-customer-mail") { + if (isset($data['travel_user_booking_fewo_id']) && $booking_fewo = TravelUserBookingFewo::find($data['travel_user_booking_fewo_id'])) { + $value->id = $data['travel_user_booking_fewo_id']; + $value->draft = false; + $value->booking = $booking_fewo; + $value->message = ""; + $value->subject = ""; + $value->lead_title_id = " - (".$value->booking->invoice_number.")"; + $value->s_placeholder = "Betreff des Kunden"; + $value->m_placeholder = "Nachricht des Kunden"; + if(isset($data['customer_mail_id']) && $customer_mail = CustomerFewoMail::find($data['customer_mail_id'])){ + $value->subject = "Re: ".Util::_first_replace($customer_mail->subject); + $value->customer_mail = $customer_mail; + } + $value->title = "E-Mail Antwort speichern"; + $value->subtitle = "Die E-Mail wird im System gespeichert."; + if($data['id'] === 'reply-save'){ + $value->subtitle = "Die E-Mail wird im System als Antwort gespeichert."; + + } + $value->url = $data['url']; + $value->show = 'reply'; + $value->customer_mail_dir = isset($data['customer_mail_dir']) ? $data['customer_mail_dir'] : 0; + $value->customer_mail_subdir = isset($data['customer_mail_subdir']) ? $data['customer_mail_subdir'] : 0; + + $value = self::prepareContactMails($value); + return view("travel.user.booking.mail.modal-new-mail", compact('data', 'value'))->render(); + } + + } + } + +} \ No newline at end of file diff --git a/app/Repositories/CustomerMailRepository.php b/app/Repositories/CustomerMailRepository.php index 0359057..32507ea 100644 --- a/app/Repositories/CustomerMailRepository.php +++ b/app/Repositories/CustomerMailRepository.php @@ -9,6 +9,7 @@ use App\Models\Booking; use App\Models\CMSContent; use App\Models\CustomerFile; use App\Models\CustomerMail; +use App\Models\EmailTemplate; use App\Services\Placeholder; use App\Services\Util; use Illuminate\Database\Eloquent\Collection; @@ -98,7 +99,6 @@ class CustomerMailRepository extends BaseRepository { public function store($booking, $data, $mail_from, $is_answer = false, $reply_id = NULL, $sent_at=false){ - $data['travel_country_id'] = isset($data['travel_country_id']) && $data['travel_country_id']>0 ? $data['travel_country_id'] : NULL; if(isset($data['save_customer_mail_id'])){ $customer_mail = CustomerMail::find($data['save_customer_mail_id']); $customer_mail->fill([ @@ -114,7 +114,7 @@ class CustomerMailRepository extends BaseRepository { 'subject' => $data['subject'], 'message' => $data['message'], 'dir' => isset($data['dir']) ? $data['dir'] : 0, - 'travel_country_id' => $data['travel_country_id'], + 'subdir' => isset($data['subdir']) ? $data['subdir'] : 0, 'draft' => $data['draft'], 'sent_at' => $sent_at ? $sent_at : now(), ])->save(); @@ -132,7 +132,7 @@ class CustomerMailRepository extends BaseRepository { 'subject' => $data['subject'], 'message' => $data['message'], 'dir' => isset($data['dir']) ? $data['dir'] : 0, - 'travel_country_id' => $data['travel_country_id'], + 'subdir' => isset($data['subdir']) ? $data['subdir'] : 0, 'draft' => $data['draft'], 'sent_at' => $sent_at ? $sent_at : now(), ]); @@ -178,36 +178,29 @@ class CustomerMailRepository extends BaseRepository { } private static function prepareContactMails($value){ - - if(isset($value->customers) && $value->customer_mail_dir > 0){ + if(isset($value->customers)){ //&& $value->customer_mail_dir !== NULL $first_mail = ""; - if($value->customer_mail_dir == 1 && $value->customer_mail_country > 0){ - //Agentur / Land - $travel_country = \App\Models\Sym\TravelCountry::find($value->customer_mail_country); - if($travel_country && $travel_country->contact_emails && count($travel_country->contact_emails) > 0){ - $contact_emails = $travel_country->contact_emails; - $first_mail = array_shift($contact_emails); - if(count($contact_emails) > 0){ + if($value->customer_mail_dir < 10){ // && $value->customer_mail_subdir > 0 + $customer_mail_dir = \App\Services\Booking::getCustomerMailDir($value->customer_mail_dir); + $contact_emails = \App\Services\Booking::getCustomerMailEmails($customer_mail_dir, $value->customer_mail_subdir); + if($value->customer_mail_dir == 0){ $value->recipient = Util::_implodeLines($contact_emails); + return $value; + }else{ + if($contact_emails && count($contact_emails) > 0) { + $first_mail = array_shift($contact_emails); + if (count($contact_emails) > 0) { + $value->recipient = Util::_implodeLines($contact_emails); + } + } } - } - } - if($value->customer_mail_dir == 2){ - //Airline - $airline = Airline::whereName('Xemail')->first(); - if($airline && $airline->contact_emails && count($airline->contact_emails) > 0){ - $contact_emails = $airline->contact_emails; - $first_mail = array_shift($contact_emails); - if(count($contact_emails) > 0){ - $value->recipient = Util::_implodeLines($contact_emails); - } - } - } + } foreach ($value->customers as $key=>$val){ $val['email'] = $first_mail; $value->customers[$key] = $val; } + } return $value; } @@ -222,6 +215,8 @@ class CustomerMailRepository extends BaseRepository { $value->cc = ""; $value->bcc = ""; $value->lead_title_id = ""; + $value->filter_email_templates_directories = EmailTemplate::join('email_template_dirs', 'email_template_dir_id', '=', 'email_template_dirs.id')->get()->pluck('name', 'id')->unique()->toArray(); + /*Ansicht*/ if ($data['action'] === "show-customer-mail") { if (isset($data['customer_mail_id']) && $customer_mail = CustomerMail::find($data['customer_mail_id'])) { @@ -262,12 +257,14 @@ class CustomerMailRepository extends BaseRepository { if($customer_mail->reply_id){ $value->title = "E-Mail Antwort an Kunden senden"; $value->subtitle = "Dem Kunden wird eine E-Mail zugesendet, die im System als Antwort gespeichert wird."; + $value->customer_mail = $customer_mail; + } $value->s_placeholder = "Betreff der E-Mail"; $value->m_placeholder = "Nachricht der E-Mail"; $value->url = $data['url']; $value->customer_mail_dir = $customer_mail->dir ? $customer_mail->dir : 0; - $value->customer_mail_country = $customer_mail->travel_country_id ? $customer_mail->travel_country_id : 0; + $value->customer_mail_subdir = $customer_mail->subdir ? $customer_mail->subdir : 0; return view("customer.mail.modal-new-mail", compact('data', 'value'))->render(); @@ -307,7 +304,7 @@ class CustomerMailRepository extends BaseRepository { } $value->url = $data['url']; $value->customer_mail_dir = isset($data['customer_mail_dir']) ? $data['customer_mail_dir'] : 0; - $value->customer_mail_country = isset($data['customer_mail_country']) ? $data['customer_mail_country'] : 0; + $value->customer_mail_subdir = isset($data['customer_mail_subdir']) ? $data['customer_mail_subdir'] : 0; $value = self::prepareContactMails($value); return view("customer.mail.modal-new-mail", compact('data', 'value'))->render(); @@ -337,7 +334,7 @@ class CustomerMailRepository extends BaseRepository { $value->url = $data['url']; $value->show = 'reply'; $value->customer_mail_dir = isset($data['customer_mail_dir']) ? $data['customer_mail_dir'] : 0; - $value->customer_mail_country = isset($data['customer_mail_country']) ? $data['customer_mail_country'] : 0; + $value->customer_mail_subdir = isset($data['customer_mail_subdir']) ? $data['customer_mail_subdir'] : 0; $value = self::prepareContactMails($value); return view("customer.mail.modal-new-mail", compact('data', 'value'))->render(); diff --git a/app/Repositories/FileRepository.php b/app/Repositories/FileRepository.php index 8bbb7b1..0ddc8d8 100644 --- a/app/Repositories/FileRepository.php +++ b/app/Repositories/FileRepository.php @@ -23,6 +23,8 @@ class FileRepository extends BaseRepository { protected $mine; protected $size; + protected $redirect; + public function __construct(){ @@ -95,7 +97,7 @@ class FileRepository extends BaseRepository { 'file_data' => $this->extension, 'mine' => $this->mine, 'size' => $this->size, - 'redirect' => '', + 'redirect' => $this->redirect, 'code' => 200 ], 200); } diff --git a/app/Repositories/GeneralFileRepository.php b/app/Repositories/GeneralFileRepository.php new file mode 100644 index 0000000..7393c65 --- /dev/null +++ b/app/Repositories/GeneralFileRepository.php @@ -0,0 +1,51 @@ +model = $model; + } + + + public function save(){ + $this->general_file = GeneralFile::create([ + 'travel_country_id' => $this->travel_country_id, + 'identifier' => $this->identifier, + 'filename' => $this->allowed_filename, + 'dir' => $this->dir, + 'original_name' => $this->originalName, + 'ext' => $this->extension, + 'mine' => $this->mine, + 'size' => $this->size + ]); + } + + + public function response(){ + return Response::json([ + 'error' => false, + 'filename' => $this->allowed_filename, + 'file_id' =>$this->general_file->id, + 'file_data' => $this->extension, + 'file_icon' => $this->general_file->getIconExt(), + 'file_format_bytes' => $this->general_file->formatBytes(), + 'file_url' => $this->general_file->getURL(), + 'redirect' => $this->redirect, + 'code' => 200 + ], 200); + } + +} \ No newline at end of file diff --git a/app/Repositories/TravelUserBookingFewoRepository.php b/app/Repositories/TravelUserBookingFewoRepository.php index 9c63774..6e4f013 100644 --- a/app/Repositories/TravelUserBookingFewoRepository.php +++ b/app/Repositories/TravelUserBookingFewoRepository.php @@ -57,11 +57,9 @@ class TravelUserBookingFewoRepository extends BaseRepository { ]; $pdf = PDF::loadView('pdf.invoice_fewo', $data); $pdf->setPaper('A4', 'portrait'); - $path =$model->getInvoicePath(); $filename = $model->getInvoiceFileName(); $pdf->save($path.$filename); - return $path.$filename; //return $pdf->stream('invoice.pdf'); } diff --git a/app/Services/Booking.php b/app/Services/Booking.php new file mode 100644 index 0000000..d2d4e28 --- /dev/null +++ b/app/Services/Booking.php @@ -0,0 +1,80 @@ +get()->sortByDesc('pos')->pluck('slug', 'id'); + return $booking_email_files; + } + + + public static function getCustomerMailDirs(){ + $customer_mail_dirs = CMSContent::where('identifier', '=', 'customer-mail-dirs')->get()->sortBy('pos'); + return $customer_mail_dirs; + } + + + public static function getCustomerMailDir($id){ + return CMSContent::where('identifier', '=', 'customer-mail-dirs')->where('pos', '=', $id)->first(); + } + + public static function getCustomerMailName($customer_mail_dir, $mail_dir_id){ + + switch ($customer_mail_dir->getArrayContent('model')){ + case 'TravelCountry': + $model = \App\Models\Sym\TravelCountry::find($mail_dir_id); + break; + case 'Airline': + $model = Airline::find($mail_dir_id); + break; + case 'Insurance': + $model = Insurance::find($mail_dir_id); + break; + case 'TravelCompany': + $model = TravelCompany::find($mail_dir_id); + break; + default: + return ''; + } + + if($model){ + if($customer_mail_dir->getArrayContent('model') === 'TravelCountry'){ + return $model->mail_dir_name; + } + return $model->name; + } + return ""; + } + + public static function getCustomerMailEmails($customer_mail_dir, $mail_dir_id){ + + switch ($customer_mail_dir->getArrayContent('model')){ + case 'TravelCountry': + $model = \App\Models\Sym\TravelCountry::find($mail_dir_id); + break; + case 'Airline': + $model = Airline::find($mail_dir_id); + break; + case 'Insurance': + $model = Insurance::find($mail_dir_id); + break; + case 'TravelCompany': + $model = TravelCompany::find($mail_dir_id); + break; + default: + //direkt from CMSContent + return $customer_mail_dir->getArrayContent('emails'); + } + + if($model){ + return $model->contact_emails; + } + return []; + } +} \ No newline at end of file diff --git a/app/Services/BookingFewo.php b/app/Services/BookingFewo.php new file mode 100644 index 0000000..6158c98 --- /dev/null +++ b/app/Services/BookingFewo.php @@ -0,0 +1,79 @@ +get()->sortByDesc('pos')->pluck('slug', 'id'); + return $booking_email_files; + } + + public static function getCustomerMailDirs(){ + $customer_mail_dirs = CMSContent::where('identifier', '=', 'customer-fewo-mail-dirs')->get()->sortBy('pos'); + return $customer_mail_dirs; + } + + + public static function getCustomerMailDir($id){ + return CMSContent::where('identifier', '=', 'customer-fewo-mail-dirs')->where('pos', '=', $id)->first(); + } + + public static function getCustomerMailName($customer_mail_dir, $mail_dir_id){ + + switch ($customer_mail_dir->getArrayContent('model')){ + case 'TravelCountry': + $model = \App\Models\Sym\TravelCountry::find($mail_dir_id); + break; + case 'Airline': + $model = Airline::find($mail_dir_id); + break; + case 'Insurance': + $model = Insurance::find($mail_dir_id); + break; + case 'TravelCompany': + $model = TravelCompany::find($mail_dir_id); + break; + default: + return ''; + } + + if($model){ + if($customer_mail_dir->getArrayContent('model') === 'TravelCountry'){ + return $model->mail_dir_name; + } + return $model->name; + } + return ""; + } + + public static function getCustomerMailEmails($customer_mail_dir, $mail_dir_id){ + + switch ($customer_mail_dir->getArrayContent('model')){ + case 'TravelCountry': + $model = \App\Models\Sym\TravelCountry::find($mail_dir_id); + break; + case 'Airline': + $model = Airline::find($mail_dir_id); + break; + case 'Insurance': + $model = Insurance::find($mail_dir_id); + break; + case 'TravelCompany': + $model = TravelCompany::find($mail_dir_id); + break; + default: + //direkt from CMSContent + return $customer_mail_dir->getArrayContent('emails'); + } + + if($model){ + return $model->contact_emails; + } + return []; + } +} \ No newline at end of file diff --git a/app/Services/HTMLHelper.php b/app/Services/HTMLHelper.php index c997b3d..2462ae4 100644 --- a/app/Services/HTMLHelper.php +++ b/app/Services/HTMLHelper.php @@ -1,15 +1,17 @@ get(); + $ret = ''; + if($empty){ + $ret = '\n'; + } + foreach ($options as $option){ $attr = ($option->id === $id) ? 'selected="selected"' : ''; $ret .= '\n'; @@ -260,6 +267,33 @@ class HTMLHelper return $ret; } + public static function getCustomerMailDirsOptions(CMSContent $customer_mail_dir, $checked = []){ + //$checked = []; + $model = $customer_mail_dir->getArrayContent('model'); + switch ($model){ + case 'TravelCountry': + $options = \App\Models\Sym\TravelCountry::where('active_backend',1)->get(); + break; + case 'Airline': + $options = Airline::where('name_full', 'like', '%Xemail%')->get(); + break; + case 'Insurance': + $options = Insurance::where('active',1)->get(); + break; + case 'TravelCompany': + $options = TravelCompany::where('active',1)->get(); + break; + default: + return ''; + } + $ret = ''; + foreach ($options as $option){ + $attr = (in_array($option->id, $checked)) ? 'selected="selected"' : ''; + $ret .= '\n'; + } + return $ret; + } + public static function getFewoLodgingOptions($id = false){ $options = FewoLodging::all(); $ret = ''; diff --git a/app/Services/Placeholder.php b/app/Services/Placeholder.php index 7901bfe..8e87f1f 100644 --- a/app/Services/Placeholder.php +++ b/app/Services/Placeholder.php @@ -2,6 +2,7 @@ namespace App\Services; use App\Models\Booking; +use App\Models\TravelUserBookingFewo; class Placeholder { @@ -63,6 +64,32 @@ class Placeholder return $content; } + public static function replaceBookingFewo(TravelUserBookingFewo $booking_fewo, $content) + { + $dear = $booking_fewo->travel_user->salutation_id == 1 ? 'geehrter' : 'geehrte'; + $first_name = $booking_fewo->travel_user->first_name; + $last_name = $booking_fewo->travel_user->last_name; + $title = $booking_fewo->travel_user->title; + $country = ""; + $program = $booking_fewo->fewo_lodging_id ? $booking_fewo->fewo_lodging->name : "-"; + $salutation = $booking_fewo->travel_user->salutation_id == 1 ? 'Herr' : 'Frau'; + $start_date = $booking_fewo->from_date; + $end_date = $booking_fewo->to_date; + $booking_date = $booking_fewo->booking_date; + $airline = ""; + $search = []; + $replace = []; + + foreach (self::$booking as $key => $value) { + $search[] = $value; + $replace[] = ${$key}; + } + $content = str_replace($search, $replace, $content); + $content = preg_replace('/(.*?)<\/placeholder>/', '$1', $content); + $content = preg_replace('/(.*?)<\/span>/', '$1', $content); + return $content; + } + } \ No newline at end of file diff --git a/app/Services/Util.php b/app/Services/Util.php index f865752..71406cc 100644 --- a/app/Services/Util.php +++ b/app/Services/Util.php @@ -33,6 +33,13 @@ class Util return \Carbon::parse($date)->format(\Util::formatDateDB()); } + public static function _reformat_date($date, $to = 'date'){ + if($to === 'datetime'){ + return \Carbon::parse($date)->format('Y-m-d - H:i'); + } + return \Carbon::parse($date)->format('Y-m-d'); + } + public static function _format_number($value){ return preg_replace("/[^0-9,]/", "", $value); @@ -62,7 +69,7 @@ class Util if(is_array($value)){ return implode($glue, $value); } - return ""; + return $value; } public static function _clean_float($value){ @@ -191,5 +198,21 @@ class Util return isset($mime_types[$mine]) ? $mime_types[$mine] : ""; } + public static function getURLasContent($url, $base=false){ + $arrContextOptions=array( + "ssl"=>array( + "verify_peer"=>false, + "verify_peer_name"=>false, + ), + ); + $content = file_get_contents($url, false, stream_context_create($arrContextOptions)); + if($base){ + $type = pathinfo($url, PATHINFO_EXTENSION); + $base64Data = base64_encode($content); + return 'data:image/' . $type . ';base64,' . $base64Data; + } + return $content; + } + } \ No newline at end of file diff --git a/app/helpers.php b/app/helpers.php index aa1d409..3e36843 100644 --- a/app/helpers.php +++ b/app/helpers.php @@ -20,10 +20,16 @@ if (! function_exists('make_v2_url')) { if (! function_exists('_format_date')) { function _format_date($date, $to = 'date') { - return \App\Services\Util::_format_date($date, $to); + return $date ? \App\Services\Util::_format_date($date, $to) : null; } } +if (! function_exists('_reformat_date')) { + function _reformat_date($date, $to = 'date') + { + return $date ? \App\Services\Util::_reformat_date($date, $to) : null; + } +} if (! function_exists('array_to_json')) { function array_to_json($value) @@ -32,7 +38,6 @@ if (! function_exists('array_to_json')) { } } - if (! function_exists('last_array_element')) { function last_array_element($value) { @@ -86,4 +91,14 @@ if (! function_exists('get_file_last_time')) { } return date("Ymd-i", time()); } +} + +if (! function_exists('my_count')) { + function my_count($value) + { + if ($value && is_array($value)) { + return count($value); + } + return 0; + } } \ No newline at end of file diff --git a/bootstrap/cache/services.php b/bootstrap/cache/services.php index e76dc2f..753df9a 100755 --- a/bootstrap/cache/services.php +++ b/bootstrap/cache/services.php @@ -47,12 +47,13 @@ 43 => 'App\\Providers\\EventServiceProvider', 44 => 'App\\Providers\\RouteServiceProvider', 45 => 'Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider', - 46 => 'Jenssegers\\Date\\DateServiceProvider', - 47 => 'Collective\\Html\\HtmlServiceProvider', - 48 => 'Intervention\\Image\\ImageServiceProvider', - 49 => 'Maatwebsite\\Excel\\ExcelServiceProvider', - 50 => 'Yajra\\DataTables\\DataTablesServiceProvider', - 51 => 'Reliese\\Coders\\CodersServiceProvider', + 46 => 'Barryvdh\\DomPDF\\ServiceProvider', + 47 => 'Jenssegers\\Date\\DateServiceProvider', + 48 => 'Collective\\Html\\HtmlServiceProvider', + 49 => 'Intervention\\Image\\ImageServiceProvider', + 50 => 'Maatwebsite\\Excel\\ExcelServiceProvider', + 51 => 'Yajra\\DataTables\\DataTablesServiceProvider', + 52 => 'Reliese\\Coders\\CodersServiceProvider', ), 'eager' => array ( @@ -87,11 +88,12 @@ 28 => 'App\\Providers\\EventServiceProvider', 29 => 'App\\Providers\\RouteServiceProvider', 30 => 'Barryvdh\\LaravelIdeHelper\\IdeHelperServiceProvider', - 31 => 'Jenssegers\\Date\\DateServiceProvider', - 32 => 'Intervention\\Image\\ImageServiceProvider', - 33 => 'Maatwebsite\\Excel\\ExcelServiceProvider', - 34 => 'Yajra\\DataTables\\DataTablesServiceProvider', - 35 => 'Reliese\\Coders\\CodersServiceProvider', + 31 => 'Barryvdh\\DomPDF\\ServiceProvider', + 32 => 'Jenssegers\\Date\\DateServiceProvider', + 33 => 'Intervention\\Image\\ImageServiceProvider', + 34 => 'Maatwebsite\\Excel\\ExcelServiceProvider', + 35 => 'Yajra\\DataTables\\DataTablesServiceProvider', + 36 => 'Reliese\\Coders\\CodersServiceProvider', ), 'deferred' => array ( diff --git a/composer.lock b/composer.lock index f2f7758..217b9a7 100755 --- a/composer.lock +++ b/composer.lock @@ -375,16 +375,16 @@ }, { "name": "doctrine/dbal", - "version": "v2.10.1", + "version": "2.10.2", "source": { "type": "git", "url": "https://github.com/doctrine/dbal.git", - "reference": "c2b8e6e82732a64ecde1cddf9e1e06cb8556e3d8" + "reference": "aab745e7b6b2de3b47019da81e7225e14dcfdac8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/dbal/zipball/c2b8e6e82732a64ecde1cddf9e1e06cb8556e3d8", - "reference": "c2b8e6e82732a64ecde1cddf9e1e06cb8556e3d8", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/aab745e7b6b2de3b47019da81e7225e14dcfdac8", + "reference": "aab745e7b6b2de3b47019da81e7225e14dcfdac8", "shasum": "" }, "require": { @@ -396,9 +396,11 @@ "require-dev": { "doctrine/coding-standard": "^6.0", "jetbrains/phpstorm-stubs": "^2019.1", - "phpstan/phpstan": "^0.11.3", + "nikic/php-parser": "^4.4", + "phpstan/phpstan": "^0.12", "phpunit/phpunit": "^8.4.1", - "symfony/console": "^2.0.5|^3.0|^4.0|^5.0" + "symfony/console": "^2.0.5|^3.0|^4.0|^5.0", + "vimeo/psalm": "^3.11" }, "suggest": { "symfony/console": "For helpful console commands such as SQL execution and import of files." @@ -463,7 +465,21 @@ "sqlserver", "sqlsrv" ], - "time": "2020-01-04T12:56:21+00:00" + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Fdbal", + "type": "tidelift" + } + ], + "time": "2020-04-20T17:19:26+00:00" }, { "name": "doctrine/event-manager", @@ -543,33 +559,38 @@ }, { "name": "doctrine/inflector", - "version": "1.3.1", + "version": "1.4.1", "source": { "type": "git", "url": "https://github.com/doctrine/inflector.git", - "reference": "ec3a55242203ffa6a4b27c58176da97ff0a7aec1" + "reference": "4111f6853aea6f28b2b1dcfdde83d12dd3d5e6e3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/inflector/zipball/ec3a55242203ffa6a4b27c58176da97ff0a7aec1", - "reference": "ec3a55242203ffa6a4b27c58176da97ff0a7aec1", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/4111f6853aea6f28b2b1dcfdde83d12dd3d5e6e3", + "reference": "4111f6853aea6f28b2b1dcfdde83d12dd3d5e6e3", "shasum": "" }, "require": { - "php": "^7.1" + "php": "^7.2" }, "require-dev": { - "phpunit/phpunit": "^6.2" + "doctrine/coding-standard": "^7.0", + "phpstan/phpstan": "^0.11", + "phpstan/phpstan-phpunit": "^0.11", + "phpstan/phpstan-strict-rules": "^0.11", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { "psr-4": { - "Doctrine\\Common\\Inflector\\": "lib/Doctrine/Common/Inflector" + "Doctrine\\Common\\Inflector\\": "lib/Doctrine/Common/Inflector", + "Doctrine\\Inflector\\": "lib/Doctrine/Inflector" } }, "notification-url": "https://packagist.org/downloads/", @@ -598,15 +619,35 @@ "email": "schmittjoh@gmail.com" } ], - "description": "Common String Manipulations with regard to casing and singular/plural rules.", - "homepage": "http://www.doctrine-project.org", + "description": "PHP Doctrine Inflector is a small library that can perform string manipulations with regard to upper/lowercase and singular/plural forms of words.", + "homepage": "https://www.doctrine-project.org/projects/inflector.html", "keywords": [ "inflection", - "pluralize", - "singularize", - "string" + "inflector", + "lowercase", + "manipulation", + "php", + "plural", + "singular", + "strings", + "uppercase", + "words" ], - "time": "2019-10-30T19:59:35+00:00" + "funding": [ + { + "url": "https://www.doctrine-project.org/sponsorship.html", + "type": "custom" + }, + { + "url": "https://www.patreon.com/phpdoctrine", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finflector", + "type": "tidelift" + } + ], + "time": "2020-05-09T15:09:09+00:00" }, { "name": "doctrine/lexer", @@ -954,23 +995,24 @@ }, { "name": "guzzlehttp/guzzle", - "version": "6.5.2", + "version": "6.5.3", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "43ece0e75098b7ecd8d13918293029e555a50f82" + "reference": "aab4ebd862aa7d04f01a4b51849d657db56d882e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/43ece0e75098b7ecd8d13918293029e555a50f82", - "reference": "43ece0e75098b7ecd8d13918293029e555a50f82", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/aab4ebd862aa7d04f01a4b51849d657db56d882e", + "reference": "aab4ebd862aa7d04f01a4b51849d657db56d882e", "shasum": "" }, "require": { "ext-json": "*", "guzzlehttp/promises": "^1.0", "guzzlehttp/psr7": "^1.6.1", - "php": ">=5.5" + "php": ">=5.5", + "symfony/polyfill-intl-idn": "^1.11" }, "require-dev": { "ext-curl": "*", @@ -978,7 +1020,6 @@ "psr/log": "^1.1" }, "suggest": { - "ext-intl": "Required for Internationalized Domain Name (IDN) support", "psr/log": "Required for using the Log middleware" }, "type": "library", @@ -1017,7 +1058,7 @@ "rest", "web service" ], - "time": "2019-12-23T11:57:10+00:00" + "time": "2020-04-18T10:38:46+00:00" }, { "name": "guzzlehttp/promises", @@ -1285,25 +1326,23 @@ }, { "name": "jenssegers/date", - "version": "v3.5.0", + "version": "v4.0.0", "source": { "type": "git", "url": "https://github.com/jenssegers/date.git", - "reference": "58393b0544fc2525b3fcd02aa4c989857107e05a" + "reference": "506f86096e0b512f9ece6ad0ccae62b03c125771" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/jenssegers/date/zipball/58393b0544fc2525b3fcd02aa4c989857107e05a", - "reference": "58393b0544fc2525b3fcd02aa4c989857107e05a", + "url": "https://api.github.com/repos/jenssegers/date/zipball/506f86096e0b512f9ece6ad0ccae62b03c125771", + "reference": "506f86096e0b512f9ece6ad0ccae62b03c125771", "shasum": "" }, "require": { - "nesbot/carbon": "^1.0|^2.0", - "php": ">=5.6", - "symfony/translation": "^2.7|^3.0|^4.0" + "nesbot/carbon": "^2.16" }, "require-dev": { - "phpunit/phpunit": "^5.0|^6.0|^7.0", + "phpunit/phpunit": "^7.5", "satooshi/php-coveralls": "^2.0" }, "type": "library", @@ -1346,20 +1385,30 @@ "time", "translation" ], - "time": "2019-03-10T08:50:58+00:00" + "funding": [ + { + "url": "https://github.com/jenssegers", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/jenssegers/date", + "type": "tidelift" + } + ], + "time": "2020-04-28T06:35:54+00:00" }, { "name": "laminas/laminas-diactoros", - "version": "2.2.3", + "version": "2.3.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-diactoros.git", - "reference": "b596c7141f5093aefec94cb5e8745212299e290f" + "reference": "5ab185dba63ec655a2380c97711b09adc7061f89" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-diactoros/zipball/b596c7141f5093aefec94cb5e8745212299e290f", - "reference": "b596c7141f5093aefec94cb5e8745212299e290f", + "url": "https://api.github.com/repos/laminas/laminas-diactoros/zipball/5ab185dba63ec655a2380c97711b09adc7061f89", + "reference": "5ab185dba63ec655a2380c97711b09adc7061f89", "shasum": "" }, "require": { @@ -1390,9 +1439,12 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1.x-dev", - "dev-develop": "2.2.x-dev", - "dev-release-1.8": "1.8.x-dev" + "dev-master": "2.3.x-dev", + "dev-develop": "2.4.x-dev" + }, + "laminas": { + "config-provider": "Laminas\\Diactoros\\ConfigProvider", + "module": "Laminas\\Diactoros" } }, "autoload": { @@ -1430,7 +1482,13 @@ "psr", "psr-7" ], - "time": "2020-03-29T12:30:54+00:00" + "funding": [ + { + "url": "https://funding.communitybridge.org/projects/laminas-project", + "type": "community_bridge" + } + ], + "time": "2020-04-27T17:07:01+00:00" }, { "name": "laminas/laminas-zendframework-bridge", @@ -1546,16 +1604,16 @@ }, { "name": "laravel/framework", - "version": "v6.18.5", + "version": "v6.18.13", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "5b7f541a3c075b394793f4d7884a24ad6f00288a" + "reference": "39519d03237a81380e2126d667e898e2922db444" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/5b7f541a3c075b394793f4d7884a24ad6f00288a", - "reference": "5b7f541a3c075b394793f4d7884a24ad6f00288a", + "url": "https://api.github.com/repos/laravel/framework/zipball/39519d03237a81380e2126d667e898e2922db444", + "reference": "39519d03237a81380e2126d667e898e2922db444", "shasum": "" }, "require": { @@ -1688,7 +1746,7 @@ "framework", "laravel" ], - "time": "2020-04-07T18:54:55+00:00" + "time": "2020-05-05T15:53:49+00:00" }, { "name": "laravel/helpers", @@ -1745,21 +1803,21 @@ }, { "name": "laravel/passport", - "version": "v8.4.3", + "version": "v9.1.0", "source": { "type": "git", "url": "https://github.com/laravel/passport.git", - "reference": "edb9ccb9993ca98c7347da2fae20e1b8b4895f31" + "reference": "c274e928a9f43d517b9887446288d3129b1543f9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/passport/zipball/edb9ccb9993ca98c7347da2fae20e1b8b4895f31", - "reference": "edb9ccb9993ca98c7347da2fae20e1b8b4895f31", + "url": "https://api.github.com/repos/laravel/passport/zipball/c274e928a9f43d517b9887446288d3129b1543f9", + "reference": "c274e928a9f43d517b9887446288d3129b1543f9", "shasum": "" }, "require": { "ext-json": "*", - "firebase/php-jwt": "^3.0|^4.0|^5.0", + "firebase/php-jwt": "^5.0", "guzzlehttp/guzzle": "^6.0", "illuminate/auth": "^6.0|^7.0", "illuminate/console": "^6.0|^7.0", @@ -1771,7 +1829,7 @@ "illuminate/http": "^6.0|^7.0", "illuminate/support": "^6.0|^7.0", "laminas/laminas-diactoros": "^2.2", - "league/oauth2-server": "^8.0", + "league/oauth2-server": "^8.1", "nyholm/psr7": "^1.0", "php": "^7.2", "phpseclib/phpseclib": "^2.0", @@ -1785,7 +1843,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "8.x-dev" + "dev-master": "9.x-dev" }, "laravel": { "providers": [ @@ -1814,7 +1872,7 @@ "oauth", "passport" ], - "time": "2020-03-31T15:48:43+00:00" + "time": "2020-05-08T13:55:52+00:00" }, { "name": "laravel/tinker", @@ -2005,16 +2063,16 @@ }, { "name": "league/commonmark", - "version": "1.3.3", + "version": "1.4.3", "source": { "type": "git", "url": "https://github.com/thephpleague/commonmark.git", - "reference": "5a67afc2572ec6d430526cdc9c637ef124812389" + "reference": "412639f7cfbc0b31ad2455b2fe965095f66ae505" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/5a67afc2572ec6d430526cdc9c637ef124812389", - "reference": "5a67afc2572ec6d430526cdc9c637ef124812389", + "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/412639f7cfbc0b31ad2455b2fe965095f66ae505", + "reference": "412639f7cfbc0b31ad2455b2fe965095f66ae505", "shasum": "" }, "require": { @@ -2032,7 +2090,7 @@ "github/gfm": "0.29.0", "michelf/php-markdown": "~1.4", "mikehaertl/php-shellcommand": "^1.4", - "phpstan/phpstan-shim": "^0.11.5", + "phpstan/phpstan": "^0.12", "phpunit/phpunit": "^7.5", "scrutinizer/ocular": "^1.5", "symfony/finder": "^4.2" @@ -2076,6 +2134,18 @@ "parser" ], "funding": [ + { + "url": "https://enjoy.gitstore.app/repositories/thephpleague/commonmark", + "type": "custom" + }, + { + "url": "https://www.colinodell.com/sponsor", + "type": "custom" + }, + { + "url": "https://www.paypal.me/colinpodell/10.00", + "type": "custom" + }, { "url": "https://github.com/colinodell", "type": "github" @@ -2085,11 +2155,11 @@ "type": "patreon" }, { - "url": "https://tidelift.com/funding/github/packagist/league%2fcommonmark", + "url": "https://tidelift.com/funding/github/packagist/league/commonmark", "type": "tidelift" } ], - "time": "2020-04-05T16:01:48+00:00" + "time": "2020-05-04T22:15:21+00:00" }, { "name": "league/event", @@ -2143,16 +2213,16 @@ }, { "name": "league/flysystem", - "version": "1.0.66", + "version": "1.0.67", "source": { "type": "git", "url": "https://github.com/thephpleague/flysystem.git", - "reference": "021569195e15f8209b1c4bebb78bd66aa4f08c21" + "reference": "5b1f36c75c4bdde981294c2a0ebdb437ee6f275e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/021569195e15f8209b1c4bebb78bd66aa4f08c21", - "reference": "021569195e15f8209b1c4bebb78bd66aa4f08c21", + "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/5b1f36c75c4bdde981294c2a0ebdb437ee6f275e", + "reference": "5b1f36c75c4bdde981294c2a0ebdb437ee6f275e", "shasum": "" }, "require": { @@ -2229,20 +2299,20 @@ "type": "other" } ], - "time": "2020-03-17T18:58:12+00:00" + "time": "2020-04-16T13:21:26+00:00" }, { "name": "league/oauth2-server", - "version": "8.0.0", + "version": "8.1.0", "source": { "type": "git", "url": "https://github.com/thephpleague/oauth2-server.git", - "reference": "e1dc4d708c56fcfa205be4bb1862b6d525b4baac" + "reference": "b53d324f774eb782250f7d8973811a33a75ecdef" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/oauth2-server/zipball/e1dc4d708c56fcfa205be4bb1862b6d525b4baac", - "reference": "e1dc4d708c56fcfa205be4bb1862b6d525b4baac", + "url": "https://api.github.com/repos/thephpleague/oauth2-server/zipball/b53d324f774eb782250f7d8973811a33a75ecdef", + "reference": "b53d324f774eb782250f7d8973811a33a75ecdef", "shasum": "" }, "require": { @@ -2251,7 +2321,7 @@ "ext-openssl": "*", "lcobucci/jwt": "^3.3.1", "league/event": "^2.2", - "php": ">=7.1.0", + "php": ">=7.2.0", "psr/http-message": "^1.0.1" }, "replace": { @@ -2259,11 +2329,11 @@ "lncd/oauth2": "*" }, "require-dev": { - "phpstan/phpstan": "^0.11.8", + "laminas/laminas-diactoros": "^2.3.0", + "phpstan/phpstan": "^0.11.19", "phpstan/phpstan-phpunit": "^0.11.2", - "phpunit/phpunit": "^7.5.13 || ^8.2.3", - "roave/security-advisories": "dev-master", - "zendframework/zend-diactoros": "^2.1.2" + "phpunit/phpunit": "^8.5.4 || ^9.1.3", + "roave/security-advisories": "dev-master" }, "type": "library", "autoload": { @@ -2306,7 +2376,13 @@ "secure", "server" ], - "time": "2019-07-13T18:58:26+00:00" + "funding": [ + { + "url": "https://github.com/sephster", + "type": "github" + } + ], + "time": "2020-04-29T22:14:38+00:00" }, { "name": "maatwebsite/excel", @@ -2632,21 +2708,22 @@ }, { "name": "nesbot/carbon", - "version": "2.32.2", + "version": "2.33.0", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "f10e22cf546704fab1db4ad4b9dedbc5c797a0dc" + "reference": "4d93cb95a80d9ffbff4018fe58ae3b7dd7f4b99b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/f10e22cf546704fab1db4ad4b9dedbc5c797a0dc", - "reference": "f10e22cf546704fab1db4ad4b9dedbc5c797a0dc", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/4d93cb95a80d9ffbff4018fe58ae3b7dd7f4b99b", + "reference": "4d93cb95a80d9ffbff4018fe58ae3b7dd7f4b99b", "shasum": "" }, "require": { "ext-json": "*", "php": "^7.1.8 || ^8.0", + "symfony/polyfill-mbstring": "^1.0", "symfony/translation": "^3.4 || ^4.0 || ^5.0" }, "require-dev": { @@ -2709,20 +2786,20 @@ "type": "tidelift" } ], - "time": "2020-03-31T13:43:19+00:00" + "time": "2020-04-20T15:05:43+00:00" }, { "name": "nikic/php-parser", - "version": "v4.3.0", + "version": "v4.4.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "9a9981c347c5c49d6dfe5cf826bb882b824080dc" + "reference": "bd43ec7152eaaab3bd8c6d0aa95ceeb1df8ee120" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/9a9981c347c5c49d6dfe5cf826bb882b824080dc", - "reference": "9a9981c347c5c49d6dfe5cf826bb882b824080dc", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/bd43ec7152eaaab3bd8c6d0aa95ceeb1df8ee120", + "reference": "bd43ec7152eaaab3bd8c6d0aa95ceeb1df8ee120", "shasum": "" }, "require": { @@ -2761,7 +2838,7 @@ "parser", "php" ], - "time": "2019-11-08T13:50:10+00:00" + "time": "2020-04-10T16:34:50+00:00" }, { "name": "nyholm/psr7", @@ -2933,20 +3010,20 @@ }, { "name": "phenx/php-font-lib", - "version": "0.5.1", + "version": "0.5.2", "source": { "type": "git", "url": "https://github.com/PhenX/php-font-lib.git", - "reference": "760148820110a1ae0936e5cc35851e25a938bc97" + "reference": "ca6ad461f032145fff5971b5985e5af9e7fa88d8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PhenX/php-font-lib/zipball/760148820110a1ae0936e5cc35851e25a938bc97", - "reference": "760148820110a1ae0936e5cc35851e25a938bc97", + "url": "https://api.github.com/repos/PhenX/php-font-lib/zipball/ca6ad461f032145fff5971b5985e5af9e7fa88d8", + "reference": "ca6ad461f032145fff5971b5985e5af9e7fa88d8", "shasum": "" }, "require-dev": { - "phpunit/phpunit": "^4.8" + "phpunit/phpunit": "^4.8.35 || ^5 || ^6 || ^7" }, "type": "library", "autoload": { @@ -2966,7 +3043,7 @@ ], "description": "A library to read, parse, export and make subsets of different types of font files.", "homepage": "https://github.com/PhenX/php-font-lib", - "time": "2017-09-13T16:14:37+00:00" + "time": "2020-03-08T15:31:32+00:00" }, { "name": "phenx/php-svg-lib", @@ -3060,16 +3137,16 @@ }, { "name": "phpoffice/phpspreadsheet", - "version": "1.11.0", + "version": "1.12.0", "source": { "type": "git", "url": "https://github.com/PHPOffice/PhpSpreadsheet.git", - "reference": "c2a205e82f9cf1cc9fab86b79e808d86dd680470" + "reference": "f79611d6dc1f6b7e8e30b738fc371b392001dbfd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/c2a205e82f9cf1cc9fab86b79e808d86dd680470", - "reference": "c2a205e82f9cf1cc9fab86b79e808d86dd680470", + "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/f79611d6dc1f6b7e8e30b738fc371b392001dbfd", + "reference": "f79611d6dc1f6b7e8e30b738fc371b392001dbfd", "shasum": "" }, "require": { @@ -3149,7 +3226,7 @@ "xls", "xlsx" ], - "time": "2020-03-02T13:09:03+00:00" + "time": "2020-04-27T08:12:48+00:00" }, { "name": "phpoption/phpoption", @@ -3560,16 +3637,16 @@ }, { "name": "psy/psysh", - "version": "v0.10.3", + "version": "v0.10.4", "source": { "type": "git", "url": "https://github.com/bobthecow/psysh.git", - "reference": "2bde2fa03e05dff0aee834598b951d6fc7c6fe02" + "reference": "a8aec1b2981ab66882a01cce36a49b6317dc3560" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bobthecow/psysh/zipball/2bde2fa03e05dff0aee834598b951d6fc7c6fe02", - "reference": "2bde2fa03e05dff0aee834598b951d6fc7c6fe02", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/a8aec1b2981ab66882a01cce36a49b6317dc3560", + "reference": "a8aec1b2981ab66882a01cce36a49b6317dc3560", "shasum": "" }, "require": { @@ -3628,7 +3705,7 @@ "interactive", "shell" ], - "time": "2020-04-07T06:44:48+00:00" + "time": "2020-05-03T19:32:03+00:00" }, { "name": "ralouphie/getallheaders", @@ -3759,16 +3836,16 @@ }, { "name": "reliese/laravel", - "version": "v0.0.14", + "version": "v0.0.15", "source": { "type": "git", "url": "https://github.com/reliese/laravel.git", - "reference": "490d503836ca5e375c8d886cc2511c3b1ac43f71" + "reference": "2fe06849c7a96d17f245d5a9fff46081bf91e133" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/reliese/laravel/zipball/490d503836ca5e375c8d886cc2511c3b1ac43f71", - "reference": "490d503836ca5e375c8d886cc2511c3b1ac43f71", + "url": "https://api.github.com/repos/reliese/laravel/zipball/2fe06849c7a96d17f245d5a9fff46081bf91e133", + "reference": "2fe06849c7a96d17f245d5a9fff46081bf91e133", "shasum": "" }, "require": { @@ -3814,7 +3891,7 @@ "laravel", "reliese" ], - "time": "2019-12-26T23:35:33+00:00" + "time": "2020-03-14T21:38:59+00:00" }, { "name": "sabberworm/php-css-parser", @@ -3902,16 +3979,16 @@ }, { "name": "setasign/fpdi", - "version": "v2.3.2", + "version": "v2.3.3", "source": { "type": "git", "url": "https://github.com/Setasign/FPDI.git", - "reference": "527761458f504882ab844f15754523825647f291" + "reference": "50c388860a73191e010810ed57dbed795578e867" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Setasign/FPDI/zipball/527761458f504882ab844f15754523825647f291", - "reference": "527761458f504882ab844f15754523825647f291", + "url": "https://api.github.com/repos/Setasign/FPDI/zipball/50c388860a73191e010810ed57dbed795578e867", + "reference": "50c388860a73191e010810ed57dbed795578e867", "shasum": "" }, "require": { @@ -3965,7 +4042,7 @@ "type": "tidelift" } ], - "time": "2020-03-23T15:53:59+00:00" + "time": "2020-04-28T12:40:35+00:00" }, { "name": "swiftmailer/swiftmailer", @@ -4031,7 +4108,7 @@ }, { "name": "symfony/console", - "version": "v4.4.7", + "version": "v4.4.8", "source": { "type": "git", "url": "https://github.com/symfony/console.git", @@ -4121,7 +4198,7 @@ }, { "name": "symfony/css-selector", - "version": "v5.0.7", + "version": "v5.0.8", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", @@ -4188,7 +4265,7 @@ }, { "name": "symfony/debug", - "version": "v4.4.7", + "version": "v4.4.8", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", @@ -4258,7 +4335,7 @@ }, { "name": "symfony/error-handler", - "version": "v4.4.7", + "version": "v4.4.8", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", @@ -4328,7 +4405,7 @@ }, { "name": "symfony/event-dispatcher", - "version": "v4.4.7", + "version": "v4.4.8", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", @@ -4470,7 +4547,7 @@ }, { "name": "symfony/finder", - "version": "v4.4.7", + "version": "v4.4.8", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", @@ -4533,16 +4610,16 @@ }, { "name": "symfony/http-foundation", - "version": "v4.4.7", + "version": "v4.4.8", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "62f92509c9abfd1f73e17b8cf1b72c0bdac6611b" + "reference": "ec5bd254c223786f5fa2bb49a1e705c1b8e7cee2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/62f92509c9abfd1f73e17b8cf1b72c0bdac6611b", - "reference": "62f92509c9abfd1f73e17b8cf1b72c0bdac6611b", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/ec5bd254c223786f5fa2bb49a1e705c1b8e7cee2", + "reference": "ec5bd254c223786f5fa2bb49a1e705c1b8e7cee2", "shasum": "" }, "require": { @@ -4598,20 +4675,20 @@ "type": "tidelift" } ], - "time": "2020-03-30T14:07:33+00:00" + "time": "2020-04-18T20:40:08+00:00" }, { "name": "symfony/http-kernel", - "version": "v4.4.7", + "version": "v4.4.8", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "f356a489e51856b99908005eb7f2c51a1dfc95dc" + "reference": "1799a6c01f0db5851f399151abdb5d6393fec277" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/f356a489e51856b99908005eb7f2c51a1dfc95dc", - "reference": "f356a489e51856b99908005eb7f2c51a1dfc95dc", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/1799a6c01f0db5851f399151abdb5d6393fec277", + "reference": "1799a6c01f0db5851f399151abdb5d6393fec277", "shasum": "" }, "require": { @@ -4702,20 +4779,20 @@ "type": "tidelift" } ], - "time": "2020-03-30T14:59:15+00:00" + "time": "2020-04-28T18:47:42+00:00" }, { "name": "symfony/mime", - "version": "v5.0.7", + "version": "v5.0.8", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "481b7d6da88922fb1e0d86a943987722b08f3955" + "reference": "5d6c81c39225a750f3f43bee15f03093fb9aaa0b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/481b7d6da88922fb1e0d86a943987722b08f3955", - "reference": "481b7d6da88922fb1e0d86a943987722b08f3955", + "url": "https://api.github.com/repos/symfony/mime/zipball/5d6c81c39225a750f3f43bee15f03093fb9aaa0b", + "reference": "5d6c81c39225a750f3f43bee15f03093fb9aaa0b", "shasum": "" }, "require": { @@ -4778,20 +4855,20 @@ "type": "tidelift" } ], - "time": "2020-03-27T16:56:45+00:00" + "time": "2020-04-17T03:29:44+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.15.0", + "version": "v1.16.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "4719fa9c18b0464d399f1a63bf624b42b6fa8d14" + "reference": "1aab00e39cebaef4d8652497f46c15c1b7e45294" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/4719fa9c18b0464d399f1a63bf624b42b6fa8d14", - "reference": "4719fa9c18b0464d399f1a63bf624b42b6fa8d14", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/1aab00e39cebaef4d8652497f46c15c1b7e45294", + "reference": "1aab00e39cebaef4d8652497f46c15c1b7e45294", "shasum": "" }, "require": { @@ -4803,7 +4880,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.15-dev" + "dev-master": "1.16-dev" } }, "autoload": { @@ -4850,20 +4927,20 @@ "type": "tidelift" } ], - "time": "2020-02-27T09:26:54+00:00" + "time": "2020-05-08T16:50:20+00:00" }, { "name": "symfony/polyfill-iconv", - "version": "v1.15.0", + "version": "v1.16.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-iconv.git", - "reference": "ad6d62792bfbcfc385dd34b424d4fcf9712a32c8" + "reference": "d51debc1391a609c514f6f072dd59a61b461502a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/ad6d62792bfbcfc385dd34b424d4fcf9712a32c8", - "reference": "ad6d62792bfbcfc385dd34b424d4fcf9712a32c8", + "url": "https://api.github.com/repos/symfony/polyfill-iconv/zipball/d51debc1391a609c514f6f072dd59a61b461502a", + "reference": "d51debc1391a609c514f6f072dd59a61b461502a", "shasum": "" }, "require": { @@ -4875,7 +4952,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.15-dev" + "dev-master": "1.16-dev" } }, "autoload": { @@ -4923,20 +5000,20 @@ "type": "tidelift" } ], - "time": "2020-03-09T19:04:49+00:00" + "time": "2020-05-08T16:50:20+00:00" }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.15.0", + "version": "v1.16.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "47bd6aa45beb1cd7c6a16b7d1810133b728bdfcf" + "reference": "ab0af41deab94ec8dceb3d1fb408bdd038eba4dc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/47bd6aa45beb1cd7c6a16b7d1810133b728bdfcf", - "reference": "47bd6aa45beb1cd7c6a16b7d1810133b728bdfcf", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/ab0af41deab94ec8dceb3d1fb408bdd038eba4dc", + "reference": "ab0af41deab94ec8dceb3d1fb408bdd038eba4dc", "shasum": "" }, "require": { @@ -4950,7 +5027,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.15-dev" + "dev-master": "1.16-dev" } }, "autoload": { @@ -4999,20 +5076,20 @@ "type": "tidelift" } ], - "time": "2020-03-09T19:04:49+00:00" + "time": "2020-05-08T16:50:20+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.15.0", + "version": "v1.16.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "81ffd3a9c6d707be22e3012b827de1c9775fc5ac" + "reference": "a54881ec0ab3b2005c406aed0023c062879031e7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/81ffd3a9c6d707be22e3012b827de1c9775fc5ac", - "reference": "81ffd3a9c6d707be22e3012b827de1c9775fc5ac", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/a54881ec0ab3b2005c406aed0023c062879031e7", + "reference": "a54881ec0ab3b2005c406aed0023c062879031e7", "shasum": "" }, "require": { @@ -5024,7 +5101,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.15-dev" + "dev-master": "1.16-dev" } }, "autoload": { @@ -5072,20 +5149,20 @@ "type": "tidelift" } ], - "time": "2020-03-09T19:04:49+00:00" + "time": "2020-05-08T16:50:20+00:00" }, { "name": "symfony/polyfill-php72", - "version": "v1.15.0", + "version": "v1.16.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "37b0976c78b94856543260ce09b460a7bc852747" + "reference": "42fda6d7380e5c940d7f68341ccae89d5ab9963b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/37b0976c78b94856543260ce09b460a7bc852747", - "reference": "37b0976c78b94856543260ce09b460a7bc852747", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/42fda6d7380e5c940d7f68341ccae89d5ab9963b", + "reference": "42fda6d7380e5c940d7f68341ccae89d5ab9963b", "shasum": "" }, "require": { @@ -5094,7 +5171,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.15-dev" + "dev-master": "1.16-dev" } }, "autoload": { @@ -5141,20 +5218,20 @@ "type": "tidelift" } ], - "time": "2020-02-27T09:26:54+00:00" + "time": "2020-05-08T17:28:34+00:00" }, { "name": "symfony/polyfill-php73", - "version": "v1.15.0", + "version": "v1.16.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "0f27e9f464ea3da33cbe7ca3bdf4eb66def9d0f7" + "reference": "7e95fe59d12169fcf4041487e4bf34fca37ee0ed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/0f27e9f464ea3da33cbe7ca3bdf4eb66def9d0f7", - "reference": "0f27e9f464ea3da33cbe7ca3bdf4eb66def9d0f7", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/7e95fe59d12169fcf4041487e4bf34fca37ee0ed", + "reference": "7e95fe59d12169fcf4041487e4bf34fca37ee0ed", "shasum": "" }, "require": { @@ -5163,7 +5240,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.15-dev" + "dev-master": "1.16-dev" } }, "autoload": { @@ -5213,20 +5290,20 @@ "type": "tidelift" } ], - "time": "2020-02-27T09:26:54+00:00" + "time": "2020-05-02T14:56:09+00:00" }, { "name": "symfony/process", - "version": "v4.4.7", + "version": "v4.4.8", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "3e40e87a20eaf83a1db825e1fa5097ae89042db3" + "reference": "4b6a9a4013baa65d409153cbb5a895bf093dc7f4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/3e40e87a20eaf83a1db825e1fa5097ae89042db3", - "reference": "3e40e87a20eaf83a1db825e1fa5097ae89042db3", + "url": "https://api.github.com/repos/symfony/process/zipball/4b6a9a4013baa65d409153cbb5a895bf093dc7f4", + "reference": "4b6a9a4013baa65d409153cbb5a895bf093dc7f4", "shasum": "" }, "require": { @@ -5276,7 +5353,7 @@ "type": "tidelift" } ], - "time": "2020-03-27T16:54:36+00:00" + "time": "2020-04-15T15:56:18+00:00" }, { "name": "symfony/psr-http-message-bridge", @@ -5344,16 +5421,16 @@ }, { "name": "symfony/routing", - "version": "v4.4.7", + "version": "v4.4.8", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "0f562fa613e288d7dbae6c63abbc9b33ed75a8f8" + "reference": "67b4e1f99c050cbc310b8f3d0dbdc4b0212c052c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/0f562fa613e288d7dbae6c63abbc9b33ed75a8f8", - "reference": "0f562fa613e288d7dbae6c63abbc9b33ed75a8f8", + "url": "https://api.github.com/repos/symfony/routing/zipball/67b4e1f99c050cbc310b8f3d0dbdc4b0212c052c", + "reference": "67b4e1f99c050cbc310b8f3d0dbdc4b0212c052c", "shasum": "" }, "require": { @@ -5430,7 +5507,7 @@ "type": "tidelift" } ], - "time": "2020-03-30T11:41:10+00:00" + "time": "2020-04-21T19:59:53+00:00" }, { "name": "symfony/service-contracts", @@ -5492,16 +5569,16 @@ }, { "name": "symfony/translation", - "version": "v4.4.7", + "version": "v4.4.8", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "4e54d336f2eca5facad449d0b0118bb449375b76" + "reference": "8272bbd2b7e220ef812eba2a2b30068a5c64b191" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/4e54d336f2eca5facad449d0b0118bb449375b76", - "reference": "4e54d336f2eca5facad449d0b0118bb449375b76", + "url": "https://api.github.com/repos/symfony/translation/zipball/8272bbd2b7e220ef812eba2a2b30068a5c64b191", + "reference": "8272bbd2b7e220ef812eba2a2b30068a5c64b191", "shasum": "" }, "require": { @@ -5578,7 +5655,7 @@ "type": "tidelift" } ], - "time": "2020-03-27T16:54:36+00:00" + "time": "2020-04-12T16:45:36+00:00" }, { "name": "symfony/translation-contracts", @@ -5639,16 +5716,16 @@ }, { "name": "symfony/var-dumper", - "version": "v4.4.7", + "version": "v4.4.8", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "5a0c2d93006131a36cf6f767d10e2ca8333b0d4a" + "reference": "c587e04ce5d1aa62d534a038f574d9a709e814cf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/5a0c2d93006131a36cf6f767d10e2ca8333b0d4a", - "reference": "5a0c2d93006131a36cf6f767d10e2ca8333b0d4a", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/c587e04ce5d1aa62d534a038f574d9a709e814cf", + "reference": "c587e04ce5d1aa62d534a038f574d9a709e814cf", "shasum": "" }, "require": { @@ -5725,7 +5802,7 @@ "type": "tidelift" } ], - "time": "2020-03-27T16:54:36+00:00" + "time": "2020-04-12T16:14:02+00:00" }, { "name": "tijsverkoyen/css-to-inline-styles", @@ -5778,20 +5855,20 @@ }, { "name": "vlucas/phpdotenv", - "version": "v3.6.2", + "version": "v3.6.4", "source": { "type": "git", "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "786a947e57086cf236cefdee80784634224b99fa" + "reference": "10d3f853fdf1f3a6b3c7ea0c4620d2f699713db5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/786a947e57086cf236cefdee80784634224b99fa", - "reference": "786a947e57086cf236cefdee80784634224b99fa", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/10d3f853fdf1f3a6b3c7ea0c4620d2f699713db5", + "reference": "10d3f853fdf1f3a6b3c7ea0c4620d2f699713db5", "shasum": "" }, "require": { - "php": "^5.4 || ^7.0", + "php": "^5.4 || ^7.0 || ^8.0", "phpoption/phpoption": "^1.5", "symfony/polyfill-ctype": "^1.9" }, @@ -5838,25 +5915,29 @@ "environment" ], "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/vlucas/phpdotenv", "type": "tidelift" } ], - "time": "2020-03-27T23:36:02+00:00" + "time": "2020-05-02T13:46:13+00:00" }, { "name": "yajra/laravel-datatables-oracle", - "version": "v9.9.0", + "version": "v9.10.0", "source": { "type": "git", "url": "https://github.com/yajra/laravel-datatables.git", - "reference": "976e70a2f0b831725da335cd434a11ff73d3c854" + "reference": "b0b9e2c37b5a17ca35bb2c6d3927bf6176393229" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/yajra/laravel-datatables/zipball/976e70a2f0b831725da335cd434a11ff73d3c854", - "reference": "976e70a2f0b831725da335cd434a11ff73d3c854", + "url": "https://api.github.com/repos/yajra/laravel-datatables/zipball/b0b9e2c37b5a17ca35bb2c6d3927bf6176393229", + "reference": "b0b9e2c37b5a17ca35bb2c6d3927bf6176393229", "shasum": "" }, "require": { @@ -5924,22 +6005,22 @@ "type": "patreon" } ], - "time": "2020-03-03T16:29:31+00:00" + "time": "2020-04-23T01:21:11+00:00" } ], "packages-dev": [ { "name": "barryvdh/laravel-debugbar", - "version": "v3.2.9", + "version": "v3.3.3", "source": { "type": "git", "url": "https://github.com/barryvdh/laravel-debugbar.git", - "reference": "42d5da5379a7860093f8e4032167e4cb5ebec180" + "reference": "57f2219f6d9efe41ed1bc880d86701c52f261bf5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/42d5da5379a7860093f8e4032167e4cb5ebec180", - "reference": "42d5da5379a7860093f8e4032167e4cb5ebec180", + "url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/57f2219f6d9efe41ed1bc880d86701c52f261bf5", + "reference": "57f2219f6d9efe41ed1bc880d86701c52f261bf5", "shasum": "" }, "require": { @@ -5994,20 +6075,26 @@ "profiler", "webprofiler" ], - "time": "2020-02-25T20:42:23+00:00" + "funding": [ + { + "url": "https://github.com/barryvdh", + "type": "github" + } + ], + "time": "2020-05-05T10:53:32+00:00" }, { "name": "barryvdh/laravel-ide-helper", - "version": "v2.6.7", + "version": "v2.7.0", "source": { "type": "git", "url": "https://github.com/barryvdh/laravel-ide-helper.git", - "reference": "edd69c5e0508972c81f1f7173236de2459c45814" + "reference": "5f677edc14bdcfdcac36633e6eea71b2728a4dbc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/barryvdh/laravel-ide-helper/zipball/edd69c5e0508972c81f1f7173236de2459c45814", - "reference": "edd69c5e0508972c81f1f7173236de2459c45814", + "url": "https://api.github.com/repos/barryvdh/laravel-ide-helper/zipball/5f677edc14bdcfdcac36633e6eea71b2728a4dbc", + "reference": "5f677edc14bdcfdcac36633e6eea71b2728a4dbc", "shasum": "" }, "require": { @@ -6023,7 +6110,7 @@ "illuminate/config": "^5.5|^6|^7", "illuminate/view": "^5.5|^6|^7", "mockery/mockery": "^1.3", - "orchestra/testbench": "^3|^4", + "orchestra/testbench": "^3|^4|^5", "phpro/grumphp": "^0.17.1", "squizlabs/php_codesniffer": "^3" }, @@ -6065,7 +6152,13 @@ "phpstorm", "sublime" ], - "time": "2020-02-25T20:41:32+00:00" + "funding": [ + { + "url": "https://github.com/barryvdh", + "type": "github" + } + ], + "time": "2020-04-22T09:57:26+00:00" }, { "name": "barryvdh/reflection-docblock", @@ -6184,16 +6277,16 @@ }, { "name": "composer/composer", - "version": "1.10.1", + "version": "1.10.6", "source": { "type": "git", "url": "https://github.com/composer/composer.git", - "reference": "b912a45da3e2b22f5cb5a23e441b697a295ba011" + "reference": "be81b9c4735362c26876bdbfd3b5bc7e7f711c88" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/composer/zipball/b912a45da3e2b22f5cb5a23e441b697a295ba011", - "reference": "b912a45da3e2b22f5cb5a23e441b697a295ba011", + "url": "https://api.github.com/repos/composer/composer/zipball/be81b9c4735362c26876bdbfd3b5bc7e7f711c88", + "reference": "be81b9c4735362c26876bdbfd3b5bc7e7f711c88", "shasum": "" }, "require": { @@ -6212,7 +6305,8 @@ "symfony/process": "^2.7 || ^3.0 || ^4.0 || ^5.0" }, "conflict": { - "symfony/console": "2.8.38" + "symfony/console": "2.8.38", + "symfony/phpunit-bridge": "3.4.40" }, "require-dev": { "phpspec/prophecy": "^1.10", @@ -6270,7 +6364,7 @@ "type": "tidelift" } ], - "time": "2020-03-13T19:34:27+00:00" + "time": "2020-05-06T08:28:10+00:00" }, { "name": "composer/semver", @@ -6501,16 +6595,16 @@ }, { "name": "filp/whoops", - "version": "2.7.1", + "version": "2.7.2", "source": { "type": "git", "url": "https://github.com/filp/whoops.git", - "reference": "fff6f1e4f36be0e0d0b84d66b413d9dcb0c49130" + "reference": "17d0d3f266c8f925ebd035cd36f83cf802b47d4a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filp/whoops/zipball/fff6f1e4f36be0e0d0b84d66b413d9dcb0c49130", - "reference": "fff6f1e4f36be0e0d0b84d66b413d9dcb0c49130", + "url": "https://api.github.com/repos/filp/whoops/zipball/17d0d3f266c8f925ebd035cd36f83cf802b47d4a", + "reference": "17d0d3f266c8f925ebd035cd36f83cf802b47d4a", "shasum": "" }, "require": { @@ -6558,7 +6652,7 @@ "throwable", "whoops" ], - "time": "2020-01-15T10:00:00+00:00" + "time": "2020-05-05T12:28:07+00:00" }, { "name": "fzaninotto/faker", @@ -6816,16 +6910,16 @@ }, { "name": "maximebf/debugbar", - "version": "v1.16.1", + "version": "v1.16.3", "source": { "type": "git", "url": "https://github.com/maximebf/php-debugbar.git", - "reference": "58998b818c6567fac01e35b8a4b70c1a64530556" + "reference": "1a1605b8e9bacb34cc0c6278206d699772e1d372" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/58998b818c6567fac01e35b8a4b70c1a64530556", - "reference": "58998b818c6567fac01e35b8a4b70c1a64530556", + "url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/1a1605b8e9bacb34cc0c6278206d699772e1d372", + "reference": "1a1605b8e9bacb34cc0c6278206d699772e1d372", "shasum": "" }, "require": { @@ -6873,7 +6967,7 @@ "debug", "debugbar" ], - "time": "2019-11-24T09:46:11+00:00" + "time": "2020-05-06T07:06:27+00:00" }, { "name": "mockery/mockery", @@ -7156,24 +7250,21 @@ }, { "name": "phpdocumentor/reflection-common", - "version": "2.0.0", + "version": "2.1.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a" + "reference": "6568f4687e5b41b054365f9ae03fcb1ed5f2069b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/63a995caa1ca9e5590304cd845c15ad6d482a62a", - "reference": "63a995caa1ca9e5590304cd845c15ad6d482a62a", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/6568f4687e5b41b054365f9ae03fcb1ed5f2069b", + "reference": "6568f4687e5b41b054365f9ae03fcb1ed5f2069b", "shasum": "" }, "require": { "php": ">=7.1" }, - "require-dev": { - "phpunit/phpunit": "~6" - }, "type": "library", "extra": { "branch-alias": { @@ -7204,7 +7295,7 @@ "reflection", "static analysis" ], - "time": "2018-08-07T13:53:10+00:00" + "time": "2020-04-27T09:25:28+00:00" }, { "name": "phpdocumentor/reflection-docblock", @@ -7434,16 +7525,16 @@ }, { "name": "phpunit/php-file-iterator", - "version": "3.0.0", + "version": "3.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "354d4a5faa7449a377a18b94a2026ca3415e3d7a" + "reference": "4ac5b3e13df14829daa60a2eb4fdd2f2b7d33cf4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/354d4a5faa7449a377a18b94a2026ca3415e3d7a", - "reference": "354d4a5faa7449a377a18b94a2026ca3415e3d7a", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/4ac5b3e13df14829daa60a2eb4fdd2f2b7d33cf4", + "reference": "4ac5b3e13df14829daa60a2eb4fdd2f2b7d33cf4", "shasum": "" }, "require": { @@ -7480,7 +7571,13 @@ "filesystem", "iterator" ], - "time": "2020-02-07T06:05:22+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-04-18T05:02:12+00:00" }, { "name": "phpunit/php-invoker", @@ -7583,16 +7680,16 @@ }, { "name": "phpunit/php-timer", - "version": "3.0.0", + "version": "3.1.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "4118013a4d0f97356eae8e7fb2f6c6472575d1df" + "reference": "dc9368fae6ef2ffa57eba80a7410bcef81df6258" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/4118013a4d0f97356eae8e7fb2f6c6472575d1df", - "reference": "4118013a4d0f97356eae8e7fb2f6c6472575d1df", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/dc9368fae6ef2ffa57eba80a7410bcef81df6258", + "reference": "dc9368fae6ef2ffa57eba80a7410bcef81df6258", "shasum": "" }, "require": { @@ -7604,7 +7701,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "3.1-dev" } }, "autoload": { @@ -7628,20 +7725,26 @@ "keywords": [ "timer" ], - "time": "2020-02-07T06:08:11+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-04-20T06:00:37+00:00" }, { "name": "phpunit/php-token-stream", - "version": "4.0.0", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "b2560a0c33f7710e4d7f8780964193e8e8f8effe" + "reference": "cdc0db5aed8fbfaf475fbd95bfd7bab83c7a779c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/b2560a0c33f7710e4d7f8780964193e8e8f8effe", - "reference": "b2560a0c33f7710e4d7f8780964193e8e8f8effe", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/cdc0db5aed8fbfaf475fbd95bfd7bab83c7a779c", + "reference": "cdc0db5aed8fbfaf475fbd95bfd7bab83c7a779c", "shasum": "" }, "require": { @@ -7677,20 +7780,26 @@ "keywords": [ "tokenizer" ], - "time": "2020-02-07T06:19:00+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-05-06T09:56:31+00:00" }, { "name": "phpunit/phpunit", - "version": "9.1.1", + "version": "9.1.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "848f6521c906500e66229668768576d35de0227e" + "reference": "2d7080c622cf7884992e7c3cf87853877bae8ff4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/848f6521c906500e66229668768576d35de0227e", - "reference": "848f6521c906500e66229668768576d35de0227e", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/2d7080c622cf7884992e7c3cf87853877bae8ff4", + "reference": "2d7080c622cf7884992e7c3cf87853877bae8ff4", "shasum": "" }, "require": { @@ -7710,8 +7819,8 @@ "phpunit/php-file-iterator": "^3.0", "phpunit/php-invoker": "^3.0", "phpunit/php-text-template": "^2.0", - "phpunit/php-timer": "^3.0", - "sebastian/code-unit": "^1.0", + "phpunit/php-timer": "^3.1.4", + "sebastian/code-unit": "^1.0.2", "sebastian/comparator": "^4.0", "sebastian/diff": "^4.0", "sebastian/environment": "^5.0.1", @@ -7723,7 +7832,8 @@ "sebastian/version": "^3.0" }, "require-dev": { - "ext-pdo": "*" + "ext-pdo": "*", + "phpspec/prophecy-phpunit": "^2.0" }, "suggest": { "ext-soap": "*", @@ -7774,20 +7884,20 @@ "type": "github" } ], - "time": "2020-04-03T14:40:04+00:00" + "time": "2020-04-30T06:32:53+00:00" }, { "name": "sebastian/code-unit", - "version": "1.0.0", + "version": "1.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit.git", - "reference": "8d8f09bd47c75159921e6e84fdef146343962866" + "reference": "ac958085bc19fcd1d36425c781ef4cbb5b06e2a5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/8d8f09bd47c75159921e6e84fdef146343962866", - "reference": "8d8f09bd47c75159921e6e84fdef146343962866", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/ac958085bc19fcd1d36425c781ef4cbb5b06e2a5", + "reference": "ac958085bc19fcd1d36425c781ef4cbb5b06e2a5", "shasum": "" }, "require": { @@ -7826,7 +7936,7 @@ "type": "github" } ], - "time": "2020-03-30T11:59:20+00:00" + "time": "2020-04-30T05:58:10+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -7939,16 +8049,16 @@ }, { "name": "sebastian/diff", - "version": "4.0.0", + "version": "4.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "c0c26c9188b538bfa985ae10c9f05d278f12060d" + "reference": "3e523c576f29dacecff309f35e4cc5a5c168e78a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/c0c26c9188b538bfa985ae10c9f05d278f12060d", - "reference": "c0c26c9188b538bfa985ae10c9f05d278f12060d", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/3e523c576f29dacecff309f35e4cc5a5c168e78a", + "reference": "3e523c576f29dacecff309f35e4cc5a5c168e78a", "shasum": "" }, "require": { @@ -7956,7 +8066,7 @@ }, "require-dev": { "phpunit/phpunit": "^9.0", - "symfony/process": "^4 || ^5" + "symfony/process": "^4.2 || ^5" }, "type": "library", "extra": { @@ -7991,20 +8101,26 @@ "unidiff", "unified diff" ], - "time": "2020-02-07T06:09:38+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-05-08T05:01:12+00:00" }, { "name": "sebastian/environment", - "version": "5.0.2", + "version": "5.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "c39c1db0a5cffc98173f3de5a17d489d1043fd7b" + "reference": "c753f04d68cd489b6973cf9b4e505e191af3b05c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/c39c1db0a5cffc98173f3de5a17d489d1043fd7b", - "reference": "c39c1db0a5cffc98173f3de5a17d489d1043fd7b", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/c753f04d68cd489b6973cf9b4e505e191af3b05c", + "reference": "c753f04d68cd489b6973cf9b4e505e191af3b05c", "shasum": "" }, "require": { @@ -8050,7 +8166,7 @@ "type": "github" } ], - "time": "2020-03-31T12:14:15+00:00" + "time": "2020-04-14T13:36:52+00:00" }, { "name": "sebastian/exporter", @@ -8454,20 +8570,20 @@ }, { "name": "seld/jsonlint", - "version": "1.7.2", + "version": "1.8.0", "source": { "type": "git", "url": "https://github.com/Seldaek/jsonlint.git", - "reference": "e2e5d290e4d2a4f0eb449f510071392e00e10d19" + "reference": "ff2aa5420bfbc296cf6a0bc785fa5b35736de7c1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/e2e5d290e4d2a4f0eb449f510071392e00e10d19", - "reference": "e2e5d290e4d2a4f0eb449f510071392e00e10d19", + "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/ff2aa5420bfbc296cf6a0bc785fa5b35736de7c1", + "reference": "ff2aa5420bfbc296cf6a0bc785fa5b35736de7c1", "shasum": "" }, "require": { - "php": "^5.3 || ^7.0" + "php": "^5.3 || ^7.0 || ^8.0" }, "require-dev": { "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" @@ -8499,7 +8615,17 @@ "parser", "validator" ], - "time": "2019-10-24T14:27:39+00:00" + "funding": [ + { + "url": "https://github.com/Seldaek", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/seld/jsonlint", + "type": "tidelift" + } + ], + "time": "2020-04-30T19:05:18+00:00" }, { "name": "seld/phar-utils", @@ -8547,16 +8673,16 @@ }, { "name": "symfony/filesystem", - "version": "v5.0.7", + "version": "v5.0.8", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "ca3b87dd09fff9b771731637f5379965fbfab420" + "reference": "7cd0dafc4353a0f62e307df90b48466379c8cc91" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/ca3b87dd09fff9b771731637f5379965fbfab420", - "reference": "ca3b87dd09fff9b771731637f5379965fbfab420", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/7cd0dafc4353a0f62e307df90b48466379c8cc91", + "reference": "7cd0dafc4353a0f62e307df90b48466379c8cc91", "shasum": "" }, "require": { @@ -8607,7 +8733,7 @@ "type": "tidelift" } ], - "time": "2020-03-27T16:56:45+00:00" + "time": "2020-04-12T14:40:17+00:00" }, { "name": "theseer/tokenizer", @@ -8651,16 +8777,16 @@ }, { "name": "webmozart/assert", - "version": "1.7.0", + "version": "1.8.0", "source": { "type": "git", "url": "https://github.com/webmozart/assert.git", - "reference": "aed98a490f9a8f78468232db345ab9cf606cf598" + "reference": "ab2cb0b3b559010b75981b1bdce728da3ee90ad6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/aed98a490f9a8f78468232db345ab9cf606cf598", - "reference": "aed98a490f9a8f78468232db345ab9cf606cf598", + "url": "https://api.github.com/repos/webmozart/assert/zipball/ab2cb0b3b559010b75981b1bdce728da3ee90ad6", + "reference": "ab2cb0b3b559010b75981b1bdce728da3ee90ad6", "shasum": "" }, "require": { @@ -8668,7 +8794,7 @@ "symfony/polyfill-ctype": "^1.8" }, "conflict": { - "vimeo/psalm": "<3.6.0" + "vimeo/psalm": "<3.9.1" }, "require-dev": { "phpunit/phpunit": "^4.8.36 || ^7.5.13" @@ -8695,7 +8821,7 @@ "check", "validate" ], - "time": "2020-02-14T12:15:55+00:00" + "time": "2020-04-18T12:12:48+00:00" } ], "aliases": [], diff --git a/config/app.php b/config/app.php index 90b906a..dc6ffb0 100755 --- a/config/app.php +++ b/config/app.php @@ -172,6 +172,7 @@ return [ App\Providers\RouteServiceProvider::class, Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class, + Barryvdh\DomPDF\ServiceProvider::class, Jenssegers\Date\DateServiceProvider::class, Collective\Html\HtmlServiceProvider::class, Intervention\Image\ImageServiceProvider::class, @@ -239,6 +240,7 @@ return [ 'Util' => App\Services\Util::class, 'Excel' => Maatwebsite\Excel\Facades\Excel::class, 'DataTables' => Yajra\DataTables\Facades\DataTables::class, + 'PDF' => Barryvdh\DomPDF\Facade::class, ], diff --git a/config/booking.php b/config/booking.php new file mode 100755 index 0000000..ca5d8ed --- /dev/null +++ b/config/booking.php @@ -0,0 +1,5 @@ + env('APP_URL').'/storage/customer', 'visibility' => 'public', ], + 'travel_user' => [ + 'driver' => 'local', + 'root' => storage_path('app/travel_user'), + 'url' => env('APP_URL').'/storage/travel_user', + 'visibility' => 'public', + ], 'booking' => [ 'driver' => 'local', 'root' => storage_path('app/booking'), 'url' => env('APP_URL').'/storage/booking', 'visibility' => 'public', ], + 'general' => [ + 'driver' => 'local', + 'root' => storage_path('app/general'), + 'url' => env('APP_URL').'/storage/general', + 'visibility' => 'public', + ], + 'booking_fewo' => [ + 'driver' => 'local', + 'root' => storage_path('app/booking_fewo'), + 'url' => env('APP_URL').'/storage/booking_fewo', + 'visibility' => 'public', + ], 'fewo_invoices' => [ 'driver' => 'local', 'root' => storage_path('app/fewo/invoices'), diff --git a/config/permissions.php b/config/permissions.php index ec3986a..0057055 100755 --- a/config/permissions.php +++ b/config/permissions.php @@ -33,7 +33,7 @@ return [ 2 => [ 'sua-st' => ['name' => 'SUPERADMIN > Einstellungen' , 'color' => 'superadmin'], 'sua-st-al' => ['name' => 'SUPERADMIN > Einstellungen > Airline' , 'color' => 'superadmin'], - 'sua-st-et' => ['name' => 'SUPERADMIN > Einstellungen > E-Mail Vorlagen' , 'color' => 'superadmin'], + 'sua-st-em' => ['name' => 'SUPERADMIN > Einstellungen > E-Mails' , 'color' => 'superadmin'], 'sua-st-ke' => ['name' => 'SUPERADMIN > Einstellungen > Keywords' , 'color' => 'superadmin'], 'sua-st-sp' => ['name' => 'SUPERADMIN > Einstellungen > Leistungsträger' , 'color' => 'superadmin'], 'sua-st-tn' => ['name' => 'SUPERADMIN > Einstellungen > Nationalitäten' , 'color' => 'superadmin'], @@ -46,7 +46,6 @@ return [ 'sua-re-bo' => ['name' => 'SUPERADMIN > Export > Buchungen' , 'color' => 'superadmin'], 'sua-re-pp' => ['name' => 'SUPERADMIN > Export > Leistungsträger' , 'color' => 'superadmin'], 'sua-ur-rt' => ['name' => 'SUPERADMIN > User Rechte' , 'color' => 'danger'], - 'cms-cn-co' => ['name' => 'ADMIN CMS > Inhalte > Länder' , 'color' => 'secondary'], ], diff --git a/database/migrations/2018_10_29_193339_create_travel_country_table.php b/database/migrations/2018_10_29_193339_create_travel_country_table.php index b475472..35ac33f 100644 --- a/database/migrations/2018_10_29_193339_create_travel_country_table.php +++ b/database/migrations/2018_10_29_193339_create_travel_country_table.php @@ -21,13 +21,15 @@ class CreateTravelCountryTable extends Migration $table->string('name')->nullable(); $table->string('slug')->nullable(); - + $table->string('mail_dir_name')->nullable(); $table->text('html_information')->nullable(); $table->string('text_before')->nullable(); $table->string('text_after')->nullable(); $table->string('contact_lands')->nullable(); + $table->string('mail_dirs')->nullable(); + $table->string('contact_headline')->nullable(); $table->text('contact_text_1')->nullable(); $table->text('contact_text_2')->nullable(); diff --git a/database/migrations/2019_02_27_113516_create_c_m_s_contents_table.php b/database/migrations/2019_02_27_113516_create_c_m_s_contents_table.php index 2cfd802..a31e8b8 100644 --- a/database/migrations/2019_02_27_113516_create_c_m_s_contents_table.php +++ b/database/migrations/2019_02_27_113516_create_c_m_s_contents_table.php @@ -18,6 +18,7 @@ class CreateCMSContentsTable extends Migration $table->string('name'); $table->string('slug')->index()->unique(); + $table->string('identifier')->nullable()->index(); $table->string('field', 10)->index(); @@ -26,6 +27,9 @@ class CreateCMSContentsTable extends Migration $table->integer('integer')->nullable(); $table->decimal('decimal')->nullable(); + $table->unsignedTinyInteger('pos')->default(0); + + $table->timestamps(); }); } diff --git a/database/migrations/2020_03_11_131408_create_customer_mails_table.php b/database/migrations/2020_03_11_131408_create_customer_mails_table.php index 5a764d5..83bc399 100644 --- a/database/migrations/2020_03_11_131408_create_customer_mails_table.php +++ b/database/migrations/2020_03_11_131408_create_customer_mails_table.php @@ -33,12 +33,11 @@ class CreateCustomerMailsTable extends Migration $table->text('message')->nullable(); $table->unsignedTinyInteger('dir')->default(0); - $table->bigInteger('travel_country_id')->nullable(); + $table->bigInteger('subdir')->nullable(); $table->boolean('draft')->default(false); $table->boolean('important')->default(false); - $table->boolean('send')->default(false); $table->boolean('fail')->default(false); $table->text('error')->nullable(); @@ -64,12 +63,6 @@ class CreateCustomerMailsTable extends Migration $table->foreign('reply_id') ->references('id') ->on('customer_mails'); - - $table->foreign('travel_country_id') - ->references('id') - ->on('travel_country'); - - }); } diff --git a/database/migrations/2020_04_23_144837_create_email_template_dirs_table.php b/database/migrations/2020_04_23_144837_create_email_template_dirs_table.php new file mode 100644 index 0000000..291a562 --- /dev/null +++ b/database/migrations/2020_04_23_144837_create_email_template_dirs_table.php @@ -0,0 +1,35 @@ +increments('id'); + $table->string('name'); + $table->string('color', 10)->nullable(); + $table->boolean('active')->default(true); + $table->unsignedTinyInteger('pos')->default(0); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('email_template_dirs'); + } +} \ No newline at end of file diff --git a/database/migrations/2020_04_23_144838_create_email_templates_table.php b/database/migrations/2020_04_23_144838_create_email_templates_table.php index 0fb5a66..6de21dd 100644 --- a/database/migrations/2020_04_23_144838_create_email_templates_table.php +++ b/database/migrations/2020_04_23_144838_create_email_templates_table.php @@ -15,10 +15,16 @@ class CreateEmailTemplatesTable extends Migration { Schema::create('email_templates', function (Blueprint $table) { $table->bigIncrements('id'); - $table->string('subject', 255); + $table->unsignedInteger('email_template_dir_id')->nullable(); + $table->string('name', 255); + $table->string('subject', 255)->nullable(); $table->text('message')->nullable(); $table->boolean('active')->default(true); $table->timestamps(); + + $table->foreign('email_template_dir_id') + ->references('id') + ->on('email_template_dirs'); }); } diff --git a/database/migrations/2020_05_15_111351_create_customer_fewo_mails_table.php b/database/migrations/2020_05_15_111351_create_customer_fewo_mails_table.php new file mode 100644 index 0000000..cda393e --- /dev/null +++ b/database/migrations/2020_05_15_111351_create_customer_fewo_mails_table.php @@ -0,0 +1,74 @@ +create('customer_fewo_mails', function (Blueprint $table) { + $table->increments('id'); + + $table->unsignedInteger('travel_user_booking_fewo_id'); + $table->unsignedInteger('travel_user_id'); + + $table->boolean('is_answer')->default(false); + $table->unsignedInteger('reply_id'); + + $table->string('email', 255); + + $table->text('recipient')->nullable(); + $table->text('cc')->nullable(); + $table->text('bcc')->nullable(); + + $table->string('subject', 255); + $table->text('message')->nullable(); + + $table->unsignedTinyInteger('dir')->default(0); + $table->bigInteger('subdir')->nullable(); + + $table->boolean('draft')->default(false); + $table->boolean('important')->default(false); + + $table->boolean('send')->default(false); + $table->boolean('fail')->default(false); + $table->text('error')->nullable(); + + $table->timestamp('sent_at')->nullable(); + $table->timestamp('scheduled_at')->nullable(); + $table->timestamp('delivered_at')->nullable(); + + $table->timestamps(); + + $table->foreign('travel_user_booking_fewo_id') + ->references('id') + ->on('travel_user_booking_fewos'); + + $table->foreign('travel_user_id') + ->references('id') + ->on('travel_users'); + + $table->foreign('reply_id') + ->references('id') + ->on('customer_fewo_mails'); + + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::connection('mysql_stern')->dropIfExists('customer_fewo_mails'); + } +} diff --git a/database/migrations/2020_05_15_111435_create_customer_fewo_files_table.php b/database/migrations/2020_05_15_111435_create_customer_fewo_files_table.php new file mode 100644 index 0000000..2adea05 --- /dev/null +++ b/database/migrations/2020_05_15_111435_create_customer_fewo_files_table.php @@ -0,0 +1,50 @@ +create('customer_fewo_files', function (Blueprint $table) { + $table->increments('id'); + + $table->unsignedInteger('travel_user_id')->nullable(); + $table->unsignedInteger('customer_fewo_mail_id')->nullable(); + + $table->string('identifier')->index(); + $table->string('filename'); + $table->string('dir'); + $table->string('original_name'); + $table->string('ext'); + $table->string('mine'); + $table->unsignedInteger('size'); + $table->timestamps(); + + $table->foreign('travel_user_id') + ->references('id') + ->on('travel_users'); + + $table->foreign('customer_fewo_mail_id') + ->references('id') + ->on('customer_fewo_mails'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::connection('mysql_stern')->dropIfExists('customer_fewo_files'); + } +} diff --git a/database/migrations/2020_05_16_140222_create_travel_user_booking_files_table.php b/database/migrations/2020_05_16_140222_create_travel_user_booking_files_table.php new file mode 100644 index 0000000..7fe88b0 --- /dev/null +++ b/database/migrations/2020_05_16_140222_create_travel_user_booking_files_table.php @@ -0,0 +1,46 @@ +create('travel_user_booking_files', function (Blueprint $table) { + $table->increments('id'); + + $table->unsignedInteger('travel_user_booking_fewo_id')->nullable(); + + $table->string('identifier')->index(); + $table->string('filename'); + $table->string('dir'); + $table->string('original_name'); + $table->string('ext'); + $table->string('mine'); + $table->unsignedInteger('size'); + $table->timestamps(); + + $table->foreign('travel_user_booking_fewo_id') + ->references('id') + ->on('travel_user_booking_fewos'); + + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::connection('mysql_stern')->dropIfExists('travel_user_booking_files'); + } +} diff --git a/database/migrations/2020_05_20_131909_create_general_files_table.php b/database/migrations/2020_05_20_131909_create_general_files_table.php new file mode 100644 index 0000000..ad25bc8 --- /dev/null +++ b/database/migrations/2020_05_20_131909_create_general_files_table.php @@ -0,0 +1,42 @@ +increments('id'); + + $table->bigInteger('travel_country_id')->nullable(); + + $table->string('identifier')->index(); + $table->string('filename'); + $table->string('dir'); + $table->string('original_name'); + $table->string('ext'); + $table->string('mine'); + $table->unsignedInteger('size'); + $table->timestamps(); + + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('general_files'); + } +} \ No newline at end of file diff --git a/database/migrations/2020_05_28_112257_create_travel_country_services_table.php b/database/migrations/2020_05_28_112257_create_travel_country_services_table.php new file mode 100644 index 0000000..b4bc60e --- /dev/null +++ b/database/migrations/2020_05_28_112257_create_travel_country_services_table.php @@ -0,0 +1,41 @@ +increments('id'); + + $table->bigInteger('travel_country_id')->nullable()->index(); + $table->integer('crm_travel_country_id')->nullable(); + + $table->string('name')->nullable()->index(); + $table->text('description')->nullable(); + $table->boolean('active')->default(true); + $table->unsignedTinyInteger('pos')->default(0); + $table->timestamps(); + + + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('travel_country_services'); + } +} diff --git a/database/migrations/2020_05_28_112359_create_booking_country_services_table.php b/database/migrations/2020_05_28_112359_create_booking_country_services_table.php new file mode 100644 index 0000000..dec13de --- /dev/null +++ b/database/migrations/2020_05_28_112359_create_booking_country_services_table.php @@ -0,0 +1,45 @@ +bigIncrements('id'); + + $table->unsignedInteger('travel_country_service_id')->index(); + $table->bigInteger('booking_id')->index(); + + $table->unsignedTinyInteger('status')->default(0); + + $table->timestamps(); + + $table->foreign('travel_country_service_id', 'booking_country_services_tcsid') + ->references('id') + ->on('travel_country_services'); + + $table->foreign('booking_id') + ->references('id') + ->on('booking'); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('booking_travel_country_services'); + } +} diff --git a/database/migrations/sym/0001_sym_travel_country_table.php b/database/migrations/sym/0001_sym_travel_country_table.php index d71a302..777b8fb 100755 --- a/database/migrations/sym/0001_sym_travel_country_table.php +++ b/database/migrations/sym/0001_sym_travel_country_table.php @@ -8,7 +8,7 @@ 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 CreateSalutationTable extends Migration +class CreateTravelCountryTable extends Migration { /** * Run the migrations. @@ -17,13 +17,30 @@ class CreateSalutationTable extends Migration */ public function up() { - Schema::create('salutation', function (Blueprint $table) { + Schema::create('travel_country', function (Blueprint $table) { $table->bigIncrements('id'); $table->string('name', 255); + $table->string('mail_dir_name', 255)->nullable(); + $table->tinyInteger('is_customer_country')->nullable()->default(0); + $table->tinyInteger('active_backend')->nullable()->default(0); + $table->string('contact_lands', 255)->nullable(); + $table->string('mail_dirs', 255)->nullable(); + $table->string('contact_headline', 255)->nullable(); + $table->text('contact_text_1')->nullable(); + $table->text('contact_text_2')->nullable(); + $table->text('contact_text_3')->nullable(); + $table->text('contact_text_4')->nullable(); + $table->text('contact_footer')->nullable(); + $table->text('contact_emails')->nullable(); + + + }); + + } /** @@ -33,6 +50,6 @@ class CreateSalutationTable extends Migration */ public function down() { - Schema::dropIfExists('salutation'); + Schema::dropIfExists('travel_country'); } } diff --git a/database/migrations/sym/0002_sym_salutation_table.php b/database/migrations/sym/0002_sym_salutation_table.php index b862cde..68e84dd 100755 --- a/database/migrations/sym/0002_sym_salutation_table.php +++ b/database/migrations/sym/0002_sym_salutation_table.php @@ -8,7 +8,7 @@ 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 +class CreateSalutationTable extends Migration { /** * Run the migrations. @@ -17,13 +17,18 @@ class CreateTravelCountryTable extends Migration */ public function up() { - Schema::create('travel_country', function (Blueprint $table) { + Schema::create('salutation', 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); + + + + }); + + + } /** @@ -33,6 +38,6 @@ class CreateTravelCountryTable extends Migration */ public function down() { - Schema::dropIfExists('travel_country'); + Schema::dropIfExists('salutation'); } } diff --git a/public/css/application.css b/public/css/application.css index aa06248..5baef89 100644 --- a/public/css/application.css +++ b/public/css/application.css @@ -470,3 +470,44 @@ div.dropzone.dz-drag-hover { .ql-picker.ql-placeholder > span.ql-picker-options > span.ql-picker-item::before { content: attr(data-label); } + +.nav-tabs-top > .nav .nav-link{ + line-height: 1.3em; + background-color: rgba(24, 28, 33, 0.10); + border-color: rgba(24, 28, 33, 0.15); + +} +.nav-tabs-top > .nav .nav-link:hover{ + line-height: 1.3em; + border-color: rgba(24, 28, 33, 0.25); +} +.nav-tabs-top > .nav .nav-link.active { + color: #66500f; + background-color: #ffc926; + font-weight: bold; + border-color: rgba(24, 28, 33, 0.25); + +} +.nav-tabs-top > .nav { + padding-left: 0.25em; + padding-right: 0.25em; + +} +.nav-tabs-top > .tab-content { + border: none; +} +@media (min-width: 768px) { + #filter_email_templates_directory { + position: absolute;width: 50%;z-index: 999;margin-top: -5px; + } +} +.no-break { + white-space: nowrap; +} + +.card-header, +.card-footer, +.card hr { + border-color: rgba(24, 28, 33, 0.15); +} + diff --git a/public/css/stern_fewo_pdf.css b/public/css/stern_fewo_pdf.css index 0b9dec3..e45212c 100644 --- a/public/css/stern_fewo_pdf.css +++ b/public/css/stern_fewo_pdf.css @@ -10,15 +10,16 @@ body { padding: 0; color: #000; background: #fff; - font-size: 10pt; - line-height: 1.2em; + font-size: 9.5pt; + line-height: 1.15em; + font-family: Helvetica; } table { border: none; } strong { - font-weight: 600; + font-weight: bold; } @page { @@ -35,7 +36,7 @@ strong { } .font-weight-bold { - font-weight: 600; + font-weight: bold; } #logo_box { position: absolute; @@ -57,7 +58,7 @@ strong { width: 100mm; height: 45mm; z-index: 1; - font-size: 11pt; + font-size: 10pt; color:#000; } #address_box #address_back{ diff --git a/public/js/custom.js b/public/js/custom.js index 8a61b9e..d19e512 100644 --- a/public/js/custom.js +++ b/public/js/custom.js @@ -140,7 +140,7 @@ $(function () { $.each(button.data(), function(index, value){ data[index] = value; }); - //console.log(data); + // console.log(data); loadModalInner(this, data); }); @@ -173,7 +173,7 @@ $(function () { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') }, success: function(data) { - // console.log(data); + // console.log(data); $(data.response.target).find('.modal-dialog').html(data.html); $(data.response.target).find('.selectpicker').selectpicker('refresh'); initModalInner(); @@ -371,15 +371,25 @@ jQuery(document).ready(function() { }); }); -jQuery.each(jQuery('textarea.autoExpand'), function() { - var offset = this.offsetHeight - this.clientHeight; - var resizeTextarea = function(el) { +var resizeTextarea = function(el) { + if(el.scrollHeight > 0){ + var offset = el.offsetHeight - el.clientHeight; jQuery(el).css('height', 'auto').css('height', el.scrollHeight + offset); - }; - jQuery(this).on('keyup input', function() { resizeTextarea(this); }).removeClass('autoExpand'); + } + $(this).removeClass('autoExpand'); + +}; +jQuery.each(jQuery('textarea.autoExpand'), function() { + jQuery(this).on('keyup input', function() { resizeTextarea(this); }); + jQuery(this).on('focus input', function() { resizeTextarea(this); }); resizeTextarea(this); }); +jQuery('.collapse').on('shown.bs.collapse', function () { + $('#'+$(this).attr('id')).find('textarea.autoExpand').each(function () { + resizeTextarea(this); + }); +}) $(function() { $('.datepicker-range').datepicker({ @@ -392,7 +402,6 @@ $(function() { }); - $('.datepicker-base').datepicker({ calendarWeeks: true, todayBtn: 'linked', diff --git a/resources/views/admin/modal/country-service.blade.php b/resources/views/admin/modal/country-service.blade.php new file mode 100755 index 0000000..10ed8e5 --- /dev/null +++ b/resources/views/admin/modal/country-service.blade.php @@ -0,0 +1,36 @@ + + + diff --git a/resources/views/admin/modal/upload.blade.php b/resources/views/admin/modal/upload.blade.php new file mode 100755 index 0000000..2d81b6f --- /dev/null +++ b/resources/views/admin/modal/upload.blade.php @@ -0,0 +1,98 @@ + + + + + + + diff --git a/resources/views/booking/_detail_booking.blade.php b/resources/views/booking/_detail_booking.blade.php index c29eaee..9c8b42d 100755 --- a/resources/views/booking/_detail_booking.blade.php +++ b/resources/views/booking/_detail_booking.blade.php @@ -41,33 +41,94 @@ {{ Form::text('title', $booking->title, array('placeholder'=>__('Reisetitel'), 'class'=>'form-control', 'id'=>'title', 'readonly')) }} +
-
+
Status
+
+
+
+ + {{ Form::select('paying_out', \App\Models\Booking::$paying_out_types , $booking->paying_out, array('class'=>'custom-select', 'id'=>'paying_out' )) }} +
+
+ + {{ Form::select('paying_out_status', \App\Models\Booking::$paying_out_status_types , $booking->paying_out_status, array('class'=>'custom-select', 'id'=>'paying_out_status' )) }} +
+
+ + {{ Form::select('refund', \App\Models\Booking::$refund_types , $booking->refund, array('class'=>'custom-select', 'id'=>'refund' )) }} +
+
+ + {{ Form::text('refund_date', _format_date($booking->refund_date), array('placeholder'=>__('Refund Datum'), 'class'=>'form-control datepicker-base', 'id'=>'refund_date')) }} +
+
+ + {{ Form::select('xx_tkt', \App\Models\Booking::$xx_tkt_types , $booking->xx_tkt, array('class'=>'custom-select', 'id'=>'xx_tkt' )) }} +
+
+ + {{ Form::text('xx_tkt_date', _format_date($booking->xx_tkt_date), array('placeholder'=>__('XX TKT Datum'), 'class'=>'form-control datepicker-base', 'id'=>'xx_tkt_date')) }} +
+
+ + {{ Form::select('hold', \App\Models\Booking::$hold_types , $booking->hold, array('class'=>'custom-select', 'id'=>'hold' )) }} +
+
+ + {{ Form::select('airline_id', \App\Models\Airline::getAsNameIdArray() , $booking->airline_id, array('class'=>'custom-select', 'id'=>'airline_id' )) }} +
+
+ + {{ Form::text('filekey', $booking->filekey, array('placeholder'=>__('Filekey'), 'class'=>'form-control', 'id'=>'filekey')) }} +
+
+ + +
+
+ + {{ Form::text('lawyer_date', _format_date($booking->lawyer_date), array('placeholder'=>__('Anwaltsfrist'), 'class'=>'form-control datepicker-base', 'id'=>'lawyer_date')) }}
-
- - {{ Form::text('paying_out', $booking->getPayingOutType(), array('placeholder'=>__('K-Wunsch'), 'class'=>'form-control', 'id'=>'paying_out', 'readonly')) }} +
+ + {{ Form::text('notice', $booking->notice, array('placeholder'=>__('Bemerkung'), 'class'=>'form-control', 'id'=>'notice')) }}
-
- - {{ Form::text('paying_out_status', $booking->getPayingOutStatusType(), array('placeholder'=>__('KW-Status'), 'class'=>'form-control', 'id'=>'paying_out_status', 'readonly')) }} + +
+
Leistungen
+
-
- - {{ Form::text('refund', $booking->getRefundType(), array('placeholder'=>__('Refund'), 'class'=>'form-control', 'id'=>'refund', 'readonly')) }} -
-
- - {{ Form::text('refund_date', _format_date($booking->refund_date), array('placeholder'=>__('Refund Datum'), 'class'=>'form-control', 'id'=>'refund_date', 'readonly')) }} -
-
- - {{ Form::text('xx_tkt', $booking->getXxTktType(), array('placeholder'=>__('XX TKT'), 'class'=>'form-control', 'id'=>'xx_tkt', 'readonly')) }} -
-
- - {{ Form::text('xx_tkt_date', _format_date($booking->xx_tkt_date), array('placeholder'=>__('XX TKT Datum'), 'class'=>'form-control', 'id'=>'xx_tkt_date', 'readonly')) }} + + @foreach($booking->travel_country->getContactLandsModels() as $TravelCountry) + @if($TravelCountry->stern_travel_country) + @foreach($TravelCountry->stern_travel_country->travel_country_services as $travel_country_service) +
+ +
+ @endforeach + @endif + @endforeach + +
+
+
+   + {{ __('zur Übersicht') }} +
+
diff --git a/resources/views/booking/_detail_files.blade.php b/resources/views/booking/_detail_files.blade.php index 91e1bb8..3014cbf 100755 --- a/resources/views/booking/_detail_files.blade.php +++ b/resources/views/booking/_detail_files.blade.php @@ -180,27 +180,59 @@ @endforeach @endif - @if($security_certificate = \App\Models\CMSContent::getModelBySlug('sicherungsschein-nach-sis651r-pdf')) - - {{$booking_files_count++}} - - - {{$security_certificate->name}} - - - - {{ $security_certificate->formatBytes() }} - - {{\App\Services\Util::_format_date($security_certificate->created_at, 'date')}} - - - - - - - @endif + @foreach(\App\Services\Booking::contentFiles() as $content_file) + @if($file = \App\Models\CMSContent::getModelBySlug($content_file)) + + {{$booking_files_count++}} + + + {{$file->name}} + + + + @if(Auth::user()->isPermission('sua-st-em')) + E-Mails | + @endif + {{ $file->formatBytes() }} + + {{\App\Services\Util::_format_date($file->created_at, 'date')}} + + + + + + + @endif + @endforeach + @foreach($booking->travel_country->getContactLandsModels() as $TravelCountry) + @if($TravelCountry->stern_travel_country) + @foreach($TravelCountry->stern_travel_country->general_files as $general_files) + + {{$booking_files_count++}} + + + {{$general_files->original_name}} + + + + @if(Auth::user()->isPermission('sua-st-co')) + {{$TravelCountry->stern_travel_country->name }} | + @endif + {{ $general_files->mine }} | {{ $general_files->formatBytes() }} + + {{\App\Services\Util::_format_date($general_files->created_at, 'date')}} + + + + + + + @endforeach + @endif + @endforeach @if($booking->booking_files) @foreach($booking->booking_files as $booking_file) @@ -220,6 +252,8 @@ title="Download" data-placement="left" rel="tooltip"> + + @endforeach @@ -228,8 +262,15 @@
+
-
× @@ -44,40 +46,50 @@ + @foreach(\App\Services\Booking::getCustomerMailDirs() as $customer_mail_dir) + @php($badge = $customer_mail_dir->pos === 0 ? "badge-primary" : "badge-outline-primary") + +
+ {{$customer_mail_dir->name}} +
+
{{$booking->countCustomerMailsBy($customer_mail_dir->pos)}}
+
+ @foreach($booking->travel_country->getMailDirs($customer_mail_dir->pos) as $mail_dir_id) + @php ($mail_dir_name = \App\Services\Booking::getCustomerMailName($customer_mail_dir, $mail_dir_id)) + +
+ {{$mail_dir_name}} +
+
{{$booking->countCustomerMailsBy($customer_mail_dir->pos, $mail_dir_id)}}
+
+ @endforeach + @endforeach @foreach($booking::$customer_mail_dirs as $dir_id => $customer_mail_dir) - - @php($badge = $dir_id === 0 ? "badge-primary" : "badge-outline-primary") - +
{{$customer_mail_dir['name']}}
{{$booking->countCustomerMailsBy($dir_id)}}
- @if($dir_id === 1 && $booking->travel_country) - @foreach($booking->travel_country->getCountryLands() as $id => $name) - -
- {{$name}} -
-
{{$booking->countCustomerMailsBy($dir_id, $id)}}
-
- @endforeach - @endif @endforeach
@@ -110,7 +122,7 @@
- + diff --git a/resources/views/booking/detail.blade.php b/resources/views/booking/detail.blade.php index f7523c0..8fd0f58 100755 --- a/resources/views/booking/detail.blade.php +++ b/resources/views/booking/detail.blade.php @@ -3,14 +3,6 @@ @section('content') - ---}} - @@ -49,7 +50,9 @@ - - @endforeach @@ -68,12 +69,13 @@
- - - - - @endsection \ No newline at end of file diff --git a/resources/views/cms/content/all/modal.blade.php b/resources/views/cms/content/all/modal.blade.php index 819bb1f..c35f64d 100755 --- a/resources/views/cms/content/all/modal.blade.php +++ b/resources/views/cms/content/all/modal.blade.php @@ -1,7 +1,9 @@ -{!! Form::open(['url' => route('cms_content_all_store'), 'class' => 'modal-content', 'enctype' => 'multipart/form-data']) !!} +{!! Form::open(['url' => route('cms_content_all_store'), 'class' => 'modal-content', 'enctype' => 'multipart/form-data', 'id'=> 'cmsContentForm']) !!} + +
-
+
@endif
-
- +
+ {{ Form::text('slug', $value->slug, array('class'=>'form-control')) }}
+
+ + {{ Form::text('pos', $value->pos, array('class'=>'form-control')) }} +
@@ -107,24 +113,30 @@ $( document ).ready(function() { - $('div[class*="show-content"]').hide(); - $('.show-content-'+$('select[name="field"]').val()).show(); + $('#cmsContentForm div[class*="show-content"]').hide(); + $('#cmsContentForm .show-content-'+$('#cmsContentForm select[name="field"]').val()).show(); - $('select[name="field"]').on('change', function () { - $('div[class*="show-content"]').hide(); - $('.show-content-'+$(this).val()).show(); - if($(this).val() == 'file' && $('input[name="id"]').val() == 'new'){ + function cmsContentShowFileFields(){ + if($('#cmsContentForm select[name="field"]').val() === 'file' && $('#cmsContentForm input[name="id"]').val() === 'new'){ $('.show-field-slug').hide(); $('.show-field-name').hide(); }else{ $('.show-field-slug').show(); $('.show-field-name').show(); } + } + cmsContentShowFileFields(); + + $('#cmsContentForm select[name="field"]').on('change', function () { + $('#cmsContentForm div[class*="show-content"]').hide(); + $('#cmsContentForm .show-content-'+$(this).val()).show(); + cmsContentShowFileFields(); }); Dropzone.autoDiscover = false; - $("#fileUpload").dropzone({ + $("#fileUploadContentForm").dropzone({ url: "{{route('cms_content_all_store')}}", + params: {'identifier':'{{ $value->identifier }}','back':'{{$data['back'] }}'}, uploadMultiple: false, parallelUploads: 1, maxFilesize: 32, diff --git a/resources/views/cms/feedback/detail.blade.php b/resources/views/cms/feedback/detail.blade.php index 15231ce..14abaf8 100755 --- a/resources/views/cms/feedback/detail.blade.php +++ b/resources/views/cms/feedback/detail.blade.php @@ -61,7 +61,6 @@ -
@@ -80,7 +79,6 @@
-
  {{ __('back') }} diff --git a/resources/views/customer/mail/detail.blade.php b/resources/views/customer/mail/detail.blade.php index d319207..7736292 100755 --- a/resources/views/customer/mail/detail.blade.php +++ b/resources/views/customer/mail/detail.blade.php @@ -193,7 +193,7 @@
- {{$file->filename}} + {{$file->original_name}}
{{$file->formatBytes()}}
Vorschau   diff --git a/resources/views/customer/mail/modal-new-booking-files.blade.php b/resources/views/customer/mail/modal-new-booking-files.blade.php index 18bf012..991b1b9 100644 --- a/resources/views/customer/mail/modal-new-booking-files.blade.php +++ b/resources/views/customer/mail/modal-new-booking-files.blade.php @@ -154,27 +154,52 @@ @endforeach @endif - @if($security_certificate = \App\Models\CMSContent::getModelBySlug('sicherungsschein-nach-sis651r-pdf')) -
- - - - - - - @endif - + @foreach(\App\Services\Booking::contentFiles() as $content_file) + @if($file = \App\Models\CMSContent::getModelBySlug($content_file)) + + + + + + + + @endif + @endforeach + @foreach($booking->travel_country->getContactLandsModels() as $TravelCountry) + @if($TravelCountry->stern_travel_country) + @foreach($TravelCountry->stern_travel_country->general_files as $general_files) + + + + + + + + @endforeach + @endif + @endforeach @if($booking->booking_files) @foreach($booking->booking_files as $booking_file) diff --git a/resources/views/customer/mail/modal-new-mail.blade.php b/resources/views/customer/mail/modal-new-mail.blade.php index 806e009..10d1d34 100644 --- a/resources/views/customer/mail/modal-new-mail.blade.php +++ b/resources/views/customer/mail/modal-new-mail.blade.php @@ -130,8 +130,8 @@
@if($value->show === 'single' || $value->show === 'multi') - @if(Auth::user()->isPermission('sua-st-et')) - + @if(Auth::user()->isPermission('sua-st-em')) + @endif @endif
@@ -175,12 +175,21 @@

+ + +
{{__('Slug')}} {{__('Inhalt')}} {{__('Type')}}
@@ -58,9 +61,7 @@ {{ $value->slug }} @if($value->isFile()) {!! $value->getPreviewContent() !!} @else {{ $value->getPreviewContent() }} @endif {{ $value->getFieldName() }}
{{$booking_files_count++}} - - {{$security_certificate->name}} - - - {{ $security_certificate->formatBytes() }} - {{\App\Services\Util::_format_date($security_certificate->created_at, 'date')}} - -
{{$booking_files_count++}} + + {{$file->name}} + + + {{ $file->formatBytes() }} + {{\App\Services\Util::_format_date($file->created_at, 'date')}} + +
{{$booking_files_count++}} + + {{$general_files->original_name}} + + + {{ $general_files->mine }} | {{ $general_files->formatBytes() }} + {{\App\Services\Util::_format_date($general_files->created_at, 'date')}} + +
- + + @@ -197,23 +206,27 @@
- - + + @foreach($value->booking->travel_country->getMailDirs($customer_mail_dir->pos) as $mail_dir_id) + @php ($mail_dir_name = \App\Services\Booking::getCustomerMailName($customer_mail_dir, $mail_dir_id)) + @endforeach - @endif - + + @endif + @endforeach + @endif
@endif @@ -244,7 +257,7 @@
- {{$customer_file->filename}} + {{$customer_file->original_name}}
{{$customer_file->formatBytes()}}
Vorschau   @@ -320,22 +333,25 @@ $('#preview-mail-attachment').append(template); } - function change_dir_country_select(){ - //agentur - if($('#send_mail_dir').val() == 1){ - - $('#send_mail_country').prop('disabled', false); - }else{ - $('#send_mail_country').prop('disabled', true); - $('#send_mail_country').val(0); - } + function change_mail_subdir_select(){ + var $dir_id = $('#send_mail_dir').val(); + $('.send_mail_subdir').each(function () { + var send_mail_subdir = 'send_mail_subdir_' + $dir_id; + if($(this).attr('id') === send_mail_subdir){ + $(this).prop('disabled', false); + $(this).show(); + }else{ + $(this).prop('disabled', true); + $(this).val(0); + $(this).hide(); + } + }) } $(document).ready(function() { - - change_dir_country_select(); + change_mail_subdir_select(); $('#send_mail_dir').on('change', function () { - change_dir_country_select(); + change_mail_subdir_select(); }); if (!window.Quill) { $('#message-editor,#message-editor-toolbar').remove(); @@ -344,6 +360,7 @@ Quill.register('modules/placeholder', PlaceholderModule.default(Quill)) //$('#message-editor-fallback').remove(); var quill = new Quill('#message-editor', { + debug: 'error', modules: { toolbar: '#message-editor-toolbar', placeholder: { @@ -400,7 +417,6 @@ }); - var emailTempplateTable = $('#datatables-email-templates').DataTable({ "processing": true, "serverSide": true, @@ -408,10 +424,14 @@ "autoWidth": false, ajax: { url: '{!! route( 'email_template_data_table' ) !!}', + data: function(d) { + d.filter_email_templates_directory = $('select[name=filter_email_templates_directory]').val(); + } }, "columns": [ { data: 'id', width: '8%', searchable: true }, - { data: 'subject', name: 'subject', width: '', searchable: true }, + { data: 'name', name: 'name', width: '', searchable: true }, + { data: 'email_template_dir.name', name: 'email_template_dir.name', width: '25%', orderable: false, searchable: false }, { data: 'action', width: '8%', orderable: false, searchable: false}, ], "bLengthChange": false, @@ -428,6 +448,10 @@ }); } }); + $('#filter_email_templates_directory').on('change', function(){ + emailTempplateTable.draw(); + }); + function callback_email_template_data_table(data) { if(data.status === 'success'){ $('input#subject').val(data.response.subject + $('input#lead_title_id').val()); diff --git a/resources/views/customer/mail/modal-show-mail-inner.blade.php b/resources/views/customer/mail/modal-show-mail-inner.blade.php index 2821366..6a82b48 100644 --- a/resources/views/customer/mail/modal-show-mail-inner.blade.php +++ b/resources/views/customer/mail/modal-show-mail-inner.blade.php @@ -110,34 +110,40 @@
@endif - + @if(isset($show_move_dirs))
{!! Form::open(['url' => route('customer_mail_detail', [$customer_mail->id, 'move-mail']), 'class' => 'move-mail-form']) !!}
- - + @foreach(\App\Services\Booking::getCustomerMailDirs() as $customer_mail_dir) + @endforeach
- - + + + {{-- TODO load subdirs by pos id --}} + @if($customer_mail->booking->travel_country) + @foreach(\App\Services\Booking::getCustomerMailDirs() as $customer_mail_dir) + @if($customer_mail_dir->pos > 0) + + @endif + @endforeach + @endif
{!! Form::close() !!}
+ @endif
\ No newline at end of file diff --git a/resources/views/customer/mail/modal-show-mail.blade.php b/resources/views/customer/mail/modal-show-mail.blade.php index 2aa89ed..b9007b0 100644 --- a/resources/views/customer/mail/modal-show-mail.blade.php +++ b/resources/views/customer/mail/modal-show-mail.blade.php @@ -8,7 +8,7 @@ \ No newline at end of file diff --git a/resources/views/drafts/index.blade.php b/resources/views/drafts/index.blade.php index be10dfb..fc40f59 100755 --- a/resources/views/drafts/index.blade.php +++ b/resources/views/drafts/index.blade.php @@ -7,15 +7,15 @@
#{{__('Betreff')}}{{__('Vorlage Bezeichnung')}}{{__('Verzeichniss')}}  
@@ -71,9 +71,8 @@ -
@@ -122,7 +121,7 @@ @endforeach
-
+
- -
diff --git a/resources/views/layouts/application.blade.php b/resources/views/layouts/application.blade.php index 5443e7d..befc6dc 100755 --- a/resources/views/layouts/application.blade.php +++ b/resources/views/layouts/application.blade.php @@ -68,7 +68,7 @@ @yield('styles') - + @@ -158,7 +158,7 @@ - + @include('asset.js') @@ -229,8 +229,6 @@ $(document).ready(function() { - - $('.summernote').summernote({ height: 300, tabsize: 2, diff --git a/resources/views/layouts/includes/layout-sidenav.blade.php b/resources/views/layouts/includes/layout-sidenav.blade.php index 63fe989..8cf2bf1 100755 --- a/resources/views/layouts/includes/layout-sidenav.blade.php +++ b/resources/views/layouts/includes/layout-sidenav.blade.php @@ -214,9 +214,9 @@
{{ __('Airline') }}
@endif - @if(Auth::user()->isPermission('sua-st-et')) -
  • -
    {{ __('E-Mail Vorlagen') }}
    + @if(Auth::user()->isPermission('sua-st-em')) +
  • +
    {{ __('E-Mails') }}
  • @endif @if(Auth::user()->isPermission('sua-st-ke')) @@ -284,48 +284,11 @@ @endif - @if(Auth::user()->isPermission('sua-ur-rt'))
  • {{ __('User Rechte') }}
  • @endif - - - {{-- -
  • - -
    Tools
    -
    - -
  • - --}} - - - {{--
  • - - -
    Inhalte
    -
    - - -
  • - --}} - - @endif @if(Auth::user()->isSySAdmin()) diff --git a/resources/views/pdf/layout.blade.php b/resources/views/pdf/layout.blade.php index 288edac..1674076 100644 --- a/resources/views/pdf/layout.blade.php +++ b/resources/views/pdf/layout.blade.php @@ -1,15 +1,19 @@ + - {!! Html::style('css/stern_fewo_pdf.css') !!} +
    - + STERNTOURS
    + @yield('content') - --}} - - @endsection \ No newline at end of file diff --git a/resources/views/travel/user/booking/_detail_files.blade.php b/resources/views/travel/user/booking/_detail_files.blade.php new file mode 100755 index 0000000..56038d5 --- /dev/null +++ b/resources/views/travel/user/booking/_detail_files.blade.php @@ -0,0 +1,91 @@ + +
    + +
    + + @php($booking_files_count = 1) +
    +
    + + + + + + + + + + + + + @foreach(\App\Services\BookingFewo::contentFiles() as $content_file) + @if($file = \App\Models\CMSContent::getModelBySlug($content_file)) + + + + + + + + @endif + @endforeach + @if($travel_user_booking_fewo->booking_files) + @foreach($travel_user_booking_fewo->booking_files as $booking_file) + + + + + + + + @endforeach + @endif + +
    #DateiInhaltDatum 
    {{$booking_files_count++}} + + {{$file->name}} + + + {{ $file->formatBytes() }} + {{\App\Services\Util::_format_date($file->created_at, 'date')}} + + + +
    {{$booking_files_count++}} + + {{$booking_file->original_name}} + + + {{ $booking_file->mine }} | {{ $booking_file->formatBytes() }} + {{\App\Services\Util::_format_date($booking_file->created_at, 'date')}} + + + + + +
    + +
    + +
    + @if(Auth::user()->isPermission('sua-st-em')) + + @endif + +
    +
    +
    +
    + diff --git a/resources/views/travel/user/booking/form.blade.php b/resources/views/travel/user/booking/_detail_info.blade.php similarity index 55% rename from resources/views/travel/user/booking/form.blade.php rename to resources/views/travel/user/booking/_detail_info.blade.php index e62238d..1686a57 100755 --- a/resources/views/travel/user/booking/form.blade.php +++ b/resources/views/travel/user/booking/_detail_info.blade.php @@ -1,6 +1,10 @@ -
    -
    +
    + +
    +
    @@ -77,7 +81,6 @@
    -
    @if(isset($travel_user_booking_fewo->daily_prices)) @@ -159,12 +162,14 @@
    -
    + + {{--
    + --}}
    + + @foreach($filter_fewo_options as $id=>$name) + + @endforeach + +
    +
    + + +
    +
    + + + +
    +
    +
    +
    + + @@ -21,7 +52,7 @@ - + @@ -36,21 +67,27 @@ \ No newline at end of file diff --git a/resources/views/travel/user/booking/mail/modal-new-mail.blade.php b/resources/views/travel/user/booking/mail/modal-new-mail.blade.php new file mode 100644 index 0000000..06b86cf --- /dev/null +++ b/resources/views/travel/user/booking/mail/modal-new-mail.blade.php @@ -0,0 +1,512 @@ +
    {{__('bis')}} {{__('Eingetragen')}} {{__('Mails')}}{{__('Status')}}{{__('Kanal')}} {{__('Datum')}} {{__('R.-Nr.')}} {{__('delete')}}
    + + + + + + + + + + +
    #{{__('Vorlage Bezeichnung')}}{{__('Verzeichniss')}} 
    +
    +
    +
    +
    + @endif + @if($value->show === 'single' || $value->show === 'reply') +
    +
    + + +
    +
    + + {{-- TODO load subdirs by pos id --}} + {{-- @if(isset($value->booking)) + @foreach(\App\Services\Booking::getCustomerMailDirs() as $customer_mail_dir) + @if($customer_mail_dir->pos > 0) + + @endif + @endforeach + @endif + --}} +
    +
    + @endif + @if(isset($value->customer_mail)) + {{ Form::hidden('customer_mail_id', $value->customer_mail->id) }} + @endif +
    + {!! Form::close() !!} + +
    +
    + @if($value->show === 'single' && isset($value->booking)) + + @endif +
    Datei Anhänge
    +
    + @if($value->show === 'single' && isset($value->booking)) +
    + @include('travel.user.booking.mail.modal-new-booking-files', ['booking'=>$value->booking]) +
    + @endif +
    + +
    +
    + @if(isset($value->customer_files)) + @foreach($value->customer_files as $customer_file) +
    +
    +
    + {{$customer_file->original_name}} +
    {{$customer_file->formatBytes()}}
    +
    + Vorschau   + löschen +
    +
    +
    + @endforeach + @endif +
    +
    + {!! Form::open([ 'url' => route('customer_fewo_mail_upload_attachment', ['tmp']), 'method' => 'post', 'files' => true, 'enctype' => 'multipart/form-data', 'class' => 'dropzone', 'id' => 'uploadAttachmentFile' ]) !!} +
    + +
    + {!! Form::close() !!} +
    +
    + @if(isset($value->customer_mail)) +
    + @include('travel.user.booking.mail.modal-show-mail-inner', ['customer_mail' => $value->customer_mail]) + @endif +
    + +
    +
    +
    + +
    +
    + Vorschau   + entfernen +
    +
    +
    +
    + + + \ No newline at end of file diff --git a/resources/views/travel/user/booking/mail/modal-show-mail-inner.blade.php b/resources/views/travel/user/booking/mail/modal-show-mail-inner.blade.php new file mode 100644 index 0000000..16fb35d --- /dev/null +++ b/resources/views/travel/user/booking/mail/modal-show-mail-inner.blade.php @@ -0,0 +1,145 @@ + +
    + +
    + + + +
    + +
    + @if($customer_mail->is_answer) + Antwort von:
    + @else + Gesendet an:
    + @endif + <{{$customer_mail->email}}> {{$customer_mail->sent_at }} + @if($customer_mail->recipient) +
    TO: {{\App\Services\Util::_implodeLines($customer_mail->recipient, ', ')}}
    + @endif + @if($customer_mail->cc) +
    CC: {{\App\Services\Util::_implodeLines($customer_mail->cc, ', ')}}
    + @endif + @if($customer_mail->bcc) +
    BCC: {{\App\Services\Util::_implodeLines($customer_mail->bcc, ', ')}}
    + @endif +
    + + +
    {{$customer_mail->subject}}
    +
    +
    +
    + + {{-- +
    +
    + + + + + +
    + +
    + +
    |
    + +
    +
    +
    + + --}} +
    + {!! nl2br($customer_mail->message) !!} +
    +
    + + +
    + @if($customer_mail->customer) +

    Kunde: + {{ $customer_mail->customer->getSalutation() }} {{ $customer_mail->customer->title }} {{ $customer_mail->customer->firstname }} {{ $customer_mail->customer->name }} + @if($customer_mail->booking) + ({{$customer_mail->booking->id}})1 + @endif +

    + @endif + + @if($customer_mail->booking) +

    Buchung: + @if($value->booking->fewo_lodging_id) {{ $value->booking->fewo_lodging->name." | " }} @endif + ({{ $value->booking->id }}) +

    + @endif + + @if($customer_mail->send) + Mail gesendet +

    Datum: {{$customer_mail->sent_at}}

    + @endif + @if($customer_mail->fail) + Mail Fehler +

    {{$customer_mail->error }}

    + @endif +
    + + @if($customer_mail->customer_files) +
    +
    +
    Datei-Anhänge
    +
    + @foreach($customer_mail->customer_files as $file) +
    +
    +
    +
    + {{$file->original_name}} +
    {{$file->formatBytes()}}
    +
    + Vorschau   +
    +
    +
    +
    + @endforeach +
    +
    + @endif + @if(isset($show_move_dirs)) +
    +
    + {!! Form::open(['url' => route('customer_mail_detail', [$customer_mail->id, 'move-mail-fewo']), 'class' => 'move-mail-form']) !!} +
    +
    + + +
    +
    + + + + {{-- TODO load subdirs by pos id + @if($customer_mail->booking->travel_country) + @foreach(\App\Services\Booking::getCustomerMailDirs() as $customer_mail_dir) + @if($customer_mail_dir->pos > 0) + + @endif + @endforeach + @endif + --}} +
    +
    + {!! Form::close() !!} +
    + @endif +
    \ No newline at end of file diff --git a/resources/views/travel/user/booking/mail/modal-show-mail.blade.php b/resources/views/travel/user/booking/mail/modal-show-mail.blade.php new file mode 100644 index 0000000..eb8d5c4 --- /dev/null +++ b/resources/views/travel/user/booking/mail/modal-show-mail.blade.php @@ -0,0 +1,53 @@ + + + \ No newline at end of file diff --git a/resources/views/travel/user/booking/upload_modal.blade.php b/resources/views/travel/user/booking/upload_modal.blade.php new file mode 100755 index 0000000..774b4bc --- /dev/null +++ b/resources/views/travel/user/booking/upload_modal.blade.php @@ -0,0 +1,93 @@ + + + + + + + diff --git a/routes/web.php b/routes/web.php index 6ebcd12..9d6df1c 100755 --- a/routes/web.php +++ b/routes/web.php @@ -90,6 +90,8 @@ Route::group(['middleware' => ['auth']], function() Route::group(['middleware' => ['admin']], function() { + Route::post('/modal/load', 'ModalController@load')->name('modal_load'); + Route::post('/iq/content/modal/load', 'IQ\ContentModalController@load')->name('iq_content_modal_load'); //trees Route::get('/iq/content/tree/index', 'IQ\ContentTreeController@index')->name('iq_content_tree_index'); @@ -101,7 +103,7 @@ Route::group(['middleware' => ['admin']], function() Route::get('/iq/content/tree/repair/{id}', 'IQ\ContentTreeController@repair')->name('iq_content_tree_repair'); Route::post('/iq/content/modal/load', 'IQ\ContentModalController@load')->name('iq_content_modal_load'); - Route::post('/customer_mail//upload/attachment/{id}', 'CustomerMailController@uploadAttachment')->name('customer_mail_upload_attachment'); + Route::post('/customer_mail/upload/attachment/{id}', 'CustomerMailController@uploadAttachment')->name('customer_mail_upload_attachment'); Route::post('/customer_mail/send/mail', 'CustomerMailController@sendMail')->name('customer_mail_send_mail'); Route::post('/customer_mail/reply/mail', 'CustomerMailController@replyMail')->name('customer_mail_reply_mail'); Route::get('/customer_mail/data/table', 'CustomerMailController@getRequests')->name('customer_mail_data_table'); @@ -109,6 +111,15 @@ Route::group(['middleware' => ['admin']], function() Route::get('/customer_mail/delete/{id}', 'CustomerMailController@delete')->name('customer_mail_delete'); Route::post('customer_mail/ajax', 'CustomerMailController@ajax')->name('customer_mail_ajax'); + Route::post('/customer_fewo_mail/upload/attachment/{id}', 'CustomerFewoMailController@uploadAttachment')->name('customer_fewo_mail_upload_attachment'); + Route::post('/customer_fewo_mail/send/mail', 'CustomerFewoMailController@sendMail')->name('customer_fewo_mail_send_mail'); + Route::post('/customer_fewo_mail/reply/mail', 'CustomerFewoMailController@replyMail')->name('customer_fewo_mail_reply_mail'); + Route::get('/customer_fewo_mail/data/table', 'CustomerFewoMailController@getRequests')->name('customer_fewo_mail_data_table'); + Route::get('/email_fewo_template/data/table', 'CustomerFewoMailController@getEmailTemplates')->name('email_fewo_template_data_table'); + Route::get('/customer_fewo_mail/delete/{id}', 'CustomerFewoMailController@delete')->name('customer_fewo_mail_delete'); + Route::post('customer_fewo_mail/ajax', 'CustomerFewoMailController@ajax')->name('customer_fewo_mail_ajax'); + Route::post('/customer_fewo_mail/modal/load', 'CustomerFewoMailController@loadModal')->name('customer_fewo_modal_load'); + Route::group(['middleware' => ['auth.permission:cms-iq-assets']], function() { //assets @@ -166,6 +177,7 @@ Route::group(['middleware' => ['admin']], function() Route::get('/booking/draft_item/delete/{id}', 'BookingController@draftItemDelete')->name('booking_draft_item_delete'); Route::post('/booking/modal/load', 'BookingController@loadModal')->name('booking_modal_load'); Route::post('/booking/action/{action}/{id?}', 'BookingController@action')->name('booking_action'); + Route::get('/booking/delete/{id}/{del?}', 'BookingController@delete')->name('booking_delete'); }); Route::group(['middleware' => ['auth.permission:crm-bo-le']], function() { @@ -207,7 +219,7 @@ Route::group(['middleware' => ['admin']], function() Route::get('/data/table/travel_user_booking_fewos', 'TravelUserBookingFewoController@getTravelUserBookingFewos')->name('data_table_travel_user_booking_fewos'); Route::get('/travel_user_booking_fewo/detail/{id}', 'TravelUserBookingFewoController@detail')->name('travel_user_booking_fewo_detail'); Route::post('/travel_user_booking_fewo/detail/{id}', 'TravelUserBookingFewoController@store')->name('travel_user_booking_fewo_detail'); - Route::get('/travel_user_booking_fewo/delete/{id}', 'TravelUserBookingFewoController@delete')->name('travel_user_booking_fewo_delete'); + Route::get('/travel_user_booking_fewo/delete/{id}/{del?}', 'TravelUserBookingFewoController@delete')->name('travel_user_booking_fewo_delete'); }); Route::group(['middleware' => ['auth.permission:cms-cn-in']], function() { //CMS Infos @@ -279,12 +291,12 @@ Route::group(['middleware' => ['superadmin']], function() { Route::post('/admin/settings/airline/update', 'Settings\AirlineController@update')->name('admin_settings_airline_update'); Route::get('/admin/settings/airline/delete/{id}', 'Settings\AirlineController@delete')->name('admin_settings_airline_delete'); }); - Route::group(['middleware' => ['auth.permission:sua-st-et']], function() { + Route::group(['middleware' => ['auth.permission:sua-st-em']], function() { //SUPERADMIN > Einstellungen > E-Mail Vorlagen - Route::get('/admin/settings/email_template', 'Settings\EmailTemplateController@index')->name('admin_settings_email_template'); - Route::post('/admin/settings/email_template/load', 'Settings\EmailTemplateController@load')->name('admin_settings_email_template_load'); - Route::post('/admin/settings/email_template/update', 'Settings\EmailTemplateController@update')->name('admin_settings_email_template_update'); - Route::get('/admin/settings/email_template/delete/{id}', 'Settings\EmailTemplateController@delete')->name('admin_settings_email_template_delete'); + Route::get('/admin/settings/emails/{step?}', 'Settings\EmailsController@index')->name('admin_settings_emails'); + Route::post('/admin/settings/emails/load', 'Settings\EmailsController@load')->name('admin_settings_emails_load'); + Route::post('/admin/settings/emails/update', 'Settings\EmailsController@update')->name('admin_settings_emails_update'); + Route::get('/admin/settings/emails/delete/{id}', 'Settings\EmailsController@delete')->name('admin_settings_emails_delete'); }); Route::group(['middleware' => ['auth.permission:sua-st-ke']], function() { //SUPERADMIN > Einstellungen > Keywords @@ -319,9 +331,9 @@ Route::group(['middleware' => ['superadmin']], function() { Route::group(['middleware' => ['auth.permission:sua-st-co']], function() { //SUPERADMIN > Einstellungen > Reiseländer 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::get('/admin/settings/travel_country/detail/{id}/{step?}', 'Settings\TravelCountryController@detail')->name('admin_settings_travel_country_detail'); Route::post('/admin/settings/travel_country/update/{id}', 'Settings\TravelCountryController@update')->name('admin_settings_travel_country_update'); - Route::get('/admin/settings/travel_country/delete/{id}', 'Settings\TravelCountryController@delete')->name('admin_settings_travel_country_delete'); + Route::get('/admin/settings/travel_country/delete/{id}/{del?}', 'Settings\TravelCountryController@delete')->name('admin_settings_travel_country_delete'); }); Route::group(['middleware' => ['auth.permission:sua-st-bs']], function() { //SUPERADMIN > Einstellungen > Veranstalter diff --git a/storage/app/booking/files/2020/05/5ecfd762aa38a0.56412773_jackodurextrusionsstrang.jpg b/storage/app/booking/files/2020/05/5ecfd762aa38a0.56412773_jackodurextrusionsstrang.jpg new file mode 100644 index 0000000..2c7fd76 Binary files /dev/null and b/storage/app/booking/files/2020/05/5ecfd762aa38a0.56412773_jackodurextrusionsstrang.jpg differ diff --git a/storage/app/booking/files/2020/05/5ecfd762e89a97.23023265_jdatlastoollogo.png b/storage/app/booking/files/2020/05/5ecfd762e89a97.23023265_jdatlastoollogo.png new file mode 100644 index 0000000..6d4306f Binary files /dev/null and b/storage/app/booking/files/2020/05/5ecfd762e89a97.23023265_jdatlastoollogo.png differ diff --git a/storage/app/booking_fewo/files/2020/05/5ebfdb1ba22d59.38592238_jdatlastoollogo.png b/storage/app/booking_fewo/files/2020/05/5ebfdb1ba22d59.38592238_jdatlastoollogo.png new file mode 100644 index 0000000..6d4306f Binary files /dev/null and b/storage/app/booking_fewo/files/2020/05/5ebfdb1ba22d59.38592238_jdatlastoollogo.png differ diff --git a/storage/app/booking_fewo/files/2020/05/5ebfdb5d952323.95463407_muscat-sultan-qaboos-moschee-h1_k.jpg b/storage/app/booking_fewo/files/2020/05/5ebfdb5d952323.95463407_muscat-sultan-qaboos-moschee-h1_k.jpg new file mode 100644 index 0000000..bd8e291 Binary files /dev/null and b/storage/app/booking_fewo/files/2020/05/5ebfdb5d952323.95463407_muscat-sultan-qaboos-moschee-h1_k.jpg differ diff --git a/storage/app/customer/attachment/2020/05/5eb5345ca5de87.88438301_arb20190815.pdf b/storage/app/customer/attachment/2020/05/5eb5345ca5de87.88438301_arb20190815.pdf new file mode 100644 index 0000000..f98692e Binary files /dev/null and b/storage/app/customer/attachment/2020/05/5eb5345ca5de87.88438301_arb20190815.pdf differ diff --git a/storage/app/customer/attachment/2020/05/5eb953a1c209a0.17939907_arb20190815.pdf b/storage/app/customer/attachment/2020/05/5eb953a1c209a0.17939907_arb20190815.pdf new file mode 100644 index 0000000..f98692e Binary files /dev/null and b/storage/app/customer/attachment/2020/05/5eb953a1c209a0.17939907_arb20190815.pdf differ diff --git a/storage/app/customer/attachment/2020/05/5eb953a3eee0d4.85910050_sicherungsscheinnachsis651r.pdf b/storage/app/customer/attachment/2020/05/5eb953a3eee0d4.85910050_sicherungsscheinnachsis651r.pdf new file mode 100644 index 0000000..7cc1d5c Binary files /dev/null and b/storage/app/customer/attachment/2020/05/5eb953a3eee0d4.85910050_sicherungsscheinnachsis651r.pdf differ diff --git a/storage/app/customer/attachment/2020/05/5eb953a586abe9.14636744_gutschein2022585047591314.pdf b/storage/app/customer/attachment/2020/05/5eb953a586abe9.14636744_gutschein2022585047591314.pdf new file mode 100644 index 0000000..e90f8c2 Binary files /dev/null and b/storage/app/customer/attachment/2020/05/5eb953a586abe9.14636744_gutschein2022585047591314.pdf differ diff --git a/storage/app/customer/attachment/2020/05/5ebe7cafc91eb3.64758684_8.jpg b/storage/app/customer/attachment/2020/05/5ebe7cafc91eb3.64758684_8.jpg new file mode 100644 index 0000000..5f46042 Binary files /dev/null and b/storage/app/customer/attachment/2020/05/5ebe7cafc91eb3.64758684_8.jpg differ diff --git a/storage/app/customer/attachment/2020/05/5ebfc2a178f776.19101914_8.jpg b/storage/app/customer/attachment/2020/05/5ebfc2a178f776.19101914_8.jpg new file mode 100644 index 0000000..5f46042 Binary files /dev/null and b/storage/app/customer/attachment/2020/05/5ebfc2a178f776.19101914_8.jpg differ diff --git a/storage/app/customer/attachment/2020/05/5ec5300d90ac01.47787398_jdatlastoollogo.png b/storage/app/customer/attachment/2020/05/5ec5300d90ac01.47787398_jdatlastoollogo.png new file mode 100644 index 0000000..6d4306f Binary files /dev/null and b/storage/app/customer/attachment/2020/05/5ec5300d90ac01.47787398_jdatlastoollogo.png differ diff --git a/storage/app/customer/attachment/2020/05/5ec530720c7520.94997351_.html b/storage/app/customer/attachment/2020/05/5ec530720c7520.94997351_.html new file mode 100644 index 0000000..99fb01a --- /dev/null +++ b/storage/app/customer/attachment/2020/05/5ec530720c7520.94997351_.html @@ -0,0 +1,45 @@ + + + diff --git a/storage/app/customer/attachment/2020/05/5ec530a06604b5.06762823_.html b/storage/app/customer/attachment/2020/05/5ec530a06604b5.06762823_.html new file mode 100644 index 0000000..e67d817 --- /dev/null +++ b/storage/app/customer/attachment/2020/05/5ec530a06604b5.06762823_.html @@ -0,0 +1,45 @@ + + + diff --git a/storage/app/customer/attachment/2020/05/5ec530a2888c21.81994786_.html b/storage/app/customer/attachment/2020/05/5ec530a2888c21.81994786_.html new file mode 100644 index 0000000..493ab1f --- /dev/null +++ b/storage/app/customer/attachment/2020/05/5ec530a2888c21.81994786_.html @@ -0,0 +1,45 @@ + + + diff --git a/storage/app/customer/attachment/2020/05/5ec530b0cd1b45.60705604_sicherungsscheinnachsis651.html b/storage/app/customer/attachment/2020/05/5ec530b0cd1b45.60705604_sicherungsscheinnachsis651.html new file mode 100644 index 0000000..64b57af --- /dev/null +++ b/storage/app/customer/attachment/2020/05/5ec530b0cd1b45.60705604_sicherungsscheinnachsis651.html @@ -0,0 +1,45 @@ + + + diff --git a/storage/app/customer/attachment/2020/05/5ec530bea69b42.94459338_sicherungsscheinnachsis651.html b/storage/app/customer/attachment/2020/05/5ec530bea69b42.94459338_sicherungsscheinnachsis651.html new file mode 100644 index 0000000..1f268cf --- /dev/null +++ b/storage/app/customer/attachment/2020/05/5ec530bea69b42.94459338_sicherungsscheinnachsis651.html @@ -0,0 +1,45 @@ + + + diff --git a/storage/app/customer/attachment/2020/05/5ec530bf720f45.26590361_jdatlastoollogo.png b/storage/app/customer/attachment/2020/05/5ec530bf720f45.26590361_jdatlastoollogo.png new file mode 100644 index 0000000..6d4306f Binary files /dev/null and b/storage/app/customer/attachment/2020/05/5ec530bf720f45.26590361_jdatlastoollogo.png differ diff --git a/storage/app/customer/attachment/2020/05/5ec53165b27a66.41746967_sicherungsscheinnachsis651.html b/storage/app/customer/attachment/2020/05/5ec53165b27a66.41746967_sicherungsscheinnachsis651.html new file mode 100644 index 0000000..4a8c3a2 --- /dev/null +++ b/storage/app/customer/attachment/2020/05/5ec53165b27a66.41746967_sicherungsscheinnachsis651.html @@ -0,0 +1,45 @@ + + + diff --git a/storage/app/customer/attachment/2020/05/5ec532fba4cf49.14918444_sicherungsscheinnachsis651.html b/storage/app/customer/attachment/2020/05/5ec532fba4cf49.14918444_sicherungsscheinnachsis651.html new file mode 100644 index 0000000..493503e --- /dev/null +++ b/storage/app/customer/attachment/2020/05/5ec532fba4cf49.14918444_sicherungsscheinnachsis651.html @@ -0,0 +1,45 @@ + + + diff --git a/storage/app/customer/attachment/2020/05/5ec532fc65a9b7.06856731_jdatlastoollogo.png b/storage/app/customer/attachment/2020/05/5ec532fc65a9b7.06856731_jdatlastoollogo.png new file mode 100644 index 0000000..6d4306f Binary files /dev/null and b/storage/app/customer/attachment/2020/05/5ec532fc65a9b7.06856731_jdatlastoollogo.png differ diff --git a/storage/app/fewo/infos/2020/Anreiseinfo-10848.pdf b/storage/app/fewo/infos/2020/Anreiseinfo-10848.pdf new file mode 100644 index 0000000..ac46187 Binary files /dev/null and b/storage/app/fewo/infos/2020/Anreiseinfo-10848.pdf differ diff --git a/storage/app/fewo/invoices/2019/12345.pdf b/storage/app/fewo/invoices/2019/12345.pdf index 12ff515..420e453 100755 Binary files a/storage/app/fewo/invoices/2019/12345.pdf and b/storage/app/fewo/invoices/2019/12345.pdf differ diff --git a/storage/app/fewo/invoices/2020/10848.pdf b/storage/app/fewo/invoices/2020/10848.pdf new file mode 100644 index 0000000..94bedd5 Binary files /dev/null and b/storage/app/fewo/invoices/2020/10848.pdf differ diff --git a/storage/app/general/2020/05/5ec51b17d1da21.32961364_jdatlastoollogo.png b/storage/app/general/2020/05/5ec51b17d1da21.32961364_jdatlastoollogo.png new file mode 100644 index 0000000..6d4306f Binary files /dev/null and b/storage/app/general/2020/05/5ec51b17d1da21.32961364_jdatlastoollogo.png differ diff --git a/storage/app/general/2020/05/5ec51c02399ba4.58193608_the-easter-bunny-with-easter-eggs.jpg b/storage/app/general/2020/05/5ec51c02399ba4.58193608_the-easter-bunny-with-easter-eggs.jpg new file mode 100644 index 0000000..6017b6b Binary files /dev/null and b/storage/app/general/2020/05/5ec51c02399ba4.58193608_the-easter-bunny-with-easter-eggs.jpg differ diff --git a/storage/app/general/2020/05/5ec51c643b2398.58669480_ust111.pdf b/storage/app/general/2020/05/5ec51c643b2398.58669480_ust111.pdf new file mode 100644 index 0000000..9c22f8d Binary files /dev/null and b/storage/app/general/2020/05/5ec51c643b2398.58669480_ust111.pdf differ diff --git a/storage/app/public/cms_files/2020/05/5eb5320e7d1990.10675631_arb20190815.pdf b/storage/app/public/cms_files/2020/05/5eb5320e7d1990.10675631_arb20190815.pdf new file mode 100644 index 0000000..f98692e Binary files /dev/null and b/storage/app/public/cms_files/2020/05/5eb5320e7d1990.10675631_arb20190815.pdf differ diff --git a/storage/app/public/cms_files/2020/05/5eb92c7f54cbc9.72843966_jdatlastoollogo.png b/storage/app/public/cms_files/2020/05/5eb92c7f54cbc9.72843966_jdatlastoollogo.png new file mode 100644 index 0000000..6d4306f Binary files /dev/null and b/storage/app/public/cms_files/2020/05/5eb92c7f54cbc9.72843966_jdatlastoollogo.png differ diff --git a/storage/app/public/cms_files/2020/05/5eb935c79e7808.39271407_jdatlastoollogo.png b/storage/app/public/cms_files/2020/05/5eb935c79e7808.39271407_jdatlastoollogo.png new file mode 100644 index 0000000..6d4306f Binary files /dev/null and b/storage/app/public/cms_files/2020/05/5eb935c79e7808.39271407_jdatlastoollogo.png differ diff --git a/storage/app/public/cms_files/2020/05/5eb950427e3795.55847896_jdatlastoollogo.png b/storage/app/public/cms_files/2020/05/5eb950427e3795.55847896_jdatlastoollogo.png new file mode 100644 index 0000000..6d4306f Binary files /dev/null and b/storage/app/public/cms_files/2020/05/5eb950427e3795.55847896_jdatlastoollogo.png differ diff --git a/storage/app/public/cms_files/2020/05/5ebe665cd98ca1.76107546_8.jpg b/storage/app/public/cms_files/2020/05/5ebe665cd98ca1.76107546_8.jpg new file mode 100644 index 0000000..5f46042 Binary files /dev/null and b/storage/app/public/cms_files/2020/05/5ebe665cd98ca1.76107546_8.jpg differ diff --git a/storage/app/travel_user/attachment/2020/05/5ebfc46e0ff3c0.14228313_8.jpg b/storage/app/travel_user/attachment/2020/05/5ebfc46e0ff3c0.14228313_8.jpg new file mode 100644 index 0000000..5f46042 Binary files /dev/null and b/storage/app/travel_user/attachment/2020/05/5ebfc46e0ff3c0.14228313_8.jpg differ diff --git a/storage/app/travel_user/attachment/2020/05/5ebfc49a63c465.01874505_8.jpg b/storage/app/travel_user/attachment/2020/05/5ebfc49a63c465.01874505_8.jpg new file mode 100644 index 0000000..5f46042 Binary files /dev/null and b/storage/app/travel_user/attachment/2020/05/5ebfc49a63c465.01874505_8.jpg differ diff --git a/storage/app/travel_user/attachment/2020/05/5ebfc6754af358.11706766_jdatlastoollogo.png b/storage/app/travel_user/attachment/2020/05/5ebfc6754af358.11706766_jdatlastoollogo.png new file mode 100644 index 0000000..6d4306f Binary files /dev/null and b/storage/app/travel_user/attachment/2020/05/5ebfc6754af358.11706766_jdatlastoollogo.png differ diff --git a/storage/app/travel_user/attachment/2020/05/5ebfc6a83aaa03.48156108_8.jpg b/storage/app/travel_user/attachment/2020/05/5ebfc6a83aaa03.48156108_8.jpg new file mode 100644 index 0000000..5f46042 Binary files /dev/null and b/storage/app/travel_user/attachment/2020/05/5ebfc6a83aaa03.48156108_8.jpg differ diff --git a/storage/app/travel_user/attachment/2020/05/5ebfdc2163c6f3.61031669_jdatlastoollogo.png b/storage/app/travel_user/attachment/2020/05/5ebfdc2163c6f3.61031669_jdatlastoollogo.png new file mode 100644 index 0000000..6d4306f Binary files /dev/null and b/storage/app/travel_user/attachment/2020/05/5ebfdc2163c6f3.61031669_jdatlastoollogo.png differ diff --git a/storage/app/travel_user/attachment/2020/05/5ebfdc9a5508f1.82637218_jdatlastoollogo.png b/storage/app/travel_user/attachment/2020/05/5ebfdc9a5508f1.82637218_jdatlastoollogo.png new file mode 100644 index 0000000..6d4306f Binary files /dev/null and b/storage/app/travel_user/attachment/2020/05/5ebfdc9a5508f1.82637218_jdatlastoollogo.png differ diff --git a/storage/app/travel_user/attachment/2020/05/5ebfdc9b61abc4.55465946_muscat-sultan-qaboos-moschee-h1_k.jpg b/storage/app/travel_user/attachment/2020/05/5ebfdc9b61abc4.55465946_muscat-sultan-qaboos-moschee-h1_k.jpg new file mode 100644 index 0000000..bd8e291 Binary files /dev/null and b/storage/app/travel_user/attachment/2020/05/5ebfdc9b61abc4.55465946_muscat-sultan-qaboos-moschee-h1_k.jpg differ diff --git a/storage/app/travel_user/attachment/2020/05/5ec53110cfd978.74599082_8.jpg b/storage/app/travel_user/attachment/2020/05/5ec53110cfd978.74599082_8.jpg new file mode 100644 index 0000000..5f46042 Binary files /dev/null and b/storage/app/travel_user/attachment/2020/05/5ec53110cfd978.74599082_8.jpg differ