#1352 - bisheriger aktueller Stand, vor CalenderDayState
git-svn-id: http://78.47.251.156/svn/dev/sterntours-3@3354 f459cee4-fb09-11de-96c3-f9c5f16c3c76
This commit is contained in:
parent
1716662ac5
commit
a2d4159c88
10 changed files with 48 additions and 27 deletions
|
|
@ -24,8 +24,9 @@
|
||||||
{{ form_row(form.city, {'label': 'Ort'}) }}
|
{{ form_row(form.city, {'label': 'Ort'}) }}
|
||||||
{{ form_row(form.maximumPersons, {'label': 'Maximale Personenanzahl'}) }}
|
{{ form_row(form.maximumPersons, {'label': 'Maximale Personenanzahl'}) }}
|
||||||
{{ form_row(form.deposit, {'label': 'Kaution'}) }}
|
{{ form_row(form.deposit, {'label': 'Kaution'}) }}
|
||||||
{{ form_row(form.onlyWeekday, {'label': 'Exklusiver Wochentag'}) }}
|
{#{{ form_row(form.onlyWeekday, {'label': 'Exklusiver Wochentag'}) }}#}
|
||||||
|
|
||||||
|
{#
|
||||||
<div class="checkbox">
|
<div class="checkbox">
|
||||||
{{ form_widget(form.calendarVisible) }}
|
{{ form_widget(form.calendarVisible) }}
|
||||||
<label for="{{ form.calendarVisible.vars.id }}">
|
<label for="{{ form.calendarVisible.vars.id }}">
|
||||||
|
|
@ -33,6 +34,7 @@
|
||||||
</label>
|
</label>
|
||||||
{{ form_errors(form.calendarVisible) }}
|
{{ form_errors(form.calendarVisible) }}
|
||||||
</div>
|
</div>
|
||||||
|
#}
|
||||||
|
|
||||||
<br><br>
|
<br><br>
|
||||||
|
|
||||||
|
|
@ -97,8 +99,8 @@
|
||||||
{% for lodgingPrice in lodging.prices %}
|
{% for lodgingPrice in lodging.prices %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ lodgingPrice.season.name }}</td>
|
<td>{{ lodgingPrice.season.name }}</td>
|
||||||
<td>{{ lodgingPrice.season.fromDate|date('d-m-y') }}</td>
|
<td>{{ lodgingPrice.season.fromDate|date('d.m.y') }}</td>
|
||||||
<td>{{ lodgingPrice.season.toDate|date('d-m-y') }}</td>
|
<td>{{ lodgingPrice.season.toDate|date('d.m.y') }}</td>
|
||||||
<td>{{ lodgingPrice.season.minimumStay }}</td>
|
<td>{{ lodgingPrice.season.minimumStay }}</td>
|
||||||
<td>{{ lodgingPrice.perNight }}</td>
|
<td>{{ lodgingPrice.perNight }}</td>
|
||||||
<td>{{ lodgingPrice.flatPrice }}</td>
|
<td>{{ lodgingPrice.flatPrice }}</td>
|
||||||
|
|
@ -152,8 +154,8 @@
|
||||||
|
|
||||||
{% for lodgingReservation in lodging.reservations %}
|
{% for lodgingReservation in lodging.reservations %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ lodgingReservation.fromDate|date('d-m-y') }}</td>
|
<td>{{ lodgingReservation.fromDate|date('d.m.y') }}</td>
|
||||||
<td>{{ lodgingReservation.toDate|date('d-m-y') }}</td>
|
<td>{{ lodgingReservation.toDate|date('d.m.y') }}</td>
|
||||||
<td>
|
<td>
|
||||||
{% if lodgingReservation.status == 0 %}
|
{% if lodgingReservation.status == 0 %}
|
||||||
belegt
|
belegt
|
||||||
|
|
|
||||||
|
|
@ -24,9 +24,9 @@
|
||||||
{{ form_row(form.city, {label: 'Ort'}) }}
|
{{ form_row(form.city, {label: 'Ort'}) }}
|
||||||
{{ form_row(form.maximumPersons, {label: 'Maximale Personenanzahl'}) }}
|
{{ form_row(form.maximumPersons, {label: 'Maximale Personenanzahl'}) }}
|
||||||
{{ form_row(form.deposit, {label: 'Kaution'}) }}
|
{{ form_row(form.deposit, {label: 'Kaution'}) }}
|
||||||
{{ form_row(form.onlyWeekday, {label: 'Exklusiver Wochentag'}) }}
|
{#{{ form_row(form.onlyWeekday, {label: 'Exklusiver Wochentag'}) }}#}
|
||||||
|
|
||||||
|
|
||||||
|
{#
|
||||||
<div class="checkbox">
|
<div class="checkbox">
|
||||||
{{ form_widget(form.calendarVisible) }}
|
{{ form_widget(form.calendarVisible) }}
|
||||||
<label for="{{ form.calendarVisible.vars.id }}">
|
<label for="{{ form.calendarVisible.vars.id }}">
|
||||||
|
|
@ -34,6 +34,7 @@
|
||||||
</label>
|
</label>
|
||||||
{{ form_errors(form.calendarVisible) }}
|
{{ form_errors(form.calendarVisible) }}
|
||||||
</div>
|
</div>
|
||||||
|
#}
|
||||||
|
|
||||||
<div class="col-md-12 col-sm-12 col-xs-12">
|
<div class="col-md-12 col-sm-12 col-xs-12">
|
||||||
<button type="submit" value="SEND" id="submit"
|
<button type="submit" value="SEND" id="submit"
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@
|
||||||
{{ form_row(form.fromDate , {label: 'Von'}) }}
|
{{ form_row(form.fromDate , {label: 'Von'}) }}
|
||||||
{{ form_row(form.toDate, {label: 'Bis'}) }}
|
{{ form_row(form.toDate, {label: 'Bis'}) }}
|
||||||
{{ form_row(form.status, {label: 'Status'}) }}
|
{{ form_row(form.status, {label: 'Status'}) }}
|
||||||
{{ form_row(form.type, {label: 'Typ'}) }}
|
{#{{ form_row(form.type, {label: 'Typ'}) }}#}
|
||||||
|
|
||||||
<div class="col-md-12 col-sm-12 col-xs-12">
|
<div class="col-md-12 col-sm-12 col-xs-12">
|
||||||
<button type="submit" value="SEND" id="submit"
|
<button type="submit" value="SEND" id="submit"
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@
|
||||||
{{ form_row(form.fromDate , {label: 'Von'}) }}
|
{{ form_row(form.fromDate , {label: 'Von'}) }}
|
||||||
{{ form_row(form.toDate, {label: 'Bis'}) }}
|
{{ form_row(form.toDate, {label: 'Bis'}) }}
|
||||||
{{ form_row(form.status, {label: 'Status'}) }}
|
{{ form_row(form.status, {label: 'Status'}) }}
|
||||||
{{ form_row(form.type, {label: 'Typ'}) }}
|
{#{{ form_row(form.type, {label: 'Typ'}) }}#}
|
||||||
|
|
||||||
<div class="col-md-12 col-sm-12 col-xs-12">
|
<div class="col-md-12 col-sm-12 col-xs-12">
|
||||||
<button type="submit" value="SEND" id="submit"
|
<button type="submit" value="SEND" id="submit"
|
||||||
|
|
|
||||||
|
|
@ -22,8 +22,8 @@
|
||||||
{% for season in seasons %}
|
{% for season in seasons %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ season.name }}</td>
|
<td>{{ season.name }}</td>
|
||||||
<td>{{ season.fromDate|date('d-m-y') }}</td>
|
<td>{{ season.fromDate|date('d.m.y') }}</td>
|
||||||
<td>{{ season.toDate|date('d-m-y') }}</td>
|
<td>{{ season.toDate|date('d.m.y') }}</td>
|
||||||
<td>
|
<td>
|
||||||
<a href="{{ '/admin/fewo/seasons/' ~ season.id }}"
|
<a href="{{ '/admin/fewo/seasons/' ~ season.id }}"
|
||||||
class="btn btn-primary"
|
class="btn btn-primary"
|
||||||
|
|
|
||||||
|
|
@ -548,8 +548,6 @@ class AdminController extends Controller
|
||||||
*/
|
*/
|
||||||
public function adminFewoNewReservationWithStartingDayAction(Request $request, $lodgingId, $fromDate)
|
public function adminFewoNewReservationWithStartingDayAction(Request $request, $lodgingId, $fromDate)
|
||||||
{
|
{
|
||||||
//todo price -> season
|
|
||||||
//todo season.minimumStay
|
|
||||||
$em = $this->getEntityManager();
|
$em = $this->getEntityManager();
|
||||||
$fewoLodgingRepo = $em->getRepository('AppBundle:FewoLodging');
|
$fewoLodgingRepo = $em->getRepository('AppBundle:FewoLodging');
|
||||||
$lodging = $fewoLodgingRepo->find($lodgingId);
|
$lodging = $fewoLodgingRepo->find($lodgingId);
|
||||||
|
|
@ -608,6 +606,7 @@ class AdminController extends Controller
|
||||||
$fewoReservationRepo = $em->getRepository('AppBundle:FewoReservation');
|
$fewoReservationRepo = $em->getRepository('AppBundle:FewoReservation');
|
||||||
$lodging = $fewoLodgingRepo->find($lodgingId);
|
$lodging = $fewoLodgingRepo->find($lodgingId);
|
||||||
$reservation = $fewoReservationRepo->find($reservationId);
|
$reservation = $fewoReservationRepo->find($reservationId);
|
||||||
|
$reservation->setType(1);
|
||||||
$fromDate = $reservation->getFromDate()->format('d.m.Y');
|
$fromDate = $reservation->getFromDate()->format('d.m.Y');
|
||||||
|
|
||||||
$form = $this->createForm(FewoReservationType::class, $reservation, [
|
$form = $this->createForm(FewoReservationType::class, $reservation, [
|
||||||
|
|
@ -623,6 +622,7 @@ class AdminController extends Controller
|
||||||
|
|
||||||
if ($request->getMethod() == 'POST' && $form->isValid())
|
if ($request->getMethod() == 'POST' && $form->isValid())
|
||||||
{
|
{
|
||||||
|
$reservation->setType(1); // 0 = Buchung; 1 = Händisch
|
||||||
$em->flush();
|
$em->flush();
|
||||||
|
|
||||||
return $this->redirect('/admin/fewo/lodgings/'.$lodgingId);
|
return $this->redirect('/admin/fewo/lodgings/'.$lodgingId);
|
||||||
|
|
|
||||||
|
|
@ -128,7 +128,7 @@ class FewoLodging
|
||||||
/**
|
/**
|
||||||
* @var integer
|
* @var integer
|
||||||
*
|
*
|
||||||
* @ORM\Column(name="only_weekday", type="integer", nullable=false)
|
* @ORM\Column(name="only_weekday", type="integer", nullable=true)
|
||||||
*/
|
*/
|
||||||
private $onlyWeekday;
|
private $onlyWeekday;
|
||||||
|
|
||||||
|
|
@ -142,7 +142,7 @@ class FewoLodging
|
||||||
/**
|
/**
|
||||||
* @var boolean
|
* @var boolean
|
||||||
*
|
*
|
||||||
* @ORM\Column(name="calendar_visible", type="boolean", nullable=false)
|
* @ORM\Column(name="calendar_visible", type="boolean", nullable=true)
|
||||||
*/
|
*/
|
||||||
private $calendarVisible;
|
private $calendarVisible;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@ class FewoReservation
|
||||||
/**
|
/**
|
||||||
* @var integer
|
* @var integer
|
||||||
*
|
*
|
||||||
* @ORM\Column(name="type", type="integer", nullable=false)
|
* @ORM\Column(name="type", type="integer", nullable=true)
|
||||||
*/
|
*/
|
||||||
private $type;
|
private $type;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -40,24 +40,40 @@ class FewoLodgingType extends AbstractType
|
||||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||||
{
|
{
|
||||||
$builder
|
$builder
|
||||||
->add('name')
|
->add('name', null, [
|
||||||
->add('description')
|
'required' => true,
|
||||||
->add('equipment')
|
|
||||||
->add('adress1')
|
|
||||||
->add('adress2')
|
|
||||||
->add('zipCode')
|
|
||||||
->add('city')
|
|
||||||
->add('maximumPersons', TextType::class, [
|
|
||||||
|
|
||||||
])
|
])
|
||||||
->add('deposit')
|
->add('description', null, [
|
||||||
|
'required' => true,
|
||||||
|
])
|
||||||
|
->add('equipment', null, [
|
||||||
|
'required' => true,
|
||||||
|
])
|
||||||
|
->add('adress1', null, [
|
||||||
|
'required' => true,
|
||||||
|
])
|
||||||
|
->add('adress2')
|
||||||
|
->add('zipCode', null, [
|
||||||
|
'required' => true,
|
||||||
|
])
|
||||||
|
->add('city', null, [
|
||||||
|
'required' => true,
|
||||||
|
])
|
||||||
|
->add('maximumPersons', TextType::class, [
|
||||||
|
'required' => true,
|
||||||
|
])
|
||||||
|
->add('deposit', null, [
|
||||||
|
'required' => true,
|
||||||
|
])
|
||||||
|
/*
|
||||||
->add('onlyWeekday', ChoiceType::class, [
|
->add('onlyWeekday', ChoiceType::class, [
|
||||||
'choices' => self::$WEEKDAY_CHOICES,
|
'choices' => self::$WEEKDAY_CHOICES,
|
||||||
'constraints' => [
|
'constraints' => [
|
||||||
new Choice(['choices' => self::$WEEKDAY_CHOICES])
|
new Choice(['choices' => self::$WEEKDAY_CHOICES])
|
||||||
]
|
]
|
||||||
])
|
])
|
||||||
->add('calendarVisible')
|
*/
|
||||||
|
//->add('calendarVisible')
|
||||||
->add('type', EntityType::class, [
|
->add('type', EntityType::class, [
|
||||||
'placeholder' => '(Bitte wählen) *',
|
'placeholder' => '(Bitte wählen) *',
|
||||||
'class' => 'AppBundle\Entity\FewoLodgingType',
|
'class' => 'AppBundle\Entity\FewoLodgingType',
|
||||||
|
|
|
||||||
|
|
@ -57,6 +57,7 @@ class FewoReservationType extends AbstractType
|
||||||
],
|
],
|
||||||
'required' => true,
|
'required' => true,
|
||||||
])
|
])
|
||||||
|
/*
|
||||||
->add('type', ChoiceType::class, [
|
->add('type', ChoiceType::class, [
|
||||||
'placeholder' => 'Buchungstyp (Bitte wählen) *',
|
'placeholder' => 'Buchungstyp (Bitte wählen) *',
|
||||||
'choices' => self::$TYPE_CHOICES,
|
'choices' => self::$TYPE_CHOICES,
|
||||||
|
|
@ -65,6 +66,7 @@ class FewoReservationType extends AbstractType
|
||||||
],
|
],
|
||||||
'required' => true,
|
'required' => true,
|
||||||
])
|
])
|
||||||
|
*/
|
||||||
//->add('lodging') // wird händisch gesetzt
|
//->add('lodging') // wird händisch gesetzt
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue