Mails, Strono, filter

This commit is contained in:
Kevin Adametz 2020-03-26 09:48:19 +01:00
parent f53f17f9c1
commit 62e84637b6
99 changed files with 2409 additions and 474 deletions

8
.env
View file

@ -23,11 +23,11 @@ LOG_CHANNEL=stack
#DB_PASSWORD=KT32vQ7
# on neptune
DB_CONNECTION=mysql
DB_HOST=192.168.1.7
DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=cmssso_db1
DB_USERNAME=cmssso_1
DB_PASSWORD=ZXk8Udm8
DB_USERNAME=root
DB_PASSWORD=KT32vQ7
DB_CONNECTION_STERN=mysql
@ -54,7 +54,7 @@ MAIL_FEWO_EMPLOYEE=kevin@adametz.media
#MAIL_FEWO_EMPLOYEE=katrin.nikolai@stern-tours.de,gerda.fritsch@stern-tours.de
#MAIL_BBC=kontakt@stern-tours.de,thomas.stern@stern-tours.de
MAIL_FROM_ADDRESS=info@mein.sterntours.de
MAIL_FROM_NAME=Mein Reisebüro STERN TOURS
MAIL_FROM_NAME="Mein Reisebüro STERN TOURS"
MAIL_DRIVER=smtp
MAIL_HOST=mail.your-server.de
MAIL_PORT=587

188
.idea/workspace.xml generated
View file

@ -2,15 +2,11 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="e1ac1cea-a1a5-4c16-b5f0-5908c7d368de" name="Default Changelist" comment="">
<change afterPath="$PROJECT_DIR$/app/Http/Controllers/CustomerController.php" afterDir="false" />
<change afterPath="$PROJECT_DIR$/app/Http/Controllers/CustomerMailController.php" afterDir="false" />
<change afterPath="$PROJECT_DIR$/app/Http/Controllers/LeadController.php" afterDir="false" />
<change afterPath="$PROJECT_DIR$/app/Mail/MailSendInfo.php" afterDir="false" />
<change afterPath="$PROJECT_DIR$/app/Models/CustomerMail.php" afterDir="false" />
<change afterPath="$PROJECT_DIR$/app/Repositories/CustomerMailRepository.php" afterDir="false" />
<change afterPath="$PROJECT_DIR$/app/Repositories/CustomerRepository.php" afterDir="false" />
<change afterPath="$PROJECT_DIR$/app/Repositories/LeadRepository.php" afterDir="false" />
<change afterPath="$PROJECT_DIR$/database/migrations/2020_03_11_131408_create_customer_mails_table.php" afterDir="false" />
<change afterPath="$PROJECT_DIR$/app/Http/Controllers/Settings/BookingStatusController.php" afterDir="false" />
<change afterPath="$PROJECT_DIR$/app/Models/CustomerFile.php" afterDir="false" />
<change afterPath="$PROJECT_DIR$/app/Repositories/FileRepository.php" afterDir="false" />
<change afterPath="$PROJECT_DIR$/database/migrations/2020_03_19_152708_create_booking_storno_table.php" afterDir="false" />
<change afterPath="$PROJECT_DIR$/database/migrations/2020_03_23_151608_create_customer_files_table.php" afterDir="false" />
<change afterPath="$PROJECT_DIR$/packages/iqcontent/laravel-filemanager/database/migrations/2019_08_05_171716_create_i_q_content_folders_table.php" afterDir="false" />
<change afterPath="$PROJECT_DIR$/packages/iqcontent/laravel-filemanager/database/migrations/2019_08_05_171717_create_i_q_content_files_table.php" afterDir="false" />
<change afterPath="$PROJECT_DIR$/packages/iqcontent/laravel-filemanager/database/migrations/2019_08_05_171718_create_i_q_content_categories_table.php" afterDir="false" />
@ -30,27 +26,90 @@
<change afterPath="$PROJECT_DIR$/packages/iqcontent/laravel-filemanager/src/views/colors.blade.php" afterDir="false" />
<change afterPath="$PROJECT_DIR$/packages/iqcontent/laravel-filemanager/src/views/file.blade.php" afterDir="false" />
<change afterPath="$PROJECT_DIR$/packages/iqcontent/laravel-filemanager/src/views/move-item.blade.php" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resources/views/customer/detail.blade.php" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resources/views/customer/index.blade.php" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resources/views/customer/mail/detail.blade.php" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resources/views/customer/mail/index.blade.php" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resources/views/emails/header.blade.php" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resources/views/lead/detail.blade.php" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resources/views/lead/index.blade.php" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resources/views/request/modal-mail.blade.php" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resources/views/customer/mail/modal-new-mail.blade.php" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resources/views/customer/mail/modal-show-mail-inner.blade.php" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resources/views/customer/mail/modal-show-mail.blade.php" afterDir="false" />
<change afterPath="$PROJECT_DIR$/resources/views/settings/status/index.blade.php" afterDir="false" />
<change afterPath="$PROJECT_DIR$/storage/app/customer/attachment/2020/03/5e78e1ac59cc0_ust111.pdf" afterDir="false" />
<change afterPath="$PROJECT_DIR$/storage/app/customer/attachment/2020/03/5e78e1ae88686_ustvadezember.pdf" afterDir="false" />
<change afterPath="$PROJECT_DIR$/storage/app/customer/attachment/2020/03/5e78e1ef84dc1_mcwebartworkqrg181130.pdf" afterDir="false" />
<change afterPath="$PROJECT_DIR$/storage/app/customer/attachment/2020/03/5e78e1f2d7c2e_payoneplatformtestdataen.pdf" afterDir="false" />
<change afterPath="$PROJECT_DIR$/storage/app/customer/attachment/2020/03/5e7b225b0ed62_jdatlastoollogo.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/storage/app/customer/attachment/2020/03/5e7b3644bf721_wlogo.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/storage/app/customer/attachment/2020/03/5e7b492402436_jdatlastoollogo.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/storage/app/customer/attachment/2020/03/5e7b8ab17b3b5_jdatlastoollogo.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/storage/app/customer/tmp/attachment/5e78c9ab01d68_jackodurextrusionsstrang.jpg" afterDir="false" />
<change afterPath="$PROJECT_DIR$/storage/app/customer/tmp/attachment/5e78ca461db73_jackodurextrusionsstrang.jpg" afterDir="false" />
<change afterPath="$PROJECT_DIR$/storage/app/customer/tmp/attachment/5e78cabfcc631_jackodurextrusionsstrang.jpg" afterDir="false" />
<change afterPath="$PROJECT_DIR$/storage/app/customer/tmp/attachment/5e78caee86679_jackodurextrusionsstrang.jpg" afterDir="false" />
<change afterPath="$PROJECT_DIR$/storage/app/customer/tmp/attachment/5e78cb08e8fda_jackodurextrusionsstrang.jpg" afterDir="false" />
<change afterPath="$PROJECT_DIR$/storage/app/customer/tmp/attachment/5e78cb0c29487_jackodurextrusionsstrang.jpg" afterDir="false" />
<change afterPath="$PROJECT_DIR$/storage/app/customer/tmp/attachment/5e78cb5297d99_jackodurextrusionsstrang.jpg" afterDir="false" />
<change afterPath="$PROJECT_DIR$/storage/app/customer/tmp/attachment/5e78ce73a0b51_jdatlastoollogo.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/storage/app/customer/tmp/attachment/5e78cec300ea9_jackodurextrusionsstrang.jpg" afterDir="false" />
<change afterPath="$PROJECT_DIR$/storage/app/customer/tmp/attachment/5e78cef2a2811_jackodurextrusionsstrang.jpg" afterDir="false" />
<change afterPath="$PROJECT_DIR$/storage/app/customer/tmp/attachment/5e78ceff86c13_jackodurextrusionsstrang.jpg" afterDir="false" />
<change afterPath="$PROJECT_DIR$/storage/app/customer/tmp/attachment/5e78cf1d742c7_jackodurextrusionsstrang.jpg" afterDir="false" />
<change afterPath="$PROJECT_DIR$/storage/app/customer/tmp/attachment/5e78cf23670ae_ust111.pdf" afterDir="false" />
<change afterPath="$PROJECT_DIR$/storage/app/customer/tmp/attachment/5e78cfb1a7800_jackodurextrusionsstrang.jpg" afterDir="false" />
<change afterPath="$PROJECT_DIR$/storage/app/customer/tmp/attachment/5e78cfbd8ef63_jackodurextrusionsstrang.jpg" afterDir="false" />
<change afterPath="$PROJECT_DIR$/storage/app/customer/tmp/attachment/5e78d0037eca4_jackodurextrusionsstrang.jpg" afterDir="false" />
<change afterPath="$PROJECT_DIR$/storage/app/customer/tmp/attachment/5e78d02050d7c_jackodurextrusionsstrang.jpg" afterDir="false" />
<change afterPath="$PROJECT_DIR$/storage/app/customer/tmp/attachment/5e78d02498dfd_jackodurextrusionsstrang.jpg" afterDir="false" />
<change afterPath="$PROJECT_DIR$/storage/app/customer/tmp/attachment/5e78d183c4f80_jackodurextrusionsstrang.jpg" afterDir="false" />
<change afterPath="$PROJECT_DIR$/storage/app/customer/tmp/attachment/5e78d1c454e6f_jackodurextrusionsstrang.jpg" afterDir="false" />
<change afterPath="$PROJECT_DIR$/storage/app/customer/tmp/attachment/5e78d1cf536e8_jdatlastoollogo.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/storage/app/customer/tmp/attachment/5e78d35b13cdf_jackodurextrusionsstrang.jpg" afterDir="false" />
<change afterPath="$PROJECT_DIR$/storage/app/customer/tmp/attachment/5e78d3faa91df_ust111.pdf" afterDir="false" />
<change afterPath="$PROJECT_DIR$/storage/app/customer/tmp/attachment/5e78d45fdbc3b_jackodurextrusionsstrang.jpg" afterDir="false" />
<change afterPath="$PROJECT_DIR$/storage/app/customer/tmp/attachment/5e78d463478f2_jackodurextrusionsstrang.jpg" afterDir="false" />
<change afterPath="$PROJECT_DIR$/storage/app/customer/tmp/attachment/5e78d464c5ab1_jdatlastoollogo.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/storage/app/customer/tmp/attachment/5e78d46a01b5d_jackodurextrusionsstrang.jpg" afterDir="false" />
<change afterPath="$PROJECT_DIR$/storage/app/customer/tmp/attachment/5e78d46a312bf_jdatlastoollogo.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/storage/app/customer/tmp/attachment/5e78d564d217f_jdatlastoollogo.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/storage/app/customer/tmp/attachment/5e78d5ef6c709_jdatlastoollogo.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/storage/app/customer/tmp/attachment/5e78d60335e7a_jdatlastoollogo.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/storage/app/customer/tmp/attachment/5e78d6341a8ab_jdatlastoollogo.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/storage/app/customer/tmp/attachment/5e78d6470bf25_jdatlastoollogo.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/storage/app/customer/tmp/attachment/5e78d7038592f_jdatlastoollogo.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/storage/app/customer/tmp/attachment/5e78d78baa10e_jdatlastoollogo.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/storage/app/customer/tmp/attachment/5e78d98658c62_jdatlastoollogo.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/storage/app/customer/tmp/attachment/5e78db64e414c_jdatlastoollogo.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/storage/app/customer/tmp/attachment/5e78dbc255921_jackodurextrusionsstrang.jpg" afterDir="false" />
<change afterPath="$PROJECT_DIR$/storage/app/customer/tmp/attachment/5e78dc789e5ec_ust111.pdf" afterDir="false" />
<change afterPath="$PROJECT_DIR$/storage/app/customer/tmp/attachment/5e78dce263b11_jdatlastoollogo.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/storage/app/customer/tmp/attachment/5e78dd3a57e2c_jdatlastoollogo.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/storage/app/customer/tmp/attachment/5e78ddbd11b14_jdatlastoollogo.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/storage/app/customer/tmp/attachment/5e78de3e83a57_jdatlastoollogo.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/storage/app/customer/tmp/attachment/5e78de619eef4_jackodurextrusionsstrang.jpg" afterDir="false" />
<change afterPath="$PROJECT_DIR$/storage/app/customer/tmp/attachment/5e78dea62a197_jackodurextrusionsstrang.jpg" afterDir="false" />
<change afterPath="$PROJECT_DIR$/storage/app/customer/tmp/attachment/5e78dfdf5464a_jackodurextrusionsstrang.jpg" afterDir="false" />
<change afterPath="$PROJECT_DIR$/storage/app/customer/tmp/attachment/5e78e019450d8_jackodurextrusionsstrang.jpg" afterDir="false" />
<change afterPath="$PROJECT_DIR$/storage/app/customer/tmp/attachment/5e78e0416765e_jackodurextrusionsstrang.jpg" afterDir="false" />
<change afterPath="$PROJECT_DIR$/storage/app/customer/tmp/attachment/5e78e05dcf7c8_jdatlastoollogo.png" afterDir="false" />
<change afterPath="$PROJECT_DIR$/storage/app/customer/tmp/attachment/5e78e086b0a43_jdatlastoollogo.png" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.env" beforeDir="false" afterPath="$PROJECT_DIR$/.env" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.phpstorm.meta.php" beforeDir="false" afterPath="$PROJECT_DIR$/.phpstorm.meta.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/_ide_helper.php" beforeDir="false" afterPath="$PROJECT_DIR$/_ide_helper.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/_ide_helper_models.php" beforeDir="false" afterPath="$PROJECT_DIR$/_ide_helper_models.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Http/Controllers/BookingController.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Controllers/BookingController.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Http/Controllers/CustomerMailController.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Controllers/CustomerMailController.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Http/Controllers/RequestController.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Controllers/RequestController.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Models/CMSAuthor.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Models/CMSAuthor.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Models/Customer.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Models/Customer.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Models/Keyword.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Models/Keyword.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Models/TravelGuide.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Models/TravelGuide.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Models/TravelProgram.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Models/TravelProgram.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/config/mail.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/mail.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Http/Controllers/Settings/TravelAgendaController.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Http/Controllers/Settings/TravelAgendaController.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Mail/MailSendInfo.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Mail/MailSendInfo.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Models/Booking.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Models/Booking.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Models/Coupon.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Models/Coupon.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Models/CustomerMail.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Models/CustomerMail.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Models/Lead.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Models/Lead.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Models/Status.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Models/Status.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Repositories/CustomerMailRepository.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Repositories/CustomerMailRepository.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/Services/Util.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/Services/Util.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/helpers.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/helpers.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/config/debugbar.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/debugbar.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/config/filesystems.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/filesystems.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/config/permissions.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/permissions.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/database/migrations/2018_10_29_202123_create_booking_table.php" beforeDir="false" afterPath="$PROJECT_DIR$/database/migrations/2018_10_29_202123_create_booking_table.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/database/migrations/2018_10_29_202125_create_lead_table.php" beforeDir="false" afterPath="$PROJECT_DIR$/database/migrations/2018_10_29_202125_create_lead_table.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/database/migrations/2020_01_29_152708_create_coupon_table.php" beforeDir="false" afterPath="$PROJECT_DIR$/database/migrations/2020_01_29_152708_create_coupon_table.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/database/migrations/2020_03_11_131408_create_customer_mails_table.php" beforeDir="false" afterPath="$PROJECT_DIR$/database/migrations/2020_03_11_131408_create_customer_mails_table.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/packages/iqcontent/laravel-filemanager/composer.json" beforeDir="false" afterPath="$PROJECT_DIR$/packages/iqcontent/laravel-filemanager/composer.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/packages/iqcontent/laravel-filemanager/public/css/cropper.min.css" beforeDir="false" afterPath="$PROJECT_DIR$/packages/iqcontent/laravel-filemanager/public/css/cropper.min.css" afterDir="false" />
<change beforePath="$PROJECT_DIR$/packages/iqcontent/laravel-filemanager/public/js/cropper.min.js" beforeDir="false" afterPath="$PROJECT_DIR$/packages/iqcontent/laravel-filemanager/public/js/cropper.min.js" afterDir="false" />
@ -100,18 +159,13 @@
<change beforePath="$PROJECT_DIR$/packages/iqcontent/laravel-filemanager/src/views/resize.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/packages/iqcontent/laravel-filemanager/src/views/resize.blade.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/public/css/application.css" beforeDir="false" afterPath="$PROJECT_DIR$/public/css/application.css" afterDir="false" />
<change beforePath="$PROJECT_DIR$/public/js/custom.js" beforeDir="false" afterPath="$PROJECT_DIR$/public/js/custom.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resources/views/cms/content/all/index.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/cms/content/all/index.blade.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resources/views/cms/content/country/index.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/cms/content/country/index.blade.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resources/views/emails/___auth.blade.php" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/resources/views/emails/_auth.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/emails/footer.blade.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resources/views/emails/auth.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/emails/auth.blade.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resources/views/emails/auth_plain.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/emails/auth_plain.blade.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resources/views/emails/content.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/emails/content.blade.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resources/views/emails/info.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/emails/info.blade.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resources/views/emails/invoice.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/emails/invoice.blade.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resources/views/booking/detail.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/booking/detail.blade.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resources/views/customer/mail/detail.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/customer/mail/detail.blade.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resources/views/drafts/index.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/drafts/index.blade.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resources/views/layouts/application.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/layouts/application.blade.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resources/views/layouts/includes/layout-sidenav.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/layouts/includes/layout-sidenav.blade.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resources/views/request/index.blade.php" beforeDir="false" afterPath="$PROJECT_DIR$/resources/views/request/index.blade.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/resources/views/request/modal-mail.blade.php" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/routes/web.php" beforeDir="false" afterPath="$PROJECT_DIR$/routes/web.php" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
@ -315,24 +369,24 @@
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="database.console.LAST_STATE" value="false" />
<property name="js.buildTools.grunt.grunt-cli.package" value="" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/resources/views/emails" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/resources/views/customer/mail" />
<property name="nodejs_package_manager_path" value="npm" />
<property name="settings.editor.selected.configurable" value="project.propVCSSupport.Mappings" />
</component>
<component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$/resources/views/emails" />
<recent name="$PROJECT_DIR$/resources/views/customer/mail" />
<recent name="$PROJECT_DIR$/app/Http/Controllers" />
<recent name="$PROJECT_DIR$/app/Mail" />
<recent name="$PROJECT_DIR$/app/Repositories" />
</key>
<key name="MoveFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$/resources/views/customer/mail" />
<recent name="$PROJECT_DIR$/public/js" />
<recent name="$PROJECT_DIR$/database/migrations" />
<recent name="$PROJECT_DIR$/app/Models/Sym" />
<recent name="$PROJECT_DIR$/app/Models" />
<recent name="$PROJECT_DIR$/resources/views/sys/tools" />
</key>
<key name="CopyFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$/resources/views/customer/mail" />
<recent name="$PROJECT_DIR$/app/Repositories" />
<recent name="$PROJECT_DIR$/resources/views/settings" />
<recent name="$PROJECT_DIR$/app/Http/Controllers/Settings" />
<recent name="$PROJECT_DIR$/database/migrations" />
</key>
</component>
<component name="RunAnythingCache">
@ -639,6 +693,19 @@
<workItem from="1583928733830" duration="11254000" />
<workItem from="1584000815024" duration="767000" />
<workItem from="1584001766808" duration="417000" />
<workItem from="1584089834763" duration="415000" />
<workItem from="1584539055776" duration="159000" />
<workItem from="1584547030850" duration="2165000" />
<workItem from="1584696053170" duration="8487000" />
<workItem from="1584797473809" duration="43000" />
<workItem from="1584957086789" duration="1152000" />
<workItem from="1584963999695" duration="895000" />
<workItem from="1584964994577" duration="14507000" />
<workItem from="1584981715326" duration="178000" />
<workItem from="1585044001412" duration="7367000" />
<workItem from="1585123733934" duration="24500000" />
<workItem from="1585209760763" duration="2000" />
<workItem from="1585211863723" duration="318000" />
</task>
<servers />
</component>
@ -670,7 +737,6 @@
</state>
<state x="-1399" y="392" key="#com.intellij.execution.impl.EditConfigurationsDialog/-2560.23.2560.1417/2560.-527.1440.2537/0.23.2560.1417@-2560.23.2560.1417" timestamp="1581158769046" />
<state x="-1399" y="392" key="#com.intellij.execution.impl.EditConfigurationsDialog/-2560.23.2560.1417/2560.-527.1440.2537/0.23.2560.1417@0.23.2560.1417" timestamp="1581158740331" />
<state x="743" y="388" key="#com.intellij.execution.impl.EditConfigurationsDialog/-2560.23.2560.1417/2560.-571.1440.2537/0.23.2560.1417@0.23.2560.1417" timestamp="1576147025497" />
<state x="968" y="466" key="#com.intellij.openapi.updateSettings.impl.PluginUpdateInfoDialog" timestamp="1581431073950">
<screen x="0" y="23" width="2560" height="1417" />
</state>
@ -679,15 +745,10 @@
<screen x="0" y="23" width="2560" height="1417" />
</state>
<state x="723" y="54" key="#com.intellij.refactoring.rename.AutomaticRenamingDialog/-2560.23.2560.1417/2560.-527.1440.2537/0.23.2560.1417@0.23.2560.1417" timestamp="1581351314829" />
<state x="1018" y="488" key="#com.jetbrains.php.actions.copyPaste.importReferences.PhpImportReferencesDialog" timestamp="1583933816875">
<state x="1018" y="488" key="#com.jetbrains.php.actions.copyPaste.importReferences.PhpImportReferencesDialog" timestamp="1585128425251">
<screen x="0" y="23" width="2560" height="1417" />
</state>
<state x="1018" y="488" key="#com.jetbrains.php.actions.copyPaste.importReferences.PhpImportReferencesDialog/-2560.23.2560.1417/2560.-527.1440.2537/0.23.2560.1417@0.23.2560.1417" timestamp="1583933816875" />
<state x="1018" y="488" key="#com.jetbrains.php.actions.copyPaste.importReferences.PhpImportReferencesDialog/-2560.23.2560.1417/2560.-571.1440.2537/0.23.2560.1417@0.23.2560.1417" timestamp="1576083305151" />
<state x="975" y="454" key="#composer-post-update.sh" timestamp="1576084046909">
<screen x="0" y="23" width="2560" height="1417" />
</state>
<state x="975" y="454" key="#composer-post-update.sh/-2560.23.2560.1417/2560.-571.1440.2537/0.23.2560.1417@0.23.2560.1417" timestamp="1576084046909" />
<state x="1018" y="488" key="#com.jetbrains.php.actions.copyPaste.importReferences.PhpImportReferencesDialog/-2560.23.2560.1417/2560.-527.1440.2537/0.23.2560.1417@0.23.2560.1417" timestamp="1585128425251" />
<state x="1097" y="610" width="600" height="300" key="ComposerAddDependencyOutputPopupDimensionServiceKey" timestamp="1581350288912">
<screen x="0" y="23" width="2560" height="1417" />
</state>
@ -698,20 +759,31 @@
</state>
<state x="1020" y="544" width="527" height="375" key="PHPComposerAddDependencyDialogDimensionKey/-2560.23.2560.1417/2560.-527.1440.2537/0.23.2560.1417@0.23.2560.1417" timestamp="1581350432217" />
<state x="1020" y="544" width="535" height="375" key="PHPComposerAddDependencyDialogDimensionKey/-2560.23.2560.1417/2560.-571.1440.2537/0.23.2560.1417@0.23.2560.1417" timestamp="1577532821964" />
<state x="1063" y="650" key="com.intellij.openapi.vcs.update.UpdateOrStatusOptionsDialogupdate-v2" timestamp="1582718815021">
<state x="1063" y="650" key="com.intellij.openapi.vcs.update.UpdateOrStatusOptionsDialogupdate-v2" timestamp="1585151743715">
<screen x="0" y="23" width="2560" height="1417" />
</state>
<state x="1063" y="650" key="com.intellij.openapi.vcs.update.UpdateOrStatusOptionsDialogupdate-v2/-2560.23.2560.1417/2560.-527.1440.2537/0.23.2560.1417@0.23.2560.1417" timestamp="1582718815021" />
<state x="1063" y="650" key="com.intellij.openapi.vcs.update.UpdateOrStatusOptionsDialogupdate-v2/-2560.23.2560.1417/2560.-527.1440.2537/0.23.2560.1417@0.23.2560.1417" timestamp="1585151743715" />
<state x="1063" y="650" key="com.intellij.openapi.vcs.update.UpdateOrStatusOptionsDialogupdate-v2/-2560.23.2560.1417/2560.-571.1440.2537/0.23.2560.1417@0.23.2560.1417" timestamp="1577126837332" />
<state x="-1690" y="379" width="1487" height="940" key="find.popup" timestamp="1584001613914">
<state x="-1690" y="380" width="1487" height="939" key="find.popup" timestamp="1585157716675">
<screen x="-2560" y="23" width="2560" height="1417" />
</state>
<state x="-1690" y="379" width="1487" height="940" key="find.popup/-2560.23.2560.1417/2560.-527.1440.2537/0.23.2560.1417@0.23.2560.1417" timestamp="1584001613914" />
<state x="-1690" y="380" width="1487" height="939" key="find.popup/-2560.23.2560.1417/2560.-527.1440.2537/0.23.2560.1417@0.23.2560.1417" timestamp="1585157716675" />
<state x="938" y="488" width="1035" height="714" key="find.popup/-2560.23.2560.1417/2560.-571.1440.2537/0.23.2560.1417@0.23.2560.1417" timestamp="1577550564294" />
<state x="946" y="348" width="670" height="676" key="search.everywhere.popup" timestamp="1583936600667">
<state x="946" y="348" width="670" height="676" key="search.everywhere.popup" timestamp="1585136385851">
<screen x="0" y="23" width="2560" height="1417" />
</state>
<state x="946" y="348" width="670" height="676" key="search.everywhere.popup/-2560.23.2560.1417/2560.-527.1440.2537/0.23.2560.1417@0.23.2560.1417" timestamp="1583936600667" />
<state x="946" y="348" width="670" height="676" key="search.everywhere.popup/-2560.23.2560.1417/2560.-527.1440.2537/0.23.2560.1417@0.23.2560.1417" timestamp="1585136385851" />
<state x="946" y="348" width="670" height="676" key="search.everywhere.popup/-2560.23.2560.1417/2560.-571.1440.2537/0.23.2560.1417@0.23.2560.1417" timestamp="1577643900011" />
</component>
<component name="XDebuggerManager">
<breakpoint-manager>
<breakpoints>
<line-breakpoint enabled="true" type="php">
<url>file://$PROJECT_DIR$/resources/views/booking/detail.blade.php</url>
<line>313</line>
<option name="timeStamp" value="2" />
</line-breakpoint>
</breakpoints>
</breakpoint-manager>
</component>
</project>

View file

@ -4,7 +4,9 @@ namespace App\Http\Controllers;
use App\Models\Booking;
use App\Models\BookingDraftItem;
use App\Models\Customer;
use App\Repositories\BookingRepository;
use App\Repositories\CustomerMailRepository;
use Request;
class BookingController extends Controller
@ -184,6 +186,25 @@ class BookingController extends Controller
}
public function loadModal(){
$data = Request::all();
$ret = "";
if(Request::ajax()){
$data['customers'] = [];
if($data['action'] === "new-customer-mail" && isset($data['booking_id']) && $booking = Booking::find($data['booking_id'])){
$tmp = "";
$tmp .= $booking->customer ? $booking->customer->email." | " : "- | ";
$tmp .= $booking->customer ? $booking->customer->firstname." ".$booking->customer->name." | " : "- | ";
$tmp .= $booking->travel_country_id ? $booking->travel_country->name." | " : "- | ";
$tmp .= $booking->travelagenda_id ? $booking->travel_agenda->name."" : "-";
$data['customers'][$booking->id] = $tmp;
}
$ret = CustomerMailRepository::loadModal($data);
}
return response()->json(['response' => $data, 'html'=>$ret]);
}
public function draftItemDelete($id){
$boking_draft_item = BookingDraftItem::findOrFail($id);
$booking = $boking_draft_item->booking;

View file

@ -3,10 +3,15 @@
namespace App\Http\Controllers;
use App\Models\Customer;
use App\Models\CustomerFile;
use App\Models\CustomerMail;
use App\Repositories\CustomerMailRepository;
use App\Repositories\FileRepository;
use Carbon;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Support\Facades\URL;
use Request;
use Response;
class CustomerMailController extends Controller
{
@ -37,9 +42,12 @@ class CustomerMailController extends Controller
$customer_mail = CustomerMail::findOrFail($id);
$id = $customer_mail->id;
}
$data = [
'customer_mail' => $customer_mail,
'id' => $id,
'back' => URL::previous(),
];
return view('customer.mail.detail', $data);
@ -61,6 +69,56 @@ class CustomerMailController extends Controller
return redirect(route('lead_detail', [$lead->id]));*/
}
/* public function loadModal(){
$data = Request::all();
$ret = "";
if(Request::ajax()){
$customers = [];
$query = $this->getSearchRequests();
$bookings = $query->orderBy('id', 'DESC')->limit(50)->get();
foreach ($bookings as $booking){
$tmp = "";
$tmp .= $booking->customer ? $booking->customer->email." | " : "- | ";
$tmp .= $booking->customer ? $booking->customer->firstname." ".$booking->customer->name." | " : "- | ";
$tmp .= $booking->travel_country_id ? $booking->travel_country->name." | " : "- | ";
$tmp .= $booking->travelagenda_id ? $booking->travel_agenda->name."" : "-";
$customers[$booking->id] = $tmp;
}
// return TravelAgenda::whereIn('id', $ret)->get()->pluck('name', 'id');
if($data['action'] === "send-customer-mail"){
$value = new Collection();
$value->id = "add";
$value->customers = $customers;
$value->message = "Sehr #geehrte/r# #Anrede# #Vorname# #Nachname#,\n\nText ....";
$data['title'] = "E-Mail-Nachricht an Auswahl";
$url = route('requests_send_customer_mail');
$ret = view("customer.mail.modal-mail", compact('data','value', 'url') )->render();
}
}
return response()->json(['response' => $data, 'html'=>$ret]);
}*/
public function sendMail(CustomerMailRepository $customerMailRepository){
$data = Request::all();
$customerMailRepository->sendAndStore($data);
\Session()->flash('alert-success', "Mails gesendet!");
return back();
}
public function replyMail(CustomerMailRepository $customerMailRepository){
$data = Request::all();
$customerMailRepository->replyStore($data);
\Session()->flash('alert-success', "Mail gespeichert!");
return back();
}
public function getCustomerMails()
{
$query = CustomerMail::with('booking')->with('customer');
@ -109,6 +167,25 @@ class CustomerMailController extends Controller
->rawColumns(['action_edit', 'send', 'customer_id', 'booking_id', 'id'])
->make(true);
}
public function uploadAttachment($id){
$fileRepo = new FileRepository(new CustomerFile());
if($id === 'tmp'){
$fileRepo->_set('disk', 'customer');
$fileRepo->_set('dir', '/attachment/'.date('Y/m').'/');
$fileRepo->_set('customer_id', NULL);
$fileRepo->_set('customer_mail_id', NULL);
$fileRepo->_set('identifier', 'tmp');
return $fileRepo->uploadFile(Request::all());
}
return Response::json([
'error' => true,
'code' => 200
], 200);
}
}

View file

@ -3,11 +3,11 @@
namespace App\Http\Controllers;
use App\Models\Booking;
use App\Models\Status;
use App\Models\Sym\TravelCountry;
use App\Models\TravelAgenda;
use App\Repositories\CustomerMailRepository;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Collection;
use Request;
use DataTables;
@ -23,22 +23,36 @@ class RequestController extends Controller
public function index($step = false)
{
$d = Booking::join('travel_country', 'travel_country_id', '=', 'travel_country.id')->get()->pluck('name', 'travel_country_id')->unique()->toArray();
$travel_countries = Booking::join('travel_country', 'travel_country_id', '=', 'travel_country.id')->get()->pluck('name', 'travel_country_id')->unique()->toArray();
$filter_lead_status = Status::get()->pluck('name', 'id')->toArray();
$filter_paying_out = Booking::$paying_out_types;
$filter_paying_out_status = Booking::$paying_out_status_types;
$filter_refund = Booking::$refund_types;
$filter_xx_tkt = Booking::$xx_tkt_types;
unset($filter_paying_out[0]);
unset($filter_refund[0]);
unset($filter_xx_tkt[0]);
$data = [
'step' => $step,
'travel_countries' => $d,
'travel_countries' => $travel_countries,
'filter_lead_status' => $filter_lead_status,
'filter_paying_out' => $filter_paying_out,
'filter_paying_out_status' => $filter_paying_out_status,
'filter_refund' => $filter_refund,
'filter_xx_tkt' => $filter_xx_tkt,
];
return view('request.index', $data);
}
public function detail($id)
{
$d = Booking::join('travel_country', 'travel_country_id', '=', 'travel_country.id')->get()->pluck('name', 'travel_country_id')->unique()->toArray();
$travel_countries = Booking::join('travel_country', 'travel_country_id', '=', 'travel_country.id')->get()->pluck('name', 'travel_country_id')->unique()->toArray();
$data = [
'travel_countries' => $d,
'travel_countries' => $travel_countries,
];
return view('request.index', $data);
}
@ -59,7 +73,7 @@ class RequestController extends Controller
*/
private function getSearchRequests(){
$query = Booking::where('lead_id', '!=', NULL);
$query = Booking::with('lead')->where('lead_id', '!=', NULL);
if(Request::get('full_firstname_search') != ""){
$query->where('participant_firstname', 'LIKE', '%'.Request::get('full_firstname_search').'%');
@ -69,18 +83,34 @@ class RequestController extends Controller
$query->where('participant_name', 'LIKE', '%'.Request::get('full_lastname_search').'%');
}
if(Request::get('travel_option_country_id') != ""){
$country_ids = TravelCountry::where('contact_lands', 'LIKE', '%"'.Request::get('travel_option_country_id').'"%')->get()->pluck('id');
$country_ids[] = Request::get('travel_option_country_id');
$query->whereIn('travel_country_id', $country_ids);
}
if(Request::get('travel_option_agenda_id') != ""){
$query->where('travelagenda_id', '=', Request::get('travel_option_agenda_id'));
}
if(Request::get('travel_option_lead_status_id') != ""){
$query->whereHas('lead', function ($q) {
$q->where('status_id', '=', Request::get('travel_option_lead_status_id'));
});
}
if(Request::get('travel_option_paying_out') != ""){
$query->where('paying_out', '=', Request::get('travel_option_paying_out'));
}
if(Request::get('travel_option_paying_out_status') != ""){
$query->where('paying_out_status', '=', Request::get('travel_option_paying_out_status'));
}
if(Request::get('travel_option_refund') != ""){
$query->where('refund', '=', Request::get('travel_option_refund'));
}
if(Request::get('travel_option_xx_tkt') != ""){
$query->where('xx_tkt', '=', Request::get('travel_option_xx_tkt'));
}
// $query->where('end_date', '<=', $now);
if(Request::get('travel_option_search')){
$now = Carbon::now();
@ -172,7 +202,6 @@ class RequestController extends Controller
$query->where('travel_documents', '=', Request::get('sort_travel_documents'));
}
if(Request::get('full_lead_id_search') != ""){
$query->where('lead_id', 'LIKE', '%'.Request::get('full_lead_id_search'). '%');
}
@ -194,8 +223,7 @@ class RequestController extends Controller
$data = Request::all();
$ret = "";
if(Request::ajax()){
$customers = [];
$data['customers'] = [];
$query = $this->getSearchRequests();
$bookings = $query->orderBy('id', 'DESC')->limit(50)->get();
foreach ($bookings as $booking){
@ -204,41 +232,19 @@ class RequestController extends Controller
$tmp .= $booking->customer ? $booking->customer->firstname." ".$booking->customer->name." | " : "- | ";
$tmp .= $booking->travel_country_id ? $booking->travel_country->name." | " : "- | ";
$tmp .= $booking->travelagenda_id ? $booking->travel_agenda->name."" : "-";
$customers[$booking->id] = $tmp;
$data['customers'][$booking->id] = $tmp;
}
// return TravelAgenda::whereIn('id', $ret)->get()->pluck('name', 'id');
if($data['action'] === "send-customer-mail"){
$value = new Collection();
$value->id = "add";
$value->customers = $customers;
$value->message = "Sehr #geehrte/r# #Anrede# #Vorname# #Nachname#,\n\nText ....";
$data['title'] = "E-Mail-Nachricht an Auswahl";
$url = route('requests_send_customer_mail');
$ret = view("request.modal-mail", compact('data','value', 'url') )->render();
}
$ret = CustomerMailRepository::loadModal($data);
}
return response()->json(['response' => $data, 'html'=>$ret]);
}
public function sendCustomerMail(CustomerMailRepository $customerMailRepository){
$data = Request::all();
$customerMailRepository->sendAndStore($data);
\Session()->flash('alert-success', "Mails gesendet!");
return back();
}
public function getRequests()
{
$query = $this->getSearchRequests();
return \DataTables::eloquent($query)
return DataTables::eloquent($query)
->addColumn('action_lead_edit', function (Booking $booking) {
return '<a href="' . route('booking_detail', [$booking->id]) . '" class="btn icon-btn btn-sm btn-primary"><span class="fa fa-edit"></span></a>';
})
@ -276,7 +282,56 @@ class RequestController extends Controller
return '<span data-order="'.($booking->sf_guard_user_id ? $booking->sf_guard_user_id : 0).'">'.($booking->sf_guard_user_id? $booking->sf_guard_user->first_name." ".$booking->sf_guard_user->last_name : "-").'</span>';
})
->addColumn('lead.status_id', function (Booking $booking) {
return '<span data-order="'.($booking->lead->status_id ? $booking->lead->status_id : 0).'">'.($booking->lead->status_id ? $booking->lead->status->name : "-").'</span>';
//umbuchen
if($booking->lead->status_id){
$color = $booking->lead->status->color;
$icon = "";
if($booking->lead->status_id == 14 && $booking->lead->is_rebook){
$color = '#94ae59';
$icon = '<i class="fa fa-check-circle"></i> ';
}
if($booking->lead->status_id == 14 && !$booking->lead->is_rebook){
$icon = '<i class="fa fa-times-circle"></i> ';
}
return '<span data-order="'.$booking->lead->status_id.'"><span class="badge badge-dark" style="background-color: '.$color.'">'.$icon.$booking->lead->status->name.'</span></span>';
}
return '<span data-order="0">-</span>';
})
->addColumn('last_customer_email', function (Booking $booking) {
//umbuchen
if($booking->customer_mails->count()){
$customer_mail = $booking->customer_mails_sent_at->last();
return '<a href="'.route('booking_detail', [$booking->id]).'#collapseBookingMails" data-order="'.$customer_mail->sent_at.'"><span class="badge '.($customer_mail->is_answer ? 'badge-default' : 'badge-secondary').'">'.$customer_mail->sent_at.'</span></a>';
}
return '<span data-order="0">-</span>';
})
->addColumn('paying_out', function (Booking $booking) {
$icon = "";
$badge = $booking->getPayingOutColor();
if($booking->paying_out_status == 1){ //offen
$icon = '<i class="fa fa-times-circle"></i> ';
}
if($booking->paying_out_status == 2){ //erledigt
$badge = 'success';
$icon = '<i class="fa fa-check-circle"></i> ';
}
return '<span data-order="'.$booking->paying_out.'"><span class="badge badge-'.$booking->getPayingOutColor().'">'.$icon.$booking->getPayingOutType().'</span></span>';
})
->addColumn('paying_out_status', function (Booking $booking) {
return '<span data-order="'.$booking->paying_out_status.'"><span class="badge badge-'.$booking->getPayingOutStatusColor().'">'.$booking->getPayingOutStatusType().'</span></span>';
})
->addColumn('refund', function (Booking $booking) {
return '<span data-order="'.$booking->refund_date.'"><span class="badge badge-'.$booking->getRefundColor().'">'.$booking->getRefundTypeList().'</span></span>';
})
->addColumn('xx_tkt', function (Booking $booking) {
return '<span data-order="'.$booking->xx_tkt_date.'"><span class="badge badge-'.$booking->getXxTktColor().'">'.$booking->getXxTktTypeList().'</span></span>';
})
/* ->filterColumn('travel_country_id', function($query, $keyword) {
@ -301,8 +356,12 @@ class RequestController extends Controller
->orderColumn('sf_guard_user_id', 'sf_guard_user_id $1')
->orderColumn('start_date', 'start_date $1')
->orderColumn('end_date', 'end_date $1')
->orderColumn('paying_out', 'paying_out $1')
->orderColumn('paying_out_status', 'paying_out_status $1')
->orderColumn('refund', 'refund_date $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', 'sf_guard_user_id', 'lead.status_id', 'id', 'travel_documents'])
->rawColumns(['action_lead_edit', 'lead_id', 'participant_firstname', 'participant_name', 'action_booking_edit', 'travel_country_id', 'travelagenda_id', 'sf_guard_user_id', 'lead.status_id', 'last_customer_email', 'id', 'travel_documents', 'paying_out', 'paying_out_status', 'refund', 'xx_tkt'])
->make(true);
}
}

View file

@ -0,0 +1,60 @@
<?php
namespace App\Http\Controllers\Settings;
use App\Http\Controllers\Controller;
use App\Models\Status;
use App\Models\TravelNationality;
use App\Models\TravelNationalityRequirement;
use Request;
class BookingStatusController extends Controller
{
public function __construct()
{
$this->middleware('admin');
}
public function index($step = false)
{
$data = [
'status' => Status::all(),
];
return view('settings.status.index', $data);
}
public function update(){
$data = Request::all();
if($data['id'] === "new"){
$model = Status::create([
'name' => $data['name'],
'color' => $data['color'],
'handling_days' => $data['handling_days'],
]);
}else{
$model = Status::find($data['id']);
$model->name = $data['name'];
$model->color = $data['color'];
$model->handling_days = $data['handling_days'];
$model->save();
}
\Session()->flash('alert-save', '1');
return redirect(route('admin_settings_booking_status'));
}
public function delete($id){
$model = Status::findOrFail($id);
$model->delete();
\Session()->flash('alert-success', 'Eintrag gelöscht');
return redirect()->back();
}
}

View file

@ -28,7 +28,7 @@ class TravelAgendaController extends Controller
public function update(){
$data = Request::all();
if($data['id'] == "new"){
if($data['id'] === "new"){
$model = TravelAgenda::create([
'name' => $data['name'],
'active' => isset($data['active']) ? true : false,

View file

@ -12,23 +12,39 @@ class MailSendInfo extends Mailable
{
use Queueable, SerializesModels;
protected $travel_user_booking_fewo;
public $subject;
protected $content;
public $files;
public function __construct($subject, $content)
public function __construct($subject, $content, $files = [])
{
$this->subject = $subject;
$this->content = $content;
$this->files = $files;
}
public function build()
{
return $this->view('emails.content')->with([
$message = $this->view('emails.content')->with([
'content' => $this->content,
'greetings' => __('Best regards'),
]);
/* foreach ($this->files as $file) {
$message->attach($file->getPath(),[
'as' => $file->original_name,
'mime' => $file->mine,
]); // attach each file
}*/
foreach ($this->files as $file) {
$message->attach((string) $file->getPath()); // attach each file
}
return $message;
}
}

View file

@ -142,15 +142,20 @@ class Booking extends Model
'price_total' => 'float',
'deposit_total' => 'float',
'final_payment' => 'float',
'travelagenda_id' => 'int'
];
'travelagenda_id' => 'int',
'paying_out' => 'int',
'refund' => 'int',
'xx_tkt' => 'int',
];
protected $dates = [
'booking_date',
'start_date',
'end_date',
'participant_birthdate',
'final_payment_date'
'final_payment_date',
'refund_date'
];
protected $fillable = [
@ -184,9 +189,69 @@ class Booking extends Model
'deposit_total',
'final_payment',
'final_payment_date',
'travelagenda_id'
'travelagenda_id',
'paying_out',
'paying_out_status',
'refund',
'refund_date',
'xx_tkt',
'xx_tkt_date',
];
public static $paying_out_types = [
0 => '-',
1 => 'Gutschein',
2 => 'Auszahlung',
3 => 'Umbuchung',
4 => 'AZ + GS',
5 => 'AZ o. FP',
];
public static $refund_types = [
0 => '-',
1 => 'eingereicht',
2 => 'erledigt',
];
public static $xx_tkt_types = [
0 => '-',
1 => 'offen',
2 => 'erledigt',
];
public static $paying_out_status_types = [
0 => '-',
1 => 'offen',
2 => 'erledigt',
];
protected $paying_out_colors = [
0 => '',
1 => 'info',
2 => 'dark',
3 => 'warning',
4 => 'warning',
5 => 'warning',
];
protected $refund_colors = [
0 => '',
1 => 'warning',
2 => 'success',
];
protected $xx_tkt_colors = [
0 => '',
1 => 'danger',
2 => 'success',
];
protected $paying_out_status_colors = [
0 => '',
1 => 'danger',
2 => 'success',
];
/*public function branch()
{
return $this->belongsTo(Branch::class);
@ -297,6 +362,17 @@ class Booking extends Model
{
return $this->hasMany(ServiceProviderEntry::class);
}
public function customer_mails()
{
return $this->hasMany(CustomerMail::class, 'booking_id', 'id');
}
public function customer_mails_sent_at()
{
return $this->hasMany(CustomerMail::class, 'booking_id')->orderBy('sent_at', 'ASC');
}
/*
public function travel_insurances()
{
@ -437,4 +513,57 @@ class Booking extends Model
return $this->ev_number;
}
public function getPayingOutType(){
return isset(self::$paying_out_types[$this->paying_out]) ? self::$paying_out_types[$this->paying_out] : '-';
}
public function getPayingOutStatusType(){
return isset(self::$paying_out_status_types[$this->paying_out_status]) ? self::$paying_out_status_types[$this->paying_out_status] : '-';
}
public function getRefundType(){
return isset(self::$refund_types[$this->refund]) ? self::$refund_types[$this->refund] : '-';
}
public function getXxTktType(){
return isset(self::$xx_tkt_types[$this->xx_tkt]) ? self::$xx_tkt_types[$this->xx_tkt] : '-';
}
public function getXxTktTypeList(){
if(isset(self::$xx_tkt_types[$this->xx_tkt])){
if($this->xx_tkt == 1 && $this->xx_tkt_date){
return Carbon::parse($this->xx_tkt_date)->format('d.m.Y');
}
return self::$xx_tkt_types[$this->xx_tkt];
}
return "-";
}
public function getRefundTypeList(){
if(isset(self::$refund_types[$this->refund])){
if($this->refund == 1 && $this->refund_date){
return Carbon::parse($this->refund_date)->format('d.m.Y');
}
return self::$refund_types[$this->refund];
}
return "-";
}
public function getPayingOutColor(){
return isset($this->paying_out_colors[$this->paying_out]) ? $this->paying_out_colors[$this->paying_out] : '';
}
public function getPayingOutStatusColor(){
return isset($this->paying_out_status_colors[$this->paying_out_status]) ? $this->paying_out_status_colors[$this->paying_out_status] : '';
}
public function getRefundColor(){
return isset($this->refund_colors[$this->refund]) ? $this->refund_colors[$this->refund] : '-';
}
public function getXxTktColor(){
return isset($this->xx_tkt_colors[$this->xx_tkt]) ? $this->xx_tkt_colors[$this->xx_tkt] : '-';
}
}

View file

@ -72,7 +72,8 @@ class Coupon extends Model
'issue_date',
'valid_date',
'is_redeemed',
'redeem_date'
'redeem_date',
'text'
];
public function booking()

106
app/Models/CustomerFile.php Normal file
View file

@ -0,0 +1,106 @@
<?php
/**
* Created by Reliese Model.
*/
namespace App\Models;
use Carbon\Carbon;
use Reliese\Database\Eloquent\Model;
/**
* Class CustomerFile
*
* @property int $id
* @property int $customer_id
* @property int $customer_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 Customer $customer
* @property CustomerMail $customer_mail
*
* @package App\Models
*/
class CustomerFile extends Model
{
protected $connection = 'mysql';
protected $table = 'customer_files';
protected $casts = [
'customer_id' => 'int',
'customer_mail_id' => 'int',
'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',
'identifier',
'filename',
'dir',
'original_name',
'ext',
'mine',
'size'
];
public function customer()
{
return $this->belongsTo(Customer::class);
}
public function customer_mail()
{
return $this->belongsTo(CustomerMail::class);
}
public function user()
{
return $this->belongsTo(User::class);
}
public function getIconExt(){
return isset(self::$icon_ext[$this->ext]) ? self::$icon_ext[$this->ext] : self::$icon_ext['default'];
}
public function getURL(){
return route('storage_file', [$this->id, 'customer']);
}
public function getPath(){
return \Storage::disk('customer')->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;
}
}
}

View file

@ -7,15 +7,19 @@
namespace App\Models;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Collection;
use Reliese\Database\Eloquent\Model;
/**
* Class CustomerMail
*
*
* @property int $id
* @property int $booking_id
* @property int $customer_id
* @property int $lead_id
* @property bool $is_answer
* @property int $reply_id
* @property string $email
* @property string $subject
* @property string $message
* @property bool $send
@ -26,28 +30,15 @@ use Reliese\Database\Eloquent\Model;
* @property Carbon $delivered_at
* @property Carbon $created_at
* @property Carbon $updated_at
*
* @property Booking $booking
* @property Customer $customer
* @property CustomerMail $customer_mail
* @property Lead $lead
* @property Collection|CustomerFile[] $customer_files
* @property Collection|CustomerMail[] $customer_mails
*
* @package App\Models
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CustomerMail newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CustomerMail newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CustomerMail query()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CustomerMail whereBookingId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CustomerMail whereCreatedAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CustomerMail whereCustomerId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CustomerMail whereDeliveredAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CustomerMail whereError($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CustomerMail whereFail($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CustomerMail whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CustomerMail whereLeadId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CustomerMail whereMessage($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CustomerMail whereScheduledAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CustomerMail whereSend($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CustomerMail whereSentAt($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CustomerMail whereSubject($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CustomerMail whereUpdatedAt($value)
* @mixin \Eloquent
*/
class CustomerMail extends Model
{
@ -57,6 +48,8 @@ class CustomerMail extends Model
'booking_id' => 'int',
'customer_id' => 'int',
'lead_id' => 'int',
'is_answer' => 'bool',
'reply_id' => 'int',
'send' => 'bool',
'fail' => 'bool'
];
@ -71,7 +64,9 @@ class CustomerMail extends Model
'booking_id',
'customer_id',
'lead_id',
'email',
'is_answer',
'reply_id',
'email',
'subject',
'message',
'send',
@ -92,11 +87,27 @@ class CustomerMail extends Model
return $this->belongsTo(Customer::class);
}
public function customer_mail()
{
return $this->belongsTo(CustomerMail::class, 'reply_id');
}
public function lead()
{
return $this->belongsTo(Lead::class);
}
public function customer_files()
{
return $this->hasMany(CustomerFile::class);
}
public function customer_mails()
{
return $this->hasMany(CustomerMail::class, 'reply_id');
}
public function getSentAtAttribute(){
if(!$this->attributes['sent_at']){ return ""; }
return Carbon::parse($this->attributes['sent_at'])->format(\Util::formatDateTimeDB());

View file

@ -105,7 +105,8 @@ class Lead extends Model
'travelagenda_id' => 'int',
'sf_guard_user_id' => 'int',
'is_closed' => 'bool',
'initialcontacttype_id' => 'int',
'is_rebook' => 'bool',
'initialcontacttype_id' => 'int',
'searchengine_id' => 'int',
'status_id' => 'int',
'website_id' => 'int',
@ -134,6 +135,7 @@ class Lead extends Model
'remarks',
'sf_guard_user_id',
'is_closed',
'is_rebook',
'initialcontacttype_id',
'searchengine_id',
'searchengine_keywords',

View file

@ -1,25 +1,26 @@
<?php
/**
* Created by Reliese Model.
*/
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Collection;
use Reliese\Database\Eloquent\Model;
/**
* App\Models\Status
*
* Class Status
*
* @property int $id
* @property string $name
* @property int $handling_days
* @property string|null $color
* @property-read \App\Models\Status $status
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Status whereColor($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Status whereHandlingDays($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Status whereId($value)
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Status whereName($value)
* @mixin \Eloquent
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Status newModelQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Status newQuery()
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Status query()
* @property string $color
*
* @property Collection|Lead[] $leads
* @property Collection|StatusHistory[] $status_histories
*
* @package App\Models
*/
class Status extends Model
{
@ -27,8 +28,25 @@ class Status extends Model
protected $table = 'status';
public function status()
{
return $this->belongsTo('App\Models\Status', 'status_id', 'id');
}
public $timestamps = false;
protected $casts = [
'handling_days' => 'int'
];
protected $fillable = [
'name',
'handling_days',
'color'
];
public function leads()
{
return $this->hasMany(Lead::class);
}
/*public function status_histories()
{
return $this->hasMany(StatusHistory::class);
}*/
}

View file

@ -6,7 +6,9 @@ namespace App\Repositories;
use App\Mail\MailSendFeWoService;
use App\Mail\MailSendInfo;
use App\Models\Booking;
use App\Models\CustomerFile;
use App\Models\CustomerMail;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Support\Facades\Mail;
@ -25,36 +27,80 @@ class CustomerMailRepository extends BaseRepository {
public function sendAndStore($data){
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 = CustomerFile::find($message_attachment_id)){
$customer_files[] = $CustomerFile;
}
}
}
foreach ($data['send_mail_to'] as $booking_id => $on) {
$booking = Booking::find($booking_id);
if ($booking->customer) {
$message = $this->prepareContent($booking, $data['message']);
$subject = $this->prepareContent($booking, $data['subject']);
$customer_mail = $this->store($booking, $subject, $message);
$this->sendMail($customer_mail);
$reply_id = isset($data['customer_mail_id']) ? $data['customer_mail_id'] : NULL;
$customer_mail = $this->store($booking, $subject, $message, $booking->customer->email, false, $reply_id);
$this->sendMail($customer_mail, $customer_files);
foreach ($customer_files as $file) {
$file->customer_id = $booking->customer_id;
$file->customer_mail_id = $customer_mail->id;
$file->save();
}
}
}
}
}
public function store($booking, $subject, $message){
public function replyStore($data){
if(isset($data['booking_id']) && $booking = Booking::find($data['booking_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 = CustomerFile::find($message_attachment_id)){
$customer_files[] = $CustomerFile;
}
}
}
if ($booking->customer) {
$mail_from = isset($data['mail_from']) ? $data['mail_from'] : $booking->customer->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, $data['subject'], $data['message'], $mail_from, true, $reply_id, $sent_at);
foreach ($customer_files as $file) {
$file->customer_id = $booking->customer_id;
$file->customer_mail_id = $customer_mail->id;
$file->save();
}
}
}
}
public function store($booking, $subject, $message, $mail_from, $is_answer = false, $reply_id = NULL, $sent_at=false){
$customer_mail = CustomerMail::create([
'booking_id' => $booking->id,
'customer_id' => $booking->customer_id,
'lead_id' => $booking->lead_id,
'email' => $booking->customer->email,
'is_answer' => $is_answer,
'reply_id' => $reply_id,
'email' => $mail_from,
'subject' => $subject,
'message' => $message,
'sent_at' => $sent_at ? $sent_at : now(),
]);
return $customer_mail;
}
private function sendMail($customer_mail){
private function sendMail($customer_mail, $customer_files){
try{
Mail::to($customer_mail->email)->send(new MailSendInfo($customer_mail->subject, $customer_mail->message));
Mail::to($customer_mail->email)->send(new MailSendInfo($customer_mail->subject, $customer_mail->message, $customer_files));
}
catch(\Exception $e){
// Never reached
@ -68,6 +114,9 @@ class CustomerMailRepository extends BaseRepository {
$customer_mail->save();
return true;
}
private function prepareContent($booking, $content){
$first_name = $booking->customer->firstname;
@ -76,7 +125,6 @@ class CustomerMailRepository extends BaseRepository {
$program = $booking->travelagenda_id ? $booking->travel_agenda->name : "-";
$salutation = $booking->customer->salutation->name;
$dear = $booking->customer->salutation_id == 1 ? 'geehrter' : 'geehrte';
$search = ['#geehrte/r#', '#Anrede#', '#Vorname#', '#Nachname#', '#Reiseland#', '#Programm#'];
$replace = [$dear, $salutation, $first_name, $last_name, $country, $program, $salutation];
@ -86,4 +134,70 @@ class CustomerMailRepository extends BaseRepository {
}
public static function loadModal($data)
{
$value = new Collection();
$value->title = "";
$value->subtitle = "";
$value->url = "";
if ($data['action'] === "new-customer-mail") {
if (isset($data['booking_id'])) {
$value->id = $data['booking_id'];
$value->customers = $data['customers'];
$value->subject = "";
$value->message = "Sehr #geehrte/r# #Anrede# #Vorname# #Nachname#,\n\nText ....";
$value->s_placeholder = "Betreff der E-Mail";
$value->m_placeholder = "Nachricht der E-Mail";
if(isset($data['customer_mail_id']) && $customer_mail = CustomerMail::find($data['customer_mail_id'])){
$value->subject = "Re: ".$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'];
return view("customer.mail.modal-new-mail", compact('data', 'value'))->render();
}
}
if ($data['action'] === "show-customer-mail") {
if (isset($data['customer_mail_id']) && $customer_mail = CustomerMail::find($data['customer_mail_id'])) {
$value->url = $data['url'];
$value->title = "E-Mail Ansicht";
return view("customer.mail.modal-show-mail", compact('data', 'value', 'customer_mail'))->render();
}
}
if ($data['action'] === "reply-customer-mail") {
if (isset($data['booking_id']) && $booking = Booking::find($data['booking_id'])) {
$value->id = $data['booking_id'];
$value->booking = $booking;
$value->message = "";
$value->subject = "";
$value->s_placeholder = "Betreff des Kunden";
$value->m_placeholder = "Nachricht des Kunden";
if(isset($data['customer_mail_id']) && $customer_mail = CustomerMail::find($data['customer_mail_id'])){
$value->subject = "Re: ".$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'];
return view("customer.mail.modal-new-mail", compact('data', 'value'))->render();
}
}
}
}

View file

@ -0,0 +1,147 @@
<?php
namespace App\Repositories;
use App\Models\CustomerFile;
use Request;
use Response;
use Storage;
use Util;
use Validator;
class FileRepository extends BaseRepository {
protected $rules;
protected $messages;
protected $disk;
protected $dir;
protected $customer_id;
protected $customer_mail_id;
protected $identifier;
public function __construct(CustomerFile $model){
$this->model = $model;
$this->rules = [
'file' => 'required|mimes:pdf,jpeg,png|max:32768'
];
$this->messages = [
'file.mimes' => 'Datei ist kein PDF/JPG/PNG Format',
'file.required' => 'PDF/JPG/PNG-Datei wird benötigt'
];
}
public function _set($name, $value){
$this->{$name} = $value;
}
/* public function load($id){
$this->model = $id;
}
*/
public function uploadFile( $form_data )
{
$validator = Validator::make($form_data, $this->rules, $this->messages);
if ($validator->fails()) {
return Response::json([
'error' => true,
'message' => $validator->messages()->first(),
'code' => 400
], 400);
}
$file = $form_data['file'];
$originalName = $file->getClientOriginalName();
$extension = $file->getClientOriginalExtension();
$mine = $file->getClientMimeType();
$size = $file->getClientSize();
$originalNameWithoutExt = substr($originalName, 0, strlen($originalName) - strlen($extension) - 1);
$filename = Util::sanitize($originalNameWithoutExt, true, false, true);
$allowed_filename = uniqid() . '_' . $filename.".".$extension;
//$dir = $this->model->getInvoiceStorageAttDir();
if(!Storage::disk($this->disk)->exists( $this->dir )){
Storage::disk($this->disk)->makeDirectory($this->dir); //creates directory
}
Storage::disk($this->disk)->put($this->dir.$allowed_filename, file_get_contents($file->getRealPath()));
$customer_file = CustomerFile::create([
'customer_id' => $this->customer_id,
'customer_mail_id' => $this->customer_mail_id,
'identifier' => $this->identifier,
'filename' => $allowed_filename,
'dir' => $this->dir,
'original_name' => $originalName,
'ext' => $extension,
'mine' => $mine,
'size' => $size
]);
return Response::json([
'error' => false,
'filename' => $allowed_filename,
'file_id' =>$customer_file->id,
'file_data' => $extension,
'file_icon' => $customer_file->getIconExt(),
'file_format_bytes' => $customer_file->formatBytes(),
'file_url' => $customer_file->getURL(),
'redirect' => '',
'code' => 200
], 200);
}
/* public function createFile(Request $request)
{
$locale = \App::getLocale();
$data = [
'step' => 2,
'locale' => $locale,
];
$rules = array(
'network_name' => 'required|max:255',
'input_file_now' => 'required|mimes:png,pdf,jpg,jpeg|max:30000'
);
$validator = Validator::make(Input::all(), $rules);
if ($validator->fails()) {
// get the error messages from the validator
$messages = $validator->messages();
// redirect our user back to the form with the errors from the validator
return view('user.register_complete', $data)->withErrors($validator);
} else {
$user = \Auth::user();
if(!$user->account->network_name){
$file = request()->file('input_file_now');
//$ext = $file->guessClientExtension();
//$file->storeAs('user/' . $user->id .'/verification');
$data = $file->store('user/' . $user->id .'/verification');
$account = $user->account;
$account->network_name = Input::get('network_name');
$account->network_verification = basename($data);
$account->save();
$user->role_id = 2; //set as User by default!
$user->save();
}
return redirect('complete_register');
//return view('user.register_complete', $data);
}
}*/
}

View file

@ -29,6 +29,14 @@ class Util
return 'd.m.Y - H:i';
}
public static function _format_date($date, $to = 'date'){
if($to === 'datetime'){
return \Carbon::parse($date)->format(\Util::formatDateTimeDB());
}
//date
return \Carbon::parse($date)->format(\Util::formatDateDB());
}
public static function _format_number($value){
return preg_replace("/[^0-9,]/", "", $value);

View file

@ -17,6 +17,13 @@ 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);
}
}
if (! function_exists('array_to_json')) {
function array_to_json($value)

View file

@ -66,7 +66,7 @@ return [
| Optionally, you can also send ServerTiming headers on ajax requests for the Chrome DevTools.
*/
'capture_ajax' => true,
'capture_ajax' => false,
'add_ajax_timing' => false,
/*

View file

@ -54,6 +54,12 @@ return [
'url' => env('APP_URL').'/storage',
'visibility' => 'public',
],
'customer' => [
'driver' => 'local',
'root' => storage_path('app/customer'),
'url' => env('APP_URL').'/storage/customer',
'visibility' => 'public',
],
'fewo_invoices' => [
'driver' => 'local',
'root' => storage_path('app/fewo/invoices'),

View file

@ -36,6 +36,7 @@ return [
'sua-st-tp' => ['name' => 'SUPERADMIN > Einstellungen > Reisprogramme' , 'color' => 'superadmin'],
'sua-st-tc' => ['name' => 'SUPERADMIN > Einstellungen > Reiseländer' , 'color' => 'superadmin'],
'sua-st-tn' => ['name' => 'SUPERADMIN > Einstellungen > Nationalitäten' , 'color' => 'superadmin'],
'sua-st-bs' => ['name' => 'SUPERADMIN > Einstellungen > Reisestatus' , 'color' => 'superadmin'],
'sua-st-ke' => ['name' => 'SUPERADMIN > Einstellungen > Keywords' , 'color' => 'superadmin'],
'sua-re' => ['name' => 'SUPERADMIN > Export' , 'color' => 'superadmin'],
'sua-re-bo' => ['name' => 'SUPERADMIN > Export > Buchungen' , 'color' => 'superadmin'],

View file

@ -22,7 +22,7 @@ class CreateBookingTable extends Migration
$table->date('booking_date')->nullable();
$table->bigInteger('customer_id');
$table->bigInteger('lead_id')->nullable();
$table->tinyInteger('new_drafts')->nullable();
$table->tinyInteger('new_drafts')->nullable()->default(0);
$table->integer('sf_guard_user_id');
$table->bigInteger('branch_id');
$table->decimal('service_fee', 10, 2)->nullable()->default(0.00);
@ -30,13 +30,11 @@ class CreateBookingTable extends Migration
$table->bigInteger('travel_category_id')->nullable();
$table->bigInteger('pax')->nullable();
$table->bigInteger('coupon_id')->nullable();
$table->dateTime('created_at');
$table->dateTime('updated_at');
$table->string('title', 255)->nullable();
$table->date('start_date')->nullable();
$table->date('end_date')->nullable();
$table->bigInteger('website_id')->nullable();
$table->string('travel_number', 30)->nullable();
$table->string('travel_number', 80)->nullable();
$table->string('participant_name', 255)->nullable();
$table->string('participant_firstname', 255)->nullable();
$table->date('participant_birthdate')->nullable();
@ -45,12 +43,22 @@ class CreateBookingTable extends Migration
$table->string('merlin_knr', 255)->nullable();
$table->string('merlin_order_number', 255)->nullable();
$table->bigInteger('travel_company_id')->nullable();
$table->tinyInteger('travel_documents')->nullable()->default(0);
$table->decimal('canceled', 5, 2)->nullable()->default(0.00);
$table->decimal('price', 10, 2)->nullable();
$table->decimal('price_canceled', 10, 2)->nullable();
$table->decimal('price_total', 10, 2)->nullable();
$table->decimal('deposit_total', 10, 2)->nullable();
$table->decimal('final_payment', 10, 2)->nullable();
$table->date('final_payment_date')->nullable();
$table->bigInteger('travelagenda_id')->nullable();
$table->tinyInteger('paying_out')->nullable()->default(0);
$table->tinyInteger('paying_out_status')->nullable()->default(0);
$table->tinyInteger('refund')->nullable()->default(0);
$table->date('refund_date')->nullable();
$table->tinyInteger('xx_tkt')->nullable()->default(0);
$table->dateTime('updated_at');
$table->dateTime('created_at');
$table->index('lead_id', 'lead_id_idx');
$table->index('sf_guard_user_id', 'sf_guard_user_id_idx');
@ -82,9 +90,6 @@ class CreateBookingTable extends Migration
')->onUpdate('RESTRICT');
});
}
/**

View file

@ -29,6 +29,7 @@ class CreateLeadTable extends Migration
$table->text('remarks')->nullable();
$table->integer('sf_guard_user_id');
$table->tinyInteger('is_closed')->nullable()->default(0);
$table->tinyInteger('is_rebook')->nullable()->default(0);
$table->bigInteger('initialcontacttype_id')->nullable();
$table->bigInteger('searchengine_id')->nullable();
$table->string('searchengine_keywords', 255)->nullable();

View file

@ -27,6 +27,7 @@ class CreateCouponTable extends Migration
$table->date('valid_date');
$table->tinyInteger('is_redeemed')->default(0);
$table->date('redeem_date')->nullable();
$table->text('text')->nullable();
$table->dateTime('created_at');
$table->dateTime('updated_at');
@ -38,6 +39,7 @@ class CreateCouponTable extends Migration
$table->foreign('customer_id', 'coupon_customer_id_customer_id')->references('id')->on('customer')->onDelete('RESTRICT
')->onUpdate('RESTRICT');
});

View file

@ -20,6 +20,10 @@ class CreateCustomerMailsTable extends Migration
$table->bigInteger('customer_id');
$table->bigInteger('lead_id')->nullable();
$table->boolean('is_answer')->default(false);
$table->unsignedBigInteger('reply_id');
$table->string('email', 255);
$table->string('subject', 255);
$table->text('message')->nullable();
@ -46,6 +50,10 @@ class CreateCustomerMailsTable extends Migration
->references('id')
->on('lead');
$table->foreign('reply_id')
->references('id')
->on('customer_mails');
});
}

View file

@ -0,0 +1,53 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
/**
* Migration auto-generated by Sequel Pro Laravel Export (1.4.1)
* @see https://github.com/cviebrock/sequel-pro-laravel-export
*/
class CreateBookingStornoTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('booking_storno', function (Blueprint $table) {
$table->bigIncrements('id');
$table->bigInteger('booking_id');
$table->decimal('total', 10, 2)->default(0.00);
$table->decimal('storno', 10, 2)->default(0.00);
$table->date('storno_date')->nullable();
//$table->UNKNOWN:longblob('binary_data');
$table->tinyInteger('done')->nullable()->default(0);
$table->dateTime('created_at');
$table->dateTime('updated_at');
$table->index('booking_id', 'booking_storno_booking_id_idx');
$table->foreign('booking_id', 'booking_storno_booking_id_booking_id')->references('id')->on('booking')->onDelete('CASCADE
')->onUpdate('RESTRICT');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('booking_storno');
}
}

View file

@ -0,0 +1,51 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateCustomerFilesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('customer_files', function (Blueprint $table) {
$table->bigIncrements('id');
$table->bigInteger('customer_id')->nullable();
$table->unsignedBigInteger('customer_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('customer_id')
->references('id')
->on('customer');
$table->foreign('customer_mail_id')
->references('id')
->on('customer_mails');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('customer_files');
}
}

View file

@ -696,3 +696,15 @@ figcaption {
left: auto
}
}
.badge-dark {
background-color: rgba(200, 21, 176, 0.9);
color: #fff;
}
.default-style .datepicker-dropdown {
z-index: 2080 !important;
}
.default-style .dtp {
z-index: 2080;
}

View file

@ -107,17 +107,29 @@ $(function() {
});
$(function () {
$('#modals-load-content').on('show.bs.modal', function (event) {
var button = $(event.relatedTarget);
if (!button.data('id')) {
return;
}
var data = {};
$.each(button.data(), function(index, value){
data[index] = value;
});
console.log(data);
loadModalInner(this, data);
});
function initModalInner() {
$('[data-toggle="reloadModal"]').off().on('click', function(event) {
event.preventDefault();
button = $(this);
var data = {};
data.id = button.data('id');
data.model = button.data('model');
data.action = button.data('action');
data.request = button.data('request');
data.route = button.data('route');
data.target = button.data('target');
$.each(button.data(), function(index, value){
data[index] = value;
});
console.log(data);
loadModalInner(this, data);
});
@ -141,7 +153,7 @@ $(function () {
success: function(data) {
console.log(data);
$(data.response.target).find('.modal-dialog').html(data.html);
$('.selectpicker').selectpicker('refresh');
$(data.response.target + '.selectpicker').selectpicker('refresh');
initModalInner();
},
error: function(xhr, status, errorThrown) {
@ -156,24 +168,6 @@ $(function () {
$('#modals-load-content').on('show.bs.modal', function (event) {
var button = $(event.relatedTarget);
if (!button.data('id')) {
return;
}
var data = {};
data.id = button.data('id');
data.model = button.data('model');
data.action = button.data('action');
data.request = button.data('request');
data.route = button.data('route');
data.target = button.data('target');
console.log(data);
loadModalInner(this, data);
});
});
function update_modal_data_show(e, $ele) {

View file

@ -3,14 +3,14 @@
@section('content')
<style>
body {
/* body {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
}*/
.btn-xs {
line-height: 1.3em;
}
@ -35,185 +35,585 @@
</style>
<div class="float-right mt-3">
<a href="{{route('bookings')}}" class="btn btn-sm btn-default">{{ __('zur Übersicht') }}</a>
<a href="{{ make_old_url('/index.php/booking/'.$booking->id.'/edit') }}" class="btn btn-sm btn-default float-right">{{ __('zurück ins CRM v2') }}</a>
</div>
<h4 class="font-weight-bold py-3 mb-1">
Buchung verwalten
</h4>
{{--
<style>
[class*="nav-tabs"]
{
position: fixed;
z-index: 9;
background-color: #fff;
margin-top: -11%; // adjust according to your need
}
[class*="tab-content"]
{
margin-top: 5%;
}
</style>
--}}
<ul class="nav nav-sm nav-tabs nav-justified tabs-alt mb-3" id="top-nav-quick-jump">
<li class="nav-item">
<a class="nav-link" href="javascript:void(0)" data-collapse="#collapseBookingInfo">
Kunde
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="javascript:void(0)" data-collapse="#collapseBookingLead">
Anfrage
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="javascript:void(0)" data-collapse="#collapseBookingBooking">
Buchung
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="javascript:void(0)" data-collapse="#collapseBookingMyJack">
MyJack
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="javascript:void(0)" data-collapse="#collapseBookingPrice">
Preis
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="javascript:void(0)" data-collapse="#collapseBookingOrganisation">
Organisation
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="javascript:void(0)" data-collapse="#collapseBookingMails">
E-Mails
<span class="badge badge-primary">{{$booking->customer_mails->count()}}</span>
</a>
</li>
</ul>
{!! Form::open(['url' => route('booking_detail', [$id]), 'class' => 'form-horizontal', 'id'=>'lead-form-validation']) !!}
<input type="hidden" name="id" id="id" value="{{$id}}">
<!-- draft -->
<div class="card mb-2">
<div class="card-body row">
<div class="form-group col-sm-6">
<label class="form-label" for="merlin_order_number">{{ __('MyJack Nr.') }}*</label>
{{ Form::text('merlin_order_number', $booking->merlin_order_number, array('placeholder'=>__('MyJack Nr.'), 'class'=>'form-control', 'id'=>'merlin_order_number')) }}
</div>
<div class="form-group col-sm-6">
<label class="form-label" for="booking_id">{{ __('Nr.') }}*</label>
{{ Form::text('id', $booking->id, array('placeholder'=>__('Nr.'), 'class'=>'form-control', 'id'=>'booking_id', 'readonly')) }}
</div>
<div class="form-group col-sm-6">
<label class="form-label" for="booking_id">{{ __('Gesamtpreis Organisation') }}</label>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text"></span>
<!-- Info -->
<div class="card mb-2 border-primary">
<h6 class="card-header bg-primary text-white py-2" data-toggle="collapse" data-target="#collapseBookingInfo" aria-expanded="false" aria-controls="collapseBookingInfo">
<strong style="line-height: 1.6em">Kunde</strong>
</h6>
<div class="collapse" id="collapseBookingInfo">
<div class="card-body row">
@if($booking->customer->count())
<div class="form-group col-sm-6">
<label class="form-label" for="customer_id">{{ __('Kunden ID') }}</label>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text">
<a class="text-primary" href="{{route('customer_detail', [$booking->customer->id])}}"><i class="fa fa-edit"></i></a></span>
</div>
{{ Form::text('customer[id]', $booking->customer->id, array('placeholder'=>__('Kunden ID'), 'class'=>'form-control', 'id'=>'customer_id', 'readonly')) }}
</div>
{{ Form::text('price', $booking->price, array('placeholder'=>__('Gesamtpreis'), 'class'=>'form-control', 'id'=>'price', 'readonly')) }}
</div>
<div class="form-group col-sm-6">
<label class="form-label" for="customer_email">{{ __('E-Mail') }}</label>
{{ Form::text('customer[email]', $booking->customer->email, array('placeholder'=>__('E-Mail'), 'class'=>'form-control', 'id'=>'customer_email', 'readonly')) }}
</div>
<div class="form-group col-sm-6">
<label class="form-label" for="customer_firstname">{{ __('Vorname') }}</label>
{{ Form::text('customer[firstname]', $booking->customer->firstname, array('placeholder'=>__('Vorname'), 'class'=>'form-control', 'id'=>'customer_firstname', 'readonly')) }}
</div>
<div class="form-group col-sm-6">
<label class="form-label" for="customer_name">{{ __('Nachname') }}</label>
{{ Form::text('customer[name]', $booking->customer->name, array('placeholder'=>__('Nachname'), 'class'=>'form-control', 'id'=>'customer_name', 'readonly')) }}
</div>
@endif
</div>
</div>
</div>
<!-- Anfrage -->
<div class="card mb-2 border-primary">
<h6 class="card-header bg-primary text-white py-2" data-toggle="collapse" data-target="#collapseBookingLead" aria-expanded="false" aria-controls="collapseBookingLead">
<strong style="line-height: 1.6em">Anfrage</strong>
</h6>
<div class="collapse" id="collapseBookingLead">
<div class="card-body row">
@if($booking->lead->count())
<div class="form-group col-sm-6">
<label class="form-label" for="lead_id">{{ __('Anfrage ID') }}</label>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text">
<a class="text-primary" href="{{route('lead_detail', [$booking->lead->id])}}"><i class="fa fa-edit"></i></a></span>
</div>
{{ Form::text('lead[id]', $booking->lead->id, array('placeholder'=>__('Anfrage ID'), 'class'=>'form-control', 'id'=>'lead_id', 'readonly')) }}
</div>
</div>
<div class="form-group col-sm-6">
<label class="form-label" for="lead_status_id">{{ __('Status') }}</label>
{{ Form::text('lead[status_id]', $booking->lead->status ? $booking->lead->status->name : '', array('placeholder'=>__('Status'), 'class'=>'form-control', 'id'=>'lead_status_id', 'readonly')) }}
</div>
<div class="form-group col-sm-6">
<label class="custom-control custom-checkbox mt-2">
{!! Form::checkbox('lead[is_rebook]', 1, $booking->lead->is_rebook, ['class'=>'custom-control-input', 'readonly']) !!}
<span class="custom-control-label">{{__('Umbuchung abgeschlossen')}}</span>
</label>
</div>
<div class="form-group col-sm-6">
<label class="custom-control custom-checkbox mt-2">
{!! Form::checkbox('lead[is_closed]', 1, $booking->lead->is_closed, ['class'=>'custom-control-input', 'readonly']) !!}
<span class="custom-control-label">{{__('Vorgang abgeschlossen')}}</span>
</label>
</div>
@endif
</div>
</div>
</div>
<!-- Buchung -->
<div class="card mb-2">
<h6 class="card-header bg-primary text-white py-2" data-toggle="collapse" data-target="#collapseBookingBooking" aria-expanded="false" aria-controls="collapseBookingBooking">
<strong style="line-height: 1.6em">Buchung</strong>
</h6>
<div class="collapse" id="collapseBookingBooking">
<div class="card-body row">
<div class="form-group col-sm-6 col-md-4">
<label class="form-label" for="sf_guard_user_id">{{ __('Sachbearbeiter') }}</label>
{{ Form::text('sf_guard_user_id', $booking->sf_guard_user->first_name." ".$booking->sf_guard_user->last_name, array('placeholder'=>__('Sachbearbeiter'), 'class'=>'form-control', 'id'=>'sf_guard_user_id', 'readonly')) }}
</div>
<div class="form-group col-sm-6 col-md-4">
<label class="form-label" for="booking_date">{{ __('Buchungsdatum') }}</label>
{{ Form::text('booking_date', _format_date($booking->booking_date), array('placeholder'=>__('Buchungsdatum'), 'class'=>'form-control', 'id'=>'booking_date', 'readonly')) }}
</div>
<div class="form-group col-sm-6 col-md-4">
<label class="form-label" for="travel_country_id">{{ __('Reiseland') }}</label>
{{ Form::text('travel_country_id', $booking->travel_country ? $booking->travel_country->name : '', array('placeholder'=>__('Reiseland'), 'class'=>'form-control', 'id'=>'travel_country_id', 'readonly')) }}
</div>
<div class="form-group col-sm-6 col-md-4">
<label class="form-label" for="travel_number">{{ __('Reisenummer') }}</label>
{{ Form::text('travel_number', $booking->travel_number, array('placeholder'=>__('Reisenummer'), 'class'=>'form-control', 'id'=>'travel_number', 'readonly')) }}
</div>
<div class="form-group col-sm-6 col-md-4">
<label class="form-label" for="travelagenda_id">{{ __('Reiseprogramm') }}</label>
{{ Form::text('travelagenda_id', $booking->travel_agenda ? $booking->travel_agenda->name : '', array('placeholder'=>__('Reiseprogramm'), 'class'=>'form-control', 'id'=>'travelagenda_id', 'readonly')) }}
</div>
<div class="form-group col-sm-6 col-md-4">
<label class="form-label" for="travel_category_id">{{ __('Reiseart') }}</label>
{{ Form::text('travel_category_id', $booking->travel_category ? $booking->travel_category->name : '', array('placeholder'=>__('Reiseart'), 'class'=>'form-control', 'id'=>'travel_category_id', 'readonly')) }}
</div>
<div class="form-group col-sm-6 col-md-4">
<label class="form-label" for="start_date">{{ __('Aufenthalt vom') }}</label>
{{ Form::text('start_date', _format_date($booking->start_date), array('placeholder'=>__('Aufenthalt vom'), 'class'=>'form-control', 'id'=>'start_date', 'readonly')) }}
</div>
<div class="form-group col-sm-6 col-md-4">
<label class="form-label" for="end_date">{{ __('Aufenthalt bis') }}</label>
{{ Form::text('end_date', _format_date($booking->end_date), array('placeholder'=>__('Aufenthalt bis'), 'class'=>'form-control', 'id'=>'end_date', 'readonly')) }}
</div>
<div class="form-group col-sm-6 col-md-4">
<label class="form-label" for="title">{{ __('Reisetitel') }}</label>
{{ Form::text('title', $booking->title, array('placeholder'=>__('Reisetitel'), 'class'=>'form-control', 'id'=>'title', 'readonly')) }}
</div>
<div class="col-12">
<hr>
</div>
<div class="form-group col-sm-6 col-md-4">
<label class="form-label" for="paying_out">{{ __('K-Wunsch') }}</label>
{{ Form::text('paying_out', $booking->getPayingOutType(), array('placeholder'=>__('K-Wunsch'), 'class'=>'form-control', 'id'=>'paying_out', 'readonly')) }}
</div>
<div class="form-group col-sm-6 col-md-4">
<label class="form-label" for="paying_out_status">{{ __('KW-Status') }}</label>
{{ Form::text('paying_out_status', $booking->getPayingOutStatusType(), array('placeholder'=>__('KW-Status'), 'class'=>'form-control', 'id'=>'paying_out_status', 'readonly')) }}
</div>
<div class="form-group col-sm-6 col-md-4">
<label class="form-label" for="refund">{{ __('Refund') }}</label>
{{ Form::text('refund', $booking->getRefundType(), array('placeholder'=>__('Refund'), 'class'=>'form-control', 'id'=>'refund', 'readonly')) }}
</div>
<div class="form-group col-sm-6 col-md-4">
<label class="form-label" for="refund_date">{{ __('Refund Datum') }}</label>
{{ Form::text('refund_date', _format_date($booking->refund_date), array('placeholder'=>__('Refund Datum'), 'class'=>'form-control', 'id'=>'refund_date', 'readonly')) }}
</div>
<div class="form-group col-sm-6 col-md-4">
<label class="form-label" for="xx_tkt">{{ __('XX TKT') }}</label>
{{ Form::text('xx_tkt', $booking->getXxTktType(), array('placeholder'=>__('XX TKT'), 'class'=>'form-control', 'id'=>'xx_tkt', 'readonly')) }}
</div>
<div class="form-group col-sm-6 col-md-4">
<label class="form-label" for="xx_tkt_date">{{ __('XX TKT Datum') }}</label>
{{ Form::text('xx_tkt_date', _format_date($booking->xx_tkt_date), array('placeholder'=>__('XX TKT Datum'), 'class'=>'form-control', 'id'=>'xx_tkt_date', 'readonly')) }}
</div>
</div>
</div>
</div>
<!-- MyJack -->
<div class="card mb-2">
<h6 class="card-header bg-primary text-white py-2" data-toggle="collapse" data-target="#collapseBookingMyJack" aria-expanded="false" aria-controls="collapseBookingMyJack">
<strong style="line-height: 1.6em">MyJack</strong>
</h6>
<div class="collapse" id="collapseBookingMyJack">
<div class="card-body row">
<div class="form-group col-sm-4">
<label class="form-label" for="ev_number">{{ __('EV Nummer') }}</label>
{{ Form::text('ev_number', $booking->ev_number, array('placeholder'=>__('EV Nummer'), 'class'=>'form-control', 'id'=>'ev_number', 'readonly')) }}
</div>
<div class="form-group col-sm-4">
<label class="form-label" for="booking_konto">{{ __('Konto') }}</label>
{{ Form::text('booking_konto', 4011, array('placeholder'=>__('Konto'), 'class'=>'form-control', 'id'=>'booking_konto', 'readonly')) }}
</div>
<div class="form-group col-sm-4">
<label class="form-label" for="merlin_order_number">{{ __('MyJack Nr.') }}</label>
{{ Form::text('merlin_order_number', $booking->merlin_order_number, array('placeholder'=>__('MyJack Nr.'), 'class'=>'form-control', 'id'=>'merlin_order_number', 'readonly')) }}
</div>
</div>
</div>
</div>
<!-- Preis -->
<div class="card mb-2">
<h6 class="card-header bg-primary text-white py-2" data-toggle="collapse" data-target="#collapseBookingPrice" aria-expanded="false" aria-controls="collapseBookingPrice">
<strong style="line-height: 1.6em">Preis</strong>
</h6>
<div class="collapse" id="collapseBookingPrice">
<div class="card-body row">
<div class="form-group col-sm-6">
<label class="form-label" for="price">{{ __('Gesamtpreis Organisation') }}</label>
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text"></span>
</div>
{{ Form::text('price', $booking->price, array('placeholder'=>__('Gesamtpreis'), 'class'=>'form-control', 'id'=>'price', 'readonly')) }}
</div>
</div>
</div>
</div>
</div>
{{--
<div class="text-left mt-3">
<button type="submit" name="action" value="saveAll" class="btn btn-submit">{{ __('save changes') }}</button>&nbsp;
<a href="{{route('bookings')}}" class="btn btn-default">{{ __('zur Übersicht') }}</a>
<a href="{{ make_old_url('/index.php/booking/'.$booking->id.'/edit') }}" class="btn btn-default float-right">{{ __('zurück ins CRM v2') }}</a>
</div>
<hr>
--}}
<!-- Organisation -->
<div class="card mb-2">
<h6 class="card-header bg-primary text-white py-2" data-toggle="collapse" data-target="#collapseBookingOrganisation" aria-expanded="false" aria-controls="collapseBookingOrganisation">
<strong style="line-height: 1.6em">Organisation</strong>
</h6>
<div class="collapse" id="collapseBookingOrganisation">
<div class="card-body px-0">
@if($booking->new_drafts )
@if($booking->new_drafts )
@php($i = 1)
<div class="text-right mb-2">
<button type="submit" name="action" value="addItemUp" class="btn btn-sm btn-primary"><i class="fa fa-plus"></i> Neue Leistung hinzufügen <i class="fa fa-arrow-up"></i></button>
</div>
<div class="table-responsive mb-4">
<table class="table mb-0" id="table_dragula_tbody" style="min-width: 1080px">
<thead class="thead-dark">
<tr>
<th style="width: 1em"></th>
<th style="width: 1em">#</th>
<th>Leistung</th>
<th style="width: 9em">Datum von</th>
<th style="width: 9em">Datum bis</th>
<th style="width: 15em">Teilnehmer/EP</th>
<th style="width: 15em">Kinder/EP</th>
<th style="width: 8em">#</th>
</tr>
</thead>
@foreach($booking->booking_draft_items as $booking_draft_item)
<tbody class="draft_item_tbody">
<tr @if($booking_draft_item->draft_type) style="background-color: {{ $booking_draft_item->draft_type->color }}" @endif>
<td>
<span class="handle ion ion-ios-move d-inline-block bg-primary text-white p-1"></span>
</td>
<td><span class="item_pos_number">{{ $i++ }}</span></td>
<td>
<select class="selectpicker" data-style="btn-light" name="draft_item[{{$booking_draft_item->id}}][draft_type_id]" id="draft_item_{{$booking_draft_item->id }}_draft_type_id" data-live-search="true" required>
<option value="" disabled>Vorlagen-Typ*</option>
{!! HTMLHelper::getDraftTypes($booking_draft_item->draft_type_id) !!}
</select>
</td>
<td>
{{ Form::text('draft_item['.$booking_draft_item->id.'][start_date]', $booking_draft_item->start_date, array('placeholder'=>__('Start Datum'), 'class'=>'form-control datepicker-base', 'id'=>'draft_item_'.$booking_draft_item->id.'_start_dat')) }}
</td>
<td>
{{ Form::text('draft_item['.$booking_draft_item->id.'][end_date]', $booking_draft_item->end_date, array('placeholder'=>__('End Datum'), 'class'=>'form-control datepicker-base', 'id'=>'draft_item_'.$booking_draft_item->id.'_end_date')) }}
</td>
@if(in_array($booking_draft_item->draft_type_id, [24, 26, 30, 31, 32, 33, 34, 35, 36, 37, 41, 42]))
<td>
<div class="input-group">
<select class="custom-select" name="draft_item[{{$booking_draft_item->id}}][adult]" id="draft_item_{{$booking_draft_item->id }}_adult">
<option value="">0</option>
{!! HTMLHelper::getRangeOptions($booking_draft_item->adult, 10, '') !!}
</select>
{{ Form::text('draft_item['.$booking_draft_item->id.'][price_adult]', $booking_draft_item->price_adult, array('placeholder'=>__('Preis in €'), 'class'=>'form-control', 'id'=>'draft_item_'.$booking_draft_item->id.'_price_adult', 'maxlength'=>10)) }}
<span class="input-group-append">
@php($i = 1)
<div class="text-right mb-2 pr-2">
<button type="submit" name="action" value="addItemUp" class="btn btn-sm btn-primary"><i class="fa fa-plus"></i> Neue Leistung hinzufügen <i class="fa fa-arrow-up"></i></button>
</div>
<div class="table-responsive mb-4" style="overflow: visible">
<table class="table mb-0" id="table_dragula_tbody" style="min-width: 1080px">
<thead class="thead-dark">
<tr>
<th style="width: 1em"></th>
<th style="width: 1em">#</th>
<th>Leistung</th>
<th style="width: 9em">Datum von</th>
<th style="width: 9em">Datum bis</th>
<th style="width: 15em">Teilnehmer/EP</th>
<th style="width: 15em">Kinder/EP</th>
<th style="width: 8em">#</th>
</tr>
</thead>
@foreach($booking->booking_draft_items as $booking_draft_item)
<tbody class="draft_item_tbody">
<tr @if($booking_draft_item->draft_type) style="background-color: {{ $booking_draft_item->draft_type->color }}" @endif>
<td>
<span class="handle ion ion-ios-move d-inline-block bg-primary text-white p-1"></span>
</td>
<td><span class="item_pos_number">{{ $i++ }}</span></td>
<td>
<select class="selectpicker" data-style="btn-light" name="draft_item[{{$booking_draft_item->id}}][draft_type_id]" id="draft_item_{{$booking_draft_item->id }}_draft_type_id" data-live-search="true" required>
<option value="" disabled>Vorlagen-Typ*</option>
{!! HTMLHelper::getDraftTypes($booking_draft_item->draft_type_id) !!}
</select>
</td>
<td>
{{ Form::text('draft_item['.$booking_draft_item->id.'][start_date]', $booking_draft_item->start_date, array('placeholder'=>__('Start Datum'), 'class'=>'form-control datepicker-base', 'id'=>'draft_item_'.$booking_draft_item->id.'_start_dat')) }}
</td>
<td>
{{ Form::text('draft_item['.$booking_draft_item->id.'][end_date]', $booking_draft_item->end_date, array('placeholder'=>__('End Datum'), 'class'=>'form-control datepicker-base', 'id'=>'draft_item_'.$booking_draft_item->id.'_end_date')) }}
</td>
@if(in_array($booking_draft_item->draft_type_id, [24, 26, 30, 31, 32, 33, 34, 35, 36, 37, 41, 42]))
<td>
<div class="input-group">
<select class="custom-select" name="draft_item[{{$booking_draft_item->id}}][adult]" id="draft_item_{{$booking_draft_item->id }}_adult">
<option value="">0</option>
{!! HTMLHelper::getRangeOptions($booking_draft_item->adult, 10, '') !!}
</select>
{{ Form::text('draft_item['.$booking_draft_item->id.'][price_adult]', $booking_draft_item->price_adult, array('placeholder'=>__('Preis in €'), 'class'=>'form-control', 'id'=>'draft_item_'.$booking_draft_item->id.'_price_adult', 'maxlength'=>10)) }}
<span class="input-group-append">
<span class="input-group-text"></span>
</span>
</div>
</td>
<td>
<div class="input-group">
<select class="custom-select" name="draft_item[{{$booking_draft_item->id}}][children]" id="draft_item_{{$booking_draft_item->id}}_children">
<option value="">0</option>
{!! HTMLHelper::getRangeOptions($booking_draft_item->children, 10, '') !!}
</select>
{{ Form::text('draft_item['.$booking_draft_item->id.'][price_children]', $booking_draft_item->price_children, array('placeholder'=>__('Preis in €'), 'class'=>'form-control', 'id'=>'draft_item_'.$booking_draft_item->id.'_price_children')) }}
<span class="input-group-append">
</div>
</td>
<td>
<div class="input-group">
<select class="custom-select" name="draft_item[{{$booking_draft_item->id}}][children]" id="draft_item_{{$booking_draft_item->id}}_children">
<option value="">0</option>
{!! HTMLHelper::getRangeOptions($booking_draft_item->children, 10, '') !!}
</select>
{{ Form::text('draft_item['.$booking_draft_item->id.'][price_children]', $booking_draft_item->price_children, array('placeholder'=>__('Preis in €'), 'class'=>'form-control', 'id'=>'draft_item_'.$booking_draft_item->id.'_price_children')) }}
<span class="input-group-append">
<span class="input-group-text"></span>
</span>
</div>
</td>
@else
<td>-</td>
<td>-</td>
@endif
<td>
<button type="button" name="" value="up_{{$booking_draft_item->id}}" class="btn btn-xs btn-primary py-0 move-up-btn"><i class="fa fa-arrow-up"></i> </button>
<button type="button" name="" value="down_{{$booking_draft_item->id}}" class="btn btn-xs btn-primary mr-2 move-down-btn"><i class="fa fa-arrow-down"></i> </button>
<a class="text-danger" href="{{ route('booking_draft_item_delete', [$booking_draft_item->id]) }}" onclick="return confirm('{{__('Wirklich löschen?')}}');"><i class="fa fa-trash-alt"></i></a>
</td>
</tr>
<tr @if($booking_draft_item->draft_type) style="background-color: {{ $booking_draft_item->draft_type->color }}" @endif class="border-none">
</div>
</td>
@else
<td>-</td>
<td>-</td>
@endif
<td>
<button type="button" name="" value="up_{{$booking_draft_item->id}}" class="btn btn-xs btn-primary py-0 move-up-btn"><i class="fa fa-arrow-up"></i> </button>
<button type="button" name="" value="down_{{$booking_draft_item->id}}" class="btn btn-xs btn-primary mr-2 move-down-btn"><i class="fa fa-arrow-down"></i> </button>
<a class="text-danger" href="{{ route('booking_draft_item_delete', [$booking_draft_item->id]) }}" onclick="return confirm('{{__('Wirklich löschen?')}}');"><i class="fa fa-trash-alt"></i></a>
</td>
</tr>
<tr @if($booking_draft_item->draft_type) style="background-color: {{ $booking_draft_item->draft_type->color }}" @endif class="border-none">
@if(in_array($booking_draft_item->draft_type_id, [36, 37]))
<td colspan="3">
<select class="custom-select" name="draft_item[{{$booking_draft_item->id}}][days_duration]" id="draft_item_{{$booking_draft_item->id }}_days_duration">
<option value="">0 Tage</option>
{!! HTMLHelper::getRangeOptions($booking_draft_item->days_duration, 40, ' Tage') !!}
</select>
</td>
<td colspan="4">
@elseif(in_array($booking_draft_item->draft_type_id, [38, 39,40]))
<td colspan="3">
<div class="input-group">
@if(in_array($booking_draft_item->draft_type_id, [38]))
<select class="custom-select" name="draft_item[{{$booking_draft_item->id}}][days_duration]" id="draft_item_{{$booking_draft_item->id }}_days_duration">
<option value="">0 Tage</option>
{!! HTMLHelper::getRangeOptions($booking_draft_item->days_duration, 40, ' T.') !!}
</select>
@endif
{{ Form::text('draft_item['.$booking_draft_item->id.'][price]', $booking_draft_item->price, array('placeholder'=>__('Preis in €'), 'class'=>'form-control', 'id'=>'draft_item_'.$booking_draft_item->id.'_price',)) }}
<span class="input-group-append">
@if(in_array($booking_draft_item->draft_type_id, [36, 37]))
<td colspan="3">
<select class="custom-select" name="draft_item[{{$booking_draft_item->id}}][days_duration]" id="draft_item_{{$booking_draft_item->id }}_days_duration">
<option value="">0 Tage</option>
{!! HTMLHelper::getRangeOptions($booking_draft_item->days_duration, 40, ' Tage') !!}
</select>
</td>
<td colspan="4">
@elseif(in_array($booking_draft_item->draft_type_id, [38, 39,40]))
<td colspan="3">
<div class="input-group">
@if(in_array($booking_draft_item->draft_type_id, [38]))
<select class="custom-select" name="draft_item[{{$booking_draft_item->id}}][days_duration]" id="draft_item_{{$booking_draft_item->id }}_days_duration">
<option value="">0 Tage</option>
{!! HTMLHelper::getRangeOptions($booking_draft_item->days_duration, 40, ' T.') !!}
</select>
@endif
{{ Form::text('draft_item['.$booking_draft_item->id.'][price]', $booking_draft_item->price, array('placeholder'=>__('Preis in €'), 'class'=>'form-control', 'id'=>'draft_item_'.$booking_draft_item->id.'_price',)) }}
<span class="input-group-append">
<span class="input-group-text"></span>
</span>
</div>
</td>
<td colspan="4">
@else
<td colspan="7">
@endif
{{ Form::textarea('draft_item['.$booking_draft_item->id.'][service]', $booking_draft_item->service, array('placeholder'=>__('Leistungen'), 'class'=>'form-control autoExpand', 'id'=>'draft_item_'.$booking_draft_item->id.'_service', 'rows'=>'1', 'data-min-rows'=>'1')) }}
</td>
<td>
<label class="custom-control custom-checkbox mt-2" style="margin-right: 20px;">
{!! Form::checkbox('draft_item['.$booking_draft_item->id.'][in_pdf]', 1, $booking_draft_item->in_pdf, ['class'=>'custom-control-input']) !!}
<span class="custom-control-label">{{__('in PDF')}}</span>
</label>
</td>
</div>
</td>
<td colspan="4">
@else
<td colspan="7">
@endif
{{ Form::textarea('draft_item['.$booking_draft_item->id.'][service]', $booking_draft_item->service, array('placeholder'=>__('Leistungen'), 'class'=>'form-control autoExpand', 'id'=>'draft_item_'.$booking_draft_item->id.'_service', 'rows'=>'1', 'data-min-rows'=>'1')) }}
</td>
<td>
<label class="custom-control custom-checkbox mt-2" style="margin-right: 20px;">
{!! Form::checkbox('draft_item['.$booking_draft_item->id.'][in_pdf]', 1, $booking_draft_item->in_pdf, ['class'=>'custom-control-input']) !!}
<span class="custom-control-label">{{__('in PDF')}}</span>
</label>
</td>
</tr>
</tbody>
@endforeach
</table>
</tr>
</tbody>
@endforeach
</table>
</div>
<div class="float-right pr-2">
<button type="submit" name="action" value="addItemDown" class="btn btn-sm btn-primary"><i class="fa fa-plus"></i> Neue Leistung hinzufügen <i class="fa fa-arrow-down"></i></button>
</div>
<div class="text-left mt-3 pl-2">
<button type="submit" name="action" value="saveAll" class="btn btn-sm btn-secondary">{{ __('save changes') }}</button>&nbsp;
<a href="{{route('bookings')}}" class="btn btn-sm btn-default">{{ __('zur Übersicht') }}</a>
</div>
@endif
</div>
</div>
@endif
<div class="text-right">
<button type="submit" name="action" value="addItemDown" class="btn btn-sm btn-primary"><i class="fa fa-plus"></i> Neue Leistung hinzufügen <i class="fa fa-arrow-down"></i></button>
</div>
<div class="text-left mt-3">
<button type="submit" name="action" value="saveAll" class="btn btn-submit">{{ __('save changes') }}</button>&nbsp;
<a href="{{route('bookings')}}" class="btn btn-default">{{ __('zur Übersicht') }}</a>
<a href="{{ make_old_url('/index.php/booking/'.$booking->id.'/edit') }}" class="btn btn-default float-right">{{ __('zurück ins CRM v2') }}</a>
</div>
</div>
{!! Form::close() !!}
<!-- Mails -->
<div class="card mb-2">
<h6 class="card-header bg-primary text-white py-2" data-toggle="collapse" data-target="#collapseBookingMails" aria-expanded="true" aria-controls="collapseBookingMails">
<strong style="line-height: 1.6em">E-Mails</strong>
</h6>
<div class="collapse show" id="collapseBookingMails">
<div class="card-body px-0">
<div class="pl-2">
<button type="button" class="btn btn-sm btn-secondary" data-toggle="modal"
data-target="#modals-load-content"
data-id="new-send"
data-model="customerMail"
data-action="new-customer-mail"
data-url="{{route('customer_mail_send_mail')}}"
data-redirect="back"
data-booking_id="{{$booking->id}}"
data-route="{{ route('booking_modal_load') }}"><i class="ion ion-md-mail-open"></i>&nbsp; Neue E-Mail an Kunden</button>
<button type="button" class="btn btn-sm btn-default" data-toggle="modal"
data-target="#modals-load-content"
data-id="new-save"
data-model="customerMail"
data-action="reply-customer-mail"
data-url="{{route('customer_mail_reply_mail')}}"
data-redirect="back"
data-booking_id="{{$booking->id}}"
data-route="{{ route('booking_modal_load') }}"><i class="ion ion-md-mail-unread"></i>&nbsp;E-Mail Antwort speichern</button>
</div>
@if($booking->customer_mails)
<div class="table-responsive">
<table class="datatables-customer table table-striped">
<thead>
<tr>
<th style="max-width: 60px;">&nbsp;</th>
<th>{{__('Mail-ID')}}</th>
{{-- <th>{{__('E-Mail')}}</th> --}}
<th>{{__('Betreff')}}</th>
<th>{{__('Anhang')}}</th>
<th>{{__('gesendet')}}</th>
<th>{{__('Gesendet')}}</th>
<th>{{__('#')}}</th>
</tr>
</thead>
<tbody>
@foreach($booking->customer_mails as $customer_mail)
<tr role="row" class="odd">
<td>
<a href="#" class="btn icon-btn btn-sm btn-primary"><span class="fa fa-edit"></span></a>
</td>
<td>
<a data-order="{{ $customer_mail->id }}" href="{{route('customer_mail_detail', [$customer_mail->id])}}" data-id="{{$customer_mail->id}}">{{$customer_mail->id}}</a>
</td>
{{-- <td>{{ $customer_mail->email }}</td> --}}
<td> <a href="javascript:void(0)" class="badge @if($customer_mail->is_answer) badge-default @else badge-secondary @endif" data-toggle="modal"
data-target="#modals-load-content"
data-id="new"
data-model="customerMail"
data-action="show-customer-mail"
data-url=""
data-redirect="back"
data-customer_mail_id="{{$customer_mail->id}}"
data-route="{{ route('booking_modal_load') }}">
@if($customer_mail->reply_id)
<i class="ion ion-ios-redo ui-w-30 text-center" style="opacity: 0.7"></i>
@else
<i class="ion ion-ios-mail ui-w-30 text-center" style="opacity: 0.7"></i>
@endif
{{ $customer_mail->subject }}
</a>
</td>
<td>{{ $customer_mail->customer_files->count() }}</td>
<td>
@if($customer_mail->send)
<span class="badge badge-pill badge-success"><i class="fa fa-check"></i></span>
@else
<span class="badge badge-pill badge-danger"><i class="fa fa-times"></i></span>
@endif
</td>
<td>{{ $customer_mail->sent_at }}</td>
<td>
<a href="javascript:void(0)" class="btn btn-xs btn-secondary" data-toggle="modal"
data-target="#modals-load-content"
data-id="reply-send"
data-model="customerMail"
data-action="new-customer-mail"
data-url="{{route('customer_mail_send_mail')}}"
data-redirect="back"
data-customer_mail_id="{{$customer_mail->id}}"
data-booking_id="{{$booking->id}}"
data-route="{{ route('booking_modal_load') }}">
<span title="Antwort auf E-Mail senden" data-placement="left" rel="tooltip">
<i class="ion ion-ios-redo"></i> <i class="ion ion-md-mail-open"></i>
</span>
</a>
&nbsp;
<a href="javascript:void(0)" class="btn btn-xs btn-default" data-toggle="modal"
data-target="#modals-load-content"
data-id="reply-save"
data-model="customerMail"
data-action="reply-customer-mail"
data-url="{{route('customer_mail_reply_mail')}}"
data-redirect="back"
data-customer_mail_id="{{$customer_mail->id}}"
data-booking_id="{{$booking->id}}"
data-route="{{ route('booking_modal_load') }}">
<span title="Antwort auf E-Mail speichern" data-placement="left" rel="tooltip">
<i class="ion ion-ios-redo"></i> <i class="ion ion-md-mail-unread"></i>
</span>
</a>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
@endif
</div>
</div>
</div>
<div class="modal fade" id="modals-load-next">
<div class="modal-dialog modal-lg">
</div>
</div>
<script>
$(document).ready(function() {
$('[rel="tooltip"]').tooltip({trigger: "hover"});
$('#top-nav-quick-jump .nav-link').on('click', function (e) {
e.preventDefault();
$('#top-nav-quick-jump .nav-link').removeClass('active');
$(this).addClass('active');
var collapse_id = $(this).data('collapse');
console.log(collapse_id);
$(collapse_id).collapse('show');
// animate
$('html, body').animate({
scrollTop: $(collapse_id).parent('.card').offset().top
}, 300, function(){
// when done, add hash to url
// (default click behaviour)
//window.location.hash = collapse_id;
});
});
$('.datatables-customer').dataTable({
"bLengthChange": false,
"iDisplayLength": 50,
"order": [[ 5, "desc" ]],
"language": {
"url": "/js/German.json"
}
});
$.dragYScroll();
var sort_item_pos_number = function(){

View file

@ -3,14 +3,7 @@
@section('content')
<style>
body {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.btn-xs {
line-height: 1.3em;
}
@ -49,7 +42,7 @@
<div class="card-body py-3">
<div class="media align-items-center">
<div class="media-body">
<a href="{{route('customer_mails')}}" class="btn btn-default btn-block">{{ __('zur Übersicht') }}</a>
<a href="{{$back}}" class="btn btn-default btn-block">{{ __('zurück') }}</a>
</div>
<a href="javascript:void(0)" class="messages-sidebox-toggler d-lg-none d-block text-muted text-large font-weight-light pl-4">&times;</a>
</div>
@ -159,15 +152,12 @@
<!-- / Message content -->
<!-- Message attachments -->
<div class="px-4 pt-4 pb-2">
@if($customer_mail->customer)
<p><strong>Kunde: </strong>
{{ $customer_mail->customer->salutation->name }} {{ $customer_mail->customer->firstname }} {{ $customer_mail->customer->name }}
</p>
@endif
@if($customer_mail->booking)
<p><strong>Buchung: </strong>
{{ $customer_mail->booking_id }}
@ -179,7 +169,6 @@
@endif
</p>
@endif
@if($customer_mail->send)
<span class="badge badge-success">Mail gesendet</span>
<p>Datum: {{$customer_mail->sent_at}}</p>
@ -190,76 +179,37 @@
@endif
</div>
@if($customer_mail->customer_files)
<hr class="border-light m-0">
{{-- <div class="px-4 pt-4 pb-2">
<h6 class="small font-weight-semibold mb-4">Fehler</h6>
<div class="px-4 pt-4 pb-2">
<h6 class="small font-weight-semibold mb-4">Datei-Anhänge</h6>
<div class="row">
@foreach($customer_mail->customer_files as $file)
<div class="col-sm-6 col-lg-12 col-xl-4">
<div class="message-attachment ui-bordered p-2 mr-3 mb-3">
<div class="message-attachment-img" style="background-image: url(assets/img/bg/5.jpg)"></div>
<div class="message-attachment-file display-4"><i class="{{$file->getIconExt()}}"></i></div>
<div class="media-body ml-3">
<strong class="message-attachment-filename">image_1.jpg</strong>
<div class="text-muted small">527KB</div>
<strong class="message-attachment-filename">{{$file->filename}}</strong>
<div class="text-muted small">{{$file->formatBytes()}}</div>
<div>
<a href="javascript:void(0)">View</a> &nbsp;
<a href="javascript:void(0)">Download</a>
<a href="{{$file->getURL()}}" target="_blank" class="mail-att-show">Vorschau</a> &nbsp;
</div>
</div>
</div>
</div>
<div class="col-sm-6 col-lg-12 col-xl-4">
@endforeach
<div class="message-attachment ui-bordered p-2 mr-3 mb-3">
<div class="message-attachment-img" style="background-image: url(assets/img/bg/6.jpg)"></div>
<div class="media-body ml-3">
<strong class="message-attachment-filename">image_2.jpg</strong>
<div class="text-muted small">269KB</div>
<div>
<a href="javascript:void(0)">View</a> &nbsp;
<a href="javascript:void(0)">Download</a>
</div>
</div>
</div>
</div>
<div class="col-sm-6 col-lg-12 col-xl-4">
<div class="message-attachment ui-bordered p-2 mr-3 mb-3">
<div class="message-attachment-file display-4"><i class="far fa-file-pdf"></i></div>
<div class="media-body ml-3">
<strong class="message-attachment-filename">assignment_letter.pdf</strong>
<div class="text-muted small">156KB</div>
<div>
<a href="javascript:void(0)">View</a> &nbsp;
<a href="javascript:void(0)">Download</a>
</div>
</div>
</div>
</div>
<div class="col-sm-6 col-lg-12 col-xl-4">
<div class="message-attachment ui-bordered p-2 mr-3 mb-3">
<div class="message-attachment-file display-4"><i class="far fa-file-archive"></i></div>
<div class="media-body ml-3">
<strong class="message-attachment-filename">app_update.zip</strong>
<div class="text-muted small">1.35MB</div>
<div>
<a href="javascript:void(0)">Download</a>
</div>
</div>
</div>
</div>
</div>
</div><hr class="border-light m-0">
<!-- / Message attachments -->
</div>
@endif
{{--
<!-- Footer -->
<div class="text-right p-4">
<button type="button" class="btn btn-primary"><i class="ion ion-ios-undo"></i>&nbsp; Reply</button>

View file

@ -0,0 +1,233 @@
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">
{{ $value->title }}
@if($value->subtitle)
<br><small class="text-muted">{{$value->subtitle}}</small>
@endif
</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
</div>
<div class="modal-body">
{!! Form::open(['url' => $value->url, 'class' => '', 'id'=>'customer-mail-form']) !!}
{{ Form::hidden('booking_id', $value->id) }}
@if(isset($value->customers))
<div class="form-row">
<div class="form-group col">
<label for="to" class="form-label">E-Mail senden an:</label>
@foreach($value->customers as $key=>$val)
<label class="custom-control custom-checkbox mt-2" style="margin-right: 20px;">
{!! Form::checkbox('send_mail_to['.$key.']', 1, $key, ['class'=>'custom-control-input']) !!}
<span class="custom-control-label">{{$val}}</span>
</label>
@endforeach
</div>
</div>
@endif
@if(isset($value->booking))
<div class="">
@if(isset($value->customer_mail))
<p><strong>Antwort auf: </strong>
{{ $value->customer_mail->id }} || {{ $value->customer_mail->subject }}
</p>
@endif
<p><strong>Buchung: </strong>
{{ $value->booking->id }}
@if($value->booking->travel_country_id)
{{ " | ".$value->booking->travel_country->name }}
@endif
@if($value->booking->travelagenda_id)
{{ " | ".$value->booking->travel_agenda->name }}
@endif
</p>
@if($value->booking->customer)
<p><strong>Kunde: </strong>
{{ $value->booking->customer->salutation->name }} {{ $value->booking->customer->firstname }} {{ $value->booking->customer->name }}
</p>
@endif
</div>
<div class="form-row">
<div class="form-group col">
<label for="mail_from" class="form-label">E-Mail von:</label>
{{ Form::text('mail_from', $value->booking->customer ? $value->booking->customer->email : '', array('placeholder'=>'E-Mail Adresse von', 'id'=>'mail_from', 'class'=>'form-control', 'required')) }}
</div>
</div>
<div class="form-row">
<div class="form-group col">
<label for="sent_at" class="form-label">Gesendet am:</label>
{{ Form::text('sent_at', \Carbon::now()->format('d.m.Y H:i'), array('placeholder'=>__(\Carbon::now()->format('d.m.Y - H:i')), 'class'=>'form-control b-material-datetime-picker', 'id'=>'sent_at')) }}
</div>
</div>
@endif
<div class="form-row">
<div class="form-group col">
<label for="subject" class="form-label">Betreff</label>
{{ Form::text('subject', $value->subject, array('placeholder'=>$value->s_placeholder, 'id'=>'subject', 'class'=>'form-control', 'required')) }}
</div>
</div>
<div class="form-group mb-1">
<label class="form-label" for="message">Nachricht</label>
{{ Form::textarea('message', $value->message, array('placeholder'=>$value->m_placeholder, 'class'=>'form-control', 'rows'=>15)) }}
</div>
@if(isset($value->customers))
<p>Platzhalter: #geehrte/r# #Anrede# #Vorname# #Nachname# #Reiseland# #Programm# </p>
@endif
@if(isset($value->customer_mail))
{{ Form::hidden('customer_mail_id', $value->customer_mail->id) }}
@endif
<hr>
{!! Form::close() !!}
<div class="row">
<div class="col-12">
<h5>Datei Anhänge</h5>
</div>
<div class="col-12">
<div class="alert alert-danger alert-dismissable" style="display:none;"></div>
</div>
<div class="col-6" id="preview-mail-attachment">
</div>
<div class="col-6">
{!! Form::open([ 'url' => route('customer_mail_upload_attachment', ['tmp']), 'method' => 'post', 'files' => true, 'enctype' => 'multipart/form-data', 'class' => 'dropzone', 'id' => 'uploadAttachmentFile' ]) !!}
<div class="fallback">
<input name="file" type="file" multiple>
</div>
{!! Form::close() !!}
</div>
</div>
@if(isset($value->customer_mail))
<hr>
@include('customer.mail.modal-show-mail-inner', ['customer_mail' => $value->customer_mail])
@endif
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">schließen</button>
@if(isset($value->customers))
<button type="submit" id="submit-button-form" class="btn btn-primary"><i class="ion ion-ios-mail-open"></i> senden</button>
@endif
@if(isset($value->booking))
<button type="submit" id="submit-button-form" class="btn btn-primary"><i class="ion ion-ios-mail-open"></i> speichern</button>
@endif
</div>
<div class="message-attachment ui-bordered p-2 mr-3 mb-3 d-none" id="mail-attachment-template">
<div class="message-attachment-file display-4"><i class="mail-att-icon"></i></div>
<div class="media-body ml-3">
<strong class="message-attachment-filename"> </strong>
<div class="text-muted small mail-att-size"> </div>
<div>
<a href="javascript:void(0)" target="_blank" class="mail-att-show">Vorschau</a> &nbsp;
<a href="javascript:void(0)" class="mail-att-delete">entfernen</a>
</div>
</div>
</div>
</div>
<script type="text/javascript">
function add_mail_attachment_preview(file, response){
var template = $('#mail-attachment-template').clone()
.removeAttr('id').removeClass('d-none')
.attr('data-id', response.file_id);
template.find('.mail-att-icon').addClass(response.file_icon);
template.find('.message-attachment-filename').text(response.filename);
template.find('.mail-att-size').text(response.file_format_bytes);
///'storage/file/{id}/{disk}
template.find('.mail-att-show').attr('href', response.file_url);
template.find('.mail-att-delete').on('click', function () {
$(this).parents('.message-attachment').remove();
});
$('#preview-mail-attachment').append(template);
}
$(document).ready(function() {
$('.b-material-datetime-picker').bootstrapMaterialDatePicker({
weekStart: 1,
format : 'DD.MM.YYYY HH:mm',
shortTime: false,
nowButton : true,
clearButton: true,
lang: 'de',
//currentDate: ''
});
$("#submit-button-form").click(function(event) {
@if(isset($value->customers))
if( !confirm('E-Mail wirklich senden?') ){
event.preventDefault();
return;
}
@endif
var message_attachment = $('#preview-mail-attachment').find('.message-attachment');
$.each( message_attachment, function( index, value ){
$('#customer-mail-form').append('<input type="hidden" name="message_attachment_id[]" value="'+$(value).data('id')+'">');
});
$( "#customer-mail-form" ).submit();
// event.preventDefault();
});
Dropzone.autoDiscover = false;
$("#uploadAttachmentFile").dropzone({
uploadMultiple: false,
parallelUploads: 1,
maxFilesize: 32,
addRemoveLinks: true,
dictDefaultMessage: 'Hier klicken, oder Datei hier reinziehen (Drag&Drop)',
dictFallbackMessage: 'Ihr Browser unterstützt Drag&Drop Dateiuploads nicht',
dictFallbackText: 'Benutzen Sie das Formular um Ihre Dateien hochzuladen',
dictFileTooBig: "Die Datei ist zu groß. Die maximale Dateigröße beträgt 32 MB",
dictInvalidFileType: 'Eine Datei dieses Typs kann nicht hochgeladen werden',
dictResponseError: "Der Server hat ihre Anfrage mit Status error abgelehnt",
dictCancelUpload: 'Hochladen abbrechen',
dictCancelUploadConfirmation: null,
dictRemoveFile: 'Datei entfernen',
dictMaxFilesExceeded: 'Sie können keine weiteren Dateien mehr hochladen',
acceptedFiles: "image/jpeg,image/pjpeg,image/png,image/gif,application/pdf,text/plain",
// The setting up of the dropzone
init:function() {
this.on("removedfile", function(file) {
var _ele = $('.alert-danger');
_ele.fadeOut();
});
this.on("addedfile", function (file) {
var _ele = $('.alert-danger');
_ele.fadeOut();
});
},
error: function(file, response) {
var message
if($.type(response) === "string")
message = response; //dropzone sends it's own error messages in string
else
message = response.message;
var _ele = $('.alert-danger');
_ele.fadeIn();
console.log(message);
_ele.text(message);
},
success: function(file,response) {
// console.log(file);
// console.log(response);
if(response.error === false){
add_mail_attachment_preview(file, response);
this.removeFile(file);
}
}
});
});
</script>

View file

@ -0,0 +1,117 @@
<div class="card mb-2">
<!-- Header -->
<div class="media px-4 pt-4 pb-2">
<a href="javascript:void(0)" class="messages-sidebox-toggler d-lg-none d-block align-self-center text-muted text-large pr-3 mr-3"><i class="ion ion-md-more"></i></a>
<!-- Sender photo -->
<div class="media-body">
<!-- Sender & date -->
<div class="mb-1">
@if($customer_mail->is_answer)
Antwort von:<br>
@else
Gesendet an:<br>
@endif
&lt;<a href="mailto:{{$customer_mail->email}}">{{$customer_mail->email}}</a>&gt; {{$customer_mail->sent_at }}
</div>
<!-- Subject -->
<h5 class="line-height-inherit m-0">{{$customer_mail->subject}}</h5>
</div>
</div>
<hr class="border-light m-0">
<!-- / Header -->
{{-- <!-- Controls -->
<div class="media flex-wrap align-items-center p-2">
<div class="media-body d-flex flex-wrap flex-basis-100 flex-basis-sm-auto">
<button type="button" class="btn btn-default borderless md-btn-flat icon-btn messages-tooltip text-muted mr-3" title="Back"><i class="ion ion-md-arrow-back"></i></button>
<button type="button" class="btn btn-default borderless md-btn-flat icon-btn messages-tooltip text-muted" title="Mark as unread"><i class="ion ion-md-mail-unread"></i></button>
<button type="button" class="btn btn-default borderless md-btn-flat icon-btn messages-tooltip text-muted" title="Mark as important"><i class="ion ion-md-alert"></i></button>
<button type="button" class="btn btn-default borderless md-btn-flat icon-btn messages-tooltip text-muted" title="Move to spam"><i class="ion ion-md-folder-open"></i></button>
<button type="button" class="btn btn-default borderless md-btn-flat icon-btn messages-tooltip text-muted" title="Move to trash"><i class="ion ion-md-trash"></i></button>
</div>
<div class="d-flex flex-wrap align-items-center ml-auto">
<button type="button" class="btn btn-default borderless md-btn-flat text-muted px-3"><i class="ion ion-ios-undo"></i>&nbsp; Reply</button>
<div class="text-lighter">|</div>
<button type="button" class="btn btn-default borderless md-btn-flat text-muted px-3">Forward &nbsp;<i class="ion ion-ios-redo"></i></button>
</div>
</div>
<hr class="border-light m-0">
<!-- / Controls -->
--}}
<div class="p-4">
{!! nl2br($customer_mail->message) !!}
</div>
<hr class="border-light m-0">
<!-- Message infos -->
<div class="px-4 pt-4 pb-2">
@if($customer_mail->customer)
<p><strong>Kunde: </strong>
{{ $customer_mail->customer->salutation->name }} {{ $customer_mail->customer->firstname }} {{ $customer_mail->customer->name }}
</p>
@endif
@if($customer_mail->booking)
<p><strong>Buchung: </strong>
{{ $customer_mail->booking_id }}
@if($customer_mail->booking->travel_country_id)
{{ " | ".$customer_mail->booking->travel_country->name }}
@endif
@if($customer_mail->booking->travelagenda_id)
{{ " | ".$customer_mail->booking->travel_agenda->name }}
@endif
</p>
@endif
@if($customer_mail->send)
<span class="badge badge-success">Mail gesendet</span>
<p>Datum: {{$customer_mail->sent_at}}</p>
@endif
@if($customer_mail->fail)
<span class="badge badge-danger">Mail Fehler</span>
<p>{{$customer_mail->error }}</p>
@endif
</div>
<!-- Message attachments -->
@if($customer_mail->customer_files)
<hr class="border-light m-0">
<div class="px-4 pt-4 pb-2">
<h6 class="small font-weight-semibold mb-4">Datei-Anhänge</h6>
<div class="row">
@foreach($customer_mail->customer_files as $file)
<div class="col-sm-6 col-lg-12 col-xl-4">
<div class="message-attachment ui-bordered p-2 mr-3 mb-3">
<div class="message-attachment-file display-4"><i class="{{$file->getIconExt()}}"></i></div>
<div class="media-body ml-3">
<strong class="message-attachment-filename">{{$file->filename}}</strong>
<div class="text-muted small">{{$file->formatBytes()}}</div>
<div>
<a href="{{$file->getURL()}}" target="_blank" class="mail-att-show">Vorschau</a> &nbsp;
</div>
</div>
</div>
</div>
@endforeach
</div>
</div>
@endif
{{--
<!-- Footer -->
<div class="text-right p-4">
<button type="button" class="btn btn-primary"><i class="ion ion-ios-undo"></i>&nbsp; Reply</button>
&nbsp;
<button type="button" class="btn btn-default">Forward &nbsp;<i class="ion ion-ios-redo"></i></button>
</div>
--}}
<!-- / Footer -->
</div>

View file

@ -0,0 +1,25 @@
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">
{{ $value->title }}
</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
</div>
<div class="modal-body">
@include('customer.mail.modal-show-mail-inner', ['customer_mail' => $customer_mail])
@if($customer_mail->customer_mail)
@include('customer.mail.modal-show-mail-inner', ['customer_mail' => $customer_mail->customer_mail])
@endif
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">schließen</button>
</div>
</div>
<script type="text/javascript">
$(document).ready(function() {
});
</script>

View file

@ -128,7 +128,6 @@
data-name=""
data-active="1"
data-pos="0"
>Neuen Typ anlegen</button>
</div>
</div>

View file

@ -30,20 +30,21 @@
<link rel="stylesheet" href="{{ mix('/vendor/libs/growl/growl.css') }}">
<link rel="stylesheet" href="{{ asset('/vendor/laravel-filemanager/css/dropzone.min.css') }}">
@if(isset($lfm_helper))
<link rel="stylesheet" href="{{ asset('/vendor/laravel-filemanager/css/dropzone.min.css') }}">
@else
<link rel="stylesheet" href="{{ asset('/vendor/libs/dropzone/dropzone.css') }}">
{{-- <link rel="stylesheet" href="{{ asset('/vendor/libs/dropzone/dropzone.css') }}"> --}}
@endif
<link rel="stylesheet" href="{{ mix('/vendor/libs/bootstrap-select/bootstrap-select.css') }}">
<link rel="stylesheet" href="{{ mix('/vendor/libs/select2/select2.css') }}">
<link rel="stylesheet" href="{{ mix('/vendor/libs/datatables/datatables.css') }}">
<link rel="stylesheet" href="{{ mix('/vendor/libs/bootstrap-datepicker/bootstrap-datepicker.css') }}">
<link rel="stylesheet" href="{{ asset('/vendor/libs/bootstrap-material-datetimepicker/bootstrap-material-datetimepicker.css') }}">
<!--
<link rel="stylesheet" href="{{ mix('/vendor/libs/bootstrap-daterangepicker/bootstrap-daterangepicker.css') }}">
-->
@ -70,7 +71,7 @@
<!-- Application stylesheets -->
<link rel="stylesheet" href="{{ mix('/css/application.css') }}{{ get_file_last_time('js/application.css') }}">
<link rel="stylesheet" href="{{ mix('/css/application.css') }}?v=1{{ get_file_last_time('js/application.css') }}">
<script src="{{ asset('/js/jquery.min.js') }}"></script>
<link rel="stylesheet" type="text/css" href="{{ asset('/css/cookieconsent.min.css') }}" />
@ -113,11 +114,14 @@
<script src="{{ mix('/vendor/js/sidenav.js') }}"></script>
<script src="{{ mix('/vendor/libs/growl/growl.js') }}"></script>
<script src="{{ asset('/vendor/libs/js-cookie/src/js.cookie.js') }}"></script>
<script src="{{ asset('/vendor/libs/moment-develop/min/moment.min.js') }}"></script>
<script src="{{ asset('/vendor/libs/moment-develop/locale/de.js') }}"></script>
<script src="{{ asset('/vendor/laravel-filemanager/js/dropzone.min.js') }}"></script>
@if(isset($lfm_helper))
<script src="{{ asset('/vendor/laravel-filemanager/js/dropzone.min.js') }}"></script>
@else
<script src="{{asset('/vendor/libs/dropzone/dropzone.js')}}"></script>
{{-- <script src="{{asset('/vendor/libs/dropzone/dropzone.js')}}"></script>--}}
@endif
<script src="{{ mix('/vendor/libs/validate/validate.js') }}"></script>
@ -130,6 +134,8 @@
<!--
<script src="{{ mix('/vendor/libs/bootstrap-daterangepicker/bootstrap-daterangepicker.js') }}"></script>
-->
<script src="{{ asset('/vendor/libs/bootstrap-material-datetimepicker/bootstrap-material-datetimepicker.js') }}"></script>
<script src="{{asset('/js/bootstrap-datepicker.de.min.js')}}"></script>
<script src="{{ mix('/vendor/libs/dragula/dragula.js') }}"></script>
@ -143,7 +149,7 @@
@if(isset($lfm_helper))
<script src="{{ asset('/vendor/laravel-filemanager/js/cropper.min.js') }}"></script>
<script src="{{ asset('/js/filemanager.js?v3') }}"></script>
<script src="{{ asset('/js/filemanager.js?v=3') }}"></script>
@endif
<!-- Libs -->
@ -154,7 +160,7 @@
<!-- Application javascripts -->
<script src="{{ mix('/js/application.js') }}"></script>
<script src="{{ asset('/js/custom.js?v2') }}{{ get_file_last_time('/js/custom.js') }}"></script>
<script src="{{ asset('/js/custom.js?v=4') }}{{ get_file_last_time('/js/custom.js') }}"></script>
@include('asset.js')

View file

@ -230,6 +230,11 @@
<a href="{{ route('admin_settings_travel_nationality') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-people"></i><div>{{ __('Nationalitäten') }}</div></a>
</li>
@endif
@if(Auth::user()->isPermission('sua-st-bs'))
<li class="sidenav-item{{ Request::is('admin/settings/booking/status') ? ' active' : '' }}">
<a href="{{ route('admin_settings_booking_status') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-stats"></i><div>{{ __('Reisestatus') }}</div></a>
</li>
@endif
@if(Auth::user()->isPermission('sua-st-ke'))
<li class="sidenav-item{{ Request::is('admin/settings/keyword') ? ' active' : '' }}">
<a href="{{ route('admin_settings_keyword') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-key"></i><div>{{ __('Keywords') }}</div></a>

View file

@ -59,7 +59,7 @@
</div>
</div>
<div class="form-row align-items-center">
<div class="col-md-6 mb-4">
<div class="col-md-4 mb-4">
<label class="form-label" for="travel_option_country_id">Filter Reiseland</label>
<select class="custom-select" name="travel_option_country_id" id="travel_option_country_id">
<option value="">Filter aus</option>
@ -68,12 +68,59 @@
@endforeach
</select>
</div>
<div class="col-md-6 mb-4">
<div class="col-md-4 mb-4">
<label class="form-label" for="travel_option_agenda_id">Filter Programm</label>
<select class="custom-select" name="travel_option_agenda_id" id="travel_option_agenda_id">
<option value="">Filter aus</option>
</select>
</div>
<div class="col-md-4 mb-4">
<label class="form-label" for="travel_option_lead_status_id">Filter Status</label>
<select class="custom-select" name="travel_option_lead_status_id" id="travel_option_lead_status_id">
<option value="">Filter aus</option>
@foreach($filter_lead_status as $id=>$name)
<option value="{{$id}}">{{$name}}</option>
@endforeach
</select>
</div>
</div>
<div class="form-row align-items-center">
<div class="col-md-3 mb-4">
<label class="form-label" for="travel_option_paying_out">Filter K-Wunsch</label>
<select class="custom-select" name="travel_option_paying_out" id="travel_option_paying_out">
<option value="">Filter aus</option>
@foreach($filter_paying_out as $id=>$name)
<option value="{{$id}}">{{$name}}</option>
@endforeach
</select>
</div>
<div class="col-md-3 mb-4">
<label class="form-label" for="travel_option_paying_out_status">Filter KW-Status</label>
<select class="custom-select" name="travel_option_paying_out_status" id="travel_option_paying_out_status">
<option value="">Filter aus</option>
@foreach($filter_paying_out_status as $id=>$name)
<option value="{{$id}}">{{$name}}</option>
@endforeach
</select>
</div>
<div class="col-md-3 mb-4">
<label class="form-label" for="travel_option_refund">Filter Refund</label>
<select class="custom-select" name="travel_option_refund" id="travel_option_refund">
<option value="">Filter aus</option>
@foreach($filter_refund as $id=>$name)
<option value="{{$id}}">{{$name}}</option>
@endforeach
</select>
</div>
<div class="col-md-3 mb-4">
<label class="form-label" for="travel_option_xx_tkt">Filter XX TKT</label>
<select class="custom-select" name="travel_option_xx_tkt" id="travel_option_xx_tkt">
<option value="">Filter aus</option>
@foreach($filter_xx_tkt as $id=>$name)
<option value="{{$id}}">{{$name}}</option>
@endforeach
</select>
</div>
</div>
<div class="form-row align-items-center">
<div class="col-5 col-sm-2 mb-4">
@ -122,9 +169,16 @@
{{--<th>{{__('Kategorie')}}</th>--}}
<th>{{__('Anreise')}}</th>
<th>{{__('Abreise')}}</th>
<th>{{__('Reiseunterlage')}}</th>
<th>{{__('U.')}}</th>
<th>{{__('Sachbearbeiter')}}</th>
<th>{{__('Status')}}</th>
<th>{{__('E-Mail')}}</th>
<th>{{__('K-Wunsch')}}</th>
<th>{{__('KW-Status')}}</th>
<th>{{__('Refund')}}</th>
<th>{{__('XX TKT')}}</th>
</tr>
</thead>
</table>
@ -133,10 +187,13 @@
<div class="px-4 pt-3">
</div>
<div class="px-4 pt-3">
<button type="button" class="btn btn-info" data-toggle="modal" data-target="#modals-load-next"
<button type="button" class="btn btn-info" data-toggle="modal"
data-target="#modals-load-next"
data-id="new"
data-model="customerMail"
data-action="send-customer-mail"
data-action="new-customer-mail"
data-url="{{route('customer_mail_send_mail')}}"
data-redirect="back"
data-route="{{ route('requests_modal_load') }}"><i class="ion ion-md-mail-open"></i>&nbsp; E-Mail-Nachricht an Auswahl (max. 50)</button>
</div>
</div>
@ -169,6 +226,11 @@
d.travel_option_search = $('select[name=travel_option_search]').val();
d.travel_option_country_id = $('select[name=travel_option_country_id]').val();
d.travel_option_agenda_id = $('select[name=travel_option_agenda_id]').val();
d.travel_option_lead_status_id = $('select[name=travel_option_lead_status_id]').val();
d.travel_option_paying_out = $('select[name=travel_option_paying_out]').val();
d.travel_option_paying_out_status = $('select[name=travel_option_paying_out_status]').val();
d.travel_option_refund = $('select[name=travel_option_refund]').val();
d.travel_option_xx_tkt = $('select[name=travel_option_xx_tkt]').val();
}
},
"columns": [
@ -184,7 +246,12 @@
{ data: 'end_date', name: 'end_date' },
{ data: 'travel_documents', name: 'travel_documents', orderable: false },
{ data: 'sf_guard_user_id', name: 'sf_guard_user_id', orderable: false },
{ data: 'lead.status_id', name: 'lead.status_id', orderable: false },
{ data: 'lead.status_id', name: 'lead.status_id', orderable: false },
{ data: 'last_customer_email', name: 'last_customer_email', orderable: true },
{ data: 'paying_out', name: 'paying_out' },
{ data: 'paying_out_status', name: 'paying_out_status' },
{ data: 'refund', name: 'refund' },
{ data: 'xx_tkt', name: 'xx_tkt' },
],
"bLengthChange": false,
"iDisplayLength": 50,
@ -194,7 +261,7 @@
"url": "/js/German.json"
},
initComplete: function () {
this.api().columns(8).every( function () {
/*this.api().columns(10).every( function () {
var column = this;
var title = $(column.header()).html();
var select = $('<select class="selectpicker"><option value="">'+title+'</option></select>')
@ -211,8 +278,26 @@
}
}
} );
} );*/
this.api().columns(11).every( function () {
var column = this;
var title = $(column.header()).html();
var select = $('<select class="selectpicker"><option value="">'+title+'</option></select>')
.appendTo( $(column.header()).empty() )
.on( 'change', function () {
$('input[name=sort_sf_guard_user_id]').val($(this).val());
table.order( [ 5, 'desc' ] ).draw();
} );
column.data().unique().sort().each( function ( d, j ) {
if(d !== ""){
var text = $(d+' span').text();
if(text !== "" && text !== "-"){
select.append( '<option value="'+$(d).data('order')+'">'+ $(d+' span').text()+'</option>' );
}
}
} );
} );
this.api().columns(9).every( function () {
/* this.api().columns(12).every( function () {
var column = this;
var title = $(column.header()).html();
var select = $('<select class="selectpicker"><option value="">'+title+'</option></select>')
@ -230,6 +315,7 @@
}
} );
} );
*/
$('.selectpicker').selectpicker();
},
drawCallback: function () {
@ -287,15 +373,31 @@
$(this).removeClass('active');
}
clearTravelOptionAgenda();
table.order( [ 3, 'desc' ] ).draw();
table.order( [ 5, 'desc' ] ).draw();
});
$('#travel_option_country_id').on('change', function(){
clearTravelOptionAgenda();
table.order( [ 3, 'desc' ] ).draw();
table.order( [ 5, 'desc' ] ).draw();
});
$('#travel_option_agenda_id').on('change', function(){
table.order( [ 3, 'desc' ] ).draw();
table.order( [ 5, 'desc' ] ).draw();
});
$('#travel_option_lead_status_id').on('change', function(){
table.order( [ 5, 'desc' ] ).draw();
});
$('#travel_option_paying_out').on('change', function(){
table.order( [ 5, 'desc' ] ).draw();
});
$('#travel_option_paying_out_status').on('change', function(){
table.order( [ 5, 'desc' ] ).draw();
});
$('#travel_option_refund').on('change', function(){
table.order( [ 5, 'desc' ] ).draw();
});
$('#travel_option_xx_tkt').on('change', function(){
table.order( [ 5, 'desc' ] ).draw();
});
$('.datepicker-base').on('change', function(){
if($(this).val() != ""){
$('#travel_option_search').removeClass('active');
@ -308,11 +410,11 @@
$('#travel_option_search').removeClass('deactive');
}
clearTravelOptionAgenda();
table.order( [ 3, 'desc' ] ).draw();
table.order( [ 5, 'desc' ] ).draw();
});
$('.full_search').on('keyup', function(){
clearTravelOptionAgenda();
table.order( [ 3, 'desc' ] ).draw();
table.order( [ 5, 'desc' ] ).draw();
});
function loadModalInner(self, data){
@ -350,12 +452,10 @@
if (!button.data('id')) {
return;
}
//var data = {};
var data = table.ajax.params();
data.action = button.data('action');
data.route = button.data('route');
data.target = button.data('target');
//console.log(data);
$.each(button.data(), function(index, value){
data[index] = value;
});
loadModalInner(this, data);
});
@ -366,7 +466,4 @@
</div>
</div>
@endsection

View file

@ -1,40 +0,0 @@
{!! Form::open(['url' => $url, 'class' => 'modal-content', 'onsubmit'=>'return confirm("E-Mail wirklich senden?");']) !!}
<div class="modal-header">
<h5 class="modal-title">
{{$data['title']}}
</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
</div>
<div class="modal-body">
<div class="form-row">
<div class="form-group col">
<label for="to" class="form-label">E-Mail senden an:</label>
@foreach($value->customers as $key=>$val)
<label class="custom-control custom-checkbox mt-2" style="margin-right: 20px;">
{!! Form::checkbox('send_mail_to['.$key.']', 1, $key, ['class'=>'custom-control-input']) !!}
<span class="custom-control-label">{{$val}}</span>
</label>
@endforeach
</div>
</div>
<div class="form-row">
<div class="form-group col">
<label for="subject" class="form-label">Betreff</label>
{{ Form::text('subject', '', array('placeholder'=>'', 'id'=>'subject', 'class'=>'form-control', 'required')) }}
</div>
</div>
<div class="form-group mb-1">
<label class="form-label" for="message">Nachricht</label>
{{ Form::textarea('message', $value->message, array('class'=>'form-control', 'rows'=>15)) }}
</div>
<p>Platzhalter: #geehrte/r# #Anrede# #Vorname# #Nachname# #Reiseland# #Programm# </p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">schließen</button>
<button type="submit" class="btn btn-primary"><i class="ion ion-ios-mail-open"></i> senden</button>
</div>
{!! Form::close() !!}

View file

@ -0,0 +1,137 @@
@extends('layouts.layout-2')
@section('content')
<h4 class="font-weight-bold py-3 mb-1">
Reisestatus
</h4>
<div class="card">
<div class="card-datatable table-responsive">
<table class="datatables-default table table-striped table-bordered">
<thead>
<tr>
<th style="max-width: 60px;">&nbsp;</th>
<th>{{__('Name')}}</th>
<th>{{__('Farbe')}}</th>
<th>{{__('Bearbeitung Tage')}}</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach($status as $value)
<tr>
<td>
<button type="button" class="btn icon-btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-default"
data-id="{{ $value->id }}"
data-name="{{ $value->name }}"
data-color="{{ $value->color }}"
data-handling_days="{{ $value->handling_days }}">
<span class="fa fa-edit"></span>
</button>
</td>
<td data-sort="{{ $value->id }}">{{ $value->name }}</td>
<td data-sort="{{ $value->color }}">
@if($value->color)
<div style="display:inline-block; width: 20px; height: 20px; border: 1px solid #888a85; background-color:{{$value->color}}"></div>
{{ $value->color }}
@else
<div style="display:inline-block; width: 20px; height: 20px; border: 1px solid #888a85; background-color: #fff"></div>
@endif
</td>
<td data-sort="{{ $value->handling_days }}">{{ $value->handling_days }}</td>
<td><a class="text-danger" href="{{ route('admin_settings_travel_nationality_delete', [$value->id]) }}" onclick="return confirm('{{__('Wirklich löschen?')}}');"><i class="fa fa-trash-alt"></i></a></td>
</tr>
@endforeach
</tbody>
</table>
<div class="mt-4 col">
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-default"
data-id="new"
data-name=""
data-handling_days="1"
>Neuen Status anlegen</button>
</div>
</div>
<div class="modal fade" id="modals-default">
<div class="modal-dialog">
<form class="modal-content" action="{{ route('admin_settings_booking_status_update') }}" method="post">
@csrf
<input type="hidden" class="form-control" name="id">
<div class="modal-header">
<h5 class="modal-title">Status <span class="font-weight-light">anlegen/bearbeiten</span></h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
</div>
<div class="modal-body">
<div class="form-row">
<div class="form-group col">
<label for="name" class="form-label">Name*</label>
<input type="text" class="form-control" name="name" placeholder="{{__('Description')}}" required>
</div>
</div>
<div class="form-row">
<div class="form-group col">
<label for="name" class="form-label">Farbe*</label>
<input type="text" name="color" id="minicolors-hue" class="form-control" value="#fff">
</div>
</div>
<div class="form-row">
<div class="form-group col">
<label for="handling_days" class="form-label">Bearbeitungszeit in Tagen*</label>
<input type="text" class="form-control" name="handling_days" placeholder="{{__('Tage')}}" required>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">{{__('close')}}</button>
<button type="submit" class="btn btn-primary">{{__('save')}}</button>
</div>
</form>
</div>
</div>
<script>
$( document ).ready(function() {
$('#minicolors-hue').minicolors({
control: 'hue',
position: 'bottom ' + 'left',
});
$('#modals-default').on('show.bs.modal', function (event) {
var button = $(event.relatedTarget);
$(this).find(".modal-content input[name='id']").val(button.data('id'));
$(this).find(".modal-body input[name='name']").val(button.data('name'));
$(this).find(".modal-body input[name='handling_days']").val(button.data('handling_days'));
color = '#fff';
if(button.data('color') !== ""){
color = button.data('color');
}
$('#minicolors-hue').minicolors('value', color);
// $('.selectpicker').selectpicker('refresh');
$(this).find(".modal-body input[name='active']").prop( "checked", button.data('active'));
});
$('.datatables-types').dataTable({
"bLengthChange": false,
"iDisplayLength": 50,
"order": [[ 1, "desc" ]],
"language": {
"url": "/js/German.json"
}
});
});
</script>
</div>
@endsection

View file

@ -58,6 +58,16 @@ Route::get('/check/login/{identify}/{token}/{show?}', 'HomeController@checkLogin
Route::get('/user/update_email_confirm/{token}', 'UserUpdateEmailController@activateMail')->name('user_update_email_confirm');
Route::get('/storage/file/{id}/{disk}', function($id = null, $disk = null)
{
$file = \App\Models\CustomerFile::findOrFail($id);
$path = Storage::disk($disk)->path($file->dir.$file->filename);
if (file_exists($path)) {
return Response::file($path);
}
})->name('storage_file');
Route::group(['middleware' => ['auth']], function()
{
@ -142,6 +152,12 @@ Route::group(['middleware' => ['admin']], function()
Route::get('/iq/content/tree/delete/{id}/{node_id?}/{area_section_id?}', 'IQ\ContentTreeController@delete')->name('iq_content_tree_delete');
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/send/mail', 'CustomerMailController@sendMail')->name('customer_mail_send_mail');
Route::post('/customer_mail/reply/mail', 'CustomerMailController@replyMail')->name('customer_mail_reply_mail');
Route::group(['middleware' => ['auth.permission:cms-iq-assets']], function() {
//assets
@ -189,7 +205,6 @@ Route::group(['middleware' => ['admin']], function()
Route::get('data/table/requests', 'RequestController@getRequests')->name('data_table_requests');
Route::post('data/ajax/requests', 'RequestController@getAjaxRequests')->name('data_ajax_requests');
Route::post('/requests/modal/load', 'RequestController@loadModal')->name('requests_modal_load');
Route::post('/requests/send_customer_mail', 'RequestController@sendCustomerMail')->name('requests_send_customer_mail');
});
Route::group(['middleware' => ['auth.permission:crm-bo-bo']], function() {
//Buchungen > Buchungen
@ -198,6 +213,8 @@ Route::group(['middleware' => ['admin']], function()
Route::get('/booking/detail/{id}', 'BookingController@detail')->name('booking_detail');
Route::post('/booking/detail/{id}', 'BookingController@store')->name('booking_detail');
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::group(['middleware' => ['auth.permission:crm-bo-le']], function() {
//Buchungen > Leads
@ -222,6 +239,7 @@ Route::group(['middleware' => ['admin']], function()
Route::get('/customer_mail/detail/{id}', 'CustomerMailController@detail')->name('customer_mail_detail');
Route::post('/customer_mail/detail/{id}', 'CustomerMailController@store')->name('customer_mail_detail');
Route::get('/customer_mail/delete/{id}', 'CustomerMailController@delete')->name('customer_mail_delete');
});
Route::group(['middleware' => ['auth.permission:crm-cm-cf']], function() {
//Kundenverwaltung > Kunden (FeWo)
@ -271,7 +289,7 @@ Route::group(['middleware' => ['admin']], function()
Route::get('/cms/travel_guide/content', 'CMS\CMSTravelGuideController@index')->name('cms_travel_guide_content');
Route::get('/cms/travel_guide/page', 'CMS\CMSTravelGuideController@page')->name('cms_travel_guide_page');
Route::get('/cms/travel_guide/page/detail/{id}', 'CMS\CMSTravelGuideController@pageDetail')->name('cms_travel_guide_page_detail');
Route::get('/cms/travel_guide/page/detail/{id}', 'CMS\CMSTravelGuideControllecr@pageDetail')->name('cms_travel_guide_page_detail');
Route::post('/cms/travel_guide/page/detail/{id}', 'CMS\CMSTravelGuideController@pageStore')->name('cms_travel_guide_page_detail');
@ -331,6 +349,13 @@ Route::group(['middleware' => ['superadmin']], function() {
Route::get('/admin/settings/travel/nationality/delete/{id}', 'Settings\TravelNationalityController@delete')->name('admin_settings_travel_nationality_delete');
});
Route::group(['middleware' => ['auth.permission:sua-st-bs']], function() {
//SUPERADMIN > Einstellungen > Nationalitäten
Route::get('/admin/settings/booking/status', 'Settings\BookingStatusController@index')->name('admin_settings_booking_status');
Route::post('/admin/settings/booking/status/update', 'Settings\BookingStatusController@update')->name('admin_settings_booking_status_update');
Route::get('/admin/settings/booking/status/delete/{id}', 'Settings\BookingStatusController@delete')->name('admin_settings_booking_status_delete');
});
Route::group(['middleware' => ['auth.permission:sua-st-ke']], function() {
//SUPERADMIN > Einstellungen > Keywords
Route::get('/admin/settings/keyword', 'Settings\KeywordController@index')->name('admin_settings_keyword');

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB