Mehrere Tickets 49, 50, 51, 52, 53
This commit is contained in:
parent
ae70577289
commit
e3495be8b8
61 changed files with 1904 additions and 344 deletions
|
|
@ -2,21 +2,22 @@
|
|||
|
||||
namespace App\Http\Controllers\Admin;
|
||||
|
||||
use App\Exports\ReportCollectionExport;
|
||||
use App\Http\Controllers\Controller;
|
||||
|
||||
use App\Models\Booking;
|
||||
use App\Models\ServiceProvider;
|
||||
use App\Models\ServiceProviderEntry;
|
||||
use App\Models\TravelAgenda;
|
||||
use App\Services\Util;
|
||||
use Carbon\Carbon;
|
||||
use HTMLHelper;
|
||||
use Illuminate\Validation\Rules\In;
|
||||
use Maatwebsite\Excel\Facades\Excel;
|
||||
use Request;
|
||||
use Response;
|
||||
|
||||
use HTMLHelper;
|
||||
use Carbon\Carbon;
|
||||
use App\Models\Status;
|
||||
use App\Services\Util;
|
||||
use App\Models\Booking;
|
||||
use App\Models\TravelAgenda;
|
||||
use App\Models\ServiceProvider;
|
||||
use Illuminate\Validation\Rules\In;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\ServiceProviderEntry;
|
||||
use Maatwebsite\Excel\Facades\Excel;
|
||||
use App\Exports\ReportCollectionExport;
|
||||
|
||||
class ReportController extends Controller
|
||||
{
|
||||
public function __construct()
|
||||
|
|
@ -27,7 +28,7 @@ class ReportController extends Controller
|
|||
public function bookings()
|
||||
{
|
||||
$data = [
|
||||
//'serviceProviders' => ServiceProvider::all(),
|
||||
'filter_lead_status' => Status::get()->pluck('name', 'id')->toArray(),
|
||||
];
|
||||
return view('admin.report.bookings', $data);
|
||||
}
|
||||
|
|
@ -36,6 +37,7 @@ class ReportController extends Controller
|
|||
{
|
||||
$data = [
|
||||
'serviceProviders' => ServiceProvider::all(),
|
||||
'filter_lead_status' => Status::get()->pluck('name', 'id')->toArray(),
|
||||
];
|
||||
return view('admin.report.service_providers', $data);
|
||||
}
|
||||
|
|
@ -45,6 +47,18 @@ class ReportController extends Controller
|
|||
|
||||
$query = Booking::with( 'customer', 'lead', 'booking_strono','service_provider_entries', 'service_provider_entries.service_provider')->select('booking.*');
|
||||
|
||||
|
||||
if(Request::get('filter_db_lead_status_id') != ""){
|
||||
$query->whereHas('lead', function ($q) {
|
||||
$q->whereIn('status_id', Request::get('filter_db_lead_status_id'));
|
||||
|
||||
});
|
||||
}
|
||||
if(Request::get('filter_lead_status_id') != ""){
|
||||
$query->whereHas('lead', function ($q) {
|
||||
$q->whereIn('status_id', Request::get('filter_lead_status_id'));
|
||||
});
|
||||
}
|
||||
if(Request::get('filter_travel_date_from') != ""){
|
||||
$travel_date_from = Carbon::parse(Request::get('filter_travel_date_from'))->format("Y-m-d");
|
||||
$query->where("start_date", '>=', $travel_date_from);
|
||||
|
|
@ -149,6 +163,8 @@ class ReportController extends Controller
|
|||
->orderColumn('end_date', 'end_date $1')
|
||||
->orderColumn('booking_date', 'booking_date $1')
|
||||
->orderColumn('customer.fullName', 'customer.firstname $1')
|
||||
->orderColumn('customer.firstname', 'customer.firstname $1')
|
||||
->orderColumn('customer.name', 'customer.name $1')
|
||||
//->orderColumn('lead.status_id', 'lead.status_id $1')
|
||||
//->orderColumn('is_cleared', 'is_cleared $1')
|
||||
->rawColumns(['id', 'lead.status_id', 'service_provider.names'])
|
||||
|
|
@ -296,9 +312,25 @@ class ReportController extends Controller
|
|||
|
||||
private function prozessProvidersSearch(){
|
||||
|
||||
$query = ServiceProviderEntry::with('booking', 'service_provider', 'booking.customer')->select('service_provider_entry.*')
|
||||
$query = ServiceProviderEntry::with('booking', 'service_provider', 'booking.customer', 'booking.lead')->select('service_provider_entry.*')
|
||||
->join('booking', 'service_provider_entry.booking_id', '=', 'booking.id' );
|
||||
|
||||
if(Request::get('filter_db_lead_status_id') != ""){
|
||||
$query->whereHas('booking', function ($qe) {
|
||||
$qe->whereHas('lead', function ($q) {
|
||||
$q->whereIn('status_id', Request::get('filter_db_lead_status_id'));
|
||||
|
||||
});
|
||||
});
|
||||
}
|
||||
if(Request::get('filter_lead_status_id') != ""){
|
||||
$query->whereHas('booking', function ($qe) {
|
||||
$qe->whereHas('lead', function ($q) {
|
||||
$q->whereIn('status_id', Request::get('filter_lead_status_id'));
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
if(Request::get('filter_is_cleared') != ""){
|
||||
$query->where('is_cleared', '=', Request::get('filter_is_cleared'));
|
||||
}
|
||||
|
|
@ -389,6 +421,21 @@ class ReportController extends Controller
|
|||
->addColumn('is_cleared', function (ServiceProviderEntry $serviceProviderEntry) {
|
||||
return $serviceProviderEntry->is_cleared ? ' <span data-order="1" class="badge badge-pill badge-success"><i class="fa fa-check"></i></span>' : '<span data-order="0" class="badge badge-pill badge-danger"><i class="fa fa-times"></i></span>';
|
||||
})
|
||||
->addColumn('booking.lead.status_id', function (ServiceProviderEntry $serviceProviderEntry) {
|
||||
if($serviceProviderEntry->booking->lead && $serviceProviderEntry->booking->lead->status_id){
|
||||
$color = $serviceProviderEntry->booking->lead->status->color;
|
||||
$icon = "";
|
||||
if($serviceProviderEntry->booking->lead->status_id == 14 && $serviceProviderEntry->booking->lead->is_rebook){
|
||||
$color = '#94ae59';
|
||||
$icon = '<i class="fa fa-check-circle"></i> ';
|
||||
}
|
||||
if($serviceProviderEntry->booking->lead->status_id == 14 && !$serviceProviderEntry->booking->lead->is_rebook){
|
||||
$icon = '<i class="fa fa-times-circle"></i> ';
|
||||
}
|
||||
return '<span data-order="'.$serviceProviderEntry->booking->lead->status_id.'"><span class="badge badge-dark" style="background-color: '.$color.'">'.$icon.$serviceProviderEntry->booking->lead->status->name.'</span></span>';
|
||||
}
|
||||
return '<span data-order="0">-</span>';
|
||||
})
|
||||
->filterColumn('booking.customer.fullName', function ($query, $keyword) {
|
||||
if ($keyword != "") {
|
||||
$query->whereHas('booking', function ($q) use ($keyword) {
|
||||
|
|
@ -402,8 +449,11 @@ class ReportController extends Controller
|
|||
->orderColumn('booking.id', 'booking.id $1')
|
||||
->orderColumn('booking.start_date', 'booking.start_date $1')
|
||||
->orderColumn('booking.end_date', 'booking.end_date $1')
|
||||
->orderColumn('booking.customer.firstname', 'booking.customer.firstname $1')
|
||||
->orderColumn('booking.customer.name', 'booking.customer.name $1')
|
||||
->orderColumn('is_cleared', 'is_cleared $1')
|
||||
->rawColumns(['is_cleared', 'booking.id'])
|
||||
|
||||
->rawColumns(['is_cleared', 'booking.id', 'booking.lead.status_id'])
|
||||
->make(true);
|
||||
}
|
||||
|
||||
|
|
@ -415,12 +465,12 @@ class ReportController extends Controller
|
|||
$orderByNum = [
|
||||
0 => "id",
|
||||
1 => "booking.id", //booking
|
||||
3 => "booking.merlin_order_number",//booking
|
||||
4 => "booking.price",//booking
|
||||
5 => "booking.price_total",//booking
|
||||
8 => "booking.start_date",//booking
|
||||
9 => "booking.end_date",//booking
|
||||
10 => "is_cleared",
|
||||
4 => "booking.merlin_order_number",//booking
|
||||
5 => "booking.price",//booking
|
||||
6 => "booking.price_total",//booking
|
||||
9 => "booking.start_date",//booking
|
||||
10 => "booking.end_date",//booking
|
||||
11 => "is_cleared",
|
||||
];
|
||||
|
||||
if(isset($order[0])){
|
||||
|
|
@ -431,6 +481,7 @@ class ReportController extends Controller
|
|||
|
||||
$filename = "file-".date('Y-m-d-H-i-s');
|
||||
$exports = $query->get();
|
||||
$ctemps = [];
|
||||
$columns = [];
|
||||
|
||||
if(Request::get('export') === "export"){
|
||||
|
|
@ -460,14 +511,14 @@ class ReportController extends Controller
|
|||
$total_amount_final = 0;
|
||||
$total_proceeds = 0;
|
||||
foreach($exports as $export) {
|
||||
$new = in_array($export->booking->lead_id, $isset) ? false : true;
|
||||
$new = in_array($export->booking->id, $isset) ? false : true;
|
||||
if($new){
|
||||
$total_price += $export->booking->getPriceRaw();
|
||||
$total_price_total += $export->booking->getPriceTotalRaw();
|
||||
$total_proceeds += $export->booking->proceeds(true);
|
||||
}
|
||||
$total_amount_final += $export->getAmountFinalEurRaw();
|
||||
$columns[] = array(
|
||||
$ctemps[$export->booking->id][] = array(
|
||||
'Zähler' => $new ? $export->getCounter() : "",
|
||||
'MyJack Nr.' => $new ? $export->booking->merlin_order_number : "",
|
||||
'CRM Nr' => $new ? $export->booking->lead_id : "",
|
||||
|
|
@ -475,8 +526,8 @@ class ReportController extends Controller
|
|||
'Reisedatum' => $new ? $export->booking->getStartDateFormat() : "",
|
||||
'Organisation' => $new ? $export->booking->price : "",
|
||||
'Gesamtreisepreis' => $new ? $export->booking->price_total : "",
|
||||
'Reiseland' => $new ? $export->booking->travel_country->name : "",
|
||||
'Reiseprogramm' => $new ? $export->booking->travel_agenda->name : "",
|
||||
'Reiseland' => $new && $export->booking->travel_country ? $export->booking->travel_country->name : "",
|
||||
'Reiseprogramm' => $new && $export->booking->travel_agenda ? $export->booking->travel_agenda->name : "",
|
||||
'Reiseteilnehmer' => $new ? $export->booking->pax : "",
|
||||
'Leistungsträger' => $export->service_provider->name,
|
||||
'Rechnungsnummer' => $export->invoice_number,
|
||||
|
|
@ -485,7 +536,10 @@ class ReportController extends Controller
|
|||
'Erlös' => $new ? $export->booking->proceeds() : "",
|
||||
'Konto' => $export->booking->getKontoNumber()
|
||||
);
|
||||
$isset[] = $export->booking->lead_id;
|
||||
$isset[] = $export->booking->id;
|
||||
}
|
||||
foreach($ctemps as $bid => $value){
|
||||
$columns = array_merge($columns, $value);
|
||||
}
|
||||
$columns[] = array(
|
||||
'Zähler' => "Total",
|
||||
|
|
@ -527,26 +581,29 @@ class ReportController extends Controller
|
|||
$total_amount_final = 0;
|
||||
$payments_total = 0;
|
||||
foreach($exports as $export) {
|
||||
$new = in_array($export->booking->lead_id, $isset) ? false : true;
|
||||
$new = in_array($export->booking->id, $isset) ? false : true;
|
||||
if($new) {
|
||||
$payments_total += $export->booking->getServiceProviderPaymentsTotal(true);
|
||||
}
|
||||
$total_amount_final += $export->getAmountFinalEurRaw();
|
||||
$columns[] = array(
|
||||
$ctemps[$export->booking->id][] = array(
|
||||
'Zähler' => $new ? $export->getCounter() : "",
|
||||
'MyJack Nr.' => $new ? $export->booking->merlin_order_number : "",
|
||||
'CRM Nr' => $new ? $export->booking->lead_id : "",
|
||||
'Kunde' => $new ? $export->booking->customer->name : "",
|
||||
'Reisedatum' => $new ? $export->booking->getStartDateFormat() : "",
|
||||
'Reiseland' => $new ? $export->booking->travel_country->name : "",
|
||||
'Reiseprogramm' => $new ? $export->booking->travel_agenda->name : "",
|
||||
'Reiseland' => $new && $export->booking->travel_country ? $export->booking->travel_country->name : "",
|
||||
'Reiseprogramm' => $new && $export->booking->travel_agenda ? $export->booking->travel_agenda->name : "",
|
||||
'Reiseteilnehmer' => $new ? $export->booking->pax : "",
|
||||
'Leistungsträger' => $export->service_provider->name,
|
||||
'Rechnungsnummer' => $export->invoice_number,
|
||||
'Zahlung' => $export->getAmountFinalEur(),
|
||||
'ZahlungVorgang' => $export->booking->getServiceProviderPaymentsTotal(),
|
||||
);
|
||||
$isset[] = $export->booking->lead_id;
|
||||
$isset[] = $export->booking->id;
|
||||
}
|
||||
foreach($ctemps as $bid => $value){
|
||||
$columns = array_merge($columns, $value);
|
||||
}
|
||||
$columns[] = array(
|
||||
'Zähler' => "Total",
|
||||
|
|
|
|||
288
app/Http/Controllers/CMS/CMSBookingController.php
Normal file
288
app/Http/Controllers/CMS/CMSBookingController.php
Normal file
|
|
@ -0,0 +1,288 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers\CMS;
|
||||
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\CMSContent;
|
||||
use App\Models\FewoLodging;
|
||||
use App\Services\BookingFewo;
|
||||
use App\Services\CreatePDF;
|
||||
use App\Services\Util;
|
||||
use Request;
|
||||
|
||||
|
||||
class CMSBookingController extends Controller
|
||||
{
|
||||
|
||||
protected $identifier_general_name;
|
||||
protected $identifier_content_name;
|
||||
|
||||
protected $identifier_content;
|
||||
protected $identifier_general;
|
||||
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->identifier_general_name = config('booking.identifier_general_name');
|
||||
$this->identifier_content_name = config('booking.identifier_content_name');
|
||||
$this->identifier_general = config('booking.identifier_general');
|
||||
$this->identifier_content = config('booking.identifier_content');
|
||||
}
|
||||
/*
|
||||
* ALL
|
||||
*/
|
||||
public function all()
|
||||
{
|
||||
$data = [
|
||||
'values' => CMSContent::where('identifier', '=', $this->identifier_general_name)->get()->sortBy('pos'),
|
||||
];
|
||||
return view('cms.booking.all.index', $data);
|
||||
}
|
||||
|
||||
public function detailAll($id)
|
||||
{
|
||||
$general_name = CMSContent::findOrFail($id);
|
||||
$identifier_general = $this->identifier_general.$general_name->id;
|
||||
$data = [
|
||||
'contents' => CMSContent::where('identifier', '=', $identifier_general)->get()->sortBy('pos'),
|
||||
'general_name' => $general_name,
|
||||
'identifier_general' => $identifier_general,
|
||||
];
|
||||
return view('cms.booking.all.detail', $data);
|
||||
}
|
||||
|
||||
public function storeAll($id = null)
|
||||
{
|
||||
$data = Request::all();
|
||||
|
||||
if($data['action'] === 'newOrSaveName'){
|
||||
if($data['id'] === 'new'){
|
||||
$create = [
|
||||
'name' => $data['name'],
|
||||
'field' => 'text',
|
||||
'decimal' => 1,
|
||||
'identifier' => $this->identifier_general_name,
|
||||
'pos' => CMSContent::where('identifier', '=', $this->identifier_general_name)->count() + 1,
|
||||
];
|
||||
$content = CMSContent::create($create);
|
||||
//store in cms old Datebase
|
||||
\App\Models\Sym\CmsContent::create($create);
|
||||
return redirect(route('cms_booking_all_detail', [$content->id]));
|
||||
}else{
|
||||
$content = CMSContent::findOrFail($data['id']);
|
||||
$content->name = $data['name'];
|
||||
$content->slug = null;
|
||||
$content->save();
|
||||
return redirect(route('cms_booking_all'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if($data['action'] === 'addItem'){
|
||||
$general_name = CMSContent::findOrFail($id);
|
||||
$identifier_general = $this->identifier_general.$general_name->id;
|
||||
$create = [
|
||||
'name' => 'Abschnitt',
|
||||
'field' => 'full_text',
|
||||
'decimal' => 1,
|
||||
'identifier' => $identifier_general,
|
||||
'pos' => CMSContent::where('identifier', '=', $identifier_general)->count() + 1,
|
||||
];
|
||||
CMSContent::create($create);
|
||||
//store in cms old Datebase
|
||||
\App\Models\Sym\CmsContent::create($create);
|
||||
\Session()->flash('alert-save', '1');
|
||||
return redirect(route('cms_booking_all_detail', [$id]));
|
||||
|
||||
}
|
||||
if($data['action'] === 'saveAll'){
|
||||
$i = 1;
|
||||
if(isset($data['contents'] )) {
|
||||
foreach ($data['contents'] as $content_id => $item) {
|
||||
$content = CMSContent::findOrFail($content_id);
|
||||
$content->setObjectBy('page-break', (isset($item['page-break']) ? true : false));
|
||||
$content->name = $item['name'];
|
||||
$content->slug = null;
|
||||
$content->decimal = isset($item['in_pdf']) ? 1 : 0;
|
||||
$content->full_text = $item['full_text'];
|
||||
$content->pos = $i++;
|
||||
$content->save();
|
||||
}
|
||||
}
|
||||
\Session()->flash('alert-save', '1');
|
||||
return redirect(route('cms_booking_all_detail', [$id]));
|
||||
}
|
||||
|
||||
\Session()->flash('alert-save', '1');
|
||||
return redirect(route('cms_booking_all'));
|
||||
}
|
||||
|
||||
public function deleteAll($id, $do){
|
||||
if($do === 'name'){
|
||||
$general_name = CMSContent::findOrFail($id);
|
||||
$identifier_general = $this->identifier_general.$general_name->id;
|
||||
$contents = CMSContent::where('identifier', '=', $identifier_general)->get();
|
||||
foreach($contents as $con){
|
||||
$con->delete();
|
||||
}
|
||||
$contents = \App\Models\Sym\CmsContent::where('identifier', '=', $identifier_general)->get();
|
||||
foreach($contents as $con){
|
||||
$con->delete();
|
||||
}
|
||||
\Session()->flash('alert-success', __('Vorlage gelöscht'));
|
||||
}
|
||||
|
||||
if($do === 'item'){
|
||||
\Session()->flash('alert-success', __('Abschnitt gelöscht'));
|
||||
}
|
||||
$content = CMSContent::findOrFail($id);
|
||||
$content->delete();
|
||||
$m = \App\Models\Sym\CmsContent::find($id);
|
||||
$m->delete();
|
||||
return back();
|
||||
}
|
||||
/*
|
||||
* CONTENT
|
||||
*/
|
||||
public function content()
|
||||
{
|
||||
$data = [
|
||||
'values' => CMSContent::where('identifier', '=', $this->identifier_content_name)->get()->sortBy('pos'),
|
||||
'identifier_general_name' => $this->identifier_general_name,
|
||||
];
|
||||
return view('cms.booking.content.index', $data);
|
||||
}
|
||||
|
||||
public function detailContent($id)
|
||||
{
|
||||
$content_name = CMSContent::findOrFail($id);
|
||||
$identifier_content = $this->identifier_content.$content_name->id;
|
||||
$gerneral_id = $content_name->getObjectBy('general_id');
|
||||
$identifier_general = $this->identifier_general.$gerneral_id;
|
||||
|
||||
$data = [
|
||||
'contents' => CMSContent::where('identifier', '=', $identifier_general)->get()->sortBy('pos'),
|
||||
'content_name' => $content_name,
|
||||
'identifier_content' => $identifier_content,
|
||||
'identifier_general' => $identifier_general,
|
||||
];
|
||||
return view('cms.booking.content.detail', $data);
|
||||
}
|
||||
|
||||
public function storeContent($id = null)
|
||||
{
|
||||
$data = Request::all();
|
||||
|
||||
if($data['action'] === 'newOrSaveName'){
|
||||
if($data['id'] === 'new'){
|
||||
$create = [
|
||||
'name' => $data['name'],
|
||||
'field' => 'text',
|
||||
'decimal' => 1,
|
||||
'identifier' => $this->identifier_content_name,
|
||||
'pos' => CMSContent::where('identifier', '=', $this->identifier_content_name)->count() + 1,
|
||||
];
|
||||
$content = CMSContent::create($create);
|
||||
$content->setObjectBy('general_id', (isset($data['general_id']) ? $data['general_id'] : 0));
|
||||
$content->save();
|
||||
//store in cms old Datebase
|
||||
\App\Models\Sym\CmsContent::create($create);
|
||||
return redirect(route('cms_booking_content_detail', [$content->id]));
|
||||
}else{
|
||||
$content = CMSContent::findOrFail($data['id']);
|
||||
$content->setObjectBy('general_id', (isset($data['general_id']) ? $data['general_id'] : 0));
|
||||
$content->name = $data['name'];
|
||||
$content->slug = null;
|
||||
$content->save();
|
||||
return redirect(route('cms_booking_content'));
|
||||
}
|
||||
}
|
||||
|
||||
$content_name = CMSContent::findOrFail($id);
|
||||
$identifier_content = $this->identifier_content.$content_name->id;
|
||||
$gerneral_id = $content_name->getObjectBy('general_id');
|
||||
$identifier_general = $this->identifier_general.$gerneral_id;
|
||||
|
||||
if($data['action'] === 'addItem' && isset($data['content_pos_id'])) {
|
||||
$create = [
|
||||
'name' => 'Abschnitt',
|
||||
'field' => 'full_text',
|
||||
'decimal' => 1,
|
||||
'integer' => $data['content_pos_id'],
|
||||
'identifier' => $identifier_content,
|
||||
'pos' => 0,
|
||||
];
|
||||
CMSContent::create($create);
|
||||
//store in cms old Datebase
|
||||
\App\Models\Sym\CmsContent::create($create);
|
||||
\Session()->flash('alert-save', '1');
|
||||
return redirect(route('cms_booking_content_detail', [$id]));
|
||||
}
|
||||
|
||||
|
||||
|
||||
if($data['action'] === 'saveAll'){
|
||||
$i = 1;
|
||||
$last_content_id = null;
|
||||
if(isset($data['contents'] )) {
|
||||
foreach ($data['contents'] as $content_id => $item) {
|
||||
$content = CMSContent::findOrFail($content_id);
|
||||
if ($item['identifier'] === $identifier_general) {
|
||||
$last_content_id = $content->id;
|
||||
}
|
||||
if ($item['identifier'] === $identifier_content) {
|
||||
$content->setObjectBy('page-break', (isset($item['page-break']) ? true : false));
|
||||
$content->name = $item['name'];
|
||||
$content->slug = null;
|
||||
$content->decimal = isset($item['in_pdf']) ? 1 : 0;
|
||||
$content->full_text = $item['full_text'];
|
||||
$content->integer = $last_content_id != null ? $last_content_id : $content->integer; //is the main obj
|
||||
$content->pos = $i++;
|
||||
$content->save();
|
||||
}
|
||||
}
|
||||
}
|
||||
\Session()->flash('alert-save', '1');
|
||||
return redirect(route('cms_booking_content_detail', [$id]));
|
||||
}
|
||||
|
||||
/* if($data['action'] === 'previewPDF'){
|
||||
$pdf_content = BookingFewo::getFeWoCMSContentForPDF($this->identifier_content, $identifier_fewo);
|
||||
$pdf_file = new CreatePDF('pdf.fewo_instructions');
|
||||
return $pdf_file->create([
|
||||
'contents' => $pdf_content,
|
||||
'fewo' => $fewo
|
||||
]
|
||||
);
|
||||
}
|
||||
*/
|
||||
\Session()->flash('alert-save', '1');
|
||||
return redirect(route('cms_booking_content'));
|
||||
}
|
||||
|
||||
public function deleteContent($id, $do){
|
||||
if($do === 'name'){
|
||||
$content_name = CMSContent::findOrFail($id);
|
||||
$identifier_content = $this->identifier_content.$content_name->id;
|
||||
$contents = CMSContent::where('identifier', '=', $identifier_content)->get();
|
||||
foreach($contents as $con){
|
||||
$con->delete();
|
||||
}
|
||||
$contents = \App\Models\Sym\CmsContent::where('identifier', '=', $identifier_content)->get();
|
||||
foreach($contents as $con){
|
||||
$con->delete();
|
||||
}
|
||||
\Session()->flash('alert-success', __('Vorlage gelöscht'));
|
||||
}
|
||||
|
||||
if($do === 'item'){
|
||||
\Session()->flash('alert-success', __('Abschnitt gelöscht'));
|
||||
}
|
||||
$content = CMSContent::findOrFail($id);
|
||||
$content->delete();
|
||||
$m = \App\Models\Sym\CmsContent::find($id);
|
||||
$m->delete();
|
||||
return back();
|
||||
}
|
||||
}
|
||||
|
|
@ -6,9 +6,10 @@ use Carbon;
|
|||
use Request;
|
||||
use App\Models\Lead;
|
||||
use App\Models\LeadFile;
|
||||
use App\Models\LeadMail;
|
||||
use App\Models\LeadNotice;
|
||||
use App\Models\LeadParticipant;
|
||||
use App\Models\StatusHistory;
|
||||
use App\Models\LeadParticipant;
|
||||
use App\Repositories\LeadRepository;
|
||||
use App\Repositories\CustomerRepository;
|
||||
use App\Repositories\LeadFileRepository;
|
||||
|
|
@ -132,6 +133,19 @@ class LeadController extends Controller
|
|||
}
|
||||
return $ret;
|
||||
}
|
||||
if(isset($data['action']) && $data['action'] === "get_popover_lead_last_email"){
|
||||
$lead = Lead::findOrFail($data['lead_id']);
|
||||
$ret = "";
|
||||
if($lead->lead_mails->count()){
|
||||
$lead_mail = $lead->lead_mails_sent_at->last();
|
||||
return "<h6>".$lead_mail->subject."</h6>".$lead_mail->message;
|
||||
}
|
||||
if($ret === ""){
|
||||
return 'keine E-Mail';
|
||||
}
|
||||
return $ret;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -214,7 +228,6 @@ class LeadController extends Controller
|
|||
return Carbon::parse($lead->request_date)->format(\Util::formatDateDB());
|
||||
})
|
||||
->addColumn('status', function (Lead $lead) {
|
||||
//umbuchen
|
||||
return $lead->getStatusBadge();
|
||||
})
|
||||
->addColumn('lead_notice', function (Lead $lead) {
|
||||
|
|
@ -222,10 +235,21 @@ class LeadController extends Controller
|
|||
'<span data-order="0" class="badge badge-pill badge-danger"><i class="fa fa-times"></i></span>';
|
||||
})
|
||||
->addColumn('last_lead_email', function (Lead $lead) {
|
||||
//umbuchen
|
||||
|
||||
if($lead->lead_mails->count()){
|
||||
$lead_mail = $lead->lead_mails_sent_at->last();
|
||||
return '<a data-order="'.$lead_mail->getSentAtRaw().'" href="'.route('lead_detail', [$lead->id]).'#collapseLeadMails" data-order="'.$lead_mail->sent_at.'"><span class="badge '.($lead_mail->is_answer ? 'badge-default' : 'badge-secondary').'">'.$lead_mail->sent_at.'</span></a>';
|
||||
return '<a data-order="'.$lead_mail->getSentAtRaw().'" href="#" data-toggle="modal"
|
||||
data-target="#modals-load-content"
|
||||
data-id="show-mail"
|
||||
data-url="mail"
|
||||
data-preview="true"
|
||||
data-lead_id="'.$lead->id.'"
|
||||
data-lead_mail_id="'.$lead_mail->id.'"
|
||||
data-action="show-lead-mail"
|
||||
data-redirect="back"
|
||||
data-route="'.route('lead_mail_modal_load').'">
|
||||
<span class="badge '.($lead_mail->is_answer ? 'badge-default' : 'badge-secondary').'">'.$lead_mail->sent_at.'</span>
|
||||
</a>';
|
||||
}
|
||||
return '<span data-order="">-</span>';
|
||||
})
|
||||
|
|
@ -236,6 +260,19 @@ class LeadController extends Controller
|
|||
->orderColumn('customer_id', 'customer_id $1')
|
||||
->orderColumn('status', 'status_id $1')
|
||||
|
||||
->orderColumn('last_lead_email', function ($query, $order) {
|
||||
|
||||
$query->whereHas('lead_mails',
|
||||
function ($q) use ($order) {
|
||||
// $q->select('sent_at')->where('sent_at', DB::raw("(select max('sent_at') customer_mails)")); //)
|
||||
})->orderBy(
|
||||
LeadMail::select('sent_at')
|
||||
->whereColumn('lead_id', 'lead.id')
|
||||
->orderBy('sent_at', 'DESC')
|
||||
->limit(1)
|
||||
, $order);
|
||||
})
|
||||
|
||||
->filterColumn('id', function($query, $keyword) {
|
||||
if($keyword != ""){
|
||||
$query->where('id', 'LIKE', '%'.$keyword.'%');
|
||||
|
|
|
|||
|
|
@ -298,7 +298,7 @@ class LeadMailController extends Controller
|
|||
$ret = '<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="LeadMail" data-action="new-lead-mail"
|
||||
data-url="'.route('lead_mail_send_mail').'" data-redirect="back" data-lead_mail_id="'.$lead_mail->id.'"
|
||||
data-lead_id="'.$lead_mail->lead_id.'" data-route="'.route('lead_mail_modal_load').'" data-lead_mail_dir="'.$lead_mail->dir.'" data-customer_subdir="'.$lead_mail->subdir.'">
|
||||
data-lead_id="'.$lead_mail->lead_id.'" data-route="'.route('lead_mail_modal_load').'" data-lead_mail_dir="'.$lead_mail->dir.'" data-lead_mail_subdir="'.$lead_mail->subdir.'">
|
||||
<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>
|
||||
|
||||
|
|
|
|||
|
|
@ -48,6 +48,20 @@ class MailController extends Controller
|
|||
->addColumn('action_edit', function (LeadMail $lead_mail) {
|
||||
return '<a href="'.route('lead_detail', [$lead_mail->lead_id]).'#collapseLeadMails" class="btn icon-btn btn-sm btn-primary"><span class="fa fa-edit"></span></a>';
|
||||
})
|
||||
->addColumn('action_see', function (LeadMail $lead_mail) {
|
||||
return '<a data-order="'.$lead_mail->getSentAtRaw().'" class="btn icon-btn btn-sm btn-secondary" href="#" data-toggle="modal"
|
||||
data-target="#modals-load-content"
|
||||
data-id="show-mail"
|
||||
data-url="mail"
|
||||
data-preview="true"
|
||||
data-lead_id="'.$lead_mail->lead->id.'"
|
||||
data-lead_mail_id="'.$lead_mail->id.'"
|
||||
data-action="show-lead-mail"
|
||||
data-redirect="back"
|
||||
data-route="'.route('lead_mail_modal_load').'">
|
||||
<i class="fa fa-eye"></i>
|
||||
</a>';
|
||||
})
|
||||
->addColumn('lead_id', function (LeadMail $lead_mail) {
|
||||
return '<a data-order="'.$lead_mail->lead_id.'" href="'.route('lead_detail', [$lead_mail->lead_id]).'#collapseLeadMails">'.$lead_mail->lead_id.'</a>';
|
||||
})
|
||||
|
|
@ -74,7 +88,7 @@ class MailController extends Controller
|
|||
$query->where('lead_id', 'LIKE', '%'.$keyword.'%');
|
||||
}
|
||||
})
|
||||
->rawColumns(['action_edit', 'send', 'date', 'lead_id'])
|
||||
->rawColumns(['action_edit', 'send', 'date', 'lead_id', 'action_see'])
|
||||
->make(true);
|
||||
}
|
||||
|
||||
|
|
@ -86,6 +100,20 @@ class MailController extends Controller
|
|||
->addColumn('action_edit', function (CustomerMail $customer_mail) {
|
||||
return '<a href="'.route('booking_detail', [$customer_mail->booking_id]).'#collapseBookingMails" class="btn icon-btn btn-sm btn-primary"><span class="fa fa-edit"></span></a>';
|
||||
})
|
||||
->addColumn('action_see', function (CustomerMail $customer_mail) {
|
||||
return '<a data-order="'.$customer_mail->getSentAtRaw().'" class="btn icon-btn btn-sm btn-secondary" href="#" data-toggle="modal"
|
||||
data-target="#modals-load-content"
|
||||
data-id="show-mail"
|
||||
data-url="mail"
|
||||
data-preview="true"
|
||||
data-booking_id="'.$customer_mail->booking->id.'"
|
||||
data-customer_mail_id="'.$customer_mail->id.'"
|
||||
data-action="show-customer-mail"
|
||||
data-redirect="back"
|
||||
data-route="'.route('requests_modal_load').'">
|
||||
<i class="fa fa-eye"></i>
|
||||
</a>';
|
||||
})
|
||||
->addColumn('booking', function (CustomerMail $customer_mail) {
|
||||
$out = $customer_mail->booking->travel_country_id ? $customer_mail->booking->travel_country->name." | " : "- | ";
|
||||
$out .= $customer_mail->booking->travelagenda_id ? $customer_mail->booking->travel_agenda->name."" : "-";
|
||||
|
|
@ -117,7 +145,7 @@ class MailController extends Controller
|
|||
$query->where('booking_id', 'LIKE', '%'.$keyword.'%');
|
||||
}
|
||||
})
|
||||
->rawColumns(['action_edit', 'send', 'date', 'booking_id'])
|
||||
->rawColumns(['action_edit', 'send', 'date', 'booking_id', 'action_see'])
|
||||
->make(true);
|
||||
}
|
||||
|
||||
|
|
@ -129,6 +157,21 @@ class MailController extends Controller
|
|||
->addColumn('action_edit', function (CustomerFewoMail $customer_fewo_mail) {
|
||||
return '<a href="'.route('travel_user_booking_fewo_detail', [$customer_fewo_mail->travel_user_booking_fewo_id]).'#collapseBookingMails" class="btn icon-btn btn-sm btn-primary"><span class="fa fa-edit"></span></a>';
|
||||
})
|
||||
->addColumn('action_see', function (CustomerFewoMail $customer_fewo_mail) {
|
||||
return '<a data-order="'.$customer_fewo_mail->getSentAtRaw().'" class="btn icon-btn btn-sm btn-secondary" href="#" data-toggle="modal"
|
||||
data-target="#modals-load-content"
|
||||
data-id="show-mail"
|
||||
data-url="mail"
|
||||
data-preview="true"
|
||||
data-travel_user_booking_fewo_id="'.$customer_fewo_mail->travel_user_booking_fewo_id.'"
|
||||
data-customer_mail_id="'.$customer_fewo_mail->id.'"
|
||||
data-action="show-customer-mail"
|
||||
data-redirect="back"
|
||||
data-route="'.route('customer_fewo_modal_load').'">
|
||||
<i class="fa fa-eye"></i>
|
||||
</a>';
|
||||
})
|
||||
|
||||
->addColumn('booking', function (CustomerFewoMail $customer_fewo_mail) {
|
||||
$out = ($customer_fewo_mail->booking && $customer_fewo_mail->booking->fewo_lodging) ? $customer_fewo_mail->booking->fewo_lodging->name : "-";
|
||||
return $out;
|
||||
|
|
@ -159,7 +202,7 @@ class MailController extends Controller
|
|||
$query->where('booking_id', 'LIKE', '%'.$keyword.'%');
|
||||
}
|
||||
})
|
||||
->rawColumns(['action_edit', 'send', 'date', 'booking_id'])
|
||||
->rawColumns(['action_edit', 'send', 'date', 'booking_id', 'action_see'])
|
||||
->make(true);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,18 +2,19 @@
|
|||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\Airline;
|
||||
use App\Models\Booking;
|
||||
use App\Models\CustomerMail;
|
||||
use App\Models\Status;
|
||||
use App\Models\Sym\TravelCountry;
|
||||
use App\Models\TravelAgenda;
|
||||
use App\Models\TravelCompany;
|
||||
use App\Models\TravelCountryService;
|
||||
use App\Repositories\CustomerMailRepository;
|
||||
use Carbon\Carbon;
|
||||
use Request;
|
||||
use DataTables;
|
||||
use Carbon\Carbon;
|
||||
use App\Models\Status;
|
||||
use App\Models\Airline;
|
||||
use App\Models\Booking;
|
||||
use App\Models\SfGuardUser;
|
||||
use App\Models\CustomerMail;
|
||||
use App\Models\TravelAgenda;
|
||||
use App\Models\TravelCompany;
|
||||
use App\Models\Sym\TravelCountry;
|
||||
use App\Models\TravelCountryService;
|
||||
use App\Repositories\CustomerMailRepository;
|
||||
|
||||
class RequestController extends Controller
|
||||
{
|
||||
|
|
@ -34,6 +35,10 @@ class RequestController extends Controller
|
|||
$filter_paying_out_status = Booking::$paying_out_status_types;
|
||||
$filter_refund = Booking::$refund_types;
|
||||
$filter_xx_tkt = Booking::$xx_tkt_types;
|
||||
$filter_sf_guard_user = SfGuardUser::where('is_active', 1)->where('user_id', '!=', NULL)
|
||||
->whereHas('user', function ($q) {
|
||||
$q->where('active', 1);
|
||||
})->get()->pluck('username', 'id')->toArray();
|
||||
|
||||
$filter_airlines = Airline::get()->pluck('name', 'id')->toArray();
|
||||
|
||||
|
|
@ -51,6 +56,7 @@ class RequestController extends Controller
|
|||
'filter_refund' => $filter_refund,
|
||||
'filter_xx_tkt' => $filter_xx_tkt,
|
||||
'filter_airlines' => $filter_airlines,
|
||||
'filter_sf_guard_user' => $filter_sf_guard_user
|
||||
];
|
||||
return view('request.index', $data);
|
||||
}
|
||||
|
|
@ -121,7 +127,7 @@ class RequestController extends Controller
|
|||
$query->where('xx_tkt', '=', Request::get('travel_option_xx_tkt'));
|
||||
}
|
||||
if(Request::get('travel_option_airline_id') != ""){
|
||||
$query->where('airline_id', '=', Request::get('travel_option_airline_id'));
|
||||
$query->where('airline_ids', 'LIKE', '%'.Request::get('travel_option_airline_id').'%');
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -249,7 +255,6 @@ class RequestController extends Controller
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($booking->service_provider_entries->count()){
|
||||
foreach($booking->service_provider_entries as $service_provider_entry){
|
||||
if($service_provider_entry->service_provider->service_provider_services->count()){
|
||||
|
|
@ -285,25 +290,48 @@ class RequestController extends Controller
|
|||
}
|
||||
}
|
||||
}
|
||||
if($ret === ""){
|
||||
return 'keine Leistungen definiert';
|
||||
}
|
||||
return $ret;
|
||||
return $ret === "" ? 'keine Leistungen definiert' : $ret;
|
||||
}
|
||||
|
||||
if(isset($data['action']) && $data['action'] === "get_popover_booking_notice"){
|
||||
$booking = Booking::findOrFail($data['booking_id']);
|
||||
$ret = "";
|
||||
|
||||
if($booking->booking_notices->count()){
|
||||
$booking_notice = $booking->booking_notices->first();
|
||||
return $booking_notice->getSmallerMessage(500);
|
||||
}
|
||||
if($ret === ""){
|
||||
return 'keine Notiz';
|
||||
}
|
||||
return $ret;
|
||||
return $ret === "" ? 'keine E-Notiz' : $ret;
|
||||
}
|
||||
|
||||
if(isset($data['action']) && $data['action'] === "get_popover_booking_last_email"){
|
||||
$booking = Booking::findOrFail($data['booking_id']);
|
||||
$ret = "";
|
||||
if($booking->customer_mails->count()){
|
||||
$customer_mail = $booking->customer_mails_sent_at->last();
|
||||
return "<h6>".$customer_mail->subject."</h6>".$customer_mail->message;
|
||||
}
|
||||
return $ret === "" ? 'keine E-Mail' : $ret;
|
||||
}
|
||||
if(isset($data['action']) && $data['action'] === "get_popover_booking_participants_pass"){
|
||||
$booking = Booking::findOrFail($data['booking_id']);
|
||||
$ret = "";
|
||||
if($booking->participant_firstname){
|
||||
$ret .= $booking->participant_pass ?
|
||||
'<span class="badge badge-pill badge-success"><i class="fa fa-check"></i> '.$booking->participant_firstname." ".$booking->participant_lastname.'</span>' :
|
||||
'<span class="badge badge-pill badge-danger""><i class="fa fa-times"></i> '.$booking->participant_firstname." ".$booking->participant_lastname.'</span>';
|
||||
$ret .= "<br>";
|
||||
}
|
||||
if($booking->participants->count()){
|
||||
foreach($booking->participants as $participant){
|
||||
$ret .= $participant->participant_pass ?
|
||||
'<span class="badge badge-pill badge-success"><i class="fa fa-check"></i> '.$participant->participant_firstname." ".$participant->participant_lastname.'</span>' :
|
||||
'<span class="badge badge-pill badge-danger""><i class="fa fa-times"></i> '.$participant->participant_firstname." ".$participant->participant_lastname.'</span>';
|
||||
$ret .= "<br>";
|
||||
}
|
||||
}
|
||||
return $ret === "" ? 'keine Teilnehmer' : $ret;
|
||||
}
|
||||
|
||||
$query = $this->getSearchRequests();
|
||||
$ret = $query->get()->pluck('travelagenda_id', 'id')->unique()->toArray();
|
||||
return TravelAgenda::whereIn('id', $ret)->get()->pluck('name', 'id');
|
||||
|
|
@ -314,18 +342,27 @@ class RequestController extends Controller
|
|||
$data = Request::all();
|
||||
$ret = "";
|
||||
if(Request::ajax()){
|
||||
$data['customers'] = [];
|
||||
$query = $this->getSearchRequests();
|
||||
$bookings = $query->orderBy('id', 'DESC')->limit(50)->get();
|
||||
foreach ($bookings as $booking){
|
||||
$tmp = [];
|
||||
$tmp['email'] = $booking->customer ? $booking->customer->email : "";
|
||||
$tmp['name'] = $booking->customer ? $booking->customer->firstname." ".$booking->customer->name." | " : "- | ";
|
||||
$tmp['name'] .= $booking->travel_country_id ? $booking->travel_country->name." | " : "- | ";
|
||||
$tmp['name'] .= $booking->travelagenda_id ? $booking->travel_agenda->name."" : "-";
|
||||
$data['customers'][$booking->id] = $tmp;
|
||||
if($data['action'] === 'new-customer-mail'){
|
||||
$data['customers'] = [];
|
||||
$query = $this->getSearchRequests();
|
||||
$bookings = $query->orderBy('id', 'DESC')->limit(50)->get();
|
||||
foreach ($bookings as $booking){
|
||||
$tmp = [];
|
||||
$tmp['email'] = $booking->customer ? $booking->customer->email : "";
|
||||
$tmp['name'] = $booking->customer ? $booking->customer->firstname." ".$booking->customer->name." | " : "- | ";
|
||||
$tmp['name'] .= $booking->travel_country_id ? $booking->travel_country->name." | " : "- | ";
|
||||
$tmp['name'] .= $booking->travelagenda_id ? $booking->travel_agenda->name."" : "-";
|
||||
$data['customers'][$booking->id] = $tmp;
|
||||
}
|
||||
$ret = CustomerMailRepository::loadModal($data);
|
||||
}
|
||||
if($data['action'] === 'show-customer-mail'){
|
||||
$booking = Booking::findOrFail($data['booking_id']);
|
||||
$ret = "";
|
||||
if($booking->customer_mails->count()){
|
||||
$ret = CustomerMailRepository::loadModal($data);
|
||||
}
|
||||
}
|
||||
$ret = CustomerMailRepository::loadModal($data);
|
||||
}
|
||||
return response()->json(['response' => $data, 'html'=>$ret]);
|
||||
}
|
||||
|
|
@ -336,23 +373,17 @@ class RequestController extends Controller
|
|||
$query = $this->getSearchRequests();
|
||||
|
||||
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>';
|
||||
})
|
||||
->addColumn('lead_id', function (Booking $booking) {
|
||||
return '<a data-order="'.$booking->lead_id.'" href="'.make_old_url('leads/'.$booking->lead_id.'/edit').'" data-id="'.$booking->lead_id.'">'.$booking->lead_id.'</a>';
|
||||
})
|
||||
/*->addColumn('participant_firstname', function (Booking $booking) {
|
||||
return '<a data-order="'.$booking->participant_firstname.'" href="'.make_old_url('customer/'.$booking->customer_id.'/edit').'" data-id="'.$booking->customer_id.'">'.$booking->participant_firstname.'</a>';
|
||||
})
|
||||
->addColumn('participant_name', function (Booking $booking) {
|
||||
return '<a data-order="'.$booking->participant_name.'" href="'.make_old_url('customer/'.$booking->customer_id.'/edit').'" data-id="'.$booking->customer_id.'">'.$booking->participant_name.'</a>';
|
||||
})*/
|
||||
->addColumn('action_booking_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>';
|
||||
})
|
||||
->addColumn('id', function (Booking $booking) {
|
||||
return '<a data-order="'.$booking->id.'" href="'.make_old_url('booking/'.$booking->id.'/edit').'" data-id="'.$booking->id.'">'.$booking->id.'</a>';
|
||||
})
|
||||
->addColumn('action_booking_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>';
|
||||
->addColumn('action_lead_edit', function (Booking $booking) {
|
||||
return '<a href="' . route('lead_detail', [$booking->lead_id]) . '" class="btn icon-btn btn-sm btn-primary"><span class="fa fa-edit"></span></a>';
|
||||
})
|
||||
->addColumn('lead_id', function (Booking $booking) {
|
||||
return '<a data-order="'.$booking->lead_id.'" href="'.make_old_url('leads/'.$booking->lead_id.'/edit').'" data-id="'.$booking->lead_id.'">'.$booking->lead_id.'</a>';
|
||||
})
|
||||
->addColumn('travel_country_id', function (Booking $booking) {
|
||||
return '<span data-order="'.($booking->travel_country_id ? $booking->travel_country_id : 0).'">'.($booking->travel_country_id ? $booking->travel_country->name : "-").'</span>';
|
||||
|
|
@ -373,35 +404,49 @@ class RequestController extends Controller
|
|||
return $booking->getEndDateFormat();
|
||||
})
|
||||
->addColumn('travel_documents', function (Booking $booking) {
|
||||
return $booking->travel_documents ? '<span data-order="1" class="badge badge-pill badge-success" title="Reiseunterlagen" data-placement="top" rel="tooltip"><i class="fa fa-check"></i></span>' : '<span data-order="0" class="badge badge-pill badge-danger" title="Reiseunterlagen" data-placement="top" rel="tooltip"><i class="fa fa-times"></i></span>';
|
||||
return $booking->travel_documents ? '<span data-order="1" class="badge badge-pill badge-success" title="Reiseunterlagen vollständig" data-placement="top" rel="tooltip"><i class="fa fa-check"></i></span>' : '<span data-order="0" class="badge badge-pill badge-danger" title="Reiseunterlagen nicht vollständig" data-placement="top" rel="tooltip"><i class="fa fa-times"></i></span>';
|
||||
})
|
||||
->addColumn('booking_services', function (Booking $booking) {
|
||||
return $booking->hasBookingServicesUnchecked() ? '<span data-order="1" class="badge badge-pill badge-success" data-booking_id="'.$booking->id.'" data-action="get_popover_booking_services" data-placement="top" data-toggle="popover" title="ServiceLeistungen"><i class="fa fa-check"></i></span>' :
|
||||
'<span data-order="0" class="badge badge-pill badge-danger"><i class="fa fa-times"></i></span>';
|
||||
'<span data-order="0" class="badge badge-pill badge-danger" data-booking_id="'.$booking->id.'" data-action="get_popover_booking_services" data-placement="top" data-toggle="popover" title="ServiceLeistungen"><i class="fa fa-times"></i></span>';
|
||||
})
|
||||
->addColumn('booking_notice', function (Booking $booking) {
|
||||
return $booking->booking_notices->count() ? '<span data-order="1" class="badge badge-pill badge-success" data-booking_id="'.$booking->id.'" data-action="get_popover_booking_notice" data-placement="top" data-toggle="popover" title="letzte Notiz"><i class="fa fa-check"></i></span>' :
|
||||
'<span data-order="0" class="badge badge-pill badge-danger"><i class="fa fa-times"></i></span>';
|
||||
'<span data-order="0" class="badge badge-pill badge-danger" title="keine Notiz" data-placement="top" rel="tooltip"><i class="fa fa-times"></i></span>';
|
||||
})
|
||||
|
||||
->addColumn('sf_guard_user_id', function (Booking $booking) {
|
||||
return '<span data-order="'.($booking->sf_guard_user_id ? $booking->sf_guard_user_id : 0).'">'.($booking->sf_guard_user_id? $booking->sf_guard_user->first_name." ".$booking->sf_guard_user->last_name : "-").'</span>';
|
||||
})
|
||||
->addColumn('lead.status_id', function (Booking $booking) {
|
||||
//umbuchen
|
||||
if($booking->lead){
|
||||
return $booking->lead->getStatusBadge($booking);
|
||||
}
|
||||
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 data-order="'.$customer_mail->getSentAtRaw().'" 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 '<a data-order="'.$customer_mail->getSentAtRaw().'" href="#" data-toggle="modal"
|
||||
data-target="#modals-load-content"
|
||||
data-id="show-mail"
|
||||
data-url="mail"
|
||||
data-preview="true"
|
||||
data-booking_id="'.$booking->id.'"
|
||||
data-customer_mail_id="'.$customer_mail->id.'"
|
||||
data-action="show-customer-mail"
|
||||
data-redirect="back"
|
||||
data-route="'.route('requests_modal_load').'">
|
||||
<span class="badge '.($customer_mail->is_answer ? 'badge-default' : 'badge-secondary').'">'.$customer_mail->sent_at.'</span>
|
||||
</a>';
|
||||
}
|
||||
return '<span data-order="">-</span>';
|
||||
|
||||
})
|
||||
->addColumn('booking_participants_pass', function (Booking $booking) {
|
||||
return $booking->hasBookingParticipantsPass() ? '<span data-order="1" class="badge badge-pill badge-success" data-booking_id="'.$booking->id.'" data-action="get_popover_booking_participants_pass" data-placement="top" data-toggle="popover" title="Teilnehmer Pass"><i class="fa fa-check"></i></span>' :
|
||||
'<span data-order="0" class="badge badge-pill badge-danger" data-booking_id="'.$booking->id.'" data-action="get_popover_booking_participants_pass" data-placement="top" data-toggle="popover" title="Teilnehmer Pass"><i class="fa fa-times"></i></span>';
|
||||
})
|
||||
|
||||
->addColumn('paying_out', function (Booking $booking) {
|
||||
$icon = "";
|
||||
$badge = $booking->getPayingOutColor();
|
||||
|
|
@ -417,8 +462,8 @@ class RequestController extends Controller
|
|||
->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('airline_id', function (Booking $booking) {
|
||||
return $booking->airline ? '<span data-order="'.$booking->airline_id.'">'.$booking->airline->name.'</span>' : '-';
|
||||
->addColumn('airline_ids', function (Booking $booking) {
|
||||
return $booking->airline_ids ? '<span data-order="'.$booking->getAirlinesIDs().'">'. $booking->getAirlinesAsNames().'</span>' : '-';
|
||||
})
|
||||
->addColumn('refund', function (Booking $booking) {
|
||||
return '<span data-order="'.$booking->refund_date.'"><span class="badge badge-'.$booking->getRefundColor().'">'.$booking->getRefundTypeList().'</span></span>';
|
||||
|
|
@ -452,8 +497,6 @@ class RequestController extends Controller
|
|||
})
|
||||
*/
|
||||
->orderColumn('lead_id', 'lead_id $1')
|
||||
->orderColumn('participant_firstname', 'participant_firstname $1')
|
||||
->orderColumn('participant_name', 'participant_name $1')
|
||||
->orderColumn('id', 'id $1')
|
||||
->orderColumn('travel_country_id', 'travel_country_id $1')
|
||||
->orderColumn('travelagenda_id', 'travelagenda_id $1')
|
||||
|
|
@ -469,7 +512,7 @@ class RequestController extends Controller
|
|||
->orderColumn('xx_tkt', 'xx_tkt_date $1')
|
||||
->orderColumn('comfort', 'comfort $1')
|
||||
//->orderColumn('travel_documents', 'travel_documents $1')
|
||||
->rawColumns(['action_lead_edit', 'comfort', 'lead_id', 'participant_firstname', 'participant_name', 'action_booking_edit', 'travel_country_id', 'travelagenda_id', 'travel_company_id', 'sf_guard_user_id', 'lead.status_id', 'last_customer_email', 'id', 'travel_documents', 'booking_services', 'booking_notice', 'paying_out', 'paying_out_status', 'airline_id', 'refund', 'hold', 'xx_tkt'])
|
||||
->rawColumns(['action_lead_edit', 'comfort', 'lead_id', 'booking_participants_pass', 'action_booking_edit', 'travel_country_id', 'travelagenda_id', 'travel_company_id', 'sf_guard_user_id', 'airline_ids', 'lead.status_id', 'last_customer_email', 'id', 'travel_documents', 'booking_services', 'booking_notice', 'paying_out', 'paying_out_status', 'airline_id', 'refund', 'hold', 'xx_tkt'])
|
||||
->make(true);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,34 +25,44 @@ class AirlineController extends Controller
|
|||
return view('settings.airline.index', $data);
|
||||
}
|
||||
|
||||
public function detail($id, $step = false)
|
||||
{
|
||||
if($id === "new") {
|
||||
$model = new Airline();
|
||||
$id = 'new';
|
||||
}else{
|
||||
$model = Airline::findOrFail($id);
|
||||
$id = $model->id;
|
||||
}
|
||||
|
||||
public function update(){
|
||||
$data = [
|
||||
'model' => $model,
|
||||
'id' => $id,
|
||||
'step' => $step,
|
||||
];
|
||||
return view('settings.airline.detail', $data);
|
||||
}
|
||||
|
||||
public function update($id){
|
||||
|
||||
$data = Request::all();
|
||||
|
||||
|
||||
$data['contact_emails'] = isset($data['contact_emails']) ? Util::_explodeLines($data['contact_emails']) : null;
|
||||
|
||||
if($data['id'] === "new"){
|
||||
if($id === "new"){
|
||||
$model = Airline::create($data);
|
||||
}else{
|
||||
$model = Airline::find($data['id']);
|
||||
$model->name = $data['name'];
|
||||
$model->name_full = $data['name_full'];
|
||||
$model->contact_emails = $data['contact_emails'];
|
||||
$model = Airline::find($id);
|
||||
$model->fill($data);
|
||||
$model->save();
|
||||
}
|
||||
|
||||
\Session()->flash('alert-save', '1');
|
||||
return redirect(route('admin_settings_airline'));
|
||||
return redirect(route('admin_settings_airline_detail', [$model->id]));
|
||||
}
|
||||
|
||||
public function delete($id){
|
||||
//TODO check ist linked
|
||||
/*if(Booking::where('travelagenda_id', $id)->count()){
|
||||
\Session()->flash('alert-error', 'Eintrag wird verwendet');
|
||||
return redirect()->back();
|
||||
}*/
|
||||
|
||||
$model = Airline::findOrFail($id);
|
||||
|
||||
|
|
|
|||
|
|
@ -336,7 +336,18 @@ class TravelUserBookingFewoController extends Controller
|
|||
//umbuchen
|
||||
if($travel_user_booking_fewo->customer_fewo_mails->count()){
|
||||
$fewo_mail = $travel_user_booking_fewo->customer_fewo_mail_last;
|
||||
return '<a data-order="'.$fewo_mail->getSentAtRaw().'" href="'.route('travel_user_booking_fewo_detail', [$travel_user_booking_fewo->id]).'#collapseLeadMails" data-order="'.$fewo_mail->sent_at.'"><span class="badge '.($fewo_mail->is_answer ? 'badge-default' : 'badge-secondary').'">'.$fewo_mail->sent_at.'</span></a>';
|
||||
return '<a data-order="'.$fewo_mail->getSentAtRaw().'" href="#" data-toggle="modal"
|
||||
data-target="#modals-load-content"
|
||||
data-id="show-mail"
|
||||
data-url="mail"
|
||||
data-preview="true"
|
||||
data-travel_user_booking_fewo_id="'.$fewo_mail->travel_user_booking_fewo_id.'"
|
||||
data-customer_mail_id="'.$fewo_mail->id.'"
|
||||
data-action="show-customer-mail"
|
||||
data-redirect="back"
|
||||
data-route="'.route('customer_fewo_modal_load').'">
|
||||
<span class="badge '.($fewo_mail->is_answer ? 'badge-default' : 'badge-secondary').'">'.$fewo_mail->sent_at.'</span>
|
||||
</a>';
|
||||
}
|
||||
return '<span data-order="">-</span>';
|
||||
})
|
||||
|
|
|
|||
|
|
@ -43,6 +43,9 @@ class Airline extends Model
|
|||
'name_full',
|
||||
'emails',
|
||||
'contact_emails',
|
||||
'flight_info',
|
||||
'check_in',
|
||||
'baggage',
|
||||
];
|
||||
|
||||
protected $casts = ['contact_emails' => 'array'];
|
||||
|
|
|
|||
|
|
@ -6,11 +6,11 @@
|
|||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Services\Passolution;
|
||||
use App\Services\Util;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use App\Services\Util;
|
||||
use App\Services\Passolution;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
|
||||
/**
|
||||
* Class Booking
|
||||
|
|
@ -212,13 +212,13 @@ class Booking extends Model
|
|||
'travelagenda_id' => 'int',
|
||||
'paying_out' => 'int',
|
||||
'hold' => 'int',
|
||||
'airline_id' => 'int',
|
||||
//'airline_id' => 'int',
|
||||
'refund' => 'int',
|
||||
'xx_tkt' => 'int',
|
||||
'is_rail_fly' => 'bool',
|
||||
'comfort' => 'bool'
|
||||
|
||||
|
||||
'comfort' => 'bool',
|
||||
'airline_ids' => 'array',
|
||||
'participant_pass' => 'bool'
|
||||
];
|
||||
|
||||
protected $dates = [
|
||||
|
|
@ -255,6 +255,7 @@ class Booking extends Model
|
|||
'participant_firstname',
|
||||
'participant_birthdate',
|
||||
'participant_salutation_id',
|
||||
'participant_pass',
|
||||
'nationality_id',
|
||||
'ev_number',
|
||||
'merlin_knr',
|
||||
|
|
@ -271,7 +272,8 @@ class Booking extends Model
|
|||
'travelagenda_id',
|
||||
'paying_out',
|
||||
'paying_out_status',
|
||||
'airline_id',
|
||||
//'airline_id',
|
||||
'airline_ids',
|
||||
'refund',
|
||||
'refund_date',
|
||||
'lawyer_date',
|
||||
|
|
@ -398,11 +400,12 @@ class Booking extends Model
|
|||
{
|
||||
return $this->belongsTo(TravelAgenda::class, 'travelagenda_id');
|
||||
}
|
||||
|
||||
public function airline()
|
||||
|
||||
/*public function airline()
|
||||
{
|
||||
return $this->belongsTo(Airline::class, 'airline_id');
|
||||
}
|
||||
*/
|
||||
|
||||
public function arrangements()
|
||||
{
|
||||
|
|
@ -540,30 +543,103 @@ class Booking extends Model
|
|||
{
|
||||
return $this->hasOne(BookingStorno::class);
|
||||
}
|
||||
|
||||
|
||||
public function getAirlinesAsNames()
|
||||
{
|
||||
$ret = "";
|
||||
if($this->airline_ids){
|
||||
foreach($this->airline_ids as $airline_id){
|
||||
if($Airline = Airline::find($airline_id)){
|
||||
$ret .= $Airline->name." ";
|
||||
}
|
||||
}
|
||||
}
|
||||
return $ret;
|
||||
}
|
||||
public function getAirlinesIds()
|
||||
{
|
||||
if($this->airline_ids){
|
||||
return implode('', $this->airline_ids);
|
||||
}
|
||||
return "";
|
||||
|
||||
}
|
||||
public function hasBookingServicesUnchecked(){
|
||||
$country_services = true;
|
||||
$provider_services = true;
|
||||
$company_services = true;
|
||||
if(!$this->booking_country_services->count() || $this->booking_country_services_checked->count() ||
|
||||
|
||||
$has_country_services = false;
|
||||
$has_provider_services = false;
|
||||
$has_company_services = false;
|
||||
|
||||
if($this->travel_country){
|
||||
foreach($this->travel_country->getContactLandsModels() as $TravelCountry){
|
||||
if($TravelCountry->stern_travel_country){
|
||||
if($TravelCountry->stern_travel_country->travel_country_services->count()){
|
||||
$has_country_services = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($has_country_services && !$this->booking_country_services->count() || $this->booking_country_services_checked->count() ||
|
||||
($this->booking_country_services->count() !== TravelCountryService::where('crm_travel_country_id', '=', $this->travel_country_id)->count())){
|
||||
$country_services = false;
|
||||
$country_services = false;
|
||||
|
||||
}
|
||||
|
||||
if(!$this->booking_provider_services->count() || $this->booking_provider_services_checked->count()){
|
||||
$provider_services = false;
|
||||
foreach($this->service_provider_entries as $service_provider_entry){
|
||||
if($service_provider_entry->service_provider && $service_provider_entry->service_provider->service_provider_services->count()){
|
||||
$has_provider_services = true;
|
||||
}
|
||||
}
|
||||
|
||||
if(!$this->booking_company_services->count() || $this->booking_company_services_checked->count()){
|
||||
$company_services = false;
|
||||
if($has_provider_services && !$this->booking_provider_services->count() || $this->booking_provider_services_checked->count()){
|
||||
if($this->service_provider_entries->count()){
|
||||
$provider_services = false;
|
||||
}
|
||||
}
|
||||
|
||||
if($country_services && $provider_services && $provider_services){
|
||||
foreach($this->booking_service_items as $booking_service_item){
|
||||
if($booking_service_item->travel_company && $booking_service_item->travel_company->travel_company_services->count()){
|
||||
$has_company_services = true;
|
||||
}
|
||||
}
|
||||
if($has_company_services && !$this->booking_company_services->count() || $this->booking_company_services_checked->count()){
|
||||
if($this->booking_service_items->count()){
|
||||
$company_services = false;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if(!$has_country_services && !$has_provider_services && !$has_company_services){
|
||||
return false;
|
||||
}
|
||||
if($country_services && $provider_services && $company_services){
|
||||
return true;
|
||||
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public function hasBookingParticipantsPass(){
|
||||
if($this->participant_firstname){
|
||||
if(!$this->participant_pass){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if($this->participants->count()){
|
||||
foreach($this->participants as $participant){
|
||||
if(!$participant->participant_pass){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
public function getPassolutionPDF($create = false, $resync = false){
|
||||
|
||||
$nats = [];
|
||||
|
|
|
|||
|
|
@ -59,7 +59,11 @@ class LeadMail extends Model
|
|||
'draft' => 'bool',
|
||||
'important' => 'bool',
|
||||
'send' => 'bool',
|
||||
'fail' => 'bool'
|
||||
'fail' => 'bool',
|
||||
'recipient' => 'array',
|
||||
'forward' => 'array',
|
||||
'cc' => 'array',
|
||||
'bcc' => 'array'
|
||||
];
|
||||
|
||||
protected $dates = [
|
||||
|
|
|
|||
|
|
@ -47,7 +47,8 @@ class Participant extends Model
|
|||
protected $casts = [
|
||||
'booking_id' => 'int',
|
||||
'participant_salutation_id' => 'int',
|
||||
'participant_child' => 'bool'
|
||||
'participant_child' => 'bool',
|
||||
'participant_pass' => 'bool'
|
||||
];
|
||||
|
||||
protected $dates = [
|
||||
|
|
@ -61,7 +62,8 @@ class Participant extends Model
|
|||
'participant_birthdate',
|
||||
'participant_salutation_id',
|
||||
'participant_child',
|
||||
'nationality_id'
|
||||
'nationality_id',
|
||||
'participant_pass'
|
||||
];
|
||||
|
||||
public function booking()
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ class TravelCountry extends Model
|
|||
'contact_text_4',
|
||||
'contact_footer',
|
||||
'contact_emails',
|
||||
|
||||
'visum_text',
|
||||
];
|
||||
|
||||
protected $casts = ['contact_lands' => 'array', 'mail_dirs'=>'array', 'contact_emails' => 'array'];
|
||||
|
|
|
|||
|
|
@ -95,6 +95,7 @@ class TravelCountry extends Model
|
|||
'contact_text_3',
|
||||
'contact_text_4',
|
||||
'contact_footer',
|
||||
'visum_text',
|
||||
'entry_requirements',
|
||||
'contact_emails',
|
||||
'is_customer_country',
|
||||
|
|
|
|||
|
|
@ -79,6 +79,7 @@ class BookingRepository extends BaseRepository {
|
|||
'travel_country_id' => $data['travel_country_id'] ? $data['travel_country_id'] : null,
|
||||
'travelagenda_id' => $data['travelagenda_id'] ? $data['travelagenda_id'] : null,
|
||||
'travel_category_id' => $data['travel_category_id'] ? $data['travel_category_id'] : null,
|
||||
'comfort' => isset($data['travel_comfort']) ? true : false,
|
||||
'start_date' => $data['start_date'] ? _reformat_date($data['start_date']) : null,
|
||||
'end_date' => $data['end_date'] ? _reformat_date($data['end_date']) : null,
|
||||
'title' => $data['title'],
|
||||
|
|
@ -88,7 +89,8 @@ class BookingRepository extends BaseRepository {
|
|||
'paying_out_status' => $data['paying_out_status'],
|
||||
'branch_id' => $data['branch_id'],
|
||||
'travel_company_id' => $data['travel_company_id'],
|
||||
'airline_id' => $data['airline_id'],
|
||||
//'airline_id' => $data['airline_id'],
|
||||
'airline_ids' => isset($data['airline_ids']) ? $data['airline_ids'] : null,
|
||||
'refund' => $data['refund'],
|
||||
'refund_date' => _reformat_date($data['refund_date']),
|
||||
'lawyer_date' => _reformat_date($data['lawyer_date']),
|
||||
|
|
@ -103,6 +105,13 @@ class BookingRepository extends BaseRepository {
|
|||
];
|
||||
$this->model->fill($fill);
|
||||
$this->model->save();
|
||||
|
||||
if($this->model->booking_draft_items){
|
||||
foreach($this->model->booking_draft_items as $booking_draft_item){
|
||||
$booking_draft_item->comfort = isset($data['travel_comfort']) ? true : false;
|
||||
$booking_draft_item->save();
|
||||
}
|
||||
}
|
||||
return $this->model;
|
||||
}
|
||||
|
||||
|
|
@ -199,6 +208,7 @@ class BookingRepository extends BaseRepository {
|
|||
if($Participant->booking_id !== $this->model->id){
|
||||
abort(500);
|
||||
}
|
||||
$fill['participant_pass'] = isset($fill['participant_pass']) ? true : false;
|
||||
$fill['participant_child'] = isset($fill['participant_child']) ? true : false;
|
||||
$fill['participant_birthdate'] = isset($fill['participant_birthdate']) ? _reformat_date($fill['participant_birthdate']) : null;
|
||||
$Participant->fill($fill);
|
||||
|
|
@ -211,6 +221,8 @@ class BookingRepository extends BaseRepository {
|
|||
$this->model->participant_firstname = isset($data['participant_firstname']) ? $data['participant_firstname'] : null;
|
||||
$this->model->nationality_id = isset($data['nationality_id']) ? $data['nationality_id'] : null;
|
||||
$this->model->participant_birthdate = isset($data['participant_birthdate']) ? _reformat_date($data['participant_birthdate']) : null;
|
||||
$this->model->participant_pass = isset($data['participant_pass']) ? true : false;
|
||||
|
||||
|
||||
$this->model->save();
|
||||
return $this->model;
|
||||
|
|
|
|||
|
|
@ -257,6 +257,7 @@ class CustomerFewoMailRepository extends BaseRepository {
|
|||
$value->subtitle = "";
|
||||
$value->url = "";
|
||||
$value->recipient = "";
|
||||
$value->show_move_dirs = true;
|
||||
$value->cc = "";
|
||||
$value->bcc = "";
|
||||
$value->lead_title_id = "";
|
||||
|
|
@ -267,6 +268,9 @@ class CustomerFewoMailRepository extends BaseRepository {
|
|||
if (isset($data['customer_mail_id']) && $customer_mail = CustomerFewoMail::find($data['customer_mail_id'])) {
|
||||
$value->url = $data['url'];
|
||||
$value->title = "E-Mail Ansicht";
|
||||
if(isset($data['preview']) && $data['preview']){
|
||||
$value->show_move_dirs = false;
|
||||
}
|
||||
return view("travel.user.booking.mail.modal-show-mail", compact('data', 'value', 'customer_mail'))->render();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -250,8 +250,19 @@ class CustomerMailRepository extends BaseRepository {
|
|||
$value->customers[$key] = $val;
|
||||
}
|
||||
|
||||
}else{
|
||||
if(isset($value->replay_email)){
|
||||
if($value->customer_mail_dir < 10){ // && $value->lead_mail_subdir > 0
|
||||
$customer_mail_dir = \App\Services\Booking::getCustomerMailDir($value->customer_mail_dir);
|
||||
$contact_emails = \App\Services\Booking::getCustomerMailEmails($customer_mail_dir, $value->customer_mail_subdir);
|
||||
if($contact_emails && count($contact_emails) > 0) {
|
||||
$value->replay_email = array_shift($contact_emails);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $value;
|
||||
return $value;
|
||||
}
|
||||
|
||||
public static function loadModal($data)
|
||||
|
|
@ -261,6 +272,7 @@ class CustomerMailRepository extends BaseRepository {
|
|||
$value->subtitle = "";
|
||||
$value->url = "";
|
||||
$value->recipient = "";
|
||||
$value->show_move_dirs = true;
|
||||
$value->cc = "";
|
||||
$value->bcc = "";
|
||||
$value->lead_title_id = "";
|
||||
|
|
@ -272,6 +284,9 @@ class CustomerMailRepository extends BaseRepository {
|
|||
if (isset($data['customer_mail_id']) && $customer_mail = CustomerMail::find($data['customer_mail_id'])) {
|
||||
$value->url = $data['url'];
|
||||
$value->title = "E-Mail Ansicht";
|
||||
if(isset($data['preview']) && $data['preview']){
|
||||
$value->show_move_dirs = false;
|
||||
}
|
||||
return view("customer.mail.modal-show-mail", compact('data', 'value', 'customer_mail'))->render();
|
||||
}
|
||||
}
|
||||
|
|
@ -377,12 +392,12 @@ class CustomerMailRepository extends BaseRepository {
|
|||
$value->subtitle = "Die E-Mail wird im System gespeichert.";
|
||||
if($data['id'] === 'reply-save'){
|
||||
$value->subtitle = "Die E-Mail wird im System als Antwort gespeichert.";
|
||||
|
||||
}
|
||||
$value->url = $data['url'];
|
||||
$value->show = 'reply';
|
||||
$value->customer_mail_dir = isset($data['customer_mail_dir']) ? $data['customer_mail_dir'] : 0;
|
||||
$value->customer_mail_subdir = isset($data['customer_mail_subdir']) ? $data['customer_mail_subdir'] : 0;
|
||||
$value->replay_email = $value->booking->customer->email;
|
||||
|
||||
$value = self::prepareContactMails($value);
|
||||
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ class LeadMailRepository extends BaseRepository {
|
|||
}
|
||||
|
||||
public function store($lead, $data, $mail_from, $is_answer = false, $reply_id = NULL, $sent_at=false){
|
||||
|
||||
|
||||
if(isset($data['save_lead_mail_id'])){
|
||||
$lead_mail = LeadMail::find($data['save_lead_mail_id']);
|
||||
$lead_mail->fill([
|
||||
|
|
@ -246,6 +246,17 @@ class LeadMailRepository extends BaseRepository {
|
|||
$value->customers[$key] = $val;
|
||||
}
|
||||
|
||||
}else{
|
||||
if(isset($value->replay_email)){
|
||||
if($value->lead_mail_dir < 10){ // && $value->lead_mail_subdir > 0
|
||||
$lead_mail_dir = \App\Services\Lead::getCustomerMailDir($value->lead_mail_dir);
|
||||
$contact_emails = \App\Services\Lead::getCustomerMailEmails($lead_mail_dir, $value->lead_mail_subdir);
|
||||
if($contact_emails && count($contact_emails) > 0) {
|
||||
$value->replay_email = array_shift($contact_emails);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
|
|
@ -257,6 +268,7 @@ class LeadMailRepository extends BaseRepository {
|
|||
$value->subtitle = "";
|
||||
$value->url = "";
|
||||
$value->recipient = "";
|
||||
$value->show_move_dirs = true;
|
||||
$value->cc = "";
|
||||
$value->bcc = "";
|
||||
$value->lead_title_id = "";
|
||||
|
|
@ -268,6 +280,9 @@ class LeadMailRepository extends BaseRepository {
|
|||
if (isset($data['lead_mail_id']) && $lead_mail = LeadMail::find($data['lead_mail_id'])) {
|
||||
$value->url = $data['url'];
|
||||
$value->title = "E-Mail Ansicht";
|
||||
if(isset($data['preview']) && $data['preview']){
|
||||
$value->show_move_dirs = false;
|
||||
}
|
||||
return view("lead.modal-show-mail", compact('data', 'value', 'lead_mail'))->render();
|
||||
}
|
||||
}
|
||||
|
|
@ -376,8 +391,10 @@ class LeadMailRepository extends BaseRepository {
|
|||
$value->show = 'reply';
|
||||
$value->lead_mail_dir = isset($data['lead_mail_dir']) ? $data['lead_mail_dir'] : 0;
|
||||
$value->lead_mail_subdir = isset($data['lead_mail_subdir']) ? $data['lead_mail_subdir'] : 0;
|
||||
$value->replay_email = $value->lead->customer->email;
|
||||
|
||||
$value = self::prepareContactMails($value);
|
||||
|
||||
return view("lead.modal-new-mail", compact('data', 'value'))->render();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -98,4 +98,30 @@ class Booking
|
|||
}
|
||||
return [];
|
||||
}
|
||||
|
||||
public static function getBookingInstructionPDFName($fewo){
|
||||
return "HINWEISE-FERIENWOHNUNG-".$fewo->pdf_name.".pdf";
|
||||
}
|
||||
|
||||
public static function getBookingCMSContent($content, $identifier){
|
||||
return CMSContent::where('identifier', '=', $identifier)->where('integer', $content->id)->get()->sortBy('pos');
|
||||
}
|
||||
|
||||
public static function getBookingCMSContentForPDF($identifier_content, $identifier){
|
||||
$pdf_content = [];
|
||||
$contents = CMSContent::where('identifier', '=', $identifier_content)->get()->sortBy('pos');
|
||||
foreach ($contents as $content){
|
||||
if($content->decimal > 0){ //in_pdf
|
||||
$pdf_content[] = $content;
|
||||
}
|
||||
if($fewo_contents = self::getBookingCMSContent($content, $identifier)){
|
||||
foreach ($fewo_contents as $fewo_content){
|
||||
if($fewo_content->decimal > 0){ //in_pdf
|
||||
$pdf_content[] = $fewo_content;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return $pdf_content;
|
||||
}
|
||||
}
|
||||
|
|
@ -232,6 +232,19 @@ class HTMLHelper
|
|||
return $ret;
|
||||
}
|
||||
|
||||
public static function getCMSContentOptions($identifier, $setId = false, $empty=false){
|
||||
$options = CMSContent::where('identifier', '=', $identifier)->get()->sortBy('pos');
|
||||
$ret = "";
|
||||
if($empty){
|
||||
$ret = '<option value="0">Keine Vorlage</option>\n';
|
||||
}
|
||||
foreach ($options as $option){
|
||||
$attr = ($option->id === $setId) ? 'selected="selected"' : '';
|
||||
$ret .= '<option value="'.$option->id.'" '.$attr.'>'.$option->name.'</option>\n';
|
||||
}
|
||||
return $ret;
|
||||
}
|
||||
|
||||
public static function getTravelClassOptions($programId = false, $setId = false){
|
||||
$options = TravelClass::where('program_id', $programId)->get();
|
||||
$ret = '<option value="">alle Kategorien</option>\n';
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ namespace App\Services;
|
|||
use App\Models\Branch;
|
||||
use App\Models\Status;
|
||||
use App\Models\DraftType;
|
||||
use App\Models\CMSContent;
|
||||
use App\Models\Salutation;
|
||||
use App\Models\SfGuardUser;
|
||||
use App\Models\TravelAgenda;
|
||||
|
|
@ -90,9 +91,12 @@ class Model
|
|||
$DraftType = DraftType::where('active', true)->orderByDesc('pos')->get()->pluck('name', 'id');
|
||||
return $emtpy ? $DraftType->prepend('-', 0) : $DraftType;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public static function getCMSContentGeneralNameById($id = false){
|
||||
if($id > 0){
|
||||
$content = CMSContent::findOrFail($id);
|
||||
return $content->name;
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
|
@ -21,7 +21,17 @@ class Placeholder
|
|||
'end_date' => '#Abreisedatum#',
|
||||
'participants' => '#Teilnehmer#',
|
||||
'booking_date' => '#Buchungsdatum#',
|
||||
'airline' => '#Airline#'
|
||||
'airline' => '#Airline#',
|
||||
'extra_services' => '#zugebuchte_Leistungen#',
|
||||
'net_price_travel' => '#Nettopreise_Rundreise#',
|
||||
'net_price_extra_services' => '#Nettopreise_zugebuchte_Leistungen#',
|
||||
'booked_rooms' => '#Gebuchte_Zimmer#',
|
||||
'filekey' => "#Filekey#",
|
||||
'flight_info' => "#Airline_Fluginfo#",
|
||||
'check_in' => "#Airline_Checkin#",
|
||||
'baggage' => "#Airline_Gepaeck#",
|
||||
'country_visum' => '#Reiseland_Visum#',
|
||||
'country_contact' => '#Reiseland_Kontakt#',
|
||||
];
|
||||
|
||||
public static $placeholder_lead = [
|
||||
|
|
@ -112,10 +122,24 @@ class Placeholder
|
|||
$country = $booking->travel_country_id ? $booking->travel_country->name : "-";
|
||||
$program = $booking->travelagenda_id ? $booking->travel_agenda->name : "-";
|
||||
$salutation = isset($booking->customer->salutation) ? $booking->customer->salutation->name : '-';
|
||||
$filekey = $booking->filekey;
|
||||
|
||||
$flight_info = "";
|
||||
$check_in = "";
|
||||
$baggage = "";
|
||||
$country_visum = "";
|
||||
$country_contact = "";
|
||||
|
||||
$start_date = $booking->getStartDateFormat();
|
||||
$end_date = $booking->getEndDateFormat();
|
||||
$booking_date = $booking->getBookingDateFormat();
|
||||
$airline = $booking->airline ? $booking->airline->name_full : '-';
|
||||
|
||||
$extra_services = self::getBookingPlaceholdersBy('extra_services', $booking);
|
||||
$net_price_travel = self::getBookingPlaceholdersBy('net_price_travel', $booking);
|
||||
$net_price_extra_services = self::getBookingPlaceholdersBy('net_price_extra_services', $booking);
|
||||
$booked_rooms = self::getBookingPlaceholdersBy('booked_rooms', $booking);
|
||||
|
||||
$participants = "Teilnehmer:<br>";
|
||||
//first
|
||||
if($booking->participant_firstname){
|
||||
|
|
@ -140,8 +164,10 @@ class Placeholder
|
|||
$replace = [];
|
||||
|
||||
foreach (self::$placeholder_booking as $key => $value) {
|
||||
$search[] = $value;
|
||||
$replace[] = ${$key};
|
||||
if(isset(${$key})){
|
||||
$search[] = $value;
|
||||
$replace[] = ${$key};
|
||||
}
|
||||
}
|
||||
$content = str_replace($search, $replace, $content);
|
||||
$content = preg_replace('/<placeholder.*?>(.*?)<\/placeholder>/', '$1', $content);
|
||||
|
|
@ -209,4 +235,58 @@ class Placeholder
|
|||
}
|
||||
|
||||
|
||||
|
||||
private static function getBookingPlaceholdersBy($key, $booking){
|
||||
|
||||
|
||||
if($booking->new_drafts){
|
||||
$booked_rooms = '';
|
||||
$extra_services = '';
|
||||
$net_price_travel = 0;
|
||||
$net_price_extra_services = 0;
|
||||
foreach($booking->booking_draft_items as $booking_draft_item){
|
||||
//41 zugebuchte Leistungen
|
||||
//32 Aufpreis Kategorie
|
||||
if(in_array($booking_draft_item->draft_type_id, [32, 41])){
|
||||
|
||||
}
|
||||
|
||||
//24 Rundreise
|
||||
if($booking_draft_item->draft_type_id == 24){
|
||||
|
||||
}
|
||||
|
||||
//30 Grundpreis Reise (Zimmer)
|
||||
if($booking_draft_item->draft_type_id == 30){
|
||||
$booked_rooms .= self::cleanText($booking_draft_item->service)." | ".$booking_draft_item->adult." Erw. ".($booking_draft_item->children ? " | ".$booking_draft_item->children." Kin." : '')."<br>";
|
||||
$prices = $booking_draft_item->getItemPrice();
|
||||
$net_price_travel += $prices['adult'];
|
||||
$net_price_travel += $prices['children'];
|
||||
|
||||
}
|
||||
}
|
||||
switch ($key) {
|
||||
case 'extra_services':
|
||||
return "zugebuchte Leistungen:<br>".$extra_services;
|
||||
break;
|
||||
case 'net_price_travel':
|
||||
return "Nettopreis Rundreise: ".Util::_number_format($net_price_travel)." Euro";
|
||||
break;
|
||||
case 'net_price_extra_services':
|
||||
return "Nettopreise zugebuchte Leistungen:<br>".$net_price_extra_services;
|
||||
break;
|
||||
case 'booked_rooms':
|
||||
return "Gebuchte Zimmer:<br>".$booked_rooms;
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static function cleanText($text){
|
||||
$text = str_replace('pro Person im', '', $text);
|
||||
return $text;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,5 +1,8 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'identifier_general' => 'booking-pdf-g-',
|
||||
'identifier_general_name' => 'booking-pdf-general-name',
|
||||
'identifier_content' => 'booking-pdf-c-',
|
||||
'identifier_content_name' => 'booking-pdf-content-name'
|
||||
];
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ return [
|
|||
'cms-iq-assets' => ['name' => 'ADMIN CMS > Medien' , 'color' => 'secondary'],
|
||||
'cms-tg' => ['name' => 'ADMIN CMS > Reiseführer' , 'color' => 'secondary'],
|
||||
'cms-fewo' => ['name' => 'ADMIN CMS > FeWo' , 'color' => 'secondary'],
|
||||
'cms-book' => ['name' => 'ADMIN CMS > Buchungen' , 'color' => 'secondary'],
|
||||
'cms-fb' => ['name' => 'ADMIN CMS > Feedback' , 'color' => 'secondary'],
|
||||
'cms-aq' => ['name' => 'ADMIN CMS > Fragen & Antworten' , 'color' => 'secondary'],
|
||||
'cms-sb' => ['name' => 'ADMIN CMS > Sidebar' , 'color' => 'secondary'],
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ class CreateTravelCountryTable extends Migration
|
|||
$table->text('contact_text_3')->nullable();
|
||||
$table->text('contact_text_4')->nullable();
|
||||
$table->text('contact_footer')->nullable();
|
||||
$table->text('visum_text')->nullable();
|
||||
|
||||
$table->text('entry_requirements')->nullable(); //need?
|
||||
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ class CreateBookingTable extends Migration
|
|||
$table->string('participant_firstname', 255)->nullable();
|
||||
$table->date('participant_birthdate')->nullable();
|
||||
$table->bigInteger('participant_salutation_id')->nullable();
|
||||
$table->tinyInteger('participant_pass')->nullable()->default(0);
|
||||
$table->unsignedInteger('nationality_id')->nullable();
|
||||
$table->string('ev_number', 255)->nullable();
|
||||
$table->string('merlin_knr', 255)->nullable();
|
||||
|
|
@ -58,6 +59,7 @@ class CreateBookingTable extends Migration
|
|||
$table->tinyInteger('paying_out')->nullable()->default(0);
|
||||
$table->tinyInteger('paying_out_status')->nullable()->default(0);
|
||||
$table->unsignedBigInteger('airline_id')->nullable();
|
||||
$table->string('airline_ids', 255)->nullable();
|
||||
$table->tinyInteger('refund')->nullable()->default(0);
|
||||
$table->date('refund_date')->nullable();
|
||||
$table->date('lawyer_date')->nullable();
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ class CreateParticipantTable extends Migration
|
|||
$table->date('participant_birthdate')->nullable();
|
||||
$table->bigInteger('participant_salutation_id')->nullable();
|
||||
$table->tinyInteger('participant_child')->nullable()->default(0);
|
||||
$table->tinyInteger('participant_pass')->nullable()->default(0);
|
||||
$table->unsignedInteger('nationality_id')->nullable();
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,9 @@ class CreateAirlinesTable extends Migration
|
|||
$table->string('name', 255);
|
||||
$table->string('name_full', 255);
|
||||
$table->text('contact_emails')->nullable();
|
||||
|
||||
$table->text('flight_info')->nullable();
|
||||
$table->text('check_in')->nullable();
|
||||
$table->text('baggage')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ class CreateTravelCountryTable extends Migration
|
|||
$table->text('contact_text_4')->nullable();
|
||||
$table->text('contact_footer')->nullable();
|
||||
$table->text('contact_emails')->nullable();
|
||||
|
||||
$table->text('visum_text')->nullable();
|
||||
});
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -188,7 +188,7 @@ $(function () {
|
|||
$.each(button.data(), function(index, value){
|
||||
data[index] = value;
|
||||
});
|
||||
// console.log(data);
|
||||
//console.log(data);
|
||||
loadModalInner(this, data);
|
||||
|
||||
});
|
||||
|
|
@ -221,7 +221,7 @@ $(function () {
|
|||
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
||||
},
|
||||
success: function(data) {
|
||||
// console.log(data);
|
||||
//console.log(data);
|
||||
$(data.response.target).find('.modal-dialog').html(data.html);
|
||||
$(data.response.target).find('.selectpicker').selectpicker('refresh');
|
||||
initModalInner();
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
@section('content')
|
||||
<h4 class="font-weight-bold py-3 mb-1">
|
||||
Leistungsträger-Zahlungen
|
||||
Buchungen & Leistungen
|
||||
<a class="btn btn-default btn-sm float-right" href="{{ make_old_url('backend.php') }}" > zurück ins v1 CRM</a>
|
||||
</h4>
|
||||
<div class="card">
|
||||
|
|
@ -11,8 +11,16 @@
|
|||
<div class="ui-bordered px-4 pt-3 mb-0">
|
||||
<div class="form-row align-items-center">
|
||||
|
||||
<div class="col-12 col-md-4 mb-2">
|
||||
<label class="form-label" for="filter_lead_status_id">Filter Status</label>
|
||||
<select class="selectpicker" data-style="btn-default" name="filter_lead_status_id[]" id="filter_lead_status_id" multiple>
|
||||
@foreach($filter_lead_status as $id=>$name)
|
||||
<option value="{{$id}}">{{$name}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-md-4 mb-4">
|
||||
<div class="col-12 col-md-3 mb-2">
|
||||
<label class="form-label">Reisedatum</label>
|
||||
<div class="row">
|
||||
<div class="input-group col-6 pr-0">
|
||||
|
|
@ -31,7 +39,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-md-4 mb-4">
|
||||
<div class="col-12 col-md-3 mb-2">
|
||||
<label class="form-label">Buchungsdatum</label>
|
||||
<div class="row">
|
||||
<div class="input-group col-6 pr-0">
|
||||
|
|
@ -50,8 +58,8 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-6 col-md-1 mb-4 mt-4">
|
||||
<a href="{{ route('admin_report_bookings') }}" class="btn icon-btn btn-sm btn-outline-dark float-right">
|
||||
<div class="col-12 mb-4">
|
||||
<a href="{{ route('admin_report_bookings') }}" class="btn icon-btn btn-sm btn-outline-dark">
|
||||
<span class="fa fa-sync"></span>
|
||||
</a>
|
||||
</div>
|
||||
|
|
@ -69,7 +77,8 @@
|
|||
<th>{{__('Organisation')}}</th>
|
||||
<th>{{__('Reisepreis')}}</th>
|
||||
<th>{{__('Erlös')}}</th>
|
||||
<th>{{__('Kunde')}}</th>
|
||||
<th>{{__('Vorname')}}</th>
|
||||
<th>{{__('Nachname')}}</th>
|
||||
<th>{{__('Reisedatum')}}</th>
|
||||
<th>{{__('bis')}}</th>
|
||||
<th>{{__('Buchungsdatum')}}</th>
|
||||
|
|
@ -107,6 +116,7 @@
|
|||
d.filter_travel_date_to = $('input[name=filter_travel_date_to]').val();
|
||||
d.filter_booking_date_from = $('input[name=filter_booking_date_from]').val();
|
||||
d.filter_booking_date_to = $('input[name=filter_booking_date_to]').val();
|
||||
d.filter_db_lead_status_id = $('#filter_lead_status_id').val();
|
||||
}
|
||||
},
|
||||
"columns": [
|
||||
|
|
@ -117,13 +127,14 @@
|
|||
{ data: 'price', name: 'price' },
|
||||
{ data: 'price_total', name: 'price_total' },
|
||||
{ data: 'proceeds', name: 'proceeds', orderable: false },
|
||||
{ data: 'customer.fullName', name: 'customer.fullName', orderable: false },
|
||||
{ data: 'customer.firstname', name: 'customer.firstname', orderable: true },
|
||||
{ data: 'customer.name', name: 'customer.name', orderable: true },
|
||||
{ data: 'start_date', name: 'start_date' },
|
||||
{ data: 'end_date', name: 'end_date' },
|
||||
{ data: 'booking_date', name: 'booking_date' },
|
||||
{ data: 'service_provider.names', name: 'service_provider.names', orderable: false },
|
||||
],
|
||||
"order": [[ 10, "desc" ]],
|
||||
"order": [[ 11, "desc" ]],
|
||||
"orderSequence": ["desc", "asc"],
|
||||
"bLengthChange": false,
|
||||
"iDisplayLength": 100,
|
||||
|
|
@ -137,11 +148,11 @@
|
|||
$('#proceed_total_sum').html(settings.json.proceed_total_sum);
|
||||
}
|
||||
});
|
||||
$('#filter_service_provider_id, #filter_is_cleared, #filter_sort_by').on('change', function(){
|
||||
table.order( [ 10, 'desc' ] ).draw();
|
||||
$('#filter_service_provider_id, #filter_is_cleared, #filter_sort_by, #filter_lead_status_id').on('change', function(){
|
||||
table.order( [ 11, 'desc' ] ).draw();
|
||||
});
|
||||
$('.datepicker-base').on('change', function(){
|
||||
table.order( [ 10, 'desc' ] ).draw();
|
||||
table.order( [ 11, 'desc' ] ).draw();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -10,16 +10,24 @@
|
|||
{!! Form::hidden('order', '[[8, "asc"]]', ['id'=>'order_table']) !!}
|
||||
<div class="ui-bordered px-4 pt-3 mb-0">
|
||||
<div class="form-row align-items-center">
|
||||
<div class="col-12 col-md-4 mb-4">
|
||||
|
||||
<div class="col-12 col-md-4 mb-2">
|
||||
<label class="form-label" for="filter_lead_status_id">Filter Status</label>
|
||||
<select class="selectpicker" data-style="btn-default" name="filter_lead_status_id[]" id="filter_lead_status_id" multiple>
|
||||
@foreach($filter_lead_status as $id=>$name)
|
||||
<option value="{{$id}}">{{$name}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-12 col-md-3 mb-2">
|
||||
<label class="form-label" for="filter_service_provider_id">Leistungsträger</label>
|
||||
<select class="custom-select" name="filter_service_provider_id" id="filter_service_provider_id">
|
||||
<option value="">Filter aus</option>
|
||||
@foreach($serviceProviders as $serviceProvider)
|
||||
<option value="{{$serviceProvider->id}}">{{$serviceProvider->name}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-12 col-md-4 mb-4">
|
||||
<div class="col-12 col-md-3 mb-2">
|
||||
<label class="form-label">Reisedatum</label>
|
||||
<div class="row">
|
||||
<div class="input-group col-6 pr-0">
|
||||
|
|
@ -37,7 +45,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 col-md-3 mb-4">
|
||||
<div class="col-6 col-md-2 mb-2">
|
||||
<label class="form-label" for="filter_is_cleared">Bezahlt</label>
|
||||
<select class="custom-select" name="filter_is_cleared" id="filter_is_cleared">
|
||||
<option value="">Filter aus</option>
|
||||
|
|
@ -45,8 +53,8 @@
|
|||
<option value="0">Nein</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-6 col-md-1 mb-4 mt-4">
|
||||
<a href="{{ route('admin_report_providers') }}" class="btn icon-btn btn-sm btn-outline-dark float-right">
|
||||
<div class="col-12 mb-4">
|
||||
<a href="{{ route('admin_report_providers') }}" class="btn icon-btn btn-sm btn-outline-dark">
|
||||
<span class="fa fa-sync"></span>
|
||||
</a>
|
||||
</div>
|
||||
|
|
@ -59,12 +67,14 @@
|
|||
<tr>
|
||||
<th>SPE ID</th>
|
||||
<th>BuchungsID</th>
|
||||
<th>{{__('Status')}}</th>
|
||||
<th>{{__('Reiseveranstalter')}}</th>
|
||||
<th>{{__('MyJack Nr.')}}</th>
|
||||
<th>{{__('Organisation')}}</th>
|
||||
<th>{{__('Reisepreis')}}</th>
|
||||
<th>{{__('Erlös')}}</th>
|
||||
<th>{{__('Kunde')}}</th>
|
||||
<th>{{__('Vorname')}}</th>
|
||||
<th>{{__('Nachname')}}</th>
|
||||
<th>{{__('Reisedatum')}}</th>
|
||||
<th>{{__('bis')}}</th>
|
||||
<th>{{__('bezahlt')}}</th>
|
||||
|
|
@ -103,22 +113,26 @@
|
|||
d.filter_travel_date_from = $('input[name=filter_travel_date_from]').val();
|
||||
d.filter_travel_date_to = $('input[name=filter_travel_date_to]').val();
|
||||
d.filter_is_cleared = $('select[name=filter_is_cleared]').val();
|
||||
d.filter_db_lead_status_id = $('#filter_lead_status_id').val();
|
||||
}
|
||||
},
|
||||
"columns": [
|
||||
{ data: 'id', name: 'id' },
|
||||
{ data: 'booking.id', name: 'booking.id' },
|
||||
{ data: 'booking.lead.status_id', name: 'booking.lead.status_id', orderable: false, searchable: false },
|
||||
{ data: 'service_provider.name', name: 'service_provider.name', orderable: false },
|
||||
{ data: 'booking.merlin_order_number', name: 'booking.merlin_order_number' },
|
||||
{ data: 'booking.price', name: 'booking.price' },
|
||||
{ data: 'booking.price_total', name: 'booking.price_total' },
|
||||
{ data: 'booking.proceeds', name: 'booking.proceeds', orderable: false },
|
||||
{ data: 'booking.customer.fullName', name: 'booking.customer.fullName' },
|
||||
{ data: 'booking.customer.firstname', name: 'booking.customer.firstname' },
|
||||
{ data: 'booking.customer.name', name: 'booking.customer.name' },
|
||||
|
||||
{ data: 'booking.start_date', name: 'booking.start_date' },
|
||||
{ data: 'booking.end_date', name: 'booking.end_date' },
|
||||
{ data: 'is_cleared', name: 'is_cleared' },
|
||||
],
|
||||
"order": [[ 8, "asc" ]],
|
||||
"order": [[ 10, "asc" ]],
|
||||
"orderSequence": ["desc", "asc"],
|
||||
"bLengthChange": false,
|
||||
"iDisplayLength": 100,
|
||||
|
|
@ -133,12 +147,11 @@
|
|||
}
|
||||
});
|
||||
|
||||
$('#filter_service_provider_id, #filter_is_cleared, #filter_sort_by').on('change', function(){
|
||||
table.order( [ 8, 'asc' ] ).draw();
|
||||
$('#filter_service_provider_id, #filter_is_cleared, #filter_sort_by, #filter_lead_status_id').on('change', function(){
|
||||
table.order( [ 10, 'asc' ] ).draw();
|
||||
});
|
||||
|
||||
$('.datepicker-base').on('change', function(){
|
||||
table.order( [ 8, 'asc' ] ).draw();
|
||||
table.order( [ 10, 'asc' ] ).draw();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -6,11 +6,11 @@
|
|||
|
||||
<div class="card-body row">
|
||||
|
||||
<div class="form-group col-sm-6 col-md-4">
|
||||
<div class="form-group col-sm-6 col-md-3">
|
||||
<label for="sf_guard_user_id" class="form-label">{{ __('Sachbearbeiter') }}*</label>
|
||||
{{ Form::select('sf_guard_user_id', \App\Services\Model::getSfGuardUserArray() , $booking->sf_guard_user_id, array('class'=>'custom-select', 'id'=>'sf_guard_user_id', 'required'=>true)) }}
|
||||
</div>
|
||||
<div class="form-group col-sm-6 col-md-4">
|
||||
<div class="form-group col-sm-6 col-md-3">
|
||||
<label class="form-label" for="booking_date">{{ __('Buchungsdatum') }}</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
|
|
@ -19,25 +19,38 @@
|
|||
{{ Form::text('booking_date', _format_date($booking->booking_date), array('placeholder'=>__('Buchungsdatum'), 'class'=>'form-control datepicker-base', 'id'=>'booking_date')) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-sm-6 col-md-4">
|
||||
<div class="form-group col-sm-6 col-md-6">
|
||||
<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')) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-6 col-md-4">
|
||||
<div class="form-group col-sm-6 col-md-3">
|
||||
<label for="travel_country_id" class="form-label">{{ __('Reiseland') }}</label>
|
||||
{{ Form::select('travel_country_id', \App\Services\Model::getSymTravelCountryArray(true) , $booking->travel_country_id, array('class'=>'custom-select', 'id'=>'travel_country_id')) }}
|
||||
</div>
|
||||
<div class="form-group col-sm-6 col-md-4">
|
||||
<div class="form-group col-sm-6 col-md-3">
|
||||
<label class="form-label" for="travelagenda_id">{{ __('Reiseprogramm') }}</label>
|
||||
{{ Form::select('travelagenda_id', \App\Services\Model::getTravelAgendaArray(true, $booking->travel_country_id) , $booking->travelagenda_id, array('class'=>'custom-select', 'id'=>'travelagenda_id')) }}
|
||||
</div>
|
||||
<div class="form-group col-sm-6 col-md-4">
|
||||
<div class="form-group col-sm-6 col-md-3">
|
||||
<label class="form-label" for="travel_category_id">{{ __('Reiseart') }}</label>
|
||||
{{ Form::select('travel_category_id', \App\Services\Model::getTravelCategoryArray(true) , $booking->travel_category_id, array('class'=>'custom-select', 'id'=>'travel_category_id')) }}
|
||||
</div>
|
||||
<div class="form-group col-sm-6 col-md-3">
|
||||
<label class="form-label" for="travel_comfort">{{ __('Kategorie') }}</label>
|
||||
<label class="custom-control custom-checkbox mt-2">
|
||||
{!! Form::checkbox('travel_comfort', 1, $booking->comfort, ['class'=>'custom-control-input', 'id'=>'travel_comfort']) !!}
|
||||
<span class="custom-control-label">Komfort</span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-6 col-md-4">
|
||||
<div class="form-group col-sm-6 col-md-3">
|
||||
<label for="airline_ids" class="form-label">{{ __('Airline:s') }}</label>
|
||||
{{ Form::select('airline_ids[]', \App\Models\Airline::getAsNameIdArray() , $booking->airline_ids, array('class'=>'selectpicker', 'id'=>'airline_ids', 'data-style'=>"btn-default", 'multiple')) }}
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group col-sm-6 col-md-3">
|
||||
<label class="form-label" for="start_date">{{ __('Aufenthalt vom') }}</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
|
|
@ -46,7 +59,7 @@
|
|||
{{ Form::text('start_date', _format_date($booking->start_date), array('placeholder'=>__('Aufenthalt vom'), 'class'=>'form-control datepicker-base', 'id'=>'start_date')) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-sm-6 col-md-4">
|
||||
<div class="form-group col-sm-6 col-md-3">
|
||||
<label class="form-label" for="end_date">{{ __('Aufenthalt bis') }}</label>
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
|
|
@ -55,16 +68,16 @@
|
|||
{{ Form::text('end_date', _format_date($booking->end_date), array('placeholder'=>__('Aufenthalt bis'), 'class'=>'form-control datepicker-base', 'id'=>'end_date')) }}
|
||||
</div>
|
||||
</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')) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-6 col-md-3">
|
||||
<label class="form-label" for="pax">{{ __('Pax') }}</label>
|
||||
{{ Form::select('pax', range(0, 80) , $booking->pax, array('class'=>'custom-select', 'id'=>'pax')) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-6 col-md-3">
|
||||
<label class="form-label" for="title">{{ __('Reisetitel') }}</label>
|
||||
{{ Form::text('title', $booking->title, array('placeholder'=>__('Reisetitel'), 'class'=>'form-control', 'id'=>'title')) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-6 col-md-3">
|
||||
<label class="form-label" for="travel_documents">{{ __('Reiseunterlagen') }}</label>
|
||||
{{ Form::select('travel_documents', [0=>'nicht vollständig', 1=>'vollständig'], $booking->travel_documents, array('class'=>'custom-select', 'id'=>'travel_documents')) }}
|
||||
|
|
@ -122,14 +135,6 @@
|
|||
<label class="form-label" for="hold">{{ __('Hold') }}</label>
|
||||
{{ Form::select('hold', \App\Models\Booking::$hold_types , $booking->hold, array('class'=>'custom-select', 'id'=>'hold' )) }}
|
||||
</div>
|
||||
<div class="form-group col-sm-6 col-md-3">
|
||||
<label class="form-label" for="airline_id">{{ __('Airline') }}</label>
|
||||
{{ Form::select('airline_id', \App\Models\Airline::getAsNameIdArray() , $booking->airline_id, array('class'=>'custom-select', 'id'=>'airline_id' )) }}
|
||||
</div>
|
||||
<div class="form-group col-sm-6 col-md-3">
|
||||
<label class="form-label" for="filekey">{{ __('Filekey') }}</label>
|
||||
{{ Form::text('filekey', $booking->filekey, array('placeholder'=>__('Filekey'), 'class'=>'form-control', 'id'=>'filekey')) }}
|
||||
</div>
|
||||
<div class="form-group col-sm-6 col-md-3">
|
||||
<label class="form-label" for=""> </label>
|
||||
<label class="custom-control custom-checkbox mt-2" style="margin-right: 20px;">
|
||||
|
|
@ -137,6 +142,10 @@
|
|||
<span class="custom-control-label">{{__('Rail & Fly')}}</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-group col-sm-6 col-md-3">
|
||||
<label class="form-label" for="filekey">{{ __('Filekey') }}</label>
|
||||
{{ Form::text('filekey', $booking->filekey, array('placeholder'=>__('Filekey'), 'class'=>'form-control', 'id'=>'filekey')) }}
|
||||
</div>
|
||||
<div class="form-group col-sm-6 col-md-3">
|
||||
<label class="form-label" for="lawyer_date">{{ __('Anwaltsfrist') }}</label>
|
||||
<div class="input-group">
|
||||
|
|
|
|||
|
|
@ -301,7 +301,6 @@
|
|||
</div>
|
||||
|
||||
|
||||
|
||||
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal"
|
||||
data-target="#modals-load-content"
|
||||
data-id="new-file"
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
<th>Nachname</th>
|
||||
<th>Geburtsdatum</th>
|
||||
<th>Nationalität</th>
|
||||
<th>Pass</th>
|
||||
<th>Kind</th>
|
||||
<th> </th>
|
||||
</tr>
|
||||
|
|
@ -37,7 +38,10 @@
|
|||
{{ Form::select('nationality_id', \App\Services\Model::getTravelNationalityArray(false) , $booking->nationality_id, array('class'=>'custom-select', 'id'=>'nationality_id')) }}
|
||||
</td>
|
||||
<td>
|
||||
|
||||
<label class="custom-control custom-checkbox mt-2">
|
||||
{!! Form::checkbox('participant_pass', 1, $booking->participant_pass, ['class'=>'custom-control-input', 'id'=>'participant_pass']) !!}
|
||||
<span class="custom-control-label"></span>
|
||||
</label>
|
||||
</td>
|
||||
<td>
|
||||
|
||||
|
|
@ -65,6 +69,12 @@
|
|||
{{ Form::select('participant['.$item->id.'][nationality_id]', \App\Services\Model::getTravelNationalityArray(false) , $item->nationality_id, array('class'=>'custom-select', 'id'=>'participant_'.$item->id.'_nationality_id')) }}
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<label class="custom-control custom-checkbox mt-2">
|
||||
{!! Form::checkbox('participant['.$item->id.'][participant_pass]', 1, $item->participant_pass, ['class'=>'custom-control-input', 'id'=>'participant_'.$item->id.'_participant_pass']) !!}
|
||||
<span class="custom-control-label"></span>
|
||||
</label>
|
||||
</td>
|
||||
<td>
|
||||
<label class="custom-control custom-checkbox mt-2">
|
||||
{!! Form::checkbox('participant['.$item->id.'][participant_child]', 1, $item->participant_child, ['class'=>'custom-control-input', 'id'=>'participant_'.$item->id.'_participant_child']) !!}
|
||||
|
|
|
|||
|
|
@ -129,7 +129,6 @@
|
|||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
189
resources/views/cms/booking/all/detail.blade.php
Executable file
189
resources/views/cms/booking/all/detail.blade.php
Executable file
|
|
@ -0,0 +1,189 @@
|
|||
@extends('layouts.layout-2')
|
||||
|
||||
@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;
|
||||
}
|
||||
.table tbody + tbody {
|
||||
border-top: 1px solid #9c9c9c;
|
||||
}
|
||||
.table th, .table td {
|
||||
border-top: none;
|
||||
}
|
||||
.table tr.border-none td, .table tr.border-none th {
|
||||
border-top: none;
|
||||
}
|
||||
.table .thead-dark th {
|
||||
color: #4E5155;
|
||||
background-color: rgba(24, 28, 33, 0.1);
|
||||
border-color: rgba(63, 69, 74, 0.1);
|
||||
}
|
||||
|
||||
.input-group-text {
|
||||
padding: 0.438rem 0.475rem;
|
||||
}
|
||||
|
||||
.note-editing-area {
|
||||
border-radius: 0.25rem;
|
||||
border: 1px solid rgba(24, 28, 33, 0.1);
|
||||
padding: 0.438rem 0.875rem;
|
||||
color: #4E5155;
|
||||
-webkit-transition: border-color 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out;
|
||||
transition: border-color 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out;
|
||||
transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
|
||||
transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.note-editor.note-frame .note-editing-area .note-editable, .note-editor.note-airframe .note-editing-area .note-editable {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.note-editor.note-frame .note-editing-area:focus-within , .note-editor.note-airframe .note-editing-area:focus-within {
|
||||
border-color: #648859;
|
||||
}
|
||||
.note-editing-area .note-editable li {
|
||||
margin-bottom:0.5rem;
|
||||
}
|
||||
.note-editor.note-airframe .note-placeholder {
|
||||
padding: 0;
|
||||
}
|
||||
.draft_item_tbody .form-control {
|
||||
color: #000;
|
||||
}
|
||||
</style>
|
||||
|
||||
<h4 class="font-weight-bold py-3 mb-1">
|
||||
Buchnungen PDF Vorlage / {{ $general_name->name }}
|
||||
<div class="float-right">
|
||||
<a href="{{ route('cms_booking_all') }}" class="btn btn-default btn-sm">zurück</a>
|
||||
</div>
|
||||
</h4>
|
||||
|
||||
|
||||
<div class="card">
|
||||
{!! Form::open(['url' => route('cms_booking_all_detail', [$general_name->id]), 'class' => 'form-horizontal']) !!}
|
||||
@if(count($contents))
|
||||
@php($i = 1)
|
||||
<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>Abschnitte</th>
|
||||
<th style="width: 8em">#</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@foreach($contents as $content)
|
||||
<tbody class="draft_item_tbody">
|
||||
<tr>
|
||||
<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>
|
||||
{{ Form::text('contents['.$content->id.'][name]', $content->name, array('placeholder'=>__('Abschnitt*'), 'class'=>'form-control', 'id'=>'contents_'.$content->id.'_name', 'required')) }}
|
||||
</td>
|
||||
<td>
|
||||
<button type="button" name="" value="up_{{$content->id}}" class="btn btn-xs btn-default move-up-btn"><i class="fa fa-arrow-up"></i> </button>
|
||||
<button type="button" name="" value="down_{{$content->id}}" class="btn btn-xs btn-default mr-2 move-down-btn"><i class="fa fa-arrow-down"></i> </button>
|
||||
<a class="text-danger" href="{{ route('cms_booking_all_delete', [$content->id, 'item']) }}" onclick="return confirm('{{__('Wirklich löschen?')}}');"><i class="fa fa-trash-alt"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="border-none">
|
||||
<td colspan="2" style="vertical-align: bottom">
|
||||
<button type="submit" name="action" value="saveAll" class="btn btn-secondary btn-sm" title="speichern"><i class="ion ion-ios-save"></i></button>
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::textarea('contents['.$content->id.'][full_text]', $content->getContent(), array('class'=>'form-control autoExpand summernote-air', 'id'=>'contents_'.$content->id.'_name', 'rows'=>'1', 'data-min-rows'=>'1')) }}
|
||||
</td>
|
||||
<td>
|
||||
<label class="custom-control custom-checkbox mt-2" style="margin-right: 20px;">
|
||||
{!! Form::checkbox('contents['.$content->id.'][in_pdf]', 1, ($content->decimal > 0), ['class'=>'custom-control-input']) !!}
|
||||
<span class="custom-control-label">{{__('in PDF')}}</span>
|
||||
</label>
|
||||
<label class="custom-control custom-checkbox mt-2" style="margin-right: 20px;">
|
||||
{!! Form::checkbox('contents['.$content->id.'][page-break]', 1, ($content->getObjectBy('page-break') > 0), ['class'=>'custom-control-input']) !!}
|
||||
<span class="custom-control-label" style="white-space: nowrap;">{{__('Neue Seite')}}</span>
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@endforeach
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="4"></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="text-left mt-3 m-2">
|
||||
<button type="submit" name="action" value="saveAll" class="btn btn-submit btn-sm">{{ __('save changes') }}</button>
|
||||
<div class="float-right">
|
||||
<button type="submit" name="action" value="addItem" class="btn btn-sm btn-primary"><i class="fa fa-plus"></i> Neuen Abschnitt hinzufügen</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{!! Form::close() !!}
|
||||
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$.dragYScroll();
|
||||
var sort_item_pos_number = function(){
|
||||
var index = 1;
|
||||
$('#table_dragula_tbody .draft_item_tbody').each(function () {
|
||||
$(this).find('.item_pos_number').html(index);
|
||||
$(this).data('rowPosition', index);
|
||||
index++;
|
||||
});
|
||||
};
|
||||
$(function() {
|
||||
// Drag handle
|
||||
var sortableItems = dragula([$('#table_dragula_tbody')[0]], {
|
||||
moves: function (el, container, handle) {
|
||||
return handle.classList.contains('handle');
|
||||
}
|
||||
});
|
||||
sortableItems.on('dragend', function() {
|
||||
//sort new
|
||||
sort_item_pos_number();
|
||||
});
|
||||
});
|
||||
$('table .move-up-btn').on('click', function () {
|
||||
var thisRow = $(this).closest('tbody');
|
||||
var prevRow = thisRow.prev();
|
||||
if (prevRow.length) {
|
||||
prevRow.before(thisRow);
|
||||
sort_item_pos_number()
|
||||
|
||||
}
|
||||
});
|
||||
$('table .move-down-btn').on('click', function () {
|
||||
var thisRow = $(this).closest('tbody');
|
||||
var nextRow = thisRow.next();
|
||||
if (nextRow.length) {
|
||||
nextRow.after(thisRow);
|
||||
sort_item_pos_number()
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
113
resources/views/cms/booking/all/index.blade.php
Executable file
113
resources/views/cms/booking/all/index.blade.php
Executable file
|
|
@ -0,0 +1,113 @@
|
|||
@extends('layouts.layout-2')
|
||||
|
||||
@section('content')
|
||||
|
||||
<h4 class="font-weight-bold py-3 mb-1">
|
||||
Buchnungen PDF Vorlagen
|
||||
</h4>
|
||||
|
||||
@if ($errors->any())
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="alert alert-danger">
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
<div class="card">
|
||||
<div class="card-datatable table-responsive">
|
||||
<table class="datatables-feedbacks table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="max-width: 60px;"> </th>
|
||||
<th>{{__('Name')}}</th>
|
||||
<th>{{__('')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($values as $value)
|
||||
<tr>
|
||||
<td data-sort="{{ $value->id }}">
|
||||
<a href="{{ route('cms_booking_all_detail', [$value->id]) }}" class="btn icon-btn btn-sm btn-primary">
|
||||
<span class="fa fa-edit"></span>
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
{{ $value->name }}
|
||||
<a href="#" class="text-primary" data-toggle="modal" data-target="#modals-default"
|
||||
data-id="{{ $value->id }}"
|
||||
data-name="{{ $value->name }}">
|
||||
<span class="fa fa-edit"></span>
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<a class="text-danger" href="{{ route('cms_booking_all_delete', [$value->id, 'name']) }}" onclick="return confirm('{{__('Wirklich löschen?')}}');"><i class="fa fa-trash-alt"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div class="ml-3 mb-2">
|
||||
|
||||
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-default"
|
||||
data-id="new"
|
||||
data-name=""
|
||||
>Neue PDF Vorlage anlegen</button>
|
||||
</div>
|
||||
|
||||
<!-- Modal template -->
|
||||
<div class="modal fade" id="modals-default">
|
||||
<div class="modal-dialog">
|
||||
<form class="modal-content" action="{{ route('cms_booking_all_detail') }}" method="post">
|
||||
@csrf
|
||||
<input type="hidden" name="id" value="">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Buchnungen PDF Vorlagen <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="{{__('Name')}}" 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" name="action" value="newOrSaveName" >{{__('save')}}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
$('#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'));
|
||||
});
|
||||
|
||||
$( document ).ready(function() {
|
||||
$('.datatables-feedbacks').dataTable({
|
||||
"bLengthChange": false,
|
||||
"iDisplayLength": 50,
|
||||
"language": {
|
||||
"url": "/js/German.json"
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
</div>
|
||||
@endsection
|
||||
249
resources/views/cms/booking/content/detail.blade.php
Executable file
249
resources/views/cms/booking/content/detail.blade.php
Executable file
|
|
@ -0,0 +1,249 @@
|
|||
@extends('layouts.layout-2')
|
||||
|
||||
@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;
|
||||
}
|
||||
.table tbody + tbody {
|
||||
border-top: 1px solid #9c9c9c;
|
||||
}
|
||||
.table th, .table td {
|
||||
border-top: none;
|
||||
}
|
||||
.table tr.border-none td, .table tr.border-none th {
|
||||
border-top: none;
|
||||
}
|
||||
.table .thead-dark th {
|
||||
color: #4E5155;
|
||||
background-color: rgba(24, 28, 33, 0.1);
|
||||
border-color: rgba(63, 69, 74, 0.1);
|
||||
}
|
||||
|
||||
.input-group-text {
|
||||
padding: 0.438rem 0.475rem;
|
||||
}
|
||||
|
||||
.note-editing-area {
|
||||
border-radius: 0.25rem;
|
||||
border: 1px solid rgba(24, 28, 33, 0.1);
|
||||
padding: 0.438rem 0.875rem;
|
||||
color: #4E5155;
|
||||
-webkit-transition: border-color 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out;
|
||||
transition: border-color 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out;
|
||||
transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
|
||||
transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, -webkit-box-shadow 0.15s ease-in-out;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.note-editor.note-frame .note-editing-area .note-editable, .note-editor.note-airframe .note-editing-area .note-editable {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.note-editor.note-frame .note-editing-area:focus-within , .note-editor.note-airframe .note-editing-area:focus-within {
|
||||
border-color: #648859;
|
||||
}
|
||||
.note-editing-area .note-editable li {
|
||||
margin-bottom:0.5rem;
|
||||
}
|
||||
.note-editor.note-airframe .note-placeholder {
|
||||
padding: 0;
|
||||
}
|
||||
.draft_item_tbody .form-control {
|
||||
color: #000;
|
||||
}
|
||||
</style>
|
||||
|
||||
<h4 class="font-weight-bold py-3 mb-1">
|
||||
Buchnungen PDF Inhalte / {{ $content_name->name }}
|
||||
<div class="float-right">
|
||||
<a href="{{ route('cms_booking_content') }}" class="btn btn-default btn-sm">zurück</a>
|
||||
</div>
|
||||
</h4>
|
||||
|
||||
|
||||
<div class="card">
|
||||
{!! Form::open(['url' => route('cms_booking_content_detail', [$content_name->id]), 'class' => 'form-horizontal', 'id'=>'booking-content-detail-form']) !!}
|
||||
{{ Form::hidden('content_pos_id', '') }}
|
||||
{{ Form::hidden('action', '') }}
|
||||
|
||||
@if(count($contents))
|
||||
@php($i = 1)
|
||||
|
||||
<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>Abschnitte</th>
|
||||
<th style="width: 8em">#</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@foreach($contents as $content)
|
||||
@if($content->decimal > 0)
|
||||
<tbody class="draft_item_tbody">
|
||||
<tr>
|
||||
<td>
|
||||
<span class="ion ion-ios-lock d-inline-block bg-dark text-white p-1 px-2"></span>
|
||||
{{-- <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>
|
||||
{{ Form::text('contents['.$content->id.'][name]', $content->name, array('placeholder'=>__('Abschnitt*'), 'class'=>'form-control', 'id'=>'contents_'.$content->id.'_name', 'readonly')) }}
|
||||
{{ Form::hidden('contents['.$content->id.'][identifier]', $identifier_general) }}
|
||||
</td>
|
||||
<td>
|
||||
{{--
|
||||
<button type="button" name="" value="up_{{$content->id}}" class="btn btn-xs btn-default move-up-btn"><i class="fa fa-arrow-up"></i> </button>
|
||||
<button type="button" name="" value="down_{{$content->id}}" class="btn btn-xs btn-default mr-2 move-down-btn"><i class="fa fa-arrow-down"></i> </button>
|
||||
<a class="text-danger" href="{{ route('cms_fewo_all_delete', [$content->id]) }}" onclick="return confirm('{{__('Wirklich löschen?')}}');"><i class="fa fa-trash-alt"></i></a>
|
||||
--}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="border-none">
|
||||
<td colspan="2" style="vertical-align: bottom">
|
||||
<button type="button" name="action" value="addItem" class="btn btn-xs btn-primary btn-add-item" title="Abschnitt hinzufügen" data-pos-id="{{$content->id}}"><i class="fa fa-plus"></i> <i class="fa fa-arrow-down"></i></button>
|
||||
</td>
|
||||
<td>
|
||||
<div class="note-editing-area readonly">
|
||||
{!! $content->getContent() !!}
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
{{-- --}}
|
||||
<label class="custom-control custom-checkbox mt-2" style="margin-right: 20px;">
|
||||
{!! Form::checkbox('contents['.$content->id.'][in_pdf]', 1, ($content->decimal > 0), ['class'=>'custom-control-input', 'disabled']) !!}
|
||||
<span class="custom-control-label">{{__('in PDF')}}</span>
|
||||
</label>
|
||||
<label class="custom-control custom-checkbox mt-2" style="margin-right: 20px;">
|
||||
{!! Form::checkbox('contents['.$content->id.'][page-break]', 1, ($content->getObjectBy('page-break') > 0), ['class'=>'custom-control-input', 'disabled']) !!}
|
||||
<span class="custom-control-label" style="white-space: nowrap;">{{__('Neue Seite')}}</span>
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
@endif
|
||||
@if($booking_contents = \App\Services\Booking::getBookingCMSContent($content, $identifier_content))
|
||||
@foreach($booking_contents as $content)
|
||||
<tbody class="draft_item_tbody">
|
||||
<tr>
|
||||
<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>
|
||||
{{ Form::text('contents['.$content->id.'][name]', $content->name, array('placeholder'=>__('Abschnitt*'), 'class'=>'form-control', 'id'=>'contents_'.$content->id.'_name', 'required')) }}
|
||||
{{ Form::hidden('contents['.$content->id.'][identifier]', $identifier_content) }}
|
||||
</td>
|
||||
<td>
|
||||
<button type="button" name="" value="up_{{$content->id}}" class="btn btn-xs btn-default move-up-btn"><i class="fa fa-arrow-up"></i> </button>
|
||||
<button type="button" name="" value="down_{{$content->id}}" class="btn btn-xs btn-default mr-2 move-down-btn"><i class="fa fa-arrow-down"></i> </button>
|
||||
<a class="text-danger" href="{{ route('cms_booking_content_delete', [$content->id, 'item']) }}" onclick="return confirm('{{__('Wirklich löschen?')}}');"><i class="fa fa-trash-alt"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="border-none">
|
||||
<td colspan="2" style="vertical-align: bottom">
|
||||
<button type="submit" name="action" value="saveAll" class="btn btn-secondary btn-sm" title="speichern"><i class="ion ion-ios-save"></i></button>
|
||||
</td>
|
||||
<td>
|
||||
{{ Form::textarea('contents['.$content->id.'][full_text]', $content->getContent(), array('class'=>'form-control autoExpand summernote-air', 'id'=>'contents_'.$content->id.'_name', 'rows'=>'1', 'data-min-rows'=>'1')) }}
|
||||
</td>
|
||||
<td>
|
||||
<label class="custom-control custom-checkbox mt-2" style="margin-right: 20px;">
|
||||
{!! Form::checkbox('contents['.$content->id.'][in_pdf]', 1, ($content->decimal > 0), ['class'=>'custom-control-input']) !!}
|
||||
<span class="custom-control-label">{{__('in PDF')}}</span>
|
||||
</label>
|
||||
<label class="custom-control custom-checkbox mt-2" style="margin-right: 20px;">
|
||||
{!! Form::checkbox('contents['.$content->id.'][page-break]', 1, ($content->getObjectBy('page-break') > 0), ['class'=>'custom-control-input']) !!}
|
||||
<span class="custom-control-label" style="white-space: nowrap;">{{__('Neue Seite')}}</span>
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@endforeach
|
||||
|
||||
@endif
|
||||
@endforeach
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="4"></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="text-left mt-3 m-2">
|
||||
<button type="submit" name="action" value="saveAll" class="btn btn-submit btn-sm">{{ __('save changes') }}</button>
|
||||
|
||||
<div class="float-right">
|
||||
<button type="submit" name="action" value="previewPDF" class="btn btn-sm btn-info"><i class="fa fa-file-pdf"></i> Vorschau PDF</button>
|
||||
</div>
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
$('.btn-add-item').on('click', function () {
|
||||
$('input[name=content_pos_id]').val($(this).data('pos-id'));
|
||||
$('input[name=action]').val('addItem');
|
||||
$("#booking-content-detail-form").submit();
|
||||
});
|
||||
$.dragYScroll();
|
||||
var sort_item_pos_number = function(){
|
||||
var index = 1;
|
||||
$('#table_dragula_tbody .draft_item_tbody').each(function () {
|
||||
$(this).find('.item_pos_number').html(index);
|
||||
$(this).data('rowPosition', index);
|
||||
index++;
|
||||
});
|
||||
};
|
||||
$(function() {
|
||||
// Drag handle
|
||||
var sortableItems = dragula([$('#table_dragula_tbody')[0]], {
|
||||
moves: function (el, container, handle) {
|
||||
return handle.classList.contains('handle');
|
||||
}
|
||||
});
|
||||
sortableItems.on('dragend', function() {
|
||||
//sort new
|
||||
sort_item_pos_number();
|
||||
});
|
||||
});
|
||||
$('table .move-up-btn').on('click', function () {
|
||||
var thisRow = $(this).closest('tbody');
|
||||
var prevRow = thisRow.prev();
|
||||
if (prevRow.length) {
|
||||
prevRow.before(thisRow);
|
||||
sort_item_pos_number()
|
||||
|
||||
}
|
||||
});
|
||||
$('table .move-down-btn').on('click', function () {
|
||||
var thisRow = $(this).closest('tbody');
|
||||
var nextRow = thisRow.next();
|
||||
if (nextRow.length) {
|
||||
nextRow.after(thisRow);
|
||||
sort_item_pos_number()
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
124
resources/views/cms/booking/content/index.blade.php
Executable file
124
resources/views/cms/booking/content/index.blade.php
Executable file
|
|
@ -0,0 +1,124 @@
|
|||
@extends('layouts.layout-2')
|
||||
|
||||
@section('content')
|
||||
|
||||
<h4 class="font-weight-bold py-3 mb-1">
|
||||
Buchnungen PDF Inhalte
|
||||
</h4>
|
||||
|
||||
@if ($errors->any())
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="alert alert-danger">
|
||||
<ul>
|
||||
@foreach ($errors->all() as $error)
|
||||
<li>{{ $error }}</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
<div class="card">
|
||||
<div class="card-datatable table-responsive">
|
||||
<table class="datatables-feedbacks table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="max-width: 60px;"> </th>
|
||||
<th>{{__('Name')}}</th>
|
||||
<th>{{__('Vorlage')}}</th>
|
||||
<th>{{__('')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($values as $value)
|
||||
<tr>
|
||||
<td data-sort="{{ $value->id }}">
|
||||
<a href="{{ route('cms_booking_content_detail', [$value->id]) }}" class="btn icon-btn btn-sm btn-primary">
|
||||
<span class="fa fa-edit"></span>
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
{{ $value->name }}
|
||||
<a href="#" class="text-primary" data-toggle="modal" data-target="#modals-default"
|
||||
data-id="{{ $value->id }}"
|
||||
data-name="{{ $value->name }}"
|
||||
data-general_id="{{ $value->getObjectBy('general_id') }}">
|
||||
<span class="fa fa-edit"></span>
|
||||
</a>
|
||||
</td>
|
||||
<td>{{ \App\Services\Model::getCMSContentGeneralNameById($value->getObjectBy('general_id')) }}</td>
|
||||
<td>
|
||||
<a class="text-danger" href="{{ route('cms_booking_content_delete', [$value->id, 'name']) }}" onclick="return confirm('{{__('Wirklich löschen?')}}');"><i class="fa fa-trash-alt"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div class="ml-3 mb-2">
|
||||
<button type="button" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#modals-default"
|
||||
data-id="new"
|
||||
data-name=""
|
||||
data-general_id=""
|
||||
>Neue PDF Vorlage anlegen</button>
|
||||
</div>
|
||||
|
||||
<!-- Modal template -->
|
||||
<div class="modal fade" id="modals-default">
|
||||
<div class="modal-dialog">
|
||||
<form class="modal-content" action="{{ route('cms_booking_content_detail') }}" method="post">
|
||||
@csrf
|
||||
<input type="hidden" name="id" value="">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Buchnungen PDF Inhalte <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="{{__('Name')}}" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="general_id" class="form-label">{{__('Vorlage')}}*</label>
|
||||
<select class="selectpicker" data-style="btn-default" name="general_id" data-live-search="true" required>
|
||||
{!! HTMLHelper::getCMSContentOptions($identifier_general_name, false, false) !!}
|
||||
</select>
|
||||
<i>Ein PDF Inhalt benötigt eine Vorlage mit min einen Eintrag.</i>
|
||||
</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" name="action" value="newOrSaveName" >{{__('save')}}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
$('#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 select[name='general_id']").val(button.data('general_id'));
|
||||
$('.selectpicker').selectpicker('refresh');
|
||||
});
|
||||
|
||||
$( document ).ready(function() {
|
||||
$('.datatables-feedbacks').dataTable({
|
||||
"bLengthChange": false,
|
||||
"iDisplayLength": 50,
|
||||
"language": {
|
||||
"url": "/js/German.json"
|
||||
},
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
@endsection
|
||||
|
|
@ -206,7 +206,6 @@
|
|||
<div class="float-right">
|
||||
<button type="submit" name="action" value="previewPDF" class="btn btn-sm btn-info"><i class="fa fa-file-pdf"></i> Vorschau PDF</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
<script>
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@
|
|||
<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')) }}
|
||||
{{ Form::text('mail_from', isset($value->replay_email) ? $value->replay_email : '', array('placeholder'=>'E-Mail Adresse von', 'id'=>'mail_from', 'class'=>'form-control', 'required')) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
|
|
@ -156,20 +156,26 @@
|
|||
<span class="ql-formats">
|
||||
<select class="ql-align"></select>
|
||||
</span>
|
||||
<span class="ql-formats">
|
||||
<button class="ql-link"></button>
|
||||
</span>
|
||||
<span class="ql-formats">
|
||||
<button class="ql-clean"></button>
|
||||
</span>
|
||||
<span class="ql-formats">
|
||||
<span class="ql-formats">
|
||||
<select class="ql-placeholder">
|
||||
{!! \App\Services\Placeholder::getBookingOptions() !!}
|
||||
</select>
|
||||
</span>
|
||||
|
||||
@if(isset($value->booking))
|
||||
<span class="ql-formats">
|
||||
<button class="ql-preview" id="open_modal_quill_preview"
|
||||
data-route="{{ route('customer_mail_ajax') }}"
|
||||
data-booking_id="{{ $value->booking->id }}"
|
||||
data-action="load_preview_mail"><i class="fa fa-eye"></i></button>
|
||||
</span>
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
<div id="message-editor" style="height: 400px">{!! $value->message !!}</div>
|
||||
{{ Form::textarea('message', $value->message, array('placeholder'=>$value->m_placeholder, 'id'=>'message-editor-fallback', 'class'=>'form-control d-none', 'rows'=>15)) }}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
@include('customer.mail.modal-show-mail-inner', ['customer_mail' => $customer_mail, 'show_move_dirs' => true])
|
||||
@include('customer.mail.modal-show-mail-inner', ['customer_mail' => $customer_mail, 'show_move_dirs' => $value->show_move_dirs])
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
|
|
|
|||
|
|
@ -317,6 +317,18 @@
|
|||
|
||||
});
|
||||
|
||||
$('.summernote-exsmall').summernote({
|
||||
height: 100,
|
||||
tabsize: 2,
|
||||
followingToolbar: true,
|
||||
toolbar: [
|
||||
['font', ['bold', 'italic', 'underline', 'clear']],
|
||||
['para', ['ul', 'ol']],
|
||||
['insert', ['link', 'hr']],
|
||||
['view', ['fullscreen', 'codeview']],
|
||||
],
|
||||
});
|
||||
|
||||
$('.summernote-air').summernote({
|
||||
airMode: true,
|
||||
lang: 'de-DE',
|
||||
|
|
|
|||
|
|
@ -211,6 +211,22 @@
|
|||
</ul>
|
||||
</li>
|
||||
@endif
|
||||
@if(Auth::user()->isPermission('cms-book'))
|
||||
<li class="sidenav-item{{ Request::is('cms/booking/*') ? ' open' : '' }}">
|
||||
<a href="javascript:void(0)" class="sidenav-link sidenav-toggle">
|
||||
<i class="sidenav-icon ion ion-md-bed"></i>
|
||||
<div>Buchungen</div>
|
||||
</a>
|
||||
<ul class="sidenav-menu">
|
||||
<li class="sidenav-item{{ Request::is(['cms/booking/all', 'cms/booking/all/*']) ? ' active' : '' }}">
|
||||
<a href="{{ route('cms_booking_all') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-paper"></i><div>PDF Vorlagen</div></a>
|
||||
</li>
|
||||
<li class="sidenav-item{{ Request::is(['cms/booking/content', 'cms/booking/content/*']) ? ' active' : '' }}">
|
||||
<a href="{{ route('cms_booking_content') }}" class="sidenav-link"><i class="sidenav-icon ion ion-md-paper"></i><div>PDF Inhalte</div></a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
@endif
|
||||
@if(Auth::user()->isPermission('cms-fewo'))
|
||||
<li class="sidenav-item{{ Request::is('cms/fewo/*') ? ' open' : '' }}">
|
||||
<a href="javascript:void(0)" class="sidenav-link sidenav-toggle">
|
||||
|
|
@ -219,7 +235,7 @@
|
|||
</a>
|
||||
<ul class="sidenav-menu">
|
||||
<li class="sidenav-item{{ Request::is(['cms/fewo/all', 'cms/fewo/all/*']) ? ' active' : '' }}">
|
||||
<a href="{{ route('cms_fewo_all') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-paper"></i><div>FeWo Allgemein</div></a>
|
||||
<a href="{{ route('cms_fewo_all') }}" class="sidenav-link"><i class="sidenav-icon ion ion-ios-paper"></i><div>FeWo Vorlage</div></a>
|
||||
</li>
|
||||
<li class="sidenav-item{{ Request::is(['cms/fewo/content', 'cms/fewo/content/*']) ? ' active' : '' }}">
|
||||
<a href="{{ route('cms_fewo_content') }}" class="sidenav-link"><i class="sidenav-icon ion ion-md-paper"></i><div>FeWo Inhalte</div></a>
|
||||
|
|
|
|||
|
|
@ -100,8 +100,9 @@
|
|||
<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->lead->customer ? $value->lead->customer->email : '', array('placeholder'=>'E-Mail Adresse von', 'id'=>'mail_from', 'class'=>'form-control', 'required')) }}
|
||||
{{ Form::text('mail_from', isset($value->replay_email) ? $value->replay_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">
|
||||
|
|
@ -148,6 +149,9 @@
|
|||
<span class="ql-formats">
|
||||
<select class="ql-align"></select>
|
||||
</span>
|
||||
<span class="ql-formats">
|
||||
<button class="ql-link"></button>
|
||||
</span>
|
||||
<span class="ql-formats">
|
||||
<button class="ql-clean"></button>
|
||||
</span>
|
||||
|
|
@ -215,20 +219,20 @@
|
|||
<div class="col-sm-6">
|
||||
<label for="subdir" class="form-label"> </label>
|
||||
{{-- TODO load subdirs by pos id --}}
|
||||
{{-- @if(isset($value->booking))
|
||||
@foreach(\App\Services\Booking::getCustomerMailDirs() as $lead_mail_dir)
|
||||
@if(isset($value->lead) && $value->lead->travel_country)
|
||||
@foreach(\App\Services\Lead::getCustomerMailDirs() as $lead_mail_dir)
|
||||
@if($lead_mail_dir->pos > 0)
|
||||
<select class="custom-select send_mail_subdir" name="subdir" id="send_mail_subdir_{{$lead_mail_dir->pos}}">
|
||||
<option value="0">keinen Unterordner</option>
|
||||
@foreach($value->booking->travel_country->getMailDirs($lead_mail_dir->pos) as $mail_dir_id)
|
||||
@php ($mail_dir_name = \App\Services\Booking::getCustomerMailName($lead_mail_dir, $mail_dir_id))
|
||||
<option value="{{$mail_dir_id}}" @if($value->customer_mail_subdir == $mail_dir_id) selected @endif>{{$mail_dir_name}}</option>
|
||||
@endforeach
|
||||
@foreach($value->lead->travel_country->getMailDirs($lead_mail_dir->pos) as $mail_dir_id)
|
||||
@php ($mail_dir_name = \App\Services\Lead::getCustomerMailName($lead_mail_dir, $mail_dir_id))
|
||||
<option value="{{$mail_dir_id}}" @if($value->lead_mail_subdir == $mail_dir_id) selected @endif>{{$mail_dir_name}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
--}}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
|
|
|||
|
|
@ -100,7 +100,6 @@
|
|||
</div>
|
||||
<div class="col-sm-6">
|
||||
<button type="submit" class="btn btn-xs btn-default float-right mt-1"><i class="ion ion-ios-redo"></i> verschieben</button>
|
||||
|
||||
<label for="subdir" class="form-label"> </label>
|
||||
@if($lead_mail->lead->travel_country)
|
||||
@foreach(\App\Services\Lead::getCustomerMailDirs() as $lead_mail_dir)
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
@include('lead.modal-show-mail-inner', ['lead_mail' => $lead_mail, 'show_move_dirs' => true])
|
||||
@include('lead.modal-show-mail-inner', ['lead_mail' => $lead_mail, 'show_move_dirs' => $value->show_move_dirs])
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
<thead>
|
||||
<tr>
|
||||
<th style="max-width: 60px;"> </th>
|
||||
<th style="max-width: 60px;"><i class="fa fa-eye"></i></th>
|
||||
<th>{{__('BuchungID')}}</th>
|
||||
<th>{{__('Vorname')}}</th>
|
||||
<th>{{__('Nachname')}}</th>
|
||||
|
|
@ -32,6 +33,7 @@
|
|||
"order": [[ 8, "desc" ]],
|
||||
"columns": [
|
||||
{ data: 'action_edit', orderable: false, searchable: false},
|
||||
{ data: 'action_see', orderable: false, searchable: false},
|
||||
{ data: 'booking_id', name: 'booking_id' },
|
||||
{ data: 'customer.firstname', name: 'customer.firstname' },
|
||||
{ data: 'customer.name', name: 'customer.name' },
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
<thead>
|
||||
<tr>
|
||||
<th style="max-width: 60px;"> </th>
|
||||
<th style="max-width: 60px;"><i class="fa fa-eye"></i></th>
|
||||
<th>{{__('BuchnungID')}}</th>
|
||||
<th>{{__('Vorname')}}</th>
|
||||
<th>{{__('Nachname')}}</th>
|
||||
|
|
@ -32,6 +33,7 @@
|
|||
"order": [[ 8, "desc" ]],
|
||||
"columns": [
|
||||
{ data: 'action_edit', orderable: false, searchable: false},
|
||||
{ data: 'action_see', orderable: false, searchable: false},
|
||||
{ data: 'booking_id', name: 'booking_id' },
|
||||
{ data: 'customer.first_name', name: 'customer.first_name' },
|
||||
{ data: 'customer.last_name', last_name: 'customer.name' },
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
<thead>
|
||||
<tr>
|
||||
<th style="max-width: 60px;"> </th>
|
||||
<th style="max-width: 60px;"><i class="fa fa-eye"></i></th>
|
||||
<th>{{__('AnfrageID')}}</th>
|
||||
<th>{{__('Vorname')}}</th>
|
||||
<th>{{__('Nachname')}}</th>
|
||||
|
|
@ -31,6 +32,7 @@
|
|||
"order": [[ 7, "desc" ]],
|
||||
"columns": [
|
||||
{ data: 'action_edit', orderable: false, searchable: false},
|
||||
{ data: 'action_see', orderable: false, searchable: false},
|
||||
{ data: 'lead_id', name: 'lead_id' },
|
||||
{ data: 'customer.firstname', name: 'customer.firstname' },
|
||||
{ data: 'customer.name', name: 'customer.name' },
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
@section('content')
|
||||
<h4 class="font-weight-bold py-3 mb-1">
|
||||
{{ __('Anfragen') }}
|
||||
{{ __('Buchungen') }}
|
||||
</h4>
|
||||
|
||||
<div class="card">
|
||||
|
|
@ -140,15 +140,12 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="form-row align-items-center">
|
||||
<div class="col-5 col-sm-2 mb-2">
|
||||
<label class="form-label">AnfrageID</label>
|
||||
<input class="form-control full_search" name="full_lead_id_search" placeholder="suche" type="text" value="">
|
||||
</div>
|
||||
<div class="col-6 col-sm-3 mb-2">
|
||||
|
||||
<div class="col-6 col-md-3 mb-2">
|
||||
<label class="form-label">Vorname</label>
|
||||
<input class="form-control full_search" name="full_firstname_search" placeholder="suche" type="text" value="">
|
||||
</div>
|
||||
<div class="col-6 col-sm-3 mb-2">
|
||||
<div class="col-6 col-md-3 mb-2">
|
||||
<label class="form-label">Nachname</label>
|
||||
<input class="form-control full_search" name="full_lastname_search" placeholder="suche" type="text" value="">
|
||||
</div>
|
||||
|
|
@ -157,6 +154,15 @@
|
|||
<label class="form-label">BuchungsID</label>
|
||||
<input class="form-control full_search" name="full_booking_id_search" placeholder="suche" type="text" value="">
|
||||
</div>
|
||||
<div class="col-5 col-sm-2 mb-2">
|
||||
<label class="form-label" for="sort_sf_guard_user_id">Filter Sachbearbeiter</label>
|
||||
<select class="custom-select" name="sort_sf_guard_user_id" id="sort_sf_guard_user_id">
|
||||
<option value="">Filter aus</option>
|
||||
@foreach($filter_sf_guard_user as $id=>$name)
|
||||
<option value="{{$id}}">{{$name}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-2 col-sm-2 mb-2 mt-4">
|
||||
<a href="{{ route('requests') }}" class="btn icon-btn btn-sm btn-outline-dark float-right">
|
||||
<span class="fa fa-sync"></span>
|
||||
|
|
@ -169,18 +175,15 @@
|
|||
<input type="hidden" name="sort_travel_country_id" value="">
|
||||
<input type="hidden" name="sort_travelagenda_id" value="">
|
||||
<input type="hidden" name="sort_travel_documents" value="">
|
||||
<input type="hidden" name="sort_sf_guard_user_id" value="">
|
||||
<input type="hidden" name="sort_lead_status_id" value="">
|
||||
|
||||
<table id="datatables-requests" class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="max-width: 10px;"> </th>
|
||||
<th>{{__('AnfrageID')}}</th>
|
||||
<th>{{__('BuchungsID')}}</th>
|
||||
<th>{{__('Vorname')}}</th>
|
||||
<th>{{__('Nachname')}}</th>
|
||||
<th style="max-width: 10px;"> </th>
|
||||
<th>{{__('BuchungsID')}}</th>
|
||||
<th>{{__('Reiseland')}}</th>
|
||||
<th>{{__('Programm')}}</th>
|
||||
<th>{{__('Komfort')}}</th>
|
||||
|
|
@ -190,8 +193,9 @@
|
|||
<th>{{__('Abreise')}}</th>
|
||||
<th>{{__('U.')}}</th>
|
||||
<th>{{__('L.')}}</th>
|
||||
<th>{{__('P.')}}</th>
|
||||
<th>{{__('N.')}}</th>
|
||||
<th>{{__('Sachbearbeiter')}}</th>
|
||||
<th>{{__('Sb.')}}</th>
|
||||
<th>{{__('Status')}}</th>
|
||||
<th>{{__('E-Mail')}}</th>
|
||||
<th>{{__('K-Wunsch')}}</th>
|
||||
|
|
@ -238,7 +242,7 @@
|
|||
d.sort_travel_country_id = $('input[name=sort_travel_country_id]').val();
|
||||
d.sort_travelagenda_id = $('input[name=sort_travelagenda_id]').val();
|
||||
d.sort_travel_documents = $('input[name=sort_travel_documents]').val();
|
||||
d.sort_sf_guard_user_id = $('input[name=sort_sf_guard_user_id]').val();
|
||||
d.sort_sf_guard_user_id = $('select[name=sort_sf_guard_user_id]').val();
|
||||
d.sort_lead_status_id = $('input[name=sort_lead_status_id]').val();
|
||||
d.full_firstname_search = $('input[name=full_firstname_search]').val();
|
||||
d.full_lastname_search = $('input[name=full_lastname_search]').val();
|
||||
|
|
@ -257,12 +261,10 @@
|
|||
}
|
||||
},
|
||||
"columns": [
|
||||
{ data: 'action_lead_edit', orderable: false, searchable: false},
|
||||
{ data: 'lead_id', name: 'lead_id' },
|
||||
{ data: 'customer.firstname', name: 'customer.firstname' },
|
||||
{ data: 'customer.name', name: 'customer.name' },
|
||||
{ data: 'action_booking_edit', orderable: false, searchable: false},
|
||||
{ data: 'id', name: 'id' },
|
||||
{ data: 'customer.firstname', name: 'customer.firstname' },
|
||||
{ data: 'customer.name', name: 'customer.name' },
|
||||
{ data: 'travel_country_id', name: 'travel_country_id', orderable: false },
|
||||
{ data: 'travelagenda_id', name: 'travelagenda_id', orderable: false },
|
||||
{ data: 'comfort', name: 'comfort', orderable: true },
|
||||
|
|
@ -271,13 +273,14 @@
|
|||
{ data: 'end_date', name: 'end_date' },
|
||||
{ data: 'travel_documents', name: 'travel_documents', orderable: false },
|
||||
{ data: 'booking_services', name: 'booking_services', orderable: false },
|
||||
{ data: 'booking_participants_pass', name: 'booking_participants_pass', orderable: false },
|
||||
{ data: 'booking_notice', name: 'booking_notice', 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: 'last_customer_email', name: 'last_customer_email', orderable: true },
|
||||
{ data: 'paying_out', name: 'paying_out' },
|
||||
{ data: 'paying_out_status', name: 'paying_out_status' },
|
||||
{ data: 'airline_id', name: 'airline_id' },
|
||||
{ data: 'airline_ids', name: 'airline_ids', orderable: false },
|
||||
{ data: 'refund', name: 'refund' },
|
||||
{ data: 'hold', name: 'hold' },
|
||||
{ data: 'xx_tkt', name: 'xx_tkt' },
|
||||
|
|
@ -285,7 +288,7 @@
|
|||
"bLengthChange": false,
|
||||
"iDisplayLength": 50,
|
||||
"orderSequence": ["desc", "asc"],
|
||||
"order": [[ 5, "desc" ]],
|
||||
"order": [[ 1, "desc" ]],
|
||||
"language": {
|
||||
"url": "/js/German.json"
|
||||
},
|
||||
|
|
@ -308,7 +311,7 @@
|
|||
}
|
||||
} );
|
||||
} );*/
|
||||
this.api().columns(15).every( function () {
|
||||
/*this.api().columns(14).every( function () {
|
||||
var column = this;
|
||||
var title = $(column.header()).html();
|
||||
var select = $('<select class="selectpicker"><option value="">'+title+'</option></select>')
|
||||
|
|
@ -325,7 +328,7 @@
|
|||
}
|
||||
}
|
||||
} );
|
||||
} );
|
||||
} );*/
|
||||
/* this.api().columns(12).every( function () {
|
||||
var column = this;
|
||||
var title = $(column.header()).html();
|
||||
|
|
@ -467,7 +470,9 @@
|
|||
$('#travel_option_airline_id').on('change', function(){
|
||||
table.draw();
|
||||
});
|
||||
|
||||
$('#sort_sf_guard_user_id').on('change', function(){
|
||||
table.draw();
|
||||
});
|
||||
$('#travel_option_paying_out').on('change', function(){
|
||||
table.draw();
|
||||
});
|
||||
|
|
|
|||
71
resources/views/settings/airline/detail.blade.php
Normal file
71
resources/views/settings/airline/detail.blade.php
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
@extends('layouts.layout-2')
|
||||
|
||||
@section('content')
|
||||
|
||||
{!! Form::open(['url' => route('admin_settings_airline_update', [$id]), 'class' => 'form-horizontal']) !!}
|
||||
|
||||
<h4 class="font-weight-bold py-3 mb-1">
|
||||
Airline Inhalte
|
||||
<div class="float-right">
|
||||
<a href="{{route('admin_settings_airline')}}" class="btn btn-default btn-sm">{{ __('back') }}</a>
|
||||
</div>
|
||||
</h4>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="form-row">
|
||||
<div class="form-group col-sm-12">
|
||||
<label class="form-label" for="name">{{ __('Kürzel') }} *</label>
|
||||
{{ Form::text('name', $model->name, array('placeholder'=>__('Name'), 'class'=>'form-control', 'id'=>'name', 'required'=>true)) }}
|
||||
</div>
|
||||
<div class="form-group col-sm-12">
|
||||
<label class="form-label" for="name_full">{{ __('Name') }} *</label>
|
||||
{{ Form::text('name_full', $model->name_full, array('placeholder'=>__('Code'), 'class'=>'form-control', 'id'=>'name_full', 'required'=>true)) }}
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<h4>Vordefinierte E-Mail-Adressen <span class="text-muted">für diese Airline</span></h4>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-sm-12">
|
||||
<div class="form-group col-sm-">
|
||||
<label class="form-label" for="contact_emails">Für interene Mails <span class="text-muted">(jede E-Mail in eine extra Zeile)</span></label>
|
||||
{{ Form::textarea('contact_emails', \App\Services\Util::_implodeLines($model->contact_emails), ['class' => 'form-control', 'rows'=>4]) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<h4>Buchungs-Vorlagen/Inhalte <span class="text-muted">für die PDFs</span></h4>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-sm-12">
|
||||
<label class="form-label" for="flight_info">Fluginfo (Platzhalter für die PDFs ist #Airline_Fluginfo#)</label>
|
||||
{{ Form::textarea('flight_info', $model->flight_info, ['class' => 'form-control summernote-exsmall', 'rows'=>4]) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-sm-12">
|
||||
<label class="form-label" for="check_in">Checkin (Platzhalter für die PDFs ist #Airline_Checkin#)</label>
|
||||
{{ Form::textarea('check_in', $model->check_in, ['class' => 'form-control summernote-exsmall', 'rows'=>4]) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-sm-12">
|
||||
<label class="form-label" for="baggage">Gepäck (Platzhalter für die PDFs ist #Airline_Gepaeck#)</label>
|
||||
{{ Form::textarea('baggage', $model->baggage, ['class' => 'form-control summernote-exsmall', 'rows'=>4]) }}
|
||||
</div>
|
||||
</div>
|
||||
<button type="submit" name="action" value="" class="btn btn-submit">{{ __('save changes') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="text-left mt-3">
|
||||
<a href="{{route('admin_settings_airline')}}" class="btn btn-default">{{ __('back') }}</a>
|
||||
</div>
|
||||
{!! Form::close() !!}
|
||||
|
||||
<script>
|
||||
$( document ).ready(function() {
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
@endsection
|
||||
|
|
@ -19,14 +19,10 @@
|
|||
<tbody>
|
||||
@foreach($airline 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-name_full="{{ $value->name_full }}"
|
||||
data-contact_emails="{{\App\Services\Util::_implodeLines($value->contact_emails)}}">
|
||||
<td data-sort="{{ $value->id }}">
|
||||
<a href="{{ route('admin_settings_airline_detail', [$value->id]) }}" class="btn icon-btn btn-sm btn-primary">
|
||||
<span class="fa fa-edit"></span>
|
||||
</button>
|
||||
</a>
|
||||
</td>
|
||||
<td data-sort="{{ $value->name }}">{{ $value->name }}</td>
|
||||
<td data-sort="{{ $value->name_full }}">{{ $value->name_full }}</td>
|
||||
|
|
@ -37,64 +33,14 @@
|
|||
</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-name_full=""
|
||||
data-contact_emails=""
|
||||
>Neue Airline anlegen</button>
|
||||
<a href="{{ route('admin_settings_airline_detail', ['new']) }}" class="btn btn-sm btn-primary">Neues Airline anlegen</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Modal template -->
|
||||
<div class="modal fade" id="modals-default">
|
||||
<div class="modal-dialog">
|
||||
<form class="modal-content" action="{{ route('admin_settings_airline_update') }}" method="post">
|
||||
@csrf
|
||||
<input type="hidden" class="form-control" name="id">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Airline <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">Kürzel*</label>
|
||||
<input type="text" class="form-control" name="name" placeholder="{{__('Kürzel')}}" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col">
|
||||
<label for="name_full" class="form-label">Name*</label>
|
||||
<input type="text" class="form-control" name="name_full" placeholder="{{__('Name')}}" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col">
|
||||
<label class="form-label" for="contact_emails">Für interene Mails <span class="text-muted">(jede E-Mail in eine extra Zeile)</span></label>
|
||||
<textarea class="form-control" rows="4" name="contact_emails" cols="50"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">{{__('close')}}</button>
|
||||
<button type="submit" class="btn btn-primary">{{__('save')}}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
$( document ).ready(function() {
|
||||
|
||||
$('#modals-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='name_full']").val(button.data('name_full'));
|
||||
$(this).find(".modal-body textarea[name='contact_emails']").val(button.data('contact_emails'));
|
||||
});
|
||||
$('.datatables-default').dataTable({
|
||||
"bLengthChange": false,
|
||||
"iDisplayLength": 50,
|
||||
|
|
|
|||
|
|
@ -38,29 +38,29 @@
|
|||
<label class="form-label" for="message">Nachricht</label>
|
||||
<div id="message-editor-toolbar">
|
||||
<span class="ql-formats">
|
||||
<button class="ql-bold"></button>
|
||||
<button class="ql-italic"></button>
|
||||
<button class="ql-underline"></button>
|
||||
<button class="ql-strike"></button>
|
||||
</span>
|
||||
<button class="ql-bold"></button>
|
||||
<button class="ql-italic"></button>
|
||||
<button class="ql-underline"></button>
|
||||
<button class="ql-strike"></button>
|
||||
</span>
|
||||
<span class="ql-formats">
|
||||
<button class="ql-header" value="1"></button>
|
||||
<button class="ql-header" value="2"></button>
|
||||
<button class="ql-blockquote"></button>
|
||||
<button class="ql-code-block"></button>
|
||||
</span>
|
||||
<button class="ql-header" value="1"></button>
|
||||
<button class="ql-header" value="2"></button>
|
||||
<button class="ql-blockquote"></button>
|
||||
<button class="ql-code-block"></button>
|
||||
</span>
|
||||
<span class="ql-formats">
|
||||
<button class="ql-list" value="ordered"></button>
|
||||
<button class="ql-list" value="bullet"></button>
|
||||
<button class="ql-indent" value="-1"></button>
|
||||
<button class="ql-indent" value="+1"></button>
|
||||
</span>
|
||||
<button class="ql-list" value="ordered"></button>
|
||||
<button class="ql-list" value="bullet"></button>
|
||||
<button class="ql-indent" value="-1"></button>
|
||||
<button class="ql-indent" value="+1"></button>
|
||||
</span>
|
||||
<span class="ql-formats">
|
||||
<select class="ql-align"></select>
|
||||
</span>
|
||||
<select class="ql-align"></select>
|
||||
</span>
|
||||
<span class="ql-formats">
|
||||
<button class="ql-clean"></button>
|
||||
</span>
|
||||
<button class="ql-clean"></button>
|
||||
</span>
|
||||
<span class="ql-formats">
|
||||
<select class="ql-placeholder">
|
||||
{!! \App\Services\Placeholder::getBookingOptions() !!}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
<a class="nav-link @if($step === 'form') active show @endif" data-toggle="tab" href="#navs-form">Formular</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link @if($step === 'contact') active show @endif" data-toggle="tab" href="#navs-contact">Kontaktdaten</a>
|
||||
<a class="nav-link @if($step === 'contact') active show @endif" data-toggle="tab" href="#navs-contact">Kontaktdaten/Visum</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link @if($step === 'emails') active show @endif" data-toggle="tab" href="#navs-emails">E-Mails</a>
|
||||
|
|
@ -60,8 +60,6 @@
|
|||
{{ Form::textarea('html_information', $model->html_information, ['class' => 'form-control summernote']) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-row">
|
||||
<div class="col-12 py-2">
|
||||
<label class="switcher switcher-on-off">
|
||||
|
|
@ -135,11 +133,13 @@
|
|||
<select class="selectpicker" data-style="btn-default" name="contact_lands[]" multiple>
|
||||
{!! HTMLHelper::getTravelCountriesOptions($model->contact_lands) !!}
|
||||
</select>
|
||||
<em>Das Land selbst muss auch hier selbst aufgeführt werden, wenn es angezeicht werden soll. Die Kontaktdaten der definierten Länder (Reiselandes) werden nacheinander am Ende des PDFs (RA, RB, Voucher) eingefügt.</em>
|
||||
<em>Das Land selbst muss auch hier selbst aufgeführt werden, wenn es angezeicht werden soll. Die Kontaktdaten der definierten Länder (Reiselandes) werden nacheinander am Ende des PDFs (RA, RB, Voucher, Reisedokumente, …) eingefügt.</em>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<h4>Kontaktdaten im PDF</h4>
|
||||
<p>Die Kontaktdaten werden automatisch in den Buchnungsdokumente wie RA, RB, Voucher engesetzt.<br>
|
||||
Für die Buchnungs- Vorlagen/Inhalte ist der Platzhalter #Reiseland_Kontakt#)</p>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-sm-12">
|
||||
<label class="form-label" for="contact_headline">Überschrift</label>
|
||||
|
|
@ -148,19 +148,19 @@
|
|||
|
||||
<div class="form-group col-sm-6">
|
||||
<label class="form-label" for="contact_text_1">Kontaktfeld 1 </label>
|
||||
{{ Form::textarea('contact_text_1', $model->contact_text_1, ['class' => 'form-control', 'rows'=>4]) }}
|
||||
{{ Form::textarea('contact_text_1', $model->contact_text_1, ['class' => 'form-control summernote-exsmall', 'rows'=>4]) }}
|
||||
</div>
|
||||
<div class="form-group col-sm-6">
|
||||
<label class="form-label" for="contact_text_2">Kontaktfeld 2 </label>
|
||||
{{ Form::textarea('contact_text_2', $model->contact_text_2, ['class' => 'form-control', 'rows'=>4]) }}
|
||||
{{ Form::textarea('contact_text_2', $model->contact_text_2, ['class' => 'form-control summernote-exsmall', 'rows'=>4]) }}
|
||||
</div>
|
||||
<div class="form-group col-sm-6">
|
||||
<label class="form-label" for="contact_text_3">Kontaktfeld 3 </label>
|
||||
{{ Form::textarea('contact_text_3', $model->contact_text_3, ['class' => 'form-control', 'rows'=>4]) }}
|
||||
{{ Form::textarea('contact_text_3', $model->contact_text_3, ['class' => 'form-control summernote-exsmall', 'rows'=>4]) }}
|
||||
</div>
|
||||
<div class="form-group col-sm-6">
|
||||
<label class="form-label" for="contact_text_4">Kontaktfeld 4</label>
|
||||
{{ Form::textarea('contact_text_4', $model->contact_text_4, ['class' => 'form-control', 'rows'=>4]) }}
|
||||
{{ Form::textarea('contact_text_4', $model->contact_text_4, ['class' => 'form-control summernote-exsmall', 'rows'=>4]) }}
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
|
|
@ -173,7 +173,15 @@
|
|||
<div class="form-row">
|
||||
<div class="form-group col-sm-12">
|
||||
<label class="form-label" for="contact_text_4">Kontakt Footer</label>
|
||||
{{ Form::textarea('contact_footer', $model->contact_footer, ['class' => 'form-control', 'rows'=>4]) }}
|
||||
{{ Form::textarea('contact_footer', $model->contact_footer, ['class' => 'form-control summernote-exsmall', 'rows'=>4]) }}
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<h4>Buchungs-Vorlagen/Inhalte <span class="text-muted">für die PDFs</span></h4>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-sm-12">
|
||||
<label class="form-label" for="visum_text">Visum (Platzhalter für die PDFs ist #Reiseland_Visum#)</label>
|
||||
{{ Form::textarea('visum_text', $model->visum_text, ['class' => 'form-control summernote-exsmall', 'rows'=>4]) }}
|
||||
</div>
|
||||
</div>
|
||||
<button type="submit" name="action" value="contact" class="btn btn-submit">{{ __('save changes') }}</button>
|
||||
|
|
@ -196,7 +204,7 @@
|
|||
<div class="form-row">
|
||||
<div class="form-group col-sm-12">
|
||||
<div class="form-group col-sm-">
|
||||
<label class="form-label" for="contact_headline">der Agenturen für interene Mails <span class="text-muted">(jede E-Mail in eine extra Zeile)</span></label>
|
||||
<label class="form-label" for="contact_emails">der Agenturen für interene Mails <span class="text-muted">(jede E-Mail in eine extra Zeile)</span></label>
|
||||
{{ Form::textarea('contact_emails', \App\Services\Util::_implodeLines($model->contact_emails), ['class' => 'form-control', 'rows'=>4]) }}
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -349,7 +357,7 @@
|
|||
<div class="form-row">
|
||||
<div class="form-group col-sm-12">
|
||||
<label class="form-label" for="travel_nationality_requirement_{{$travel_nationality->id}}">{{ $travel_nationality->name }}{{ __('(HTML)') }} </label>
|
||||
{{ Form::textarea('travel_nationality_requirement['.$travel_nationality->id.']', $model->getNationalityRequirement($travel_nationality->id), ['class' => 'form-control summernote-small', 'id'=>'travel_nationality_requirement_'.$travel_nationality->id]) }}
|
||||
{{ Form::textarea('travel_nationality_requirement['.$travel_nationality->id.']', $model->getNationalityRequirement($travel_nationality->id), ['class' => 'form-control summernote-exsmall', 'id'=>'travel_nationality_requirement_'.$travel_nationality->id]) }}
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
|
|
|
|||
|
|
@ -135,29 +135,32 @@
|
|||
@endif
|
||||
<div id="message-editor-toolbar">
|
||||
<span class="ql-formats">
|
||||
<button class="ql-bold"></button>
|
||||
<button class="ql-italic"></button>
|
||||
<button class="ql-underline"></button>
|
||||
<button class="ql-strike"></button>
|
||||
</span>
|
||||
<button class="ql-bold"></button>
|
||||
<button class="ql-italic"></button>
|
||||
<button class="ql-underline"></button>
|
||||
<button class="ql-strike"></button>
|
||||
</span>
|
||||
<span class="ql-formats">
|
||||
<button class="ql-header" value="1"></button>
|
||||
<button class="ql-header" value="2"></button>
|
||||
<button class="ql-blockquote"></button>
|
||||
<button class="ql-code-block"></button>
|
||||
</span>
|
||||
<button class="ql-header" value="1"></button>
|
||||
<button class="ql-header" value="2"></button>
|
||||
<button class="ql-blockquote"></button>
|
||||
<button class="ql-code-block"></button>
|
||||
</span>
|
||||
<span class="ql-formats">
|
||||
<button class="ql-list" value="ordered"></button>
|
||||
<button class="ql-list" value="bullet"></button>
|
||||
<button class="ql-indent" value="-1"></button>
|
||||
<button class="ql-indent" value="+1"></button>
|
||||
</span>
|
||||
<button class="ql-list" value="ordered"></button>
|
||||
<button class="ql-list" value="bullet"></button>
|
||||
<button class="ql-indent" value="-1"></button>
|
||||
<button class="ql-indent" value="+1"></button>
|
||||
</span>
|
||||
<span class="ql-formats">
|
||||
<select class="ql-align"></select>
|
||||
</span>
|
||||
<select class="ql-align"></select>
|
||||
</span>
|
||||
<span class="ql-formats">
|
||||
<button class="ql-clean"></button>
|
||||
</span>
|
||||
<button class="ql-link"></button>
|
||||
</span>
|
||||
<span class="ql-formats">
|
||||
<button class="ql-clean"></button>
|
||||
</span>
|
||||
<span class="ql-formats">
|
||||
<select class="ql-placeholder">
|
||||
{!! \App\Services\Placeholder::getFewoOptions() !!}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
@include('travel.user.booking.mail.modal-show-mail-inner', ['customer_mail' => $customer_mail, 'show_move_dirs' => true])
|
||||
@include('travel.user.booking.mail.modal-show-mail-inner', ['customer_mail' => $customer_mail, 'show_move_dirs' => $value->show_move_dirs])
|
||||
|
||||
{{-- @if($customer_mail->customer_fewo_mail)
|
||||
@include('travel.user.booking.mail.modal-show-mail-inner', ['customer_fewo_mail' => $customer_mail->customer_mail])
|
||||
|
|
|
|||
|
|
@ -318,6 +318,18 @@ Route::group(['middleware' => ['admin']], function()
|
|||
Route::get('/cms/fewo/content', 'CMS\CMSFeWoController@content')->name('cms_fewo_content');
|
||||
Route::get('/cms/fewo/content/detail/{id}/{step?}', 'CMS\CMSFeWoController@detail')->name('cms_fewo_content_detail');
|
||||
Route::post('/cms/fewo/content/detail/{id}/{step?}', 'CMS\CMSFeWoController@store')->name('cms_fewo_content_store');
|
||||
});
|
||||
Route::group(['middleware' => ['auth.permission:cms-book']], function() {
|
||||
// CMS Booking
|
||||
Route::get('/cms/booking/all/', 'CMS\CMSBookingController@all')->name('cms_booking_all');
|
||||
Route::get('/cms/booking/all/detail/{id?}', 'CMS\CMSBookingController@detailAll')->name('cms_booking_all_detail');
|
||||
Route::post('/cms/booking/all/detail/{id?}', 'CMS\CMSBookingController@storeAll')->name('cms_booking_all_detail');
|
||||
Route::get('/cms/booking/all/delete/{id}/{do}', 'CMS\CMSBookingController@deleteAll')->name('cms_booking_all_delete');
|
||||
|
||||
Route::get('/cms/booking/content', 'CMS\CMSBookingController@content')->name('cms_booking_content');
|
||||
Route::get('/cms/booking/content/detail/{id?}', 'CMS\CMSBookingController@detailContent')->name('cms_booking_content_detail');
|
||||
Route::post('/cms/booking/content/detail/{id?}', 'CMS\CMSBookingController@storeContent')->name('cms_booking_content_detail');
|
||||
Route::get('/cms/booking/content/delete/{id}/{do}', 'CMS\CMSBookingController@deleteContent')->name('cms_booking_content_delete');
|
||||
|
||||
});
|
||||
Route::group(['middleware' => ['auth.permission:cms-fb']], function() {
|
||||
|
|
@ -355,7 +367,8 @@ Route::group(['middleware' => ['superadmin']], function() {
|
|||
Route::group(['middleware' => ['auth.permission:sua-st-al']], function() {
|
||||
//SUPERADMIN > Einstellungen > Airline
|
||||
Route::get('/admin/settings/airline', 'Settings\AirlineController@index')->name('admin_settings_airline');
|
||||
Route::post('/admin/settings/airline/update', 'Settings\AirlineController@update')->name('admin_settings_airline_update');
|
||||
Route::get('/admin/settings/airline/detail/{id}/{step?}', 'Settings\AirlineController@detail')->name('admin_settings_airline_detail');
|
||||
Route::post('/admin/settings/airline/update/{id}', 'Settings\AirlineController@update')->name('admin_settings_airline_update');
|
||||
Route::get('/admin/settings/airline/delete/{id}', 'Settings\AirlineController@delete')->name('admin_settings_airline_delete');
|
||||
});
|
||||
Route::group(['middleware' => ['auth.permission:sua-st-em']], function() {
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue