EU Reiserecht - Booking

git-svn-id: http://78.47.251.156/svn/dev/sterntours-3@3419 f459cee4-fb09-11de-96c3-f9c5f16c3c76
This commit is contained in:
adametz 2018-06-30 12:44:31 +00:00
parent 8fd6f63403
commit 2360290f06
25 changed files with 1089 additions and 229 deletions

View file

@ -77,11 +77,9 @@ class BookingController extends Controller
}
$htmlSummary = [];
$bookingPriceInfo = [];
$totalPrice = $this->calculatePrice($travelDate, $bookingRequest, $htmlSummary, $bookingPriceInfo);
$totalPrice = $this->calculatePrice($travelDate, $bookingRequest, $travelProgram->getCategory()->getId(), $htmlSummary, $bookingPriceInfo);
if ($action == '/buchen')
{
$breadcrumbEntries = Util::createBreadcrumb($travelProgramPage);
$breadcrumbEntries[] = new BreadcrumbEntry('Buchen');
@ -156,6 +154,8 @@ class BookingController extends Controller
'travel_program' => $travelProgram,
'summary' => $htmlSummary,
'total_price' => $totalPrice,
'booking_price_info' => $bookingPriceInfo,
]);
}
@ -175,6 +175,7 @@ class BookingController extends Controller
'price_type_by_id' => $this->priceTypeById,
'summary' => $htmlSummary,
'total_price' => $totalPrice,
'booking_price_info' => $bookingPriceInfo,
'mediator_terms_filename' => $travelProgram->getIsMediated()
? $this->getDoctrine()->getRepository('AppBundle:TravelOrganizer')->find(1)->getFileName()
: null
@ -185,7 +186,10 @@ class BookingController extends Controller
return $this->render('default/components/booking/summary.html.twig', [
'base_dir' => realpath($this->getParameter('kernel.root_dir').'/..').DIRECTORY_SEPARATOR,
'summary' => $htmlSummary,
'total_price' => $totalPrice
'total_price' => $totalPrice,
'booking_price_info' => $bookingPriceInfo,
'show_detail' => true,
]);
}
throw new \Exception('Unknow BookingController action: '. $action);
@ -200,8 +204,7 @@ class BookingController extends Controller
return $ret;
}
public function calculatePrice(TravelDate $travelDate, BookingRequest $bookingRequest, &$outHtmlSummary = null,
&$outPriceInfo = null)
public function calculatePrice(TravelDate $travelDate, BookingRequest $bookingRequest, $categoryId, &$outHtmlSummary = null, &$outPriceInfo = null)
{
$ret = 0;
$insuranceAssessmentBasis = 0;
@ -220,8 +223,12 @@ class BookingController extends Controller
$outPriceInfo['insurances'] = [];
$outPriceInfo['options'] = [];
$outPriceInfo['classOptions'] = [];
$outPriceInfo['departure'] = 0;
$outPriceInfo['departure_extra'] = 0;
$outPriceInfo['flight_price'] = 0;
$outPriceInfo['final_payment_date'] = $travelDate->getFinalPaymentDate();
}
if($bookingRequest->getDeparture() != null)
{
$departure = Util\DepartureUtil::limitIndividualArrivalPrice($bookingRequest->getDeparture(),
@ -236,6 +243,7 @@ class BookingController extends Controller
$insuranceAssessmentBasis += $departure->getExtraCharge();
$a = $travelerCount * $departure->getExtraCharge();
$ret += $a;
$outPriceInfo['departure_extra'] += $a;
if (isset($outHtmlSummary))
{
$outHtmlSummary[] = [
@ -268,8 +276,6 @@ class BookingController extends Controller
}
}
$persons = [
'total' => $travelerCount,
'adults' => $travelerCount,
@ -320,6 +326,10 @@ class BookingController extends Controller
: ($adultCount * ($singleDiscountPrice - $singleFullPrice));
$ret += $roomPrice + $discount;
$singel_flight_price = $travelDate->getFlightCalcPrice();
$outPriceInfo['flight_price'] += (($singel_flight_price * $adultCount) + ($singel_flight_price * $room['persons']['children']));
if (isset($outPriceInfo))
{
$outPriceInfo['rooms'][] = [
@ -396,6 +406,24 @@ class BookingController extends Controller
{
$outPriceInfo['total'] = $ret;
$outPriceInfo['totalWithoutInsurance'] = $ret - $insuranceTotal;
if($outPriceInfo['departure_extra'] >= 0){
$outPriceInfo['flight_price'] = $outPriceInfo['flight_price'] + $outPriceInfo['departure_extra'];
}else{
$outPriceInfo['flight_price'] = 0;
}
//Aeqypten (20% from price)
if($categoryId == 1){
$deposit = ($outPriceInfo['total'] / 100 * 20);
$outPriceInfo['deposit_total'] = $deposit;
$outPriceInfo['final_payment'] = ($outPriceInfo['total'] - $outPriceInfo['deposit_total']);
}else{
//all 100% vom Flugpreis und 20% von der Landleistung.
$deposit = (($outPriceInfo['total'] - $outPriceInfo['flight_price']) / 100 * 20);
$outPriceInfo['deposit_total'] = ($deposit + $outPriceInfo['flight_price']);
$outPriceInfo['final_payment'] = ($outPriceInfo['total'] - $outPriceInfo['deposit_total']);
}
}
return $ret;

View file

@ -97,14 +97,12 @@ class BookingRequest
*/
private $acceptTerms = false;
/*
private $acceptEntryRequirements = false;
private $acceptLegalRights = false;
*/
private $acceptPrivacy = false;
private $acceptProcessing = false;
/**
* BookingRequest constructor.
*/
@ -624,45 +622,25 @@ class BookingRequest
{
$this->acceptTerms = $acceptTerms;
}
/**
* @return mixed
*/
/*
public function isAcceptEntryRequirements()
{
return $this->acceptEntryRequirements;
}
*/
/**
* @param mixed $acceptEntryRequirements
*/
/*
public function setAcceptEntryRequirements($acceptEntryRequirements)
{
$this->acceptEntryRequirements = $acceptEntryRequirements;
}
*/
/**
* @return mixed
*/
/*
public function isAcceptLegalRights()
{
return $this->acceptLegalRights;
}
*/
/**
* @param mixed $acceptLegalRights
*/
/*
public function setAcceptLegalRights($acceptLegalRights)
{
$this->acceptLegalRights = $acceptLegalRights;
}
*/
/**
* @return mixed
@ -680,6 +658,22 @@ class BookingRequest
$this->acceptPrivacy = $acceptPrivacy;
}
/**
* @return mixed
*/
public function isAcceptProcessing()
{
return $this->acceptProcessing;
}
/**
* @param mixed $acceptProcessing
*/
public function setAcceptProcessing($acceptProcessing)
{
$this->acceptProcessing = $acceptProcessing;
}
/**
* @Assert\Callback
*/

View file

@ -67,6 +67,8 @@ class ContactRequest
private $end;
private $acceptPrivacy = false;
private $acceptProcessing = false;
/**
* @var int|null $duration
@ -377,4 +379,20 @@ class ContactRequest
{
$this->acceptPrivacy = $acceptPrivacy;
}
/**
* @return mixed
*/
public function isAcceptProcessing()
{
return $this->acceptProcessing;
}
/**
* @param mixed $acceptProcessing
*/
public function setAcceptProcessing($acceptProcessing)
{
$this->acceptProcessing = $acceptProcessing;
}
}

View file

@ -85,6 +85,8 @@ class FewoBookingRequest
private $acceptPrivacy = false;
private $acceptProcessing = false;
private $lodging;
private $season;
@ -355,6 +357,22 @@ class FewoBookingRequest
$this->acceptPrivacy = $acceptPrivacy;
}
/**
* @return mixed
*/
public function isAcceptProcessing()
{
return $this->acceptProcessing;
}
/**
* @param mixed $acceptProcessing
*/
public function setAcceptProcessing($acceptProcessing)
{
$this->acceptProcessing = $acceptProcessing;
}
/**
* @return mixed
*/

View file

@ -208,6 +208,27 @@ class TravelBooking
*/
private $priceTotal;
/**
* @var float
*
* @ORM\Column(name="deposit_total", type="float", precision=10, scale=2, nullable=true)
*/
private $depositTotal;
/**
* @var float
*
* @ORM\Column(name="final_payment", type="float", precision=10, scale=2, nullable=true)
*/
private $finalPayment;
/**
* @var \DateTime
*
* @ORM\Column(name="final_payment_date", type="date", nullable=true)
*/
private $finalPaymentDate;
/**
* @var string
*
@ -257,6 +278,13 @@ class TravelBooking
*/
private $extraCategory;
/**
* @var string
*
* @ORM\Column(name="accept_legal_rights", type="integer", nullable=false)
*/
private $acceptLegalRights;
/**
* @var integer
*
@ -908,6 +936,8 @@ class TravelBooking
'first_name' => $traveler->getFirstName(),
'last_name' => $traveler->getLastName(),
'birthday' => $birthdate,
'nationality' => $traveler->getNationality(),
'acceptEntryRequirements' => $traveler->isAcceptEntryRequirements(),
];
}
@ -935,6 +965,7 @@ class TravelBooking
$traveler->setSex(intval($participant['gender']));
$traveler->setFirstName($participant['first_name']);
$traveler->setLastName($participant['last_name']);
$traveler->setNationality($participant['nationality']);
if(!strtotime($participant['birthday'])){
$participant['birthday'] = '01.01.1900';
}
@ -992,6 +1023,79 @@ class TravelBooking
return $this->priceTotal;
}
/**
* Set depositTotal
*
* @param float $depositTotal
*
* @return TravelBooking
*/
public function setDepositTotal($depositTotal)
{
$this->depositTotal = $depositTotal;
return $this;
}
/**
* Get depositTotal
*
* @return float
*/
public function getDepositTotal()
{
return $this->depositTotal;
}
/**
* Set finalPayment
*
* @param float $finalPayment
*
* @return TravelBooking
*/
public function setFinalPayment($finalPayment)
{
$this->finalPayment = $finalPayment;
return $this;
}
/**
* Get finalPayment
*
* @return float
*/
public function getFinalPayment()
{
return $this->finalPayment;
}
/**
* Set finalPaymentDate
*
* @param \DateTime $finalPaymentDate
*
* @return TravelBooking
*/
public function setFinalPaymentDate($finalPaymentDate)
{
$this->finalPaymentDate = $finalPaymentDate;
return $this;
}
/**
* Get finalPaymentDate
*
* @return \DateTime
*/
public function getFinalPaymentDate()
{
return $this->finalPaymentDate;
}
/**
* Set comments
*
@ -1181,6 +1285,31 @@ class TravelBooking
return $ret;
}
/**
* Set extraCategory
*
* @param string $extraCategory
*
* @return TravelBooking
*/
public function setAcceptLegalRights($acceptLegalRights)
{
$this->acceptLegalRights = $acceptLegalRights;
return $this;
}
/**
* Get extraCategory
*
* @return string
*/
public function getAcceptLegalRights()
{
return $this->acceptLegalRights;
}
/**
* Get id
*

View file

@ -67,6 +67,11 @@ class TravelBookingRepository extends \Doctrine\ORM\EntityRepository
$ret->setParticipantsTotal($bookingRequest->getTravelerCount());
$ret->setRooms($bookingPriceInfo['rooms']);
$ret->setPriceTotal($bookingPriceInfo['total']);
$ret->setDepositTotal($bookingPriceInfo['deposit_total']);
$ret->setFinalPayment($bookingPriceInfo['final_payment']);
$ret->setFinalPaymentDate(new \DateTime($bookingPriceInfo['final_payment_date']));
$ret->setComments($bookingRequest->getNotes());
if (empty($bookingPriceInfo['options']))
{
@ -86,6 +91,7 @@ class TravelBookingRepository extends \Doctrine\ORM\EntityRepository
}
$ret->setClassOptions(false);
$ret->setExtraCategory(empty($bookingPriceInfo['classOptions']) ? false : $bookingPriceInfo['classOptions']);
$ret->setAcceptLegalRights($bookingRequest->isAcceptLegalRights());
return $ret;
}

View file

@ -153,6 +153,24 @@ final class TravelDate
return $this->start;
}
/**
* @return \DateTime
*/
public function getStartWeekday()
{
return $this->start->format('w');
}
public function getFinalPaymentDate()
{
$pDate = strtotime('-4 week', $this->getStart()->getTimestamp());
if($pDate <= time()){
$pDate = strtotime('+1 day', $this->getStart()->getTimestamp());
}
return date('d.m.Y',$pDate);
}
/**
* @return \DateTime
*/
@ -221,6 +239,23 @@ final class TravelDate
return $flightPrice;
}
public function getFlightCalcPrice()
{
$flightPrice = $this->getFlightPrice();
if ($this->travelProgram->getIsMediated())
{
$profitMargin = 1;
}
else
{
$profitMargin = $this->travelProgram->getProfitMargin() / 100 + 1;
}
$currencyFactor = $this->travelProgram->getNettoPricesInEuro() ? 1 : $this->currencyFactor;
return round(($flightPrice * $currencyFactor) * $profitMargin);
}
/**
* @return TravelPeriodPrice[]|\Doctrine\Common\Collections\Collection
*/

View file

@ -33,6 +33,14 @@ class TravelDeparturePoint
*/
private $days;
/**
* @var string
*
* @ORM\Column(name="flight_time", type="text", length=65535, nullable=true)
*/
private $flightTime;
/**
* @var string
*
@ -170,6 +178,33 @@ class TravelDeparturePoint
return $this->days == null ? null : json_decode($this->days);
}
/**
* Set days
*
* @param string $flightTime
*
* @return TravelDeparturePoint
*/
public function setFlightTime($flightTime)
{
$this->flightTime = $flightTime;
return $this;
}
/**
* Get flightTime
*
* @return array|int[]
*/
public function getFlightTime()
{
return $this->flightTime == null ? null : json_decode($this->flightTime, true);
}
/**
* Set departureType
*
@ -184,6 +219,7 @@ class TravelDeparturePoint
return $this;
}
/**
* Get departureType
*

View file

@ -47,6 +47,21 @@ class TravelOrganizer
*/
private $fileName;
/**
* @var string
*
* @ORM\Column(name="form_arb", type="string", length=255, nullable=true)
*/
private $formArb;
/**
* @var string
*
* @ORM\Column(name="file_form_page", type="string", length=255, nullable=true)
*/
private $fileFormPage;
/**
* @var integer
*
@ -162,6 +177,15 @@ class TravelOrganizer
return $this->rulesUpdated;
}
public function getRulesUpdatedTime()
{
if($this->rulesUpdated){
return $this->rulesUpdated->getTimestamp();
}
return ;
}
/**
* Set fileName
*
@ -186,6 +210,55 @@ class TravelOrganizer
return $this->fileName;
}
/**
* Set formArb
*
* @param string $formArb
*
* @return TravelOrganizer
*/
public function setFormArb($formArb)
{
$this->formArb = $formArb;
return $this;
}
/**
* Get formArb
*
* @return string
*/
public function getFormArb()
{
return $this->formArb;
}
/**
* Set fileFormPage
*
* @param string $fileFormPage
*
* @return TravelOrganizer
*/
public function setFileFormPage($fileFormPage)
{
$this->fileFormPage = $fileFormPage;
return $this;
}
/**
* Get fileFormPage
*
* @return string
*/
public function getFileFormPage()
{
return $this->fileFormPage;
}
/**
* Set cmsId
*

View file

@ -771,6 +771,57 @@ class TravelProgram
return $this->htmlDescription;
}
/**
* @param \DateTime $startDate
* @return array
*/
// '<h2> X Tag / Anreise ... : Programm </h2>';
public function getTravelProgramDates(\DateTime $startDate)
{
$lines = array();
$count = 0;
if($this->htmlDescription){
$text = $this->htmlDescription;
$regex = '#<h2>(.*?)</h2>#';
preg_match_all($regex, $text, $matches);
foreach ($matches[1] as $val){
if(strpos($val, ':')){
$v = explode(':', $val);
$int = (int) filter_var($v[0], FILTER_SANITIZE_NUMBER_INT);
if($int) {
$lines[$int] = array('count'=> $count, 'day' => trim($v[1]), 'date' => $startDate->format('d.m.Y'));
$startDate->modify('+1 day');
$count++;
}
}
}
}
if($this->classDescription){
$text = $this->classDescription;
//standard //komfort
$regex = "'<ul class=\"standard\">(.*?)</ul>'si";
preg_match_all($regex, $text, $matches);
if(isset($matches[1][0]) && strpos($matches[1][0], '</li>')){
$text = $matches[1][0];
$regex = '#<li>(.*?)</li>#';
preg_match_all($regex, $text, $matches);
foreach ($matches[1] as $val){
if(strpos($val, ':')){
$v = explode(':', $val);
$int = (int) filter_var($v[0], FILTER_SANITIZE_NUMBER_INT);
if($int && isset($lines[$int])) {
$lines[$int]['night'] = trim($v[1]);
}
}
}
}
}
return $lines;
}
/**
* Set inSlider
*

View file

@ -14,6 +14,11 @@ class Traveler
const MALE = 1;
const FEMALE = 2;
private $NATIONALITY = [
1 => 'deutsch',
];
/**
* @Assert\NotNull
* @Assert\Choice(choices={1,2})
@ -35,6 +40,16 @@ class Traveler
*/
private $birthDate;
/**
* @Assert\NotBlank()
*/
private $nationality;
/**
* @Assert\IsTrue()
*/
private $acceptEntryRequirements = false;
/**
* @return int
*/
@ -105,5 +120,51 @@ class Traveler
$this->birthDate = $birthDate;
}
/**
* @return int
*/
public function getNationality()
{
return $this->nationality;
}
/**
* @param int $nationality
*/
public function setNationality($nationality)
{
$this->nationality = $nationality;
}
/**
* @return int
*/
public function getNationalityName()
{
if(isset($this->NATIONALITY[$this->nationality])){
return $this->NATIONALITY[$this->nationality];
}
return $this->nationality;
}
/**
* @return mixed
*/
public function isAcceptEntryRequirements()
{
return $this->acceptEntryRequirements;
}
/**
* @param mixed $acceptEntryRequirements
*/
public function setAcceptEntryRequirements($acceptEntryRequirements)
{
$this->acceptEntryRequirements = $acceptEntryRequirements;
}
}

View file

@ -261,7 +261,10 @@ class BookingSternToursCrmExporter extends SternToursCrmExporter
'pax' => $bookingRequest->getTravelerCount(),
'travel_number' => $travelDate->getName(),
'price' => $bookingPriceInfo['totalWithoutInsurance'],
'price_total' => $bookingPriceInfo['total'],
'deposit_total' => $bookingPriceInfo['deposit_total'],
'final_payment' => $bookingPriceInfo['final_payment'],
'final_payment_date' => date("Y-m-d",strtotime($bookingPriceInfo['final_payment_date'])),
'participant_salutation_id' => $bookingRequest->getTravelers()[0]->getSex(),
'participant_name' => $bookingRequest->getTravelers()[0]->getLastName(),
'participant_firstname' => $bookingRequest->getTravelers()[0]->getFirstName(),

View file

@ -12,7 +12,8 @@ use Monolog\Logger;
abstract class SternToursCrmExporter
{
const API_URL = 'http://www.cms.stern-tours.net/api';
//const API_URL = 'http://www.cms.stern-tours.net/api';
const API_URL = 'http://cms-stern-torus.local//api';
const API_KEY = 'f6077389c9ce710e554763a5de02c8ec';
const API_USER_ID = 15; // 'apiuser'
const WEBSITE_ID = 1; // 'sterntours.de'

View file

@ -151,8 +151,8 @@ class BookingRequestType extends AbstractType
->add('notes', TextareaType::class, ['required' => false])
->add('acceptTerms', CheckboxType::class, ['required' => true])
->add('acceptPrivacy', CheckboxType::class, ['required' => true])
//->add('acceptEntryRequirements', CheckboxType::class, ['required' => true])
//->add('acceptLegalRights', CheckboxType::class, ['required' => true])
->add('acceptProcessing', CheckboxType::class, ['required' => true])
->add('acceptLegalRights', CheckboxType::class, ['required' => true])
;
$builder->add('departure', EntityType::class, [

View file

@ -84,6 +84,7 @@ class ContactRequestType extends AbstractType
->add('end', StDateType::class, ['required' => false])
->add('duration')
->add('acceptPrivacy', CheckboxType::class, ['required' => true])
->add('acceptProcessing', CheckboxType::class, ['required' => true])
;
}
}

View file

@ -134,6 +134,7 @@ class FewoBookingRequestType extends AbstractType
->add('notes', TextareaType::class, ['required' => false])
->add('acceptTerms', CheckboxType::class, ['required' => true])
->add('acceptPrivacy', CheckboxType::class, ['required' => true])
->add('acceptProcessing', CheckboxType::class, ['required' => true])
;
}

View file

@ -8,6 +8,7 @@ namespace AppBundle\Form;
use AppBundle\Entity\Traveler;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Form\Extension\Core\Type\DateType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
@ -23,6 +24,11 @@ class TravelerType extends AbstractType
'weiblich' => Traveler::FEMALE
];
public static $NATIONALITY_CHOICES = [
'Nationalität (Bitte wählen)' => '',
'deutsch' => 1,
];
/**
* @param OptionsResolver $resolver
*/
@ -51,6 +57,17 @@ class TravelerType extends AbstractType
->add('firstName')
->add('lastName')
->add('birthDate')
->add('nationality', ChoiceType::class, [
'choices' => self::$NATIONALITY_CHOICES,
'constraints' => [
new NotNull(),
new Choice(['choices' => self::$NATIONALITY_CHOICES])
],
'required' => true,
])
->add('acceptEntryRequirements', CheckboxType::class, ['required' => true])
;
/*
, StDateType::class, [

View file

@ -28,12 +28,72 @@ $(document).ready(function() {
}).then(function(r) {
summary$.html(r);
$('#st-booking-price-set-table .st-total-price-set').html($(r).find('.st-total-price').text());
$('#st-booking-price-set-table .st-deposit-price-set').html($(r).find('.st-deposit-price').text());
$('#st-booking-price-set-table .st-final-price-set').html($(r).find('.st-final-price').text());
}, function() {
summary$.html('Aufgrund eines Fehlers konnte kein Angebot ermittelt werden.');
})
});
$('#booking_request_departure').change(function () {
//show nothing
$('.flight_times_ele').hide();
$('#no_flight_time').hide();
$('#yes_flight_time').hide();
console.log($(this).val());
if(!$(this).val() || $(this).find("option:selected").text().indexOf("Eigenanreise") == 0){
return;
}
console.log($('#flight_time_'+$(this).val()).length);
if($('#flight_time_'+$(this).val()).length){
$('#flight_time_'+$(this).val()).show();
$('#yes_flight_time').show();
}else{
$('#no_flight_time').show();
}
});
var toggle_first = false;
function updateNationality(ele){
var obj = ele.parents('.nationality_select').data('toggle');
if(ele.val()){
$(obj).show('slow');
if(!toggle_first){
$(obj).find('.accordion-toggle').click();
toggle_first = true;
}
}else{
$(obj).hide();
}
}
$('.nationality_select').find('select').change(function(){
updateNationality($(this));
});
function updateAllNationality(){
$('.nationality_select').find('select').each(function(){
updateNationality($(this));
});
}
updateAllNationality();
function toggleUpdateChevron(e) {
var $i = $(e.target)
.parent('.panel-group')
.find("i.indicator");
$i.toggleClass('icon-minus icon-plus');
}
$('.acc_nationality_panel').on('hidden.bs.collapse', toggleUpdateChevron);
$('.acc_nationality_panel').on('shown.bs.collapse', toggleUpdateChevron);
function updateTravelers()
{
var travelersIndex = 1;
@ -46,7 +106,7 @@ $(document).ready(function() {
travelers$.hide();
travelerFields$.prop('required', false);
var counter = 1;
if(singleTravelerCount > 0)
{
for(var i = 1; i <= singleTravelerCount; i++)
@ -56,7 +116,8 @@ $(document).ready(function() {
var currentRoomIndex = $(travelerSelector).attr("data-room-index");
$(travelerSelector).show().find('input,select').prop('required', true);
//$(roomIndexSelector).text(currentRoomIndex);
$(roomIndexSelector).text("Einzelzimmer");
$(roomIndexSelector).text(counter + ".) Reiseteilnehmer | Einzelzimmer");
counter ++;
}
}
@ -70,7 +131,8 @@ $(document).ready(function() {
var currentRoomIndex = $(travelerSelector).attr("data-room-index");
$(travelerSelector).show().find('input,select').prop('required', true);
//$(roomIndexSelector).text(currentRoomIndex - offset);
$(roomIndexSelector).text("Doppelzimmer");
$(roomIndexSelector).text(counter + ".) Reiseteilnehmer | Doppelzimmer");
counter ++;
}
}
@ -84,7 +146,8 @@ $(document).ready(function() {
var currentRoomIndex = $(travelerSelector).attr("data-room-index");
$(travelerSelector).show().find('input,select').prop('required', true);
//$(roomIndexSelector).text(currentRoomIndex - offset);
$(roomIndexSelector).text("Dreibettzimmer");
$(roomIndexSelector).text(counter + ".) Reiseteilnehmer | Dreibettzimmer");
counter ++;
}
}

View file

@ -399,7 +399,46 @@ jQuery(document).ready(function($) {
$('#accordion').on('hidden.bs.collapse', toggleChevron);
$('#accordion').on('shown.bs.collapse', toggleChevron);
function toggleChevron2(e) {
console.log(e.target);
var $i = $(e.target)
.parent('.panel-group')
.find("i.indicator");
$i.toggleClass('icon-minus icon-plus');
if($i.hasClass('icon-minus')){
$i.parent('h3').find('span').html('Reiseablauf mit Reisetagen ausblenden');
}
if($i.hasClass('icon-plus')){
$i.parent('h3').find('span').html('Reiseablauf mit Reisetagen einblenden');
}
}
$('#accordion_pd').on('hidden.bs.collapse', toggleChevron2);
$('#accordion_pd').on('shown.bs.collapse', toggleChevron2);
function toggleChevron3(e) {
console.log(e.target);
var $i = $(e.target)
.parent('.panel-group')
.find("i.indicator");
$i.toggleClass('icon-minus icon-plus');
if($i.hasClass('icon-minus')){
$i.parent('h3').find('span').html('Flugdaten ausblenden');
}
if($i.hasClass('icon-plus')){
$i.parent('h3').find('span').html('Flugdaten einblenden');
}
}
$('#accordion_fd').on('hidden.bs.collapse', toggleChevron3);
$('#accordion_fd').on('shown.bs.collapse', toggleChevron3);
/* ==============================================
LIGHTBOX -->
=============================================== */